1 /* parser auto-generated by pidl */
4 #include "../librpc/gen_ndr/ndr_lsa.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_String(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_String
*r
)
10 if (ndr_flags
& NDR_SCALARS
) {
11 NDR_CHECK(ndr_push_align(ndr
, 4));
12 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
)));
13 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
)));
14 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
16 if (ndr_flags
& NDR_BUFFERS
) {
18 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
) / 2));
19 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
) / 2));
21 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, 2 * strlen_m(r
->string
) / 2, sizeof(uint16_t), CH_UTF16
));
24 return NDR_ERR_SUCCESS
;
27 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_String(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_String
*r
)
30 TALLOC_CTX
*_mem_save_string_0
;
31 if (ndr_flags
& NDR_SCALARS
) {
32 NDR_CHECK(ndr_pull_align(ndr
, 4));
33 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
34 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
35 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
37 NDR_PULL_ALLOC(ndr
, r
->string
);
42 if (ndr_flags
& NDR_BUFFERS
) {
44 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
45 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
46 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
47 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
48 if (ndr_get_array_length(ndr
, &r
->string
) > ndr_get_array_size(ndr
, &r
->string
)) {
49 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string
), ndr_get_array_length(ndr
, &r
->string
));
51 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint16_t), CH_UTF16
));
52 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
55 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
/ 2));
58 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
/ 2));
61 return NDR_ERR_SUCCESS
;
64 _PUBLIC_
void ndr_print_lsa_String(struct ndr_print
*ndr
, const char *name
, const struct lsa_String
*r
)
66 ndr_print_struct(ndr
, name
, "lsa_String");
68 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->length
);
69 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->size
);
70 ndr_print_ptr(ndr
, "string", r
->string
);
73 ndr_print_string(ndr
, "string", r
->string
);
79 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_StringLarge(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_StringLarge
*r
)
81 if (ndr_flags
& NDR_SCALARS
) {
82 NDR_CHECK(ndr_push_align(ndr
, 4));
83 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
)));
84 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->string
)));
85 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
87 if (ndr_flags
& NDR_BUFFERS
) {
89 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->string
) / 2));
90 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
91 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
) / 2));
92 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, 2 * strlen_m(r
->string
) / 2, sizeof(uint16_t), CH_UTF16
));
95 return NDR_ERR_SUCCESS
;
98 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_StringLarge(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_StringLarge
*r
)
100 uint32_t _ptr_string
;
101 TALLOC_CTX
*_mem_save_string_0
;
102 if (ndr_flags
& NDR_SCALARS
) {
103 NDR_CHECK(ndr_pull_align(ndr
, 4));
104 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
105 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
106 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
108 NDR_PULL_ALLOC(ndr
, r
->string
);
113 if (ndr_flags
& NDR_BUFFERS
) {
115 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
116 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
117 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
118 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
119 if (ndr_get_array_length(ndr
, &r
->string
) > ndr_get_array_size(ndr
, &r
->string
)) {
120 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string
), ndr_get_array_length(ndr
, &r
->string
));
122 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint16_t), CH_UTF16
));
123 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
126 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
/ 2));
129 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
/ 2));
132 return NDR_ERR_SUCCESS
;
135 _PUBLIC_
void ndr_print_lsa_StringLarge(struct ndr_print
*ndr
, const char *name
, const struct lsa_StringLarge
*r
)
137 ndr_print_struct(ndr
, name
, "lsa_StringLarge");
139 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->length
);
140 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m_term(r
->string
):r
->size
);
141 ndr_print_ptr(ndr
, "string", r
->string
);
144 ndr_print_string(ndr
, "string", r
->string
);
150 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_Strings(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_Strings
*r
)
152 uint32_t cntr_names_1
;
153 if (ndr_flags
& NDR_SCALARS
) {
154 NDR_CHECK(ndr_push_align(ndr
, 4));
155 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
156 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
158 if (ndr_flags
& NDR_BUFFERS
) {
160 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
161 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
162 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
164 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
165 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
169 return NDR_ERR_SUCCESS
;
172 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_Strings(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_Strings
*r
)
175 uint32_t cntr_names_1
;
176 TALLOC_CTX
*_mem_save_names_0
;
177 TALLOC_CTX
*_mem_save_names_1
;
178 if (ndr_flags
& NDR_SCALARS
) {
179 NDR_CHECK(ndr_pull_align(ndr
, 4));
180 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
181 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
183 NDR_PULL_ALLOC(ndr
, r
->names
);
188 if (ndr_flags
& NDR_BUFFERS
) {
190 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
191 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
192 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
193 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
194 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
195 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
196 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
197 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
199 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
200 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
202 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
203 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
206 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
209 return NDR_ERR_SUCCESS
;
212 _PUBLIC_
void ndr_print_lsa_Strings(struct ndr_print
*ndr
, const char *name
, const struct lsa_Strings
*r
)
214 uint32_t cntr_names_1
;
215 ndr_print_struct(ndr
, name
, "lsa_Strings");
217 ndr_print_uint32(ndr
, "count", r
->count
);
218 ndr_print_ptr(ndr
, "names", r
->names
);
221 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
223 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
225 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
226 ndr_print_lsa_String(ndr
, "names", &r
->names
[cntr_names_1
]);
236 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_AsciiString(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AsciiString
*r
)
238 if (ndr_flags
& NDR_SCALARS
) {
239 NDR_CHECK(ndr_push_align(ndr
, 4));
240 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
241 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
242 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
244 if (ndr_flags
& NDR_BUFFERS
) {
246 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
247 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
248 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
249 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, strlen_m(r
->string
), sizeof(uint8_t), CH_DOS
));
252 return NDR_ERR_SUCCESS
;
255 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_AsciiString(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AsciiString
*r
)
257 uint32_t _ptr_string
;
258 TALLOC_CTX
*_mem_save_string_0
;
259 if (ndr_flags
& NDR_SCALARS
) {
260 NDR_CHECK(ndr_pull_align(ndr
, 4));
261 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
262 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
263 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
265 NDR_PULL_ALLOC(ndr
, r
->string
);
270 if (ndr_flags
& NDR_BUFFERS
) {
272 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
273 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
274 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
275 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
276 if (ndr_get_array_length(ndr
, &r
->string
) > ndr_get_array_size(ndr
, &r
->string
)) {
277 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string
), ndr_get_array_length(ndr
, &r
->string
));
279 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint8_t), CH_DOS
));
280 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
283 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
));
286 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
));
289 return NDR_ERR_SUCCESS
;
292 _PUBLIC_
void ndr_print_lsa_AsciiString(struct ndr_print
*ndr
, const char *name
, const struct lsa_AsciiString
*r
)
294 ndr_print_struct(ndr
, name
, "lsa_AsciiString");
296 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->string
):r
->length
);
297 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->string
):r
->size
);
298 ndr_print_ptr(ndr
, "string", r
->string
);
301 ndr_print_string(ndr
, "string", r
->string
);
307 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_AsciiStringLarge(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AsciiStringLarge
*r
)
309 if (ndr_flags
& NDR_SCALARS
) {
310 NDR_CHECK(ndr_push_align(ndr
, 4));
311 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
312 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m_term(r
->string
)));
313 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
315 if (ndr_flags
& NDR_BUFFERS
) {
317 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m_term(r
->string
)));
318 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
319 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
320 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, strlen_m(r
->string
), sizeof(uint8_t), CH_DOS
));
323 return NDR_ERR_SUCCESS
;
326 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_AsciiStringLarge(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AsciiStringLarge
*r
)
328 uint32_t _ptr_string
;
329 TALLOC_CTX
*_mem_save_string_0
;
330 if (ndr_flags
& NDR_SCALARS
) {
331 NDR_CHECK(ndr_pull_align(ndr
, 4));
332 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
333 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
334 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
336 NDR_PULL_ALLOC(ndr
, r
->string
);
341 if (ndr_flags
& NDR_BUFFERS
) {
343 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
344 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
345 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
346 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
347 if (ndr_get_array_length(ndr
, &r
->string
) > ndr_get_array_size(ndr
, &r
->string
)) {
348 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string
), ndr_get_array_length(ndr
, &r
->string
));
350 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint8_t), CH_DOS
));
351 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
354 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
));
357 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
));
360 return NDR_ERR_SUCCESS
;
363 _PUBLIC_
void ndr_print_lsa_AsciiStringLarge(struct ndr_print
*ndr
, const char *name
, const struct lsa_AsciiStringLarge
*r
)
365 ndr_print_struct(ndr
, name
, "lsa_AsciiStringLarge");
367 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->string
):r
->length
);
368 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m_term(r
->string
):r
->size
);
369 ndr_print_ptr(ndr
, "string", r
->string
);
372 ndr_print_string(ndr
, "string", r
->string
);
378 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_BinaryString(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_BinaryString
*r
)
380 uint32_t cntr_array_1
;
381 if (ndr_flags
& NDR_SCALARS
) {
382 NDR_CHECK(ndr_push_align(ndr
, 4));
383 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->length
));
384 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->size
));
385 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
387 if (ndr_flags
& NDR_BUFFERS
) {
389 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
/ 2));
390 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
/ 2));
392 for (cntr_array_1
= 0; cntr_array_1
< r
->length
/ 2; cntr_array_1
++) {
393 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->array
[cntr_array_1
]));
397 return NDR_ERR_SUCCESS
;
400 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_BinaryString(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_BinaryString
*r
)
403 uint32_t cntr_array_1
;
404 TALLOC_CTX
*_mem_save_array_0
;
405 TALLOC_CTX
*_mem_save_array_1
;
406 if (ndr_flags
& NDR_SCALARS
) {
407 NDR_CHECK(ndr_pull_align(ndr
, 4));
408 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
409 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
410 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
412 NDR_PULL_ALLOC(ndr
, r
->array
);
417 if (ndr_flags
& NDR_BUFFERS
) {
419 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
420 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
421 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
422 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->array
));
423 if (ndr_get_array_length(ndr
, &r
->array
) > ndr_get_array_size(ndr
, &r
->array
)) {
424 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->array
), ndr_get_array_length(ndr
, &r
->array
));
426 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
427 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
428 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
429 for (cntr_array_1
= 0; cntr_array_1
< r
->length
/ 2; cntr_array_1
++) {
430 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
432 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
433 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
436 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->size
/ 2));
439 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->array
, r
->length
/ 2));
442 return NDR_ERR_SUCCESS
;
445 _PUBLIC_
void ndr_print_lsa_BinaryString(struct ndr_print
*ndr
, const char *name
, const struct lsa_BinaryString
*r
)
447 uint32_t cntr_array_1
;
448 ndr_print_struct(ndr
, name
, "lsa_BinaryString");
450 ndr_print_uint16(ndr
, "length", r
->length
);
451 ndr_print_uint16(ndr
, "size", r
->size
);
452 ndr_print_ptr(ndr
, "array", r
->array
);
455 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->length
/ 2);
457 for (cntr_array_1
=0;cntr_array_1
<r
->length
/ 2;cntr_array_1
++) {
459 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
460 ndr_print_uint16(ndr
, "array", r
->array
[cntr_array_1
]);
470 static enum ndr_err_code
ndr_push_lsa_LUID(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_LUID
*r
)
472 if (ndr_flags
& NDR_SCALARS
) {
473 NDR_CHECK(ndr_push_align(ndr
, 4));
474 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->low
));
475 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->high
));
477 if (ndr_flags
& NDR_BUFFERS
) {
479 return NDR_ERR_SUCCESS
;
482 static enum ndr_err_code
ndr_pull_lsa_LUID(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_LUID
*r
)
484 if (ndr_flags
& NDR_SCALARS
) {
485 NDR_CHECK(ndr_pull_align(ndr
, 4));
486 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->low
));
487 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->high
));
489 if (ndr_flags
& NDR_BUFFERS
) {
491 return NDR_ERR_SUCCESS
;
494 _PUBLIC_
void ndr_print_lsa_LUID(struct ndr_print
*ndr
, const char *name
, const struct lsa_LUID
*r
)
496 ndr_print_struct(ndr
, name
, "lsa_LUID");
498 ndr_print_uint32(ndr
, "low", r
->low
);
499 ndr_print_uint32(ndr
, "high", r
->high
);
503 static enum ndr_err_code
ndr_push_lsa_PrivEntry(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivEntry
*r
)
505 if (ndr_flags
& NDR_SCALARS
) {
506 NDR_CHECK(ndr_push_align(ndr
, 4));
507 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
508 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
510 if (ndr_flags
& NDR_BUFFERS
) {
511 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
513 return NDR_ERR_SUCCESS
;
516 static enum ndr_err_code
ndr_pull_lsa_PrivEntry(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivEntry
*r
)
518 if (ndr_flags
& NDR_SCALARS
) {
519 NDR_CHECK(ndr_pull_align(ndr
, 4));
520 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
521 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
523 if (ndr_flags
& NDR_BUFFERS
) {
524 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
526 return NDR_ERR_SUCCESS
;
529 _PUBLIC_
void ndr_print_lsa_PrivEntry(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivEntry
*r
)
531 ndr_print_struct(ndr
, name
, "lsa_PrivEntry");
533 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
534 ndr_print_lsa_LUID(ndr
, "luid", &r
->luid
);
538 static enum ndr_err_code
ndr_push_lsa_PrivArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivArray
*r
)
540 uint32_t cntr_privs_1
;
541 if (ndr_flags
& NDR_SCALARS
) {
542 NDR_CHECK(ndr_push_align(ndr
, 4));
543 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
544 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->privs
));
546 if (ndr_flags
& NDR_BUFFERS
) {
548 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
549 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
550 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr
, NDR_SCALARS
, &r
->privs
[cntr_privs_1
]));
552 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
553 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr
, NDR_BUFFERS
, &r
->privs
[cntr_privs_1
]));
557 return NDR_ERR_SUCCESS
;
560 static enum ndr_err_code
ndr_pull_lsa_PrivArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivArray
*r
)
563 uint32_t cntr_privs_1
;
564 TALLOC_CTX
*_mem_save_privs_0
;
565 TALLOC_CTX
*_mem_save_privs_1
;
566 if (ndr_flags
& NDR_SCALARS
) {
567 NDR_CHECK(ndr_pull_align(ndr
, 4));
568 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
569 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
571 NDR_PULL_ALLOC(ndr
, r
->privs
);
576 if (ndr_flags
& NDR_BUFFERS
) {
578 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
579 NDR_PULL_SET_MEM_CTX(ndr
, r
->privs
, 0);
580 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->privs
));
581 NDR_PULL_ALLOC_N(ndr
, r
->privs
, ndr_get_array_size(ndr
, &r
->privs
));
582 _mem_save_privs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
583 NDR_PULL_SET_MEM_CTX(ndr
, r
->privs
, 0);
584 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
585 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr
, NDR_SCALARS
, &r
->privs
[cntr_privs_1
]));
587 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
588 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr
, NDR_BUFFERS
, &r
->privs
[cntr_privs_1
]));
590 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_1
, 0);
591 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, 0);
594 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->privs
, r
->count
));
597 return NDR_ERR_SUCCESS
;
600 _PUBLIC_
void ndr_print_lsa_PrivArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivArray
*r
)
602 uint32_t cntr_privs_1
;
603 ndr_print_struct(ndr
, name
, "lsa_PrivArray");
605 ndr_print_uint32(ndr
, "count", r
->count
);
606 ndr_print_ptr(ndr
, "privs", r
->privs
);
609 ndr
->print(ndr
, "%s: ARRAY(%d)", "privs", (int)r
->count
);
611 for (cntr_privs_1
=0;cntr_privs_1
<r
->count
;cntr_privs_1
++) {
613 if (asprintf(&idx_1
, "[%d]", cntr_privs_1
) != -1) {
614 ndr_print_lsa_PrivEntry(ndr
, "privs", &r
->privs
[cntr_privs_1
]);
624 static enum ndr_err_code
ndr_push_lsa_QosInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_QosInfo
*r
)
626 if (ndr_flags
& NDR_SCALARS
) {
627 NDR_CHECK(ndr_push_align(ndr
, 4));
628 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
629 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->impersonation_level
));
630 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->context_mode
));
631 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->effective_only
));
633 if (ndr_flags
& NDR_BUFFERS
) {
635 return NDR_ERR_SUCCESS
;
638 static enum ndr_err_code
ndr_pull_lsa_QosInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_QosInfo
*r
)
640 if (ndr_flags
& NDR_SCALARS
) {
641 NDR_CHECK(ndr_pull_align(ndr
, 4));
642 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->len
));
643 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->impersonation_level
));
644 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->context_mode
));
645 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->effective_only
));
647 if (ndr_flags
& NDR_BUFFERS
) {
649 return NDR_ERR_SUCCESS
;
652 _PUBLIC_
void ndr_print_lsa_QosInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_QosInfo
*r
)
654 ndr_print_struct(ndr
, name
, "lsa_QosInfo");
656 ndr_print_uint32(ndr
, "len", r
->len
);
657 ndr_print_uint16(ndr
, "impersonation_level", r
->impersonation_level
);
658 ndr_print_uint8(ndr
, "context_mode", r
->context_mode
);
659 ndr_print_uint8(ndr
, "effective_only", r
->effective_only
);
663 static enum ndr_err_code
ndr_push_lsa_ObjectAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ObjectAttribute
*r
)
665 if (ndr_flags
& NDR_SCALARS
) {
666 NDR_CHECK(ndr_push_align(ndr
, 4));
667 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
668 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->root_dir
));
669 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_name
));
670 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attributes
));
671 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sec_desc
));
672 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sec_qos
));
674 if (ndr_flags
& NDR_BUFFERS
) {
676 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->root_dir
));
678 if (r
->object_name
) {
679 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_name
, CH_UTF16
)));
680 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
681 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_name
, CH_UTF16
)));
682 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_name
, ndr_charset_length(r
->object_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
685 NDR_CHECK(ndr_push_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sec_desc
));
688 NDR_CHECK(ndr_push_lsa_QosInfo(ndr
, NDR_SCALARS
, r
->sec_qos
));
691 return NDR_ERR_SUCCESS
;
694 static enum ndr_err_code
ndr_pull_lsa_ObjectAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ObjectAttribute
*r
)
696 uint32_t _ptr_root_dir
;
697 TALLOC_CTX
*_mem_save_root_dir_0
;
698 uint32_t _ptr_object_name
;
699 TALLOC_CTX
*_mem_save_object_name_0
;
700 uint32_t _ptr_sec_desc
;
701 TALLOC_CTX
*_mem_save_sec_desc_0
;
702 uint32_t _ptr_sec_qos
;
703 TALLOC_CTX
*_mem_save_sec_qos_0
;
704 if (ndr_flags
& NDR_SCALARS
) {
705 NDR_CHECK(ndr_pull_align(ndr
, 4));
706 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->len
));
707 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_root_dir
));
709 NDR_PULL_ALLOC(ndr
, r
->root_dir
);
713 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_name
));
714 if (_ptr_object_name
) {
715 NDR_PULL_ALLOC(ndr
, r
->object_name
);
717 r
->object_name
= NULL
;
719 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attributes
));
720 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sec_desc
));
722 NDR_PULL_ALLOC(ndr
, r
->sec_desc
);
726 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sec_qos
));
728 NDR_PULL_ALLOC(ndr
, r
->sec_qos
);
733 if (ndr_flags
& NDR_BUFFERS
) {
735 _mem_save_root_dir_0
= NDR_PULL_GET_MEM_CTX(ndr
);
736 NDR_PULL_SET_MEM_CTX(ndr
, r
->root_dir
, 0);
737 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->root_dir
));
738 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_root_dir_0
, 0);
740 if (r
->object_name
) {
741 _mem_save_object_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
742 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_name
, 0);
743 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_name
));
744 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_name
));
745 if (ndr_get_array_length(ndr
, &r
->object_name
) > ndr_get_array_size(ndr
, &r
->object_name
)) {
746 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->object_name
), ndr_get_array_length(ndr
, &r
->object_name
));
748 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_name
), sizeof(uint16_t)));
749 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_name
, ndr_get_array_length(ndr
, &r
->object_name
), sizeof(uint16_t), CH_UTF16
));
750 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_name_0
, 0);
753 _mem_save_sec_desc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
754 NDR_PULL_SET_MEM_CTX(ndr
, r
->sec_desc
, 0);
755 NDR_CHECK(ndr_pull_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sec_desc
));
756 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_desc_0
, 0);
759 _mem_save_sec_qos_0
= NDR_PULL_GET_MEM_CTX(ndr
);
760 NDR_PULL_SET_MEM_CTX(ndr
, r
->sec_qos
, 0);
761 NDR_CHECK(ndr_pull_lsa_QosInfo(ndr
, NDR_SCALARS
, r
->sec_qos
));
762 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_qos_0
, 0);
765 return NDR_ERR_SUCCESS
;
768 _PUBLIC_
void ndr_print_lsa_ObjectAttribute(struct ndr_print
*ndr
, const char *name
, const struct lsa_ObjectAttribute
*r
)
770 ndr_print_struct(ndr
, name
, "lsa_ObjectAttribute");
772 ndr_print_uint32(ndr
, "len", r
->len
);
773 ndr_print_ptr(ndr
, "root_dir", r
->root_dir
);
776 ndr_print_uint8(ndr
, "root_dir", *r
->root_dir
);
779 ndr_print_ptr(ndr
, "object_name", r
->object_name
);
781 if (r
->object_name
) {
782 ndr_print_string(ndr
, "object_name", r
->object_name
);
785 ndr_print_uint32(ndr
, "attributes", r
->attributes
);
786 ndr_print_ptr(ndr
, "sec_desc", r
->sec_desc
);
789 ndr_print_security_descriptor(ndr
, "sec_desc", r
->sec_desc
);
792 ndr_print_ptr(ndr
, "sec_qos", r
->sec_qos
);
795 ndr_print_lsa_QosInfo(ndr
, "sec_qos", r
->sec_qos
);
801 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_PolicyAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
803 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
804 return NDR_ERR_SUCCESS
;
807 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_PolicyAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
810 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
812 return NDR_ERR_SUCCESS
;
815 _PUBLIC_
void ndr_print_lsa_PolicyAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
817 ndr_print_uint32(ndr
, name
, r
);
819 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_VIEW_LOCAL_INFORMATION", LSA_POLICY_VIEW_LOCAL_INFORMATION
, r
);
820 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_VIEW_AUDIT_INFORMATION", LSA_POLICY_VIEW_AUDIT_INFORMATION
, r
);
821 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_GET_PRIVATE_INFORMATION", LSA_POLICY_GET_PRIVATE_INFORMATION
, r
);
822 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_TRUST_ADMIN", LSA_POLICY_TRUST_ADMIN
, r
);
823 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_CREATE_ACCOUNT", LSA_POLICY_CREATE_ACCOUNT
, r
);
824 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_CREATE_SECRET", LSA_POLICY_CREATE_SECRET
, r
);
825 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_CREATE_PRIVILEGE", LSA_POLICY_CREATE_PRIVILEGE
, r
);
826 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS", LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS
, r
);
827 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_SET_AUDIT_REQUIREMENTS", LSA_POLICY_SET_AUDIT_REQUIREMENTS
, r
);
828 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_AUDIT_LOG_ADMIN", LSA_POLICY_AUDIT_LOG_ADMIN
, r
);
829 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_SERVER_ADMIN", LSA_POLICY_SERVER_ADMIN
, r
);
830 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_LOOKUP_NAMES", LSA_POLICY_LOOKUP_NAMES
, r
);
834 static enum ndr_err_code
ndr_push_lsa_AuditLogInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditLogInfo
*r
)
836 if (ndr_flags
& NDR_SCALARS
) {
837 NDR_CHECK(ndr_push_align(ndr
, 8));
838 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->percent_full
));
839 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maximum_log_size
));
840 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->retention_time
));
841 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_in_progress
));
842 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->time_to_shutdown
));
843 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->next_audit_record
));
845 if (ndr_flags
& NDR_BUFFERS
) {
847 return NDR_ERR_SUCCESS
;
850 static enum ndr_err_code
ndr_pull_lsa_AuditLogInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditLogInfo
*r
)
852 if (ndr_flags
& NDR_SCALARS
) {
853 NDR_CHECK(ndr_pull_align(ndr
, 8));
854 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->percent_full
));
855 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maximum_log_size
));
856 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->retention_time
));
857 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_in_progress
));
858 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->time_to_shutdown
));
859 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->next_audit_record
));
861 if (ndr_flags
& NDR_BUFFERS
) {
863 return NDR_ERR_SUCCESS
;
866 _PUBLIC_
void ndr_print_lsa_AuditLogInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditLogInfo
*r
)
868 ndr_print_struct(ndr
, name
, "lsa_AuditLogInfo");
870 ndr_print_uint32(ndr
, "percent_full", r
->percent_full
);
871 ndr_print_uint32(ndr
, "maximum_log_size", r
->maximum_log_size
);
872 ndr_print_hyper(ndr
, "retention_time", r
->retention_time
);
873 ndr_print_uint8(ndr
, "shutdown_in_progress", r
->shutdown_in_progress
);
874 ndr_print_hyper(ndr
, "time_to_shutdown", r
->time_to_shutdown
);
875 ndr_print_uint32(ndr
, "next_audit_record", r
->next_audit_record
);
879 static enum ndr_err_code
ndr_push_lsa_PolicyAuditPolicy(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_PolicyAuditPolicy r
)
881 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
882 return NDR_ERR_SUCCESS
;
885 static enum ndr_err_code
ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_PolicyAuditPolicy
*r
)
888 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
890 return NDR_ERR_SUCCESS
;
893 _PUBLIC_
void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print
*ndr
, const char *name
, enum lsa_PolicyAuditPolicy r
)
895 const char *val
= NULL
;
898 case LSA_AUDIT_POLICY_NONE
: val
= "LSA_AUDIT_POLICY_NONE"; break;
899 case LSA_AUDIT_POLICY_SUCCESS
: val
= "LSA_AUDIT_POLICY_SUCCESS"; break;
900 case LSA_AUDIT_POLICY_FAILURE
: val
= "LSA_AUDIT_POLICY_FAILURE"; break;
901 case LSA_AUDIT_POLICY_ALL
: val
= "LSA_AUDIT_POLICY_ALL"; break;
902 case LSA_AUDIT_POLICY_CLEAR
: val
= "LSA_AUDIT_POLICY_CLEAR"; break;
904 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
907 static enum ndr_err_code
ndr_push_lsa_AuditEventsInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditEventsInfo
*r
)
909 uint32_t cntr_settings_1
;
910 if (ndr_flags
& NDR_SCALARS
) {
911 NDR_CHECK(ndr_push_align(ndr
, 4));
912 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->auditing_mode
));
913 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->settings
));
914 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
916 if (ndr_flags
& NDR_BUFFERS
) {
918 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
919 for (cntr_settings_1
= 0; cntr_settings_1
< r
->count
; cntr_settings_1
++) {
920 NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr
, NDR_SCALARS
, r
->settings
[cntr_settings_1
]));
924 return NDR_ERR_SUCCESS
;
927 static enum ndr_err_code
ndr_pull_lsa_AuditEventsInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditEventsInfo
*r
)
929 uint32_t _ptr_settings
;
930 uint32_t cntr_settings_1
;
931 TALLOC_CTX
*_mem_save_settings_0
;
932 TALLOC_CTX
*_mem_save_settings_1
;
933 if (ndr_flags
& NDR_SCALARS
) {
934 NDR_CHECK(ndr_pull_align(ndr
, 4));
935 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->auditing_mode
));
936 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_settings
));
938 NDR_PULL_ALLOC(ndr
, r
->settings
);
942 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
944 if (ndr_flags
& NDR_BUFFERS
) {
946 _mem_save_settings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
947 NDR_PULL_SET_MEM_CTX(ndr
, r
->settings
, 0);
948 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->settings
));
949 NDR_PULL_ALLOC_N(ndr
, r
->settings
, ndr_get_array_size(ndr
, &r
->settings
));
950 _mem_save_settings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
951 NDR_PULL_SET_MEM_CTX(ndr
, r
->settings
, 0);
952 for (cntr_settings_1
= 0; cntr_settings_1
< r
->count
; cntr_settings_1
++) {
953 NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr
, NDR_SCALARS
, &r
->settings
[cntr_settings_1
]));
955 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_settings_1
, 0);
956 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_settings_0
, 0);
959 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->settings
, r
->count
));
962 return NDR_ERR_SUCCESS
;
965 _PUBLIC_
void ndr_print_lsa_AuditEventsInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditEventsInfo
*r
)
967 uint32_t cntr_settings_1
;
968 ndr_print_struct(ndr
, name
, "lsa_AuditEventsInfo");
970 ndr_print_uint32(ndr
, "auditing_mode", r
->auditing_mode
);
971 ndr_print_ptr(ndr
, "settings", r
->settings
);
974 ndr
->print(ndr
, "%s: ARRAY(%d)", "settings", (int)r
->count
);
976 for (cntr_settings_1
=0;cntr_settings_1
<r
->count
;cntr_settings_1
++) {
978 if (asprintf(&idx_1
, "[%d]", cntr_settings_1
) != -1) {
979 ndr_print_lsa_PolicyAuditPolicy(ndr
, "settings", r
->settings
[cntr_settings_1
]);
986 ndr_print_uint32(ndr
, "count", r
->count
);
990 static enum ndr_err_code
ndr_push_lsa_DomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfo
*r
)
992 if (ndr_flags
& NDR_SCALARS
) {
993 NDR_CHECK(ndr_push_align(ndr
, 4));
994 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
995 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
997 if (ndr_flags
& NDR_BUFFERS
) {
998 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1000 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1003 return NDR_ERR_SUCCESS
;
1006 static enum ndr_err_code
ndr_pull_lsa_DomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfo
*r
)
1009 TALLOC_CTX
*_mem_save_sid_0
;
1010 if (ndr_flags
& NDR_SCALARS
) {
1011 NDR_CHECK(ndr_pull_align(ndr
, 4));
1012 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1013 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1015 NDR_PULL_ALLOC(ndr
, r
->sid
);
1020 if (ndr_flags
& NDR_BUFFERS
) {
1021 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1023 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1024 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1025 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1026 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1029 return NDR_ERR_SUCCESS
;
1032 _PUBLIC_
void ndr_print_lsa_DomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfo
*r
)
1034 ndr_print_struct(ndr
, name
, "lsa_DomainInfo");
1036 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
1037 ndr_print_ptr(ndr
, "sid", r
->sid
);
1040 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1046 static enum ndr_err_code
ndr_push_lsa_PDAccountInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PDAccountInfo
*r
)
1048 if (ndr_flags
& NDR_SCALARS
) {
1049 NDR_CHECK(ndr_push_align(ndr
, 4));
1050 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1052 if (ndr_flags
& NDR_BUFFERS
) {
1053 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1055 return NDR_ERR_SUCCESS
;
1058 static enum ndr_err_code
ndr_pull_lsa_PDAccountInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PDAccountInfo
*r
)
1060 if (ndr_flags
& NDR_SCALARS
) {
1061 NDR_CHECK(ndr_pull_align(ndr
, 4));
1062 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1064 if (ndr_flags
& NDR_BUFFERS
) {
1065 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1067 return NDR_ERR_SUCCESS
;
1070 _PUBLIC_
void ndr_print_lsa_PDAccountInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_PDAccountInfo
*r
)
1072 ndr_print_struct(ndr
, name
, "lsa_PDAccountInfo");
1074 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1078 static enum ndr_err_code
ndr_push_lsa_Role(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_Role r
)
1080 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
1081 return NDR_ERR_SUCCESS
;
1084 static enum ndr_err_code
ndr_pull_lsa_Role(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_Role
*r
)
1087 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
1089 return NDR_ERR_SUCCESS
;
1092 _PUBLIC_
void ndr_print_lsa_Role(struct ndr_print
*ndr
, const char *name
, enum lsa_Role r
)
1094 const char *val
= NULL
;
1097 case LSA_ROLE_BACKUP
: val
= "LSA_ROLE_BACKUP"; break;
1098 case LSA_ROLE_PRIMARY
: val
= "LSA_ROLE_PRIMARY"; break;
1100 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1103 static enum ndr_err_code
ndr_push_lsa_ServerRole(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ServerRole
*r
)
1105 if (ndr_flags
& NDR_SCALARS
) {
1106 NDR_CHECK(ndr_push_align(ndr
, 4));
1107 NDR_CHECK(ndr_push_lsa_Role(ndr
, NDR_SCALARS
, r
->role
));
1109 if (ndr_flags
& NDR_BUFFERS
) {
1111 return NDR_ERR_SUCCESS
;
1114 static enum ndr_err_code
ndr_pull_lsa_ServerRole(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ServerRole
*r
)
1116 if (ndr_flags
& NDR_SCALARS
) {
1117 NDR_CHECK(ndr_pull_align(ndr
, 4));
1118 NDR_CHECK(ndr_pull_lsa_Role(ndr
, NDR_SCALARS
, &r
->role
));
1120 if (ndr_flags
& NDR_BUFFERS
) {
1122 return NDR_ERR_SUCCESS
;
1125 _PUBLIC_
void ndr_print_lsa_ServerRole(struct ndr_print
*ndr
, const char *name
, const struct lsa_ServerRole
*r
)
1127 ndr_print_struct(ndr
, name
, "lsa_ServerRole");
1129 ndr_print_lsa_Role(ndr
, "role", r
->role
);
1133 static enum ndr_err_code
ndr_push_lsa_ReplicaSourceInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ReplicaSourceInfo
*r
)
1135 if (ndr_flags
& NDR_SCALARS
) {
1136 NDR_CHECK(ndr_push_align(ndr
, 4));
1137 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->source
));
1138 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account
));
1140 if (ndr_flags
& NDR_BUFFERS
) {
1141 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->source
));
1142 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account
));
1144 return NDR_ERR_SUCCESS
;
1147 static enum ndr_err_code
ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ReplicaSourceInfo
*r
)
1149 if (ndr_flags
& NDR_SCALARS
) {
1150 NDR_CHECK(ndr_pull_align(ndr
, 4));
1151 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->source
));
1152 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account
));
1154 if (ndr_flags
& NDR_BUFFERS
) {
1155 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->source
));
1156 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account
));
1158 return NDR_ERR_SUCCESS
;
1161 _PUBLIC_
void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ReplicaSourceInfo
*r
)
1163 ndr_print_struct(ndr
, name
, "lsa_ReplicaSourceInfo");
1165 ndr_print_lsa_String(ndr
, "source", &r
->source
);
1166 ndr_print_lsa_String(ndr
, "account", &r
->account
);
1170 static enum ndr_err_code
ndr_push_lsa_DefaultQuotaInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DefaultQuotaInfo
*r
)
1172 if (ndr_flags
& NDR_SCALARS
) {
1173 NDR_CHECK(ndr_push_align(ndr
, 8));
1174 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->paged_pool
));
1175 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->non_paged_pool
));
1176 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->min_wss
));
1177 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_wss
));
1178 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pagefile
));
1179 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown
));
1181 if (ndr_flags
& NDR_BUFFERS
) {
1183 return NDR_ERR_SUCCESS
;
1186 static enum ndr_err_code
ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DefaultQuotaInfo
*r
)
1188 if (ndr_flags
& NDR_SCALARS
) {
1189 NDR_CHECK(ndr_pull_align(ndr
, 8));
1190 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->paged_pool
));
1191 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->non_paged_pool
));
1192 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->min_wss
));
1193 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_wss
));
1194 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pagefile
));
1195 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown
));
1197 if (ndr_flags
& NDR_BUFFERS
) {
1199 return NDR_ERR_SUCCESS
;
1202 _PUBLIC_
void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DefaultQuotaInfo
*r
)
1204 ndr_print_struct(ndr
, name
, "lsa_DefaultQuotaInfo");
1206 ndr_print_uint32(ndr
, "paged_pool", r
->paged_pool
);
1207 ndr_print_uint32(ndr
, "non_paged_pool", r
->non_paged_pool
);
1208 ndr_print_uint32(ndr
, "min_wss", r
->min_wss
);
1209 ndr_print_uint32(ndr
, "max_wss", r
->max_wss
);
1210 ndr_print_uint32(ndr
, "pagefile", r
->pagefile
);
1211 ndr_print_hyper(ndr
, "unknown", r
->unknown
);
1215 static enum ndr_err_code
ndr_push_lsa_ModificationInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ModificationInfo
*r
)
1217 if (ndr_flags
& NDR_SCALARS
) {
1218 NDR_CHECK(ndr_push_align(ndr
, 8));
1219 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->modified_id
));
1220 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->db_create_time
));
1222 if (ndr_flags
& NDR_BUFFERS
) {
1224 return NDR_ERR_SUCCESS
;
1227 static enum ndr_err_code
ndr_pull_lsa_ModificationInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ModificationInfo
*r
)
1229 if (ndr_flags
& NDR_SCALARS
) {
1230 NDR_CHECK(ndr_pull_align(ndr
, 8));
1231 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->modified_id
));
1232 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->db_create_time
));
1234 if (ndr_flags
& NDR_BUFFERS
) {
1236 return NDR_ERR_SUCCESS
;
1239 _PUBLIC_
void ndr_print_lsa_ModificationInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ModificationInfo
*r
)
1241 ndr_print_struct(ndr
, name
, "lsa_ModificationInfo");
1243 ndr_print_hyper(ndr
, "modified_id", r
->modified_id
);
1244 ndr_print_NTTIME_hyper(ndr
, "db_create_time", r
->db_create_time
);
1248 static enum ndr_err_code
ndr_push_lsa_AuditFullSetInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditFullSetInfo
*r
)
1250 if (ndr_flags
& NDR_SCALARS
) {
1251 NDR_CHECK(ndr_push_align(ndr
, 1));
1252 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_on_full
));
1254 if (ndr_flags
& NDR_BUFFERS
) {
1256 return NDR_ERR_SUCCESS
;
1259 static enum ndr_err_code
ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditFullSetInfo
*r
)
1261 if (ndr_flags
& NDR_SCALARS
) {
1262 NDR_CHECK(ndr_pull_align(ndr
, 1));
1263 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_on_full
));
1265 if (ndr_flags
& NDR_BUFFERS
) {
1267 return NDR_ERR_SUCCESS
;
1270 _PUBLIC_
void ndr_print_lsa_AuditFullSetInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditFullSetInfo
*r
)
1272 ndr_print_struct(ndr
, name
, "lsa_AuditFullSetInfo");
1274 ndr_print_uint8(ndr
, "shutdown_on_full", r
->shutdown_on_full
);
1278 static enum ndr_err_code
ndr_push_lsa_AuditFullQueryInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditFullQueryInfo
*r
)
1280 if (ndr_flags
& NDR_SCALARS
) {
1281 NDR_CHECK(ndr_push_align(ndr
, 1));
1282 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_on_full
));
1283 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->log_is_full
));
1285 if (ndr_flags
& NDR_BUFFERS
) {
1287 return NDR_ERR_SUCCESS
;
1290 static enum ndr_err_code
ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditFullQueryInfo
*r
)
1292 if (ndr_flags
& NDR_SCALARS
) {
1293 NDR_CHECK(ndr_pull_align(ndr
, 1));
1294 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_on_full
));
1295 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->log_is_full
));
1297 if (ndr_flags
& NDR_BUFFERS
) {
1299 return NDR_ERR_SUCCESS
;
1302 _PUBLIC_
void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditFullQueryInfo
*r
)
1304 ndr_print_struct(ndr
, name
, "lsa_AuditFullQueryInfo");
1306 ndr_print_uint8(ndr
, "shutdown_on_full", r
->shutdown_on_full
);
1307 ndr_print_uint8(ndr
, "log_is_full", r
->log_is_full
);
1311 static enum ndr_err_code
ndr_push_lsa_DnsDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DnsDomainInfo
*r
)
1313 if (ndr_flags
& NDR_SCALARS
) {
1314 NDR_CHECK(ndr_push_align(ndr
, 4));
1315 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1316 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain
));
1317 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_forest
));
1318 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
1319 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1321 if (ndr_flags
& NDR_BUFFERS
) {
1322 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1323 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain
));
1324 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_forest
));
1326 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1329 return NDR_ERR_SUCCESS
;
1332 static enum ndr_err_code
ndr_pull_lsa_DnsDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DnsDomainInfo
*r
)
1335 TALLOC_CTX
*_mem_save_sid_0
;
1336 if (ndr_flags
& NDR_SCALARS
) {
1337 NDR_CHECK(ndr_pull_align(ndr
, 4));
1338 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1339 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain
));
1340 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_forest
));
1341 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
1342 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1344 NDR_PULL_ALLOC(ndr
, r
->sid
);
1349 if (ndr_flags
& NDR_BUFFERS
) {
1350 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1351 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain
));
1352 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_forest
));
1354 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1355 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1356 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1357 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1360 return NDR_ERR_SUCCESS
;
1363 _PUBLIC_
void ndr_print_lsa_DnsDomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DnsDomainInfo
*r
)
1365 ndr_print_struct(ndr
, name
, "lsa_DnsDomainInfo");
1367 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
1368 ndr_print_lsa_StringLarge(ndr
, "dns_domain", &r
->dns_domain
);
1369 ndr_print_lsa_StringLarge(ndr
, "dns_forest", &r
->dns_forest
);
1370 ndr_print_GUID(ndr
, "domain_guid", &r
->domain_guid
);
1371 ndr_print_ptr(ndr
, "sid", r
->sid
);
1374 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1380 static enum ndr_err_code
ndr_push_lsa_PolicyInfo(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_PolicyInfo r
)
1382 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1383 return NDR_ERR_SUCCESS
;
1386 static enum ndr_err_code
ndr_pull_lsa_PolicyInfo(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_PolicyInfo
*r
)
1389 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1391 return NDR_ERR_SUCCESS
;
1394 _PUBLIC_
void ndr_print_lsa_PolicyInfo(struct ndr_print
*ndr
, const char *name
, enum lsa_PolicyInfo r
)
1396 const char *val
= NULL
;
1399 case LSA_POLICY_INFO_AUDIT_LOG
: val
= "LSA_POLICY_INFO_AUDIT_LOG"; break;
1400 case LSA_POLICY_INFO_AUDIT_EVENTS
: val
= "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
1401 case LSA_POLICY_INFO_DOMAIN
: val
= "LSA_POLICY_INFO_DOMAIN"; break;
1402 case LSA_POLICY_INFO_PD
: val
= "LSA_POLICY_INFO_PD"; break;
1403 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: val
= "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
1404 case LSA_POLICY_INFO_ROLE
: val
= "LSA_POLICY_INFO_ROLE"; break;
1405 case LSA_POLICY_INFO_REPLICA
: val
= "LSA_POLICY_INFO_REPLICA"; break;
1406 case LSA_POLICY_INFO_QUOTA
: val
= "LSA_POLICY_INFO_QUOTA"; break;
1407 case LSA_POLICY_INFO_MOD
: val
= "LSA_POLICY_INFO_MOD"; break;
1408 case LSA_POLICY_INFO_AUDIT_FULL_SET
: val
= "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
1409 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: val
= "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
1410 case LSA_POLICY_INFO_DNS
: val
= "LSA_POLICY_INFO_DNS"; break;
1411 case LSA_POLICY_INFO_DNS_INT
: val
= "LSA_POLICY_INFO_DNS_INT"; break;
1412 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: val
= "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
1414 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1417 static enum ndr_err_code
ndr_push_lsa_PolicyInformation(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_PolicyInformation
*r
)
1419 if (ndr_flags
& NDR_SCALARS
) {
1420 int level
= ndr_push_get_switch_value(ndr
, r
);
1421 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
1423 case LSA_POLICY_INFO_AUDIT_LOG
: {
1424 NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr
, NDR_SCALARS
, &r
->audit_log
));
1427 case LSA_POLICY_INFO_AUDIT_EVENTS
: {
1428 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr
, NDR_SCALARS
, &r
->audit_events
));
1431 case LSA_POLICY_INFO_DOMAIN
: {
1432 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domain
));
1435 case LSA_POLICY_INFO_PD
: {
1436 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr
, NDR_SCALARS
, &r
->pd
));
1439 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: {
1440 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->account_domain
));
1443 case LSA_POLICY_INFO_ROLE
: {
1444 NDR_CHECK(ndr_push_lsa_ServerRole(ndr
, NDR_SCALARS
, &r
->role
));
1447 case LSA_POLICY_INFO_REPLICA
: {
1448 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr
, NDR_SCALARS
, &r
->replica
));
1451 case LSA_POLICY_INFO_QUOTA
: {
1452 NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr
, NDR_SCALARS
, &r
->quota
));
1455 case LSA_POLICY_INFO_MOD
: {
1456 NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr
, NDR_SCALARS
, &r
->mod
));
1459 case LSA_POLICY_INFO_AUDIT_FULL_SET
: {
1460 NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr
, NDR_SCALARS
, &r
->auditfullset
));
1463 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: {
1464 NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr
, NDR_SCALARS
, &r
->auditfullquery
));
1467 case LSA_POLICY_INFO_DNS
: {
1468 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1471 case LSA_POLICY_INFO_DNS_INT
: {
1472 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1475 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: {
1476 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->l_account_domain
));
1480 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1483 if (ndr_flags
& NDR_BUFFERS
) {
1484 int level
= ndr_push_get_switch_value(ndr
, r
);
1486 case LSA_POLICY_INFO_AUDIT_LOG
:
1489 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1490 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr
, NDR_BUFFERS
, &r
->audit_events
));
1493 case LSA_POLICY_INFO_DOMAIN
:
1494 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domain
));
1497 case LSA_POLICY_INFO_PD
:
1498 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr
, NDR_BUFFERS
, &r
->pd
));
1501 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1502 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->account_domain
));
1505 case LSA_POLICY_INFO_ROLE
:
1508 case LSA_POLICY_INFO_REPLICA
:
1509 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr
, NDR_BUFFERS
, &r
->replica
));
1512 case LSA_POLICY_INFO_QUOTA
:
1515 case LSA_POLICY_INFO_MOD
:
1518 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1521 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1524 case LSA_POLICY_INFO_DNS
:
1525 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1528 case LSA_POLICY_INFO_DNS_INT
:
1529 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1532 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1533 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->l_account_domain
));
1537 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1540 return NDR_ERR_SUCCESS
;
1543 static enum ndr_err_code
ndr_pull_lsa_PolicyInformation(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_PolicyInformation
*r
)
1547 level
= ndr_pull_get_switch_value(ndr
, r
);
1548 if (ndr_flags
& NDR_SCALARS
) {
1549 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
1550 if (_level
!= level
) {
1551 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
1554 case LSA_POLICY_INFO_AUDIT_LOG
: {
1555 NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr
, NDR_SCALARS
, &r
->audit_log
));
1558 case LSA_POLICY_INFO_AUDIT_EVENTS
: {
1559 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr
, NDR_SCALARS
, &r
->audit_events
));
1562 case LSA_POLICY_INFO_DOMAIN
: {
1563 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domain
));
1566 case LSA_POLICY_INFO_PD
: {
1567 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr
, NDR_SCALARS
, &r
->pd
));
1570 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: {
1571 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->account_domain
));
1574 case LSA_POLICY_INFO_ROLE
: {
1575 NDR_CHECK(ndr_pull_lsa_ServerRole(ndr
, NDR_SCALARS
, &r
->role
));
1578 case LSA_POLICY_INFO_REPLICA
: {
1579 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr
, NDR_SCALARS
, &r
->replica
));
1582 case LSA_POLICY_INFO_QUOTA
: {
1583 NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr
, NDR_SCALARS
, &r
->quota
));
1586 case LSA_POLICY_INFO_MOD
: {
1587 NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr
, NDR_SCALARS
, &r
->mod
));
1590 case LSA_POLICY_INFO_AUDIT_FULL_SET
: {
1591 NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr
, NDR_SCALARS
, &r
->auditfullset
));
1594 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: {
1595 NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr
, NDR_SCALARS
, &r
->auditfullquery
));
1598 case LSA_POLICY_INFO_DNS
: {
1599 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1602 case LSA_POLICY_INFO_DNS_INT
: {
1603 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1606 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: {
1607 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->l_account_domain
));
1611 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1614 if (ndr_flags
& NDR_BUFFERS
) {
1616 case LSA_POLICY_INFO_AUDIT_LOG
:
1619 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1620 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr
, NDR_BUFFERS
, &r
->audit_events
));
1623 case LSA_POLICY_INFO_DOMAIN
:
1624 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domain
));
1627 case LSA_POLICY_INFO_PD
:
1628 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr
, NDR_BUFFERS
, &r
->pd
));
1631 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1632 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->account_domain
));
1635 case LSA_POLICY_INFO_ROLE
:
1638 case LSA_POLICY_INFO_REPLICA
:
1639 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr
, NDR_BUFFERS
, &r
->replica
));
1642 case LSA_POLICY_INFO_QUOTA
:
1645 case LSA_POLICY_INFO_MOD
:
1648 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1651 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1654 case LSA_POLICY_INFO_DNS
:
1655 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1658 case LSA_POLICY_INFO_DNS_INT
:
1659 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1662 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1663 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->l_account_domain
));
1667 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1670 return NDR_ERR_SUCCESS
;
1673 _PUBLIC_
void ndr_print_lsa_PolicyInformation(struct ndr_print
*ndr
, const char *name
, const union lsa_PolicyInformation
*r
)
1676 level
= ndr_print_get_switch_value(ndr
, r
);
1677 ndr_print_union(ndr
, name
, level
, "lsa_PolicyInformation");
1679 case LSA_POLICY_INFO_AUDIT_LOG
:
1680 ndr_print_lsa_AuditLogInfo(ndr
, "audit_log", &r
->audit_log
);
1683 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1684 ndr_print_lsa_AuditEventsInfo(ndr
, "audit_events", &r
->audit_events
);
1687 case LSA_POLICY_INFO_DOMAIN
:
1688 ndr_print_lsa_DomainInfo(ndr
, "domain", &r
->domain
);
1691 case LSA_POLICY_INFO_PD
:
1692 ndr_print_lsa_PDAccountInfo(ndr
, "pd", &r
->pd
);
1695 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1696 ndr_print_lsa_DomainInfo(ndr
, "account_domain", &r
->account_domain
);
1699 case LSA_POLICY_INFO_ROLE
:
1700 ndr_print_lsa_ServerRole(ndr
, "role", &r
->role
);
1703 case LSA_POLICY_INFO_REPLICA
:
1704 ndr_print_lsa_ReplicaSourceInfo(ndr
, "replica", &r
->replica
);
1707 case LSA_POLICY_INFO_QUOTA
:
1708 ndr_print_lsa_DefaultQuotaInfo(ndr
, "quota", &r
->quota
);
1711 case LSA_POLICY_INFO_MOD
:
1712 ndr_print_lsa_ModificationInfo(ndr
, "mod", &r
->mod
);
1715 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1716 ndr_print_lsa_AuditFullSetInfo(ndr
, "auditfullset", &r
->auditfullset
);
1719 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1720 ndr_print_lsa_AuditFullQueryInfo(ndr
, "auditfullquery", &r
->auditfullquery
);
1723 case LSA_POLICY_INFO_DNS
:
1724 ndr_print_lsa_DnsDomainInfo(ndr
, "dns", &r
->dns
);
1727 case LSA_POLICY_INFO_DNS_INT
:
1728 ndr_print_lsa_DnsDomainInfo(ndr
, "dns", &r
->dns
);
1731 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1732 ndr_print_lsa_DomainInfo(ndr
, "l_account_domain", &r
->l_account_domain
);
1736 ndr_print_bad_level(ndr
, name
, level
);
1740 static enum ndr_err_code
ndr_push_lsa_SidPtr(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_SidPtr
*r
)
1742 if (ndr_flags
& NDR_SCALARS
) {
1743 NDR_CHECK(ndr_push_align(ndr
, 4));
1744 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1746 if (ndr_flags
& NDR_BUFFERS
) {
1748 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1751 return NDR_ERR_SUCCESS
;
1754 static enum ndr_err_code
ndr_pull_lsa_SidPtr(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_SidPtr
*r
)
1757 TALLOC_CTX
*_mem_save_sid_0
;
1758 if (ndr_flags
& NDR_SCALARS
) {
1759 NDR_CHECK(ndr_pull_align(ndr
, 4));
1760 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1762 NDR_PULL_ALLOC(ndr
, r
->sid
);
1767 if (ndr_flags
& NDR_BUFFERS
) {
1769 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1770 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1771 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1772 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1775 return NDR_ERR_SUCCESS
;
1778 _PUBLIC_
void ndr_print_lsa_SidPtr(struct ndr_print
*ndr
, const char *name
, const struct lsa_SidPtr
*r
)
1780 ndr_print_struct(ndr
, name
, "lsa_SidPtr");
1782 ndr_print_ptr(ndr
, "sid", r
->sid
);
1785 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1791 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SidArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_SidArray
*r
)
1793 uint32_t cntr_sids_1
;
1794 if (ndr_flags
& NDR_SCALARS
) {
1795 NDR_CHECK(ndr_push_align(ndr
, 4));
1796 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
1797 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
1799 if (ndr_flags
& NDR_BUFFERS
) {
1801 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
1802 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1803 NDR_CHECK(ndr_push_lsa_SidPtr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1805 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1806 NDR_CHECK(ndr_push_lsa_SidPtr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1810 return NDR_ERR_SUCCESS
;
1813 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SidArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_SidArray
*r
)
1816 uint32_t cntr_sids_1
;
1817 TALLOC_CTX
*_mem_save_sids_0
;
1818 TALLOC_CTX
*_mem_save_sids_1
;
1819 if (ndr_flags
& NDR_SCALARS
) {
1820 NDR_CHECK(ndr_pull_align(ndr
, 4));
1821 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_sids
));
1822 if (r
->num_sids
> 1000) {
1823 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1825 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
1827 NDR_PULL_ALLOC(ndr
, r
->sids
);
1832 if (ndr_flags
& NDR_BUFFERS
) {
1834 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1835 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1836 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
1837 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
1838 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1839 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1840 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1841 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1843 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1844 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1846 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
1847 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
1850 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->num_sids
));
1853 return NDR_ERR_SUCCESS
;
1856 _PUBLIC_
void ndr_print_lsa_SidArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_SidArray
*r
)
1858 uint32_t cntr_sids_1
;
1859 ndr_print_struct(ndr
, name
, "lsa_SidArray");
1861 ndr_print_uint32(ndr
, "num_sids", r
->num_sids
);
1862 ndr_print_ptr(ndr
, "sids", r
->sids
);
1865 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->num_sids
);
1867 for (cntr_sids_1
=0;cntr_sids_1
<r
->num_sids
;cntr_sids_1
++) {
1869 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
1870 ndr_print_lsa_SidPtr(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
1880 static enum ndr_err_code
ndr_push_lsa_DomainList(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainList
*r
)
1882 uint32_t cntr_domains_1
;
1883 if (ndr_flags
& NDR_SCALARS
) {
1884 NDR_CHECK(ndr_push_align(ndr
, 4));
1885 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1886 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
1888 if (ndr_flags
& NDR_BUFFERS
) {
1890 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1891 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
1892 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
1894 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
1895 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
1899 return NDR_ERR_SUCCESS
;
1902 static enum ndr_err_code
ndr_pull_lsa_DomainList(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainList
*r
)
1904 uint32_t _ptr_domains
;
1905 uint32_t cntr_domains_1
;
1906 TALLOC_CTX
*_mem_save_domains_0
;
1907 TALLOC_CTX
*_mem_save_domains_1
;
1908 if (ndr_flags
& NDR_SCALARS
) {
1909 NDR_CHECK(ndr_pull_align(ndr
, 4));
1910 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1911 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
1913 NDR_PULL_ALLOC(ndr
, r
->domains
);
1918 if (ndr_flags
& NDR_BUFFERS
) {
1920 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1921 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
1922 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
1923 NDR_PULL_ALLOC_N(ndr
, r
->domains
, ndr_get_array_size(ndr
, &r
->domains
));
1924 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1925 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
1926 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
1927 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
1929 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
1930 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
1932 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
1933 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
1936 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
1939 return NDR_ERR_SUCCESS
;
1942 _PUBLIC_
void ndr_print_lsa_DomainList(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainList
*r
)
1944 uint32_t cntr_domains_1
;
1945 ndr_print_struct(ndr
, name
, "lsa_DomainList");
1947 ndr_print_uint32(ndr
, "count", r
->count
);
1948 ndr_print_ptr(ndr
, "domains", r
->domains
);
1951 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
1953 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
1955 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
1956 ndr_print_lsa_DomainInfo(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
1966 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SidType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_SidType r
)
1968 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1969 return NDR_ERR_SUCCESS
;
1972 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SidType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_SidType
*r
)
1975 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1977 return NDR_ERR_SUCCESS
;
1980 _PUBLIC_
void ndr_print_lsa_SidType(struct ndr_print
*ndr
, const char *name
, enum lsa_SidType r
)
1982 const char *val
= NULL
;
1985 case SID_NAME_USE_NONE
: val
= "SID_NAME_USE_NONE"; break;
1986 case SID_NAME_USER
: val
= "SID_NAME_USER"; break;
1987 case SID_NAME_DOM_GRP
: val
= "SID_NAME_DOM_GRP"; break;
1988 case SID_NAME_DOMAIN
: val
= "SID_NAME_DOMAIN"; break;
1989 case SID_NAME_ALIAS
: val
= "SID_NAME_ALIAS"; break;
1990 case SID_NAME_WKN_GRP
: val
= "SID_NAME_WKN_GRP"; break;
1991 case SID_NAME_DELETED
: val
= "SID_NAME_DELETED"; break;
1992 case SID_NAME_INVALID
: val
= "SID_NAME_INVALID"; break;
1993 case SID_NAME_UNKNOWN
: val
= "SID_NAME_UNKNOWN"; break;
1994 case SID_NAME_COMPUTER
: val
= "SID_NAME_COMPUTER"; break;
1996 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1999 static enum ndr_err_code
ndr_push_lsa_TranslatedSid(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid
*r
)
2001 if (ndr_flags
& NDR_SCALARS
) {
2002 NDR_CHECK(ndr_push_align(ndr
, 4));
2003 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
2004 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2005 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
2007 if (ndr_flags
& NDR_BUFFERS
) {
2009 return NDR_ERR_SUCCESS
;
2012 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid
*r
)
2014 if (ndr_flags
& NDR_SCALARS
) {
2015 NDR_CHECK(ndr_pull_align(ndr
, 4));
2016 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
2017 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2018 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
2020 if (ndr_flags
& NDR_BUFFERS
) {
2022 return NDR_ERR_SUCCESS
;
2025 _PUBLIC_
void ndr_print_lsa_TranslatedSid(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid
*r
)
2027 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid");
2029 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
2030 ndr_print_uint32(ndr
, "rid", r
->rid
);
2031 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
2035 static enum ndr_err_code
ndr_push_lsa_TransSidArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray
*r
)
2037 uint32_t cntr_sids_1
;
2038 if (ndr_flags
& NDR_SCALARS
) {
2039 NDR_CHECK(ndr_push_align(ndr
, 4));
2040 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2041 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
2043 if (ndr_flags
& NDR_BUFFERS
) {
2045 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2046 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
2047 NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
2051 return NDR_ERR_SUCCESS
;
2054 static enum ndr_err_code
ndr_pull_lsa_TransSidArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray
*r
)
2057 uint32_t cntr_sids_1
;
2058 TALLOC_CTX
*_mem_save_sids_0
;
2059 TALLOC_CTX
*_mem_save_sids_1
;
2060 if (ndr_flags
& NDR_SCALARS
) {
2061 NDR_CHECK(ndr_pull_align(ndr
, 4));
2062 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2063 if (r
->count
> 1000) {
2064 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2066 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
2068 NDR_PULL_ALLOC(ndr
, r
->sids
);
2073 if (ndr_flags
& NDR_BUFFERS
) {
2075 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2076 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
2077 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
2078 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
2079 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2080 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
2081 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
2082 NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
2084 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
2085 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
2088 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
2091 return NDR_ERR_SUCCESS
;
2094 _PUBLIC_
void ndr_print_lsa_TransSidArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray
*r
)
2096 uint32_t cntr_sids_1
;
2097 ndr_print_struct(ndr
, name
, "lsa_TransSidArray");
2099 ndr_print_uint32(ndr
, "count", r
->count
);
2100 ndr_print_ptr(ndr
, "sids", r
->sids
);
2103 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
2105 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
2107 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
2108 ndr_print_lsa_TranslatedSid(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
2118 static enum ndr_err_code
ndr_push_lsa_RefDomainList(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_RefDomainList
*r
)
2120 uint32_t cntr_domains_1
;
2121 if (ndr_flags
& NDR_SCALARS
) {
2122 NDR_CHECK(ndr_push_align(ndr
, 4));
2123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2124 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
2125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_size
));
2127 if (ndr_flags
& NDR_BUFFERS
) {
2129 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2130 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2131 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2133 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2134 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2138 return NDR_ERR_SUCCESS
;
2141 static enum ndr_err_code
ndr_pull_lsa_RefDomainList(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_RefDomainList
*r
)
2143 uint32_t _ptr_domains
;
2144 uint32_t cntr_domains_1
;
2145 TALLOC_CTX
*_mem_save_domains_0
;
2146 TALLOC_CTX
*_mem_save_domains_1
;
2147 if (ndr_flags
& NDR_SCALARS
) {
2148 NDR_CHECK(ndr_pull_align(ndr
, 4));
2149 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2150 if (r
->count
> 1000) {
2151 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2153 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
2155 NDR_PULL_ALLOC(ndr
, r
->domains
);
2159 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_size
));
2161 if (ndr_flags
& NDR_BUFFERS
) {
2163 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2164 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2165 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
2166 NDR_PULL_ALLOC_N(ndr
, r
->domains
, ndr_get_array_size(ndr
, &r
->domains
));
2167 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2168 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2169 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2170 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2172 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2173 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2175 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
2176 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
2179 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
2182 return NDR_ERR_SUCCESS
;
2185 _PUBLIC_
void ndr_print_lsa_RefDomainList(struct ndr_print
*ndr
, const char *name
, const struct lsa_RefDomainList
*r
)
2187 uint32_t cntr_domains_1
;
2188 ndr_print_struct(ndr
, name
, "lsa_RefDomainList");
2190 ndr_print_uint32(ndr
, "count", r
->count
);
2191 ndr_print_ptr(ndr
, "domains", r
->domains
);
2194 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
2196 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
2198 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
2199 ndr_print_lsa_DomainInfo(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
2206 ndr_print_uint32(ndr
, "max_size", r
->max_size
);
2210 static enum ndr_err_code
ndr_push_lsa_LookupNamesLevel(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_LookupNamesLevel r
)
2212 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
2213 return NDR_ERR_SUCCESS
;
2216 static enum ndr_err_code
ndr_pull_lsa_LookupNamesLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_LookupNamesLevel
*r
)
2219 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
2221 return NDR_ERR_SUCCESS
;
2224 _PUBLIC_
void ndr_print_lsa_LookupNamesLevel(struct ndr_print
*ndr
, const char *name
, enum lsa_LookupNamesLevel r
)
2226 const char *val
= NULL
;
2229 case LSA_LOOKUP_NAMES_ALL
: val
= "LSA_LOOKUP_NAMES_ALL"; break;
2230 case LSA_LOOKUP_NAMES_DOMAINS_ONLY
: val
= "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break;
2231 case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY
: val
= "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break;
2232 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY
: val
= "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
2233 case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY
: val
= "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
2234 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2
: val
= "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
2235 case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC
: val
= "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
2237 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2240 static enum ndr_err_code
ndr_push_lsa_TranslatedName(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedName
*r
)
2242 if (ndr_flags
& NDR_SCALARS
) {
2243 NDR_CHECK(ndr_push_align(ndr
, 4));
2244 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
2245 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
2246 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
2248 if (ndr_flags
& NDR_BUFFERS
) {
2249 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
2251 return NDR_ERR_SUCCESS
;
2254 static enum ndr_err_code
ndr_pull_lsa_TranslatedName(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedName
*r
)
2256 if (ndr_flags
& NDR_SCALARS
) {
2257 NDR_CHECK(ndr_pull_align(ndr
, 4));
2258 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
2259 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
2260 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
2262 if (ndr_flags
& NDR_BUFFERS
) {
2263 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
2265 return NDR_ERR_SUCCESS
;
2268 _PUBLIC_
void ndr_print_lsa_TranslatedName(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedName
*r
)
2270 ndr_print_struct(ndr
, name
, "lsa_TranslatedName");
2272 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
2273 ndr_print_lsa_String(ndr
, "name", &r
->name
);
2274 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
2278 static enum ndr_err_code
ndr_push_lsa_TransNameArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransNameArray
*r
)
2280 uint32_t cntr_names_1
;
2281 if (ndr_flags
& NDR_SCALARS
) {
2282 NDR_CHECK(ndr_push_align(ndr
, 4));
2283 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2284 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
2286 if (ndr_flags
& NDR_BUFFERS
) {
2288 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2289 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2290 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
2292 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2293 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
2297 return NDR_ERR_SUCCESS
;
2300 static enum ndr_err_code
ndr_pull_lsa_TransNameArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransNameArray
*r
)
2302 uint32_t _ptr_names
;
2303 uint32_t cntr_names_1
;
2304 TALLOC_CTX
*_mem_save_names_0
;
2305 TALLOC_CTX
*_mem_save_names_1
;
2306 if (ndr_flags
& NDR_SCALARS
) {
2307 NDR_CHECK(ndr_pull_align(ndr
, 4));
2308 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2309 if (r
->count
> 1000) {
2310 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2312 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
2314 NDR_PULL_ALLOC(ndr
, r
->names
);
2319 if (ndr_flags
& NDR_BUFFERS
) {
2321 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2322 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
2323 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
2324 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
2325 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2326 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
2327 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2328 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
2330 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2331 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
2333 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
2334 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
2337 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
2340 return NDR_ERR_SUCCESS
;
2343 _PUBLIC_
void ndr_print_lsa_TransNameArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransNameArray
*r
)
2345 uint32_t cntr_names_1
;
2346 ndr_print_struct(ndr
, name
, "lsa_TransNameArray");
2348 ndr_print_uint32(ndr
, "count", r
->count
);
2349 ndr_print_ptr(ndr
, "names", r
->names
);
2352 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
2354 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
2356 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
2357 ndr_print_lsa_TranslatedName(ndr
, "names", &r
->names
[cntr_names_1
]);
2367 static enum ndr_err_code
ndr_push_lsa_LUIDAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_LUIDAttribute
*r
)
2369 if (ndr_flags
& NDR_SCALARS
) {
2370 NDR_CHECK(ndr_push_align(ndr
, 4));
2371 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
2372 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attribute
));
2374 if (ndr_flags
& NDR_BUFFERS
) {
2376 return NDR_ERR_SUCCESS
;
2379 static enum ndr_err_code
ndr_pull_lsa_LUIDAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_LUIDAttribute
*r
)
2381 if (ndr_flags
& NDR_SCALARS
) {
2382 NDR_CHECK(ndr_pull_align(ndr
, 4));
2383 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
2384 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attribute
));
2386 if (ndr_flags
& NDR_BUFFERS
) {
2388 return NDR_ERR_SUCCESS
;
2391 _PUBLIC_
void ndr_print_lsa_LUIDAttribute(struct ndr_print
*ndr
, const char *name
, const struct lsa_LUIDAttribute
*r
)
2393 ndr_print_struct(ndr
, name
, "lsa_LUIDAttribute");
2395 ndr_print_lsa_LUID(ndr
, "luid", &r
->luid
);
2396 ndr_print_uint32(ndr
, "attribute", r
->attribute
);
2400 static enum ndr_err_code
ndr_push_lsa_PrivilegeSet(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivilegeSet
*r
)
2402 uint32_t cntr_set_0
;
2403 if (ndr_flags
& NDR_SCALARS
) {
2404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2405 NDR_CHECK(ndr_push_align(ndr
, 4));
2406 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2407 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
2408 for (cntr_set_0
= 0; cntr_set_0
< r
->count
; cntr_set_0
++) {
2409 NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr
, NDR_SCALARS
, &r
->set
[cntr_set_0
]));
2412 if (ndr_flags
& NDR_BUFFERS
) {
2414 return NDR_ERR_SUCCESS
;
2417 static enum ndr_err_code
ndr_pull_lsa_PrivilegeSet(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivilegeSet
*r
)
2419 uint32_t cntr_set_0
;
2420 TALLOC_CTX
*_mem_save_set_0
;
2421 if (ndr_flags
& NDR_SCALARS
) {
2422 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->set
));
2423 NDR_CHECK(ndr_pull_align(ndr
, 4));
2424 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2425 if (r
->count
> 1000) {
2426 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2428 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
2429 NDR_PULL_ALLOC_N(ndr
, r
->set
, ndr_get_array_size(ndr
, &r
->set
));
2430 _mem_save_set_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2431 NDR_PULL_SET_MEM_CTX(ndr
, r
->set
, 0);
2432 for (cntr_set_0
= 0; cntr_set_0
< r
->count
; cntr_set_0
++) {
2433 NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr
, NDR_SCALARS
, &r
->set
[cntr_set_0
]));
2435 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_set_0
, 0);
2437 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->set
, r
->count
));
2440 if (ndr_flags
& NDR_BUFFERS
) {
2442 return NDR_ERR_SUCCESS
;
2445 _PUBLIC_
void ndr_print_lsa_PrivilegeSet(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivilegeSet
*r
)
2447 uint32_t cntr_set_0
;
2448 ndr_print_struct(ndr
, name
, "lsa_PrivilegeSet");
2450 ndr_print_uint32(ndr
, "count", r
->count
);
2451 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
2452 ndr
->print(ndr
, "%s: ARRAY(%d)", "set", (int)r
->count
);
2454 for (cntr_set_0
=0;cntr_set_0
<r
->count
;cntr_set_0
++) {
2456 if (asprintf(&idx_0
, "[%d]", cntr_set_0
) != -1) {
2457 ndr_print_lsa_LUIDAttribute(ndr
, "set", &r
->set
[cntr_set_0
]);
2465 static enum ndr_err_code
ndr_push_lsa_DATA_BUF(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF
*r
)
2468 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2469 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2470 if (ndr_flags
& NDR_SCALARS
) {
2471 NDR_CHECK(ndr_push_align(ndr
, 4));
2472 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
2473 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2474 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
2476 if (ndr_flags
& NDR_BUFFERS
) {
2478 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2479 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2480 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
2481 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
2484 ndr
->flags
= _flags_save_STRUCT
;
2486 return NDR_ERR_SUCCESS
;
2489 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF
*r
)
2492 TALLOC_CTX
*_mem_save_data_0
;
2494 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2495 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2496 if (ndr_flags
& NDR_SCALARS
) {
2497 NDR_CHECK(ndr_pull_align(ndr
, 4));
2498 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
2499 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2500 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2502 NDR_PULL_ALLOC(ndr
, r
->data
);
2507 if (ndr_flags
& NDR_BUFFERS
) {
2509 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2510 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
2511 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
2512 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data
));
2513 if (ndr_get_array_length(ndr
, &r
->data
) > ndr_get_array_size(ndr
, &r
->data
)) {
2514 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->data
), ndr_get_array_length(ndr
, &r
->data
));
2516 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
2517 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_length(ndr
, &r
->data
)));
2518 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2521 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
2524 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->data
, r
->length
));
2527 ndr
->flags
= _flags_save_STRUCT
;
2529 return NDR_ERR_SUCCESS
;
2532 _PUBLIC_
void ndr_print_lsa_DATA_BUF(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF
*r
)
2534 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF");
2536 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2537 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2539 ndr_print_uint32(ndr
, "length", r
->length
);
2540 ndr_print_uint32(ndr
, "size", r
->size
);
2541 ndr_print_ptr(ndr
, "data", r
->data
);
2544 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
2548 ndr
->flags
= _flags_save_STRUCT
;
2552 static enum ndr_err_code
ndr_push_lsa_DATA_BUF2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF2
*r
)
2555 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2556 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2557 if (ndr_flags
& NDR_SCALARS
) {
2558 NDR_CHECK(ndr_push_align(ndr
, 4));
2559 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2560 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
2562 if (ndr_flags
& NDR_BUFFERS
) {
2564 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2565 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->size
));
2568 ndr
->flags
= _flags_save_STRUCT
;
2570 return NDR_ERR_SUCCESS
;
2573 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF2
*r
)
2576 TALLOC_CTX
*_mem_save_data_0
;
2578 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2579 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2580 if (ndr_flags
& NDR_SCALARS
) {
2581 NDR_CHECK(ndr_pull_align(ndr
, 4));
2582 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2583 if (r
->size
> 65536) {
2584 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2586 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2588 NDR_PULL_ALLOC(ndr
, r
->data
);
2593 if (ndr_flags
& NDR_BUFFERS
) {
2595 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2596 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
2597 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
2598 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
2599 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
2600 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2603 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
2606 ndr
->flags
= _flags_save_STRUCT
;
2608 return NDR_ERR_SUCCESS
;
2611 _PUBLIC_
void ndr_print_lsa_DATA_BUF2(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF2
*r
)
2613 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF2");
2615 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2616 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2618 ndr_print_uint32(ndr
, "size", r
->size
);
2619 ndr_print_ptr(ndr
, "data", r
->data
);
2622 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->size
);
2626 ndr
->flags
= _flags_save_STRUCT
;
2630 static enum ndr_err_code
ndr_push_lsa_TrustDomInfoEnum(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustDomInfoEnum r
)
2632 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
2633 return NDR_ERR_SUCCESS
;
2636 static enum ndr_err_code
ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustDomInfoEnum
*r
)
2639 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
2641 return NDR_ERR_SUCCESS
;
2644 _PUBLIC_
void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustDomInfoEnum r
)
2646 const char *val
= NULL
;
2649 case LSA_TRUSTED_DOMAIN_INFO_NAME
: val
= "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
2650 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: val
= "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
2651 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: val
= "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
2652 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: val
= "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
2653 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: val
= "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
2654 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: val
= "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
2655 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: val
= "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
2656 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
2657 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
2658 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
2659 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
2660 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
2661 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
: val
= "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES"; break;
2663 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2666 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustDirection(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2668 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2669 return NDR_ERR_SUCCESS
;
2672 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustDirection(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2675 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2677 return NDR_ERR_SUCCESS
;
2680 _PUBLIC_
void ndr_print_lsa_TrustDirection(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2682 ndr_print_uint32(ndr
, name
, r
);
2684 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND
, r
);
2685 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND
, r
);
2689 static enum ndr_err_code
ndr_push_lsa_TrustType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustType r
)
2691 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2692 return NDR_ERR_SUCCESS
;
2695 static enum ndr_err_code
ndr_pull_lsa_TrustType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustType
*r
)
2698 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2700 return NDR_ERR_SUCCESS
;
2703 _PUBLIC_
void ndr_print_lsa_TrustType(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustType r
)
2705 const char *val
= NULL
;
2708 case LSA_TRUST_TYPE_DOWNLEVEL
: val
= "LSA_TRUST_TYPE_DOWNLEVEL"; break;
2709 case LSA_TRUST_TYPE_UPLEVEL
: val
= "LSA_TRUST_TYPE_UPLEVEL"; break;
2710 case LSA_TRUST_TYPE_MIT
: val
= "LSA_TRUST_TYPE_MIT"; break;
2712 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2715 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustAttributes(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2718 return NDR_ERR_SUCCESS
;
2721 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustAttributes(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2724 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2726 return NDR_ERR_SUCCESS
;
2729 _PUBLIC_
void ndr_print_lsa_TrustAttributes(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2731 ndr_print_uint32(ndr
, name
, r
);
2733 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE
, r
);
2734 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY
, r
);
2735 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
, r
);
2736 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
, r
);
2737 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
, r
);
2738 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST
, r
);
2739 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
, r
);
2740 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION
, r
);
2744 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoName(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoName
*r
)
2746 if (ndr_flags
& NDR_SCALARS
) {
2747 NDR_CHECK(ndr_push_align(ndr
, 4));
2748 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2750 if (ndr_flags
& NDR_BUFFERS
) {
2751 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
2753 return NDR_ERR_SUCCESS
;
2756 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoName
*r
)
2758 if (ndr_flags
& NDR_SCALARS
) {
2759 NDR_CHECK(ndr_pull_align(ndr
, 4));
2760 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2762 if (ndr_flags
& NDR_BUFFERS
) {
2763 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
2765 return NDR_ERR_SUCCESS
;
2768 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoName(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoName
*r
)
2770 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoName");
2772 ndr_print_lsa_StringLarge(ndr
, "netbios_name", &r
->netbios_name
);
2776 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoControllers
*r
)
2778 uint32_t cntr_netbios_names_1
;
2779 if (ndr_flags
& NDR_SCALARS
) {
2780 NDR_CHECK(ndr_push_align(ndr
, 4));
2781 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries
));
2782 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_names
));
2784 if (ndr_flags
& NDR_BUFFERS
) {
2785 if (r
->netbios_names
) {
2786 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries
));
2787 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2788 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2790 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2791 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2795 return NDR_ERR_SUCCESS
;
2798 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoControllers
*r
)
2800 uint32_t _ptr_netbios_names
;
2801 uint32_t cntr_netbios_names_1
;
2802 TALLOC_CTX
*_mem_save_netbios_names_0
;
2803 TALLOC_CTX
*_mem_save_netbios_names_1
;
2804 if (ndr_flags
& NDR_SCALARS
) {
2805 NDR_CHECK(ndr_pull_align(ndr
, 4));
2806 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->entries
));
2807 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_names
));
2808 if (_ptr_netbios_names
) {
2809 NDR_PULL_ALLOC(ndr
, r
->netbios_names
);
2811 r
->netbios_names
= NULL
;
2814 if (ndr_flags
& NDR_BUFFERS
) {
2815 if (r
->netbios_names
) {
2816 _mem_save_netbios_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2817 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_names
, 0);
2818 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_names
));
2819 NDR_PULL_ALLOC_N(ndr
, r
->netbios_names
, ndr_get_array_size(ndr
, &r
->netbios_names
));
2820 _mem_save_netbios_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2821 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_names
, 0);
2822 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2823 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2825 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2826 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2828 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_names_1
, 0);
2829 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_names_0
, 0);
2831 if (r
->netbios_names
) {
2832 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->netbios_names
, r
->entries
));
2835 return NDR_ERR_SUCCESS
;
2838 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoControllers
*r
)
2840 uint32_t cntr_netbios_names_1
;
2841 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoControllers");
2843 ndr_print_uint32(ndr
, "entries", r
->entries
);
2844 ndr_print_ptr(ndr
, "netbios_names", r
->netbios_names
);
2846 if (r
->netbios_names
) {
2847 ndr
->print(ndr
, "%s: ARRAY(%d)", "netbios_names", (int)r
->entries
);
2849 for (cntr_netbios_names_1
=0;cntr_netbios_names_1
<r
->entries
;cntr_netbios_names_1
++) {
2851 if (asprintf(&idx_1
, "[%d]", cntr_netbios_names_1
) != -1) {
2852 ndr_print_lsa_StringLarge(ndr
, "netbios_names", &r
->netbios_names
[cntr_netbios_names_1
]);
2862 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoPosixOffset
*r
)
2864 if (ndr_flags
& NDR_SCALARS
) {
2865 NDR_CHECK(ndr_push_align(ndr
, 4));
2866 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->posix_offset
));
2868 if (ndr_flags
& NDR_BUFFERS
) {
2870 return NDR_ERR_SUCCESS
;
2873 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoPosixOffset
*r
)
2875 if (ndr_flags
& NDR_SCALARS
) {
2876 NDR_CHECK(ndr_pull_align(ndr
, 4));
2877 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->posix_offset
));
2879 if (ndr_flags
& NDR_BUFFERS
) {
2881 return NDR_ERR_SUCCESS
;
2884 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoPosixOffset
*r
)
2886 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoPosixOffset");
2888 ndr_print_uint32(ndr
, "posix_offset", r
->posix_offset
);
2892 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoPassword
*r
)
2894 if (ndr_flags
& NDR_SCALARS
) {
2895 NDR_CHECK(ndr_push_align(ndr
, 4));
2896 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->password
));
2897 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->old_password
));
2899 if (ndr_flags
& NDR_BUFFERS
) {
2901 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
2903 if (r
->old_password
) {
2904 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->old_password
));
2907 return NDR_ERR_SUCCESS
;
2910 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoPassword
*r
)
2912 uint32_t _ptr_password
;
2913 TALLOC_CTX
*_mem_save_password_0
;
2914 uint32_t _ptr_old_password
;
2915 TALLOC_CTX
*_mem_save_old_password_0
;
2916 if (ndr_flags
& NDR_SCALARS
) {
2917 NDR_CHECK(ndr_pull_align(ndr
, 4));
2918 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
2919 if (_ptr_password
) {
2920 NDR_PULL_ALLOC(ndr
, r
->password
);
2924 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_password
));
2925 if (_ptr_old_password
) {
2926 NDR_PULL_ALLOC(ndr
, r
->old_password
);
2928 r
->old_password
= NULL
;
2931 if (ndr_flags
& NDR_BUFFERS
) {
2933 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2934 NDR_PULL_SET_MEM_CTX(ndr
, r
->password
, 0);
2935 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
2936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
2938 if (r
->old_password
) {
2939 _mem_save_old_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2940 NDR_PULL_SET_MEM_CTX(ndr
, r
->old_password
, 0);
2941 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->old_password
));
2942 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_password_0
, 0);
2945 return NDR_ERR_SUCCESS
;
2948 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoPassword
*r
)
2950 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoPassword");
2952 ndr_print_ptr(ndr
, "password", r
->password
);
2955 ndr_print_lsa_DATA_BUF(ndr
, "password", r
->password
);
2958 ndr_print_ptr(ndr
, "old_password", r
->old_password
);
2960 if (r
->old_password
) {
2961 ndr_print_lsa_DATA_BUF(ndr
, "old_password", r
->old_password
);
2967 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoBasic
*r
)
2969 if (ndr_flags
& NDR_SCALARS
) {
2970 NDR_CHECK(ndr_push_align(ndr
, 4));
2971 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2972 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
2974 if (ndr_flags
& NDR_BUFFERS
) {
2975 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
2977 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
2980 return NDR_ERR_SUCCESS
;
2983 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoBasic
*r
)
2986 TALLOC_CTX
*_mem_save_sid_0
;
2987 if (ndr_flags
& NDR_SCALARS
) {
2988 NDR_CHECK(ndr_pull_align(ndr
, 4));
2989 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2990 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
2992 NDR_PULL_ALLOC(ndr
, r
->sid
);
2997 if (ndr_flags
& NDR_BUFFERS
) {
2998 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3000 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3001 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
3002 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3003 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
3006 return NDR_ERR_SUCCESS
;
3009 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoBasic
*r
)
3011 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoBasic");
3013 ndr_print_lsa_String(ndr
, "netbios_name", &r
->netbios_name
);
3014 ndr_print_ptr(ndr
, "sid", r
->sid
);
3017 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
3023 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoInfoEx
*r
)
3025 if (ndr_flags
& NDR_SCALARS
) {
3026 NDR_CHECK(ndr_push_align(ndr
, 4));
3027 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain_name
));
3028 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3029 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
3030 NDR_CHECK(ndr_push_lsa_TrustDirection(ndr
, NDR_SCALARS
, r
->trust_direction
));
3031 NDR_CHECK(ndr_push_lsa_TrustType(ndr
, NDR_SCALARS
, r
->trust_type
));
3032 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr
, NDR_SCALARS
, r
->trust_attributes
));
3034 if (ndr_flags
& NDR_BUFFERS
) {
3035 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3036 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3038 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3041 return NDR_ERR_SUCCESS
;
3044 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoInfoEx
*r
)
3047 TALLOC_CTX
*_mem_save_sid_0
;
3048 if (ndr_flags
& NDR_SCALARS
) {
3049 NDR_CHECK(ndr_pull_align(ndr
, 4));
3050 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain_name
));
3051 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3052 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
3054 NDR_PULL_ALLOC(ndr
, r
->sid
);
3058 NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr
, NDR_SCALARS
, &r
->trust_direction
));
3059 NDR_CHECK(ndr_pull_lsa_TrustType(ndr
, NDR_SCALARS
, &r
->trust_type
));
3060 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr
, NDR_SCALARS
, &r
->trust_attributes
));
3062 if (ndr_flags
& NDR_BUFFERS
) {
3063 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3064 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3066 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3067 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
3068 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3069 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
3072 return NDR_ERR_SUCCESS
;
3075 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoInfoEx
*r
)
3077 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoInfoEx");
3079 ndr_print_lsa_StringLarge(ndr
, "domain_name", &r
->domain_name
);
3080 ndr_print_lsa_StringLarge(ndr
, "netbios_name", &r
->netbios_name
);
3081 ndr_print_ptr(ndr
, "sid", r
->sid
);
3084 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
3087 ndr_print_lsa_TrustDirection(ndr
, "trust_direction", r
->trust_direction
);
3088 ndr_print_lsa_TrustType(ndr
, "trust_type", r
->trust_type
);
3089 ndr_print_lsa_TrustAttributes(ndr
, "trust_attributes", r
->trust_attributes
);
3093 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustAuthType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustAuthType r
)
3095 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3096 return NDR_ERR_SUCCESS
;
3099 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustAuthType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustAuthType
*r
)
3102 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3104 return NDR_ERR_SUCCESS
;
3107 _PUBLIC_
void ndr_print_lsa_TrustAuthType(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustAuthType r
)
3109 const char *val
= NULL
;
3112 case TRUST_AUTH_TYPE_NONE
: val
= "TRUST_AUTH_TYPE_NONE"; break;
3113 case TRUST_AUTH_TYPE_NT4OWF
: val
= "TRUST_AUTH_TYPE_NT4OWF"; break;
3114 case TRUST_AUTH_TYPE_CLEAR
: val
= "TRUST_AUTH_TYPE_CLEAR"; break;
3115 case TRUST_AUTH_TYPE_VERSION
: val
= "TRUST_AUTH_TYPE_VERSION"; break;
3117 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3120 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoBuffer
*r
)
3122 if (ndr_flags
& NDR_SCALARS
) {
3123 NDR_CHECK(ndr_push_align(ndr
, 8));
3124 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->last_update_time
));
3125 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr
, NDR_SCALARS
, r
->AuthType
));
3126 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->data
));
3128 if (ndr_flags
& NDR_BUFFERS
) {
3129 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->data
));
3131 return NDR_ERR_SUCCESS
;
3134 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoBuffer
*r
)
3136 if (ndr_flags
& NDR_SCALARS
) {
3137 NDR_CHECK(ndr_pull_align(ndr
, 8));
3138 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->last_update_time
));
3139 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr
, NDR_SCALARS
, &r
->AuthType
));
3140 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->data
));
3142 if (ndr_flags
& NDR_BUFFERS
) {
3143 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->data
));
3145 return NDR_ERR_SUCCESS
;
3148 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoBuffer
*r
)
3150 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoBuffer");
3152 ndr_print_NTTIME_hyper(ndr
, "last_update_time", r
->last_update_time
);
3153 ndr_print_lsa_TrustAuthType(ndr
, "AuthType", r
->AuthType
);
3154 ndr_print_lsa_DATA_BUF2(ndr
, "data", &r
->data
);
3158 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoAuthInfo
*r
)
3160 if (ndr_flags
& NDR_SCALARS
) {
3161 NDR_CHECK(ndr_push_align(ndr
, 4));
3162 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->incoming_count
));
3163 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->incoming_current_auth_info
));
3164 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->incoming_previous_auth_info
));
3165 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->outgoing_count
));
3166 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->outgoing_current_auth_info
));
3167 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->outgoing_previous_auth_info
));
3169 if (ndr_flags
& NDR_BUFFERS
) {
3170 if (r
->incoming_current_auth_info
) {
3171 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_current_auth_info
));
3173 if (r
->incoming_previous_auth_info
) {
3174 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_previous_auth_info
));
3176 if (r
->outgoing_current_auth_info
) {
3177 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_current_auth_info
));
3179 if (r
->outgoing_previous_auth_info
) {
3180 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_previous_auth_info
));
3183 return NDR_ERR_SUCCESS
;
3186 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoAuthInfo
*r
)
3188 uint32_t _ptr_incoming_current_auth_info
;
3189 TALLOC_CTX
*_mem_save_incoming_current_auth_info_0
;
3190 uint32_t _ptr_incoming_previous_auth_info
;
3191 TALLOC_CTX
*_mem_save_incoming_previous_auth_info_0
;
3192 uint32_t _ptr_outgoing_current_auth_info
;
3193 TALLOC_CTX
*_mem_save_outgoing_current_auth_info_0
;
3194 uint32_t _ptr_outgoing_previous_auth_info
;
3195 TALLOC_CTX
*_mem_save_outgoing_previous_auth_info_0
;
3196 if (ndr_flags
& NDR_SCALARS
) {
3197 NDR_CHECK(ndr_pull_align(ndr
, 4));
3198 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->incoming_count
));
3199 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_incoming_current_auth_info
));
3200 if (_ptr_incoming_current_auth_info
) {
3201 NDR_PULL_ALLOC(ndr
, r
->incoming_current_auth_info
);
3203 r
->incoming_current_auth_info
= NULL
;
3205 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_incoming_previous_auth_info
));
3206 if (_ptr_incoming_previous_auth_info
) {
3207 NDR_PULL_ALLOC(ndr
, r
->incoming_previous_auth_info
);
3209 r
->incoming_previous_auth_info
= NULL
;
3211 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->outgoing_count
));
3212 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_outgoing_current_auth_info
));
3213 if (_ptr_outgoing_current_auth_info
) {
3214 NDR_PULL_ALLOC(ndr
, r
->outgoing_current_auth_info
);
3216 r
->outgoing_current_auth_info
= NULL
;
3218 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_outgoing_previous_auth_info
));
3219 if (_ptr_outgoing_previous_auth_info
) {
3220 NDR_PULL_ALLOC(ndr
, r
->outgoing_previous_auth_info
);
3222 r
->outgoing_previous_auth_info
= NULL
;
3225 if (ndr_flags
& NDR_BUFFERS
) {
3226 if (r
->incoming_current_auth_info
) {
3227 _mem_save_incoming_current_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3228 NDR_PULL_SET_MEM_CTX(ndr
, r
->incoming_current_auth_info
, 0);
3229 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_current_auth_info
));
3230 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_incoming_current_auth_info_0
, 0);
3232 if (r
->incoming_previous_auth_info
) {
3233 _mem_save_incoming_previous_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3234 NDR_PULL_SET_MEM_CTX(ndr
, r
->incoming_previous_auth_info
, 0);
3235 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_previous_auth_info
));
3236 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_incoming_previous_auth_info_0
, 0);
3238 if (r
->outgoing_current_auth_info
) {
3239 _mem_save_outgoing_current_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3240 NDR_PULL_SET_MEM_CTX(ndr
, r
->outgoing_current_auth_info
, 0);
3241 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_current_auth_info
));
3242 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_outgoing_current_auth_info_0
, 0);
3244 if (r
->outgoing_previous_auth_info
) {
3245 _mem_save_outgoing_previous_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3246 NDR_PULL_SET_MEM_CTX(ndr
, r
->outgoing_previous_auth_info
, 0);
3247 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_previous_auth_info
));
3248 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_outgoing_previous_auth_info_0
, 0);
3251 return NDR_ERR_SUCCESS
;
3254 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoAuthInfo
*r
)
3256 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoAuthInfo");
3258 ndr_print_uint32(ndr
, "incoming_count", r
->incoming_count
);
3259 ndr_print_ptr(ndr
, "incoming_current_auth_info", r
->incoming_current_auth_info
);
3261 if (r
->incoming_current_auth_info
) {
3262 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "incoming_current_auth_info", r
->incoming_current_auth_info
);
3265 ndr_print_ptr(ndr
, "incoming_previous_auth_info", r
->incoming_previous_auth_info
);
3267 if (r
->incoming_previous_auth_info
) {
3268 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "incoming_previous_auth_info", r
->incoming_previous_auth_info
);
3271 ndr_print_uint32(ndr
, "outgoing_count", r
->outgoing_count
);
3272 ndr_print_ptr(ndr
, "outgoing_current_auth_info", r
->outgoing_current_auth_info
);
3274 if (r
->outgoing_current_auth_info
) {
3275 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "outgoing_current_auth_info", r
->outgoing_current_auth_info
);
3278 ndr_print_ptr(ndr
, "outgoing_previous_auth_info", r
->outgoing_previous_auth_info
);
3280 if (r
->outgoing_previous_auth_info
) {
3281 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "outgoing_previous_auth_info", r
->outgoing_previous_auth_info
);
3287 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfo
*r
)
3289 if (ndr_flags
& NDR_SCALARS
) {
3290 NDR_CHECK(ndr_push_align(ndr
, 4));
3291 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3292 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3293 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3295 if (ndr_flags
& NDR_BUFFERS
) {
3296 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3297 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3299 return NDR_ERR_SUCCESS
;
3302 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfo
*r
)
3304 if (ndr_flags
& NDR_SCALARS
) {
3305 NDR_CHECK(ndr_pull_align(ndr
, 4));
3306 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3307 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3308 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3310 if (ndr_flags
& NDR_BUFFERS
) {
3311 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3312 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3314 return NDR_ERR_SUCCESS
;
3317 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfo
*r
)
3319 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfo");
3321 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3322 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3323 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3327 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3329 if (ndr_flags
& NDR_SCALARS
) {
3330 NDR_CHECK(ndr_push_align(ndr
, 4));
3331 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->auth_blob
));
3333 if (ndr_flags
& NDR_BUFFERS
) {
3334 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->auth_blob
));
3336 return NDR_ERR_SUCCESS
;
3339 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3341 if (ndr_flags
& NDR_SCALARS
) {
3342 NDR_CHECK(ndr_pull_align(ndr
, 4));
3343 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->auth_blob
));
3345 if (ndr_flags
& NDR_BUFFERS
) {
3346 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->auth_blob
));
3348 return NDR_ERR_SUCCESS
;
3351 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3353 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoAuthInfoInternal");
3355 ndr_print_lsa_DATA_BUF2(ndr
, "auth_blob", &r
->auth_blob
);
3359 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3361 if (ndr_flags
& NDR_SCALARS
) {
3362 NDR_CHECK(ndr_push_align(ndr
, 4));
3363 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3364 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3365 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info
));
3367 if (ndr_flags
& NDR_BUFFERS
) {
3368 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3369 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3371 return NDR_ERR_SUCCESS
;
3374 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3376 if (ndr_flags
& NDR_SCALARS
) {
3377 NDR_CHECK(ndr_pull_align(ndr
, 4));
3378 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3379 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3380 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info
));
3382 if (ndr_flags
& NDR_BUFFERS
) {
3383 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3384 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3386 return NDR_ERR_SUCCESS
;
3389 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3391 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfoInternal");
3393 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3394 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3395 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", &r
->auth_info
);
3399 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3401 if (ndr_flags
& NDR_SCALARS
) {
3402 NDR_CHECK(ndr_push_align(ndr
, 4));
3403 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->forest_trust_length
));
3405 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->forest_trust_data
));
3407 if (ndr_flags
& NDR_BUFFERS
) {
3408 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3409 if (r
->forest_trust_data
) {
3410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->forest_trust_length
));
3411 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->forest_trust_data
, r
->forest_trust_length
));
3414 return NDR_ERR_SUCCESS
;
3417 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3419 uint32_t _ptr_forest_trust_data
;
3420 TALLOC_CTX
*_mem_save_forest_trust_data_0
;
3421 if (ndr_flags
& NDR_SCALARS
) {
3422 NDR_CHECK(ndr_pull_align(ndr
, 4));
3423 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3424 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->forest_trust_length
));
3425 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_data
));
3426 if (_ptr_forest_trust_data
) {
3427 NDR_PULL_ALLOC(ndr
, r
->forest_trust_data
);
3429 r
->forest_trust_data
= NULL
;
3432 if (ndr_flags
& NDR_BUFFERS
) {
3433 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3434 if (r
->forest_trust_data
) {
3435 _mem_save_forest_trust_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3436 NDR_PULL_SET_MEM_CTX(ndr
, r
->forest_trust_data
, 0);
3437 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->forest_trust_data
));
3438 NDR_PULL_ALLOC_N(ndr
, r
->forest_trust_data
, ndr_get_array_size(ndr
, &r
->forest_trust_data
));
3439 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->forest_trust_data
, ndr_get_array_size(ndr
, &r
->forest_trust_data
)));
3440 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_data_0
, 0);
3442 if (r
->forest_trust_data
) {
3443 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->forest_trust_data
, r
->forest_trust_length
));
3446 return NDR_ERR_SUCCESS
;
3449 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3451 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoInfoEx2Internal");
3453 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3454 ndr_print_uint32(ndr
, "forest_trust_length", r
->forest_trust_length
);
3455 ndr_print_ptr(ndr
, "forest_trust_data", r
->forest_trust_data
);
3457 if (r
->forest_trust_data
) {
3458 ndr_print_array_uint8(ndr
, "forest_trust_data", r
->forest_trust_data
, r
->forest_trust_length
);
3464 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3466 if (ndr_flags
& NDR_SCALARS
) {
3467 NDR_CHECK(ndr_push_align(ndr
, 4));
3468 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info
));
3469 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3470 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3472 if (ndr_flags
& NDR_BUFFERS
) {
3473 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info
));
3474 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3476 return NDR_ERR_SUCCESS
;
3479 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3481 if (ndr_flags
& NDR_SCALARS
) {
3482 NDR_CHECK(ndr_pull_align(ndr
, 4));
3483 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info
));
3484 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3485 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3487 if (ndr_flags
& NDR_BUFFERS
) {
3488 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info
));
3489 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3491 return NDR_ERR_SUCCESS
;
3494 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3496 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfo2Internal");
3498 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr
, "info", &r
->info
);
3499 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3500 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3504 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3506 if (ndr_flags
& NDR_SCALARS
) {
3507 NDR_CHECK(ndr_push_align(ndr
, 4));
3508 NDR_CHECK(ndr_push_kerb_EncTypes(ndr
, NDR_SCALARS
, r
->enc_types
));
3510 if (ndr_flags
& NDR_BUFFERS
) {
3512 return NDR_ERR_SUCCESS
;
3515 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3517 if (ndr_flags
& NDR_SCALARS
) {
3518 NDR_CHECK(ndr_pull_align(ndr
, 4));
3519 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3521 if (ndr_flags
& NDR_BUFFERS
) {
3523 return NDR_ERR_SUCCESS
;
3526 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3528 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoSupportedEncTypes");
3530 ndr_print_kerb_EncTypes(ndr
, "enc_types", r
->enc_types
);
3534 static enum ndr_err_code
ndr_push_lsa_TrustedDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_TrustedDomainInfo
*r
)
3536 if (ndr_flags
& NDR_SCALARS
) {
3537 int level
= ndr_push_get_switch_value(ndr
, r
);
3538 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, level
));
3540 case LSA_TRUSTED_DOMAIN_INFO_NAME
: {
3541 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr
, NDR_SCALARS
, &r
->name
));
3544 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: {
3545 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr
, NDR_SCALARS
, &r
->controllers
));
3548 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: {
3549 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3552 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: {
3553 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr
, NDR_SCALARS
, &r
->password
));
3556 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: {
3557 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr
, NDR_SCALARS
, &r
->info_basic
));
3560 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: {
3561 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3564 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: {
3565 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3568 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: {
3569 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr
, NDR_SCALARS
, &r
->full_info
));
3572 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: {
3573 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info_internal
));
3576 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: {
3577 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_SCALARS
, &r
->full_info_internal
));
3580 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: {
3581 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info_ex2_internal
));
3584 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: {
3585 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_SCALARS
, &r
->full_info2_internal
));
3588 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
: {
3589 NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3593 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3596 if (ndr_flags
& NDR_BUFFERS
) {
3597 int level
= ndr_push_get_switch_value(ndr
, r
);
3599 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3600 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr
, NDR_BUFFERS
, &r
->name
));
3603 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3604 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr
, NDR_BUFFERS
, &r
->controllers
));
3607 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3610 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3611 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr
, NDR_BUFFERS
, &r
->password
));
3614 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3615 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr
, NDR_BUFFERS
, &r
->info_basic
));
3618 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3619 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3622 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3623 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3626 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3627 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr
, NDR_BUFFERS
, &r
->full_info
));
3630 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3631 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info_internal
));
3634 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3635 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_BUFFERS
, &r
->full_info_internal
));
3638 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3639 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info_ex2_internal
));
3642 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3643 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_BUFFERS
, &r
->full_info2_internal
));
3646 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
:
3650 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3653 return NDR_ERR_SUCCESS
;
3656 static enum ndr_err_code
ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_TrustedDomainInfo
*r
)
3660 level
= ndr_pull_get_switch_value(ndr
, r
);
3661 if (ndr_flags
& NDR_SCALARS
) {
3662 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
3663 if (_level
!= level
) {
3664 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
3667 case LSA_TRUSTED_DOMAIN_INFO_NAME
: {
3668 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr
, NDR_SCALARS
, &r
->name
));
3671 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: {
3672 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr
, NDR_SCALARS
, &r
->controllers
));
3675 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: {
3676 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3679 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: {
3680 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr
, NDR_SCALARS
, &r
->password
));
3683 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: {
3684 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr
, NDR_SCALARS
, &r
->info_basic
));
3687 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: {
3688 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3691 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: {
3692 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3695 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: {
3696 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr
, NDR_SCALARS
, &r
->full_info
));
3699 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: {
3700 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info_internal
));
3703 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: {
3704 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_SCALARS
, &r
->full_info_internal
));
3707 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: {
3708 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info_ex2_internal
));
3711 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: {
3712 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_SCALARS
, &r
->full_info2_internal
));
3715 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
: {
3716 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3720 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3723 if (ndr_flags
& NDR_BUFFERS
) {
3725 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3726 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr
, NDR_BUFFERS
, &r
->name
));
3729 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3730 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr
, NDR_BUFFERS
, &r
->controllers
));
3733 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3736 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3737 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr
, NDR_BUFFERS
, &r
->password
));
3740 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3741 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr
, NDR_BUFFERS
, &r
->info_basic
));
3744 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3745 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3748 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3749 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3752 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3753 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr
, NDR_BUFFERS
, &r
->full_info
));
3756 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3757 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info_internal
));
3760 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3761 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_BUFFERS
, &r
->full_info_internal
));
3764 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3765 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info_ex2_internal
));
3768 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3769 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_BUFFERS
, &r
->full_info2_internal
));
3772 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
:
3776 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3779 return NDR_ERR_SUCCESS
;
3782 _PUBLIC_
void ndr_print_lsa_TrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, const union lsa_TrustedDomainInfo
*r
)
3785 level
= ndr_print_get_switch_value(ndr
, r
);
3786 ndr_print_union(ndr
, name
, level
, "lsa_TrustedDomainInfo");
3788 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3789 ndr_print_lsa_TrustDomainInfoName(ndr
, "name", &r
->name
);
3792 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3793 ndr_print_lsa_TrustDomainInfoControllers(ndr
, "controllers", &r
->controllers
);
3796 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3797 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3800 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3801 ndr_print_lsa_TrustDomainInfoPassword(ndr
, "password", &r
->password
);
3804 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3805 ndr_print_lsa_TrustDomainInfoBasic(ndr
, "info_basic", &r
->info_basic
);
3808 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3809 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3812 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3813 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3816 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3817 ndr_print_lsa_TrustDomainInfoFullInfo(ndr
, "full_info", &r
->full_info
);
3820 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3821 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info_internal", &r
->auth_info_internal
);
3824 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3825 ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr
, "full_info_internal", &r
->full_info_internal
);
3828 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3829 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr
, "info_ex2_internal", &r
->info_ex2_internal
);
3832 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3833 ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr
, "full_info2_internal", &r
->full_info2_internal
);
3836 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
:
3837 ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr
, "enc_types", &r
->enc_types
);
3841 ndr_print_bad_level(ndr
, name
, level
);
3845 static enum ndr_err_code
ndr_push_lsa_DATA_BUF_PTR(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF_PTR
*r
)
3847 if (ndr_flags
& NDR_SCALARS
) {
3848 NDR_CHECK(ndr_push_align(ndr
, 4));
3849 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->buf
));
3851 if (ndr_flags
& NDR_BUFFERS
) {
3853 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->buf
));
3856 return NDR_ERR_SUCCESS
;
3859 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF_PTR
*r
)
3862 TALLOC_CTX
*_mem_save_buf_0
;
3863 if (ndr_flags
& NDR_SCALARS
) {
3864 NDR_CHECK(ndr_pull_align(ndr
, 4));
3865 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buf
));
3867 NDR_PULL_ALLOC(ndr
, r
->buf
);
3872 if (ndr_flags
& NDR_BUFFERS
) {
3874 _mem_save_buf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3875 NDR_PULL_SET_MEM_CTX(ndr
, r
->buf
, 0);
3876 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->buf
));
3877 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buf_0
, 0);
3880 return NDR_ERR_SUCCESS
;
3883 _PUBLIC_
void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF_PTR
*r
)
3885 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF_PTR");
3887 ndr_print_ptr(ndr
, "buf", r
->buf
);
3890 ndr_print_lsa_DATA_BUF(ndr
, "buf", r
->buf
);
3896 static enum ndr_err_code
ndr_push_lsa_RightSet(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_RightSet
*r
)
3898 uint32_t cntr_names_1
;
3899 if (ndr_flags
& NDR_SCALARS
) {
3900 NDR_CHECK(ndr_push_align(ndr
, 4));
3901 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3902 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
3904 if (ndr_flags
& NDR_BUFFERS
) {
3906 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3907 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
3908 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
3910 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
3911 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
3915 return NDR_ERR_SUCCESS
;
3918 static enum ndr_err_code
ndr_pull_lsa_RightSet(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_RightSet
*r
)
3920 uint32_t _ptr_names
;
3921 uint32_t cntr_names_1
;
3922 TALLOC_CTX
*_mem_save_names_0
;
3923 TALLOC_CTX
*_mem_save_names_1
;
3924 if (ndr_flags
& NDR_SCALARS
) {
3925 NDR_CHECK(ndr_pull_align(ndr
, 4));
3926 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
3927 if (r
->count
> 256) {
3928 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3930 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
3932 NDR_PULL_ALLOC(ndr
, r
->names
);
3937 if (ndr_flags
& NDR_BUFFERS
) {
3939 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3940 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
3941 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
3942 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
3943 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3944 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
3945 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
3946 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
3948 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
3949 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
3951 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
3952 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
3955 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
3958 return NDR_ERR_SUCCESS
;
3961 _PUBLIC_
void ndr_print_lsa_RightSet(struct ndr_print
*ndr
, const char *name
, const struct lsa_RightSet
*r
)
3963 uint32_t cntr_names_1
;
3964 ndr_print_struct(ndr
, name
, "lsa_RightSet");
3966 ndr_print_uint32(ndr
, "count", r
->count
);
3967 ndr_print_ptr(ndr
, "names", r
->names
);
3970 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
3972 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
3974 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
3975 ndr_print_lsa_StringLarge(ndr
, "names", &r
->names
[cntr_names_1
]);
3985 static enum ndr_err_code
ndr_push_lsa_DomainListEx(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainListEx
*r
)
3987 uint32_t cntr_domains_1
;
3988 if (ndr_flags
& NDR_SCALARS
) {
3989 NDR_CHECK(ndr_push_align(ndr
, 4));
3990 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3991 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
3993 if (ndr_flags
& NDR_BUFFERS
) {
3995 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3996 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
3997 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
3999 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4000 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
4004 return NDR_ERR_SUCCESS
;
4007 static enum ndr_err_code
ndr_pull_lsa_DomainListEx(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainListEx
*r
)
4009 uint32_t _ptr_domains
;
4010 uint32_t cntr_domains_1
;
4011 TALLOC_CTX
*_mem_save_domains_0
;
4012 TALLOC_CTX
*_mem_save_domains_1
;
4013 if (ndr_flags
& NDR_SCALARS
) {
4014 NDR_CHECK(ndr_pull_align(ndr
, 4));
4015 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4016 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
4018 NDR_PULL_ALLOC(ndr
, r
->domains
);
4023 if (ndr_flags
& NDR_BUFFERS
) {
4025 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4026 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
4027 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
4028 NDR_PULL_ALLOC_N(ndr
, r
->domains
, ndr_get_array_size(ndr
, &r
->domains
));
4029 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4030 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
4031 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4032 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
4034 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4035 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
4037 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
4038 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
4041 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
4044 return NDR_ERR_SUCCESS
;
4047 _PUBLIC_
void ndr_print_lsa_DomainListEx(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainListEx
*r
)
4049 uint32_t cntr_domains_1
;
4050 ndr_print_struct(ndr
, name
, "lsa_DomainListEx");
4052 ndr_print_uint32(ndr
, "count", r
->count
);
4053 ndr_print_ptr(ndr
, "domains", r
->domains
);
4056 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
4058 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
4060 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
4061 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
4071 static enum ndr_err_code
ndr_push_lsa_DomainInfoKerberos(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfoKerberos
*r
)
4073 if (ndr_flags
& NDR_SCALARS
) {
4074 NDR_CHECK(ndr_push_align(ndr
, 8));
4075 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->enforce_restrictions
));
4076 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->service_tkt_lifetime
));
4077 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->user_tkt_lifetime
));
4078 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->user_tkt_renewaltime
));
4079 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->clock_skew
));
4080 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown6
));
4082 if (ndr_flags
& NDR_BUFFERS
) {
4084 return NDR_ERR_SUCCESS
;
4087 static enum ndr_err_code
ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfoKerberos
*r
)
4089 if (ndr_flags
& NDR_SCALARS
) {
4090 NDR_CHECK(ndr_pull_align(ndr
, 8));
4091 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->enforce_restrictions
));
4092 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->service_tkt_lifetime
));
4093 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->user_tkt_lifetime
));
4094 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->user_tkt_renewaltime
));
4095 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->clock_skew
));
4096 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown6
));
4098 if (ndr_flags
& NDR_BUFFERS
) {
4100 return NDR_ERR_SUCCESS
;
4103 _PUBLIC_
void ndr_print_lsa_DomainInfoKerberos(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfoKerberos
*r
)
4105 ndr_print_struct(ndr
, name
, "lsa_DomainInfoKerberos");
4107 ndr_print_uint32(ndr
, "enforce_restrictions", r
->enforce_restrictions
);
4108 ndr_print_hyper(ndr
, "service_tkt_lifetime", r
->service_tkt_lifetime
);
4109 ndr_print_hyper(ndr
, "user_tkt_lifetime", r
->user_tkt_lifetime
);
4110 ndr_print_hyper(ndr
, "user_tkt_renewaltime", r
->user_tkt_renewaltime
);
4111 ndr_print_hyper(ndr
, "clock_skew", r
->clock_skew
);
4112 ndr_print_hyper(ndr
, "unknown6", r
->unknown6
);
4116 static enum ndr_err_code
ndr_push_lsa_DomainInfoEfs(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfoEfs
*r
)
4118 if (ndr_flags
& NDR_SCALARS
) {
4119 NDR_CHECK(ndr_push_align(ndr
, 4));
4120 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->blob_size
));
4121 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->efs_blob
));
4123 if (ndr_flags
& NDR_BUFFERS
) {
4125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->blob_size
));
4126 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->efs_blob
, r
->blob_size
));
4129 return NDR_ERR_SUCCESS
;
4132 static enum ndr_err_code
ndr_pull_lsa_DomainInfoEfs(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfoEfs
*r
)
4134 uint32_t _ptr_efs_blob
;
4135 TALLOC_CTX
*_mem_save_efs_blob_0
;
4136 if (ndr_flags
& NDR_SCALARS
) {
4137 NDR_CHECK(ndr_pull_align(ndr
, 4));
4138 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->blob_size
));
4139 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_efs_blob
));
4140 if (_ptr_efs_blob
) {
4141 NDR_PULL_ALLOC(ndr
, r
->efs_blob
);
4146 if (ndr_flags
& NDR_BUFFERS
) {
4148 _mem_save_efs_blob_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4149 NDR_PULL_SET_MEM_CTX(ndr
, r
->efs_blob
, 0);
4150 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->efs_blob
));
4151 NDR_PULL_ALLOC_N(ndr
, r
->efs_blob
, ndr_get_array_size(ndr
, &r
->efs_blob
));
4152 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->efs_blob
, ndr_get_array_size(ndr
, &r
->efs_blob
)));
4153 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_efs_blob_0
, 0);
4156 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->efs_blob
, r
->blob_size
));
4159 return NDR_ERR_SUCCESS
;
4162 _PUBLIC_
void ndr_print_lsa_DomainInfoEfs(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfoEfs
*r
)
4164 ndr_print_struct(ndr
, name
, "lsa_DomainInfoEfs");
4166 ndr_print_uint32(ndr
, "blob_size", r
->blob_size
);
4167 ndr_print_ptr(ndr
, "efs_blob", r
->efs_blob
);
4170 ndr_print_array_uint8(ndr
, "efs_blob", r
->efs_blob
, r
->blob_size
);
4176 static enum ndr_err_code
ndr_push_lsa_DomainInformationPolicy(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_DomainInformationPolicy
*r
)
4178 if (ndr_flags
& NDR_SCALARS
) {
4179 int level
= ndr_push_get_switch_value(ndr
, r
);
4180 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
4182 case LSA_DOMAIN_INFO_POLICY_EFS
: {
4183 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr
, NDR_SCALARS
, &r
->efs_info
));
4186 case LSA_DOMAIN_INFO_POLICY_KERBEROS
: {
4187 NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr
, NDR_SCALARS
, &r
->kerberos_info
));
4191 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4194 if (ndr_flags
& NDR_BUFFERS
) {
4195 int level
= ndr_push_get_switch_value(ndr
, r
);
4197 case LSA_DOMAIN_INFO_POLICY_EFS
:
4198 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr
, NDR_BUFFERS
, &r
->efs_info
));
4201 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4205 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4208 return NDR_ERR_SUCCESS
;
4211 static enum ndr_err_code
ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_DomainInformationPolicy
*r
)
4215 level
= ndr_pull_get_switch_value(ndr
, r
);
4216 if (ndr_flags
& NDR_SCALARS
) {
4217 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
4218 if (_level
!= level
) {
4219 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4222 case LSA_DOMAIN_INFO_POLICY_EFS
: {
4223 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr
, NDR_SCALARS
, &r
->efs_info
));
4226 case LSA_DOMAIN_INFO_POLICY_KERBEROS
: {
4227 NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr
, NDR_SCALARS
, &r
->kerberos_info
));
4231 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4234 if (ndr_flags
& NDR_BUFFERS
) {
4236 case LSA_DOMAIN_INFO_POLICY_EFS
:
4237 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr
, NDR_BUFFERS
, &r
->efs_info
));
4240 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4244 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4247 return NDR_ERR_SUCCESS
;
4250 _PUBLIC_
void ndr_print_lsa_DomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, const union lsa_DomainInformationPolicy
*r
)
4253 level
= ndr_print_get_switch_value(ndr
, r
);
4254 ndr_print_union(ndr
, name
, level
, "lsa_DomainInformationPolicy");
4256 case LSA_DOMAIN_INFO_POLICY_EFS
:
4257 ndr_print_lsa_DomainInfoEfs(ndr
, "efs_info", &r
->efs_info
);
4260 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4261 ndr_print_lsa_DomainInfoKerberos(ndr
, "kerberos_info", &r
->kerberos_info
);
4265 ndr_print_bad_level(ndr
, name
, level
);
4269 static enum ndr_err_code
ndr_push_lsa_TranslatedName2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedName2
*r
)
4271 if (ndr_flags
& NDR_SCALARS
) {
4272 NDR_CHECK(ndr_push_align(ndr
, 4));
4273 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4274 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
4275 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4276 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
4278 if (ndr_flags
& NDR_BUFFERS
) {
4279 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
4281 return NDR_ERR_SUCCESS
;
4284 static enum ndr_err_code
ndr_pull_lsa_TranslatedName2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedName2
*r
)
4286 if (ndr_flags
& NDR_SCALARS
) {
4287 NDR_CHECK(ndr_pull_align(ndr
, 4));
4288 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4289 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
4290 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4291 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
4293 if (ndr_flags
& NDR_BUFFERS
) {
4294 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
4296 return NDR_ERR_SUCCESS
;
4299 _PUBLIC_
void ndr_print_lsa_TranslatedName2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedName2
*r
)
4301 ndr_print_struct(ndr
, name
, "lsa_TranslatedName2");
4303 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4304 ndr_print_lsa_String(ndr
, "name", &r
->name
);
4305 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4306 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
4310 static enum ndr_err_code
ndr_push_lsa_TransNameArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransNameArray2
*r
)
4312 uint32_t cntr_names_1
;
4313 if (ndr_flags
& NDR_SCALARS
) {
4314 NDR_CHECK(ndr_push_align(ndr
, 4));
4315 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4316 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
4318 if (ndr_flags
& NDR_BUFFERS
) {
4320 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4321 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4322 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4324 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4325 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4329 return NDR_ERR_SUCCESS
;
4332 static enum ndr_err_code
ndr_pull_lsa_TransNameArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransNameArray2
*r
)
4334 uint32_t _ptr_names
;
4335 uint32_t cntr_names_1
;
4336 TALLOC_CTX
*_mem_save_names_0
;
4337 TALLOC_CTX
*_mem_save_names_1
;
4338 if (ndr_flags
& NDR_SCALARS
) {
4339 NDR_CHECK(ndr_pull_align(ndr
, 4));
4340 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4341 if (r
->count
> 1000) {
4342 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4344 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
4346 NDR_PULL_ALLOC(ndr
, r
->names
);
4351 if (ndr_flags
& NDR_BUFFERS
) {
4353 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4354 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4355 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
4356 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
4357 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4358 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4359 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4360 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4362 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4363 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4365 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
4366 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
4369 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
4372 return NDR_ERR_SUCCESS
;
4375 _PUBLIC_
void ndr_print_lsa_TransNameArray2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransNameArray2
*r
)
4377 uint32_t cntr_names_1
;
4378 ndr_print_struct(ndr
, name
, "lsa_TransNameArray2");
4380 ndr_print_uint32(ndr
, "count", r
->count
);
4381 ndr_print_ptr(ndr
, "names", r
->names
);
4384 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
4386 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
4388 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
4389 ndr_print_lsa_TranslatedName2(ndr
, "names", &r
->names
[cntr_names_1
]);
4399 static enum ndr_err_code
ndr_push_lsa_TranslatedSid2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid2
*r
)
4401 if (ndr_flags
& NDR_SCALARS
) {
4402 NDR_CHECK(ndr_push_align(ndr
, 4));
4403 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4406 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
4408 if (ndr_flags
& NDR_BUFFERS
) {
4410 return NDR_ERR_SUCCESS
;
4413 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid2
*r
)
4415 if (ndr_flags
& NDR_SCALARS
) {
4416 NDR_CHECK(ndr_pull_align(ndr
, 4));
4417 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4418 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4419 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4420 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
4422 if (ndr_flags
& NDR_BUFFERS
) {
4424 return NDR_ERR_SUCCESS
;
4427 _PUBLIC_
void ndr_print_lsa_TranslatedSid2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid2
*r
)
4429 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid2");
4431 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4432 ndr_print_uint32(ndr
, "rid", r
->rid
);
4433 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4434 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
4438 static enum ndr_err_code
ndr_push_lsa_TransSidArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray2
*r
)
4440 uint32_t cntr_sids_1
;
4441 if (ndr_flags
& NDR_SCALARS
) {
4442 NDR_CHECK(ndr_push_align(ndr
, 4));
4443 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4444 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
4446 if (ndr_flags
& NDR_BUFFERS
) {
4448 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4449 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4450 NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4454 return NDR_ERR_SUCCESS
;
4457 static enum ndr_err_code
ndr_pull_lsa_TransSidArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray2
*r
)
4460 uint32_t cntr_sids_1
;
4461 TALLOC_CTX
*_mem_save_sids_0
;
4462 TALLOC_CTX
*_mem_save_sids_1
;
4463 if (ndr_flags
& NDR_SCALARS
) {
4464 NDR_CHECK(ndr_pull_align(ndr
, 4));
4465 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4466 if (r
->count
> 1000) {
4467 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4469 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4471 NDR_PULL_ALLOC(ndr
, r
->sids
);
4476 if (ndr_flags
& NDR_BUFFERS
) {
4478 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4479 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4480 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
4481 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
4482 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4483 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4484 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4485 NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4487 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
4488 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
4491 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
4494 return NDR_ERR_SUCCESS
;
4497 _PUBLIC_
void ndr_print_lsa_TransSidArray2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray2
*r
)
4499 uint32_t cntr_sids_1
;
4500 ndr_print_struct(ndr
, name
, "lsa_TransSidArray2");
4502 ndr_print_uint32(ndr
, "count", r
->count
);
4503 ndr_print_ptr(ndr
, "sids", r
->sids
);
4506 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
4508 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
4510 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
4511 ndr_print_lsa_TranslatedSid2(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
4521 static enum ndr_err_code
ndr_push_lsa_TranslatedSid3(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid3
*r
)
4523 if (ndr_flags
& NDR_SCALARS
) {
4524 NDR_CHECK(ndr_push_align(ndr
, 4));
4525 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4526 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
4527 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4528 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
4530 if (ndr_flags
& NDR_BUFFERS
) {
4532 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4535 return NDR_ERR_SUCCESS
;
4538 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid3(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid3
*r
)
4541 TALLOC_CTX
*_mem_save_sid_0
;
4542 if (ndr_flags
& NDR_SCALARS
) {
4543 NDR_CHECK(ndr_pull_align(ndr
, 4));
4544 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4545 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
4547 NDR_PULL_ALLOC(ndr
, r
->sid
);
4551 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4552 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
4554 if (ndr_flags
& NDR_BUFFERS
) {
4556 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4557 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
4558 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4559 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
4562 return NDR_ERR_SUCCESS
;
4565 _PUBLIC_
void ndr_print_lsa_TranslatedSid3(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid3
*r
)
4567 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid3");
4569 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4570 ndr_print_ptr(ndr
, "sid", r
->sid
);
4573 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
4576 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4577 ndr_print_uint32(ndr
, "flags", r
->flags
);
4581 static enum ndr_err_code
ndr_push_lsa_TransSidArray3(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray3
*r
)
4583 uint32_t cntr_sids_1
;
4584 if (ndr_flags
& NDR_SCALARS
) {
4585 NDR_CHECK(ndr_push_align(ndr
, 4));
4586 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4587 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
4589 if (ndr_flags
& NDR_BUFFERS
) {
4591 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4592 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4593 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4595 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4596 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
4600 return NDR_ERR_SUCCESS
;
4603 static enum ndr_err_code
ndr_pull_lsa_TransSidArray3(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray3
*r
)
4606 uint32_t cntr_sids_1
;
4607 TALLOC_CTX
*_mem_save_sids_0
;
4608 TALLOC_CTX
*_mem_save_sids_1
;
4609 if (ndr_flags
& NDR_SCALARS
) {
4610 NDR_CHECK(ndr_pull_align(ndr
, 4));
4611 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4612 if (r
->count
> 1000) {
4613 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4615 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4617 NDR_PULL_ALLOC(ndr
, r
->sids
);
4622 if (ndr_flags
& NDR_BUFFERS
) {
4624 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4625 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4626 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
4627 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
4628 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4629 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4630 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4631 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4633 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4634 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
4636 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
4637 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
4640 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
4643 return NDR_ERR_SUCCESS
;
4646 _PUBLIC_
void ndr_print_lsa_TransSidArray3(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray3
*r
)
4648 uint32_t cntr_sids_1
;
4649 ndr_print_struct(ndr
, name
, "lsa_TransSidArray3");
4651 ndr_print_uint32(ndr
, "count", r
->count
);
4652 ndr_print_ptr(ndr
, "sids", r
->sids
);
4655 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
4657 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
4659 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
4660 ndr_print_lsa_TranslatedSid3(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
4670 static enum ndr_err_code
ndr_push_lsa_ForestTrustBinaryData(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustBinaryData
*r
)
4672 if (ndr_flags
& NDR_SCALARS
) {
4673 NDR_CHECK(ndr_push_align(ndr
, 4));
4674 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4675 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
4677 if (ndr_flags
& NDR_BUFFERS
) {
4679 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4680 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
4683 return NDR_ERR_SUCCESS
;
4686 static enum ndr_err_code
ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustBinaryData
*r
)
4689 TALLOC_CTX
*_mem_save_data_0
;
4690 if (ndr_flags
& NDR_SCALARS
) {
4691 NDR_CHECK(ndr_pull_align(ndr
, 4));
4692 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
4693 if (r
->length
> 131072) {
4694 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4696 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
4698 NDR_PULL_ALLOC(ndr
, r
->data
);
4703 if (ndr_flags
& NDR_BUFFERS
) {
4705 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4706 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
4707 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
4708 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
4709 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
4710 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
4713 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
4716 return NDR_ERR_SUCCESS
;
4719 _PUBLIC_
void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustBinaryData
*r
)
4721 ndr_print_struct(ndr
, name
, "lsa_ForestTrustBinaryData");
4723 ndr_print_uint32(ndr
, "length", r
->length
);
4724 ndr_print_ptr(ndr
, "data", r
->data
);
4727 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
4733 static enum ndr_err_code
ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustDomainInfo
*r
)
4735 if (ndr_flags
& NDR_SCALARS
) {
4736 NDR_CHECK(ndr_push_align(ndr
, 4));
4737 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_sid
));
4738 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain_name
));
4739 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_domain_name
));
4741 if (ndr_flags
& NDR_BUFFERS
) {
4742 if (r
->domain_sid
) {
4743 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
4745 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain_name
));
4746 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_domain_name
));
4748 return NDR_ERR_SUCCESS
;
4751 static enum ndr_err_code
ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustDomainInfo
*r
)
4753 uint32_t _ptr_domain_sid
;
4754 TALLOC_CTX
*_mem_save_domain_sid_0
;
4755 if (ndr_flags
& NDR_SCALARS
) {
4756 NDR_CHECK(ndr_pull_align(ndr
, 4));
4757 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_sid
));
4758 if (_ptr_domain_sid
) {
4759 NDR_PULL_ALLOC(ndr
, r
->domain_sid
);
4761 r
->domain_sid
= NULL
;
4763 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain_name
));
4764 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_domain_name
));
4766 if (ndr_flags
& NDR_BUFFERS
) {
4767 if (r
->domain_sid
) {
4768 _mem_save_domain_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4769 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_sid
, 0);
4770 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
4771 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_sid_0
, 0);
4773 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain_name
));
4774 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_domain_name
));
4776 return NDR_ERR_SUCCESS
;
4779 _PUBLIC_
void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustDomainInfo
*r
)
4781 ndr_print_struct(ndr
, name
, "lsa_ForestTrustDomainInfo");
4783 ndr_print_ptr(ndr
, "domain_sid", r
->domain_sid
);
4785 if (r
->domain_sid
) {
4786 ndr_print_dom_sid2(ndr
, "domain_sid", r
->domain_sid
);
4789 ndr_print_lsa_StringLarge(ndr
, "dns_domain_name", &r
->dns_domain_name
);
4790 ndr_print_lsa_StringLarge(ndr
, "netbios_domain_name", &r
->netbios_domain_name
);
4794 static enum ndr_err_code
ndr_push_lsa_ForestTrustData(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_ForestTrustData
*r
)
4796 if (ndr_flags
& NDR_SCALARS
) {
4797 int level
= ndr_push_get_switch_value(ndr
, r
);
4798 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
4800 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: {
4801 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->top_level_name
));
4804 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: {
4805 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->top_level_name_ex
));
4808 case LSA_FOREST_TRUST_DOMAIN_INFO
: {
4809 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr
, NDR_SCALARS
, &r
->domain_info
));
4813 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr
, NDR_SCALARS
, &r
->data
));
4818 if (ndr_flags
& NDR_BUFFERS
) {
4819 int level
= ndr_push_get_switch_value(ndr
, r
);
4821 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
4822 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->top_level_name
));
4825 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
4826 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->top_level_name_ex
));
4829 case LSA_FOREST_TRUST_DOMAIN_INFO
:
4830 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr
, NDR_BUFFERS
, &r
->domain_info
));
4834 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr
, NDR_BUFFERS
, &r
->data
));
4839 return NDR_ERR_SUCCESS
;
4842 static enum ndr_err_code
ndr_pull_lsa_ForestTrustData(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_ForestTrustData
*r
)
4846 level
= ndr_pull_get_switch_value(ndr
, r
);
4847 if (ndr_flags
& NDR_SCALARS
) {
4848 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
4849 if (_level
!= level
) {
4850 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4853 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: {
4854 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->top_level_name
));
4857 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: {
4858 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->top_level_name_ex
));
4861 case LSA_FOREST_TRUST_DOMAIN_INFO
: {
4862 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr
, NDR_SCALARS
, &r
->domain_info
));
4866 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr
, NDR_SCALARS
, &r
->data
));
4871 if (ndr_flags
& NDR_BUFFERS
) {
4873 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
4874 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->top_level_name
));
4877 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
4878 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->top_level_name_ex
));
4881 case LSA_FOREST_TRUST_DOMAIN_INFO
:
4882 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr
, NDR_BUFFERS
, &r
->domain_info
));
4886 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr
, NDR_BUFFERS
, &r
->data
));
4891 return NDR_ERR_SUCCESS
;
4894 _PUBLIC_
void ndr_print_lsa_ForestTrustData(struct ndr_print
*ndr
, const char *name
, const union lsa_ForestTrustData
*r
)
4897 level
= ndr_print_get_switch_value(ndr
, r
);
4898 ndr_print_union(ndr
, name
, level
, "lsa_ForestTrustData");
4900 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
4901 ndr_print_lsa_String(ndr
, "top_level_name", &r
->top_level_name
);
4904 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
4905 ndr_print_lsa_StringLarge(ndr
, "top_level_name_ex", &r
->top_level_name_ex
);
4908 case LSA_FOREST_TRUST_DOMAIN_INFO
:
4909 ndr_print_lsa_ForestTrustDomainInfo(ndr
, "domain_info", &r
->domain_info
);
4913 ndr_print_lsa_ForestTrustBinaryData(ndr
, "data", &r
->data
);
4919 static enum ndr_err_code
ndr_push_lsa_ForestTrustRecordType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_ForestTrustRecordType r
)
4921 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4922 return NDR_ERR_SUCCESS
;
4925 static enum ndr_err_code
ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_ForestTrustRecordType
*r
)
4928 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4930 return NDR_ERR_SUCCESS
;
4933 _PUBLIC_
void ndr_print_lsa_ForestTrustRecordType(struct ndr_print
*ndr
, const char *name
, enum lsa_ForestTrustRecordType r
)
4935 const char *val
= NULL
;
4938 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: val
= "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break;
4939 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: val
= "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
4940 case LSA_FOREST_TRUST_DOMAIN_INFO
: val
= "LSA_FOREST_TRUST_DOMAIN_INFO"; break;
4941 case LSA_FOREST_TRUST_RECORD_TYPE_LAST
: val
= "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break;
4943 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4946 static enum ndr_err_code
ndr_push_lsa_ForestTrustRecord(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustRecord
*r
)
4948 if (ndr_flags
& NDR_SCALARS
) {
4949 NDR_CHECK(ndr_push_align(ndr
, 8));
4950 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
4951 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr
, NDR_SCALARS
, r
->level
));
4952 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown
));
4953 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
));
4954 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr
, NDR_SCALARS
, &r
->forest_trust_data
));
4956 if (ndr_flags
& NDR_BUFFERS
) {
4957 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr
, NDR_BUFFERS
, &r
->forest_trust_data
));
4959 return NDR_ERR_SUCCESS
;
4962 static enum ndr_err_code
ndr_pull_lsa_ForestTrustRecord(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustRecord
*r
)
4964 if (ndr_flags
& NDR_SCALARS
) {
4965 NDR_CHECK(ndr_pull_align(ndr
, 8));
4966 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
4967 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr
, NDR_SCALARS
, &r
->level
));
4968 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown
));
4969 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
));
4970 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr
, NDR_SCALARS
, &r
->forest_trust_data
));
4972 if (ndr_flags
& NDR_BUFFERS
) {
4973 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr
, NDR_BUFFERS
, &r
->forest_trust_data
));
4975 return NDR_ERR_SUCCESS
;
4978 _PUBLIC_
void ndr_print_lsa_ForestTrustRecord(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustRecord
*r
)
4980 ndr_print_struct(ndr
, name
, "lsa_ForestTrustRecord");
4982 ndr_print_uint32(ndr
, "flags", r
->flags
);
4983 ndr_print_lsa_ForestTrustRecordType(ndr
, "level", r
->level
);
4984 ndr_print_hyper(ndr
, "unknown", r
->unknown
);
4985 ndr_print_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
);
4986 ndr_print_lsa_ForestTrustData(ndr
, "forest_trust_data", &r
->forest_trust_data
);
4990 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_ForestTrustInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustInformation
*r
)
4992 uint32_t cntr_entries_1
;
4993 if (ndr_flags
& NDR_SCALARS
) {
4994 NDR_CHECK(ndr_push_align(ndr
, 4));
4995 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4996 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
4998 if (ndr_flags
& NDR_BUFFERS
) {
5000 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5001 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5002 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
[cntr_entries_1
]));
5004 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5005 if (r
->entries
[cntr_entries_1
]) {
5006 NDR_CHECK(ndr_push_lsa_ForestTrustRecord(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->entries
[cntr_entries_1
]));
5011 return NDR_ERR_SUCCESS
;
5014 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_ForestTrustInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustInformation
*r
)
5016 uint32_t _ptr_entries
;
5017 uint32_t cntr_entries_1
;
5018 TALLOC_CTX
*_mem_save_entries_0
;
5019 TALLOC_CTX
*_mem_save_entries_1
;
5020 TALLOC_CTX
*_mem_save_entries_2
;
5021 if (ndr_flags
& NDR_SCALARS
) {
5022 NDR_CHECK(ndr_pull_align(ndr
, 4));
5023 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
5024 if (r
->count
> 4000) {
5025 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5027 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
5029 NDR_PULL_ALLOC(ndr
, r
->entries
);
5034 if (ndr_flags
& NDR_BUFFERS
) {
5036 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5037 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
5038 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
5039 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
5040 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5041 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
5042 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5043 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
5045 NDR_PULL_ALLOC(ndr
, r
->entries
[cntr_entries_1
]);
5047 r
->entries
[cntr_entries_1
] = NULL
;
5050 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5051 if (r
->entries
[cntr_entries_1
]) {
5052 _mem_save_entries_2
= NDR_PULL_GET_MEM_CTX(ndr
);
5053 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
[cntr_entries_1
], 0);
5054 NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->entries
[cntr_entries_1
]));
5055 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_2
, 0);
5058 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
5059 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
5062 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
5065 return NDR_ERR_SUCCESS
;
5068 _PUBLIC_
void ndr_print_lsa_ForestTrustInformation(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustInformation
*r
)
5070 uint32_t cntr_entries_1
;
5071 ndr_print_struct(ndr
, name
, "lsa_ForestTrustInformation");
5073 ndr_print_uint32(ndr
, "count", r
->count
);
5074 ndr_print_ptr(ndr
, "entries", r
->entries
);
5077 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
5079 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
5081 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
5082 ndr_print_ptr(ndr
, "entries", r
->entries
[cntr_entries_1
]);
5084 if (r
->entries
[cntr_entries_1
]) {
5085 ndr_print_lsa_ForestTrustRecord(ndr
, "entries", r
->entries
[cntr_entries_1
]);
5097 static enum ndr_err_code
ndr_push_lsa_Close(struct ndr_push
*ndr
, int flags
, const struct lsa_Close
*r
)
5099 if (flags
& NDR_IN
) {
5100 if (r
->in
.handle
== NULL
) {
5101 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5103 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5105 if (flags
& NDR_OUT
) {
5106 if (r
->out
.handle
== NULL
) {
5107 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5109 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5110 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5112 return NDR_ERR_SUCCESS
;
5115 static enum ndr_err_code
ndr_pull_lsa_Close(struct ndr_pull
*ndr
, int flags
, struct lsa_Close
*r
)
5117 TALLOC_CTX
*_mem_save_handle_0
;
5118 if (flags
& NDR_IN
) {
5119 ZERO_STRUCT(r
->out
);
5121 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5122 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5124 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5125 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5126 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5127 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5128 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5129 *r
->out
.handle
= *r
->in
.handle
;
5131 if (flags
& NDR_OUT
) {
5132 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5133 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5135 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5136 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5137 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5138 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5139 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5141 return NDR_ERR_SUCCESS
;
5144 _PUBLIC_
void ndr_print_lsa_Close(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_Close
*r
)
5146 ndr_print_struct(ndr
, name
, "lsa_Close");
5148 if (flags
& NDR_SET_VALUES
) {
5149 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5151 if (flags
& NDR_IN
) {
5152 ndr_print_struct(ndr
, "in", "lsa_Close");
5154 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5156 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5160 if (flags
& NDR_OUT
) {
5161 ndr_print_struct(ndr
, "out", "lsa_Close");
5163 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5165 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5167 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5173 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_Delete(struct ndr_push
*ndr
, int flags
, const struct lsa_Delete
*r
)
5175 if (flags
& NDR_IN
) {
5176 if (r
->in
.handle
== NULL
) {
5177 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5179 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5181 if (flags
& NDR_OUT
) {
5182 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5184 return NDR_ERR_SUCCESS
;
5187 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_Delete(struct ndr_pull
*ndr
, int flags
, struct lsa_Delete
*r
)
5189 TALLOC_CTX
*_mem_save_handle_0
;
5190 if (flags
& NDR_IN
) {
5191 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5192 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5194 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5195 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5196 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5197 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5199 if (flags
& NDR_OUT
) {
5200 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5202 return NDR_ERR_SUCCESS
;
5205 _PUBLIC_
void ndr_print_lsa_Delete(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_Delete
*r
)
5207 ndr_print_struct(ndr
, name
, "lsa_Delete");
5209 if (flags
& NDR_SET_VALUES
) {
5210 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5212 if (flags
& NDR_IN
) {
5213 ndr_print_struct(ndr
, "in", "lsa_Delete");
5215 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5217 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5221 if (flags
& NDR_OUT
) {
5222 ndr_print_struct(ndr
, "out", "lsa_Delete");
5224 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5230 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_EnumPrivs(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumPrivs
*r
)
5232 if (flags
& NDR_IN
) {
5233 if (r
->in
.handle
== NULL
) {
5234 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5236 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5237 if (r
->in
.resume_handle
== NULL
) {
5238 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5240 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
5241 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_count
));
5243 if (flags
& NDR_OUT
) {
5244 if (r
->out
.resume_handle
== NULL
) {
5245 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5247 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
5248 if (r
->out
.privs
== NULL
) {
5249 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5251 NDR_CHECK(ndr_push_lsa_PrivArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.privs
));
5252 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5254 return NDR_ERR_SUCCESS
;
5257 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_EnumPrivs(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumPrivs
*r
)
5259 TALLOC_CTX
*_mem_save_handle_0
;
5260 TALLOC_CTX
*_mem_save_resume_handle_0
;
5261 TALLOC_CTX
*_mem_save_privs_0
;
5262 if (flags
& NDR_IN
) {
5263 ZERO_STRUCT(r
->out
);
5265 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5266 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5268 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5269 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5270 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5271 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5272 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5273 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
5275 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5276 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5277 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
5278 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5279 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_count
));
5280 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5281 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
5282 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
5283 ZERO_STRUCTP(r
->out
.privs
);
5285 if (flags
& NDR_OUT
) {
5286 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5287 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5289 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5290 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5291 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
5292 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5293 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5294 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
5296 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5297 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.privs
, LIBNDR_FLAG_REF_ALLOC
);
5298 NDR_CHECK(ndr_pull_lsa_PrivArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.privs
));
5299 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
5300 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5302 return NDR_ERR_SUCCESS
;
5305 _PUBLIC_
void ndr_print_lsa_EnumPrivs(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumPrivs
*r
)
5307 ndr_print_struct(ndr
, name
, "lsa_EnumPrivs");
5309 if (flags
& NDR_SET_VALUES
) {
5310 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5312 if (flags
& NDR_IN
) {
5313 ndr_print_struct(ndr
, "in", "lsa_EnumPrivs");
5315 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5317 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5319 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
5321 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
5323 ndr_print_uint32(ndr
, "max_count", r
->in
.max_count
);
5326 if (flags
& NDR_OUT
) {
5327 ndr_print_struct(ndr
, "out", "lsa_EnumPrivs");
5329 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
5331 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
5333 ndr_print_ptr(ndr
, "privs", r
->out
.privs
);
5335 ndr_print_lsa_PrivArray(ndr
, "privs", r
->out
.privs
);
5337 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5343 static enum ndr_err_code
ndr_push_lsa_QuerySecurity(struct ndr_push
*ndr
, int flags
, const struct lsa_QuerySecurity
*r
)
5345 if (flags
& NDR_IN
) {
5346 if (r
->in
.handle
== NULL
) {
5347 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5349 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5350 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5352 if (flags
& NDR_OUT
) {
5353 if (r
->out
.sdbuf
== NULL
) {
5354 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5356 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sdbuf
));
5357 if (*r
->out
.sdbuf
) {
5358 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5360 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5362 return NDR_ERR_SUCCESS
;
5365 static enum ndr_err_code
ndr_pull_lsa_QuerySecurity(struct ndr_pull
*ndr
, int flags
, struct lsa_QuerySecurity
*r
)
5367 uint32_t _ptr_sdbuf
;
5368 TALLOC_CTX
*_mem_save_handle_0
;
5369 TALLOC_CTX
*_mem_save_sdbuf_0
;
5370 TALLOC_CTX
*_mem_save_sdbuf_1
;
5371 if (flags
& NDR_IN
) {
5372 ZERO_STRUCT(r
->out
);
5374 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5375 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5377 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5378 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5379 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5380 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5381 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5382 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5383 ZERO_STRUCTP(r
->out
.sdbuf
);
5385 if (flags
& NDR_OUT
) {
5386 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5387 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5389 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5390 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5391 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sdbuf
));
5393 NDR_PULL_ALLOC(ndr
, *r
->out
.sdbuf
);
5395 *r
->out
.sdbuf
= NULL
;
5397 if (*r
->out
.sdbuf
) {
5398 _mem_save_sdbuf_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5399 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sdbuf
, 0);
5400 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5401 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_1
, 0);
5403 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5404 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5406 return NDR_ERR_SUCCESS
;
5409 _PUBLIC_
void ndr_print_lsa_QuerySecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QuerySecurity
*r
)
5411 ndr_print_struct(ndr
, name
, "lsa_QuerySecurity");
5413 if (flags
& NDR_SET_VALUES
) {
5414 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5416 if (flags
& NDR_IN
) {
5417 ndr_print_struct(ndr
, "in", "lsa_QuerySecurity");
5419 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5421 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5423 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5426 if (flags
& NDR_OUT
) {
5427 ndr_print_struct(ndr
, "out", "lsa_QuerySecurity");
5429 ndr_print_ptr(ndr
, "sdbuf", r
->out
.sdbuf
);
5431 ndr_print_ptr(ndr
, "sdbuf", *r
->out
.sdbuf
);
5433 if (*r
->out
.sdbuf
) {
5434 ndr_print_sec_desc_buf(ndr
, "sdbuf", *r
->out
.sdbuf
);
5438 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5444 static enum ndr_err_code
ndr_push_lsa_SetSecObj(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSecObj
*r
)
5446 if (flags
& NDR_IN
) {
5447 if (r
->in
.handle
== NULL
) {
5448 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5450 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5451 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5452 if (r
->in
.sdbuf
== NULL
) {
5453 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5455 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5457 if (flags
& NDR_OUT
) {
5458 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5460 return NDR_ERR_SUCCESS
;
5463 static enum ndr_err_code
ndr_pull_lsa_SetSecObj(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSecObj
*r
)
5465 TALLOC_CTX
*_mem_save_handle_0
;
5466 TALLOC_CTX
*_mem_save_sdbuf_0
;
5467 if (flags
& NDR_IN
) {
5468 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5469 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5471 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5472 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5473 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5474 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5475 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5476 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5477 NDR_PULL_ALLOC(ndr
, r
->in
.sdbuf
);
5479 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5480 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5481 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5482 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5484 if (flags
& NDR_OUT
) {
5485 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5487 return NDR_ERR_SUCCESS
;
5490 _PUBLIC_
void ndr_print_lsa_SetSecObj(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSecObj
*r
)
5492 ndr_print_struct(ndr
, name
, "lsa_SetSecObj");
5494 if (flags
& NDR_SET_VALUES
) {
5495 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5497 if (flags
& NDR_IN
) {
5498 ndr_print_struct(ndr
, "in", "lsa_SetSecObj");
5500 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5502 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5504 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5505 ndr_print_ptr(ndr
, "sdbuf", r
->in
.sdbuf
);
5507 ndr_print_sec_desc_buf(ndr
, "sdbuf", r
->in
.sdbuf
);
5511 if (flags
& NDR_OUT
) {
5512 ndr_print_struct(ndr
, "out", "lsa_SetSecObj");
5514 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5520 static enum ndr_err_code
ndr_push_lsa_ChangePassword(struct ndr_push
*ndr
, int flags
, const struct lsa_ChangePassword
*r
)
5522 if (flags
& NDR_IN
) {
5524 if (flags
& NDR_OUT
) {
5525 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5527 return NDR_ERR_SUCCESS
;
5530 static enum ndr_err_code
ndr_pull_lsa_ChangePassword(struct ndr_pull
*ndr
, int flags
, struct lsa_ChangePassword
*r
)
5532 if (flags
& NDR_IN
) {
5534 if (flags
& NDR_OUT
) {
5535 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5537 return NDR_ERR_SUCCESS
;
5540 _PUBLIC_
void ndr_print_lsa_ChangePassword(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_ChangePassword
*r
)
5542 ndr_print_struct(ndr
, name
, "lsa_ChangePassword");
5544 if (flags
& NDR_SET_VALUES
) {
5545 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5547 if (flags
& NDR_IN
) {
5548 ndr_print_struct(ndr
, "in", "lsa_ChangePassword");
5552 if (flags
& NDR_OUT
) {
5553 ndr_print_struct(ndr
, "out", "lsa_ChangePassword");
5555 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5561 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenPolicy
*r
)
5563 if (flags
& NDR_IN
) {
5564 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
5565 if (r
->in
.system_name
) {
5566 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
5568 if (r
->in
.attr
== NULL
) {
5569 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5571 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
5572 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
5574 if (flags
& NDR_OUT
) {
5575 if (r
->out
.handle
== NULL
) {
5576 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5578 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5579 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5581 return NDR_ERR_SUCCESS
;
5584 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenPolicy
*r
)
5586 uint32_t _ptr_system_name
;
5587 TALLOC_CTX
*_mem_save_system_name_0
;
5588 TALLOC_CTX
*_mem_save_attr_0
;
5589 TALLOC_CTX
*_mem_save_handle_0
;
5590 if (flags
& NDR_IN
) {
5591 ZERO_STRUCT(r
->out
);
5593 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
5594 if (_ptr_system_name
) {
5595 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
5597 r
->in
.system_name
= NULL
;
5599 if (r
->in
.system_name
) {
5600 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5601 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
5602 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
5603 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
5605 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5606 NDR_PULL_ALLOC(ndr
, r
->in
.attr
);
5608 _mem_save_attr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5609 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.attr
, LIBNDR_FLAG_REF_ALLOC
);
5610 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
5611 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attr_0
, LIBNDR_FLAG_REF_ALLOC
);
5612 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
5613 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5614 ZERO_STRUCTP(r
->out
.handle
);
5616 if (flags
& NDR_OUT
) {
5617 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5618 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5620 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5621 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5622 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5623 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5624 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5626 return NDR_ERR_SUCCESS
;
5629 _PUBLIC_
void ndr_print_lsa_OpenPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenPolicy
*r
)
5631 ndr_print_struct(ndr
, name
, "lsa_OpenPolicy");
5633 if (flags
& NDR_SET_VALUES
) {
5634 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5636 if (flags
& NDR_IN
) {
5637 ndr_print_struct(ndr
, "in", "lsa_OpenPolicy");
5639 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
5641 if (r
->in
.system_name
) {
5642 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
5645 ndr_print_ptr(ndr
, "attr", r
->in
.attr
);
5647 ndr_print_lsa_ObjectAttribute(ndr
, "attr", r
->in
.attr
);
5649 ndr_print_lsa_PolicyAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
5652 if (flags
& NDR_OUT
) {
5653 ndr_print_struct(ndr
, "out", "lsa_OpenPolicy");
5655 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5657 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5659 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5665 static enum ndr_err_code
ndr_push_lsa_QueryInfoPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryInfoPolicy
*r
)
5667 if (flags
& NDR_IN
) {
5668 if (r
->in
.handle
== NULL
) {
5669 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5671 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5672 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
5674 if (flags
& NDR_OUT
) {
5675 if (r
->out
.info
== NULL
) {
5676 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5678 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
5680 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
5681 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
5683 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5685 return NDR_ERR_SUCCESS
;
5688 static enum ndr_err_code
ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryInfoPolicy
*r
)
5691 TALLOC_CTX
*_mem_save_handle_0
;
5692 TALLOC_CTX
*_mem_save_info_0
;
5693 TALLOC_CTX
*_mem_save_info_1
;
5694 if (flags
& NDR_IN
) {
5695 ZERO_STRUCT(r
->out
);
5697 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5698 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5700 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5701 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5702 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5703 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5704 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
5705 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5706 ZERO_STRUCTP(r
->out
.info
);
5708 if (flags
& NDR_OUT
) {
5709 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5710 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5712 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5713 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
5714 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5716 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
5718 *r
->out
.info
= NULL
;
5721 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5722 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
5723 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
5724 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
5725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
5727 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5728 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5730 return NDR_ERR_SUCCESS
;
5733 _PUBLIC_
void ndr_print_lsa_QueryInfoPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryInfoPolicy
*r
)
5735 ndr_print_struct(ndr
, name
, "lsa_QueryInfoPolicy");
5737 if (flags
& NDR_SET_VALUES
) {
5738 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5740 if (flags
& NDR_IN
) {
5741 ndr_print_struct(ndr
, "in", "lsa_QueryInfoPolicy");
5743 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5745 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5747 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
5750 if (flags
& NDR_OUT
) {
5751 ndr_print_struct(ndr
, "out", "lsa_QueryInfoPolicy");
5753 ndr_print_ptr(ndr
, "info", r
->out
.info
);
5755 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
5758 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
5759 ndr_print_lsa_PolicyInformation(ndr
, "info", *r
->out
.info
);
5763 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5769 static enum ndr_err_code
ndr_push_lsa_SetInfoPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInfoPolicy
*r
)
5771 if (flags
& NDR_IN
) {
5772 if (r
->in
.handle
== NULL
) {
5773 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5775 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5776 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
5777 if (r
->in
.info
== NULL
) {
5778 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5780 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
5781 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5783 if (flags
& NDR_OUT
) {
5784 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5786 return NDR_ERR_SUCCESS
;
5789 static enum ndr_err_code
ndr_pull_lsa_SetInfoPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInfoPolicy
*r
)
5791 TALLOC_CTX
*_mem_save_handle_0
;
5792 TALLOC_CTX
*_mem_save_info_0
;
5793 if (flags
& NDR_IN
) {
5794 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5795 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5797 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5798 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5799 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5800 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5801 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
5802 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5803 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
5805 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5806 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
5807 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
5808 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5809 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5811 if (flags
& NDR_OUT
) {
5812 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5814 return NDR_ERR_SUCCESS
;
5817 _PUBLIC_
void ndr_print_lsa_SetInfoPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInfoPolicy
*r
)
5819 ndr_print_struct(ndr
, name
, "lsa_SetInfoPolicy");
5821 if (flags
& NDR_SET_VALUES
) {
5822 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5824 if (flags
& NDR_IN
) {
5825 ndr_print_struct(ndr
, "in", "lsa_SetInfoPolicy");
5827 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5829 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5831 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
5832 ndr_print_ptr(ndr
, "info", r
->in
.info
);
5834 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
5835 ndr_print_lsa_PolicyInformation(ndr
, "info", r
->in
.info
);
5839 if (flags
& NDR_OUT
) {
5840 ndr_print_struct(ndr
, "out", "lsa_SetInfoPolicy");
5842 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5848 static enum ndr_err_code
ndr_push_lsa_ClearAuditLog(struct ndr_push
*ndr
, int flags
, const struct lsa_ClearAuditLog
*r
)
5850 if (flags
& NDR_IN
) {
5852 if (flags
& NDR_OUT
) {
5853 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5855 return NDR_ERR_SUCCESS
;
5858 static enum ndr_err_code
ndr_pull_lsa_ClearAuditLog(struct ndr_pull
*ndr
, int flags
, struct lsa_ClearAuditLog
*r
)
5860 if (flags
& NDR_IN
) {
5862 if (flags
& NDR_OUT
) {
5863 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5865 return NDR_ERR_SUCCESS
;
5868 _PUBLIC_
void ndr_print_lsa_ClearAuditLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_ClearAuditLog
*r
)
5870 ndr_print_struct(ndr
, name
, "lsa_ClearAuditLog");
5872 if (flags
& NDR_SET_VALUES
) {
5873 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5875 if (flags
& NDR_IN
) {
5876 ndr_print_struct(ndr
, "in", "lsa_ClearAuditLog");
5880 if (flags
& NDR_OUT
) {
5881 ndr_print_struct(ndr
, "out", "lsa_ClearAuditLog");
5883 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5889 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateAccount
*r
)
5891 if (flags
& NDR_IN
) {
5892 if (r
->in
.handle
== NULL
) {
5893 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5895 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5896 if (r
->in
.sid
== NULL
) {
5897 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5899 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
5900 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
5902 if (flags
& NDR_OUT
) {
5903 if (r
->out
.acct_handle
== NULL
) {
5904 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5906 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
5907 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5909 return NDR_ERR_SUCCESS
;
5912 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateAccount
*r
)
5914 TALLOC_CTX
*_mem_save_handle_0
;
5915 TALLOC_CTX
*_mem_save_sid_0
;
5916 TALLOC_CTX
*_mem_save_acct_handle_0
;
5917 if (flags
& NDR_IN
) {
5918 ZERO_STRUCT(r
->out
);
5920 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5921 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5923 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5924 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5925 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5926 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5927 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5928 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
5930 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5931 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
5932 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
5933 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
5934 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
5935 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
5936 ZERO_STRUCTP(r
->out
.acct_handle
);
5938 if (flags
& NDR_OUT
) {
5939 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5940 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
5942 _mem_save_acct_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5943 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.acct_handle
, LIBNDR_FLAG_REF_ALLOC
);
5944 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
5945 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_acct_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5946 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5948 return NDR_ERR_SUCCESS
;
5951 _PUBLIC_
void ndr_print_lsa_CreateAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateAccount
*r
)
5953 ndr_print_struct(ndr
, name
, "lsa_CreateAccount");
5955 if (flags
& NDR_SET_VALUES
) {
5956 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5958 if (flags
& NDR_IN
) {
5959 ndr_print_struct(ndr
, "in", "lsa_CreateAccount");
5961 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5963 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5965 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
5967 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
5969 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
5972 if (flags
& NDR_OUT
) {
5973 ndr_print_struct(ndr
, "out", "lsa_CreateAccount");
5975 ndr_print_ptr(ndr
, "acct_handle", r
->out
.acct_handle
);
5977 ndr_print_policy_handle(ndr
, "acct_handle", r
->out
.acct_handle
);
5979 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5985 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_EnumAccounts(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccounts
*r
)
5987 if (flags
& NDR_IN
) {
5988 if (r
->in
.handle
== NULL
) {
5989 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5991 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5992 if (r
->in
.resume_handle
== NULL
) {
5993 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5995 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
5996 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_entries
));
5998 if (flags
& NDR_OUT
) {
5999 if (r
->out
.resume_handle
== NULL
) {
6000 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6002 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6003 if (r
->out
.sids
== NULL
) {
6004 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6006 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6007 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6009 return NDR_ERR_SUCCESS
;
6012 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_EnumAccounts(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccounts
*r
)
6014 TALLOC_CTX
*_mem_save_handle_0
;
6015 TALLOC_CTX
*_mem_save_resume_handle_0
;
6016 TALLOC_CTX
*_mem_save_sids_0
;
6017 if (flags
& NDR_IN
) {
6018 ZERO_STRUCT(r
->out
);
6020 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6021 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6023 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6024 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6025 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6026 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6027 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6028 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6030 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6031 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6032 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6033 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6034 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_entries
));
6035 if (r
->in
.num_entries
> 8192) {
6036 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6038 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6039 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6040 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6041 ZERO_STRUCTP(r
->out
.sids
);
6043 if (flags
& NDR_OUT
) {
6044 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6045 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6047 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6048 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6049 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6050 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6051 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6052 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6054 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6055 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6056 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6057 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6058 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6060 return NDR_ERR_SUCCESS
;
6063 _PUBLIC_
void ndr_print_lsa_EnumAccounts(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccounts
*r
)
6065 ndr_print_struct(ndr
, name
, "lsa_EnumAccounts");
6067 if (flags
& NDR_SET_VALUES
) {
6068 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6070 if (flags
& NDR_IN
) {
6071 ndr_print_struct(ndr
, "in", "lsa_EnumAccounts");
6073 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6075 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6077 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6079 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6081 ndr_print_uint32(ndr
, "num_entries", r
->in
.num_entries
);
6084 if (flags
& NDR_OUT
) {
6085 ndr_print_struct(ndr
, "out", "lsa_EnumAccounts");
6087 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6089 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6091 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
6093 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
6095 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6101 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomain
*r
)
6103 if (flags
& NDR_IN
) {
6104 if (r
->in
.policy_handle
== NULL
) {
6105 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6107 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
6108 if (r
->in
.info
== NULL
) {
6109 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6111 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6112 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6114 if (flags
& NDR_OUT
) {
6115 if (r
->out
.trustdom_handle
== NULL
) {
6116 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6118 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
6119 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6121 return NDR_ERR_SUCCESS
;
6124 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomain
*r
)
6126 TALLOC_CTX
*_mem_save_policy_handle_0
;
6127 TALLOC_CTX
*_mem_save_info_0
;
6128 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
6129 if (flags
& NDR_IN
) {
6130 ZERO_STRUCT(r
->out
);
6132 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6133 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
6135 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6136 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
6137 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
6138 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6139 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6140 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6142 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6143 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
6144 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6145 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6146 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6147 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
6148 ZERO_STRUCTP(r
->out
.trustdom_handle
);
6150 if (flags
& NDR_OUT
) {
6151 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6152 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
6154 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6155 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
6156 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
6157 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6158 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6160 return NDR_ERR_SUCCESS
;
6163 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomain
*r
)
6165 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomain");
6167 if (flags
& NDR_SET_VALUES
) {
6168 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6170 if (flags
& NDR_IN
) {
6171 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomain");
6173 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
6175 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
6177 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6179 ndr_print_lsa_DomainInfo(ndr
, "info", r
->in
.info
);
6181 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
6184 if (flags
& NDR_OUT
) {
6185 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomain");
6187 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
6189 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
6191 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6197 static enum ndr_err_code
ndr_push_lsa_EnumTrustDom(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumTrustDom
*r
)
6199 if (flags
& NDR_IN
) {
6200 if (r
->in
.handle
== NULL
) {
6201 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6203 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6204 if (r
->in
.resume_handle
== NULL
) {
6205 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6207 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6208 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
6210 if (flags
& NDR_OUT
) {
6211 if (r
->out
.resume_handle
== NULL
) {
6212 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6214 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6215 if (r
->out
.domains
== NULL
) {
6216 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6218 NDR_CHECK(ndr_push_lsa_DomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
6219 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6221 return NDR_ERR_SUCCESS
;
6224 static enum ndr_err_code
ndr_pull_lsa_EnumTrustDom(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumTrustDom
*r
)
6226 TALLOC_CTX
*_mem_save_handle_0
;
6227 TALLOC_CTX
*_mem_save_resume_handle_0
;
6228 TALLOC_CTX
*_mem_save_domains_0
;
6229 if (flags
& NDR_IN
) {
6230 ZERO_STRUCT(r
->out
);
6232 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6233 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6235 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6236 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6237 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6238 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6239 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6240 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6242 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6243 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6244 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6245 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6246 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
6247 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6248 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6249 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6250 ZERO_STRUCTP(r
->out
.domains
);
6252 if (flags
& NDR_OUT
) {
6253 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6254 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6256 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6257 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6258 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6259 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6260 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6261 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6263 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6264 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6265 NDR_CHECK(ndr_pull_lsa_DomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
6266 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6267 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6269 return NDR_ERR_SUCCESS
;
6272 _PUBLIC_
void ndr_print_lsa_EnumTrustDom(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumTrustDom
*r
)
6274 ndr_print_struct(ndr
, name
, "lsa_EnumTrustDom");
6276 if (flags
& NDR_SET_VALUES
) {
6277 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6279 if (flags
& NDR_IN
) {
6280 ndr_print_struct(ndr
, "in", "lsa_EnumTrustDom");
6282 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6284 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6286 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6288 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6290 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
6293 if (flags
& NDR_OUT
) {
6294 ndr_print_struct(ndr
, "out", "lsa_EnumTrustDom");
6296 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6298 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6300 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6302 ndr_print_lsa_DomainList(ndr
, "domains", r
->out
.domains
);
6304 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6310 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames
*r
)
6312 uint32_t cntr_names_0
;
6313 if (flags
& NDR_IN
) {
6314 if (r
->in
.handle
== NULL
) {
6315 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6317 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6318 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
6319 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
6320 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6321 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
6323 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6324 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
6326 if (r
->in
.sids
== NULL
) {
6327 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6329 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6330 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
6331 if (r
->in
.count
== NULL
) {
6332 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6334 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
6336 if (flags
& NDR_OUT
) {
6337 if (r
->out
.domains
== NULL
) {
6338 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6340 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
6341 if (*r
->out
.domains
) {
6342 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6344 if (r
->out
.sids
== NULL
) {
6345 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6347 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6348 if (r
->out
.count
== NULL
) {
6349 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6351 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
6352 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6354 return NDR_ERR_SUCCESS
;
6357 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames
*r
)
6359 uint32_t cntr_names_0
;
6360 uint32_t _ptr_domains
;
6361 TALLOC_CTX
*_mem_save_handle_0
;
6362 TALLOC_CTX
*_mem_save_names_0
;
6363 TALLOC_CTX
*_mem_save_domains_0
;
6364 TALLOC_CTX
*_mem_save_domains_1
;
6365 TALLOC_CTX
*_mem_save_sids_0
;
6366 TALLOC_CTX
*_mem_save_count_0
;
6367 if (flags
& NDR_IN
) {
6368 ZERO_STRUCT(r
->out
);
6370 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6371 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6373 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6374 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6375 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6376 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6377 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
6378 if (r
->in
.num_names
> 1000) {
6379 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6381 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
6382 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
6383 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6384 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
6385 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6386 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
6388 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6389 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
6391 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
6392 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6393 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
6395 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6396 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6397 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6398 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6399 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
6400 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6401 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
6403 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6404 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
6405 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
6406 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6407 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6408 ZERO_STRUCTP(r
->out
.domains
);
6409 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6410 *r
->out
.sids
= *r
->in
.sids
;
6411 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6412 *r
->out
.count
= *r
->in
.count
;
6414 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
6417 if (flags
& NDR_OUT
) {
6418 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6419 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6421 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6422 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6423 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
6425 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
6427 *r
->out
.domains
= NULL
;
6429 if (*r
->out
.domains
) {
6430 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6431 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
6432 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6433 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
6435 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6436 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6437 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6439 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6440 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6441 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6442 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6443 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6444 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6446 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6447 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
6448 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
6449 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6450 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6452 return NDR_ERR_SUCCESS
;
6455 _PUBLIC_
void ndr_print_lsa_LookupNames(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames
*r
)
6457 uint32_t cntr_names_0
;
6458 ndr_print_struct(ndr
, name
, "lsa_LookupNames");
6460 if (flags
& NDR_SET_VALUES
) {
6461 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6463 if (flags
& NDR_IN
) {
6464 ndr_print_struct(ndr
, "in", "lsa_LookupNames");
6466 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6468 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6470 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
6471 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
6473 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
6475 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
6476 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
6481 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
6483 ndr_print_lsa_TransSidArray(ndr
, "sids", r
->in
.sids
);
6485 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
6486 ndr_print_ptr(ndr
, "count", r
->in
.count
);
6488 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
6492 if (flags
& NDR_OUT
) {
6493 ndr_print_struct(ndr
, "out", "lsa_LookupNames");
6495 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6497 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
6499 if (*r
->out
.domains
) {
6500 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
6504 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
6506 ndr_print_lsa_TransSidArray(ndr
, "sids", r
->out
.sids
);
6508 ndr_print_ptr(ndr
, "count", r
->out
.count
);
6510 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
6512 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6518 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids
*r
)
6520 if (flags
& NDR_IN
) {
6521 if (r
->in
.handle
== NULL
) {
6522 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6524 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6525 if (r
->in
.sids
== NULL
) {
6526 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6528 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6529 if (r
->in
.names
== NULL
) {
6530 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6532 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
6533 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
6534 if (r
->in
.count
== NULL
) {
6535 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
6539 if (flags
& NDR_OUT
) {
6540 if (r
->out
.domains
== NULL
) {
6541 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6543 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
6544 if (*r
->out
.domains
) {
6545 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6547 if (r
->out
.names
== NULL
) {
6548 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6550 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
6551 if (r
->out
.count
== NULL
) {
6552 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6554 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
6555 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6557 return NDR_ERR_SUCCESS
;
6560 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids
*r
)
6562 uint32_t _ptr_domains
;
6563 TALLOC_CTX
*_mem_save_handle_0
;
6564 TALLOC_CTX
*_mem_save_sids_0
;
6565 TALLOC_CTX
*_mem_save_domains_0
;
6566 TALLOC_CTX
*_mem_save_domains_1
;
6567 TALLOC_CTX
*_mem_save_names_0
;
6568 TALLOC_CTX
*_mem_save_count_0
;
6569 if (flags
& NDR_IN
) {
6570 ZERO_STRUCT(r
->out
);
6572 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6573 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6575 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6576 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6577 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6578 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6579 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6580 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
6582 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6583 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6584 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6585 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6586 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6587 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
6589 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6590 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
6591 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
6592 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
6593 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
6594 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6595 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
6597 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6598 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
6599 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
6600 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6601 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6602 ZERO_STRUCTP(r
->out
.domains
);
6603 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
6604 *r
->out
.names
= *r
->in
.names
;
6605 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6606 *r
->out
.count
= *r
->in
.count
;
6608 if (flags
& NDR_OUT
) {
6609 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6610 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6612 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6613 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6614 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
6616 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
6618 *r
->out
.domains
= NULL
;
6620 if (*r
->out
.domains
) {
6621 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6622 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
6623 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6624 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
6626 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6627 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6628 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
6630 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6631 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
6632 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
6633 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
6634 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6635 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6637 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6638 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
6639 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
6640 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6641 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6643 return NDR_ERR_SUCCESS
;
6646 _PUBLIC_
void ndr_print_lsa_LookupSids(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids
*r
)
6648 ndr_print_struct(ndr
, name
, "lsa_LookupSids");
6650 if (flags
& NDR_SET_VALUES
) {
6651 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6653 if (flags
& NDR_IN
) {
6654 ndr_print_struct(ndr
, "in", "lsa_LookupSids");
6656 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6658 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6660 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
6662 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
6664 ndr_print_ptr(ndr
, "names", r
->in
.names
);
6666 ndr_print_lsa_TransNameArray(ndr
, "names", r
->in
.names
);
6668 ndr_print_uint16(ndr
, "level", r
->in
.level
);
6669 ndr_print_ptr(ndr
, "count", r
->in
.count
);
6671 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
6675 if (flags
& NDR_OUT
) {
6676 ndr_print_struct(ndr
, "out", "lsa_LookupSids");
6678 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6680 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
6682 if (*r
->out
.domains
) {
6683 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
6687 ndr_print_ptr(ndr
, "names", r
->out
.names
);
6689 ndr_print_lsa_TransNameArray(ndr
, "names", r
->out
.names
);
6691 ndr_print_ptr(ndr
, "count", r
->out
.count
);
6693 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
6695 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6701 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateSecret
*r
)
6703 if (flags
& NDR_IN
) {
6704 if (r
->in
.handle
== NULL
) {
6705 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6707 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6708 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
6709 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6711 if (flags
& NDR_OUT
) {
6712 if (r
->out
.sec_handle
== NULL
) {
6713 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6715 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
6716 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6718 return NDR_ERR_SUCCESS
;
6721 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateSecret
*r
)
6723 TALLOC_CTX
*_mem_save_handle_0
;
6724 TALLOC_CTX
*_mem_save_sec_handle_0
;
6725 if (flags
& NDR_IN
) {
6726 ZERO_STRUCT(r
->out
);
6728 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6729 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6731 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6732 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6733 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6734 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6735 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
6736 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6737 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
6738 ZERO_STRUCTP(r
->out
.sec_handle
);
6740 if (flags
& NDR_OUT
) {
6741 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6742 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
6744 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6745 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
6746 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
6747 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6748 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6750 return NDR_ERR_SUCCESS
;
6753 _PUBLIC_
void ndr_print_lsa_CreateSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateSecret
*r
)
6755 ndr_print_struct(ndr
, name
, "lsa_CreateSecret");
6757 if (flags
& NDR_SET_VALUES
) {
6758 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6760 if (flags
& NDR_IN
) {
6761 ndr_print_struct(ndr
, "in", "lsa_CreateSecret");
6763 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6765 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6767 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
6768 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
6771 if (flags
& NDR_OUT
) {
6772 ndr_print_struct(ndr
, "out", "lsa_CreateSecret");
6774 ndr_print_ptr(ndr
, "sec_handle", r
->out
.sec_handle
);
6776 ndr_print_policy_handle(ndr
, "sec_handle", r
->out
.sec_handle
);
6778 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6784 static enum ndr_err_code
ndr_push_lsa_OpenAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenAccount
*r
)
6786 if (flags
& NDR_IN
) {
6787 if (r
->in
.handle
== NULL
) {
6788 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6790 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6791 if (r
->in
.sid
== NULL
) {
6792 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6794 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6795 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6797 if (flags
& NDR_OUT
) {
6798 if (r
->out
.acct_handle
== NULL
) {
6799 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6801 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6802 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6804 return NDR_ERR_SUCCESS
;
6807 static enum ndr_err_code
ndr_pull_lsa_OpenAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenAccount
*r
)
6809 TALLOC_CTX
*_mem_save_handle_0
;
6810 TALLOC_CTX
*_mem_save_sid_0
;
6811 TALLOC_CTX
*_mem_save_acct_handle_0
;
6812 if (flags
& NDR_IN
) {
6813 ZERO_STRUCT(r
->out
);
6815 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6816 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6818 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6819 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6820 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6821 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6822 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6823 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
6825 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6826 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
6827 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6828 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
6829 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6830 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6831 ZERO_STRUCTP(r
->out
.acct_handle
);
6833 if (flags
& NDR_OUT
) {
6834 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6835 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6837 _mem_save_acct_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6838 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.acct_handle
, LIBNDR_FLAG_REF_ALLOC
);
6839 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6840 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_acct_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6841 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6843 return NDR_ERR_SUCCESS
;
6846 _PUBLIC_
void ndr_print_lsa_OpenAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenAccount
*r
)
6848 ndr_print_struct(ndr
, name
, "lsa_OpenAccount");
6850 if (flags
& NDR_SET_VALUES
) {
6851 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6853 if (flags
& NDR_IN
) {
6854 ndr_print_struct(ndr
, "in", "lsa_OpenAccount");
6856 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6858 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6860 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
6862 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
6864 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
6867 if (flags
& NDR_OUT
) {
6868 ndr_print_struct(ndr
, "out", "lsa_OpenAccount");
6870 ndr_print_ptr(ndr
, "acct_handle", r
->out
.acct_handle
);
6872 ndr_print_policy_handle(ndr
, "acct_handle", r
->out
.acct_handle
);
6874 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6880 static enum ndr_err_code
ndr_push_lsa_EnumPrivsAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumPrivsAccount
*r
)
6882 if (flags
& NDR_IN
) {
6883 if (r
->in
.handle
== NULL
) {
6884 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6886 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6888 if (flags
& NDR_OUT
) {
6889 if (r
->out
.privs
== NULL
) {
6890 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6892 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.privs
));
6893 if (*r
->out
.privs
) {
6894 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, *r
->out
.privs
));
6896 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6898 return NDR_ERR_SUCCESS
;
6901 static enum ndr_err_code
ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumPrivsAccount
*r
)
6903 uint32_t _ptr_privs
;
6904 TALLOC_CTX
*_mem_save_handle_0
;
6905 TALLOC_CTX
*_mem_save_privs_0
;
6906 TALLOC_CTX
*_mem_save_privs_1
;
6907 if (flags
& NDR_IN
) {
6908 ZERO_STRUCT(r
->out
);
6910 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6911 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6913 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6914 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6915 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6916 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6917 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
6918 ZERO_STRUCTP(r
->out
.privs
);
6920 if (flags
& NDR_OUT
) {
6921 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6922 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
6924 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6925 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.privs
, LIBNDR_FLAG_REF_ALLOC
);
6926 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
6928 NDR_PULL_ALLOC(ndr
, *r
->out
.privs
);
6930 *r
->out
.privs
= NULL
;
6932 if (*r
->out
.privs
) {
6933 _mem_save_privs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6934 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.privs
, 0);
6935 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, *r
->out
.privs
));
6936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_1
, 0);
6938 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
6939 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6941 return NDR_ERR_SUCCESS
;
6944 _PUBLIC_
void ndr_print_lsa_EnumPrivsAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumPrivsAccount
*r
)
6946 ndr_print_struct(ndr
, name
, "lsa_EnumPrivsAccount");
6948 if (flags
& NDR_SET_VALUES
) {
6949 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6951 if (flags
& NDR_IN
) {
6952 ndr_print_struct(ndr
, "in", "lsa_EnumPrivsAccount");
6954 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6956 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6960 if (flags
& NDR_OUT
) {
6961 ndr_print_struct(ndr
, "out", "lsa_EnumPrivsAccount");
6963 ndr_print_ptr(ndr
, "privs", r
->out
.privs
);
6965 ndr_print_ptr(ndr
, "privs", *r
->out
.privs
);
6967 if (*r
->out
.privs
) {
6968 ndr_print_lsa_PrivilegeSet(ndr
, "privs", *r
->out
.privs
);
6972 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6978 static enum ndr_err_code
ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_AddPrivilegesToAccount
*r
)
6980 if (flags
& NDR_IN
) {
6981 if (r
->in
.handle
== NULL
) {
6982 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6984 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6985 if (r
->in
.privs
== NULL
) {
6986 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6988 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
6990 if (flags
& NDR_OUT
) {
6991 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6993 return NDR_ERR_SUCCESS
;
6996 static enum ndr_err_code
ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_AddPrivilegesToAccount
*r
)
6998 TALLOC_CTX
*_mem_save_handle_0
;
6999 TALLOC_CTX
*_mem_save_privs_0
;
7000 if (flags
& NDR_IN
) {
7001 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7002 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7004 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7005 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7006 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7007 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7008 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7009 NDR_PULL_ALLOC(ndr
, r
->in
.privs
);
7011 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7012 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.privs
, LIBNDR_FLAG_REF_ALLOC
);
7013 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7014 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
7016 if (flags
& NDR_OUT
) {
7017 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7019 return NDR_ERR_SUCCESS
;
7022 _PUBLIC_
void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_AddPrivilegesToAccount
*r
)
7024 ndr_print_struct(ndr
, name
, "lsa_AddPrivilegesToAccount");
7026 if (flags
& NDR_SET_VALUES
) {
7027 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7029 if (flags
& NDR_IN
) {
7030 ndr_print_struct(ndr
, "in", "lsa_AddPrivilegesToAccount");
7032 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7034 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7036 ndr_print_ptr(ndr
, "privs", r
->in
.privs
);
7038 ndr_print_lsa_PrivilegeSet(ndr
, "privs", r
->in
.privs
);
7042 if (flags
& NDR_OUT
) {
7043 ndr_print_struct(ndr
, "out", "lsa_AddPrivilegesToAccount");
7045 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7051 static enum ndr_err_code
ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_RemovePrivilegesFromAccount
*r
)
7053 if (flags
& NDR_IN
) {
7054 if (r
->in
.handle
== NULL
) {
7055 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7057 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7058 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.remove_all
));
7059 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.privs
));
7061 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7064 if (flags
& NDR_OUT
) {
7065 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7067 return NDR_ERR_SUCCESS
;
7070 static enum ndr_err_code
ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_RemovePrivilegesFromAccount
*r
)
7072 uint32_t _ptr_privs
;
7073 TALLOC_CTX
*_mem_save_handle_0
;
7074 TALLOC_CTX
*_mem_save_privs_0
;
7075 if (flags
& NDR_IN
) {
7076 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7077 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7079 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7080 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7081 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7082 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7083 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.remove_all
));
7084 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
7086 NDR_PULL_ALLOC(ndr
, r
->in
.privs
);
7091 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7092 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.privs
, 0);
7093 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7094 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, 0);
7097 if (flags
& NDR_OUT
) {
7098 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7100 return NDR_ERR_SUCCESS
;
7103 _PUBLIC_
void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RemovePrivilegesFromAccount
*r
)
7105 ndr_print_struct(ndr
, name
, "lsa_RemovePrivilegesFromAccount");
7107 if (flags
& NDR_SET_VALUES
) {
7108 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7110 if (flags
& NDR_IN
) {
7111 ndr_print_struct(ndr
, "in", "lsa_RemovePrivilegesFromAccount");
7113 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7115 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7117 ndr_print_uint8(ndr
, "remove_all", r
->in
.remove_all
);
7118 ndr_print_ptr(ndr
, "privs", r
->in
.privs
);
7121 ndr_print_lsa_PrivilegeSet(ndr
, "privs", r
->in
.privs
);
7126 if (flags
& NDR_OUT
) {
7127 ndr_print_struct(ndr
, "out", "lsa_RemovePrivilegesFromAccount");
7129 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7135 static enum ndr_err_code
ndr_push_lsa_GetQuotasForAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_GetQuotasForAccount
*r
)
7137 if (flags
& NDR_IN
) {
7139 if (flags
& NDR_OUT
) {
7140 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7142 return NDR_ERR_SUCCESS
;
7145 static enum ndr_err_code
ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_GetQuotasForAccount
*r
)
7147 if (flags
& NDR_IN
) {
7149 if (flags
& NDR_OUT
) {
7150 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7152 return NDR_ERR_SUCCESS
;
7155 _PUBLIC_
void ndr_print_lsa_GetQuotasForAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetQuotasForAccount
*r
)
7157 ndr_print_struct(ndr
, name
, "lsa_GetQuotasForAccount");
7159 if (flags
& NDR_SET_VALUES
) {
7160 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7162 if (flags
& NDR_IN
) {
7163 ndr_print_struct(ndr
, "in", "lsa_GetQuotasForAccount");
7167 if (flags
& NDR_OUT
) {
7168 ndr_print_struct(ndr
, "out", "lsa_GetQuotasForAccount");
7170 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7176 static enum ndr_err_code
ndr_push_lsa_SetQuotasForAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_SetQuotasForAccount
*r
)
7178 if (flags
& NDR_IN
) {
7180 if (flags
& NDR_OUT
) {
7181 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7183 return NDR_ERR_SUCCESS
;
7186 static enum ndr_err_code
ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_SetQuotasForAccount
*r
)
7188 if (flags
& NDR_IN
) {
7190 if (flags
& NDR_OUT
) {
7191 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7193 return NDR_ERR_SUCCESS
;
7196 _PUBLIC_
void ndr_print_lsa_SetQuotasForAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetQuotasForAccount
*r
)
7198 ndr_print_struct(ndr
, name
, "lsa_SetQuotasForAccount");
7200 if (flags
& NDR_SET_VALUES
) {
7201 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7203 if (flags
& NDR_IN
) {
7204 ndr_print_struct(ndr
, "in", "lsa_SetQuotasForAccount");
7208 if (flags
& NDR_OUT
) {
7209 ndr_print_struct(ndr
, "out", "lsa_SetQuotasForAccount");
7211 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7217 static enum ndr_err_code
ndr_push_lsa_GetSystemAccessAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_GetSystemAccessAccount
*r
)
7219 if (flags
& NDR_IN
) {
7220 if (r
->in
.handle
== NULL
) {
7221 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7223 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7225 if (flags
& NDR_OUT
) {
7226 if (r
->out
.access_mask
== NULL
) {
7227 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7229 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.access_mask
));
7230 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7232 return NDR_ERR_SUCCESS
;
7235 static enum ndr_err_code
ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_GetSystemAccessAccount
*r
)
7237 TALLOC_CTX
*_mem_save_handle_0
;
7238 TALLOC_CTX
*_mem_save_access_mask_0
;
7239 if (flags
& NDR_IN
) {
7240 ZERO_STRUCT(r
->out
);
7242 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7243 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7245 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7246 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7247 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7248 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7249 NDR_PULL_ALLOC(ndr
, r
->out
.access_mask
);
7250 ZERO_STRUCTP(r
->out
.access_mask
);
7252 if (flags
& NDR_OUT
) {
7253 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7254 NDR_PULL_ALLOC(ndr
, r
->out
.access_mask
);
7256 _mem_save_access_mask_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7257 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.access_mask
, LIBNDR_FLAG_REF_ALLOC
);
7258 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.access_mask
));
7259 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_access_mask_0
, LIBNDR_FLAG_REF_ALLOC
);
7260 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7262 return NDR_ERR_SUCCESS
;
7265 _PUBLIC_
void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetSystemAccessAccount
*r
)
7267 ndr_print_struct(ndr
, name
, "lsa_GetSystemAccessAccount");
7269 if (flags
& NDR_SET_VALUES
) {
7270 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7272 if (flags
& NDR_IN
) {
7273 ndr_print_struct(ndr
, "in", "lsa_GetSystemAccessAccount");
7275 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7277 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7281 if (flags
& NDR_OUT
) {
7282 ndr_print_struct(ndr
, "out", "lsa_GetSystemAccessAccount");
7284 ndr_print_ptr(ndr
, "access_mask", r
->out
.access_mask
);
7286 ndr_print_uint32(ndr
, "access_mask", *r
->out
.access_mask
);
7288 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7294 static enum ndr_err_code
ndr_push_lsa_SetSystemAccessAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSystemAccessAccount
*r
)
7296 if (flags
& NDR_IN
) {
7297 if (r
->in
.handle
== NULL
) {
7298 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7300 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7301 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7303 if (flags
& NDR_OUT
) {
7304 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7306 return NDR_ERR_SUCCESS
;
7309 static enum ndr_err_code
ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSystemAccessAccount
*r
)
7311 TALLOC_CTX
*_mem_save_handle_0
;
7312 if (flags
& NDR_IN
) {
7313 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7314 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7316 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7317 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7318 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7319 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7320 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7322 if (flags
& NDR_OUT
) {
7323 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7325 return NDR_ERR_SUCCESS
;
7328 _PUBLIC_
void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSystemAccessAccount
*r
)
7330 ndr_print_struct(ndr
, name
, "lsa_SetSystemAccessAccount");
7332 if (flags
& NDR_SET_VALUES
) {
7333 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7335 if (flags
& NDR_IN
) {
7336 ndr_print_struct(ndr
, "in", "lsa_SetSystemAccessAccount");
7338 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7340 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7342 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
7345 if (flags
& NDR_OUT
) {
7346 ndr_print_struct(ndr
, "out", "lsa_SetSystemAccessAccount");
7348 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7354 static enum ndr_err_code
ndr_push_lsa_OpenTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenTrustedDomain
*r
)
7356 if (flags
& NDR_IN
) {
7357 if (r
->in
.handle
== NULL
) {
7358 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7360 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7361 if (r
->in
.sid
== NULL
) {
7362 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7364 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7365 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7367 if (flags
& NDR_OUT
) {
7368 if (r
->out
.trustdom_handle
== NULL
) {
7369 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7371 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
7372 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7374 return NDR_ERR_SUCCESS
;
7377 static enum ndr_err_code
ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenTrustedDomain
*r
)
7379 TALLOC_CTX
*_mem_save_handle_0
;
7380 TALLOC_CTX
*_mem_save_sid_0
;
7381 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7382 if (flags
& NDR_IN
) {
7383 ZERO_STRUCT(r
->out
);
7385 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7386 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7388 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7389 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7390 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7391 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7392 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7393 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
7395 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7396 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
7397 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7398 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
7399 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7400 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
7401 ZERO_STRUCTP(r
->out
.trustdom_handle
);
7403 if (flags
& NDR_OUT
) {
7404 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7405 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
7407 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7408 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7409 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
7410 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7411 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7413 return NDR_ERR_SUCCESS
;
7416 _PUBLIC_
void ndr_print_lsa_OpenTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenTrustedDomain
*r
)
7418 ndr_print_struct(ndr
, name
, "lsa_OpenTrustedDomain");
7420 if (flags
& NDR_SET_VALUES
) {
7421 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7423 if (flags
& NDR_IN
) {
7424 ndr_print_struct(ndr
, "in", "lsa_OpenTrustedDomain");
7426 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7428 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7430 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
7432 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
7434 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
7437 if (flags
& NDR_OUT
) {
7438 ndr_print_struct(ndr
, "out", "lsa_OpenTrustedDomain");
7440 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
7442 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
7444 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7450 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfo
*r
)
7452 if (flags
& NDR_IN
) {
7453 if (r
->in
.trustdom_handle
== NULL
) {
7454 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7456 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7457 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7459 if (flags
& NDR_OUT
) {
7460 if (r
->out
.info
== NULL
) {
7461 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7463 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
7465 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7466 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7468 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7470 return NDR_ERR_SUCCESS
;
7473 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfo
*r
)
7476 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7477 TALLOC_CTX
*_mem_save_info_0
;
7478 TALLOC_CTX
*_mem_save_info_1
;
7479 if (flags
& NDR_IN
) {
7480 ZERO_STRUCT(r
->out
);
7482 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7483 NDR_PULL_ALLOC(ndr
, r
->in
.trustdom_handle
);
7485 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7486 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7487 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7488 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7489 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7490 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7491 ZERO_STRUCTP(r
->out
.info
);
7493 if (flags
& NDR_OUT
) {
7494 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7495 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7497 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7498 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
7499 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
7501 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
7503 *r
->out
.info
= NULL
;
7506 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7507 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
7508 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7509 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7510 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
7512 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7513 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7515 return NDR_ERR_SUCCESS
;
7518 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfo
*r
)
7520 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfo");
7522 if (flags
& NDR_SET_VALUES
) {
7523 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7525 if (flags
& NDR_IN
) {
7526 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfo");
7528 ndr_print_ptr(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7530 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7532 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
7535 if (flags
& NDR_OUT
) {
7536 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfo");
7538 ndr_print_ptr(ndr
, "info", r
->out
.info
);
7540 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
7543 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
7544 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
7548 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7554 static enum ndr_err_code
ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInformationTrustedDomain
*r
)
7556 if (flags
& NDR_IN
) {
7557 if (r
->in
.trustdom_handle
== NULL
) {
7558 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7560 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7561 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7562 if (r
->in
.info
== NULL
) {
7563 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7565 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7566 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7568 if (flags
& NDR_OUT
) {
7569 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7571 return NDR_ERR_SUCCESS
;
7574 static enum ndr_err_code
ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInformationTrustedDomain
*r
)
7576 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7577 TALLOC_CTX
*_mem_save_info_0
;
7578 if (flags
& NDR_IN
) {
7579 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7580 NDR_PULL_ALLOC(ndr
, r
->in
.trustdom_handle
);
7582 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7583 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7584 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7585 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7586 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7587 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7588 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
7590 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7591 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
7592 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7593 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7594 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7596 if (flags
& NDR_OUT
) {
7597 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7599 return NDR_ERR_SUCCESS
;
7602 _PUBLIC_
void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInformationTrustedDomain
*r
)
7604 ndr_print_struct(ndr
, name
, "lsa_SetInformationTrustedDomain");
7606 if (flags
& NDR_SET_VALUES
) {
7607 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7609 if (flags
& NDR_IN
) {
7610 ndr_print_struct(ndr
, "in", "lsa_SetInformationTrustedDomain");
7612 ndr_print_ptr(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7614 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7616 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
7617 ndr_print_ptr(ndr
, "info", r
->in
.info
);
7619 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
7620 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
7624 if (flags
& NDR_OUT
) {
7625 ndr_print_struct(ndr
, "out", "lsa_SetInformationTrustedDomain");
7627 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7633 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenSecret
*r
)
7635 if (flags
& NDR_IN
) {
7636 if (r
->in
.handle
== NULL
) {
7637 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7639 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7640 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
7641 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7643 if (flags
& NDR_OUT
) {
7644 if (r
->out
.sec_handle
== NULL
) {
7645 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7647 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
7648 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7650 return NDR_ERR_SUCCESS
;
7653 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenSecret
*r
)
7655 TALLOC_CTX
*_mem_save_handle_0
;
7656 TALLOC_CTX
*_mem_save_sec_handle_0
;
7657 if (flags
& NDR_IN
) {
7658 ZERO_STRUCT(r
->out
);
7660 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7661 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7663 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7664 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7665 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7666 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7667 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
7668 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7669 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
7670 ZERO_STRUCTP(r
->out
.sec_handle
);
7672 if (flags
& NDR_OUT
) {
7673 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7674 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
7676 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7677 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
7678 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
7679 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7680 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7682 return NDR_ERR_SUCCESS
;
7685 _PUBLIC_
void ndr_print_lsa_OpenSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenSecret
*r
)
7687 ndr_print_struct(ndr
, name
, "lsa_OpenSecret");
7689 if (flags
& NDR_SET_VALUES
) {
7690 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7692 if (flags
& NDR_IN
) {
7693 ndr_print_struct(ndr
, "in", "lsa_OpenSecret");
7695 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7697 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7699 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
7700 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
7703 if (flags
& NDR_OUT
) {
7704 ndr_print_struct(ndr
, "out", "lsa_OpenSecret");
7706 ndr_print_ptr(ndr
, "sec_handle", r
->out
.sec_handle
);
7708 ndr_print_policy_handle(ndr
, "sec_handle", r
->out
.sec_handle
);
7710 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7716 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SetSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSecret
*r
)
7718 if (flags
& NDR_IN
) {
7719 if (r
->in
.sec_handle
== NULL
) {
7720 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7722 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7723 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_val
));
7724 if (r
->in
.new_val
) {
7725 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7727 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_val
));
7728 if (r
->in
.old_val
) {
7729 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7732 if (flags
& NDR_OUT
) {
7733 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7735 return NDR_ERR_SUCCESS
;
7738 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SetSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSecret
*r
)
7740 uint32_t _ptr_new_val
;
7741 uint32_t _ptr_old_val
;
7742 TALLOC_CTX
*_mem_save_sec_handle_0
;
7743 TALLOC_CTX
*_mem_save_new_val_0
;
7744 TALLOC_CTX
*_mem_save_old_val_0
;
7745 if (flags
& NDR_IN
) {
7746 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7747 NDR_PULL_ALLOC(ndr
, r
->in
.sec_handle
);
7749 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7750 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
7751 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7752 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7753 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
7755 NDR_PULL_ALLOC(ndr
, r
->in
.new_val
);
7757 r
->in
.new_val
= NULL
;
7759 if (r
->in
.new_val
) {
7760 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7761 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_val
, 0);
7762 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7763 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
7765 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
7767 NDR_PULL_ALLOC(ndr
, r
->in
.old_val
);
7769 r
->in
.old_val
= NULL
;
7771 if (r
->in
.old_val
) {
7772 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7773 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_val
, 0);
7774 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7775 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
7778 if (flags
& NDR_OUT
) {
7779 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7781 return NDR_ERR_SUCCESS
;
7784 _PUBLIC_
void ndr_print_lsa_SetSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSecret
*r
)
7786 ndr_print_struct(ndr
, name
, "lsa_SetSecret");
7788 if (flags
& NDR_SET_VALUES
) {
7789 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7791 if (flags
& NDR_IN
) {
7792 ndr_print_struct(ndr
, "in", "lsa_SetSecret");
7794 ndr_print_ptr(ndr
, "sec_handle", r
->in
.sec_handle
);
7796 ndr_print_policy_handle(ndr
, "sec_handle", r
->in
.sec_handle
);
7798 ndr_print_ptr(ndr
, "new_val", r
->in
.new_val
);
7800 if (r
->in
.new_val
) {
7801 ndr_print_lsa_DATA_BUF(ndr
, "new_val", r
->in
.new_val
);
7804 ndr_print_ptr(ndr
, "old_val", r
->in
.old_val
);
7806 if (r
->in
.old_val
) {
7807 ndr_print_lsa_DATA_BUF(ndr
, "old_val", r
->in
.old_val
);
7812 if (flags
& NDR_OUT
) {
7813 ndr_print_struct(ndr
, "out", "lsa_SetSecret");
7815 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7821 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_QuerySecret(struct ndr_push
*ndr
, int flags
, const struct lsa_QuerySecret
*r
)
7823 if (flags
& NDR_IN
) {
7824 if (r
->in
.sec_handle
== NULL
) {
7825 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7827 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7828 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_val
));
7829 if (r
->in
.new_val
) {
7830 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7832 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_mtime
));
7833 if (r
->in
.new_mtime
) {
7834 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->in
.new_mtime
));
7836 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_val
));
7837 if (r
->in
.old_val
) {
7838 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7840 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_mtime
));
7841 if (r
->in
.old_mtime
) {
7842 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->in
.old_mtime
));
7845 if (flags
& NDR_OUT
) {
7846 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.new_val
));
7847 if (r
->out
.new_val
) {
7848 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.new_val
));
7850 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.new_mtime
));
7851 if (r
->out
.new_mtime
) {
7852 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->out
.new_mtime
));
7854 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.old_val
));
7855 if (r
->out
.old_val
) {
7856 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.old_val
));
7858 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.old_mtime
));
7859 if (r
->out
.old_mtime
) {
7860 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->out
.old_mtime
));
7862 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7864 return NDR_ERR_SUCCESS
;
7867 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_QuerySecret(struct ndr_pull
*ndr
, int flags
, struct lsa_QuerySecret
*r
)
7869 uint32_t _ptr_new_val
;
7870 uint32_t _ptr_new_mtime
;
7871 uint32_t _ptr_old_val
;
7872 uint32_t _ptr_old_mtime
;
7873 TALLOC_CTX
*_mem_save_sec_handle_0
;
7874 TALLOC_CTX
*_mem_save_new_val_0
;
7875 TALLOC_CTX
*_mem_save_new_mtime_0
;
7876 TALLOC_CTX
*_mem_save_old_val_0
;
7877 TALLOC_CTX
*_mem_save_old_mtime_0
;
7878 if (flags
& NDR_IN
) {
7879 ZERO_STRUCT(r
->out
);
7881 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7882 NDR_PULL_ALLOC(ndr
, r
->in
.sec_handle
);
7884 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7885 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
7886 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7887 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7888 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
7890 NDR_PULL_ALLOC(ndr
, r
->in
.new_val
);
7892 r
->in
.new_val
= NULL
;
7894 if (r
->in
.new_val
) {
7895 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7896 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_val
, 0);
7897 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7898 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
7900 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_mtime
));
7901 if (_ptr_new_mtime
) {
7902 NDR_PULL_ALLOC(ndr
, r
->in
.new_mtime
);
7904 r
->in
.new_mtime
= NULL
;
7906 if (r
->in
.new_mtime
) {
7907 _mem_save_new_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7908 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_mtime
, 0);
7909 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->in
.new_mtime
));
7910 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_mtime_0
, 0);
7912 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
7914 NDR_PULL_ALLOC(ndr
, r
->in
.old_val
);
7916 r
->in
.old_val
= NULL
;
7918 if (r
->in
.old_val
) {
7919 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7920 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_val
, 0);
7921 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7922 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
7924 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_mtime
));
7925 if (_ptr_old_mtime
) {
7926 NDR_PULL_ALLOC(ndr
, r
->in
.old_mtime
);
7928 r
->in
.old_mtime
= NULL
;
7930 if (r
->in
.old_mtime
) {
7931 _mem_save_old_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7932 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_mtime
, 0);
7933 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->in
.old_mtime
));
7934 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_mtime_0
, 0);
7937 if (flags
& NDR_OUT
) {
7938 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
7940 NDR_PULL_ALLOC(ndr
, r
->out
.new_val
);
7942 r
->out
.new_val
= NULL
;
7944 if (r
->out
.new_val
) {
7945 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7946 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.new_val
, 0);
7947 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.new_val
));
7948 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
7950 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_mtime
));
7951 if (_ptr_new_mtime
) {
7952 NDR_PULL_ALLOC(ndr
, r
->out
.new_mtime
);
7954 r
->out
.new_mtime
= NULL
;
7956 if (r
->out
.new_mtime
) {
7957 _mem_save_new_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7958 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.new_mtime
, 0);
7959 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->out
.new_mtime
));
7960 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_mtime_0
, 0);
7962 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
7964 NDR_PULL_ALLOC(ndr
, r
->out
.old_val
);
7966 r
->out
.old_val
= NULL
;
7968 if (r
->out
.old_val
) {
7969 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7970 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.old_val
, 0);
7971 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.old_val
));
7972 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
7974 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_mtime
));
7975 if (_ptr_old_mtime
) {
7976 NDR_PULL_ALLOC(ndr
, r
->out
.old_mtime
);
7978 r
->out
.old_mtime
= NULL
;
7980 if (r
->out
.old_mtime
) {
7981 _mem_save_old_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7982 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.old_mtime
, 0);
7983 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->out
.old_mtime
));
7984 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_mtime_0
, 0);
7986 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7988 return NDR_ERR_SUCCESS
;
7991 _PUBLIC_
void ndr_print_lsa_QuerySecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QuerySecret
*r
)
7993 ndr_print_struct(ndr
, name
, "lsa_QuerySecret");
7995 if (flags
& NDR_SET_VALUES
) {
7996 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7998 if (flags
& NDR_IN
) {
7999 ndr_print_struct(ndr
, "in", "lsa_QuerySecret");
8001 ndr_print_ptr(ndr
, "sec_handle", r
->in
.sec_handle
);
8003 ndr_print_policy_handle(ndr
, "sec_handle", r
->in
.sec_handle
);
8005 ndr_print_ptr(ndr
, "new_val", r
->in
.new_val
);
8007 if (r
->in
.new_val
) {
8008 ndr_print_lsa_DATA_BUF_PTR(ndr
, "new_val", r
->in
.new_val
);
8011 ndr_print_ptr(ndr
, "new_mtime", r
->in
.new_mtime
);
8013 if (r
->in
.new_mtime
) {
8014 ndr_print_NTTIME_hyper(ndr
, "new_mtime", *r
->in
.new_mtime
);
8017 ndr_print_ptr(ndr
, "old_val", r
->in
.old_val
);
8019 if (r
->in
.old_val
) {
8020 ndr_print_lsa_DATA_BUF_PTR(ndr
, "old_val", r
->in
.old_val
);
8023 ndr_print_ptr(ndr
, "old_mtime", r
->in
.old_mtime
);
8025 if (r
->in
.old_mtime
) {
8026 ndr_print_NTTIME_hyper(ndr
, "old_mtime", *r
->in
.old_mtime
);
8031 if (flags
& NDR_OUT
) {
8032 ndr_print_struct(ndr
, "out", "lsa_QuerySecret");
8034 ndr_print_ptr(ndr
, "new_val", r
->out
.new_val
);
8036 if (r
->out
.new_val
) {
8037 ndr_print_lsa_DATA_BUF_PTR(ndr
, "new_val", r
->out
.new_val
);
8040 ndr_print_ptr(ndr
, "new_mtime", r
->out
.new_mtime
);
8042 if (r
->out
.new_mtime
) {
8043 ndr_print_NTTIME_hyper(ndr
, "new_mtime", *r
->out
.new_mtime
);
8046 ndr_print_ptr(ndr
, "old_val", r
->out
.old_val
);
8048 if (r
->out
.old_val
) {
8049 ndr_print_lsa_DATA_BUF_PTR(ndr
, "old_val", r
->out
.old_val
);
8052 ndr_print_ptr(ndr
, "old_mtime", r
->out
.old_mtime
);
8054 if (r
->out
.old_mtime
) {
8055 ndr_print_NTTIME_hyper(ndr
, "old_mtime", *r
->out
.old_mtime
);
8058 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8064 static enum ndr_err_code
ndr_push_lsa_LookupPrivValue(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivValue
*r
)
8066 if (flags
& NDR_IN
) {
8067 if (r
->in
.handle
== NULL
) {
8068 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8070 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8071 if (r
->in
.name
== NULL
) {
8072 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8074 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8076 if (flags
& NDR_OUT
) {
8077 if (r
->out
.luid
== NULL
) {
8078 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8080 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, r
->out
.luid
));
8081 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8083 return NDR_ERR_SUCCESS
;
8086 static enum ndr_err_code
ndr_pull_lsa_LookupPrivValue(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivValue
*r
)
8088 TALLOC_CTX
*_mem_save_handle_0
;
8089 TALLOC_CTX
*_mem_save_name_0
;
8090 TALLOC_CTX
*_mem_save_luid_0
;
8091 if (flags
& NDR_IN
) {
8092 ZERO_STRUCT(r
->out
);
8094 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8095 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8097 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8098 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8099 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8100 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8101 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8102 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8104 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8105 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
8106 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8107 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8108 NDR_PULL_ALLOC(ndr
, r
->out
.luid
);
8109 ZERO_STRUCTP(r
->out
.luid
);
8111 if (flags
& NDR_OUT
) {
8112 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8113 NDR_PULL_ALLOC(ndr
, r
->out
.luid
);
8115 _mem_save_luid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8116 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.luid
, LIBNDR_FLAG_REF_ALLOC
);
8117 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, r
->out
.luid
));
8118 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_luid_0
, LIBNDR_FLAG_REF_ALLOC
);
8119 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8121 return NDR_ERR_SUCCESS
;
8124 _PUBLIC_
void ndr_print_lsa_LookupPrivValue(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivValue
*r
)
8126 ndr_print_struct(ndr
, name
, "lsa_LookupPrivValue");
8128 if (flags
& NDR_SET_VALUES
) {
8129 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8131 if (flags
& NDR_IN
) {
8132 ndr_print_struct(ndr
, "in", "lsa_LookupPrivValue");
8134 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8136 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8138 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8140 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8144 if (flags
& NDR_OUT
) {
8145 ndr_print_struct(ndr
, "out", "lsa_LookupPrivValue");
8147 ndr_print_ptr(ndr
, "luid", r
->out
.luid
);
8149 ndr_print_lsa_LUID(ndr
, "luid", r
->out
.luid
);
8151 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8157 static enum ndr_err_code
ndr_push_lsa_LookupPrivName(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivName
*r
)
8159 if (flags
& NDR_IN
) {
8160 if (r
->in
.handle
== NULL
) {
8161 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8163 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8164 if (r
->in
.luid
== NULL
) {
8165 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8167 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, r
->in
.luid
));
8169 if (flags
& NDR_OUT
) {
8170 if (r
->out
.name
== NULL
) {
8171 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8173 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.name
));
8175 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.name
));
8177 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8179 return NDR_ERR_SUCCESS
;
8182 static enum ndr_err_code
ndr_pull_lsa_LookupPrivName(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivName
*r
)
8185 TALLOC_CTX
*_mem_save_handle_0
;
8186 TALLOC_CTX
*_mem_save_luid_0
;
8187 TALLOC_CTX
*_mem_save_name_0
;
8188 TALLOC_CTX
*_mem_save_name_1
;
8189 if (flags
& NDR_IN
) {
8190 ZERO_STRUCT(r
->out
);
8192 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8193 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8195 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8196 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8197 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8198 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8199 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8200 NDR_PULL_ALLOC(ndr
, r
->in
.luid
);
8202 _mem_save_luid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8203 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.luid
, LIBNDR_FLAG_REF_ALLOC
);
8204 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, r
->in
.luid
));
8205 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_luid_0
, LIBNDR_FLAG_REF_ALLOC
);
8206 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
8207 ZERO_STRUCTP(r
->out
.name
);
8209 if (flags
& NDR_OUT
) {
8210 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8211 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
8213 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8214 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.name
, LIBNDR_FLAG_REF_ALLOC
);
8215 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
8217 NDR_PULL_ALLOC(ndr
, *r
->out
.name
);
8219 *r
->out
.name
= NULL
;
8222 _mem_save_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8223 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.name
, 0);
8224 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.name
));
8225 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_1
, 0);
8227 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8228 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8230 return NDR_ERR_SUCCESS
;
8233 _PUBLIC_
void ndr_print_lsa_LookupPrivName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivName
*r
)
8235 ndr_print_struct(ndr
, name
, "lsa_LookupPrivName");
8237 if (flags
& NDR_SET_VALUES
) {
8238 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8240 if (flags
& NDR_IN
) {
8241 ndr_print_struct(ndr
, "in", "lsa_LookupPrivName");
8243 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8245 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8247 ndr_print_ptr(ndr
, "luid", r
->in
.luid
);
8249 ndr_print_lsa_LUID(ndr
, "luid", r
->in
.luid
);
8253 if (flags
& NDR_OUT
) {
8254 ndr_print_struct(ndr
, "out", "lsa_LookupPrivName");
8256 ndr_print_ptr(ndr
, "name", r
->out
.name
);
8258 ndr_print_ptr(ndr
, "name", *r
->out
.name
);
8261 ndr_print_lsa_StringLarge(ndr
, "name", *r
->out
.name
);
8265 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8271 static enum ndr_err_code
ndr_push_lsa_LookupPrivDisplayName(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivDisplayName
*r
)
8273 if (flags
& NDR_IN
) {
8274 if (r
->in
.handle
== NULL
) {
8275 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8277 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8278 if (r
->in
.name
== NULL
) {
8279 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8281 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8282 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.language_id
));
8283 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.language_id_sys
));
8285 if (flags
& NDR_OUT
) {
8286 if (r
->out
.disp_name
== NULL
) {
8287 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8289 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.disp_name
));
8290 if (*r
->out
.disp_name
) {
8291 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.disp_name
));
8293 if (r
->out
.returned_language_id
== NULL
) {
8294 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8296 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->out
.returned_language_id
));
8297 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8299 return NDR_ERR_SUCCESS
;
8302 static enum ndr_err_code
ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivDisplayName
*r
)
8304 uint32_t _ptr_disp_name
;
8305 TALLOC_CTX
*_mem_save_handle_0
;
8306 TALLOC_CTX
*_mem_save_name_0
;
8307 TALLOC_CTX
*_mem_save_disp_name_0
;
8308 TALLOC_CTX
*_mem_save_disp_name_1
;
8309 TALLOC_CTX
*_mem_save_returned_language_id_0
;
8310 if (flags
& NDR_IN
) {
8311 ZERO_STRUCT(r
->out
);
8313 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8314 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8316 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8317 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8318 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8319 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8320 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8321 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8323 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8324 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
8325 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8326 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8327 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.language_id
));
8328 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.language_id_sys
));
8329 NDR_PULL_ALLOC(ndr
, r
->out
.disp_name
);
8330 ZERO_STRUCTP(r
->out
.disp_name
);
8331 NDR_PULL_ALLOC(ndr
, r
->out
.returned_language_id
);
8332 ZERO_STRUCTP(r
->out
.returned_language_id
);
8334 if (flags
& NDR_OUT
) {
8335 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8336 NDR_PULL_ALLOC(ndr
, r
->out
.disp_name
);
8338 _mem_save_disp_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8339 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.disp_name
, LIBNDR_FLAG_REF_ALLOC
);
8340 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_disp_name
));
8341 if (_ptr_disp_name
) {
8342 NDR_PULL_ALLOC(ndr
, *r
->out
.disp_name
);
8344 *r
->out
.disp_name
= NULL
;
8346 if (*r
->out
.disp_name
) {
8347 _mem_save_disp_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8348 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.disp_name
, 0);
8349 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.disp_name
));
8350 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_disp_name_1
, 0);
8352 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_disp_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8353 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8354 NDR_PULL_ALLOC(ndr
, r
->out
.returned_language_id
);
8356 _mem_save_returned_language_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8357 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_language_id
, LIBNDR_FLAG_REF_ALLOC
);
8358 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->out
.returned_language_id
));
8359 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_language_id_0
, LIBNDR_FLAG_REF_ALLOC
);
8360 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8362 return NDR_ERR_SUCCESS
;
8365 _PUBLIC_
void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivDisplayName
*r
)
8367 ndr_print_struct(ndr
, name
, "lsa_LookupPrivDisplayName");
8369 if (flags
& NDR_SET_VALUES
) {
8370 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8372 if (flags
& NDR_IN
) {
8373 ndr_print_struct(ndr
, "in", "lsa_LookupPrivDisplayName");
8375 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8377 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8379 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8381 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8383 ndr_print_uint16(ndr
, "language_id", r
->in
.language_id
);
8384 ndr_print_uint16(ndr
, "language_id_sys", r
->in
.language_id_sys
);
8387 if (flags
& NDR_OUT
) {
8388 ndr_print_struct(ndr
, "out", "lsa_LookupPrivDisplayName");
8390 ndr_print_ptr(ndr
, "disp_name", r
->out
.disp_name
);
8392 ndr_print_ptr(ndr
, "disp_name", *r
->out
.disp_name
);
8394 if (*r
->out
.disp_name
) {
8395 ndr_print_lsa_StringLarge(ndr
, "disp_name", *r
->out
.disp_name
);
8399 ndr_print_ptr(ndr
, "returned_language_id", r
->out
.returned_language_id
);
8401 ndr_print_uint16(ndr
, "returned_language_id", *r
->out
.returned_language_id
);
8403 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8409 static enum ndr_err_code
ndr_push_lsa_DeleteObject(struct ndr_push
*ndr
, int flags
, const struct lsa_DeleteObject
*r
)
8411 if (flags
& NDR_IN
) {
8412 if (r
->in
.handle
== NULL
) {
8413 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8415 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8417 if (flags
& NDR_OUT
) {
8418 if (r
->out
.handle
== NULL
) {
8419 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8421 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
8422 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8424 return NDR_ERR_SUCCESS
;
8427 static enum ndr_err_code
ndr_pull_lsa_DeleteObject(struct ndr_pull
*ndr
, int flags
, struct lsa_DeleteObject
*r
)
8429 TALLOC_CTX
*_mem_save_handle_0
;
8430 if (flags
& NDR_IN
) {
8431 ZERO_STRUCT(r
->out
);
8433 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8434 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8436 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8437 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8438 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8439 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8440 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
8441 *r
->out
.handle
= *r
->in
.handle
;
8443 if (flags
& NDR_OUT
) {
8444 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8445 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
8447 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8448 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8449 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
8450 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8451 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8453 return NDR_ERR_SUCCESS
;
8456 _PUBLIC_
void ndr_print_lsa_DeleteObject(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_DeleteObject
*r
)
8458 ndr_print_struct(ndr
, name
, "lsa_DeleteObject");
8460 if (flags
& NDR_SET_VALUES
) {
8461 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8463 if (flags
& NDR_IN
) {
8464 ndr_print_struct(ndr
, "in", "lsa_DeleteObject");
8466 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8468 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8472 if (flags
& NDR_OUT
) {
8473 ndr_print_struct(ndr
, "out", "lsa_DeleteObject");
8475 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
8477 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
8479 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8485 static enum ndr_err_code
ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccountsWithUserRight
*r
)
8487 if (flags
& NDR_IN
) {
8488 if (r
->in
.handle
== NULL
) {
8489 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8491 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8492 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.name
));
8494 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8497 if (flags
& NDR_OUT
) {
8498 if (r
->out
.sids
== NULL
) {
8499 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8501 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8502 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8504 return NDR_ERR_SUCCESS
;
8507 static enum ndr_err_code
ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccountsWithUserRight
*r
)
8510 TALLOC_CTX
*_mem_save_handle_0
;
8511 TALLOC_CTX
*_mem_save_name_0
;
8512 TALLOC_CTX
*_mem_save_sids_0
;
8513 if (flags
& NDR_IN
) {
8514 ZERO_STRUCT(r
->out
);
8516 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8517 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8519 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8520 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8521 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8522 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8523 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
8525 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8530 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8531 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, 0);
8532 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8533 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
8535 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8536 ZERO_STRUCTP(r
->out
.sids
);
8538 if (flags
& NDR_OUT
) {
8539 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8540 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8542 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8543 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
8544 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8545 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
8546 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8548 return NDR_ERR_SUCCESS
;
8551 _PUBLIC_
void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccountsWithUserRight
*r
)
8553 ndr_print_struct(ndr
, name
, "lsa_EnumAccountsWithUserRight");
8555 if (flags
& NDR_SET_VALUES
) {
8556 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8558 if (flags
& NDR_IN
) {
8559 ndr_print_struct(ndr
, "in", "lsa_EnumAccountsWithUserRight");
8561 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8563 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8565 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8568 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8573 if (flags
& NDR_OUT
) {
8574 ndr_print_struct(ndr
, "out", "lsa_EnumAccountsWithUserRight");
8576 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
8578 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
8580 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8586 static enum ndr_err_code
ndr_push_lsa_EnumAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccountRights
*r
)
8588 if (flags
& NDR_IN
) {
8589 if (r
->in
.handle
== NULL
) {
8590 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8592 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8593 if (r
->in
.sid
== NULL
) {
8594 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8596 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8598 if (flags
& NDR_OUT
) {
8599 if (r
->out
.rights
== NULL
) {
8600 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8602 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rights
));
8603 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8605 return NDR_ERR_SUCCESS
;
8608 static enum ndr_err_code
ndr_pull_lsa_EnumAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccountRights
*r
)
8610 TALLOC_CTX
*_mem_save_handle_0
;
8611 TALLOC_CTX
*_mem_save_sid_0
;
8612 TALLOC_CTX
*_mem_save_rights_0
;
8613 if (flags
& NDR_IN
) {
8614 ZERO_STRUCT(r
->out
);
8616 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8617 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8619 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8620 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8621 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8622 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8623 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8624 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8626 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8627 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8628 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8629 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8630 NDR_PULL_ALLOC(ndr
, r
->out
.rights
);
8631 ZERO_STRUCTP(r
->out
.rights
);
8633 if (flags
& NDR_OUT
) {
8634 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8635 NDR_PULL_ALLOC(ndr
, r
->out
.rights
);
8637 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8638 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8639 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rights
));
8640 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8641 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8643 return NDR_ERR_SUCCESS
;
8646 _PUBLIC_
void ndr_print_lsa_EnumAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccountRights
*r
)
8648 ndr_print_struct(ndr
, name
, "lsa_EnumAccountRights");
8650 if (flags
& NDR_SET_VALUES
) {
8651 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8653 if (flags
& NDR_IN
) {
8654 ndr_print_struct(ndr
, "in", "lsa_EnumAccountRights");
8656 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8658 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8660 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8662 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8666 if (flags
& NDR_OUT
) {
8667 ndr_print_struct(ndr
, "out", "lsa_EnumAccountRights");
8669 ndr_print_ptr(ndr
, "rights", r
->out
.rights
);
8671 ndr_print_lsa_RightSet(ndr
, "rights", r
->out
.rights
);
8673 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8679 static enum ndr_err_code
ndr_push_lsa_AddAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_AddAccountRights
*r
)
8681 if (flags
& NDR_IN
) {
8682 if (r
->in
.handle
== NULL
) {
8683 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8685 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8686 if (r
->in
.sid
== NULL
) {
8687 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8689 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8690 if (r
->in
.rights
== NULL
) {
8691 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8693 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8695 if (flags
& NDR_OUT
) {
8696 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8698 return NDR_ERR_SUCCESS
;
8701 static enum ndr_err_code
ndr_pull_lsa_AddAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_AddAccountRights
*r
)
8703 TALLOC_CTX
*_mem_save_handle_0
;
8704 TALLOC_CTX
*_mem_save_sid_0
;
8705 TALLOC_CTX
*_mem_save_rights_0
;
8706 if (flags
& NDR_IN
) {
8707 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8708 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8710 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8711 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8712 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8713 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8714 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8715 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8717 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8718 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8719 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8720 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8721 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8722 NDR_PULL_ALLOC(ndr
, r
->in
.rights
);
8724 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8725 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8726 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8727 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8729 if (flags
& NDR_OUT
) {
8730 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8732 return NDR_ERR_SUCCESS
;
8735 _PUBLIC_
void ndr_print_lsa_AddAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_AddAccountRights
*r
)
8737 ndr_print_struct(ndr
, name
, "lsa_AddAccountRights");
8739 if (flags
& NDR_SET_VALUES
) {
8740 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8742 if (flags
& NDR_IN
) {
8743 ndr_print_struct(ndr
, "in", "lsa_AddAccountRights");
8745 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8747 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8749 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8751 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8753 ndr_print_ptr(ndr
, "rights", r
->in
.rights
);
8755 ndr_print_lsa_RightSet(ndr
, "rights", r
->in
.rights
);
8759 if (flags
& NDR_OUT
) {
8760 ndr_print_struct(ndr
, "out", "lsa_AddAccountRights");
8762 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8768 static enum ndr_err_code
ndr_push_lsa_RemoveAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_RemoveAccountRights
*r
)
8770 if (flags
& NDR_IN
) {
8771 if (r
->in
.handle
== NULL
) {
8772 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8774 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8775 if (r
->in
.sid
== NULL
) {
8776 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8778 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8779 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.remove_all
));
8780 if (r
->in
.rights
== NULL
) {
8781 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8783 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8785 if (flags
& NDR_OUT
) {
8786 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8788 return NDR_ERR_SUCCESS
;
8791 static enum ndr_err_code
ndr_pull_lsa_RemoveAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_RemoveAccountRights
*r
)
8793 TALLOC_CTX
*_mem_save_handle_0
;
8794 TALLOC_CTX
*_mem_save_sid_0
;
8795 TALLOC_CTX
*_mem_save_rights_0
;
8796 if (flags
& NDR_IN
) {
8797 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8798 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8800 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8801 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8802 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8803 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8804 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8805 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8807 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8808 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8809 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8810 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8811 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.remove_all
));
8812 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8813 NDR_PULL_ALLOC(ndr
, r
->in
.rights
);
8815 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8816 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8817 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8818 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8820 if (flags
& NDR_OUT
) {
8821 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8823 return NDR_ERR_SUCCESS
;
8826 _PUBLIC_
void ndr_print_lsa_RemoveAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RemoveAccountRights
*r
)
8828 ndr_print_struct(ndr
, name
, "lsa_RemoveAccountRights");
8830 if (flags
& NDR_SET_VALUES
) {
8831 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8833 if (flags
& NDR_IN
) {
8834 ndr_print_struct(ndr
, "in", "lsa_RemoveAccountRights");
8836 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8838 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8840 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8842 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8844 ndr_print_uint8(ndr
, "remove_all", r
->in
.remove_all
);
8845 ndr_print_ptr(ndr
, "rights", r
->in
.rights
);
8847 ndr_print_lsa_RightSet(ndr
, "rights", r
->in
.rights
);
8851 if (flags
& NDR_OUT
) {
8852 ndr_print_struct(ndr
, "out", "lsa_RemoveAccountRights");
8854 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8860 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfoBySid
*r
)
8862 if (flags
& NDR_IN
) {
8863 if (r
->in
.handle
== NULL
) {
8864 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8866 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8867 if (r
->in
.dom_sid
== NULL
) {
8868 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8870 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
8871 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
8873 if (flags
& NDR_OUT
) {
8874 if (r
->out
.info
== NULL
) {
8875 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8877 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
8879 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
8880 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
8882 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8884 return NDR_ERR_SUCCESS
;
8887 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfoBySid
*r
)
8890 TALLOC_CTX
*_mem_save_handle_0
;
8891 TALLOC_CTX
*_mem_save_dom_sid_0
;
8892 TALLOC_CTX
*_mem_save_info_0
;
8893 TALLOC_CTX
*_mem_save_info_1
;
8894 if (flags
& NDR_IN
) {
8895 ZERO_STRUCT(r
->out
);
8897 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8898 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8900 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8901 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8902 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8903 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8904 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8905 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
8907 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8908 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
8909 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
8910 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8911 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
8912 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8913 ZERO_STRUCTP(r
->out
.info
);
8915 if (flags
& NDR_OUT
) {
8916 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8917 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8919 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8920 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
8921 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
8923 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
8925 *r
->out
.info
= NULL
;
8928 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8929 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
8930 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
8931 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
8932 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
8934 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
8935 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8937 return NDR_ERR_SUCCESS
;
8940 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfoBySid
*r
)
8942 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfoBySid");
8944 if (flags
& NDR_SET_VALUES
) {
8945 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8947 if (flags
& NDR_IN
) {
8948 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfoBySid");
8950 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8952 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8954 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
8956 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
8958 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
8961 if (flags
& NDR_OUT
) {
8962 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfoBySid");
8964 ndr_print_ptr(ndr
, "info", r
->out
.info
);
8966 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
8969 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
8970 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
8974 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8980 static enum ndr_err_code
ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push
*ndr
, int flags
, const struct lsa_SetTrustedDomainInfo
*r
)
8982 if (flags
& NDR_IN
) {
8983 if (r
->in
.handle
== NULL
) {
8984 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8986 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8987 if (r
->in
.dom_sid
== NULL
) {
8988 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8990 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
8991 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
8992 if (r
->in
.info
== NULL
) {
8993 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8995 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
8996 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
8998 if (flags
& NDR_OUT
) {
8999 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9001 return NDR_ERR_SUCCESS
;
9004 static enum ndr_err_code
ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull
*ndr
, int flags
, struct lsa_SetTrustedDomainInfo
*r
)
9006 TALLOC_CTX
*_mem_save_handle_0
;
9007 TALLOC_CTX
*_mem_save_dom_sid_0
;
9008 TALLOC_CTX
*_mem_save_info_0
;
9009 if (flags
& NDR_IN
) {
9010 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9011 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9013 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9014 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9015 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9016 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9017 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9018 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9020 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9021 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9022 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9023 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9024 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9025 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9026 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
9028 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9029 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
9030 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9031 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9032 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9034 if (flags
& NDR_OUT
) {
9035 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9037 return NDR_ERR_SUCCESS
;
9040 _PUBLIC_
void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetTrustedDomainInfo
*r
)
9042 ndr_print_struct(ndr
, name
, "lsa_SetTrustedDomainInfo");
9044 if (flags
& NDR_SET_VALUES
) {
9045 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9047 if (flags
& NDR_IN
) {
9048 ndr_print_struct(ndr
, "in", "lsa_SetTrustedDomainInfo");
9050 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9052 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9054 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9056 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9058 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
9059 ndr_print_ptr(ndr
, "info", r
->in
.info
);
9061 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
9062 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
9066 if (flags
& NDR_OUT
) {
9067 ndr_print_struct(ndr
, "out", "lsa_SetTrustedDomainInfo");
9069 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9075 static enum ndr_err_code
ndr_push_lsa_DeleteTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_DeleteTrustedDomain
*r
)
9077 if (flags
& NDR_IN
) {
9078 if (r
->in
.handle
== NULL
) {
9079 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9081 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9082 if (r
->in
.dom_sid
== NULL
) {
9083 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9085 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9087 if (flags
& NDR_OUT
) {
9088 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9090 return NDR_ERR_SUCCESS
;
9093 static enum ndr_err_code
ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_DeleteTrustedDomain
*r
)
9095 TALLOC_CTX
*_mem_save_handle_0
;
9096 TALLOC_CTX
*_mem_save_dom_sid_0
;
9097 if (flags
& NDR_IN
) {
9098 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9099 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9101 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9102 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9103 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9104 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9105 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9106 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9108 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9109 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9110 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9111 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9113 if (flags
& NDR_OUT
) {
9114 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9116 return NDR_ERR_SUCCESS
;
9119 _PUBLIC_
void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_DeleteTrustedDomain
*r
)
9121 ndr_print_struct(ndr
, name
, "lsa_DeleteTrustedDomain");
9123 if (flags
& NDR_SET_VALUES
) {
9124 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9126 if (flags
& NDR_IN
) {
9127 ndr_print_struct(ndr
, "in", "lsa_DeleteTrustedDomain");
9129 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9131 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9133 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9135 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9139 if (flags
& NDR_OUT
) {
9140 ndr_print_struct(ndr
, "out", "lsa_DeleteTrustedDomain");
9142 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9148 static enum ndr_err_code
ndr_push_lsa_StorePrivateData(struct ndr_push
*ndr
, int flags
, const struct lsa_StorePrivateData
*r
)
9150 if (flags
& NDR_IN
) {
9152 if (flags
& NDR_OUT
) {
9153 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9155 return NDR_ERR_SUCCESS
;
9158 static enum ndr_err_code
ndr_pull_lsa_StorePrivateData(struct ndr_pull
*ndr
, int flags
, struct lsa_StorePrivateData
*r
)
9160 if (flags
& NDR_IN
) {
9162 if (flags
& NDR_OUT
) {
9163 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9165 return NDR_ERR_SUCCESS
;
9168 _PUBLIC_
void ndr_print_lsa_StorePrivateData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_StorePrivateData
*r
)
9170 ndr_print_struct(ndr
, name
, "lsa_StorePrivateData");
9172 if (flags
& NDR_SET_VALUES
) {
9173 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9175 if (flags
& NDR_IN
) {
9176 ndr_print_struct(ndr
, "in", "lsa_StorePrivateData");
9180 if (flags
& NDR_OUT
) {
9181 ndr_print_struct(ndr
, "out", "lsa_StorePrivateData");
9183 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9189 static enum ndr_err_code
ndr_push_lsa_RetrievePrivateData(struct ndr_push
*ndr
, int flags
, const struct lsa_RetrievePrivateData
*r
)
9191 if (flags
& NDR_IN
) {
9193 if (flags
& NDR_OUT
) {
9194 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9196 return NDR_ERR_SUCCESS
;
9199 static enum ndr_err_code
ndr_pull_lsa_RetrievePrivateData(struct ndr_pull
*ndr
, int flags
, struct lsa_RetrievePrivateData
*r
)
9201 if (flags
& NDR_IN
) {
9203 if (flags
& NDR_OUT
) {
9204 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9206 return NDR_ERR_SUCCESS
;
9209 _PUBLIC_
void ndr_print_lsa_RetrievePrivateData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RetrievePrivateData
*r
)
9211 ndr_print_struct(ndr
, name
, "lsa_RetrievePrivateData");
9213 if (flags
& NDR_SET_VALUES
) {
9214 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9216 if (flags
& NDR_IN
) {
9217 ndr_print_struct(ndr
, "in", "lsa_RetrievePrivateData");
9221 if (flags
& NDR_OUT
) {
9222 ndr_print_struct(ndr
, "out", "lsa_RetrievePrivateData");
9224 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9230 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenPolicy2
*r
)
9232 if (flags
& NDR_IN
) {
9233 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
9234 if (r
->in
.system_name
) {
9235 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9236 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9237 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9238 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9240 if (r
->in
.attr
== NULL
) {
9241 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9243 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
9244 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
9246 if (flags
& NDR_OUT
) {
9247 if (r
->out
.handle
== NULL
) {
9248 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9250 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
9251 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9253 return NDR_ERR_SUCCESS
;
9256 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenPolicy2
*r
)
9258 uint32_t _ptr_system_name
;
9259 TALLOC_CTX
*_mem_save_system_name_0
;
9260 TALLOC_CTX
*_mem_save_attr_0
;
9261 TALLOC_CTX
*_mem_save_handle_0
;
9262 if (flags
& NDR_IN
) {
9263 ZERO_STRUCT(r
->out
);
9265 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
9266 if (_ptr_system_name
) {
9267 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
9269 r
->in
.system_name
= NULL
;
9271 if (r
->in
.system_name
) {
9272 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9273 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
9274 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
9275 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
9276 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
9277 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.system_name
), ndr_get_array_length(ndr
, &r
->in
.system_name
));
9279 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
9280 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t), CH_UTF16
));
9281 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
9283 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9284 NDR_PULL_ALLOC(ndr
, r
->in
.attr
);
9286 _mem_save_attr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9287 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.attr
, LIBNDR_FLAG_REF_ALLOC
);
9288 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
9289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attr_0
, LIBNDR_FLAG_REF_ALLOC
);
9290 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
9291 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
9292 ZERO_STRUCTP(r
->out
.handle
);
9294 if (flags
& NDR_OUT
) {
9295 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9296 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
9298 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9299 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9300 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
9301 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9302 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9304 return NDR_ERR_SUCCESS
;
9307 _PUBLIC_
void ndr_print_lsa_OpenPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenPolicy2
*r
)
9309 ndr_print_struct(ndr
, name
, "lsa_OpenPolicy2");
9311 if (flags
& NDR_SET_VALUES
) {
9312 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9314 if (flags
& NDR_IN
) {
9315 ndr_print_struct(ndr
, "in", "lsa_OpenPolicy2");
9317 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
9319 if (r
->in
.system_name
) {
9320 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
9323 ndr_print_ptr(ndr
, "attr", r
->in
.attr
);
9325 ndr_print_lsa_ObjectAttribute(ndr
, "attr", r
->in
.attr
);
9327 ndr_print_lsa_PolicyAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
9330 if (flags
& NDR_OUT
) {
9331 ndr_print_struct(ndr
, "out", "lsa_OpenPolicy2");
9333 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
9335 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
9337 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9343 static enum ndr_err_code
ndr_push_lsa_GetUserName(struct ndr_push
*ndr
, int flags
, const struct lsa_GetUserName
*r
)
9345 if (flags
& NDR_IN
) {
9346 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
9347 if (r
->in
.system_name
) {
9348 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9349 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9350 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9351 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9353 if (r
->in
.account_name
== NULL
) {
9354 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9356 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.account_name
));
9357 if (*r
->in
.account_name
) {
9358 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.account_name
));
9360 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.authority_name
));
9361 if (r
->in
.authority_name
) {
9362 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.authority_name
));
9363 if (*r
->in
.authority_name
) {
9364 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.authority_name
));
9368 if (flags
& NDR_OUT
) {
9369 if (r
->out
.account_name
== NULL
) {
9370 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9372 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.account_name
));
9373 if (*r
->out
.account_name
) {
9374 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.account_name
));
9376 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.authority_name
));
9377 if (r
->out
.authority_name
) {
9378 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.authority_name
));
9379 if (*r
->out
.authority_name
) {
9380 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.authority_name
));
9383 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9385 return NDR_ERR_SUCCESS
;
9388 static enum ndr_err_code
ndr_pull_lsa_GetUserName(struct ndr_pull
*ndr
, int flags
, struct lsa_GetUserName
*r
)
9390 uint32_t _ptr_system_name
;
9391 uint32_t _ptr_account_name
;
9392 uint32_t _ptr_authority_name
;
9393 TALLOC_CTX
*_mem_save_system_name_0
;
9394 TALLOC_CTX
*_mem_save_account_name_0
;
9395 TALLOC_CTX
*_mem_save_account_name_1
;
9396 TALLOC_CTX
*_mem_save_authority_name_0
;
9397 TALLOC_CTX
*_mem_save_authority_name_1
;
9398 if (flags
& NDR_IN
) {
9399 ZERO_STRUCT(r
->out
);
9401 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
9402 if (_ptr_system_name
) {
9403 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
9405 r
->in
.system_name
= NULL
;
9407 if (r
->in
.system_name
) {
9408 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9409 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
9410 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
9411 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
9412 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
9413 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.system_name
), ndr_get_array_length(ndr
, &r
->in
.system_name
));
9415 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
9416 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t), CH_UTF16
));
9417 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
9419 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9420 NDR_PULL_ALLOC(ndr
, r
->in
.account_name
);
9422 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9423 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
9424 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
9425 if (_ptr_account_name
) {
9426 NDR_PULL_ALLOC(ndr
, *r
->in
.account_name
);
9428 *r
->in
.account_name
= NULL
;
9430 if (*r
->in
.account_name
) {
9431 _mem_save_account_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9432 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.account_name
, 0);
9433 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.account_name
));
9434 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_1
, 0);
9436 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9437 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9438 if (_ptr_authority_name
) {
9439 NDR_PULL_ALLOC(ndr
, r
->in
.authority_name
);
9441 r
->in
.authority_name
= NULL
;
9443 if (r
->in
.authority_name
) {
9444 _mem_save_authority_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9445 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.authority_name
, 0);
9446 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9447 if (_ptr_authority_name
) {
9448 NDR_PULL_ALLOC(ndr
, *r
->in
.authority_name
);
9450 *r
->in
.authority_name
= NULL
;
9452 if (*r
->in
.authority_name
) {
9453 _mem_save_authority_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9454 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.authority_name
, 0);
9455 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.authority_name
));
9456 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_1
, 0);
9458 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_0
, 0);
9460 NDR_PULL_ALLOC(ndr
, r
->out
.account_name
);
9461 *r
->out
.account_name
= *r
->in
.account_name
;
9463 if (flags
& NDR_OUT
) {
9464 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9465 NDR_PULL_ALLOC(ndr
, r
->out
.account_name
);
9467 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9468 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
9469 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
9470 if (_ptr_account_name
) {
9471 NDR_PULL_ALLOC(ndr
, *r
->out
.account_name
);
9473 *r
->out
.account_name
= NULL
;
9475 if (*r
->out
.account_name
) {
9476 _mem_save_account_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9477 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.account_name
, 0);
9478 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.account_name
));
9479 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_1
, 0);
9481 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9482 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9483 if (_ptr_authority_name
) {
9484 NDR_PULL_ALLOC(ndr
, r
->out
.authority_name
);
9486 r
->out
.authority_name
= NULL
;
9488 if (r
->out
.authority_name
) {
9489 _mem_save_authority_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9490 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.authority_name
, 0);
9491 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9492 if (_ptr_authority_name
) {
9493 NDR_PULL_ALLOC(ndr
, *r
->out
.authority_name
);
9495 *r
->out
.authority_name
= NULL
;
9497 if (*r
->out
.authority_name
) {
9498 _mem_save_authority_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9499 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.authority_name
, 0);
9500 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.authority_name
));
9501 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_1
, 0);
9503 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_0
, 0);
9505 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9507 return NDR_ERR_SUCCESS
;
9510 _PUBLIC_
void ndr_print_lsa_GetUserName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetUserName
*r
)
9512 ndr_print_struct(ndr
, name
, "lsa_GetUserName");
9514 if (flags
& NDR_SET_VALUES
) {
9515 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9517 if (flags
& NDR_IN
) {
9518 ndr_print_struct(ndr
, "in", "lsa_GetUserName");
9520 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
9522 if (r
->in
.system_name
) {
9523 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
9526 ndr_print_ptr(ndr
, "account_name", r
->in
.account_name
);
9528 ndr_print_ptr(ndr
, "account_name", *r
->in
.account_name
);
9530 if (*r
->in
.account_name
) {
9531 ndr_print_lsa_String(ndr
, "account_name", *r
->in
.account_name
);
9535 ndr_print_ptr(ndr
, "authority_name", r
->in
.authority_name
);
9537 if (r
->in
.authority_name
) {
9538 ndr_print_ptr(ndr
, "authority_name", *r
->in
.authority_name
);
9540 if (*r
->in
.authority_name
) {
9541 ndr_print_lsa_String(ndr
, "authority_name", *r
->in
.authority_name
);
9548 if (flags
& NDR_OUT
) {
9549 ndr_print_struct(ndr
, "out", "lsa_GetUserName");
9551 ndr_print_ptr(ndr
, "account_name", r
->out
.account_name
);
9553 ndr_print_ptr(ndr
, "account_name", *r
->out
.account_name
);
9555 if (*r
->out
.account_name
) {
9556 ndr_print_lsa_String(ndr
, "account_name", *r
->out
.account_name
);
9560 ndr_print_ptr(ndr
, "authority_name", r
->out
.authority_name
);
9562 if (r
->out
.authority_name
) {
9563 ndr_print_ptr(ndr
, "authority_name", *r
->out
.authority_name
);
9565 if (*r
->out
.authority_name
) {
9566 ndr_print_lsa_String(ndr
, "authority_name", *r
->out
.authority_name
);
9571 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9577 static enum ndr_err_code
ndr_push_lsa_QueryInfoPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryInfoPolicy2
*r
)
9579 if (flags
& NDR_IN
) {
9580 if (r
->in
.handle
== NULL
) {
9581 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9583 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9584 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
9586 if (flags
& NDR_OUT
) {
9587 if (r
->out
.info
== NULL
) {
9588 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9590 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9592 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9593 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9595 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9597 return NDR_ERR_SUCCESS
;
9600 static enum ndr_err_code
ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryInfoPolicy2
*r
)
9603 TALLOC_CTX
*_mem_save_handle_0
;
9604 TALLOC_CTX
*_mem_save_info_0
;
9605 TALLOC_CTX
*_mem_save_info_1
;
9606 if (flags
& NDR_IN
) {
9607 ZERO_STRUCT(r
->out
);
9609 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9610 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9612 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9613 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9614 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9615 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9616 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
9617 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9618 ZERO_STRUCTP(r
->out
.info
);
9620 if (flags
& NDR_OUT
) {
9621 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9622 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9624 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9625 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9626 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9628 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9630 *r
->out
.info
= NULL
;
9633 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9634 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9635 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9636 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9637 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9639 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9640 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9642 return NDR_ERR_SUCCESS
;
9645 _PUBLIC_
void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryInfoPolicy2
*r
)
9647 ndr_print_struct(ndr
, name
, "lsa_QueryInfoPolicy2");
9649 if (flags
& NDR_SET_VALUES
) {
9650 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9652 if (flags
& NDR_IN
) {
9653 ndr_print_struct(ndr
, "in", "lsa_QueryInfoPolicy2");
9655 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9657 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9659 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
9662 if (flags
& NDR_OUT
) {
9663 ndr_print_struct(ndr
, "out", "lsa_QueryInfoPolicy2");
9665 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9667 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
9670 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
9671 ndr_print_lsa_PolicyInformation(ndr
, "info", *r
->out
.info
);
9675 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9681 static enum ndr_err_code
ndr_push_lsa_SetInfoPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInfoPolicy2
*r
)
9683 if (flags
& NDR_IN
) {
9684 if (r
->in
.handle
== NULL
) {
9685 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9687 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9688 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
9689 if (r
->in
.info
== NULL
) {
9690 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9692 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9693 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9695 if (flags
& NDR_OUT
) {
9696 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9698 return NDR_ERR_SUCCESS
;
9701 static enum ndr_err_code
ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInfoPolicy2
*r
)
9703 TALLOC_CTX
*_mem_save_handle_0
;
9704 TALLOC_CTX
*_mem_save_info_0
;
9705 if (flags
& NDR_IN
) {
9706 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9707 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9709 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9710 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9711 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9712 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9713 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
9714 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9715 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
9717 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9718 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
9719 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9720 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9721 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9723 if (flags
& NDR_OUT
) {
9724 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9726 return NDR_ERR_SUCCESS
;
9729 _PUBLIC_
void ndr_print_lsa_SetInfoPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInfoPolicy2
*r
)
9731 ndr_print_struct(ndr
, name
, "lsa_SetInfoPolicy2");
9733 if (flags
& NDR_SET_VALUES
) {
9734 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9736 if (flags
& NDR_IN
) {
9737 ndr_print_struct(ndr
, "in", "lsa_SetInfoPolicy2");
9739 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9741 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9743 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
9744 ndr_print_ptr(ndr
, "info", r
->in
.info
);
9746 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
9747 ndr_print_lsa_PolicyInformation(ndr
, "info", r
->in
.info
);
9751 if (flags
& NDR_OUT
) {
9752 ndr_print_struct(ndr
, "out", "lsa_SetInfoPolicy2");
9754 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9760 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfoByName
*r
)
9762 if (flags
& NDR_IN
) {
9763 if (r
->in
.handle
== NULL
) {
9764 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9766 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9767 if (r
->in
.trusted_domain
== NULL
) {
9768 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9770 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain
));
9771 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
9773 if (flags
& NDR_OUT
) {
9774 if (r
->out
.info
== NULL
) {
9775 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9777 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9779 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9780 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9782 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9784 return NDR_ERR_SUCCESS
;
9787 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfoByName
*r
)
9790 TALLOC_CTX
*_mem_save_handle_0
;
9791 TALLOC_CTX
*_mem_save_trusted_domain_0
;
9792 TALLOC_CTX
*_mem_save_info_0
;
9793 TALLOC_CTX
*_mem_save_info_1
;
9794 if (flags
& NDR_IN
) {
9795 ZERO_STRUCT(r
->out
);
9797 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9798 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9800 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9801 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9802 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9803 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9804 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9805 NDR_PULL_ALLOC(ndr
, r
->in
.trusted_domain
);
9807 _mem_save_trusted_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9808 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trusted_domain
, LIBNDR_FLAG_REF_ALLOC
);
9809 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain
));
9810 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_0
, LIBNDR_FLAG_REF_ALLOC
);
9811 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9812 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9813 ZERO_STRUCTP(r
->out
.info
);
9815 if (flags
& NDR_OUT
) {
9816 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9817 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9819 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9820 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9821 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9823 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9825 *r
->out
.info
= NULL
;
9828 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9829 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9830 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9831 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9832 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9834 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9835 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9837 return NDR_ERR_SUCCESS
;
9840 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfoByName
*r
)
9842 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfoByName");
9844 if (flags
& NDR_SET_VALUES
) {
9845 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9847 if (flags
& NDR_IN
) {
9848 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfoByName");
9850 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9852 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9854 ndr_print_ptr(ndr
, "trusted_domain", r
->in
.trusted_domain
);
9856 ndr_print_lsa_String(ndr
, "trusted_domain", r
->in
.trusted_domain
);
9858 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
9861 if (flags
& NDR_OUT
) {
9862 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfoByName");
9864 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9866 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
9869 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
9870 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
9874 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9880 static enum ndr_err_code
ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push
*ndr
, int flags
, const struct lsa_SetTrustedDomainInfoByName
*r
)
9882 if (flags
& NDR_IN
) {
9883 if (r
->in
.handle
== NULL
) {
9884 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9886 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9887 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.trusted_domain
));
9888 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
9889 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
9891 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9892 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9895 if (flags
& NDR_OUT
) {
9896 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9898 return NDR_ERR_SUCCESS
;
9901 static enum ndr_err_code
ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull
*ndr
, int flags
, struct lsa_SetTrustedDomainInfoByName
*r
)
9904 TALLOC_CTX
*_mem_save_handle_0
;
9905 TALLOC_CTX
*_mem_save_info_0
;
9906 if (flags
& NDR_IN
) {
9907 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9908 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9910 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9911 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9912 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9913 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9914 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.trusted_domain
));
9915 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9916 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9918 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
9923 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9924 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
9925 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9926 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9927 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
9930 if (flags
& NDR_OUT
) {
9931 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9933 return NDR_ERR_SUCCESS
;
9936 _PUBLIC_
void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetTrustedDomainInfoByName
*r
)
9938 ndr_print_struct(ndr
, name
, "lsa_SetTrustedDomainInfoByName");
9940 if (flags
& NDR_SET_VALUES
) {
9941 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9943 if (flags
& NDR_IN
) {
9944 ndr_print_struct(ndr
, "in", "lsa_SetTrustedDomainInfoByName");
9946 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9948 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9950 ndr_print_lsa_String(ndr
, "trusted_domain", &r
->in
.trusted_domain
);
9951 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
9952 ndr_print_ptr(ndr
, "info", r
->in
.info
);
9955 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
9956 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
9961 if (flags
& NDR_OUT
) {
9962 ndr_print_struct(ndr
, "out", "lsa_SetTrustedDomainInfoByName");
9964 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9970 static enum ndr_err_code
ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumTrustedDomainsEx
*r
)
9972 if (flags
& NDR_IN
) {
9973 if (r
->in
.handle
== NULL
) {
9974 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9976 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9977 if (r
->in
.resume_handle
== NULL
) {
9978 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9980 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
9981 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
9983 if (flags
& NDR_OUT
) {
9984 if (r
->out
.resume_handle
== NULL
) {
9985 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9987 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
9988 if (r
->out
.domains
== NULL
) {
9989 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9991 NDR_CHECK(ndr_push_lsa_DomainListEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
9992 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9994 return NDR_ERR_SUCCESS
;
9997 static enum ndr_err_code
ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumTrustedDomainsEx
*r
)
9999 TALLOC_CTX
*_mem_save_handle_0
;
10000 TALLOC_CTX
*_mem_save_resume_handle_0
;
10001 TALLOC_CTX
*_mem_save_domains_0
;
10002 if (flags
& NDR_IN
) {
10003 ZERO_STRUCT(r
->out
);
10005 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10006 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10008 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10009 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10010 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10011 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10012 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10013 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
10015 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10016 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
10017 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
10018 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10019 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
10020 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
10021 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
10022 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10023 ZERO_STRUCTP(r
->out
.domains
);
10025 if (flags
& NDR_OUT
) {
10026 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10027 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
10029 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10030 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
10031 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
10032 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10033 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10034 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10036 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10037 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
10038 NDR_CHECK(ndr_pull_lsa_DomainListEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
10039 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
10040 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10042 return NDR_ERR_SUCCESS
;
10045 _PUBLIC_
void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumTrustedDomainsEx
*r
)
10047 ndr_print_struct(ndr
, name
, "lsa_EnumTrustedDomainsEx");
10049 if (flags
& NDR_SET_VALUES
) {
10050 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10052 if (flags
& NDR_IN
) {
10053 ndr_print_struct(ndr
, "in", "lsa_EnumTrustedDomainsEx");
10055 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10057 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10059 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
10061 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
10063 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
10066 if (flags
& NDR_OUT
) {
10067 ndr_print_struct(ndr
, "out", "lsa_EnumTrustedDomainsEx");
10069 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
10071 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
10073 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
10075 ndr_print_lsa_DomainListEx(ndr
, "domains", r
->out
.domains
);
10077 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10083 static enum ndr_err_code
ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomainEx
*r
)
10085 if (flags
& NDR_IN
) {
10086 if (r
->in
.policy_handle
== NULL
) {
10087 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10089 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
10090 if (r
->in
.info
== NULL
) {
10091 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10093 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10094 if (r
->in
.auth_info
== NULL
) {
10095 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10097 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
10098 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10100 if (flags
& NDR_OUT
) {
10101 if (r
->out
.trustdom_handle
== NULL
) {
10102 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10104 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10105 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10107 return NDR_ERR_SUCCESS
;
10110 static enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomainEx
*r
)
10112 TALLOC_CTX
*_mem_save_policy_handle_0
;
10113 TALLOC_CTX
*_mem_save_info_0
;
10114 TALLOC_CTX
*_mem_save_auth_info_0
;
10115 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
10116 if (flags
& NDR_IN
) {
10117 ZERO_STRUCT(r
->out
);
10119 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10120 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
10122 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10123 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
10124 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
10125 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10126 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10127 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10129 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10130 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
10131 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10132 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10133 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10134 NDR_PULL_ALLOC(ndr
, r
->in
.auth_info
);
10136 _mem_save_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10137 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.auth_info
, LIBNDR_FLAG_REF_ALLOC
);
10138 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
10139 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_auth_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10140 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10141 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10142 ZERO_STRUCTP(r
->out
.trustdom_handle
);
10144 if (flags
& NDR_OUT
) {
10145 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10146 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10148 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10149 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
10150 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10151 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10152 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10154 return NDR_ERR_SUCCESS
;
10157 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomainEx
*r
)
10159 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomainEx");
10161 if (flags
& NDR_SET_VALUES
) {
10162 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10164 if (flags
& NDR_IN
) {
10165 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomainEx");
10167 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
10169 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
10171 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10173 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info", r
->in
.info
);
10175 ndr_print_ptr(ndr
, "auth_info", r
->in
.auth_info
);
10177 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", r
->in
.auth_info
);
10179 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
10182 if (flags
& NDR_OUT
) {
10183 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomainEx");
10185 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10187 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10189 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10195 static enum ndr_err_code
ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push
*ndr
, int flags
, const struct lsa_CloseTrustedDomainEx
*r
)
10197 if (flags
& NDR_IN
) {
10198 if (r
->in
.handle
== NULL
) {
10199 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10201 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10203 if (flags
& NDR_OUT
) {
10204 if (r
->out
.handle
== NULL
) {
10205 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10207 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
10208 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10210 return NDR_ERR_SUCCESS
;
10213 static enum ndr_err_code
ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull
*ndr
, int flags
, struct lsa_CloseTrustedDomainEx
*r
)
10215 TALLOC_CTX
*_mem_save_handle_0
;
10216 if (flags
& NDR_IN
) {
10217 ZERO_STRUCT(r
->out
);
10219 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10220 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10222 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10223 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10224 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10225 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10226 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
10227 *r
->out
.handle
= *r
->in
.handle
;
10229 if (flags
& NDR_OUT
) {
10230 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10231 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
10233 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10234 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10235 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
10236 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10237 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10239 return NDR_ERR_SUCCESS
;
10242 _PUBLIC_
void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CloseTrustedDomainEx
*r
)
10244 ndr_print_struct(ndr
, name
, "lsa_CloseTrustedDomainEx");
10246 if (flags
& NDR_SET_VALUES
) {
10247 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10249 if (flags
& NDR_IN
) {
10250 ndr_print_struct(ndr
, "in", "lsa_CloseTrustedDomainEx");
10252 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10254 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10258 if (flags
& NDR_OUT
) {
10259 ndr_print_struct(ndr
, "out", "lsa_CloseTrustedDomainEx");
10261 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
10263 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
10265 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10271 static enum ndr_err_code
ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryDomainInformationPolicy
*r
)
10273 if (flags
& NDR_IN
) {
10274 if (r
->in
.handle
== NULL
) {
10275 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10277 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10278 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10280 if (flags
& NDR_OUT
) {
10281 if (r
->out
.info
== NULL
) {
10282 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10284 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
10285 if (*r
->out
.info
) {
10286 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10287 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10289 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10291 return NDR_ERR_SUCCESS
;
10294 static enum ndr_err_code
ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryDomainInformationPolicy
*r
)
10296 uint32_t _ptr_info
;
10297 TALLOC_CTX
*_mem_save_handle_0
;
10298 TALLOC_CTX
*_mem_save_info_0
;
10299 TALLOC_CTX
*_mem_save_info_1
;
10300 if (flags
& NDR_IN
) {
10301 ZERO_STRUCT(r
->out
);
10303 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10304 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10306 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10307 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10308 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10309 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10310 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10311 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10312 ZERO_STRUCTP(r
->out
.info
);
10314 if (flags
& NDR_OUT
) {
10315 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10316 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10318 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10319 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10320 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10322 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10324 *r
->out
.info
= NULL
;
10326 if (*r
->out
.info
) {
10327 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10328 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10329 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10330 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10331 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10333 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10334 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10336 return NDR_ERR_SUCCESS
;
10339 _PUBLIC_
void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryDomainInformationPolicy
*r
)
10341 ndr_print_struct(ndr
, name
, "lsa_QueryDomainInformationPolicy");
10343 if (flags
& NDR_SET_VALUES
) {
10344 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10346 if (flags
& NDR_IN
) {
10347 ndr_print_struct(ndr
, "in", "lsa_QueryDomainInformationPolicy");
10349 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10351 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10353 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10356 if (flags
& NDR_OUT
) {
10357 ndr_print_struct(ndr
, "out", "lsa_QueryDomainInformationPolicy");
10359 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10361 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10363 if (*r
->out
.info
) {
10364 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10365 ndr_print_lsa_DomainInformationPolicy(ndr
, "info", *r
->out
.info
);
10369 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10375 static enum ndr_err_code
ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_SetDomainInformationPolicy
*r
)
10377 if (flags
& NDR_IN
) {
10378 if (r
->in
.handle
== NULL
) {
10379 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10381 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10382 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10383 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
10385 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10386 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10389 if (flags
& NDR_OUT
) {
10390 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10392 return NDR_ERR_SUCCESS
;
10395 static enum ndr_err_code
ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_SetDomainInformationPolicy
*r
)
10397 uint32_t _ptr_info
;
10398 TALLOC_CTX
*_mem_save_handle_0
;
10399 TALLOC_CTX
*_mem_save_info_0
;
10400 if (flags
& NDR_IN
) {
10401 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10402 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10404 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10405 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10406 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10407 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10408 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10409 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10411 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10416 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10417 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
10418 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10419 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10420 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
10423 if (flags
& NDR_OUT
) {
10424 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10426 return NDR_ERR_SUCCESS
;
10429 _PUBLIC_
void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetDomainInformationPolicy
*r
)
10431 ndr_print_struct(ndr
, name
, "lsa_SetDomainInformationPolicy");
10433 if (flags
& NDR_SET_VALUES
) {
10434 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10436 if (flags
& NDR_IN
) {
10437 ndr_print_struct(ndr
, "in", "lsa_SetDomainInformationPolicy");
10439 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10441 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10443 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10444 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10447 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
10448 ndr_print_lsa_DomainInformationPolicy(ndr
, "info", r
->in
.info
);
10453 if (flags
& NDR_OUT
) {
10454 ndr_print_struct(ndr
, "out", "lsa_SetDomainInformationPolicy");
10456 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10462 static enum ndr_err_code
ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenTrustedDomainByName
*r
)
10464 if (flags
& NDR_IN
) {
10465 if (r
->in
.handle
== NULL
) {
10466 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10468 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10469 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
10470 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10472 if (flags
& NDR_OUT
) {
10473 if (r
->out
.trustdom_handle
== NULL
) {
10474 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10476 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10477 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10479 return NDR_ERR_SUCCESS
;
10482 static enum ndr_err_code
ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenTrustedDomainByName
*r
)
10484 TALLOC_CTX
*_mem_save_handle_0
;
10485 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
10486 if (flags
& NDR_IN
) {
10487 ZERO_STRUCT(r
->out
);
10489 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10490 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10492 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10493 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10494 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10495 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10496 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
10497 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10498 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10499 ZERO_STRUCTP(r
->out
.trustdom_handle
);
10501 if (flags
& NDR_OUT
) {
10502 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10503 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10505 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10506 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
10507 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10508 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10509 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10511 return NDR_ERR_SUCCESS
;
10514 _PUBLIC_
void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenTrustedDomainByName
*r
)
10516 ndr_print_struct(ndr
, name
, "lsa_OpenTrustedDomainByName");
10518 if (flags
& NDR_SET_VALUES
) {
10519 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10521 if (flags
& NDR_IN
) {
10522 ndr_print_struct(ndr
, "in", "lsa_OpenTrustedDomainByName");
10524 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10526 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10528 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
10529 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
10532 if (flags
& NDR_OUT
) {
10533 ndr_print_struct(ndr
, "out", "lsa_OpenTrustedDomainByName");
10535 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10537 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10539 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10545 static enum ndr_err_code
ndr_push_lsa_TestCall(struct ndr_push
*ndr
, int flags
, const struct lsa_TestCall
*r
)
10547 if (flags
& NDR_IN
) {
10549 if (flags
& NDR_OUT
) {
10550 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10552 return NDR_ERR_SUCCESS
;
10555 static enum ndr_err_code
ndr_pull_lsa_TestCall(struct ndr_pull
*ndr
, int flags
, struct lsa_TestCall
*r
)
10557 if (flags
& NDR_IN
) {
10559 if (flags
& NDR_OUT
) {
10560 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10562 return NDR_ERR_SUCCESS
;
10565 _PUBLIC_
void ndr_print_lsa_TestCall(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_TestCall
*r
)
10567 ndr_print_struct(ndr
, name
, "lsa_TestCall");
10569 if (flags
& NDR_SET_VALUES
) {
10570 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10572 if (flags
& NDR_IN
) {
10573 ndr_print_struct(ndr
, "in", "lsa_TestCall");
10577 if (flags
& NDR_OUT
) {
10578 ndr_print_struct(ndr
, "out", "lsa_TestCall");
10580 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10586 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids2(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids2
*r
)
10588 if (flags
& NDR_IN
) {
10589 if (r
->in
.handle
== NULL
) {
10590 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10592 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10593 if (r
->in
.sids
== NULL
) {
10594 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10596 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10597 if (r
->in
.names
== NULL
) {
10598 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10600 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
10601 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10602 if (r
->in
.count
== NULL
) {
10603 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10605 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
10606 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
10607 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
10609 if (flags
& NDR_OUT
) {
10610 if (r
->out
.domains
== NULL
) {
10611 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10613 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
10614 if (*r
->out
.domains
) {
10615 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
10617 if (r
->out
.names
== NULL
) {
10618 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10620 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
10621 if (r
->out
.count
== NULL
) {
10622 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10624 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
10625 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10627 return NDR_ERR_SUCCESS
;
10630 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids2(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids2
*r
)
10632 uint32_t _ptr_domains
;
10633 TALLOC_CTX
*_mem_save_handle_0
;
10634 TALLOC_CTX
*_mem_save_sids_0
;
10635 TALLOC_CTX
*_mem_save_domains_0
;
10636 TALLOC_CTX
*_mem_save_domains_1
;
10637 TALLOC_CTX
*_mem_save_names_0
;
10638 TALLOC_CTX
*_mem_save_count_0
;
10639 if (flags
& NDR_IN
) {
10640 ZERO_STRUCT(r
->out
);
10642 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10643 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10645 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10646 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10647 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10648 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10649 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10650 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
10652 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10653 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
10654 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10655 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
10656 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10657 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
10659 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10660 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
10661 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
10662 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
10663 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10664 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10665 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
10667 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10668 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
10669 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
10670 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
10671 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
10672 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
10673 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10674 ZERO_STRUCTP(r
->out
.domains
);
10675 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
10676 *r
->out
.names
= *r
->in
.names
;
10677 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
10678 *r
->out
.count
= *r
->in
.count
;
10680 if (flags
& NDR_OUT
) {
10681 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10682 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10684 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10685 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
10686 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
10687 if (_ptr_domains
) {
10688 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
10690 *r
->out
.domains
= NULL
;
10692 if (*r
->out
.domains
) {
10693 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10694 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
10695 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
10696 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
10698 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
10699 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10700 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
10702 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10703 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
10704 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
10705 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
10706 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10707 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
10709 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10710 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
10711 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
10712 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
10713 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10715 return NDR_ERR_SUCCESS
;
10718 _PUBLIC_
void ndr_print_lsa_LookupSids2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids2
*r
)
10720 ndr_print_struct(ndr
, name
, "lsa_LookupSids2");
10722 if (flags
& NDR_SET_VALUES
) {
10723 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10725 if (flags
& NDR_IN
) {
10726 ndr_print_struct(ndr
, "in", "lsa_LookupSids2");
10728 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10730 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10732 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
10734 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
10736 ndr_print_ptr(ndr
, "names", r
->in
.names
);
10738 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->in
.names
);
10740 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10741 ndr_print_ptr(ndr
, "count", r
->in
.count
);
10743 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
10745 ndr_print_uint32(ndr
, "unknown1", r
->in
.unknown1
);
10746 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
10749 if (flags
& NDR_OUT
) {
10750 ndr_print_struct(ndr
, "out", "lsa_LookupSids2");
10752 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
10754 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
10756 if (*r
->out
.domains
) {
10757 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
10761 ndr_print_ptr(ndr
, "names", r
->out
.names
);
10763 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->out
.names
);
10765 ndr_print_ptr(ndr
, "count", r
->out
.count
);
10767 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
10769 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10775 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames2(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames2
*r
)
10777 uint32_t cntr_names_0
;
10778 if (flags
& NDR_IN
) {
10779 if (r
->in
.handle
== NULL
) {
10780 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10782 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10783 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
10784 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
10785 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
10786 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
10788 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
10789 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
10791 if (r
->in
.sids
== NULL
) {
10792 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10794 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10795 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
10796 if (r
->in
.count
== NULL
) {
10797 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10799 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
10800 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
10801 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
10803 if (flags
& NDR_OUT
) {
10804 if (r
->out
.domains
== NULL
) {
10805 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10807 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
10808 if (*r
->out
.domains
) {
10809 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
10811 if (r
->out
.sids
== NULL
) {
10812 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10814 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
10815 if (r
->out
.count
== NULL
) {
10816 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10818 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
10819 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10821 return NDR_ERR_SUCCESS
;
10824 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames2(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames2
*r
)
10826 uint32_t cntr_names_0
;
10827 uint32_t _ptr_domains
;
10828 TALLOC_CTX
*_mem_save_handle_0
;
10829 TALLOC_CTX
*_mem_save_names_0
;
10830 TALLOC_CTX
*_mem_save_domains_0
;
10831 TALLOC_CTX
*_mem_save_domains_1
;
10832 TALLOC_CTX
*_mem_save_sids_0
;
10833 TALLOC_CTX
*_mem_save_count_0
;
10834 if (flags
& NDR_IN
) {
10835 ZERO_STRUCT(r
->out
);
10837 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10838 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10840 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10841 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10842 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10843 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10844 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
10845 if (r
->in
.num_names
> 1000) {
10846 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
10848 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
10849 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
10850 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10851 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
10852 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
10853 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
10855 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
10856 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
10858 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
10859 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10860 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
10862 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10863 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
10864 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10865 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
10866 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
10867 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10868 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
10870 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10871 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
10872 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
10873 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
10874 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
10875 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
10876 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10877 ZERO_STRUCTP(r
->out
.domains
);
10878 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
10879 *r
->out
.sids
= *r
->in
.sids
;
10880 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
10881 *r
->out
.count
= *r
->in
.count
;
10883 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
10886 if (flags
& NDR_OUT
) {
10887 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10888 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10890 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10891 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
10892 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
10893 if (_ptr_domains
) {
10894 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
10896 *r
->out
.domains
= NULL
;
10898 if (*r
->out
.domains
) {
10899 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10900 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
10901 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
10902 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
10904 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
10905 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10906 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
10908 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10909 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
10910 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
10911 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
10912 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10913 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
10915 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10916 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
10917 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
10918 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
10919 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10921 return NDR_ERR_SUCCESS
;
10924 _PUBLIC_
void ndr_print_lsa_LookupNames2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames2
*r
)
10926 uint32_t cntr_names_0
;
10927 ndr_print_struct(ndr
, name
, "lsa_LookupNames2");
10929 if (flags
& NDR_SET_VALUES
) {
10930 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10932 if (flags
& NDR_IN
) {
10933 ndr_print_struct(ndr
, "in", "lsa_LookupNames2");
10935 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10937 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10939 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
10940 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
10942 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
10944 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
10945 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
10950 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
10952 ndr_print_lsa_TransSidArray2(ndr
, "sids", r
->in
.sids
);
10954 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
10955 ndr_print_ptr(ndr
, "count", r
->in
.count
);
10957 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
10959 ndr_print_uint32(ndr
, "lookup_options", r
->in
.lookup_options
);
10960 ndr_print_uint32(ndr
, "client_revision", r
->in
.client_revision
);
10963 if (flags
& NDR_OUT
) {
10964 ndr_print_struct(ndr
, "out", "lsa_LookupNames2");
10966 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
10968 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
10970 if (*r
->out
.domains
) {
10971 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
10975 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
10977 ndr_print_lsa_TransSidArray2(ndr
, "sids", r
->out
.sids
);
10979 ndr_print_ptr(ndr
, "count", r
->out
.count
);
10981 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
10983 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10989 static enum ndr_err_code
ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomainEx2
*r
)
10991 if (flags
& NDR_IN
) {
10992 if (r
->in
.policy_handle
== NULL
) {
10993 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10995 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
10996 if (r
->in
.info
== NULL
) {
10997 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10999 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11000 if (r
->in
.auth_info
== NULL
) {
11001 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11003 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
11004 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11006 if (flags
& NDR_OUT
) {
11007 if (r
->out
.trustdom_handle
== NULL
) {
11008 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11010 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
11011 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11013 return NDR_ERR_SUCCESS
;
11016 static enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomainEx2
*r
)
11018 TALLOC_CTX
*_mem_save_policy_handle_0
;
11019 TALLOC_CTX
*_mem_save_info_0
;
11020 TALLOC_CTX
*_mem_save_auth_info_0
;
11021 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
11022 if (flags
& NDR_IN
) {
11023 ZERO_STRUCT(r
->out
);
11025 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11026 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
11028 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11029 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
11030 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
11031 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11032 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11033 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
11035 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11036 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
11037 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11038 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11039 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11040 NDR_PULL_ALLOC(ndr
, r
->in
.auth_info
);
11042 _mem_save_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11043 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.auth_info
, LIBNDR_FLAG_REF_ALLOC
);
11044 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
11045 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_auth_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11046 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11047 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
11048 ZERO_STRUCTP(r
->out
.trustdom_handle
);
11050 if (flags
& NDR_OUT
) {
11051 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11052 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
11054 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11055 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
11056 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
11057 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11058 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11060 return NDR_ERR_SUCCESS
;
11063 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomainEx2
*r
)
11065 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomainEx2");
11067 if (flags
& NDR_SET_VALUES
) {
11068 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11070 if (flags
& NDR_IN
) {
11071 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomainEx2");
11073 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
11075 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
11077 ndr_print_ptr(ndr
, "info", r
->in
.info
);
11079 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info", r
->in
.info
);
11081 ndr_print_ptr(ndr
, "auth_info", r
->in
.auth_info
);
11083 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", r
->in
.auth_info
);
11085 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
11088 if (flags
& NDR_OUT
) {
11089 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomainEx2");
11091 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
11093 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
11095 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11101 static enum ndr_err_code
ndr_push_lsa_CREDRWRITE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRWRITE
*r
)
11103 if (flags
& NDR_IN
) {
11105 if (flags
& NDR_OUT
) {
11106 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11108 return NDR_ERR_SUCCESS
;
11111 static enum ndr_err_code
ndr_pull_lsa_CREDRWRITE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRWRITE
*r
)
11113 if (flags
& NDR_IN
) {
11115 if (flags
& NDR_OUT
) {
11116 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11118 return NDR_ERR_SUCCESS
;
11121 _PUBLIC_
void ndr_print_lsa_CREDRWRITE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRWRITE
*r
)
11123 ndr_print_struct(ndr
, name
, "lsa_CREDRWRITE");
11125 if (flags
& NDR_SET_VALUES
) {
11126 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11128 if (flags
& NDR_IN
) {
11129 ndr_print_struct(ndr
, "in", "lsa_CREDRWRITE");
11133 if (flags
& NDR_OUT
) {
11134 ndr_print_struct(ndr
, "out", "lsa_CREDRWRITE");
11136 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11142 static enum ndr_err_code
ndr_push_lsa_CREDRREAD(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRREAD
*r
)
11144 if (flags
& NDR_IN
) {
11146 if (flags
& NDR_OUT
) {
11147 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11149 return NDR_ERR_SUCCESS
;
11152 static enum ndr_err_code
ndr_pull_lsa_CREDRREAD(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRREAD
*r
)
11154 if (flags
& NDR_IN
) {
11156 if (flags
& NDR_OUT
) {
11157 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11159 return NDR_ERR_SUCCESS
;
11162 _PUBLIC_
void ndr_print_lsa_CREDRREAD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRREAD
*r
)
11164 ndr_print_struct(ndr
, name
, "lsa_CREDRREAD");
11166 if (flags
& NDR_SET_VALUES
) {
11167 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11169 if (flags
& NDR_IN
) {
11170 ndr_print_struct(ndr
, "in", "lsa_CREDRREAD");
11174 if (flags
& NDR_OUT
) {
11175 ndr_print_struct(ndr
, "out", "lsa_CREDRREAD");
11177 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11183 static enum ndr_err_code
ndr_push_lsa_CREDRENUMERATE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRENUMERATE
*r
)
11185 if (flags
& NDR_IN
) {
11187 if (flags
& NDR_OUT
) {
11188 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11190 return NDR_ERR_SUCCESS
;
11193 static enum ndr_err_code
ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRENUMERATE
*r
)
11195 if (flags
& NDR_IN
) {
11197 if (flags
& NDR_OUT
) {
11198 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11200 return NDR_ERR_SUCCESS
;
11203 _PUBLIC_
void ndr_print_lsa_CREDRENUMERATE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRENUMERATE
*r
)
11205 ndr_print_struct(ndr
, name
, "lsa_CREDRENUMERATE");
11207 if (flags
& NDR_SET_VALUES
) {
11208 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11210 if (flags
& NDR_IN
) {
11211 ndr_print_struct(ndr
, "in", "lsa_CREDRENUMERATE");
11215 if (flags
& NDR_OUT
) {
11216 ndr_print_struct(ndr
, "out", "lsa_CREDRENUMERATE");
11218 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11224 static enum ndr_err_code
ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11226 if (flags
& NDR_IN
) {
11228 if (flags
& NDR_OUT
) {
11229 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11231 return NDR_ERR_SUCCESS
;
11234 static enum ndr_err_code
ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11236 if (flags
& NDR_IN
) {
11238 if (flags
& NDR_OUT
) {
11239 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11241 return NDR_ERR_SUCCESS
;
11244 _PUBLIC_
void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11246 ndr_print_struct(ndr
, name
, "lsa_CREDRWRITEDOMAINCREDENTIALS");
11248 if (flags
& NDR_SET_VALUES
) {
11249 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11251 if (flags
& NDR_IN
) {
11252 ndr_print_struct(ndr
, "in", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11256 if (flags
& NDR_OUT
) {
11257 ndr_print_struct(ndr
, "out", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11259 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11265 static enum ndr_err_code
ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11267 if (flags
& NDR_IN
) {
11269 if (flags
& NDR_OUT
) {
11270 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11272 return NDR_ERR_SUCCESS
;
11275 static enum ndr_err_code
ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11277 if (flags
& NDR_IN
) {
11279 if (flags
& NDR_OUT
) {
11280 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11282 return NDR_ERR_SUCCESS
;
11285 _PUBLIC_
void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11287 ndr_print_struct(ndr
, name
, "lsa_CREDRREADDOMAINCREDENTIALS");
11289 if (flags
& NDR_SET_VALUES
) {
11290 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11292 if (flags
& NDR_IN
) {
11293 ndr_print_struct(ndr
, "in", "lsa_CREDRREADDOMAINCREDENTIALS");
11297 if (flags
& NDR_OUT
) {
11298 ndr_print_struct(ndr
, "out", "lsa_CREDRREADDOMAINCREDENTIALS");
11300 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11306 static enum ndr_err_code
ndr_push_lsa_CREDRDELETE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRDELETE
*r
)
11308 if (flags
& NDR_IN
) {
11310 if (flags
& NDR_OUT
) {
11311 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11313 return NDR_ERR_SUCCESS
;
11316 static enum ndr_err_code
ndr_pull_lsa_CREDRDELETE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRDELETE
*r
)
11318 if (flags
& NDR_IN
) {
11320 if (flags
& NDR_OUT
) {
11321 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11323 return NDR_ERR_SUCCESS
;
11326 _PUBLIC_
void ndr_print_lsa_CREDRDELETE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRDELETE
*r
)
11328 ndr_print_struct(ndr
, name
, "lsa_CREDRDELETE");
11330 if (flags
& NDR_SET_VALUES
) {
11331 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11333 if (flags
& NDR_IN
) {
11334 ndr_print_struct(ndr
, "in", "lsa_CREDRDELETE");
11338 if (flags
& NDR_OUT
) {
11339 ndr_print_struct(ndr
, "out", "lsa_CREDRDELETE");
11341 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11347 static enum ndr_err_code
ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRGETTARGETINFO
*r
)
11349 if (flags
& NDR_IN
) {
11351 if (flags
& NDR_OUT
) {
11352 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11354 return NDR_ERR_SUCCESS
;
11357 static enum ndr_err_code
ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRGETTARGETINFO
*r
)
11359 if (flags
& NDR_IN
) {
11361 if (flags
& NDR_OUT
) {
11362 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11364 return NDR_ERR_SUCCESS
;
11367 _PUBLIC_
void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRGETTARGETINFO
*r
)
11369 ndr_print_struct(ndr
, name
, "lsa_CREDRGETTARGETINFO");
11371 if (flags
& NDR_SET_VALUES
) {
11372 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11374 if (flags
& NDR_IN
) {
11375 ndr_print_struct(ndr
, "in", "lsa_CREDRGETTARGETINFO");
11379 if (flags
& NDR_OUT
) {
11380 ndr_print_struct(ndr
, "out", "lsa_CREDRGETTARGETINFO");
11382 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11388 static enum ndr_err_code
ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRPROFILELOADED
*r
)
11390 if (flags
& NDR_IN
) {
11392 if (flags
& NDR_OUT
) {
11393 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11395 return NDR_ERR_SUCCESS
;
11398 static enum ndr_err_code
ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRPROFILELOADED
*r
)
11400 if (flags
& NDR_IN
) {
11402 if (flags
& NDR_OUT
) {
11403 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11405 return NDR_ERR_SUCCESS
;
11408 _PUBLIC_
void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRPROFILELOADED
*r
)
11410 ndr_print_struct(ndr
, name
, "lsa_CREDRPROFILELOADED");
11412 if (flags
& NDR_SET_VALUES
) {
11413 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11415 if (flags
& NDR_IN
) {
11416 ndr_print_struct(ndr
, "in", "lsa_CREDRPROFILELOADED");
11420 if (flags
& NDR_OUT
) {
11421 ndr_print_struct(ndr
, "out", "lsa_CREDRPROFILELOADED");
11423 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11429 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames3(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames3
*r
)
11431 uint32_t cntr_names_0
;
11432 if (flags
& NDR_IN
) {
11433 if (r
->in
.handle
== NULL
) {
11434 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11436 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11438 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11439 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11440 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11442 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11443 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11445 if (r
->in
.sids
== NULL
) {
11446 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11448 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11449 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
11450 if (r
->in
.count
== NULL
) {
11451 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11453 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
11454 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
11455 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
11457 if (flags
& NDR_OUT
) {
11458 if (r
->out
.domains
== NULL
) {
11459 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11461 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
11462 if (*r
->out
.domains
) {
11463 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11465 if (r
->out
.sids
== NULL
) {
11466 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11468 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11469 if (r
->out
.count
== NULL
) {
11470 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11472 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
11473 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11475 return NDR_ERR_SUCCESS
;
11478 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames3(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames3
*r
)
11480 uint32_t cntr_names_0
;
11481 uint32_t _ptr_domains
;
11482 TALLOC_CTX
*_mem_save_handle_0
;
11483 TALLOC_CTX
*_mem_save_names_0
;
11484 TALLOC_CTX
*_mem_save_domains_0
;
11485 TALLOC_CTX
*_mem_save_domains_1
;
11486 TALLOC_CTX
*_mem_save_sids_0
;
11487 TALLOC_CTX
*_mem_save_count_0
;
11488 if (flags
& NDR_IN
) {
11489 ZERO_STRUCT(r
->out
);
11491 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11492 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
11494 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11495 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
11496 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11497 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11498 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
11499 if (r
->in
.num_names
> 1000) {
11500 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11502 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
11503 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
11504 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11505 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
11506 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11507 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11509 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11510 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11512 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
11513 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11514 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
11516 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11517 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11518 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11519 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11520 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11521 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11522 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
11524 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11525 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
11526 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
11527 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11528 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
11529 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
11530 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11531 ZERO_STRUCTP(r
->out
.domains
);
11532 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11533 *r
->out
.sids
= *r
->in
.sids
;
11534 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11535 *r
->out
.count
= *r
->in
.count
;
11537 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
11540 if (flags
& NDR_OUT
) {
11541 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11542 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11544 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11545 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
11546 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
11547 if (_ptr_domains
) {
11548 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
11550 *r
->out
.domains
= NULL
;
11552 if (*r
->out
.domains
) {
11553 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11554 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
11555 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11556 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
11558 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
11559 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11560 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11562 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11563 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11564 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11565 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11566 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11567 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11569 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11570 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
11571 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
11572 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11573 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11575 return NDR_ERR_SUCCESS
;
11578 _PUBLIC_
void ndr_print_lsa_LookupNames3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames3
*r
)
11580 uint32_t cntr_names_0
;
11581 ndr_print_struct(ndr
, name
, "lsa_LookupNames3");
11583 if (flags
& NDR_SET_VALUES
) {
11584 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11586 if (flags
& NDR_IN
) {
11587 ndr_print_struct(ndr
, "in", "lsa_LookupNames3");
11589 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
11591 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
11593 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
11594 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
11596 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
11598 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
11599 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
11604 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
11606 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->in
.sids
);
11608 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
11609 ndr_print_ptr(ndr
, "count", r
->in
.count
);
11611 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
11613 ndr_print_uint32(ndr
, "lookup_options", r
->in
.lookup_options
);
11614 ndr_print_uint32(ndr
, "client_revision", r
->in
.client_revision
);
11617 if (flags
& NDR_OUT
) {
11618 ndr_print_struct(ndr
, "out", "lsa_LookupNames3");
11620 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
11622 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
11624 if (*r
->out
.domains
) {
11625 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
11629 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
11631 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->out
.sids
);
11633 ndr_print_ptr(ndr
, "count", r
->out
.count
);
11635 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
11637 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11643 static enum ndr_err_code
ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRGETSESSIONTYPES
*r
)
11645 if (flags
& NDR_IN
) {
11647 if (flags
& NDR_OUT
) {
11648 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11650 return NDR_ERR_SUCCESS
;
11653 static enum ndr_err_code
ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRGETSESSIONTYPES
*r
)
11655 if (flags
& NDR_IN
) {
11657 if (flags
& NDR_OUT
) {
11658 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11660 return NDR_ERR_SUCCESS
;
11663 _PUBLIC_
void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRGETSESSIONTYPES
*r
)
11665 ndr_print_struct(ndr
, name
, "lsa_CREDRGETSESSIONTYPES");
11667 if (flags
& NDR_SET_VALUES
) {
11668 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11670 if (flags
& NDR_IN
) {
11671 ndr_print_struct(ndr
, "in", "lsa_CREDRGETSESSIONTYPES");
11675 if (flags
& NDR_OUT
) {
11676 ndr_print_struct(ndr
, "out", "lsa_CREDRGETSESSIONTYPES");
11678 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11684 static enum ndr_err_code
ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARREGISTERAUDITEVENT
*r
)
11686 if (flags
& NDR_IN
) {
11688 if (flags
& NDR_OUT
) {
11689 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11691 return NDR_ERR_SUCCESS
;
11694 static enum ndr_err_code
ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARREGISTERAUDITEVENT
*r
)
11696 if (flags
& NDR_IN
) {
11698 if (flags
& NDR_OUT
) {
11699 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11701 return NDR_ERR_SUCCESS
;
11704 _PUBLIC_
void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARREGISTERAUDITEVENT
*r
)
11706 ndr_print_struct(ndr
, name
, "lsa_LSARREGISTERAUDITEVENT");
11708 if (flags
& NDR_SET_VALUES
) {
11709 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11711 if (flags
& NDR_IN
) {
11712 ndr_print_struct(ndr
, "in", "lsa_LSARREGISTERAUDITEVENT");
11716 if (flags
& NDR_OUT
) {
11717 ndr_print_struct(ndr
, "out", "lsa_LSARREGISTERAUDITEVENT");
11719 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11725 static enum ndr_err_code
ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARGENAUDITEVENT
*r
)
11727 if (flags
& NDR_IN
) {
11729 if (flags
& NDR_OUT
) {
11730 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11732 return NDR_ERR_SUCCESS
;
11735 static enum ndr_err_code
ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARGENAUDITEVENT
*r
)
11737 if (flags
& NDR_IN
) {
11739 if (flags
& NDR_OUT
) {
11740 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11742 return NDR_ERR_SUCCESS
;
11745 _PUBLIC_
void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARGENAUDITEVENT
*r
)
11747 ndr_print_struct(ndr
, name
, "lsa_LSARGENAUDITEVENT");
11749 if (flags
& NDR_SET_VALUES
) {
11750 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11752 if (flags
& NDR_IN
) {
11753 ndr_print_struct(ndr
, "in", "lsa_LSARGENAUDITEVENT");
11757 if (flags
& NDR_OUT
) {
11758 ndr_print_struct(ndr
, "out", "lsa_LSARGENAUDITEVENT");
11760 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11766 static enum ndr_err_code
ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
11768 if (flags
& NDR_IN
) {
11770 if (flags
& NDR_OUT
) {
11771 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11773 return NDR_ERR_SUCCESS
;
11776 static enum ndr_err_code
ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
11778 if (flags
& NDR_IN
) {
11780 if (flags
& NDR_OUT
) {
11781 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11783 return NDR_ERR_SUCCESS
;
11786 _PUBLIC_
void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
11788 ndr_print_struct(ndr
, name
, "lsa_LSARUNREGISTERAUDITEVENT");
11790 if (flags
& NDR_SET_VALUES
) {
11791 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11793 if (flags
& NDR_IN
) {
11794 ndr_print_struct(ndr
, "in", "lsa_LSARUNREGISTERAUDITEVENT");
11798 if (flags
& NDR_OUT
) {
11799 ndr_print_struct(ndr
, "out", "lsa_LSARUNREGISTERAUDITEVENT");
11801 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11807 static enum ndr_err_code
ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr_push
*ndr
, int flags
, const struct lsa_lsaRQueryForestTrustInformation
*r
)
11809 if (flags
& NDR_IN
) {
11810 if (r
->in
.handle
== NULL
) {
11811 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11813 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11814 if (r
->in
.trusted_domain_name
== NULL
) {
11815 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11817 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain_name
));
11818 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.unknown
));
11820 if (flags
& NDR_OUT
) {
11821 if (r
->out
.forest_trust_info
== NULL
) {
11822 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11824 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.forest_trust_info
));
11825 if (*r
->out
.forest_trust_info
) {
11826 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
11828 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11830 return NDR_ERR_SUCCESS
;
11833 static enum ndr_err_code
ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr_pull
*ndr
, int flags
, struct lsa_lsaRQueryForestTrustInformation
*r
)
11835 uint32_t _ptr_forest_trust_info
;
11836 TALLOC_CTX
*_mem_save_handle_0
;
11837 TALLOC_CTX
*_mem_save_trusted_domain_name_0
;
11838 TALLOC_CTX
*_mem_save_forest_trust_info_0
;
11839 TALLOC_CTX
*_mem_save_forest_trust_info_1
;
11840 if (flags
& NDR_IN
) {
11841 ZERO_STRUCT(r
->out
);
11843 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11844 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
11846 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11847 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
11848 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11849 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11850 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11851 NDR_PULL_ALLOC(ndr
, r
->in
.trusted_domain_name
);
11853 _mem_save_trusted_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11854 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trusted_domain_name
, LIBNDR_FLAG_REF_ALLOC
);
11855 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain_name
));
11856 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_name_0
, LIBNDR_FLAG_REF_ALLOC
);
11857 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
11858 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
11859 ZERO_STRUCTP(r
->out
.forest_trust_info
);
11861 if (flags
& NDR_OUT
) {
11862 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11863 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
11865 _mem_save_forest_trust_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11866 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.forest_trust_info
, LIBNDR_FLAG_REF_ALLOC
);
11867 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_info
));
11868 if (_ptr_forest_trust_info
) {
11869 NDR_PULL_ALLOC(ndr
, *r
->out
.forest_trust_info
);
11871 *r
->out
.forest_trust_info
= NULL
;
11873 if (*r
->out
.forest_trust_info
) {
11874 _mem_save_forest_trust_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11875 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.forest_trust_info
, 0);
11876 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
11877 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_1
, 0);
11879 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11880 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11882 return NDR_ERR_SUCCESS
;
11885 _PUBLIC_
void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_lsaRQueryForestTrustInformation
*r
)
11887 ndr_print_struct(ndr
, name
, "lsa_lsaRQueryForestTrustInformation");
11889 if (flags
& NDR_SET_VALUES
) {
11890 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11892 if (flags
& NDR_IN
) {
11893 ndr_print_struct(ndr
, "in", "lsa_lsaRQueryForestTrustInformation");
11895 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
11897 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
11899 ndr_print_ptr(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
11901 ndr_print_lsa_String(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
11903 ndr_print_uint16(ndr
, "unknown", r
->in
.unknown
);
11906 if (flags
& NDR_OUT
) {
11907 ndr_print_struct(ndr
, "out", "lsa_lsaRQueryForestTrustInformation");
11909 ndr_print_ptr(ndr
, "forest_trust_info", r
->out
.forest_trust_info
);
11911 ndr_print_ptr(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
11913 if (*r
->out
.forest_trust_info
) {
11914 ndr_print_lsa_ForestTrustInformation(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
11918 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11924 static enum ndr_err_code
ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
11926 if (flags
& NDR_IN
) {
11928 if (flags
& NDR_OUT
) {
11929 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11931 return NDR_ERR_SUCCESS
;
11934 static enum ndr_err_code
ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
11936 if (flags
& NDR_IN
) {
11938 if (flags
& NDR_OUT
) {
11939 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11941 return NDR_ERR_SUCCESS
;
11944 _PUBLIC_
void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
11946 ndr_print_struct(ndr
, name
, "lsa_LSARSETFORESTTRUSTINFORMATION");
11948 if (flags
& NDR_SET_VALUES
) {
11949 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11951 if (flags
& NDR_IN
) {
11952 ndr_print_struct(ndr
, "in", "lsa_LSARSETFORESTTRUSTINFORMATION");
11956 if (flags
& NDR_OUT
) {
11957 ndr_print_struct(ndr
, "out", "lsa_LSARSETFORESTTRUSTINFORMATION");
11959 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11965 static enum ndr_err_code
ndr_push_lsa_CREDRRENAME(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRRENAME
*r
)
11967 if (flags
& NDR_IN
) {
11969 if (flags
& NDR_OUT
) {
11970 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11972 return NDR_ERR_SUCCESS
;
11975 static enum ndr_err_code
ndr_pull_lsa_CREDRRENAME(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRRENAME
*r
)
11977 if (flags
& NDR_IN
) {
11979 if (flags
& NDR_OUT
) {
11980 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11982 return NDR_ERR_SUCCESS
;
11985 _PUBLIC_
void ndr_print_lsa_CREDRRENAME(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRRENAME
*r
)
11987 ndr_print_struct(ndr
, name
, "lsa_CREDRRENAME");
11989 if (flags
& NDR_SET_VALUES
) {
11990 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11992 if (flags
& NDR_IN
) {
11993 ndr_print_struct(ndr
, "in", "lsa_CREDRRENAME");
11997 if (flags
& NDR_OUT
) {
11998 ndr_print_struct(ndr
, "out", "lsa_CREDRRENAME");
12000 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12006 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids3(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids3
*r
)
12008 if (flags
& NDR_IN
) {
12009 if (r
->in
.sids
== NULL
) {
12010 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12012 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12013 if (r
->in
.names
== NULL
) {
12014 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12016 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
12017 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
12018 if (r
->in
.count
== NULL
) {
12019 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12021 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
12022 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
12023 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
12025 if (flags
& NDR_OUT
) {
12026 if (r
->out
.domains
== NULL
) {
12027 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12029 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
12030 if (*r
->out
.domains
) {
12031 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12033 if (r
->out
.names
== NULL
) {
12034 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12036 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
12037 if (r
->out
.count
== NULL
) {
12038 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12040 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
12041 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12043 return NDR_ERR_SUCCESS
;
12046 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids3(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids3
*r
)
12048 uint32_t _ptr_domains
;
12049 TALLOC_CTX
*_mem_save_sids_0
;
12050 TALLOC_CTX
*_mem_save_domains_0
;
12051 TALLOC_CTX
*_mem_save_domains_1
;
12052 TALLOC_CTX
*_mem_save_names_0
;
12053 TALLOC_CTX
*_mem_save_count_0
;
12054 if (flags
& NDR_IN
) {
12055 ZERO_STRUCT(r
->out
);
12057 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12058 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
12060 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12061 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12062 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12063 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12064 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12065 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
12067 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12068 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
12069 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
12070 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
12071 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
12072 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12073 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
12075 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12076 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
12077 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12078 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12079 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
12080 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
12081 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12082 ZERO_STRUCTP(r
->out
.domains
);
12083 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
12084 *r
->out
.names
= *r
->in
.names
;
12085 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12086 *r
->out
.count
= *r
->in
.count
;
12088 if (flags
& NDR_OUT
) {
12089 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12090 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12092 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12093 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
12094 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
12095 if (_ptr_domains
) {
12096 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
12098 *r
->out
.domains
= NULL
;
12100 if (*r
->out
.domains
) {
12101 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12102 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
12103 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12104 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
12106 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
12107 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12108 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
12110 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12111 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
12112 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
12113 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
12114 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12115 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12117 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12118 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
12119 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
12120 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12121 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12123 return NDR_ERR_SUCCESS
;
12126 _PUBLIC_
void ndr_print_lsa_LookupSids3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids3
*r
)
12128 ndr_print_struct(ndr
, name
, "lsa_LookupSids3");
12130 if (flags
& NDR_SET_VALUES
) {
12131 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12133 if (flags
& NDR_IN
) {
12134 ndr_print_struct(ndr
, "in", "lsa_LookupSids3");
12136 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
12138 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
12140 ndr_print_ptr(ndr
, "names", r
->in
.names
);
12142 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->in
.names
);
12144 ndr_print_uint16(ndr
, "level", r
->in
.level
);
12145 ndr_print_ptr(ndr
, "count", r
->in
.count
);
12147 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
12149 ndr_print_uint32(ndr
, "unknown1", r
->in
.unknown1
);
12150 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
12153 if (flags
& NDR_OUT
) {
12154 ndr_print_struct(ndr
, "out", "lsa_LookupSids3");
12156 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
12158 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
12160 if (*r
->out
.domains
) {
12161 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
12165 ndr_print_ptr(ndr
, "names", r
->out
.names
);
12167 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->out
.names
);
12169 ndr_print_ptr(ndr
, "count", r
->out
.count
);
12171 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
12173 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12179 static enum ndr_err_code
ndr_push_lsa_LookupNames4(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames4
*r
)
12181 uint32_t cntr_names_0
;
12182 if (flags
& NDR_IN
) {
12183 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
12184 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
12185 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12186 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
12188 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12189 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
12191 if (r
->in
.sids
== NULL
) {
12192 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12194 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12195 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
12196 if (r
->in
.count
== NULL
) {
12197 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12199 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
12200 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
12201 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
12203 if (flags
& NDR_OUT
) {
12204 if (r
->out
.domains
== NULL
) {
12205 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12207 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
12208 if (*r
->out
.domains
) {
12209 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12211 if (r
->out
.sids
== NULL
) {
12212 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12214 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
12215 if (r
->out
.count
== NULL
) {
12216 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12218 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
12219 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12221 return NDR_ERR_SUCCESS
;
12224 static enum ndr_err_code
ndr_pull_lsa_LookupNames4(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames4
*r
)
12226 uint32_t cntr_names_0
;
12227 uint32_t _ptr_domains
;
12228 TALLOC_CTX
*_mem_save_names_0
;
12229 TALLOC_CTX
*_mem_save_domains_0
;
12230 TALLOC_CTX
*_mem_save_domains_1
;
12231 TALLOC_CTX
*_mem_save_sids_0
;
12232 TALLOC_CTX
*_mem_save_count_0
;
12233 if (flags
& NDR_IN
) {
12234 ZERO_STRUCT(r
->out
);
12236 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
12237 if (r
->in
.num_names
> 1000) {
12238 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
12240 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
12241 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
12242 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12243 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
12244 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12245 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
12247 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12248 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
12250 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
12251 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12252 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
12254 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12255 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12256 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12257 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12258 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
12259 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12260 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
12262 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12263 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
12264 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12265 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12266 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
12267 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
12268 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12269 ZERO_STRUCTP(r
->out
.domains
);
12270 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
12271 *r
->out
.sids
= *r
->in
.sids
;
12272 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12273 *r
->out
.count
= *r
->in
.count
;
12275 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
12278 if (flags
& NDR_OUT
) {
12279 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12280 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12282 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12283 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
12284 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
12285 if (_ptr_domains
) {
12286 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
12288 *r
->out
.domains
= NULL
;
12290 if (*r
->out
.domains
) {
12291 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12292 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
12293 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12294 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
12296 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
12297 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12298 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
12300 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12301 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12302 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
12303 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12304 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12305 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12307 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12308 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
12309 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
12310 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12311 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12313 return NDR_ERR_SUCCESS
;
12316 _PUBLIC_
void ndr_print_lsa_LookupNames4(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames4
*r
)
12318 uint32_t cntr_names_0
;
12319 ndr_print_struct(ndr
, name
, "lsa_LookupNames4");
12321 if (flags
& NDR_SET_VALUES
) {
12322 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12324 if (flags
& NDR_IN
) {
12325 ndr_print_struct(ndr
, "in", "lsa_LookupNames4");
12327 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
12328 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
12330 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
12332 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
12333 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
12338 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
12340 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->in
.sids
);
12342 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
12343 ndr_print_ptr(ndr
, "count", r
->in
.count
);
12345 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
12347 ndr_print_uint32(ndr
, "lookup_options", r
->in
.lookup_options
);
12348 ndr_print_uint32(ndr
, "client_revision", r
->in
.client_revision
);
12351 if (flags
& NDR_OUT
) {
12352 ndr_print_struct(ndr
, "out", "lsa_LookupNames4");
12354 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
12356 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
12358 if (*r
->out
.domains
) {
12359 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
12363 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
12365 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->out
.sids
);
12367 ndr_print_ptr(ndr
, "count", r
->out
.count
);
12369 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
12371 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12377 static enum ndr_err_code
ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSAROPENPOLICYSCE
*r
)
12379 if (flags
& NDR_IN
) {
12381 if (flags
& NDR_OUT
) {
12382 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12384 return NDR_ERR_SUCCESS
;
12387 static enum ndr_err_code
ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSAROPENPOLICYSCE
*r
)
12389 if (flags
& NDR_IN
) {
12391 if (flags
& NDR_OUT
) {
12392 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12394 return NDR_ERR_SUCCESS
;
12397 _PUBLIC_
void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSAROPENPOLICYSCE
*r
)
12399 ndr_print_struct(ndr
, name
, "lsa_LSAROPENPOLICYSCE");
12401 if (flags
& NDR_SET_VALUES
) {
12402 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12404 if (flags
& NDR_IN
) {
12405 ndr_print_struct(ndr
, "in", "lsa_LSAROPENPOLICYSCE");
12409 if (flags
& NDR_OUT
) {
12410 ndr_print_struct(ndr
, "out", "lsa_LSAROPENPOLICYSCE");
12412 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12418 static enum ndr_err_code
ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12420 if (flags
& NDR_IN
) {
12422 if (flags
& NDR_OUT
) {
12423 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12425 return NDR_ERR_SUCCESS
;
12428 static enum ndr_err_code
ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12430 if (flags
& NDR_IN
) {
12432 if (flags
& NDR_OUT
) {
12433 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12435 return NDR_ERR_SUCCESS
;
12438 _PUBLIC_
void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12440 ndr_print_struct(ndr
, name
, "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12442 if (flags
& NDR_SET_VALUES
) {
12443 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12445 if (flags
& NDR_IN
) {
12446 ndr_print_struct(ndr
, "in", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12450 if (flags
& NDR_OUT
) {
12451 ndr_print_struct(ndr
, "out", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12453 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12459 static enum ndr_err_code
ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12461 if (flags
& NDR_IN
) {
12463 if (flags
& NDR_OUT
) {
12464 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12466 return NDR_ERR_SUCCESS
;
12469 static enum ndr_err_code
ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12471 if (flags
& NDR_IN
) {
12473 if (flags
& NDR_OUT
) {
12474 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12476 return NDR_ERR_SUCCESS
;
12479 _PUBLIC_
void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12481 ndr_print_struct(ndr
, name
, "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12483 if (flags
& NDR_SET_VALUES
) {
12484 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12486 if (flags
& NDR_IN
) {
12487 ndr_print_struct(ndr
, "in", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12491 if (flags
& NDR_OUT
) {
12492 ndr_print_struct(ndr
, "out", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12494 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12500 static enum ndr_err_code
ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12502 if (flags
& NDR_IN
) {
12504 if (flags
& NDR_OUT
) {
12505 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12507 return NDR_ERR_SUCCESS
;
12510 static enum ndr_err_code
ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12512 if (flags
& NDR_IN
) {
12514 if (flags
& NDR_OUT
) {
12515 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12517 return NDR_ERR_SUCCESS
;
12520 _PUBLIC_
void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12522 ndr_print_struct(ndr
, name
, "lsa_LSARADTREPORTSECURITYEVENT");
12524 if (flags
& NDR_SET_VALUES
) {
12525 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12527 if (flags
& NDR_IN
) {
12528 ndr_print_struct(ndr
, "in", "lsa_LSARADTREPORTSECURITYEVENT");
12532 if (flags
& NDR_OUT
) {
12533 ndr_print_struct(ndr
, "out", "lsa_LSARADTREPORTSECURITYEVENT");
12535 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12541 static const struct ndr_interface_call lsarpc_calls
[] = {
12544 sizeof(struct lsa_Close
),
12545 (ndr_push_flags_fn_t
) ndr_push_lsa_Close
,
12546 (ndr_pull_flags_fn_t
) ndr_pull_lsa_Close
,
12547 (ndr_print_function_t
) ndr_print_lsa_Close
,
12552 sizeof(struct lsa_Delete
),
12553 (ndr_push_flags_fn_t
) ndr_push_lsa_Delete
,
12554 (ndr_pull_flags_fn_t
) ndr_pull_lsa_Delete
,
12555 (ndr_print_function_t
) ndr_print_lsa_Delete
,
12560 sizeof(struct lsa_EnumPrivs
),
12561 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumPrivs
,
12562 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumPrivs
,
12563 (ndr_print_function_t
) ndr_print_lsa_EnumPrivs
,
12567 "lsa_QuerySecurity",
12568 sizeof(struct lsa_QuerySecurity
),
12569 (ndr_push_flags_fn_t
) ndr_push_lsa_QuerySecurity
,
12570 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QuerySecurity
,
12571 (ndr_print_function_t
) ndr_print_lsa_QuerySecurity
,
12576 sizeof(struct lsa_SetSecObj
),
12577 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSecObj
,
12578 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSecObj
,
12579 (ndr_print_function_t
) ndr_print_lsa_SetSecObj
,
12583 "lsa_ChangePassword",
12584 sizeof(struct lsa_ChangePassword
),
12585 (ndr_push_flags_fn_t
) ndr_push_lsa_ChangePassword
,
12586 (ndr_pull_flags_fn_t
) ndr_pull_lsa_ChangePassword
,
12587 (ndr_print_function_t
) ndr_print_lsa_ChangePassword
,
12592 sizeof(struct lsa_OpenPolicy
),
12593 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenPolicy
,
12594 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenPolicy
,
12595 (ndr_print_function_t
) ndr_print_lsa_OpenPolicy
,
12599 "lsa_QueryInfoPolicy",
12600 sizeof(struct lsa_QueryInfoPolicy
),
12601 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryInfoPolicy
,
12602 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryInfoPolicy
,
12603 (ndr_print_function_t
) ndr_print_lsa_QueryInfoPolicy
,
12607 "lsa_SetInfoPolicy",
12608 sizeof(struct lsa_SetInfoPolicy
),
12609 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInfoPolicy
,
12610 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInfoPolicy
,
12611 (ndr_print_function_t
) ndr_print_lsa_SetInfoPolicy
,
12615 "lsa_ClearAuditLog",
12616 sizeof(struct lsa_ClearAuditLog
),
12617 (ndr_push_flags_fn_t
) ndr_push_lsa_ClearAuditLog
,
12618 (ndr_pull_flags_fn_t
) ndr_pull_lsa_ClearAuditLog
,
12619 (ndr_print_function_t
) ndr_print_lsa_ClearAuditLog
,
12623 "lsa_CreateAccount",
12624 sizeof(struct lsa_CreateAccount
),
12625 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateAccount
,
12626 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateAccount
,
12627 (ndr_print_function_t
) ndr_print_lsa_CreateAccount
,
12631 "lsa_EnumAccounts",
12632 sizeof(struct lsa_EnumAccounts
),
12633 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccounts
,
12634 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccounts
,
12635 (ndr_print_function_t
) ndr_print_lsa_EnumAccounts
,
12639 "lsa_CreateTrustedDomain",
12640 sizeof(struct lsa_CreateTrustedDomain
),
12641 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomain
,
12642 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomain
,
12643 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomain
,
12647 "lsa_EnumTrustDom",
12648 sizeof(struct lsa_EnumTrustDom
),
12649 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumTrustDom
,
12650 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumTrustDom
,
12651 (ndr_print_function_t
) ndr_print_lsa_EnumTrustDom
,
12656 sizeof(struct lsa_LookupNames
),
12657 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames
,
12658 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames
,
12659 (ndr_print_function_t
) ndr_print_lsa_LookupNames
,
12664 sizeof(struct lsa_LookupSids
),
12665 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids
,
12666 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids
,
12667 (ndr_print_function_t
) ndr_print_lsa_LookupSids
,
12671 "lsa_CreateSecret",
12672 sizeof(struct lsa_CreateSecret
),
12673 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateSecret
,
12674 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateSecret
,
12675 (ndr_print_function_t
) ndr_print_lsa_CreateSecret
,
12680 sizeof(struct lsa_OpenAccount
),
12681 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenAccount
,
12682 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenAccount
,
12683 (ndr_print_function_t
) ndr_print_lsa_OpenAccount
,
12687 "lsa_EnumPrivsAccount",
12688 sizeof(struct lsa_EnumPrivsAccount
),
12689 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumPrivsAccount
,
12690 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumPrivsAccount
,
12691 (ndr_print_function_t
) ndr_print_lsa_EnumPrivsAccount
,
12695 "lsa_AddPrivilegesToAccount",
12696 sizeof(struct lsa_AddPrivilegesToAccount
),
12697 (ndr_push_flags_fn_t
) ndr_push_lsa_AddPrivilegesToAccount
,
12698 (ndr_pull_flags_fn_t
) ndr_pull_lsa_AddPrivilegesToAccount
,
12699 (ndr_print_function_t
) ndr_print_lsa_AddPrivilegesToAccount
,
12703 "lsa_RemovePrivilegesFromAccount",
12704 sizeof(struct lsa_RemovePrivilegesFromAccount
),
12705 (ndr_push_flags_fn_t
) ndr_push_lsa_RemovePrivilegesFromAccount
,
12706 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RemovePrivilegesFromAccount
,
12707 (ndr_print_function_t
) ndr_print_lsa_RemovePrivilegesFromAccount
,
12711 "lsa_GetQuotasForAccount",
12712 sizeof(struct lsa_GetQuotasForAccount
),
12713 (ndr_push_flags_fn_t
) ndr_push_lsa_GetQuotasForAccount
,
12714 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetQuotasForAccount
,
12715 (ndr_print_function_t
) ndr_print_lsa_GetQuotasForAccount
,
12719 "lsa_SetQuotasForAccount",
12720 sizeof(struct lsa_SetQuotasForAccount
),
12721 (ndr_push_flags_fn_t
) ndr_push_lsa_SetQuotasForAccount
,
12722 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetQuotasForAccount
,
12723 (ndr_print_function_t
) ndr_print_lsa_SetQuotasForAccount
,
12727 "lsa_GetSystemAccessAccount",
12728 sizeof(struct lsa_GetSystemAccessAccount
),
12729 (ndr_push_flags_fn_t
) ndr_push_lsa_GetSystemAccessAccount
,
12730 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetSystemAccessAccount
,
12731 (ndr_print_function_t
) ndr_print_lsa_GetSystemAccessAccount
,
12735 "lsa_SetSystemAccessAccount",
12736 sizeof(struct lsa_SetSystemAccessAccount
),
12737 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSystemAccessAccount
,
12738 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSystemAccessAccount
,
12739 (ndr_print_function_t
) ndr_print_lsa_SetSystemAccessAccount
,
12743 "lsa_OpenTrustedDomain",
12744 sizeof(struct lsa_OpenTrustedDomain
),
12745 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenTrustedDomain
,
12746 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenTrustedDomain
,
12747 (ndr_print_function_t
) ndr_print_lsa_OpenTrustedDomain
,
12751 "lsa_QueryTrustedDomainInfo",
12752 sizeof(struct lsa_QueryTrustedDomainInfo
),
12753 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfo
,
12754 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfo
,
12755 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfo
,
12759 "lsa_SetInformationTrustedDomain",
12760 sizeof(struct lsa_SetInformationTrustedDomain
),
12761 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInformationTrustedDomain
,
12762 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInformationTrustedDomain
,
12763 (ndr_print_function_t
) ndr_print_lsa_SetInformationTrustedDomain
,
12768 sizeof(struct lsa_OpenSecret
),
12769 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenSecret
,
12770 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenSecret
,
12771 (ndr_print_function_t
) ndr_print_lsa_OpenSecret
,
12776 sizeof(struct lsa_SetSecret
),
12777 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSecret
,
12778 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSecret
,
12779 (ndr_print_function_t
) ndr_print_lsa_SetSecret
,
12784 sizeof(struct lsa_QuerySecret
),
12785 (ndr_push_flags_fn_t
) ndr_push_lsa_QuerySecret
,
12786 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QuerySecret
,
12787 (ndr_print_function_t
) ndr_print_lsa_QuerySecret
,
12791 "lsa_LookupPrivValue",
12792 sizeof(struct lsa_LookupPrivValue
),
12793 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivValue
,
12794 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivValue
,
12795 (ndr_print_function_t
) ndr_print_lsa_LookupPrivValue
,
12799 "lsa_LookupPrivName",
12800 sizeof(struct lsa_LookupPrivName
),
12801 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivName
,
12802 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivName
,
12803 (ndr_print_function_t
) ndr_print_lsa_LookupPrivName
,
12807 "lsa_LookupPrivDisplayName",
12808 sizeof(struct lsa_LookupPrivDisplayName
),
12809 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivDisplayName
,
12810 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivDisplayName
,
12811 (ndr_print_function_t
) ndr_print_lsa_LookupPrivDisplayName
,
12815 "lsa_DeleteObject",
12816 sizeof(struct lsa_DeleteObject
),
12817 (ndr_push_flags_fn_t
) ndr_push_lsa_DeleteObject
,
12818 (ndr_pull_flags_fn_t
) ndr_pull_lsa_DeleteObject
,
12819 (ndr_print_function_t
) ndr_print_lsa_DeleteObject
,
12823 "lsa_EnumAccountsWithUserRight",
12824 sizeof(struct lsa_EnumAccountsWithUserRight
),
12825 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccountsWithUserRight
,
12826 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccountsWithUserRight
,
12827 (ndr_print_function_t
) ndr_print_lsa_EnumAccountsWithUserRight
,
12831 "lsa_EnumAccountRights",
12832 sizeof(struct lsa_EnumAccountRights
),
12833 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccountRights
,
12834 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccountRights
,
12835 (ndr_print_function_t
) ndr_print_lsa_EnumAccountRights
,
12839 "lsa_AddAccountRights",
12840 sizeof(struct lsa_AddAccountRights
),
12841 (ndr_push_flags_fn_t
) ndr_push_lsa_AddAccountRights
,
12842 (ndr_pull_flags_fn_t
) ndr_pull_lsa_AddAccountRights
,
12843 (ndr_print_function_t
) ndr_print_lsa_AddAccountRights
,
12847 "lsa_RemoveAccountRights",
12848 sizeof(struct lsa_RemoveAccountRights
),
12849 (ndr_push_flags_fn_t
) ndr_push_lsa_RemoveAccountRights
,
12850 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RemoveAccountRights
,
12851 (ndr_print_function_t
) ndr_print_lsa_RemoveAccountRights
,
12855 "lsa_QueryTrustedDomainInfoBySid",
12856 sizeof(struct lsa_QueryTrustedDomainInfoBySid
),
12857 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfoBySid
,
12858 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfoBySid
,
12859 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfoBySid
,
12863 "lsa_SetTrustedDomainInfo",
12864 sizeof(struct lsa_SetTrustedDomainInfo
),
12865 (ndr_push_flags_fn_t
) ndr_push_lsa_SetTrustedDomainInfo
,
12866 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetTrustedDomainInfo
,
12867 (ndr_print_function_t
) ndr_print_lsa_SetTrustedDomainInfo
,
12871 "lsa_DeleteTrustedDomain",
12872 sizeof(struct lsa_DeleteTrustedDomain
),
12873 (ndr_push_flags_fn_t
) ndr_push_lsa_DeleteTrustedDomain
,
12874 (ndr_pull_flags_fn_t
) ndr_pull_lsa_DeleteTrustedDomain
,
12875 (ndr_print_function_t
) ndr_print_lsa_DeleteTrustedDomain
,
12879 "lsa_StorePrivateData",
12880 sizeof(struct lsa_StorePrivateData
),
12881 (ndr_push_flags_fn_t
) ndr_push_lsa_StorePrivateData
,
12882 (ndr_pull_flags_fn_t
) ndr_pull_lsa_StorePrivateData
,
12883 (ndr_print_function_t
) ndr_print_lsa_StorePrivateData
,
12887 "lsa_RetrievePrivateData",
12888 sizeof(struct lsa_RetrievePrivateData
),
12889 (ndr_push_flags_fn_t
) ndr_push_lsa_RetrievePrivateData
,
12890 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RetrievePrivateData
,
12891 (ndr_print_function_t
) ndr_print_lsa_RetrievePrivateData
,
12896 sizeof(struct lsa_OpenPolicy2
),
12897 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenPolicy2
,
12898 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenPolicy2
,
12899 (ndr_print_function_t
) ndr_print_lsa_OpenPolicy2
,
12904 sizeof(struct lsa_GetUserName
),
12905 (ndr_push_flags_fn_t
) ndr_push_lsa_GetUserName
,
12906 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetUserName
,
12907 (ndr_print_function_t
) ndr_print_lsa_GetUserName
,
12911 "lsa_QueryInfoPolicy2",
12912 sizeof(struct lsa_QueryInfoPolicy2
),
12913 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryInfoPolicy2
,
12914 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryInfoPolicy2
,
12915 (ndr_print_function_t
) ndr_print_lsa_QueryInfoPolicy2
,
12919 "lsa_SetInfoPolicy2",
12920 sizeof(struct lsa_SetInfoPolicy2
),
12921 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInfoPolicy2
,
12922 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInfoPolicy2
,
12923 (ndr_print_function_t
) ndr_print_lsa_SetInfoPolicy2
,
12927 "lsa_QueryTrustedDomainInfoByName",
12928 sizeof(struct lsa_QueryTrustedDomainInfoByName
),
12929 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfoByName
,
12930 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfoByName
,
12931 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfoByName
,
12935 "lsa_SetTrustedDomainInfoByName",
12936 sizeof(struct lsa_SetTrustedDomainInfoByName
),
12937 (ndr_push_flags_fn_t
) ndr_push_lsa_SetTrustedDomainInfoByName
,
12938 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetTrustedDomainInfoByName
,
12939 (ndr_print_function_t
) ndr_print_lsa_SetTrustedDomainInfoByName
,
12943 "lsa_EnumTrustedDomainsEx",
12944 sizeof(struct lsa_EnumTrustedDomainsEx
),
12945 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumTrustedDomainsEx
,
12946 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumTrustedDomainsEx
,
12947 (ndr_print_function_t
) ndr_print_lsa_EnumTrustedDomainsEx
,
12951 "lsa_CreateTrustedDomainEx",
12952 sizeof(struct lsa_CreateTrustedDomainEx
),
12953 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomainEx
,
12954 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomainEx
,
12955 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomainEx
,
12959 "lsa_CloseTrustedDomainEx",
12960 sizeof(struct lsa_CloseTrustedDomainEx
),
12961 (ndr_push_flags_fn_t
) ndr_push_lsa_CloseTrustedDomainEx
,
12962 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CloseTrustedDomainEx
,
12963 (ndr_print_function_t
) ndr_print_lsa_CloseTrustedDomainEx
,
12967 "lsa_QueryDomainInformationPolicy",
12968 sizeof(struct lsa_QueryDomainInformationPolicy
),
12969 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryDomainInformationPolicy
,
12970 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryDomainInformationPolicy
,
12971 (ndr_print_function_t
) ndr_print_lsa_QueryDomainInformationPolicy
,
12975 "lsa_SetDomainInformationPolicy",
12976 sizeof(struct lsa_SetDomainInformationPolicy
),
12977 (ndr_push_flags_fn_t
) ndr_push_lsa_SetDomainInformationPolicy
,
12978 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetDomainInformationPolicy
,
12979 (ndr_print_function_t
) ndr_print_lsa_SetDomainInformationPolicy
,
12983 "lsa_OpenTrustedDomainByName",
12984 sizeof(struct lsa_OpenTrustedDomainByName
),
12985 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenTrustedDomainByName
,
12986 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenTrustedDomainByName
,
12987 (ndr_print_function_t
) ndr_print_lsa_OpenTrustedDomainByName
,
12992 sizeof(struct lsa_TestCall
),
12993 (ndr_push_flags_fn_t
) ndr_push_lsa_TestCall
,
12994 (ndr_pull_flags_fn_t
) ndr_pull_lsa_TestCall
,
12995 (ndr_print_function_t
) ndr_print_lsa_TestCall
,
13000 sizeof(struct lsa_LookupSids2
),
13001 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids2
,
13002 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids2
,
13003 (ndr_print_function_t
) ndr_print_lsa_LookupSids2
,
13007 "lsa_LookupNames2",
13008 sizeof(struct lsa_LookupNames2
),
13009 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames2
,
13010 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames2
,
13011 (ndr_print_function_t
) ndr_print_lsa_LookupNames2
,
13015 "lsa_CreateTrustedDomainEx2",
13016 sizeof(struct lsa_CreateTrustedDomainEx2
),
13017 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomainEx2
,
13018 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomainEx2
,
13019 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomainEx2
,
13024 sizeof(struct lsa_CREDRWRITE
),
13025 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRWRITE
,
13026 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRWRITE
,
13027 (ndr_print_function_t
) ndr_print_lsa_CREDRWRITE
,
13032 sizeof(struct lsa_CREDRREAD
),
13033 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRREAD
,
13034 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRREAD
,
13035 (ndr_print_function_t
) ndr_print_lsa_CREDRREAD
,
13039 "lsa_CREDRENUMERATE",
13040 sizeof(struct lsa_CREDRENUMERATE
),
13041 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRENUMERATE
,
13042 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRENUMERATE
,
13043 (ndr_print_function_t
) ndr_print_lsa_CREDRENUMERATE
,
13047 "lsa_CREDRWRITEDOMAINCREDENTIALS",
13048 sizeof(struct lsa_CREDRWRITEDOMAINCREDENTIALS
),
13049 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13050 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13051 (ndr_print_function_t
) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13055 "lsa_CREDRREADDOMAINCREDENTIALS",
13056 sizeof(struct lsa_CREDRREADDOMAINCREDENTIALS
),
13057 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS
,
13058 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS
,
13059 (ndr_print_function_t
) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS
,
13064 sizeof(struct lsa_CREDRDELETE
),
13065 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRDELETE
,
13066 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRDELETE
,
13067 (ndr_print_function_t
) ndr_print_lsa_CREDRDELETE
,
13071 "lsa_CREDRGETTARGETINFO",
13072 sizeof(struct lsa_CREDRGETTARGETINFO
),
13073 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRGETTARGETINFO
,
13074 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRGETTARGETINFO
,
13075 (ndr_print_function_t
) ndr_print_lsa_CREDRGETTARGETINFO
,
13079 "lsa_CREDRPROFILELOADED",
13080 sizeof(struct lsa_CREDRPROFILELOADED
),
13081 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRPROFILELOADED
,
13082 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRPROFILELOADED
,
13083 (ndr_print_function_t
) ndr_print_lsa_CREDRPROFILELOADED
,
13087 "lsa_LookupNames3",
13088 sizeof(struct lsa_LookupNames3
),
13089 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames3
,
13090 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames3
,
13091 (ndr_print_function_t
) ndr_print_lsa_LookupNames3
,
13095 "lsa_CREDRGETSESSIONTYPES",
13096 sizeof(struct lsa_CREDRGETSESSIONTYPES
),
13097 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRGETSESSIONTYPES
,
13098 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRGETSESSIONTYPES
,
13099 (ndr_print_function_t
) ndr_print_lsa_CREDRGETSESSIONTYPES
,
13103 "lsa_LSARREGISTERAUDITEVENT",
13104 sizeof(struct lsa_LSARREGISTERAUDITEVENT
),
13105 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARREGISTERAUDITEVENT
,
13106 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARREGISTERAUDITEVENT
,
13107 (ndr_print_function_t
) ndr_print_lsa_LSARREGISTERAUDITEVENT
,
13111 "lsa_LSARGENAUDITEVENT",
13112 sizeof(struct lsa_LSARGENAUDITEVENT
),
13113 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARGENAUDITEVENT
,
13114 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARGENAUDITEVENT
,
13115 (ndr_print_function_t
) ndr_print_lsa_LSARGENAUDITEVENT
,
13119 "lsa_LSARUNREGISTERAUDITEVENT",
13120 sizeof(struct lsa_LSARUNREGISTERAUDITEVENT
),
13121 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARUNREGISTERAUDITEVENT
,
13122 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT
,
13123 (ndr_print_function_t
) ndr_print_lsa_LSARUNREGISTERAUDITEVENT
,
13127 "lsa_lsaRQueryForestTrustInformation",
13128 sizeof(struct lsa_lsaRQueryForestTrustInformation
),
13129 (ndr_push_flags_fn_t
) ndr_push_lsa_lsaRQueryForestTrustInformation
,
13130 (ndr_pull_flags_fn_t
) ndr_pull_lsa_lsaRQueryForestTrustInformation
,
13131 (ndr_print_function_t
) ndr_print_lsa_lsaRQueryForestTrustInformation
,
13135 "lsa_LSARSETFORESTTRUSTINFORMATION",
13136 sizeof(struct lsa_LSARSETFORESTTRUSTINFORMATION
),
13137 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION
,
13138 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION
,
13139 (ndr_print_function_t
) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION
,
13144 sizeof(struct lsa_CREDRRENAME
),
13145 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRRENAME
,
13146 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRRENAME
,
13147 (ndr_print_function_t
) ndr_print_lsa_CREDRRENAME
,
13152 sizeof(struct lsa_LookupSids3
),
13153 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids3
,
13154 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids3
,
13155 (ndr_print_function_t
) ndr_print_lsa_LookupSids3
,
13159 "lsa_LookupNames4",
13160 sizeof(struct lsa_LookupNames4
),
13161 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames4
,
13162 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames4
,
13163 (ndr_print_function_t
) ndr_print_lsa_LookupNames4
,
13167 "lsa_LSAROPENPOLICYSCE",
13168 sizeof(struct lsa_LSAROPENPOLICYSCE
),
13169 (ndr_push_flags_fn_t
) ndr_push_lsa_LSAROPENPOLICYSCE
,
13170 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSAROPENPOLICYSCE
,
13171 (ndr_print_function_t
) ndr_print_lsa_LSAROPENPOLICYSCE
,
13175 "lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
13176 sizeof(struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
),
13177 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13178 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13179 (ndr_print_function_t
) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13183 "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
13184 sizeof(struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
),
13185 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13186 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13187 (ndr_print_function_t
) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13191 "lsa_LSARADTREPORTSECURITYEVENT",
13192 sizeof(struct lsa_LSARADTREPORTSECURITYEVENT
),
13193 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTREPORTSECURITYEVENT
,
13194 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT
,
13195 (ndr_print_function_t
) ndr_print_lsa_LSARADTREPORTSECURITYEVENT
,
13198 { NULL
, 0, NULL
, NULL
, NULL
, false }
13201 static const char * const lsarpc_endpoint_strings
[] = {
13202 "ncacn_np:[\\pipe\\lsarpc]",
13203 "ncacn_np:[\\pipe\\netlogon]",
13204 "ncacn_np:[\\pipe\\lsass]",
13209 static const struct ndr_interface_string_array lsarpc_endpoints
= {
13211 .names
= lsarpc_endpoint_strings
13214 static const char * const lsarpc_authservice_strings
[] = {
13218 static const struct ndr_interface_string_array lsarpc_authservices
= {
13220 .names
= lsarpc_authservice_strings
13224 const struct ndr_interface_table ndr_table_lsarpc
= {
13227 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
13230 .helpstring
= NDR_LSARPC_HELPSTRING
,
13232 .calls
= lsarpc_calls
,
13233 .endpoints
= &lsarpc_endpoints
,
13234 .authservices
= &lsarpc_authservices