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
< ndr_get_array_length(ndr
, &r
->array
); cntr_array_1
++) {
430 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
432 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
433 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
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
);
831 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_NOTIFICATION", LSA_POLICY_NOTIFICATION
, r
);
835 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_AccountAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
837 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
838 return NDR_ERR_SUCCESS
;
841 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_AccountAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
844 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
846 return NDR_ERR_SUCCESS
;
849 _PUBLIC_
void ndr_print_lsa_AccountAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
851 ndr_print_uint32(ndr
, name
, r
);
853 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_VIEW", LSA_ACCOUNT_VIEW
, r
);
854 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_PRIVILEGES", LSA_ACCOUNT_ADJUST_PRIVILEGES
, r
);
855 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_QUOTAS", LSA_ACCOUNT_ADJUST_QUOTAS
, r
);
856 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS", LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS
, r
);
860 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SecretAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
862 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
863 return NDR_ERR_SUCCESS
;
866 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SecretAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
869 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
871 return NDR_ERR_SUCCESS
;
874 _PUBLIC_
void ndr_print_lsa_SecretAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
876 ndr_print_uint32(ndr
, name
, r
);
878 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_SECRET_SET_VALUE", LSA_SECRET_SET_VALUE
, r
);
879 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_SECRET_QUERY_VALUE", LSA_SECRET_QUERY_VALUE
, r
);
883 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustedAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
885 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
886 return NDR_ERR_SUCCESS
;
889 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustedAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
892 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
894 return NDR_ERR_SUCCESS
;
897 _PUBLIC_
void ndr_print_lsa_TrustedAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
899 ndr_print_uint32(ndr
, name
, r
);
901 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_DOMAIN_NAME", LSA_TRUSTED_QUERY_DOMAIN_NAME
, r
);
902 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_CONTROLLERS", LSA_TRUSTED_QUERY_CONTROLLERS
, r
);
903 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_SET_CONTROLLERS", LSA_TRUSTED_SET_CONTROLLERS
, r
);
904 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_POSIX", LSA_TRUSTED_QUERY_POSIX
, r
);
905 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_SET_POSIX", LSA_TRUSTED_SET_POSIX
, r
);
906 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_SET_AUTH", LSA_TRUSTED_SET_AUTH
, r
);
907 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_AUTH", LSA_TRUSTED_QUERY_AUTH
, r
);
911 static enum ndr_err_code
ndr_push_lsa_AuditLogInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditLogInfo
*r
)
913 if (ndr_flags
& NDR_SCALARS
) {
914 NDR_CHECK(ndr_push_align(ndr
, 8));
915 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->percent_full
));
916 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maximum_log_size
));
917 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->retention_time
));
918 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_in_progress
));
919 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->time_to_shutdown
));
920 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->next_audit_record
));
922 if (ndr_flags
& NDR_BUFFERS
) {
924 return NDR_ERR_SUCCESS
;
927 static enum ndr_err_code
ndr_pull_lsa_AuditLogInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditLogInfo
*r
)
929 if (ndr_flags
& NDR_SCALARS
) {
930 NDR_CHECK(ndr_pull_align(ndr
, 8));
931 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->percent_full
));
932 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maximum_log_size
));
933 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->retention_time
));
934 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_in_progress
));
935 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->time_to_shutdown
));
936 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->next_audit_record
));
938 if (ndr_flags
& NDR_BUFFERS
) {
940 return NDR_ERR_SUCCESS
;
943 _PUBLIC_
void ndr_print_lsa_AuditLogInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditLogInfo
*r
)
945 ndr_print_struct(ndr
, name
, "lsa_AuditLogInfo");
947 ndr_print_uint32(ndr
, "percent_full", r
->percent_full
);
948 ndr_print_uint32(ndr
, "maximum_log_size", r
->maximum_log_size
);
949 ndr_print_hyper(ndr
, "retention_time", r
->retention_time
);
950 ndr_print_uint8(ndr
, "shutdown_in_progress", r
->shutdown_in_progress
);
951 ndr_print_hyper(ndr
, "time_to_shutdown", r
->time_to_shutdown
);
952 ndr_print_uint32(ndr
, "next_audit_record", r
->next_audit_record
);
956 static enum ndr_err_code
ndr_push_lsa_PolicyAuditPolicy(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_PolicyAuditPolicy r
)
958 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
959 return NDR_ERR_SUCCESS
;
962 static enum ndr_err_code
ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_PolicyAuditPolicy
*r
)
965 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
967 return NDR_ERR_SUCCESS
;
970 _PUBLIC_
void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print
*ndr
, const char *name
, enum lsa_PolicyAuditPolicy r
)
972 const char *val
= NULL
;
975 case LSA_AUDIT_POLICY_NONE
: val
= "LSA_AUDIT_POLICY_NONE"; break;
976 case LSA_AUDIT_POLICY_SUCCESS
: val
= "LSA_AUDIT_POLICY_SUCCESS"; break;
977 case LSA_AUDIT_POLICY_FAILURE
: val
= "LSA_AUDIT_POLICY_FAILURE"; break;
978 case LSA_AUDIT_POLICY_ALL
: val
= "LSA_AUDIT_POLICY_ALL"; break;
979 case LSA_AUDIT_POLICY_CLEAR
: val
= "LSA_AUDIT_POLICY_CLEAR"; break;
981 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
984 static enum ndr_err_code
ndr_push_lsa_AuditEventsInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditEventsInfo
*r
)
986 uint32_t cntr_settings_1
;
987 if (ndr_flags
& NDR_SCALARS
) {
988 NDR_CHECK(ndr_push_align(ndr
, 4));
989 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->auditing_mode
));
990 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->settings
));
991 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
993 if (ndr_flags
& NDR_BUFFERS
) {
995 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
996 for (cntr_settings_1
= 0; cntr_settings_1
< r
->count
; cntr_settings_1
++) {
997 NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr
, NDR_SCALARS
, r
->settings
[cntr_settings_1
]));
1001 return NDR_ERR_SUCCESS
;
1004 static enum ndr_err_code
ndr_pull_lsa_AuditEventsInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditEventsInfo
*r
)
1006 uint32_t _ptr_settings
;
1007 uint32_t cntr_settings_1
;
1008 TALLOC_CTX
*_mem_save_settings_0
;
1009 TALLOC_CTX
*_mem_save_settings_1
;
1010 if (ndr_flags
& NDR_SCALARS
) {
1011 NDR_CHECK(ndr_pull_align(ndr
, 4));
1012 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->auditing_mode
));
1013 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_settings
));
1014 if (_ptr_settings
) {
1015 NDR_PULL_ALLOC(ndr
, r
->settings
);
1019 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1021 if (ndr_flags
& NDR_BUFFERS
) {
1023 _mem_save_settings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1024 NDR_PULL_SET_MEM_CTX(ndr
, r
->settings
, 0);
1025 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->settings
));
1026 NDR_PULL_ALLOC_N(ndr
, r
->settings
, ndr_get_array_size(ndr
, &r
->settings
));
1027 _mem_save_settings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1028 NDR_PULL_SET_MEM_CTX(ndr
, r
->settings
, 0);
1029 for (cntr_settings_1
= 0; cntr_settings_1
< r
->count
; cntr_settings_1
++) {
1030 NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr
, NDR_SCALARS
, &r
->settings
[cntr_settings_1
]));
1032 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_settings_1
, 0);
1033 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_settings_0
, 0);
1036 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->settings
, r
->count
));
1039 return NDR_ERR_SUCCESS
;
1042 _PUBLIC_
void ndr_print_lsa_AuditEventsInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditEventsInfo
*r
)
1044 uint32_t cntr_settings_1
;
1045 ndr_print_struct(ndr
, name
, "lsa_AuditEventsInfo");
1047 ndr_print_uint32(ndr
, "auditing_mode", r
->auditing_mode
);
1048 ndr_print_ptr(ndr
, "settings", r
->settings
);
1051 ndr
->print(ndr
, "%s: ARRAY(%d)", "settings", (int)r
->count
);
1053 for (cntr_settings_1
=0;cntr_settings_1
<r
->count
;cntr_settings_1
++) {
1055 if (asprintf(&idx_1
, "[%d]", cntr_settings_1
) != -1) {
1056 ndr_print_lsa_PolicyAuditPolicy(ndr
, "settings", r
->settings
[cntr_settings_1
]);
1063 ndr_print_uint32(ndr
, "count", r
->count
);
1067 static enum ndr_err_code
ndr_push_lsa_DomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfo
*r
)
1069 if (ndr_flags
& NDR_SCALARS
) {
1070 NDR_CHECK(ndr_push_align(ndr
, 4));
1071 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1072 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1074 if (ndr_flags
& NDR_BUFFERS
) {
1075 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1077 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1080 return NDR_ERR_SUCCESS
;
1083 static enum ndr_err_code
ndr_pull_lsa_DomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfo
*r
)
1086 TALLOC_CTX
*_mem_save_sid_0
;
1087 if (ndr_flags
& NDR_SCALARS
) {
1088 NDR_CHECK(ndr_pull_align(ndr
, 4));
1089 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1090 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1092 NDR_PULL_ALLOC(ndr
, r
->sid
);
1097 if (ndr_flags
& NDR_BUFFERS
) {
1098 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1100 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1101 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1102 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1103 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1106 return NDR_ERR_SUCCESS
;
1109 _PUBLIC_
void ndr_print_lsa_DomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfo
*r
)
1111 ndr_print_struct(ndr
, name
, "lsa_DomainInfo");
1113 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
1114 ndr_print_ptr(ndr
, "sid", r
->sid
);
1117 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1123 static enum ndr_err_code
ndr_push_lsa_PDAccountInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PDAccountInfo
*r
)
1125 if (ndr_flags
& NDR_SCALARS
) {
1126 NDR_CHECK(ndr_push_align(ndr
, 4));
1127 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1129 if (ndr_flags
& NDR_BUFFERS
) {
1130 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1132 return NDR_ERR_SUCCESS
;
1135 static enum ndr_err_code
ndr_pull_lsa_PDAccountInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PDAccountInfo
*r
)
1137 if (ndr_flags
& NDR_SCALARS
) {
1138 NDR_CHECK(ndr_pull_align(ndr
, 4));
1139 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1141 if (ndr_flags
& NDR_BUFFERS
) {
1142 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1144 return NDR_ERR_SUCCESS
;
1147 _PUBLIC_
void ndr_print_lsa_PDAccountInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_PDAccountInfo
*r
)
1149 ndr_print_struct(ndr
, name
, "lsa_PDAccountInfo");
1151 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1155 static enum ndr_err_code
ndr_push_lsa_Role(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_Role r
)
1157 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
1158 return NDR_ERR_SUCCESS
;
1161 static enum ndr_err_code
ndr_pull_lsa_Role(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_Role
*r
)
1164 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
1166 return NDR_ERR_SUCCESS
;
1169 _PUBLIC_
void ndr_print_lsa_Role(struct ndr_print
*ndr
, const char *name
, enum lsa_Role r
)
1171 const char *val
= NULL
;
1174 case LSA_ROLE_BACKUP
: val
= "LSA_ROLE_BACKUP"; break;
1175 case LSA_ROLE_PRIMARY
: val
= "LSA_ROLE_PRIMARY"; break;
1177 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1180 static enum ndr_err_code
ndr_push_lsa_ServerRole(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ServerRole
*r
)
1182 if (ndr_flags
& NDR_SCALARS
) {
1183 NDR_CHECK(ndr_push_align(ndr
, 4));
1184 NDR_CHECK(ndr_push_lsa_Role(ndr
, NDR_SCALARS
, r
->role
));
1186 if (ndr_flags
& NDR_BUFFERS
) {
1188 return NDR_ERR_SUCCESS
;
1191 static enum ndr_err_code
ndr_pull_lsa_ServerRole(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ServerRole
*r
)
1193 if (ndr_flags
& NDR_SCALARS
) {
1194 NDR_CHECK(ndr_pull_align(ndr
, 4));
1195 NDR_CHECK(ndr_pull_lsa_Role(ndr
, NDR_SCALARS
, &r
->role
));
1197 if (ndr_flags
& NDR_BUFFERS
) {
1199 return NDR_ERR_SUCCESS
;
1202 _PUBLIC_
void ndr_print_lsa_ServerRole(struct ndr_print
*ndr
, const char *name
, const struct lsa_ServerRole
*r
)
1204 ndr_print_struct(ndr
, name
, "lsa_ServerRole");
1206 ndr_print_lsa_Role(ndr
, "role", r
->role
);
1210 static enum ndr_err_code
ndr_push_lsa_ReplicaSourceInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ReplicaSourceInfo
*r
)
1212 if (ndr_flags
& NDR_SCALARS
) {
1213 NDR_CHECK(ndr_push_align(ndr
, 4));
1214 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->source
));
1215 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account
));
1217 if (ndr_flags
& NDR_BUFFERS
) {
1218 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->source
));
1219 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account
));
1221 return NDR_ERR_SUCCESS
;
1224 static enum ndr_err_code
ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ReplicaSourceInfo
*r
)
1226 if (ndr_flags
& NDR_SCALARS
) {
1227 NDR_CHECK(ndr_pull_align(ndr
, 4));
1228 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->source
));
1229 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account
));
1231 if (ndr_flags
& NDR_BUFFERS
) {
1232 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->source
));
1233 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account
));
1235 return NDR_ERR_SUCCESS
;
1238 _PUBLIC_
void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ReplicaSourceInfo
*r
)
1240 ndr_print_struct(ndr
, name
, "lsa_ReplicaSourceInfo");
1242 ndr_print_lsa_String(ndr
, "source", &r
->source
);
1243 ndr_print_lsa_String(ndr
, "account", &r
->account
);
1247 static enum ndr_err_code
ndr_push_lsa_DefaultQuotaInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DefaultQuotaInfo
*r
)
1249 if (ndr_flags
& NDR_SCALARS
) {
1250 NDR_CHECK(ndr_push_align(ndr
, 8));
1251 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->paged_pool
));
1252 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->non_paged_pool
));
1253 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->min_wss
));
1254 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_wss
));
1255 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pagefile
));
1256 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown
));
1258 if (ndr_flags
& NDR_BUFFERS
) {
1260 return NDR_ERR_SUCCESS
;
1263 static enum ndr_err_code
ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DefaultQuotaInfo
*r
)
1265 if (ndr_flags
& NDR_SCALARS
) {
1266 NDR_CHECK(ndr_pull_align(ndr
, 8));
1267 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->paged_pool
));
1268 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->non_paged_pool
));
1269 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->min_wss
));
1270 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_wss
));
1271 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pagefile
));
1272 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown
));
1274 if (ndr_flags
& NDR_BUFFERS
) {
1276 return NDR_ERR_SUCCESS
;
1279 _PUBLIC_
void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DefaultQuotaInfo
*r
)
1281 ndr_print_struct(ndr
, name
, "lsa_DefaultQuotaInfo");
1283 ndr_print_uint32(ndr
, "paged_pool", r
->paged_pool
);
1284 ndr_print_uint32(ndr
, "non_paged_pool", r
->non_paged_pool
);
1285 ndr_print_uint32(ndr
, "min_wss", r
->min_wss
);
1286 ndr_print_uint32(ndr
, "max_wss", r
->max_wss
);
1287 ndr_print_uint32(ndr
, "pagefile", r
->pagefile
);
1288 ndr_print_hyper(ndr
, "unknown", r
->unknown
);
1292 static enum ndr_err_code
ndr_push_lsa_ModificationInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ModificationInfo
*r
)
1294 if (ndr_flags
& NDR_SCALARS
) {
1295 NDR_CHECK(ndr_push_align(ndr
, 8));
1296 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->modified_id
));
1297 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->db_create_time
));
1299 if (ndr_flags
& NDR_BUFFERS
) {
1301 return NDR_ERR_SUCCESS
;
1304 static enum ndr_err_code
ndr_pull_lsa_ModificationInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ModificationInfo
*r
)
1306 if (ndr_flags
& NDR_SCALARS
) {
1307 NDR_CHECK(ndr_pull_align(ndr
, 8));
1308 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->modified_id
));
1309 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->db_create_time
));
1311 if (ndr_flags
& NDR_BUFFERS
) {
1313 return NDR_ERR_SUCCESS
;
1316 _PUBLIC_
void ndr_print_lsa_ModificationInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ModificationInfo
*r
)
1318 ndr_print_struct(ndr
, name
, "lsa_ModificationInfo");
1320 ndr_print_hyper(ndr
, "modified_id", r
->modified_id
);
1321 ndr_print_NTTIME_hyper(ndr
, "db_create_time", r
->db_create_time
);
1325 static enum ndr_err_code
ndr_push_lsa_AuditFullSetInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditFullSetInfo
*r
)
1327 if (ndr_flags
& NDR_SCALARS
) {
1328 NDR_CHECK(ndr_push_align(ndr
, 1));
1329 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_on_full
));
1331 if (ndr_flags
& NDR_BUFFERS
) {
1333 return NDR_ERR_SUCCESS
;
1336 static enum ndr_err_code
ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditFullSetInfo
*r
)
1338 if (ndr_flags
& NDR_SCALARS
) {
1339 NDR_CHECK(ndr_pull_align(ndr
, 1));
1340 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_on_full
));
1342 if (ndr_flags
& NDR_BUFFERS
) {
1344 return NDR_ERR_SUCCESS
;
1347 _PUBLIC_
void ndr_print_lsa_AuditFullSetInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditFullSetInfo
*r
)
1349 ndr_print_struct(ndr
, name
, "lsa_AuditFullSetInfo");
1351 ndr_print_uint8(ndr
, "shutdown_on_full", r
->shutdown_on_full
);
1355 static enum ndr_err_code
ndr_push_lsa_AuditFullQueryInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditFullQueryInfo
*r
)
1357 if (ndr_flags
& NDR_SCALARS
) {
1358 NDR_CHECK(ndr_push_align(ndr
, 1));
1359 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_on_full
));
1360 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->log_is_full
));
1362 if (ndr_flags
& NDR_BUFFERS
) {
1364 return NDR_ERR_SUCCESS
;
1367 static enum ndr_err_code
ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditFullQueryInfo
*r
)
1369 if (ndr_flags
& NDR_SCALARS
) {
1370 NDR_CHECK(ndr_pull_align(ndr
, 1));
1371 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_on_full
));
1372 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->log_is_full
));
1374 if (ndr_flags
& NDR_BUFFERS
) {
1376 return NDR_ERR_SUCCESS
;
1379 _PUBLIC_
void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditFullQueryInfo
*r
)
1381 ndr_print_struct(ndr
, name
, "lsa_AuditFullQueryInfo");
1383 ndr_print_uint8(ndr
, "shutdown_on_full", r
->shutdown_on_full
);
1384 ndr_print_uint8(ndr
, "log_is_full", r
->log_is_full
);
1388 static enum ndr_err_code
ndr_push_lsa_DnsDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DnsDomainInfo
*r
)
1390 if (ndr_flags
& NDR_SCALARS
) {
1391 NDR_CHECK(ndr_push_align(ndr
, 4));
1392 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1393 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain
));
1394 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_forest
));
1395 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
1396 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1398 if (ndr_flags
& NDR_BUFFERS
) {
1399 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1400 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain
));
1401 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_forest
));
1403 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1406 return NDR_ERR_SUCCESS
;
1409 static enum ndr_err_code
ndr_pull_lsa_DnsDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DnsDomainInfo
*r
)
1412 TALLOC_CTX
*_mem_save_sid_0
;
1413 if (ndr_flags
& NDR_SCALARS
) {
1414 NDR_CHECK(ndr_pull_align(ndr
, 4));
1415 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1416 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain
));
1417 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_forest
));
1418 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
1419 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1421 NDR_PULL_ALLOC(ndr
, r
->sid
);
1426 if (ndr_flags
& NDR_BUFFERS
) {
1427 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1428 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain
));
1429 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_forest
));
1431 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1432 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1433 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1434 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1437 return NDR_ERR_SUCCESS
;
1440 _PUBLIC_
void ndr_print_lsa_DnsDomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DnsDomainInfo
*r
)
1442 ndr_print_struct(ndr
, name
, "lsa_DnsDomainInfo");
1444 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
1445 ndr_print_lsa_StringLarge(ndr
, "dns_domain", &r
->dns_domain
);
1446 ndr_print_lsa_StringLarge(ndr
, "dns_forest", &r
->dns_forest
);
1447 ndr_print_GUID(ndr
, "domain_guid", &r
->domain_guid
);
1448 ndr_print_ptr(ndr
, "sid", r
->sid
);
1451 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1457 static enum ndr_err_code
ndr_push_lsa_PolicyInfo(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_PolicyInfo r
)
1459 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1460 return NDR_ERR_SUCCESS
;
1463 static enum ndr_err_code
ndr_pull_lsa_PolicyInfo(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_PolicyInfo
*r
)
1466 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1468 return NDR_ERR_SUCCESS
;
1471 _PUBLIC_
void ndr_print_lsa_PolicyInfo(struct ndr_print
*ndr
, const char *name
, enum lsa_PolicyInfo r
)
1473 const char *val
= NULL
;
1476 case LSA_POLICY_INFO_AUDIT_LOG
: val
= "LSA_POLICY_INFO_AUDIT_LOG"; break;
1477 case LSA_POLICY_INFO_AUDIT_EVENTS
: val
= "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
1478 case LSA_POLICY_INFO_DOMAIN
: val
= "LSA_POLICY_INFO_DOMAIN"; break;
1479 case LSA_POLICY_INFO_PD
: val
= "LSA_POLICY_INFO_PD"; break;
1480 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: val
= "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
1481 case LSA_POLICY_INFO_ROLE
: val
= "LSA_POLICY_INFO_ROLE"; break;
1482 case LSA_POLICY_INFO_REPLICA
: val
= "LSA_POLICY_INFO_REPLICA"; break;
1483 case LSA_POLICY_INFO_QUOTA
: val
= "LSA_POLICY_INFO_QUOTA"; break;
1484 case LSA_POLICY_INFO_MOD
: val
= "LSA_POLICY_INFO_MOD"; break;
1485 case LSA_POLICY_INFO_AUDIT_FULL_SET
: val
= "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
1486 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: val
= "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
1487 case LSA_POLICY_INFO_DNS
: val
= "LSA_POLICY_INFO_DNS"; break;
1488 case LSA_POLICY_INFO_DNS_INT
: val
= "LSA_POLICY_INFO_DNS_INT"; break;
1489 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: val
= "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
1491 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1494 static enum ndr_err_code
ndr_push_lsa_PolicyInformation(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_PolicyInformation
*r
)
1496 if (ndr_flags
& NDR_SCALARS
) {
1497 int level
= ndr_push_get_switch_value(ndr
, r
);
1498 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
1500 case LSA_POLICY_INFO_AUDIT_LOG
: {
1501 NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr
, NDR_SCALARS
, &r
->audit_log
));
1504 case LSA_POLICY_INFO_AUDIT_EVENTS
: {
1505 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr
, NDR_SCALARS
, &r
->audit_events
));
1508 case LSA_POLICY_INFO_DOMAIN
: {
1509 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domain
));
1512 case LSA_POLICY_INFO_PD
: {
1513 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr
, NDR_SCALARS
, &r
->pd
));
1516 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: {
1517 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->account_domain
));
1520 case LSA_POLICY_INFO_ROLE
: {
1521 NDR_CHECK(ndr_push_lsa_ServerRole(ndr
, NDR_SCALARS
, &r
->role
));
1524 case LSA_POLICY_INFO_REPLICA
: {
1525 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr
, NDR_SCALARS
, &r
->replica
));
1528 case LSA_POLICY_INFO_QUOTA
: {
1529 NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr
, NDR_SCALARS
, &r
->quota
));
1532 case LSA_POLICY_INFO_MOD
: {
1533 NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr
, NDR_SCALARS
, &r
->mod
));
1536 case LSA_POLICY_INFO_AUDIT_FULL_SET
: {
1537 NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr
, NDR_SCALARS
, &r
->auditfullset
));
1540 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: {
1541 NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr
, NDR_SCALARS
, &r
->auditfullquery
));
1544 case LSA_POLICY_INFO_DNS
: {
1545 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1548 case LSA_POLICY_INFO_DNS_INT
: {
1549 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1552 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: {
1553 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->l_account_domain
));
1557 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1560 if (ndr_flags
& NDR_BUFFERS
) {
1561 int level
= ndr_push_get_switch_value(ndr
, r
);
1563 case LSA_POLICY_INFO_AUDIT_LOG
:
1566 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1567 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr
, NDR_BUFFERS
, &r
->audit_events
));
1570 case LSA_POLICY_INFO_DOMAIN
:
1571 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domain
));
1574 case LSA_POLICY_INFO_PD
:
1575 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr
, NDR_BUFFERS
, &r
->pd
));
1578 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1579 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->account_domain
));
1582 case LSA_POLICY_INFO_ROLE
:
1585 case LSA_POLICY_INFO_REPLICA
:
1586 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr
, NDR_BUFFERS
, &r
->replica
));
1589 case LSA_POLICY_INFO_QUOTA
:
1592 case LSA_POLICY_INFO_MOD
:
1595 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1598 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1601 case LSA_POLICY_INFO_DNS
:
1602 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1605 case LSA_POLICY_INFO_DNS_INT
:
1606 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1609 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1610 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->l_account_domain
));
1614 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1617 return NDR_ERR_SUCCESS
;
1620 static enum ndr_err_code
ndr_pull_lsa_PolicyInformation(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_PolicyInformation
*r
)
1624 level
= ndr_pull_get_switch_value(ndr
, r
);
1625 if (ndr_flags
& NDR_SCALARS
) {
1626 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
1627 if (_level
!= level
) {
1628 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1631 case LSA_POLICY_INFO_AUDIT_LOG
: {
1632 NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr
, NDR_SCALARS
, &r
->audit_log
));
1635 case LSA_POLICY_INFO_AUDIT_EVENTS
: {
1636 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr
, NDR_SCALARS
, &r
->audit_events
));
1639 case LSA_POLICY_INFO_DOMAIN
: {
1640 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domain
));
1643 case LSA_POLICY_INFO_PD
: {
1644 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr
, NDR_SCALARS
, &r
->pd
));
1647 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: {
1648 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->account_domain
));
1651 case LSA_POLICY_INFO_ROLE
: {
1652 NDR_CHECK(ndr_pull_lsa_ServerRole(ndr
, NDR_SCALARS
, &r
->role
));
1655 case LSA_POLICY_INFO_REPLICA
: {
1656 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr
, NDR_SCALARS
, &r
->replica
));
1659 case LSA_POLICY_INFO_QUOTA
: {
1660 NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr
, NDR_SCALARS
, &r
->quota
));
1663 case LSA_POLICY_INFO_MOD
: {
1664 NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr
, NDR_SCALARS
, &r
->mod
));
1667 case LSA_POLICY_INFO_AUDIT_FULL_SET
: {
1668 NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr
, NDR_SCALARS
, &r
->auditfullset
));
1671 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: {
1672 NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr
, NDR_SCALARS
, &r
->auditfullquery
));
1675 case LSA_POLICY_INFO_DNS
: {
1676 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1679 case LSA_POLICY_INFO_DNS_INT
: {
1680 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1683 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: {
1684 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->l_account_domain
));
1688 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1691 if (ndr_flags
& NDR_BUFFERS
) {
1693 case LSA_POLICY_INFO_AUDIT_LOG
:
1696 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1697 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr
, NDR_BUFFERS
, &r
->audit_events
));
1700 case LSA_POLICY_INFO_DOMAIN
:
1701 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domain
));
1704 case LSA_POLICY_INFO_PD
:
1705 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr
, NDR_BUFFERS
, &r
->pd
));
1708 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1709 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->account_domain
));
1712 case LSA_POLICY_INFO_ROLE
:
1715 case LSA_POLICY_INFO_REPLICA
:
1716 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr
, NDR_BUFFERS
, &r
->replica
));
1719 case LSA_POLICY_INFO_QUOTA
:
1722 case LSA_POLICY_INFO_MOD
:
1725 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1728 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1731 case LSA_POLICY_INFO_DNS
:
1732 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1735 case LSA_POLICY_INFO_DNS_INT
:
1736 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1739 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1740 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->l_account_domain
));
1744 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1747 return NDR_ERR_SUCCESS
;
1750 _PUBLIC_
void ndr_print_lsa_PolicyInformation(struct ndr_print
*ndr
, const char *name
, const union lsa_PolicyInformation
*r
)
1753 level
= ndr_print_get_switch_value(ndr
, r
);
1754 ndr_print_union(ndr
, name
, level
, "lsa_PolicyInformation");
1756 case LSA_POLICY_INFO_AUDIT_LOG
:
1757 ndr_print_lsa_AuditLogInfo(ndr
, "audit_log", &r
->audit_log
);
1760 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1761 ndr_print_lsa_AuditEventsInfo(ndr
, "audit_events", &r
->audit_events
);
1764 case LSA_POLICY_INFO_DOMAIN
:
1765 ndr_print_lsa_DomainInfo(ndr
, "domain", &r
->domain
);
1768 case LSA_POLICY_INFO_PD
:
1769 ndr_print_lsa_PDAccountInfo(ndr
, "pd", &r
->pd
);
1772 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1773 ndr_print_lsa_DomainInfo(ndr
, "account_domain", &r
->account_domain
);
1776 case LSA_POLICY_INFO_ROLE
:
1777 ndr_print_lsa_ServerRole(ndr
, "role", &r
->role
);
1780 case LSA_POLICY_INFO_REPLICA
:
1781 ndr_print_lsa_ReplicaSourceInfo(ndr
, "replica", &r
->replica
);
1784 case LSA_POLICY_INFO_QUOTA
:
1785 ndr_print_lsa_DefaultQuotaInfo(ndr
, "quota", &r
->quota
);
1788 case LSA_POLICY_INFO_MOD
:
1789 ndr_print_lsa_ModificationInfo(ndr
, "mod", &r
->mod
);
1792 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1793 ndr_print_lsa_AuditFullSetInfo(ndr
, "auditfullset", &r
->auditfullset
);
1796 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1797 ndr_print_lsa_AuditFullQueryInfo(ndr
, "auditfullquery", &r
->auditfullquery
);
1800 case LSA_POLICY_INFO_DNS
:
1801 ndr_print_lsa_DnsDomainInfo(ndr
, "dns", &r
->dns
);
1804 case LSA_POLICY_INFO_DNS_INT
:
1805 ndr_print_lsa_DnsDomainInfo(ndr
, "dns", &r
->dns
);
1808 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1809 ndr_print_lsa_DomainInfo(ndr
, "l_account_domain", &r
->l_account_domain
);
1813 ndr_print_bad_level(ndr
, name
, level
);
1817 static enum ndr_err_code
ndr_push_lsa_SidPtr(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_SidPtr
*r
)
1819 if (ndr_flags
& NDR_SCALARS
) {
1820 NDR_CHECK(ndr_push_align(ndr
, 4));
1821 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1823 if (ndr_flags
& NDR_BUFFERS
) {
1825 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1828 return NDR_ERR_SUCCESS
;
1831 static enum ndr_err_code
ndr_pull_lsa_SidPtr(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_SidPtr
*r
)
1834 TALLOC_CTX
*_mem_save_sid_0
;
1835 if (ndr_flags
& NDR_SCALARS
) {
1836 NDR_CHECK(ndr_pull_align(ndr
, 4));
1837 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1839 NDR_PULL_ALLOC(ndr
, r
->sid
);
1844 if (ndr_flags
& NDR_BUFFERS
) {
1846 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1847 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1848 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1849 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1852 return NDR_ERR_SUCCESS
;
1855 _PUBLIC_
void ndr_print_lsa_SidPtr(struct ndr_print
*ndr
, const char *name
, const struct lsa_SidPtr
*r
)
1857 ndr_print_struct(ndr
, name
, "lsa_SidPtr");
1859 ndr_print_ptr(ndr
, "sid", r
->sid
);
1862 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1868 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SidArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_SidArray
*r
)
1870 uint32_t cntr_sids_1
;
1871 if (ndr_flags
& NDR_SCALARS
) {
1872 NDR_CHECK(ndr_push_align(ndr
, 4));
1873 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
1874 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
1876 if (ndr_flags
& NDR_BUFFERS
) {
1878 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
1879 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1880 NDR_CHECK(ndr_push_lsa_SidPtr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1882 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1883 NDR_CHECK(ndr_push_lsa_SidPtr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1887 return NDR_ERR_SUCCESS
;
1890 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SidArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_SidArray
*r
)
1893 uint32_t cntr_sids_1
;
1894 TALLOC_CTX
*_mem_save_sids_0
;
1895 TALLOC_CTX
*_mem_save_sids_1
;
1896 if (ndr_flags
& NDR_SCALARS
) {
1897 NDR_CHECK(ndr_pull_align(ndr
, 4));
1898 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_sids
));
1899 if (r
->num_sids
> 1000) {
1900 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1902 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
1904 NDR_PULL_ALLOC(ndr
, r
->sids
);
1909 if (ndr_flags
& NDR_BUFFERS
) {
1911 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1912 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1913 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
1914 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
1915 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1916 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1917 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1918 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1920 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1921 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1923 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
1924 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
1927 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->num_sids
));
1930 return NDR_ERR_SUCCESS
;
1933 _PUBLIC_
void ndr_print_lsa_SidArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_SidArray
*r
)
1935 uint32_t cntr_sids_1
;
1936 ndr_print_struct(ndr
, name
, "lsa_SidArray");
1938 ndr_print_uint32(ndr
, "num_sids", r
->num_sids
);
1939 ndr_print_ptr(ndr
, "sids", r
->sids
);
1942 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->num_sids
);
1944 for (cntr_sids_1
=0;cntr_sids_1
<r
->num_sids
;cntr_sids_1
++) {
1946 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
1947 ndr_print_lsa_SidPtr(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
1957 static enum ndr_err_code
ndr_push_lsa_DomainList(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainList
*r
)
1959 uint32_t cntr_domains_1
;
1960 if (ndr_flags
& NDR_SCALARS
) {
1961 NDR_CHECK(ndr_push_align(ndr
, 4));
1962 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1963 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
1965 if (ndr_flags
& NDR_BUFFERS
) {
1967 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1968 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
1969 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
1971 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
1972 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
1976 return NDR_ERR_SUCCESS
;
1979 static enum ndr_err_code
ndr_pull_lsa_DomainList(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainList
*r
)
1981 uint32_t _ptr_domains
;
1982 uint32_t cntr_domains_1
;
1983 TALLOC_CTX
*_mem_save_domains_0
;
1984 TALLOC_CTX
*_mem_save_domains_1
;
1985 if (ndr_flags
& NDR_SCALARS
) {
1986 NDR_CHECK(ndr_pull_align(ndr
, 4));
1987 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1988 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
1990 NDR_PULL_ALLOC(ndr
, r
->domains
);
1995 if (ndr_flags
& NDR_BUFFERS
) {
1997 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1998 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
1999 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
2000 NDR_PULL_ALLOC_N(ndr
, r
->domains
, ndr_get_array_size(ndr
, &r
->domains
));
2001 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2002 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2003 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2004 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2006 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2007 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2009 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
2010 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
2013 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
2016 return NDR_ERR_SUCCESS
;
2019 _PUBLIC_
void ndr_print_lsa_DomainList(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainList
*r
)
2021 uint32_t cntr_domains_1
;
2022 ndr_print_struct(ndr
, name
, "lsa_DomainList");
2024 ndr_print_uint32(ndr
, "count", r
->count
);
2025 ndr_print_ptr(ndr
, "domains", r
->domains
);
2028 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
2030 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
2032 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
2033 ndr_print_lsa_DomainInfo(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
2043 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SidType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_SidType r
)
2045 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
2046 return NDR_ERR_SUCCESS
;
2049 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SidType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_SidType
*r
)
2052 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
2054 return NDR_ERR_SUCCESS
;
2057 _PUBLIC_
void ndr_print_lsa_SidType(struct ndr_print
*ndr
, const char *name
, enum lsa_SidType r
)
2059 const char *val
= NULL
;
2062 case SID_NAME_USE_NONE
: val
= "SID_NAME_USE_NONE"; break;
2063 case SID_NAME_USER
: val
= "SID_NAME_USER"; break;
2064 case SID_NAME_DOM_GRP
: val
= "SID_NAME_DOM_GRP"; break;
2065 case SID_NAME_DOMAIN
: val
= "SID_NAME_DOMAIN"; break;
2066 case SID_NAME_ALIAS
: val
= "SID_NAME_ALIAS"; break;
2067 case SID_NAME_WKN_GRP
: val
= "SID_NAME_WKN_GRP"; break;
2068 case SID_NAME_DELETED
: val
= "SID_NAME_DELETED"; break;
2069 case SID_NAME_INVALID
: val
= "SID_NAME_INVALID"; break;
2070 case SID_NAME_UNKNOWN
: val
= "SID_NAME_UNKNOWN"; break;
2071 case SID_NAME_COMPUTER
: val
= "SID_NAME_COMPUTER"; break;
2073 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2076 static enum ndr_err_code
ndr_push_lsa_TranslatedSid(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid
*r
)
2078 if (ndr_flags
& NDR_SCALARS
) {
2079 NDR_CHECK(ndr_push_align(ndr
, 4));
2080 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
2081 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2082 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
2084 if (ndr_flags
& NDR_BUFFERS
) {
2086 return NDR_ERR_SUCCESS
;
2089 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid
*r
)
2091 if (ndr_flags
& NDR_SCALARS
) {
2092 NDR_CHECK(ndr_pull_align(ndr
, 4));
2093 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
2094 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2095 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
2097 if (ndr_flags
& NDR_BUFFERS
) {
2099 return NDR_ERR_SUCCESS
;
2102 _PUBLIC_
void ndr_print_lsa_TranslatedSid(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid
*r
)
2104 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid");
2106 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
2107 ndr_print_uint32(ndr
, "rid", r
->rid
);
2108 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
2112 static enum ndr_err_code
ndr_push_lsa_TransSidArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray
*r
)
2114 uint32_t cntr_sids_1
;
2115 if (ndr_flags
& NDR_SCALARS
) {
2116 NDR_CHECK(ndr_push_align(ndr
, 4));
2117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2118 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
2120 if (ndr_flags
& NDR_BUFFERS
) {
2122 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2123 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
2124 NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
2128 return NDR_ERR_SUCCESS
;
2131 static enum ndr_err_code
ndr_pull_lsa_TransSidArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray
*r
)
2134 uint32_t cntr_sids_1
;
2135 TALLOC_CTX
*_mem_save_sids_0
;
2136 TALLOC_CTX
*_mem_save_sids_1
;
2137 if (ndr_flags
& NDR_SCALARS
) {
2138 NDR_CHECK(ndr_pull_align(ndr
, 4));
2139 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2140 if (r
->count
> 1000) {
2141 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2143 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
2145 NDR_PULL_ALLOC(ndr
, r
->sids
);
2150 if (ndr_flags
& NDR_BUFFERS
) {
2152 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2153 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
2154 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
2155 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
2156 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2157 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
2158 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
2159 NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
2161 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
2162 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
2165 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
2168 return NDR_ERR_SUCCESS
;
2171 _PUBLIC_
void ndr_print_lsa_TransSidArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray
*r
)
2173 uint32_t cntr_sids_1
;
2174 ndr_print_struct(ndr
, name
, "lsa_TransSidArray");
2176 ndr_print_uint32(ndr
, "count", r
->count
);
2177 ndr_print_ptr(ndr
, "sids", r
->sids
);
2180 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
2182 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
2184 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
2185 ndr_print_lsa_TranslatedSid(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
2195 static enum ndr_err_code
ndr_push_lsa_RefDomainList(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_RefDomainList
*r
)
2197 uint32_t cntr_domains_1
;
2198 if (ndr_flags
& NDR_SCALARS
) {
2199 NDR_CHECK(ndr_push_align(ndr
, 4));
2200 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2201 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
2202 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_size
));
2204 if (ndr_flags
& NDR_BUFFERS
) {
2206 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2207 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2208 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2210 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2211 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2215 return NDR_ERR_SUCCESS
;
2218 static enum ndr_err_code
ndr_pull_lsa_RefDomainList(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_RefDomainList
*r
)
2220 uint32_t _ptr_domains
;
2221 uint32_t cntr_domains_1
;
2222 TALLOC_CTX
*_mem_save_domains_0
;
2223 TALLOC_CTX
*_mem_save_domains_1
;
2224 if (ndr_flags
& NDR_SCALARS
) {
2225 NDR_CHECK(ndr_pull_align(ndr
, 4));
2226 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2227 if (r
->count
> 1000) {
2228 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2230 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
2232 NDR_PULL_ALLOC(ndr
, r
->domains
);
2236 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_size
));
2238 if (ndr_flags
& NDR_BUFFERS
) {
2240 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2241 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2242 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
2243 NDR_PULL_ALLOC_N(ndr
, r
->domains
, ndr_get_array_size(ndr
, &r
->domains
));
2244 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2245 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2246 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2247 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2249 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2250 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2252 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
2253 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
2256 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
2259 return NDR_ERR_SUCCESS
;
2262 _PUBLIC_
void ndr_print_lsa_RefDomainList(struct ndr_print
*ndr
, const char *name
, const struct lsa_RefDomainList
*r
)
2264 uint32_t cntr_domains_1
;
2265 ndr_print_struct(ndr
, name
, "lsa_RefDomainList");
2267 ndr_print_uint32(ndr
, "count", r
->count
);
2268 ndr_print_ptr(ndr
, "domains", r
->domains
);
2271 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
2273 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
2275 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
2276 ndr_print_lsa_DomainInfo(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
2283 ndr_print_uint32(ndr
, "max_size", r
->max_size
);
2287 static enum ndr_err_code
ndr_push_lsa_LookupNamesLevel(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_LookupNamesLevel r
)
2289 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
2290 return NDR_ERR_SUCCESS
;
2293 static enum ndr_err_code
ndr_pull_lsa_LookupNamesLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_LookupNamesLevel
*r
)
2296 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
2298 return NDR_ERR_SUCCESS
;
2301 _PUBLIC_
void ndr_print_lsa_LookupNamesLevel(struct ndr_print
*ndr
, const char *name
, enum lsa_LookupNamesLevel r
)
2303 const char *val
= NULL
;
2306 case LSA_LOOKUP_NAMES_ALL
: val
= "LSA_LOOKUP_NAMES_ALL"; break;
2307 case LSA_LOOKUP_NAMES_DOMAINS_ONLY
: val
= "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break;
2308 case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY
: val
= "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break;
2309 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY
: val
= "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
2310 case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY
: val
= "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
2311 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2
: val
= "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
2312 case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC
: val
= "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
2314 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2317 static enum ndr_err_code
ndr_push_lsa_TranslatedName(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedName
*r
)
2319 if (ndr_flags
& NDR_SCALARS
) {
2320 NDR_CHECK(ndr_push_align(ndr
, 4));
2321 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
2322 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
2323 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
2325 if (ndr_flags
& NDR_BUFFERS
) {
2326 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
2328 return NDR_ERR_SUCCESS
;
2331 static enum ndr_err_code
ndr_pull_lsa_TranslatedName(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedName
*r
)
2333 if (ndr_flags
& NDR_SCALARS
) {
2334 NDR_CHECK(ndr_pull_align(ndr
, 4));
2335 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
2336 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
2337 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
2339 if (ndr_flags
& NDR_BUFFERS
) {
2340 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
2342 return NDR_ERR_SUCCESS
;
2345 _PUBLIC_
void ndr_print_lsa_TranslatedName(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedName
*r
)
2347 ndr_print_struct(ndr
, name
, "lsa_TranslatedName");
2349 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
2350 ndr_print_lsa_String(ndr
, "name", &r
->name
);
2351 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
2355 static enum ndr_err_code
ndr_push_lsa_TransNameArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransNameArray
*r
)
2357 uint32_t cntr_names_1
;
2358 if (ndr_flags
& NDR_SCALARS
) {
2359 NDR_CHECK(ndr_push_align(ndr
, 4));
2360 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2361 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
2363 if (ndr_flags
& NDR_BUFFERS
) {
2365 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2366 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2367 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
2369 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2370 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
2374 return NDR_ERR_SUCCESS
;
2377 static enum ndr_err_code
ndr_pull_lsa_TransNameArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransNameArray
*r
)
2379 uint32_t _ptr_names
;
2380 uint32_t cntr_names_1
;
2381 TALLOC_CTX
*_mem_save_names_0
;
2382 TALLOC_CTX
*_mem_save_names_1
;
2383 if (ndr_flags
& NDR_SCALARS
) {
2384 NDR_CHECK(ndr_pull_align(ndr
, 4));
2385 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2386 if (r
->count
> 1000) {
2387 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2389 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
2391 NDR_PULL_ALLOC(ndr
, r
->names
);
2396 if (ndr_flags
& NDR_BUFFERS
) {
2398 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2399 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
2400 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
2401 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
2402 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2403 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
2404 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2405 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
2407 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2408 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
2410 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
2411 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
2414 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
2417 return NDR_ERR_SUCCESS
;
2420 _PUBLIC_
void ndr_print_lsa_TransNameArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransNameArray
*r
)
2422 uint32_t cntr_names_1
;
2423 ndr_print_struct(ndr
, name
, "lsa_TransNameArray");
2425 ndr_print_uint32(ndr
, "count", r
->count
);
2426 ndr_print_ptr(ndr
, "names", r
->names
);
2429 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
2431 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
2433 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
2434 ndr_print_lsa_TranslatedName(ndr
, "names", &r
->names
[cntr_names_1
]);
2444 static enum ndr_err_code
ndr_push_lsa_LUIDAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_LUIDAttribute
*r
)
2446 if (ndr_flags
& NDR_SCALARS
) {
2447 NDR_CHECK(ndr_push_align(ndr
, 4));
2448 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
2449 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attribute
));
2451 if (ndr_flags
& NDR_BUFFERS
) {
2453 return NDR_ERR_SUCCESS
;
2456 static enum ndr_err_code
ndr_pull_lsa_LUIDAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_LUIDAttribute
*r
)
2458 if (ndr_flags
& NDR_SCALARS
) {
2459 NDR_CHECK(ndr_pull_align(ndr
, 4));
2460 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
2461 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attribute
));
2463 if (ndr_flags
& NDR_BUFFERS
) {
2465 return NDR_ERR_SUCCESS
;
2468 _PUBLIC_
void ndr_print_lsa_LUIDAttribute(struct ndr_print
*ndr
, const char *name
, const struct lsa_LUIDAttribute
*r
)
2470 ndr_print_struct(ndr
, name
, "lsa_LUIDAttribute");
2472 ndr_print_lsa_LUID(ndr
, "luid", &r
->luid
);
2473 ndr_print_uint32(ndr
, "attribute", r
->attribute
);
2477 static enum ndr_err_code
ndr_push_lsa_PrivilegeSet(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivilegeSet
*r
)
2479 uint32_t cntr_set_0
;
2480 if (ndr_flags
& NDR_SCALARS
) {
2481 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2482 NDR_CHECK(ndr_push_align(ndr
, 4));
2483 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
2485 for (cntr_set_0
= 0; cntr_set_0
< r
->count
; cntr_set_0
++) {
2486 NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr
, NDR_SCALARS
, &r
->set
[cntr_set_0
]));
2489 if (ndr_flags
& NDR_BUFFERS
) {
2491 return NDR_ERR_SUCCESS
;
2494 static enum ndr_err_code
ndr_pull_lsa_PrivilegeSet(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivilegeSet
*r
)
2496 uint32_t cntr_set_0
;
2497 TALLOC_CTX
*_mem_save_set_0
;
2498 if (ndr_flags
& NDR_SCALARS
) {
2499 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->set
));
2500 NDR_CHECK(ndr_pull_align(ndr
, 4));
2501 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2502 if (r
->count
> 1000) {
2503 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2505 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
2506 NDR_PULL_ALLOC_N(ndr
, r
->set
, ndr_get_array_size(ndr
, &r
->set
));
2507 _mem_save_set_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2508 NDR_PULL_SET_MEM_CTX(ndr
, r
->set
, 0);
2509 for (cntr_set_0
= 0; cntr_set_0
< r
->count
; cntr_set_0
++) {
2510 NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr
, NDR_SCALARS
, &r
->set
[cntr_set_0
]));
2512 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_set_0
, 0);
2514 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->set
, r
->count
));
2517 if (ndr_flags
& NDR_BUFFERS
) {
2519 return NDR_ERR_SUCCESS
;
2522 _PUBLIC_
void ndr_print_lsa_PrivilegeSet(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivilegeSet
*r
)
2524 uint32_t cntr_set_0
;
2525 ndr_print_struct(ndr
, name
, "lsa_PrivilegeSet");
2527 ndr_print_uint32(ndr
, "count", r
->count
);
2528 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
2529 ndr
->print(ndr
, "%s: ARRAY(%d)", "set", (int)r
->count
);
2531 for (cntr_set_0
=0;cntr_set_0
<r
->count
;cntr_set_0
++) {
2533 if (asprintf(&idx_0
, "[%d]", cntr_set_0
) != -1) {
2534 ndr_print_lsa_LUIDAttribute(ndr
, "set", &r
->set
[cntr_set_0
]);
2542 static enum ndr_err_code
ndr_push_lsa_DATA_BUF(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF
*r
)
2545 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2546 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2547 if (ndr_flags
& NDR_SCALARS
) {
2548 NDR_CHECK(ndr_push_align(ndr
, 4));
2549 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
2550 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2551 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
2553 if (ndr_flags
& NDR_BUFFERS
) {
2555 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2556 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2557 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
2558 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
2561 ndr
->flags
= _flags_save_STRUCT
;
2563 return NDR_ERR_SUCCESS
;
2566 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF
*r
)
2569 TALLOC_CTX
*_mem_save_data_0
;
2571 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2572 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2573 if (ndr_flags
& NDR_SCALARS
) {
2574 NDR_CHECK(ndr_pull_align(ndr
, 4));
2575 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
2576 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2577 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2579 NDR_PULL_ALLOC(ndr
, r
->data
);
2584 if (ndr_flags
& NDR_BUFFERS
) {
2586 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2587 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
2588 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
2589 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data
));
2590 if (ndr_get_array_length(ndr
, &r
->data
) > ndr_get_array_size(ndr
, &r
->data
)) {
2591 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
));
2593 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
2594 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_length(ndr
, &r
->data
)));
2595 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2598 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
2601 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->data
, r
->length
));
2604 ndr
->flags
= _flags_save_STRUCT
;
2606 return NDR_ERR_SUCCESS
;
2609 _PUBLIC_
void ndr_print_lsa_DATA_BUF(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF
*r
)
2611 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF");
2613 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2614 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2616 ndr_print_uint32(ndr
, "length", r
->length
);
2617 ndr_print_uint32(ndr
, "size", r
->size
);
2618 ndr_print_ptr(ndr
, "data", r
->data
);
2621 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
2625 ndr
->flags
= _flags_save_STRUCT
;
2629 static enum ndr_err_code
ndr_push_lsa_DATA_BUF2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF2
*r
)
2632 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2633 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2634 if (ndr_flags
& NDR_SCALARS
) {
2635 NDR_CHECK(ndr_push_align(ndr
, 4));
2636 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2637 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
2639 if (ndr_flags
& NDR_BUFFERS
) {
2641 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2642 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->size
));
2645 ndr
->flags
= _flags_save_STRUCT
;
2647 return NDR_ERR_SUCCESS
;
2650 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF2
*r
)
2653 TALLOC_CTX
*_mem_save_data_0
;
2655 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2656 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2657 if (ndr_flags
& NDR_SCALARS
) {
2658 NDR_CHECK(ndr_pull_align(ndr
, 4));
2659 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2660 if (r
->size
> 65536) {
2661 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2663 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2665 NDR_PULL_ALLOC(ndr
, r
->data
);
2670 if (ndr_flags
& NDR_BUFFERS
) {
2672 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2673 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
2674 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
2675 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
2676 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
2677 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2680 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
2683 ndr
->flags
= _flags_save_STRUCT
;
2685 return NDR_ERR_SUCCESS
;
2688 _PUBLIC_
void ndr_print_lsa_DATA_BUF2(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF2
*r
)
2690 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF2");
2692 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2693 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2695 ndr_print_uint32(ndr
, "size", r
->size
);
2696 ndr_print_ptr(ndr
, "data", r
->data
);
2699 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->size
);
2703 ndr
->flags
= _flags_save_STRUCT
;
2707 static enum ndr_err_code
ndr_push_lsa_TrustDomInfoEnum(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustDomInfoEnum r
)
2709 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
2710 return NDR_ERR_SUCCESS
;
2713 static enum ndr_err_code
ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustDomInfoEnum
*r
)
2716 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
2718 return NDR_ERR_SUCCESS
;
2721 _PUBLIC_
void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustDomInfoEnum r
)
2723 const char *val
= NULL
;
2726 case LSA_TRUSTED_DOMAIN_INFO_NAME
: val
= "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
2727 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: val
= "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
2728 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: val
= "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
2729 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: val
= "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
2730 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: val
= "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
2731 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: val
= "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
2732 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: val
= "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
2733 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
2734 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
2735 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
2736 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
2737 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
2738 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
: val
= "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES"; break;
2740 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2743 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustDirection(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2745 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2746 return NDR_ERR_SUCCESS
;
2749 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustDirection(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2752 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2754 return NDR_ERR_SUCCESS
;
2757 _PUBLIC_
void ndr_print_lsa_TrustDirection(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2759 ndr_print_uint32(ndr
, name
, r
);
2761 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND
, r
);
2762 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND
, r
);
2766 static enum ndr_err_code
ndr_push_lsa_TrustType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustType r
)
2768 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2769 return NDR_ERR_SUCCESS
;
2772 static enum ndr_err_code
ndr_pull_lsa_TrustType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustType
*r
)
2775 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2777 return NDR_ERR_SUCCESS
;
2780 _PUBLIC_
void ndr_print_lsa_TrustType(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustType r
)
2782 const char *val
= NULL
;
2785 case LSA_TRUST_TYPE_DOWNLEVEL
: val
= "LSA_TRUST_TYPE_DOWNLEVEL"; break;
2786 case LSA_TRUST_TYPE_UPLEVEL
: val
= "LSA_TRUST_TYPE_UPLEVEL"; break;
2787 case LSA_TRUST_TYPE_MIT
: val
= "LSA_TRUST_TYPE_MIT"; break;
2789 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2792 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustAttributes(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2794 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2795 return NDR_ERR_SUCCESS
;
2798 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustAttributes(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2801 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2803 return NDR_ERR_SUCCESS
;
2806 _PUBLIC_
void ndr_print_lsa_TrustAttributes(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2808 ndr_print_uint32(ndr
, name
, r
);
2810 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE
, r
);
2811 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY
, r
);
2812 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
, r
);
2813 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
, r
);
2814 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
, r
);
2815 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST
, r
);
2816 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
, r
);
2817 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION
, r
);
2821 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoName(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoName
*r
)
2823 if (ndr_flags
& NDR_SCALARS
) {
2824 NDR_CHECK(ndr_push_align(ndr
, 4));
2825 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2827 if (ndr_flags
& NDR_BUFFERS
) {
2828 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
2830 return NDR_ERR_SUCCESS
;
2833 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoName
*r
)
2835 if (ndr_flags
& NDR_SCALARS
) {
2836 NDR_CHECK(ndr_pull_align(ndr
, 4));
2837 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2839 if (ndr_flags
& NDR_BUFFERS
) {
2840 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
2842 return NDR_ERR_SUCCESS
;
2845 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoName(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoName
*r
)
2847 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoName");
2849 ndr_print_lsa_StringLarge(ndr
, "netbios_name", &r
->netbios_name
);
2853 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoControllers
*r
)
2855 uint32_t cntr_netbios_names_1
;
2856 if (ndr_flags
& NDR_SCALARS
) {
2857 NDR_CHECK(ndr_push_align(ndr
, 4));
2858 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries
));
2859 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_names
));
2861 if (ndr_flags
& NDR_BUFFERS
) {
2862 if (r
->netbios_names
) {
2863 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries
));
2864 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2865 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2867 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2868 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2872 return NDR_ERR_SUCCESS
;
2875 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoControllers
*r
)
2877 uint32_t _ptr_netbios_names
;
2878 uint32_t cntr_netbios_names_1
;
2879 TALLOC_CTX
*_mem_save_netbios_names_0
;
2880 TALLOC_CTX
*_mem_save_netbios_names_1
;
2881 if (ndr_flags
& NDR_SCALARS
) {
2882 NDR_CHECK(ndr_pull_align(ndr
, 4));
2883 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->entries
));
2884 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_names
));
2885 if (_ptr_netbios_names
) {
2886 NDR_PULL_ALLOC(ndr
, r
->netbios_names
);
2888 r
->netbios_names
= NULL
;
2891 if (ndr_flags
& NDR_BUFFERS
) {
2892 if (r
->netbios_names
) {
2893 _mem_save_netbios_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2894 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_names
, 0);
2895 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_names
));
2896 NDR_PULL_ALLOC_N(ndr
, r
->netbios_names
, ndr_get_array_size(ndr
, &r
->netbios_names
));
2897 _mem_save_netbios_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2898 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_names
, 0);
2899 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2900 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2902 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2903 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2905 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_names_1
, 0);
2906 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_names_0
, 0);
2908 if (r
->netbios_names
) {
2909 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->netbios_names
, r
->entries
));
2912 return NDR_ERR_SUCCESS
;
2915 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoControllers
*r
)
2917 uint32_t cntr_netbios_names_1
;
2918 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoControllers");
2920 ndr_print_uint32(ndr
, "entries", r
->entries
);
2921 ndr_print_ptr(ndr
, "netbios_names", r
->netbios_names
);
2923 if (r
->netbios_names
) {
2924 ndr
->print(ndr
, "%s: ARRAY(%d)", "netbios_names", (int)r
->entries
);
2926 for (cntr_netbios_names_1
=0;cntr_netbios_names_1
<r
->entries
;cntr_netbios_names_1
++) {
2928 if (asprintf(&idx_1
, "[%d]", cntr_netbios_names_1
) != -1) {
2929 ndr_print_lsa_StringLarge(ndr
, "netbios_names", &r
->netbios_names
[cntr_netbios_names_1
]);
2939 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoPosixOffset
*r
)
2941 if (ndr_flags
& NDR_SCALARS
) {
2942 NDR_CHECK(ndr_push_align(ndr
, 4));
2943 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->posix_offset
));
2945 if (ndr_flags
& NDR_BUFFERS
) {
2947 return NDR_ERR_SUCCESS
;
2950 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoPosixOffset
*r
)
2952 if (ndr_flags
& NDR_SCALARS
) {
2953 NDR_CHECK(ndr_pull_align(ndr
, 4));
2954 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->posix_offset
));
2956 if (ndr_flags
& NDR_BUFFERS
) {
2958 return NDR_ERR_SUCCESS
;
2961 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoPosixOffset
*r
)
2963 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoPosixOffset");
2965 ndr_print_uint32(ndr
, "posix_offset", r
->posix_offset
);
2969 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoPassword
*r
)
2971 if (ndr_flags
& NDR_SCALARS
) {
2972 NDR_CHECK(ndr_push_align(ndr
, 4));
2973 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->password
));
2974 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->old_password
));
2976 if (ndr_flags
& NDR_BUFFERS
) {
2978 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
2980 if (r
->old_password
) {
2981 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->old_password
));
2984 return NDR_ERR_SUCCESS
;
2987 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoPassword
*r
)
2989 uint32_t _ptr_password
;
2990 TALLOC_CTX
*_mem_save_password_0
;
2991 uint32_t _ptr_old_password
;
2992 TALLOC_CTX
*_mem_save_old_password_0
;
2993 if (ndr_flags
& NDR_SCALARS
) {
2994 NDR_CHECK(ndr_pull_align(ndr
, 4));
2995 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
2996 if (_ptr_password
) {
2997 NDR_PULL_ALLOC(ndr
, r
->password
);
3001 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_password
));
3002 if (_ptr_old_password
) {
3003 NDR_PULL_ALLOC(ndr
, r
->old_password
);
3005 r
->old_password
= NULL
;
3008 if (ndr_flags
& NDR_BUFFERS
) {
3010 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3011 NDR_PULL_SET_MEM_CTX(ndr
, r
->password
, 0);
3012 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
3013 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
3015 if (r
->old_password
) {
3016 _mem_save_old_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3017 NDR_PULL_SET_MEM_CTX(ndr
, r
->old_password
, 0);
3018 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->old_password
));
3019 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_password_0
, 0);
3022 return NDR_ERR_SUCCESS
;
3025 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoPassword
*r
)
3027 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoPassword");
3029 ndr_print_ptr(ndr
, "password", r
->password
);
3032 ndr_print_lsa_DATA_BUF(ndr
, "password", r
->password
);
3035 ndr_print_ptr(ndr
, "old_password", r
->old_password
);
3037 if (r
->old_password
) {
3038 ndr_print_lsa_DATA_BUF(ndr
, "old_password", r
->old_password
);
3044 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoBasic
*r
)
3046 if (ndr_flags
& NDR_SCALARS
) {
3047 NDR_CHECK(ndr_push_align(ndr
, 4));
3048 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3049 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
3051 if (ndr_flags
& NDR_BUFFERS
) {
3052 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3054 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3057 return NDR_ERR_SUCCESS
;
3060 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoBasic
*r
)
3063 TALLOC_CTX
*_mem_save_sid_0
;
3064 if (ndr_flags
& NDR_SCALARS
) {
3065 NDR_CHECK(ndr_pull_align(ndr
, 4));
3066 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3067 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
3069 NDR_PULL_ALLOC(ndr
, r
->sid
);
3074 if (ndr_flags
& NDR_BUFFERS
) {
3075 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3077 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3078 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
3079 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3080 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
3083 return NDR_ERR_SUCCESS
;
3086 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoBasic
*r
)
3088 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoBasic");
3090 ndr_print_lsa_String(ndr
, "netbios_name", &r
->netbios_name
);
3091 ndr_print_ptr(ndr
, "sid", r
->sid
);
3094 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
3100 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoInfoEx
*r
)
3102 if (ndr_flags
& NDR_SCALARS
) {
3103 NDR_CHECK(ndr_push_align(ndr
, 4));
3104 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain_name
));
3105 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3106 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
3107 NDR_CHECK(ndr_push_lsa_TrustDirection(ndr
, NDR_SCALARS
, r
->trust_direction
));
3108 NDR_CHECK(ndr_push_lsa_TrustType(ndr
, NDR_SCALARS
, r
->trust_type
));
3109 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr
, NDR_SCALARS
, r
->trust_attributes
));
3111 if (ndr_flags
& NDR_BUFFERS
) {
3112 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3113 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3115 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3118 return NDR_ERR_SUCCESS
;
3121 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoInfoEx
*r
)
3124 TALLOC_CTX
*_mem_save_sid_0
;
3125 if (ndr_flags
& NDR_SCALARS
) {
3126 NDR_CHECK(ndr_pull_align(ndr
, 4));
3127 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain_name
));
3128 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3129 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
3131 NDR_PULL_ALLOC(ndr
, r
->sid
);
3135 NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr
, NDR_SCALARS
, &r
->trust_direction
));
3136 NDR_CHECK(ndr_pull_lsa_TrustType(ndr
, NDR_SCALARS
, &r
->trust_type
));
3137 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr
, NDR_SCALARS
, &r
->trust_attributes
));
3139 if (ndr_flags
& NDR_BUFFERS
) {
3140 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3141 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3143 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3144 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
3145 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3146 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
3149 return NDR_ERR_SUCCESS
;
3152 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoInfoEx
*r
)
3154 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoInfoEx");
3156 ndr_print_lsa_StringLarge(ndr
, "domain_name", &r
->domain_name
);
3157 ndr_print_lsa_StringLarge(ndr
, "netbios_name", &r
->netbios_name
);
3158 ndr_print_ptr(ndr
, "sid", r
->sid
);
3161 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
3164 ndr_print_lsa_TrustDirection(ndr
, "trust_direction", r
->trust_direction
);
3165 ndr_print_lsa_TrustType(ndr
, "trust_type", r
->trust_type
);
3166 ndr_print_lsa_TrustAttributes(ndr
, "trust_attributes", r
->trust_attributes
);
3170 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustAuthType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustAuthType r
)
3172 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3173 return NDR_ERR_SUCCESS
;
3176 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustAuthType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustAuthType
*r
)
3179 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3181 return NDR_ERR_SUCCESS
;
3184 _PUBLIC_
void ndr_print_lsa_TrustAuthType(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustAuthType r
)
3186 const char *val
= NULL
;
3189 case TRUST_AUTH_TYPE_NONE
: val
= "TRUST_AUTH_TYPE_NONE"; break;
3190 case TRUST_AUTH_TYPE_NT4OWF
: val
= "TRUST_AUTH_TYPE_NT4OWF"; break;
3191 case TRUST_AUTH_TYPE_CLEAR
: val
= "TRUST_AUTH_TYPE_CLEAR"; break;
3192 case TRUST_AUTH_TYPE_VERSION
: val
= "TRUST_AUTH_TYPE_VERSION"; break;
3194 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3197 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoBuffer
*r
)
3199 if (ndr_flags
& NDR_SCALARS
) {
3200 NDR_CHECK(ndr_push_align(ndr
, 8));
3201 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->last_update_time
));
3202 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr
, NDR_SCALARS
, r
->AuthType
));
3203 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->data
));
3205 if (ndr_flags
& NDR_BUFFERS
) {
3206 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->data
));
3208 return NDR_ERR_SUCCESS
;
3211 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoBuffer
*r
)
3213 if (ndr_flags
& NDR_SCALARS
) {
3214 NDR_CHECK(ndr_pull_align(ndr
, 8));
3215 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->last_update_time
));
3216 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr
, NDR_SCALARS
, &r
->AuthType
));
3217 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->data
));
3219 if (ndr_flags
& NDR_BUFFERS
) {
3220 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->data
));
3222 return NDR_ERR_SUCCESS
;
3225 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoBuffer
*r
)
3227 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoBuffer");
3229 ndr_print_NTTIME_hyper(ndr
, "last_update_time", r
->last_update_time
);
3230 ndr_print_lsa_TrustAuthType(ndr
, "AuthType", r
->AuthType
);
3231 ndr_print_lsa_DATA_BUF2(ndr
, "data", &r
->data
);
3235 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoAuthInfo
*r
)
3237 if (ndr_flags
& NDR_SCALARS
) {
3238 NDR_CHECK(ndr_push_align(ndr
, 4));
3239 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->incoming_count
));
3240 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->incoming_current_auth_info
));
3241 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->incoming_previous_auth_info
));
3242 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->outgoing_count
));
3243 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->outgoing_current_auth_info
));
3244 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->outgoing_previous_auth_info
));
3246 if (ndr_flags
& NDR_BUFFERS
) {
3247 if (r
->incoming_current_auth_info
) {
3248 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_current_auth_info
));
3250 if (r
->incoming_previous_auth_info
) {
3251 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_previous_auth_info
));
3253 if (r
->outgoing_current_auth_info
) {
3254 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_current_auth_info
));
3256 if (r
->outgoing_previous_auth_info
) {
3257 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_previous_auth_info
));
3260 return NDR_ERR_SUCCESS
;
3263 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoAuthInfo
*r
)
3265 uint32_t _ptr_incoming_current_auth_info
;
3266 TALLOC_CTX
*_mem_save_incoming_current_auth_info_0
;
3267 uint32_t _ptr_incoming_previous_auth_info
;
3268 TALLOC_CTX
*_mem_save_incoming_previous_auth_info_0
;
3269 uint32_t _ptr_outgoing_current_auth_info
;
3270 TALLOC_CTX
*_mem_save_outgoing_current_auth_info_0
;
3271 uint32_t _ptr_outgoing_previous_auth_info
;
3272 TALLOC_CTX
*_mem_save_outgoing_previous_auth_info_0
;
3273 if (ndr_flags
& NDR_SCALARS
) {
3274 NDR_CHECK(ndr_pull_align(ndr
, 4));
3275 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->incoming_count
));
3276 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_incoming_current_auth_info
));
3277 if (_ptr_incoming_current_auth_info
) {
3278 NDR_PULL_ALLOC(ndr
, r
->incoming_current_auth_info
);
3280 r
->incoming_current_auth_info
= NULL
;
3282 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_incoming_previous_auth_info
));
3283 if (_ptr_incoming_previous_auth_info
) {
3284 NDR_PULL_ALLOC(ndr
, r
->incoming_previous_auth_info
);
3286 r
->incoming_previous_auth_info
= NULL
;
3288 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->outgoing_count
));
3289 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_outgoing_current_auth_info
));
3290 if (_ptr_outgoing_current_auth_info
) {
3291 NDR_PULL_ALLOC(ndr
, r
->outgoing_current_auth_info
);
3293 r
->outgoing_current_auth_info
= NULL
;
3295 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_outgoing_previous_auth_info
));
3296 if (_ptr_outgoing_previous_auth_info
) {
3297 NDR_PULL_ALLOC(ndr
, r
->outgoing_previous_auth_info
);
3299 r
->outgoing_previous_auth_info
= NULL
;
3302 if (ndr_flags
& NDR_BUFFERS
) {
3303 if (r
->incoming_current_auth_info
) {
3304 _mem_save_incoming_current_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3305 NDR_PULL_SET_MEM_CTX(ndr
, r
->incoming_current_auth_info
, 0);
3306 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_current_auth_info
));
3307 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_incoming_current_auth_info_0
, 0);
3309 if (r
->incoming_previous_auth_info
) {
3310 _mem_save_incoming_previous_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3311 NDR_PULL_SET_MEM_CTX(ndr
, r
->incoming_previous_auth_info
, 0);
3312 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_previous_auth_info
));
3313 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_incoming_previous_auth_info_0
, 0);
3315 if (r
->outgoing_current_auth_info
) {
3316 _mem_save_outgoing_current_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3317 NDR_PULL_SET_MEM_CTX(ndr
, r
->outgoing_current_auth_info
, 0);
3318 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_current_auth_info
));
3319 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_outgoing_current_auth_info_0
, 0);
3321 if (r
->outgoing_previous_auth_info
) {
3322 _mem_save_outgoing_previous_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3323 NDR_PULL_SET_MEM_CTX(ndr
, r
->outgoing_previous_auth_info
, 0);
3324 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_previous_auth_info
));
3325 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_outgoing_previous_auth_info_0
, 0);
3328 return NDR_ERR_SUCCESS
;
3331 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoAuthInfo
*r
)
3333 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoAuthInfo");
3335 ndr_print_uint32(ndr
, "incoming_count", r
->incoming_count
);
3336 ndr_print_ptr(ndr
, "incoming_current_auth_info", r
->incoming_current_auth_info
);
3338 if (r
->incoming_current_auth_info
) {
3339 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "incoming_current_auth_info", r
->incoming_current_auth_info
);
3342 ndr_print_ptr(ndr
, "incoming_previous_auth_info", r
->incoming_previous_auth_info
);
3344 if (r
->incoming_previous_auth_info
) {
3345 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "incoming_previous_auth_info", r
->incoming_previous_auth_info
);
3348 ndr_print_uint32(ndr
, "outgoing_count", r
->outgoing_count
);
3349 ndr_print_ptr(ndr
, "outgoing_current_auth_info", r
->outgoing_current_auth_info
);
3351 if (r
->outgoing_current_auth_info
) {
3352 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "outgoing_current_auth_info", r
->outgoing_current_auth_info
);
3355 ndr_print_ptr(ndr
, "outgoing_previous_auth_info", r
->outgoing_previous_auth_info
);
3357 if (r
->outgoing_previous_auth_info
) {
3358 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "outgoing_previous_auth_info", r
->outgoing_previous_auth_info
);
3364 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfo
*r
)
3366 if (ndr_flags
& NDR_SCALARS
) {
3367 NDR_CHECK(ndr_push_align(ndr
, 4));
3368 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3369 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3370 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3372 if (ndr_flags
& NDR_BUFFERS
) {
3373 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3374 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3376 return NDR_ERR_SUCCESS
;
3379 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfo
*r
)
3381 if (ndr_flags
& NDR_SCALARS
) {
3382 NDR_CHECK(ndr_pull_align(ndr
, 4));
3383 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3384 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3385 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3387 if (ndr_flags
& NDR_BUFFERS
) {
3388 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3389 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3391 return NDR_ERR_SUCCESS
;
3394 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfo
*r
)
3396 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfo");
3398 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3399 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3400 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3404 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3406 if (ndr_flags
& NDR_SCALARS
) {
3407 NDR_CHECK(ndr_push_align(ndr
, 4));
3408 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->auth_blob
));
3410 if (ndr_flags
& NDR_BUFFERS
) {
3411 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->auth_blob
));
3413 return NDR_ERR_SUCCESS
;
3416 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3418 if (ndr_flags
& NDR_SCALARS
) {
3419 NDR_CHECK(ndr_pull_align(ndr
, 4));
3420 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->auth_blob
));
3422 if (ndr_flags
& NDR_BUFFERS
) {
3423 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->auth_blob
));
3425 return NDR_ERR_SUCCESS
;
3428 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3430 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoAuthInfoInternal");
3432 ndr_print_lsa_DATA_BUF2(ndr
, "auth_blob", &r
->auth_blob
);
3436 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3438 if (ndr_flags
& NDR_SCALARS
) {
3439 NDR_CHECK(ndr_push_align(ndr
, 4));
3440 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3441 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3442 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info
));
3444 if (ndr_flags
& NDR_BUFFERS
) {
3445 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3446 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3448 return NDR_ERR_SUCCESS
;
3451 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3453 if (ndr_flags
& NDR_SCALARS
) {
3454 NDR_CHECK(ndr_pull_align(ndr
, 4));
3455 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3456 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3457 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info
));
3459 if (ndr_flags
& NDR_BUFFERS
) {
3460 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3461 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3463 return NDR_ERR_SUCCESS
;
3466 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3468 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfoInternal");
3470 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3471 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3472 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", &r
->auth_info
);
3476 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3478 if (ndr_flags
& NDR_SCALARS
) {
3479 NDR_CHECK(ndr_push_align(ndr
, 4));
3480 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3481 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->forest_trust_length
));
3482 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->forest_trust_data
));
3484 if (ndr_flags
& NDR_BUFFERS
) {
3485 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3486 if (r
->forest_trust_data
) {
3487 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->forest_trust_length
));
3488 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->forest_trust_data
, r
->forest_trust_length
));
3491 return NDR_ERR_SUCCESS
;
3494 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3496 uint32_t _ptr_forest_trust_data
;
3497 TALLOC_CTX
*_mem_save_forest_trust_data_0
;
3498 if (ndr_flags
& NDR_SCALARS
) {
3499 NDR_CHECK(ndr_pull_align(ndr
, 4));
3500 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3501 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->forest_trust_length
));
3502 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_data
));
3503 if (_ptr_forest_trust_data
) {
3504 NDR_PULL_ALLOC(ndr
, r
->forest_trust_data
);
3506 r
->forest_trust_data
= NULL
;
3509 if (ndr_flags
& NDR_BUFFERS
) {
3510 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3511 if (r
->forest_trust_data
) {
3512 _mem_save_forest_trust_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3513 NDR_PULL_SET_MEM_CTX(ndr
, r
->forest_trust_data
, 0);
3514 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->forest_trust_data
));
3515 NDR_PULL_ALLOC_N(ndr
, r
->forest_trust_data
, ndr_get_array_size(ndr
, &r
->forest_trust_data
));
3516 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->forest_trust_data
, ndr_get_array_size(ndr
, &r
->forest_trust_data
)));
3517 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_data_0
, 0);
3519 if (r
->forest_trust_data
) {
3520 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->forest_trust_data
, r
->forest_trust_length
));
3523 return NDR_ERR_SUCCESS
;
3526 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3528 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoInfoEx2Internal");
3530 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3531 ndr_print_uint32(ndr
, "forest_trust_length", r
->forest_trust_length
);
3532 ndr_print_ptr(ndr
, "forest_trust_data", r
->forest_trust_data
);
3534 if (r
->forest_trust_data
) {
3535 ndr_print_array_uint8(ndr
, "forest_trust_data", r
->forest_trust_data
, r
->forest_trust_length
);
3541 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3543 if (ndr_flags
& NDR_SCALARS
) {
3544 NDR_CHECK(ndr_push_align(ndr
, 4));
3545 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info
));
3546 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3547 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3549 if (ndr_flags
& NDR_BUFFERS
) {
3550 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info
));
3551 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3553 return NDR_ERR_SUCCESS
;
3556 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3558 if (ndr_flags
& NDR_SCALARS
) {
3559 NDR_CHECK(ndr_pull_align(ndr
, 4));
3560 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info
));
3561 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3562 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3564 if (ndr_flags
& NDR_BUFFERS
) {
3565 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info
));
3566 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3568 return NDR_ERR_SUCCESS
;
3571 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3573 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfo2Internal");
3575 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr
, "info", &r
->info
);
3576 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3577 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3581 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3583 if (ndr_flags
& NDR_SCALARS
) {
3584 NDR_CHECK(ndr_push_align(ndr
, 4));
3585 NDR_CHECK(ndr_push_kerb_EncTypes(ndr
, NDR_SCALARS
, r
->enc_types
));
3587 if (ndr_flags
& NDR_BUFFERS
) {
3589 return NDR_ERR_SUCCESS
;
3592 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3594 if (ndr_flags
& NDR_SCALARS
) {
3595 NDR_CHECK(ndr_pull_align(ndr
, 4));
3596 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3598 if (ndr_flags
& NDR_BUFFERS
) {
3600 return NDR_ERR_SUCCESS
;
3603 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3605 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoSupportedEncTypes");
3607 ndr_print_kerb_EncTypes(ndr
, "enc_types", r
->enc_types
);
3611 static enum ndr_err_code
ndr_push_lsa_TrustedDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_TrustedDomainInfo
*r
)
3613 if (ndr_flags
& NDR_SCALARS
) {
3614 int level
= ndr_push_get_switch_value(ndr
, r
);
3615 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, level
));
3617 case LSA_TRUSTED_DOMAIN_INFO_NAME
: {
3618 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr
, NDR_SCALARS
, &r
->name
));
3621 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: {
3622 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr
, NDR_SCALARS
, &r
->controllers
));
3625 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: {
3626 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3629 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: {
3630 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr
, NDR_SCALARS
, &r
->password
));
3633 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: {
3634 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr
, NDR_SCALARS
, &r
->info_basic
));
3637 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: {
3638 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3641 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: {
3642 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3645 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: {
3646 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr
, NDR_SCALARS
, &r
->full_info
));
3649 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: {
3650 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info_internal
));
3653 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: {
3654 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_SCALARS
, &r
->full_info_internal
));
3657 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: {
3658 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info_ex2_internal
));
3661 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: {
3662 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_SCALARS
, &r
->full_info2_internal
));
3665 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
: {
3666 NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3670 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3673 if (ndr_flags
& NDR_BUFFERS
) {
3674 int level
= ndr_push_get_switch_value(ndr
, r
);
3676 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3677 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr
, NDR_BUFFERS
, &r
->name
));
3680 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3681 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr
, NDR_BUFFERS
, &r
->controllers
));
3684 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3687 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3688 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr
, NDR_BUFFERS
, &r
->password
));
3691 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3692 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr
, NDR_BUFFERS
, &r
->info_basic
));
3695 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3696 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3699 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3700 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3703 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3704 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr
, NDR_BUFFERS
, &r
->full_info
));
3707 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3708 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info_internal
));
3711 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3712 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_BUFFERS
, &r
->full_info_internal
));
3715 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3716 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info_ex2_internal
));
3719 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3720 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_BUFFERS
, &r
->full_info2_internal
));
3723 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
:
3727 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3730 return NDR_ERR_SUCCESS
;
3733 static enum ndr_err_code
ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_TrustedDomainInfo
*r
)
3737 level
= ndr_pull_get_switch_value(ndr
, r
);
3738 if (ndr_flags
& NDR_SCALARS
) {
3739 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
3740 if (_level
!= level
) {
3741 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
3744 case LSA_TRUSTED_DOMAIN_INFO_NAME
: {
3745 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr
, NDR_SCALARS
, &r
->name
));
3748 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: {
3749 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr
, NDR_SCALARS
, &r
->controllers
));
3752 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: {
3753 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3756 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: {
3757 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr
, NDR_SCALARS
, &r
->password
));
3760 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: {
3761 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr
, NDR_SCALARS
, &r
->info_basic
));
3764 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: {
3765 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3768 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: {
3769 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3772 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: {
3773 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr
, NDR_SCALARS
, &r
->full_info
));
3776 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: {
3777 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info_internal
));
3780 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: {
3781 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_SCALARS
, &r
->full_info_internal
));
3784 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: {
3785 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info_ex2_internal
));
3788 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: {
3789 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_SCALARS
, &r
->full_info2_internal
));
3792 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
: {
3793 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3797 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3800 if (ndr_flags
& NDR_BUFFERS
) {
3802 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3803 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr
, NDR_BUFFERS
, &r
->name
));
3806 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3807 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr
, NDR_BUFFERS
, &r
->controllers
));
3810 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3813 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3814 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr
, NDR_BUFFERS
, &r
->password
));
3817 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3818 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr
, NDR_BUFFERS
, &r
->info_basic
));
3821 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3822 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3825 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3826 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3829 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3830 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr
, NDR_BUFFERS
, &r
->full_info
));
3833 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3834 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info_internal
));
3837 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3838 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_BUFFERS
, &r
->full_info_internal
));
3841 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3842 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info_ex2_internal
));
3845 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3846 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_BUFFERS
, &r
->full_info2_internal
));
3849 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
:
3853 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3856 return NDR_ERR_SUCCESS
;
3859 _PUBLIC_
void ndr_print_lsa_TrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, const union lsa_TrustedDomainInfo
*r
)
3862 level
= ndr_print_get_switch_value(ndr
, r
);
3863 ndr_print_union(ndr
, name
, level
, "lsa_TrustedDomainInfo");
3865 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3866 ndr_print_lsa_TrustDomainInfoName(ndr
, "name", &r
->name
);
3869 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3870 ndr_print_lsa_TrustDomainInfoControllers(ndr
, "controllers", &r
->controllers
);
3873 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3874 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3877 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3878 ndr_print_lsa_TrustDomainInfoPassword(ndr
, "password", &r
->password
);
3881 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3882 ndr_print_lsa_TrustDomainInfoBasic(ndr
, "info_basic", &r
->info_basic
);
3885 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3886 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3889 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3890 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3893 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3894 ndr_print_lsa_TrustDomainInfoFullInfo(ndr
, "full_info", &r
->full_info
);
3897 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3898 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info_internal", &r
->auth_info_internal
);
3901 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3902 ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr
, "full_info_internal", &r
->full_info_internal
);
3905 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3906 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr
, "info_ex2_internal", &r
->info_ex2_internal
);
3909 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3910 ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr
, "full_info2_internal", &r
->full_info2_internal
);
3913 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
:
3914 ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr
, "enc_types", &r
->enc_types
);
3918 ndr_print_bad_level(ndr
, name
, level
);
3922 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
)
3924 if (ndr_flags
& NDR_SCALARS
) {
3925 NDR_CHECK(ndr_push_align(ndr
, 4));
3926 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->buf
));
3928 if (ndr_flags
& NDR_BUFFERS
) {
3930 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->buf
));
3933 return NDR_ERR_SUCCESS
;
3936 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF_PTR
*r
)
3939 TALLOC_CTX
*_mem_save_buf_0
;
3940 if (ndr_flags
& NDR_SCALARS
) {
3941 NDR_CHECK(ndr_pull_align(ndr
, 4));
3942 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buf
));
3944 NDR_PULL_ALLOC(ndr
, r
->buf
);
3949 if (ndr_flags
& NDR_BUFFERS
) {
3951 _mem_save_buf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3952 NDR_PULL_SET_MEM_CTX(ndr
, r
->buf
, 0);
3953 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->buf
));
3954 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buf_0
, 0);
3957 return NDR_ERR_SUCCESS
;
3960 _PUBLIC_
void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF_PTR
*r
)
3962 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF_PTR");
3964 ndr_print_ptr(ndr
, "buf", r
->buf
);
3967 ndr_print_lsa_DATA_BUF(ndr
, "buf", r
->buf
);
3973 static enum ndr_err_code
ndr_push_lsa_RightSet(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_RightSet
*r
)
3975 uint32_t cntr_names_1
;
3976 if (ndr_flags
& NDR_SCALARS
) {
3977 NDR_CHECK(ndr_push_align(ndr
, 4));
3978 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3979 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
3981 if (ndr_flags
& NDR_BUFFERS
) {
3983 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3984 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
3985 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
3987 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
3988 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
3992 return NDR_ERR_SUCCESS
;
3995 static enum ndr_err_code
ndr_pull_lsa_RightSet(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_RightSet
*r
)
3997 uint32_t _ptr_names
;
3998 uint32_t cntr_names_1
;
3999 TALLOC_CTX
*_mem_save_names_0
;
4000 TALLOC_CTX
*_mem_save_names_1
;
4001 if (ndr_flags
& NDR_SCALARS
) {
4002 NDR_CHECK(ndr_pull_align(ndr
, 4));
4003 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4004 if (r
->count
> 256) {
4005 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4007 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
4009 NDR_PULL_ALLOC(ndr
, r
->names
);
4014 if (ndr_flags
& NDR_BUFFERS
) {
4016 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4017 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4018 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
4019 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
4020 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4021 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4022 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4023 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4025 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4026 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4028 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
4029 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
4032 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
4035 return NDR_ERR_SUCCESS
;
4038 _PUBLIC_
void ndr_print_lsa_RightSet(struct ndr_print
*ndr
, const char *name
, const struct lsa_RightSet
*r
)
4040 uint32_t cntr_names_1
;
4041 ndr_print_struct(ndr
, name
, "lsa_RightSet");
4043 ndr_print_uint32(ndr
, "count", r
->count
);
4044 ndr_print_ptr(ndr
, "names", r
->names
);
4047 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
4049 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
4051 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
4052 ndr_print_lsa_StringLarge(ndr
, "names", &r
->names
[cntr_names_1
]);
4062 static enum ndr_err_code
ndr_push_lsa_DomainListEx(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainListEx
*r
)
4064 uint32_t cntr_domains_1
;
4065 if (ndr_flags
& NDR_SCALARS
) {
4066 NDR_CHECK(ndr_push_align(ndr
, 4));
4067 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4068 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
4070 if (ndr_flags
& NDR_BUFFERS
) {
4072 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4073 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4074 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
4076 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4077 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
4081 return NDR_ERR_SUCCESS
;
4084 static enum ndr_err_code
ndr_pull_lsa_DomainListEx(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainListEx
*r
)
4086 uint32_t _ptr_domains
;
4087 uint32_t cntr_domains_1
;
4088 TALLOC_CTX
*_mem_save_domains_0
;
4089 TALLOC_CTX
*_mem_save_domains_1
;
4090 if (ndr_flags
& NDR_SCALARS
) {
4091 NDR_CHECK(ndr_pull_align(ndr
, 4));
4092 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4093 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
4095 NDR_PULL_ALLOC(ndr
, r
->domains
);
4100 if (ndr_flags
& NDR_BUFFERS
) {
4102 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4103 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
4104 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
4105 NDR_PULL_ALLOC_N(ndr
, r
->domains
, ndr_get_array_size(ndr
, &r
->domains
));
4106 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4107 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
4108 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4109 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
4111 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4112 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
4114 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
4115 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
4118 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
4121 return NDR_ERR_SUCCESS
;
4124 _PUBLIC_
void ndr_print_lsa_DomainListEx(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainListEx
*r
)
4126 uint32_t cntr_domains_1
;
4127 ndr_print_struct(ndr
, name
, "lsa_DomainListEx");
4129 ndr_print_uint32(ndr
, "count", r
->count
);
4130 ndr_print_ptr(ndr
, "domains", r
->domains
);
4133 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
4135 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
4137 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
4138 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
4148 static enum ndr_err_code
ndr_push_lsa_DomainInfoKerberos(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfoKerberos
*r
)
4150 if (ndr_flags
& NDR_SCALARS
) {
4151 NDR_CHECK(ndr_push_align(ndr
, 8));
4152 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->enforce_restrictions
));
4153 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->service_tkt_lifetime
));
4154 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->user_tkt_lifetime
));
4155 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->user_tkt_renewaltime
));
4156 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->clock_skew
));
4157 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown6
));
4159 if (ndr_flags
& NDR_BUFFERS
) {
4161 return NDR_ERR_SUCCESS
;
4164 static enum ndr_err_code
ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfoKerberos
*r
)
4166 if (ndr_flags
& NDR_SCALARS
) {
4167 NDR_CHECK(ndr_pull_align(ndr
, 8));
4168 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->enforce_restrictions
));
4169 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->service_tkt_lifetime
));
4170 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->user_tkt_lifetime
));
4171 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->user_tkt_renewaltime
));
4172 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->clock_skew
));
4173 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown6
));
4175 if (ndr_flags
& NDR_BUFFERS
) {
4177 return NDR_ERR_SUCCESS
;
4180 _PUBLIC_
void ndr_print_lsa_DomainInfoKerberos(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfoKerberos
*r
)
4182 ndr_print_struct(ndr
, name
, "lsa_DomainInfoKerberos");
4184 ndr_print_uint32(ndr
, "enforce_restrictions", r
->enforce_restrictions
);
4185 ndr_print_hyper(ndr
, "service_tkt_lifetime", r
->service_tkt_lifetime
);
4186 ndr_print_hyper(ndr
, "user_tkt_lifetime", r
->user_tkt_lifetime
);
4187 ndr_print_hyper(ndr
, "user_tkt_renewaltime", r
->user_tkt_renewaltime
);
4188 ndr_print_hyper(ndr
, "clock_skew", r
->clock_skew
);
4189 ndr_print_hyper(ndr
, "unknown6", r
->unknown6
);
4193 static enum ndr_err_code
ndr_push_lsa_DomainInfoEfs(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfoEfs
*r
)
4195 if (ndr_flags
& NDR_SCALARS
) {
4196 NDR_CHECK(ndr_push_align(ndr
, 4));
4197 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->blob_size
));
4198 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->efs_blob
));
4200 if (ndr_flags
& NDR_BUFFERS
) {
4202 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->blob_size
));
4203 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->efs_blob
, r
->blob_size
));
4206 return NDR_ERR_SUCCESS
;
4209 static enum ndr_err_code
ndr_pull_lsa_DomainInfoEfs(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfoEfs
*r
)
4211 uint32_t _ptr_efs_blob
;
4212 TALLOC_CTX
*_mem_save_efs_blob_0
;
4213 if (ndr_flags
& NDR_SCALARS
) {
4214 NDR_CHECK(ndr_pull_align(ndr
, 4));
4215 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->blob_size
));
4216 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_efs_blob
));
4217 if (_ptr_efs_blob
) {
4218 NDR_PULL_ALLOC(ndr
, r
->efs_blob
);
4223 if (ndr_flags
& NDR_BUFFERS
) {
4225 _mem_save_efs_blob_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4226 NDR_PULL_SET_MEM_CTX(ndr
, r
->efs_blob
, 0);
4227 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->efs_blob
));
4228 NDR_PULL_ALLOC_N(ndr
, r
->efs_blob
, ndr_get_array_size(ndr
, &r
->efs_blob
));
4229 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->efs_blob
, ndr_get_array_size(ndr
, &r
->efs_blob
)));
4230 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_efs_blob_0
, 0);
4233 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->efs_blob
, r
->blob_size
));
4236 return NDR_ERR_SUCCESS
;
4239 _PUBLIC_
void ndr_print_lsa_DomainInfoEfs(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfoEfs
*r
)
4241 ndr_print_struct(ndr
, name
, "lsa_DomainInfoEfs");
4243 ndr_print_uint32(ndr
, "blob_size", r
->blob_size
);
4244 ndr_print_ptr(ndr
, "efs_blob", r
->efs_blob
);
4247 ndr_print_array_uint8(ndr
, "efs_blob", r
->efs_blob
, r
->blob_size
);
4253 static enum ndr_err_code
ndr_push_lsa_DomainInformationPolicy(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_DomainInformationPolicy
*r
)
4255 if (ndr_flags
& NDR_SCALARS
) {
4256 int level
= ndr_push_get_switch_value(ndr
, r
);
4257 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
4259 case LSA_DOMAIN_INFO_POLICY_EFS
: {
4260 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr
, NDR_SCALARS
, &r
->efs_info
));
4263 case LSA_DOMAIN_INFO_POLICY_KERBEROS
: {
4264 NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr
, NDR_SCALARS
, &r
->kerberos_info
));
4268 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4271 if (ndr_flags
& NDR_BUFFERS
) {
4272 int level
= ndr_push_get_switch_value(ndr
, r
);
4274 case LSA_DOMAIN_INFO_POLICY_EFS
:
4275 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr
, NDR_BUFFERS
, &r
->efs_info
));
4278 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4282 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4285 return NDR_ERR_SUCCESS
;
4288 static enum ndr_err_code
ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_DomainInformationPolicy
*r
)
4292 level
= ndr_pull_get_switch_value(ndr
, r
);
4293 if (ndr_flags
& NDR_SCALARS
) {
4294 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
4295 if (_level
!= level
) {
4296 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4299 case LSA_DOMAIN_INFO_POLICY_EFS
: {
4300 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr
, NDR_SCALARS
, &r
->efs_info
));
4303 case LSA_DOMAIN_INFO_POLICY_KERBEROS
: {
4304 NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr
, NDR_SCALARS
, &r
->kerberos_info
));
4308 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4311 if (ndr_flags
& NDR_BUFFERS
) {
4313 case LSA_DOMAIN_INFO_POLICY_EFS
:
4314 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr
, NDR_BUFFERS
, &r
->efs_info
));
4317 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4321 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4324 return NDR_ERR_SUCCESS
;
4327 _PUBLIC_
void ndr_print_lsa_DomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, const union lsa_DomainInformationPolicy
*r
)
4330 level
= ndr_print_get_switch_value(ndr
, r
);
4331 ndr_print_union(ndr
, name
, level
, "lsa_DomainInformationPolicy");
4333 case LSA_DOMAIN_INFO_POLICY_EFS
:
4334 ndr_print_lsa_DomainInfoEfs(ndr
, "efs_info", &r
->efs_info
);
4337 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4338 ndr_print_lsa_DomainInfoKerberos(ndr
, "kerberos_info", &r
->kerberos_info
);
4342 ndr_print_bad_level(ndr
, name
, level
);
4346 static enum ndr_err_code
ndr_push_lsa_TranslatedName2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedName2
*r
)
4348 if (ndr_flags
& NDR_SCALARS
) {
4349 NDR_CHECK(ndr_push_align(ndr
, 4));
4350 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4351 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
4352 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4353 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
4355 if (ndr_flags
& NDR_BUFFERS
) {
4356 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
4358 return NDR_ERR_SUCCESS
;
4361 static enum ndr_err_code
ndr_pull_lsa_TranslatedName2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedName2
*r
)
4363 if (ndr_flags
& NDR_SCALARS
) {
4364 NDR_CHECK(ndr_pull_align(ndr
, 4));
4365 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4366 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
4367 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4368 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
4370 if (ndr_flags
& NDR_BUFFERS
) {
4371 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
4373 return NDR_ERR_SUCCESS
;
4376 _PUBLIC_
void ndr_print_lsa_TranslatedName2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedName2
*r
)
4378 ndr_print_struct(ndr
, name
, "lsa_TranslatedName2");
4380 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4381 ndr_print_lsa_String(ndr
, "name", &r
->name
);
4382 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4383 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
4387 static enum ndr_err_code
ndr_push_lsa_TransNameArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransNameArray2
*r
)
4389 uint32_t cntr_names_1
;
4390 if (ndr_flags
& NDR_SCALARS
) {
4391 NDR_CHECK(ndr_push_align(ndr
, 4));
4392 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4393 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
4395 if (ndr_flags
& NDR_BUFFERS
) {
4397 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4398 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4399 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4401 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4402 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4406 return NDR_ERR_SUCCESS
;
4409 static enum ndr_err_code
ndr_pull_lsa_TransNameArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransNameArray2
*r
)
4411 uint32_t _ptr_names
;
4412 uint32_t cntr_names_1
;
4413 TALLOC_CTX
*_mem_save_names_0
;
4414 TALLOC_CTX
*_mem_save_names_1
;
4415 if (ndr_flags
& NDR_SCALARS
) {
4416 NDR_CHECK(ndr_pull_align(ndr
, 4));
4417 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4418 if (r
->count
> 1000) {
4419 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4421 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
4423 NDR_PULL_ALLOC(ndr
, r
->names
);
4428 if (ndr_flags
& NDR_BUFFERS
) {
4430 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4431 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4432 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
4433 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
4434 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4435 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4436 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4437 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4439 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4440 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4442 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
4443 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
4446 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
4449 return NDR_ERR_SUCCESS
;
4452 _PUBLIC_
void ndr_print_lsa_TransNameArray2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransNameArray2
*r
)
4454 uint32_t cntr_names_1
;
4455 ndr_print_struct(ndr
, name
, "lsa_TransNameArray2");
4457 ndr_print_uint32(ndr
, "count", r
->count
);
4458 ndr_print_ptr(ndr
, "names", r
->names
);
4461 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
4463 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
4465 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
4466 ndr_print_lsa_TranslatedName2(ndr
, "names", &r
->names
[cntr_names_1
]);
4476 static enum ndr_err_code
ndr_push_lsa_LookupOptions(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_LookupOptions r
)
4478 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4479 return NDR_ERR_SUCCESS
;
4482 static enum ndr_err_code
ndr_pull_lsa_LookupOptions(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_LookupOptions
*r
)
4485 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4487 return NDR_ERR_SUCCESS
;
4490 _PUBLIC_
void ndr_print_lsa_LookupOptions(struct ndr_print
*ndr
, const char *name
, enum lsa_LookupOptions r
)
4492 const char *val
= NULL
;
4495 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES
: val
= "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES"; break;
4496 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL
: val
= "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL"; break;
4498 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4501 static enum ndr_err_code
ndr_push_lsa_ClientRevision(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_ClientRevision r
)
4503 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4504 return NDR_ERR_SUCCESS
;
4507 static enum ndr_err_code
ndr_pull_lsa_ClientRevision(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_ClientRevision
*r
)
4510 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4512 return NDR_ERR_SUCCESS
;
4515 _PUBLIC_
void ndr_print_lsa_ClientRevision(struct ndr_print
*ndr
, const char *name
, enum lsa_ClientRevision r
)
4517 const char *val
= NULL
;
4520 case LSA_CLIENT_REVISION_1
: val
= "LSA_CLIENT_REVISION_1"; break;
4521 case LSA_CLIENT_REVISION_2
: val
= "LSA_CLIENT_REVISION_2"; break;
4523 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4526 static enum ndr_err_code
ndr_push_lsa_TranslatedSid2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid2
*r
)
4528 if (ndr_flags
& NDR_SCALARS
) {
4529 NDR_CHECK(ndr_push_align(ndr
, 4));
4530 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4531 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4532 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4533 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
4535 if (ndr_flags
& NDR_BUFFERS
) {
4537 return NDR_ERR_SUCCESS
;
4540 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid2
*r
)
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_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4546 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4547 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
4549 if (ndr_flags
& NDR_BUFFERS
) {
4551 return NDR_ERR_SUCCESS
;
4554 _PUBLIC_
void ndr_print_lsa_TranslatedSid2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid2
*r
)
4556 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid2");
4558 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4559 ndr_print_uint32(ndr
, "rid", r
->rid
);
4560 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4561 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
4565 static enum ndr_err_code
ndr_push_lsa_TransSidArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray2
*r
)
4567 uint32_t cntr_sids_1
;
4568 if (ndr_flags
& NDR_SCALARS
) {
4569 NDR_CHECK(ndr_push_align(ndr
, 4));
4570 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4571 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
4573 if (ndr_flags
& NDR_BUFFERS
) {
4575 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4576 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4577 NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4581 return NDR_ERR_SUCCESS
;
4584 static enum ndr_err_code
ndr_pull_lsa_TransSidArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray2
*r
)
4587 uint32_t cntr_sids_1
;
4588 TALLOC_CTX
*_mem_save_sids_0
;
4589 TALLOC_CTX
*_mem_save_sids_1
;
4590 if (ndr_flags
& NDR_SCALARS
) {
4591 NDR_CHECK(ndr_pull_align(ndr
, 4));
4592 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4593 if (r
->count
> 1000) {
4594 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4596 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4598 NDR_PULL_ALLOC(ndr
, r
->sids
);
4603 if (ndr_flags
& NDR_BUFFERS
) {
4605 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4606 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4607 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
4608 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
4609 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4610 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4611 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4612 NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4614 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
4615 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
4618 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
4621 return NDR_ERR_SUCCESS
;
4624 _PUBLIC_
void ndr_print_lsa_TransSidArray2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray2
*r
)
4626 uint32_t cntr_sids_1
;
4627 ndr_print_struct(ndr
, name
, "lsa_TransSidArray2");
4629 ndr_print_uint32(ndr
, "count", r
->count
);
4630 ndr_print_ptr(ndr
, "sids", r
->sids
);
4633 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
4635 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
4637 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
4638 ndr_print_lsa_TranslatedSid2(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
4648 static enum ndr_err_code
ndr_push_lsa_TranslatedSid3(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid3
*r
)
4650 if (ndr_flags
& NDR_SCALARS
) {
4651 NDR_CHECK(ndr_push_align(ndr
, 4));
4652 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4653 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
4654 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4655 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
4657 if (ndr_flags
& NDR_BUFFERS
) {
4659 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4662 return NDR_ERR_SUCCESS
;
4665 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid3(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid3
*r
)
4668 TALLOC_CTX
*_mem_save_sid_0
;
4669 if (ndr_flags
& NDR_SCALARS
) {
4670 NDR_CHECK(ndr_pull_align(ndr
, 4));
4671 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4672 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
4674 NDR_PULL_ALLOC(ndr
, r
->sid
);
4678 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4679 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
4681 if (ndr_flags
& NDR_BUFFERS
) {
4683 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4684 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
4685 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4686 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
4689 return NDR_ERR_SUCCESS
;
4692 _PUBLIC_
void ndr_print_lsa_TranslatedSid3(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid3
*r
)
4694 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid3");
4696 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4697 ndr_print_ptr(ndr
, "sid", r
->sid
);
4700 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
4703 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4704 ndr_print_uint32(ndr
, "flags", r
->flags
);
4708 static enum ndr_err_code
ndr_push_lsa_TransSidArray3(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray3
*r
)
4710 uint32_t cntr_sids_1
;
4711 if (ndr_flags
& NDR_SCALARS
) {
4712 NDR_CHECK(ndr_push_align(ndr
, 4));
4713 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4714 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
4716 if (ndr_flags
& NDR_BUFFERS
) {
4718 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4719 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4720 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4722 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4723 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
4727 return NDR_ERR_SUCCESS
;
4730 static enum ndr_err_code
ndr_pull_lsa_TransSidArray3(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray3
*r
)
4733 uint32_t cntr_sids_1
;
4734 TALLOC_CTX
*_mem_save_sids_0
;
4735 TALLOC_CTX
*_mem_save_sids_1
;
4736 if (ndr_flags
& NDR_SCALARS
) {
4737 NDR_CHECK(ndr_pull_align(ndr
, 4));
4738 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4739 if (r
->count
> 1000) {
4740 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4742 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4744 NDR_PULL_ALLOC(ndr
, r
->sids
);
4749 if (ndr_flags
& NDR_BUFFERS
) {
4751 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4752 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4753 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
4754 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
4755 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4756 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4757 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4758 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4760 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4761 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
4763 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
4764 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
4767 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
4770 return NDR_ERR_SUCCESS
;
4773 _PUBLIC_
void ndr_print_lsa_TransSidArray3(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray3
*r
)
4775 uint32_t cntr_sids_1
;
4776 ndr_print_struct(ndr
, name
, "lsa_TransSidArray3");
4778 ndr_print_uint32(ndr
, "count", r
->count
);
4779 ndr_print_ptr(ndr
, "sids", r
->sids
);
4782 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
4784 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
4786 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
4787 ndr_print_lsa_TranslatedSid3(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
4797 static enum ndr_err_code
ndr_push_lsa_ForestTrustBinaryData(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustBinaryData
*r
)
4799 if (ndr_flags
& NDR_SCALARS
) {
4800 NDR_CHECK(ndr_push_align(ndr
, 4));
4801 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4802 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
4804 if (ndr_flags
& NDR_BUFFERS
) {
4806 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4807 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
4810 return NDR_ERR_SUCCESS
;
4813 static enum ndr_err_code
ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustBinaryData
*r
)
4816 TALLOC_CTX
*_mem_save_data_0
;
4817 if (ndr_flags
& NDR_SCALARS
) {
4818 NDR_CHECK(ndr_pull_align(ndr
, 4));
4819 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
4820 if (r
->length
> 131072) {
4821 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4823 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
4825 NDR_PULL_ALLOC(ndr
, r
->data
);
4830 if (ndr_flags
& NDR_BUFFERS
) {
4832 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4833 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
4834 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
4835 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
4836 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
4837 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
4840 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
4843 return NDR_ERR_SUCCESS
;
4846 _PUBLIC_
void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustBinaryData
*r
)
4848 ndr_print_struct(ndr
, name
, "lsa_ForestTrustBinaryData");
4850 ndr_print_uint32(ndr
, "length", r
->length
);
4851 ndr_print_ptr(ndr
, "data", r
->data
);
4854 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
4860 static enum ndr_err_code
ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustDomainInfo
*r
)
4862 if (ndr_flags
& NDR_SCALARS
) {
4863 NDR_CHECK(ndr_push_align(ndr
, 4));
4864 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_sid
));
4865 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain_name
));
4866 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_domain_name
));
4868 if (ndr_flags
& NDR_BUFFERS
) {
4869 if (r
->domain_sid
) {
4870 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
4872 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain_name
));
4873 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_domain_name
));
4875 return NDR_ERR_SUCCESS
;
4878 static enum ndr_err_code
ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustDomainInfo
*r
)
4880 uint32_t _ptr_domain_sid
;
4881 TALLOC_CTX
*_mem_save_domain_sid_0
;
4882 if (ndr_flags
& NDR_SCALARS
) {
4883 NDR_CHECK(ndr_pull_align(ndr
, 4));
4884 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_sid
));
4885 if (_ptr_domain_sid
) {
4886 NDR_PULL_ALLOC(ndr
, r
->domain_sid
);
4888 r
->domain_sid
= NULL
;
4890 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain_name
));
4891 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_domain_name
));
4893 if (ndr_flags
& NDR_BUFFERS
) {
4894 if (r
->domain_sid
) {
4895 _mem_save_domain_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4896 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_sid
, 0);
4897 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
4898 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_sid_0
, 0);
4900 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain_name
));
4901 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_domain_name
));
4903 return NDR_ERR_SUCCESS
;
4906 _PUBLIC_
void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustDomainInfo
*r
)
4908 ndr_print_struct(ndr
, name
, "lsa_ForestTrustDomainInfo");
4910 ndr_print_ptr(ndr
, "domain_sid", r
->domain_sid
);
4912 if (r
->domain_sid
) {
4913 ndr_print_dom_sid2(ndr
, "domain_sid", r
->domain_sid
);
4916 ndr_print_lsa_StringLarge(ndr
, "dns_domain_name", &r
->dns_domain_name
);
4917 ndr_print_lsa_StringLarge(ndr
, "netbios_domain_name", &r
->netbios_domain_name
);
4921 static enum ndr_err_code
ndr_push_lsa_ForestTrustData(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_ForestTrustData
*r
)
4923 if (ndr_flags
& NDR_SCALARS
) {
4924 int level
= ndr_push_get_switch_value(ndr
, r
);
4925 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
4927 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: {
4928 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->top_level_name
));
4931 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: {
4932 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->top_level_name_ex
));
4935 case LSA_FOREST_TRUST_DOMAIN_INFO
: {
4936 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr
, NDR_SCALARS
, &r
->domain_info
));
4940 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr
, NDR_SCALARS
, &r
->data
));
4945 if (ndr_flags
& NDR_BUFFERS
) {
4946 int level
= ndr_push_get_switch_value(ndr
, r
);
4948 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
4949 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->top_level_name
));
4952 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
4953 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->top_level_name_ex
));
4956 case LSA_FOREST_TRUST_DOMAIN_INFO
:
4957 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr
, NDR_BUFFERS
, &r
->domain_info
));
4961 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr
, NDR_BUFFERS
, &r
->data
));
4966 return NDR_ERR_SUCCESS
;
4969 static enum ndr_err_code
ndr_pull_lsa_ForestTrustData(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_ForestTrustData
*r
)
4973 level
= ndr_pull_get_switch_value(ndr
, r
);
4974 if (ndr_flags
& NDR_SCALARS
) {
4975 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
4976 if (_level
!= level
) {
4977 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4980 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: {
4981 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->top_level_name
));
4984 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: {
4985 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->top_level_name_ex
));
4988 case LSA_FOREST_TRUST_DOMAIN_INFO
: {
4989 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr
, NDR_SCALARS
, &r
->domain_info
));
4993 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr
, NDR_SCALARS
, &r
->data
));
4998 if (ndr_flags
& NDR_BUFFERS
) {
5000 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
5001 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->top_level_name
));
5004 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
5005 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->top_level_name_ex
));
5008 case LSA_FOREST_TRUST_DOMAIN_INFO
:
5009 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr
, NDR_BUFFERS
, &r
->domain_info
));
5013 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr
, NDR_BUFFERS
, &r
->data
));
5018 return NDR_ERR_SUCCESS
;
5021 _PUBLIC_
void ndr_print_lsa_ForestTrustData(struct ndr_print
*ndr
, const char *name
, const union lsa_ForestTrustData
*r
)
5024 level
= ndr_print_get_switch_value(ndr
, r
);
5025 ndr_print_union(ndr
, name
, level
, "lsa_ForestTrustData");
5027 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
5028 ndr_print_lsa_String(ndr
, "top_level_name", &r
->top_level_name
);
5031 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
5032 ndr_print_lsa_StringLarge(ndr
, "top_level_name_ex", &r
->top_level_name_ex
);
5035 case LSA_FOREST_TRUST_DOMAIN_INFO
:
5036 ndr_print_lsa_ForestTrustDomainInfo(ndr
, "domain_info", &r
->domain_info
);
5040 ndr_print_lsa_ForestTrustBinaryData(ndr
, "data", &r
->data
);
5046 static enum ndr_err_code
ndr_push_lsa_ForestTrustRecordType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_ForestTrustRecordType r
)
5048 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5049 return NDR_ERR_SUCCESS
;
5052 static enum ndr_err_code
ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_ForestTrustRecordType
*r
)
5055 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5057 return NDR_ERR_SUCCESS
;
5060 _PUBLIC_
void ndr_print_lsa_ForestTrustRecordType(struct ndr_print
*ndr
, const char *name
, enum lsa_ForestTrustRecordType r
)
5062 const char *val
= NULL
;
5065 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: val
= "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break;
5066 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: val
= "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
5067 case LSA_FOREST_TRUST_DOMAIN_INFO
: val
= "LSA_FOREST_TRUST_DOMAIN_INFO"; break;
5068 case LSA_FOREST_TRUST_RECORD_TYPE_LAST
: val
= "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break;
5070 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5073 static enum ndr_err_code
ndr_push_lsa_ForestTrustRecord(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustRecord
*r
)
5075 if (ndr_flags
& NDR_SCALARS
) {
5076 NDR_CHECK(ndr_push_align(ndr
, 8));
5077 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
5078 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr
, NDR_SCALARS
, r
->level
));
5079 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown
));
5080 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
));
5081 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr
, NDR_SCALARS
, &r
->forest_trust_data
));
5083 if (ndr_flags
& NDR_BUFFERS
) {
5084 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr
, NDR_BUFFERS
, &r
->forest_trust_data
));
5086 return NDR_ERR_SUCCESS
;
5089 static enum ndr_err_code
ndr_pull_lsa_ForestTrustRecord(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustRecord
*r
)
5091 if (ndr_flags
& NDR_SCALARS
) {
5092 NDR_CHECK(ndr_pull_align(ndr
, 8));
5093 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
5094 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr
, NDR_SCALARS
, &r
->level
));
5095 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown
));
5096 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
));
5097 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr
, NDR_SCALARS
, &r
->forest_trust_data
));
5099 if (ndr_flags
& NDR_BUFFERS
) {
5100 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr
, NDR_BUFFERS
, &r
->forest_trust_data
));
5102 return NDR_ERR_SUCCESS
;
5105 _PUBLIC_
void ndr_print_lsa_ForestTrustRecord(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustRecord
*r
)
5107 ndr_print_struct(ndr
, name
, "lsa_ForestTrustRecord");
5109 ndr_print_uint32(ndr
, "flags", r
->flags
);
5110 ndr_print_lsa_ForestTrustRecordType(ndr
, "level", r
->level
);
5111 ndr_print_hyper(ndr
, "unknown", r
->unknown
);
5112 ndr_print_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
);
5113 ndr_print_lsa_ForestTrustData(ndr
, "forest_trust_data", &r
->forest_trust_data
);
5117 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_ForestTrustInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustInformation
*r
)
5119 uint32_t cntr_entries_1
;
5120 if (ndr_flags
& NDR_SCALARS
) {
5121 NDR_CHECK(ndr_push_align(ndr
, 4));
5122 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5123 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
5125 if (ndr_flags
& NDR_BUFFERS
) {
5127 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5128 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5129 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
[cntr_entries_1
]));
5131 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5132 if (r
->entries
[cntr_entries_1
]) {
5133 NDR_CHECK(ndr_push_lsa_ForestTrustRecord(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->entries
[cntr_entries_1
]));
5138 return NDR_ERR_SUCCESS
;
5141 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_ForestTrustInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustInformation
*r
)
5143 uint32_t _ptr_entries
;
5144 uint32_t cntr_entries_1
;
5145 TALLOC_CTX
*_mem_save_entries_0
;
5146 TALLOC_CTX
*_mem_save_entries_1
;
5147 TALLOC_CTX
*_mem_save_entries_2
;
5148 if (ndr_flags
& NDR_SCALARS
) {
5149 NDR_CHECK(ndr_pull_align(ndr
, 4));
5150 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
5151 if (r
->count
> 4000) {
5152 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5154 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
5156 NDR_PULL_ALLOC(ndr
, r
->entries
);
5161 if (ndr_flags
& NDR_BUFFERS
) {
5163 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5164 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
5165 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
5166 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
5167 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5168 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
5169 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5170 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
5172 NDR_PULL_ALLOC(ndr
, r
->entries
[cntr_entries_1
]);
5174 r
->entries
[cntr_entries_1
] = NULL
;
5177 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5178 if (r
->entries
[cntr_entries_1
]) {
5179 _mem_save_entries_2
= NDR_PULL_GET_MEM_CTX(ndr
);
5180 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
[cntr_entries_1
], 0);
5181 NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->entries
[cntr_entries_1
]));
5182 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_2
, 0);
5185 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
5186 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
5189 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
5192 return NDR_ERR_SUCCESS
;
5195 _PUBLIC_
void ndr_print_lsa_ForestTrustInformation(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustInformation
*r
)
5197 uint32_t cntr_entries_1
;
5198 ndr_print_struct(ndr
, name
, "lsa_ForestTrustInformation");
5200 ndr_print_uint32(ndr
, "count", r
->count
);
5201 ndr_print_ptr(ndr
, "entries", r
->entries
);
5204 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
5206 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
5208 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
5209 ndr_print_ptr(ndr
, "entries", r
->entries
[cntr_entries_1
]);
5211 if (r
->entries
[cntr_entries_1
]) {
5212 ndr_print_lsa_ForestTrustRecord(ndr
, "entries", r
->entries
[cntr_entries_1
]);
5224 static enum ndr_err_code
ndr_push_lsa_Close(struct ndr_push
*ndr
, int flags
, const struct lsa_Close
*r
)
5226 if (flags
& NDR_IN
) {
5227 if (r
->in
.handle
== NULL
) {
5228 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5230 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5232 if (flags
& NDR_OUT
) {
5233 if (r
->out
.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
->out
.handle
));
5237 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5239 return NDR_ERR_SUCCESS
;
5242 static enum ndr_err_code
ndr_pull_lsa_Close(struct ndr_pull
*ndr
, int flags
, struct lsa_Close
*r
)
5244 TALLOC_CTX
*_mem_save_handle_0
;
5245 if (flags
& NDR_IN
) {
5246 ZERO_STRUCT(r
->out
);
5248 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5249 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5251 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5252 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5253 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5254 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5255 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5256 *r
->out
.handle
= *r
->in
.handle
;
5258 if (flags
& NDR_OUT
) {
5259 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5260 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5262 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5263 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5264 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5265 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5266 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5268 return NDR_ERR_SUCCESS
;
5271 _PUBLIC_
void ndr_print_lsa_Close(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_Close
*r
)
5273 ndr_print_struct(ndr
, name
, "lsa_Close");
5275 if (flags
& NDR_SET_VALUES
) {
5276 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5278 if (flags
& NDR_IN
) {
5279 ndr_print_struct(ndr
, "in", "lsa_Close");
5281 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5283 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5287 if (flags
& NDR_OUT
) {
5288 ndr_print_struct(ndr
, "out", "lsa_Close");
5290 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5292 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5294 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5300 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_Delete(struct ndr_push
*ndr
, int flags
, const struct lsa_Delete
*r
)
5302 if (flags
& NDR_IN
) {
5303 if (r
->in
.handle
== NULL
) {
5304 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5306 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5308 if (flags
& NDR_OUT
) {
5309 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5311 return NDR_ERR_SUCCESS
;
5314 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_Delete(struct ndr_pull
*ndr
, int flags
, struct lsa_Delete
*r
)
5316 TALLOC_CTX
*_mem_save_handle_0
;
5317 if (flags
& NDR_IN
) {
5318 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5319 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5321 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5322 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5323 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5324 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5326 if (flags
& NDR_OUT
) {
5327 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5329 return NDR_ERR_SUCCESS
;
5332 _PUBLIC_
void ndr_print_lsa_Delete(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_Delete
*r
)
5334 ndr_print_struct(ndr
, name
, "lsa_Delete");
5336 if (flags
& NDR_SET_VALUES
) {
5337 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5339 if (flags
& NDR_IN
) {
5340 ndr_print_struct(ndr
, "in", "lsa_Delete");
5342 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5344 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5348 if (flags
& NDR_OUT
) {
5349 ndr_print_struct(ndr
, "out", "lsa_Delete");
5351 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5357 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_EnumPrivs(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumPrivs
*r
)
5359 if (flags
& NDR_IN
) {
5360 if (r
->in
.handle
== NULL
) {
5361 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5363 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5364 if (r
->in
.resume_handle
== NULL
) {
5365 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5367 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
5368 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_count
));
5370 if (flags
& NDR_OUT
) {
5371 if (r
->out
.resume_handle
== NULL
) {
5372 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5374 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
5375 if (r
->out
.privs
== NULL
) {
5376 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5378 NDR_CHECK(ndr_push_lsa_PrivArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.privs
));
5379 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5381 return NDR_ERR_SUCCESS
;
5384 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_EnumPrivs(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumPrivs
*r
)
5386 TALLOC_CTX
*_mem_save_handle_0
;
5387 TALLOC_CTX
*_mem_save_resume_handle_0
;
5388 TALLOC_CTX
*_mem_save_privs_0
;
5389 if (flags
& NDR_IN
) {
5390 ZERO_STRUCT(r
->out
);
5392 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5393 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5395 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5396 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5397 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5398 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5399 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5400 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
5402 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5403 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5404 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
5405 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5406 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_count
));
5407 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5408 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
5409 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
5410 ZERO_STRUCTP(r
->out
.privs
);
5412 if (flags
& NDR_OUT
) {
5413 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5414 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5416 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5417 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5418 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
5419 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5420 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5421 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
5423 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5424 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.privs
, LIBNDR_FLAG_REF_ALLOC
);
5425 NDR_CHECK(ndr_pull_lsa_PrivArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.privs
));
5426 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
5427 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5429 return NDR_ERR_SUCCESS
;
5432 _PUBLIC_
void ndr_print_lsa_EnumPrivs(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumPrivs
*r
)
5434 ndr_print_struct(ndr
, name
, "lsa_EnumPrivs");
5436 if (flags
& NDR_SET_VALUES
) {
5437 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5439 if (flags
& NDR_IN
) {
5440 ndr_print_struct(ndr
, "in", "lsa_EnumPrivs");
5442 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5444 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5446 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
5448 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
5450 ndr_print_uint32(ndr
, "max_count", r
->in
.max_count
);
5453 if (flags
& NDR_OUT
) {
5454 ndr_print_struct(ndr
, "out", "lsa_EnumPrivs");
5456 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
5458 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
5460 ndr_print_ptr(ndr
, "privs", r
->out
.privs
);
5462 ndr_print_lsa_PrivArray(ndr
, "privs", r
->out
.privs
);
5464 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5470 static enum ndr_err_code
ndr_push_lsa_QuerySecurity(struct ndr_push
*ndr
, int flags
, const struct lsa_QuerySecurity
*r
)
5472 if (flags
& NDR_IN
) {
5473 if (r
->in
.handle
== NULL
) {
5474 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5476 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5477 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5479 if (flags
& NDR_OUT
) {
5480 if (r
->out
.sdbuf
== NULL
) {
5481 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5483 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sdbuf
));
5484 if (*r
->out
.sdbuf
) {
5485 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5487 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5489 return NDR_ERR_SUCCESS
;
5492 static enum ndr_err_code
ndr_pull_lsa_QuerySecurity(struct ndr_pull
*ndr
, int flags
, struct lsa_QuerySecurity
*r
)
5494 uint32_t _ptr_sdbuf
;
5495 TALLOC_CTX
*_mem_save_handle_0
;
5496 TALLOC_CTX
*_mem_save_sdbuf_0
;
5497 TALLOC_CTX
*_mem_save_sdbuf_1
;
5498 if (flags
& NDR_IN
) {
5499 ZERO_STRUCT(r
->out
);
5501 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5502 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5504 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5505 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5506 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5507 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5508 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5509 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5510 ZERO_STRUCTP(r
->out
.sdbuf
);
5512 if (flags
& NDR_OUT
) {
5513 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5514 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5516 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5517 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5518 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sdbuf
));
5520 NDR_PULL_ALLOC(ndr
, *r
->out
.sdbuf
);
5522 *r
->out
.sdbuf
= NULL
;
5524 if (*r
->out
.sdbuf
) {
5525 _mem_save_sdbuf_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5526 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sdbuf
, 0);
5527 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5528 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_1
, 0);
5530 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5531 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5533 return NDR_ERR_SUCCESS
;
5536 _PUBLIC_
void ndr_print_lsa_QuerySecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QuerySecurity
*r
)
5538 ndr_print_struct(ndr
, name
, "lsa_QuerySecurity");
5540 if (flags
& NDR_SET_VALUES
) {
5541 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5543 if (flags
& NDR_IN
) {
5544 ndr_print_struct(ndr
, "in", "lsa_QuerySecurity");
5546 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5548 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5550 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5553 if (flags
& NDR_OUT
) {
5554 ndr_print_struct(ndr
, "out", "lsa_QuerySecurity");
5556 ndr_print_ptr(ndr
, "sdbuf", r
->out
.sdbuf
);
5558 ndr_print_ptr(ndr
, "sdbuf", *r
->out
.sdbuf
);
5560 if (*r
->out
.sdbuf
) {
5561 ndr_print_sec_desc_buf(ndr
, "sdbuf", *r
->out
.sdbuf
);
5565 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5571 static enum ndr_err_code
ndr_push_lsa_SetSecObj(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSecObj
*r
)
5573 if (flags
& NDR_IN
) {
5574 if (r
->in
.handle
== NULL
) {
5575 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5577 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5578 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5579 if (r
->in
.sdbuf
== NULL
) {
5580 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5582 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5584 if (flags
& NDR_OUT
) {
5585 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5587 return NDR_ERR_SUCCESS
;
5590 static enum ndr_err_code
ndr_pull_lsa_SetSecObj(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSecObj
*r
)
5592 TALLOC_CTX
*_mem_save_handle_0
;
5593 TALLOC_CTX
*_mem_save_sdbuf_0
;
5594 if (flags
& NDR_IN
) {
5595 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5596 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5598 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5599 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5600 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5601 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5602 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5603 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5604 NDR_PULL_ALLOC(ndr
, r
->in
.sdbuf
);
5606 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5607 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5608 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5609 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5611 if (flags
& NDR_OUT
) {
5612 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5614 return NDR_ERR_SUCCESS
;
5617 _PUBLIC_
void ndr_print_lsa_SetSecObj(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSecObj
*r
)
5619 ndr_print_struct(ndr
, name
, "lsa_SetSecObj");
5621 if (flags
& NDR_SET_VALUES
) {
5622 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5624 if (flags
& NDR_IN
) {
5625 ndr_print_struct(ndr
, "in", "lsa_SetSecObj");
5627 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5629 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5631 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5632 ndr_print_ptr(ndr
, "sdbuf", r
->in
.sdbuf
);
5634 ndr_print_sec_desc_buf(ndr
, "sdbuf", r
->in
.sdbuf
);
5638 if (flags
& NDR_OUT
) {
5639 ndr_print_struct(ndr
, "out", "lsa_SetSecObj");
5641 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5647 static enum ndr_err_code
ndr_push_lsa_ChangePassword(struct ndr_push
*ndr
, int flags
, const struct lsa_ChangePassword
*r
)
5649 if (flags
& NDR_IN
) {
5651 if (flags
& NDR_OUT
) {
5652 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5654 return NDR_ERR_SUCCESS
;
5657 static enum ndr_err_code
ndr_pull_lsa_ChangePassword(struct ndr_pull
*ndr
, int flags
, struct lsa_ChangePassword
*r
)
5659 if (flags
& NDR_IN
) {
5661 if (flags
& NDR_OUT
) {
5662 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5664 return NDR_ERR_SUCCESS
;
5667 _PUBLIC_
void ndr_print_lsa_ChangePassword(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_ChangePassword
*r
)
5669 ndr_print_struct(ndr
, name
, "lsa_ChangePassword");
5671 if (flags
& NDR_SET_VALUES
) {
5672 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5674 if (flags
& NDR_IN
) {
5675 ndr_print_struct(ndr
, "in", "lsa_ChangePassword");
5679 if (flags
& NDR_OUT
) {
5680 ndr_print_struct(ndr
, "out", "lsa_ChangePassword");
5682 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5688 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenPolicy
*r
)
5690 if (flags
& NDR_IN
) {
5691 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
5692 if (r
->in
.system_name
) {
5693 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
5695 if (r
->in
.attr
== NULL
) {
5696 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5698 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
5699 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
5701 if (flags
& NDR_OUT
) {
5702 if (r
->out
.handle
== NULL
) {
5703 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5705 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5706 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5708 return NDR_ERR_SUCCESS
;
5711 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenPolicy
*r
)
5713 uint32_t _ptr_system_name
;
5714 TALLOC_CTX
*_mem_save_system_name_0
;
5715 TALLOC_CTX
*_mem_save_attr_0
;
5716 TALLOC_CTX
*_mem_save_handle_0
;
5717 if (flags
& NDR_IN
) {
5718 ZERO_STRUCT(r
->out
);
5720 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
5721 if (_ptr_system_name
) {
5722 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
5724 r
->in
.system_name
= NULL
;
5726 if (r
->in
.system_name
) {
5727 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5728 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
5729 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
5730 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
5732 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5733 NDR_PULL_ALLOC(ndr
, r
->in
.attr
);
5735 _mem_save_attr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5736 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.attr
, LIBNDR_FLAG_REF_ALLOC
);
5737 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
5738 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attr_0
, LIBNDR_FLAG_REF_ALLOC
);
5739 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
5740 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5741 ZERO_STRUCTP(r
->out
.handle
);
5743 if (flags
& NDR_OUT
) {
5744 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5745 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5747 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5748 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5749 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5750 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5751 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5753 return NDR_ERR_SUCCESS
;
5756 _PUBLIC_
void ndr_print_lsa_OpenPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenPolicy
*r
)
5758 ndr_print_struct(ndr
, name
, "lsa_OpenPolicy");
5760 if (flags
& NDR_SET_VALUES
) {
5761 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5763 if (flags
& NDR_IN
) {
5764 ndr_print_struct(ndr
, "in", "lsa_OpenPolicy");
5766 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
5768 if (r
->in
.system_name
) {
5769 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
5772 ndr_print_ptr(ndr
, "attr", r
->in
.attr
);
5774 ndr_print_lsa_ObjectAttribute(ndr
, "attr", r
->in
.attr
);
5776 ndr_print_lsa_PolicyAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
5779 if (flags
& NDR_OUT
) {
5780 ndr_print_struct(ndr
, "out", "lsa_OpenPolicy");
5782 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5784 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5786 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5792 static enum ndr_err_code
ndr_push_lsa_QueryInfoPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryInfoPolicy
*r
)
5794 if (flags
& NDR_IN
) {
5795 if (r
->in
.handle
== NULL
) {
5796 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5798 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5799 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
5801 if (flags
& NDR_OUT
) {
5802 if (r
->out
.info
== NULL
) {
5803 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5805 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
5807 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
5808 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
5810 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5812 return NDR_ERR_SUCCESS
;
5815 static enum ndr_err_code
ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryInfoPolicy
*r
)
5818 TALLOC_CTX
*_mem_save_handle_0
;
5819 TALLOC_CTX
*_mem_save_info_0
;
5820 TALLOC_CTX
*_mem_save_info_1
;
5821 if (flags
& NDR_IN
) {
5822 ZERO_STRUCT(r
->out
);
5824 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5825 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5827 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5828 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5829 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5830 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5831 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
5832 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5833 ZERO_STRUCTP(r
->out
.info
);
5835 if (flags
& NDR_OUT
) {
5836 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5837 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5839 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5840 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
5841 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5843 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
5845 *r
->out
.info
= NULL
;
5848 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5849 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
5850 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
5851 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
5852 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
5854 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5855 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5857 return NDR_ERR_SUCCESS
;
5860 _PUBLIC_
void ndr_print_lsa_QueryInfoPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryInfoPolicy
*r
)
5862 ndr_print_struct(ndr
, name
, "lsa_QueryInfoPolicy");
5864 if (flags
& NDR_SET_VALUES
) {
5865 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5867 if (flags
& NDR_IN
) {
5868 ndr_print_struct(ndr
, "in", "lsa_QueryInfoPolicy");
5870 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5872 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5874 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
5877 if (flags
& NDR_OUT
) {
5878 ndr_print_struct(ndr
, "out", "lsa_QueryInfoPolicy");
5880 ndr_print_ptr(ndr
, "info", r
->out
.info
);
5882 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
5885 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
5886 ndr_print_lsa_PolicyInformation(ndr
, "info", *r
->out
.info
);
5890 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5896 static enum ndr_err_code
ndr_push_lsa_SetInfoPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInfoPolicy
*r
)
5898 if (flags
& NDR_IN
) {
5899 if (r
->in
.handle
== NULL
) {
5900 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5902 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5903 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
5904 if (r
->in
.info
== NULL
) {
5905 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5907 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
5908 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5910 if (flags
& NDR_OUT
) {
5911 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5913 return NDR_ERR_SUCCESS
;
5916 static enum ndr_err_code
ndr_pull_lsa_SetInfoPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInfoPolicy
*r
)
5918 TALLOC_CTX
*_mem_save_handle_0
;
5919 TALLOC_CTX
*_mem_save_info_0
;
5920 if (flags
& NDR_IN
) {
5921 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5922 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5924 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5925 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5926 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5927 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5928 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
5929 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5930 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
5932 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5933 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
5934 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
5935 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5938 if (flags
& NDR_OUT
) {
5939 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5941 return NDR_ERR_SUCCESS
;
5944 _PUBLIC_
void ndr_print_lsa_SetInfoPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInfoPolicy
*r
)
5946 ndr_print_struct(ndr
, name
, "lsa_SetInfoPolicy");
5948 if (flags
& NDR_SET_VALUES
) {
5949 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5951 if (flags
& NDR_IN
) {
5952 ndr_print_struct(ndr
, "in", "lsa_SetInfoPolicy");
5954 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5956 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5958 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
5959 ndr_print_ptr(ndr
, "info", r
->in
.info
);
5961 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
5962 ndr_print_lsa_PolicyInformation(ndr
, "info", r
->in
.info
);
5966 if (flags
& NDR_OUT
) {
5967 ndr_print_struct(ndr
, "out", "lsa_SetInfoPolicy");
5969 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5975 static enum ndr_err_code
ndr_push_lsa_ClearAuditLog(struct ndr_push
*ndr
, int flags
, const struct lsa_ClearAuditLog
*r
)
5977 if (flags
& NDR_IN
) {
5979 if (flags
& NDR_OUT
) {
5980 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5982 return NDR_ERR_SUCCESS
;
5985 static enum ndr_err_code
ndr_pull_lsa_ClearAuditLog(struct ndr_pull
*ndr
, int flags
, struct lsa_ClearAuditLog
*r
)
5987 if (flags
& NDR_IN
) {
5989 if (flags
& NDR_OUT
) {
5990 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5992 return NDR_ERR_SUCCESS
;
5995 _PUBLIC_
void ndr_print_lsa_ClearAuditLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_ClearAuditLog
*r
)
5997 ndr_print_struct(ndr
, name
, "lsa_ClearAuditLog");
5999 if (flags
& NDR_SET_VALUES
) {
6000 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6002 if (flags
& NDR_IN
) {
6003 ndr_print_struct(ndr
, "in", "lsa_ClearAuditLog");
6007 if (flags
& NDR_OUT
) {
6008 ndr_print_struct(ndr
, "out", "lsa_ClearAuditLog");
6010 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6016 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateAccount
*r
)
6018 if (flags
& NDR_IN
) {
6019 if (r
->in
.handle
== NULL
) {
6020 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6022 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6023 if (r
->in
.sid
== NULL
) {
6024 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6026 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6027 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6029 if (flags
& NDR_OUT
) {
6030 if (r
->out
.acct_handle
== NULL
) {
6031 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6033 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6034 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6036 return NDR_ERR_SUCCESS
;
6039 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateAccount
*r
)
6041 TALLOC_CTX
*_mem_save_handle_0
;
6042 TALLOC_CTX
*_mem_save_sid_0
;
6043 TALLOC_CTX
*_mem_save_acct_handle_0
;
6044 if (flags
& NDR_IN
) {
6045 ZERO_STRUCT(r
->out
);
6047 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6048 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6050 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6051 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6052 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6053 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6054 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6055 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
6057 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6058 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
6059 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6060 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
6061 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6062 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6063 ZERO_STRUCTP(r
->out
.acct_handle
);
6065 if (flags
& NDR_OUT
) {
6066 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6067 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6069 _mem_save_acct_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6070 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.acct_handle
, LIBNDR_FLAG_REF_ALLOC
);
6071 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6072 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_acct_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6073 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6075 return NDR_ERR_SUCCESS
;
6078 _PUBLIC_
void ndr_print_lsa_CreateAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateAccount
*r
)
6080 ndr_print_struct(ndr
, name
, "lsa_CreateAccount");
6082 if (flags
& NDR_SET_VALUES
) {
6083 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6085 if (flags
& NDR_IN
) {
6086 ndr_print_struct(ndr
, "in", "lsa_CreateAccount");
6088 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6090 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6092 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
6094 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
6096 ndr_print_lsa_AccountAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6099 if (flags
& NDR_OUT
) {
6100 ndr_print_struct(ndr
, "out", "lsa_CreateAccount");
6102 ndr_print_ptr(ndr
, "acct_handle", r
->out
.acct_handle
);
6104 ndr_print_policy_handle(ndr
, "acct_handle", r
->out
.acct_handle
);
6106 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6112 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_EnumAccounts(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccounts
*r
)
6114 if (flags
& NDR_IN
) {
6115 if (r
->in
.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
->in
.handle
));
6119 if (r
->in
.resume_handle
== NULL
) {
6120 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6122 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_entries
));
6125 if (flags
& NDR_OUT
) {
6126 if (r
->out
.resume_handle
== NULL
) {
6127 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6129 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6130 if (r
->out
.sids
== NULL
) {
6131 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6133 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6134 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6136 return NDR_ERR_SUCCESS
;
6139 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_EnumAccounts(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccounts
*r
)
6141 TALLOC_CTX
*_mem_save_handle_0
;
6142 TALLOC_CTX
*_mem_save_resume_handle_0
;
6143 TALLOC_CTX
*_mem_save_sids_0
;
6144 if (flags
& NDR_IN
) {
6145 ZERO_STRUCT(r
->out
);
6147 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6148 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6150 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6151 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6152 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6153 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6154 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6155 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6157 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6158 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6159 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6160 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6161 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_entries
));
6162 if (r
->in
.num_entries
> 8192) {
6163 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6165 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6166 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6167 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6168 ZERO_STRUCTP(r
->out
.sids
);
6170 if (flags
& NDR_OUT
) {
6171 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6172 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6174 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6175 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6176 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6177 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6178 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6179 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6181 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6182 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6183 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6184 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6185 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6187 return NDR_ERR_SUCCESS
;
6190 _PUBLIC_
void ndr_print_lsa_EnumAccounts(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccounts
*r
)
6192 ndr_print_struct(ndr
, name
, "lsa_EnumAccounts");
6194 if (flags
& NDR_SET_VALUES
) {
6195 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6197 if (flags
& NDR_IN
) {
6198 ndr_print_struct(ndr
, "in", "lsa_EnumAccounts");
6200 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6202 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6204 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6206 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6208 ndr_print_uint32(ndr
, "num_entries", r
->in
.num_entries
);
6211 if (flags
& NDR_OUT
) {
6212 ndr_print_struct(ndr
, "out", "lsa_EnumAccounts");
6214 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6216 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6218 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
6220 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
6222 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6228 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomain
*r
)
6230 if (flags
& NDR_IN
) {
6231 if (r
->in
.policy_handle
== NULL
) {
6232 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6234 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
6235 if (r
->in
.info
== NULL
) {
6236 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6238 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6239 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6241 if (flags
& NDR_OUT
) {
6242 if (r
->out
.trustdom_handle
== NULL
) {
6243 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6245 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
6246 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6248 return NDR_ERR_SUCCESS
;
6251 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomain
*r
)
6253 TALLOC_CTX
*_mem_save_policy_handle_0
;
6254 TALLOC_CTX
*_mem_save_info_0
;
6255 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
6256 if (flags
& NDR_IN
) {
6257 ZERO_STRUCT(r
->out
);
6259 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6260 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
6262 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6263 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
6264 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
6265 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6266 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6267 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6269 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6270 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
6271 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6272 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6273 NDR_CHECK(ndr_pull_lsa_TrustedAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6274 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
6275 ZERO_STRUCTP(r
->out
.trustdom_handle
);
6277 if (flags
& NDR_OUT
) {
6278 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6279 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
6281 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6282 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
6283 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
6284 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6285 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6287 return NDR_ERR_SUCCESS
;
6290 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomain
*r
)
6292 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomain");
6294 if (flags
& NDR_SET_VALUES
) {
6295 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6297 if (flags
& NDR_IN
) {
6298 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomain");
6300 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
6302 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
6304 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6306 ndr_print_lsa_DomainInfo(ndr
, "info", r
->in
.info
);
6308 ndr_print_lsa_TrustedAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6311 if (flags
& NDR_OUT
) {
6312 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomain");
6314 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
6316 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
6318 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6324 static enum ndr_err_code
ndr_push_lsa_EnumTrustDom(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumTrustDom
*r
)
6326 if (flags
& NDR_IN
) {
6327 if (r
->in
.handle
== NULL
) {
6328 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6330 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6331 if (r
->in
.resume_handle
== 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
.resume_handle
));
6335 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
6337 if (flags
& NDR_OUT
) {
6338 if (r
->out
.resume_handle
== NULL
) {
6339 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6341 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6342 if (r
->out
.domains
== NULL
) {
6343 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6345 NDR_CHECK(ndr_push_lsa_DomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
6346 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6348 return NDR_ERR_SUCCESS
;
6351 static enum ndr_err_code
ndr_pull_lsa_EnumTrustDom(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumTrustDom
*r
)
6353 TALLOC_CTX
*_mem_save_handle_0
;
6354 TALLOC_CTX
*_mem_save_resume_handle_0
;
6355 TALLOC_CTX
*_mem_save_domains_0
;
6356 if (flags
& NDR_IN
) {
6357 ZERO_STRUCT(r
->out
);
6359 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6360 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6362 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6363 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6364 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6365 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6366 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6367 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6369 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6370 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6371 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6372 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6373 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
6374 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6375 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6376 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6377 ZERO_STRUCTP(r
->out
.domains
);
6379 if (flags
& NDR_OUT
) {
6380 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6381 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6383 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6384 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6385 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6386 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6387 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6388 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6390 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6391 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6392 NDR_CHECK(ndr_pull_lsa_DomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
6393 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6394 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6396 return NDR_ERR_SUCCESS
;
6399 _PUBLIC_
void ndr_print_lsa_EnumTrustDom(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumTrustDom
*r
)
6401 ndr_print_struct(ndr
, name
, "lsa_EnumTrustDom");
6403 if (flags
& NDR_SET_VALUES
) {
6404 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6406 if (flags
& NDR_IN
) {
6407 ndr_print_struct(ndr
, "in", "lsa_EnumTrustDom");
6409 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6411 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6413 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6415 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6417 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
6420 if (flags
& NDR_OUT
) {
6421 ndr_print_struct(ndr
, "out", "lsa_EnumTrustDom");
6423 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6425 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6427 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6429 ndr_print_lsa_DomainList(ndr
, "domains", r
->out
.domains
);
6431 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6437 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames
*r
)
6439 uint32_t cntr_names_0
;
6440 if (flags
& NDR_IN
) {
6441 if (r
->in
.handle
== NULL
) {
6442 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6444 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6445 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
6446 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
6447 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6448 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
6450 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6451 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
6453 if (r
->in
.sids
== NULL
) {
6454 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6456 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6457 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
6458 if (r
->in
.count
== NULL
) {
6459 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6461 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
6463 if (flags
& NDR_OUT
) {
6464 if (r
->out
.domains
== NULL
) {
6465 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6467 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
6468 if (*r
->out
.domains
) {
6469 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6471 if (r
->out
.sids
== NULL
) {
6472 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6474 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6475 if (r
->out
.count
== NULL
) {
6476 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6478 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
6479 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6481 return NDR_ERR_SUCCESS
;
6484 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames
*r
)
6486 uint32_t cntr_names_0
;
6487 uint32_t _ptr_domains
;
6488 TALLOC_CTX
*_mem_save_handle_0
;
6489 TALLOC_CTX
*_mem_save_names_0
;
6490 TALLOC_CTX
*_mem_save_domains_0
;
6491 TALLOC_CTX
*_mem_save_domains_1
;
6492 TALLOC_CTX
*_mem_save_sids_0
;
6493 TALLOC_CTX
*_mem_save_count_0
;
6494 if (flags
& NDR_IN
) {
6495 ZERO_STRUCT(r
->out
);
6497 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6498 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6500 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6501 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6502 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6503 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6504 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
6505 if (r
->in
.num_names
> 1000) {
6506 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6508 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
6509 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
6510 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6511 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
6512 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6513 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
6515 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6516 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
6518 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
6519 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6520 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
6522 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6523 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6524 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6525 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6526 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
6527 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6528 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
6530 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6531 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
6532 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
6533 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6534 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6535 ZERO_STRUCTP(r
->out
.domains
);
6536 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6537 *r
->out
.sids
= *r
->in
.sids
;
6538 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6539 *r
->out
.count
= *r
->in
.count
;
6541 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
6544 if (flags
& NDR_OUT
) {
6545 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6546 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6548 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6549 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6550 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
6552 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
6554 *r
->out
.domains
= NULL
;
6556 if (*r
->out
.domains
) {
6557 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6558 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
6559 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6560 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
6562 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6563 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6564 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6566 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6567 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6568 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6569 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6570 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6571 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6573 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6574 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
6575 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
6576 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6577 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6579 return NDR_ERR_SUCCESS
;
6582 _PUBLIC_
void ndr_print_lsa_LookupNames(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames
*r
)
6584 uint32_t cntr_names_0
;
6585 ndr_print_struct(ndr
, name
, "lsa_LookupNames");
6587 if (flags
& NDR_SET_VALUES
) {
6588 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6590 if (flags
& NDR_IN
) {
6591 ndr_print_struct(ndr
, "in", "lsa_LookupNames");
6593 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6595 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6597 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
6598 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
6600 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
6602 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
6603 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
6608 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
6610 ndr_print_lsa_TransSidArray(ndr
, "sids", r
->in
.sids
);
6612 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
6613 ndr_print_ptr(ndr
, "count", r
->in
.count
);
6615 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
6619 if (flags
& NDR_OUT
) {
6620 ndr_print_struct(ndr
, "out", "lsa_LookupNames");
6622 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6624 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
6626 if (*r
->out
.domains
) {
6627 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
6631 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
6633 ndr_print_lsa_TransSidArray(ndr
, "sids", r
->out
.sids
);
6635 ndr_print_ptr(ndr
, "count", r
->out
.count
);
6637 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
6639 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6645 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids
*r
)
6647 if (flags
& NDR_IN
) {
6648 if (r
->in
.handle
== NULL
) {
6649 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6651 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6652 if (r
->in
.sids
== NULL
) {
6653 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6655 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6656 if (r
->in
.names
== NULL
) {
6657 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6659 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
6660 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
6661 if (r
->in
.count
== NULL
) {
6662 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6664 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
6666 if (flags
& NDR_OUT
) {
6667 if (r
->out
.domains
== NULL
) {
6668 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6670 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
6671 if (*r
->out
.domains
) {
6672 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6674 if (r
->out
.names
== NULL
) {
6675 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6677 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
6678 if (r
->out
.count
== NULL
) {
6679 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6681 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
6682 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6684 return NDR_ERR_SUCCESS
;
6687 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids
*r
)
6689 uint32_t _ptr_domains
;
6690 TALLOC_CTX
*_mem_save_handle_0
;
6691 TALLOC_CTX
*_mem_save_sids_0
;
6692 TALLOC_CTX
*_mem_save_domains_0
;
6693 TALLOC_CTX
*_mem_save_domains_1
;
6694 TALLOC_CTX
*_mem_save_names_0
;
6695 TALLOC_CTX
*_mem_save_count_0
;
6696 if (flags
& NDR_IN
) {
6697 ZERO_STRUCT(r
->out
);
6699 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6700 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6702 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6703 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6704 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6705 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6706 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6707 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
6709 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6710 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6711 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6712 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6713 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6714 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
6716 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6717 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
6718 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
6719 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
6720 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
6721 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6722 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
6724 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6725 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
6726 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
6727 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6728 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6729 ZERO_STRUCTP(r
->out
.domains
);
6730 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
6731 *r
->out
.names
= *r
->in
.names
;
6732 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6733 *r
->out
.count
= *r
->in
.count
;
6735 if (flags
& NDR_OUT
) {
6736 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6737 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6739 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6740 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6741 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
6743 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
6745 *r
->out
.domains
= NULL
;
6747 if (*r
->out
.domains
) {
6748 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6749 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
6750 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6751 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
6753 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6754 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6755 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
6757 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6758 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
6759 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
6760 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
6761 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6762 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6764 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6765 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
6766 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
6767 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6768 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6770 return NDR_ERR_SUCCESS
;
6773 _PUBLIC_
void ndr_print_lsa_LookupSids(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids
*r
)
6775 ndr_print_struct(ndr
, name
, "lsa_LookupSids");
6777 if (flags
& NDR_SET_VALUES
) {
6778 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6780 if (flags
& NDR_IN
) {
6781 ndr_print_struct(ndr
, "in", "lsa_LookupSids");
6783 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6785 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6787 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
6789 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
6791 ndr_print_ptr(ndr
, "names", r
->in
.names
);
6793 ndr_print_lsa_TransNameArray(ndr
, "names", r
->in
.names
);
6795 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
6796 ndr_print_ptr(ndr
, "count", r
->in
.count
);
6798 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
6802 if (flags
& NDR_OUT
) {
6803 ndr_print_struct(ndr
, "out", "lsa_LookupSids");
6805 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6807 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
6809 if (*r
->out
.domains
) {
6810 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
6814 ndr_print_ptr(ndr
, "names", r
->out
.names
);
6816 ndr_print_lsa_TransNameArray(ndr
, "names", r
->out
.names
);
6818 ndr_print_ptr(ndr
, "count", r
->out
.count
);
6820 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
6822 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6828 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateSecret
*r
)
6830 if (flags
& NDR_IN
) {
6831 if (r
->in
.handle
== NULL
) {
6832 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6834 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6835 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
6836 NDR_CHECK(ndr_push_lsa_SecretAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6838 if (flags
& NDR_OUT
) {
6839 if (r
->out
.sec_handle
== NULL
) {
6840 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6842 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
6843 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6845 return NDR_ERR_SUCCESS
;
6848 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateSecret
*r
)
6850 TALLOC_CTX
*_mem_save_handle_0
;
6851 TALLOC_CTX
*_mem_save_sec_handle_0
;
6852 if (flags
& NDR_IN
) {
6853 ZERO_STRUCT(r
->out
);
6855 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6856 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6858 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6859 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6860 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6861 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6862 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
6863 NDR_CHECK(ndr_pull_lsa_SecretAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6864 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
6865 ZERO_STRUCTP(r
->out
.sec_handle
);
6867 if (flags
& NDR_OUT
) {
6868 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6869 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
6871 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6872 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
6873 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
6874 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6875 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6877 return NDR_ERR_SUCCESS
;
6880 _PUBLIC_
void ndr_print_lsa_CreateSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateSecret
*r
)
6882 ndr_print_struct(ndr
, name
, "lsa_CreateSecret");
6884 if (flags
& NDR_SET_VALUES
) {
6885 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6887 if (flags
& NDR_IN
) {
6888 ndr_print_struct(ndr
, "in", "lsa_CreateSecret");
6890 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6892 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6894 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
6895 ndr_print_lsa_SecretAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6898 if (flags
& NDR_OUT
) {
6899 ndr_print_struct(ndr
, "out", "lsa_CreateSecret");
6901 ndr_print_ptr(ndr
, "sec_handle", r
->out
.sec_handle
);
6903 ndr_print_policy_handle(ndr
, "sec_handle", r
->out
.sec_handle
);
6905 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6911 static enum ndr_err_code
ndr_push_lsa_OpenAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenAccount
*r
)
6913 if (flags
& NDR_IN
) {
6914 if (r
->in
.handle
== NULL
) {
6915 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6917 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6918 if (r
->in
.sid
== NULL
) {
6919 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6921 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6922 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6924 if (flags
& NDR_OUT
) {
6925 if (r
->out
.acct_handle
== NULL
) {
6926 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6928 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6929 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6931 return NDR_ERR_SUCCESS
;
6934 static enum ndr_err_code
ndr_pull_lsa_OpenAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenAccount
*r
)
6936 TALLOC_CTX
*_mem_save_handle_0
;
6937 TALLOC_CTX
*_mem_save_sid_0
;
6938 TALLOC_CTX
*_mem_save_acct_handle_0
;
6939 if (flags
& NDR_IN
) {
6940 ZERO_STRUCT(r
->out
);
6942 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6943 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6945 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6946 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6947 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6948 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6949 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6950 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
6952 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6953 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
6954 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6955 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
6956 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6957 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6958 ZERO_STRUCTP(r
->out
.acct_handle
);
6960 if (flags
& NDR_OUT
) {
6961 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6962 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6964 _mem_save_acct_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6965 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.acct_handle
, LIBNDR_FLAG_REF_ALLOC
);
6966 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6967 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_acct_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6968 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6970 return NDR_ERR_SUCCESS
;
6973 _PUBLIC_
void ndr_print_lsa_OpenAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenAccount
*r
)
6975 ndr_print_struct(ndr
, name
, "lsa_OpenAccount");
6977 if (flags
& NDR_SET_VALUES
) {
6978 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6980 if (flags
& NDR_IN
) {
6981 ndr_print_struct(ndr
, "in", "lsa_OpenAccount");
6983 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6985 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6987 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
6989 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
6991 ndr_print_lsa_AccountAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6994 if (flags
& NDR_OUT
) {
6995 ndr_print_struct(ndr
, "out", "lsa_OpenAccount");
6997 ndr_print_ptr(ndr
, "acct_handle", r
->out
.acct_handle
);
6999 ndr_print_policy_handle(ndr
, "acct_handle", r
->out
.acct_handle
);
7001 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7007 static enum ndr_err_code
ndr_push_lsa_EnumPrivsAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumPrivsAccount
*r
)
7009 if (flags
& NDR_IN
) {
7010 if (r
->in
.handle
== NULL
) {
7011 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7013 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7015 if (flags
& NDR_OUT
) {
7016 if (r
->out
.privs
== NULL
) {
7017 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7019 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.privs
));
7020 if (*r
->out
.privs
) {
7021 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, *r
->out
.privs
));
7023 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7025 return NDR_ERR_SUCCESS
;
7028 static enum ndr_err_code
ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumPrivsAccount
*r
)
7030 uint32_t _ptr_privs
;
7031 TALLOC_CTX
*_mem_save_handle_0
;
7032 TALLOC_CTX
*_mem_save_privs_0
;
7033 TALLOC_CTX
*_mem_save_privs_1
;
7034 if (flags
& NDR_IN
) {
7035 ZERO_STRUCT(r
->out
);
7037 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7038 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7040 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7041 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7042 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7043 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7044 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
7045 ZERO_STRUCTP(r
->out
.privs
);
7047 if (flags
& NDR_OUT
) {
7048 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7049 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
7051 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7052 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.privs
, LIBNDR_FLAG_REF_ALLOC
);
7053 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
7055 NDR_PULL_ALLOC(ndr
, *r
->out
.privs
);
7057 *r
->out
.privs
= NULL
;
7059 if (*r
->out
.privs
) {
7060 _mem_save_privs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7061 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.privs
, 0);
7062 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, *r
->out
.privs
));
7063 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_1
, 0);
7065 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
7066 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7068 return NDR_ERR_SUCCESS
;
7071 _PUBLIC_
void ndr_print_lsa_EnumPrivsAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumPrivsAccount
*r
)
7073 ndr_print_struct(ndr
, name
, "lsa_EnumPrivsAccount");
7075 if (flags
& NDR_SET_VALUES
) {
7076 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7078 if (flags
& NDR_IN
) {
7079 ndr_print_struct(ndr
, "in", "lsa_EnumPrivsAccount");
7081 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7083 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7087 if (flags
& NDR_OUT
) {
7088 ndr_print_struct(ndr
, "out", "lsa_EnumPrivsAccount");
7090 ndr_print_ptr(ndr
, "privs", r
->out
.privs
);
7092 ndr_print_ptr(ndr
, "privs", *r
->out
.privs
);
7094 if (*r
->out
.privs
) {
7095 ndr_print_lsa_PrivilegeSet(ndr
, "privs", *r
->out
.privs
);
7099 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7105 static enum ndr_err_code
ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_AddPrivilegesToAccount
*r
)
7107 if (flags
& NDR_IN
) {
7108 if (r
->in
.handle
== NULL
) {
7109 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7111 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7112 if (r
->in
.privs
== NULL
) {
7113 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7115 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7117 if (flags
& NDR_OUT
) {
7118 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7120 return NDR_ERR_SUCCESS
;
7123 static enum ndr_err_code
ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_AddPrivilegesToAccount
*r
)
7125 TALLOC_CTX
*_mem_save_handle_0
;
7126 TALLOC_CTX
*_mem_save_privs_0
;
7127 if (flags
& NDR_IN
) {
7128 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7129 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7131 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7132 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7133 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7134 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7135 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7136 NDR_PULL_ALLOC(ndr
, r
->in
.privs
);
7138 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7139 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.privs
, LIBNDR_FLAG_REF_ALLOC
);
7140 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7141 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
7143 if (flags
& NDR_OUT
) {
7144 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7146 return NDR_ERR_SUCCESS
;
7149 _PUBLIC_
void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_AddPrivilegesToAccount
*r
)
7151 ndr_print_struct(ndr
, name
, "lsa_AddPrivilegesToAccount");
7153 if (flags
& NDR_SET_VALUES
) {
7154 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7156 if (flags
& NDR_IN
) {
7157 ndr_print_struct(ndr
, "in", "lsa_AddPrivilegesToAccount");
7159 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7161 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7163 ndr_print_ptr(ndr
, "privs", r
->in
.privs
);
7165 ndr_print_lsa_PrivilegeSet(ndr
, "privs", r
->in
.privs
);
7169 if (flags
& NDR_OUT
) {
7170 ndr_print_struct(ndr
, "out", "lsa_AddPrivilegesToAccount");
7172 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7178 static enum ndr_err_code
ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_RemovePrivilegesFromAccount
*r
)
7180 if (flags
& NDR_IN
) {
7181 if (r
->in
.handle
== NULL
) {
7182 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7184 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7185 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.remove_all
));
7186 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.privs
));
7188 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7191 if (flags
& NDR_OUT
) {
7192 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7194 return NDR_ERR_SUCCESS
;
7197 static enum ndr_err_code
ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_RemovePrivilegesFromAccount
*r
)
7199 uint32_t _ptr_privs
;
7200 TALLOC_CTX
*_mem_save_handle_0
;
7201 TALLOC_CTX
*_mem_save_privs_0
;
7202 if (flags
& NDR_IN
) {
7203 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7204 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7206 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7207 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7208 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7209 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7210 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.remove_all
));
7211 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
7213 NDR_PULL_ALLOC(ndr
, r
->in
.privs
);
7218 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7219 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.privs
, 0);
7220 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7221 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, 0);
7224 if (flags
& NDR_OUT
) {
7225 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7227 return NDR_ERR_SUCCESS
;
7230 _PUBLIC_
void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RemovePrivilegesFromAccount
*r
)
7232 ndr_print_struct(ndr
, name
, "lsa_RemovePrivilegesFromAccount");
7234 if (flags
& NDR_SET_VALUES
) {
7235 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7237 if (flags
& NDR_IN
) {
7238 ndr_print_struct(ndr
, "in", "lsa_RemovePrivilegesFromAccount");
7240 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7242 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7244 ndr_print_uint8(ndr
, "remove_all", r
->in
.remove_all
);
7245 ndr_print_ptr(ndr
, "privs", r
->in
.privs
);
7248 ndr_print_lsa_PrivilegeSet(ndr
, "privs", r
->in
.privs
);
7253 if (flags
& NDR_OUT
) {
7254 ndr_print_struct(ndr
, "out", "lsa_RemovePrivilegesFromAccount");
7256 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7262 static enum ndr_err_code
ndr_push_lsa_GetQuotasForAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_GetQuotasForAccount
*r
)
7264 if (flags
& NDR_IN
) {
7266 if (flags
& NDR_OUT
) {
7267 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7269 return NDR_ERR_SUCCESS
;
7272 static enum ndr_err_code
ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_GetQuotasForAccount
*r
)
7274 if (flags
& NDR_IN
) {
7276 if (flags
& NDR_OUT
) {
7277 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7279 return NDR_ERR_SUCCESS
;
7282 _PUBLIC_
void ndr_print_lsa_GetQuotasForAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetQuotasForAccount
*r
)
7284 ndr_print_struct(ndr
, name
, "lsa_GetQuotasForAccount");
7286 if (flags
& NDR_SET_VALUES
) {
7287 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7289 if (flags
& NDR_IN
) {
7290 ndr_print_struct(ndr
, "in", "lsa_GetQuotasForAccount");
7294 if (flags
& NDR_OUT
) {
7295 ndr_print_struct(ndr
, "out", "lsa_GetQuotasForAccount");
7297 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7303 static enum ndr_err_code
ndr_push_lsa_SetQuotasForAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_SetQuotasForAccount
*r
)
7305 if (flags
& NDR_IN
) {
7307 if (flags
& NDR_OUT
) {
7308 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7310 return NDR_ERR_SUCCESS
;
7313 static enum ndr_err_code
ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_SetQuotasForAccount
*r
)
7315 if (flags
& NDR_IN
) {
7317 if (flags
& NDR_OUT
) {
7318 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7320 return NDR_ERR_SUCCESS
;
7323 _PUBLIC_
void ndr_print_lsa_SetQuotasForAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetQuotasForAccount
*r
)
7325 ndr_print_struct(ndr
, name
, "lsa_SetQuotasForAccount");
7327 if (flags
& NDR_SET_VALUES
) {
7328 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7330 if (flags
& NDR_IN
) {
7331 ndr_print_struct(ndr
, "in", "lsa_SetQuotasForAccount");
7335 if (flags
& NDR_OUT
) {
7336 ndr_print_struct(ndr
, "out", "lsa_SetQuotasForAccount");
7338 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7344 static enum ndr_err_code
ndr_push_lsa_GetSystemAccessAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_GetSystemAccessAccount
*r
)
7346 if (flags
& NDR_IN
) {
7347 if (r
->in
.handle
== NULL
) {
7348 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7350 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7352 if (flags
& NDR_OUT
) {
7353 if (r
->out
.access_mask
== NULL
) {
7354 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7356 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, *r
->out
.access_mask
));
7357 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7359 return NDR_ERR_SUCCESS
;
7362 static enum ndr_err_code
ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_GetSystemAccessAccount
*r
)
7364 TALLOC_CTX
*_mem_save_handle_0
;
7365 TALLOC_CTX
*_mem_save_access_mask_0
;
7366 if (flags
& NDR_IN
) {
7367 ZERO_STRUCT(r
->out
);
7369 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7370 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7372 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7373 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7374 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7376 NDR_PULL_ALLOC(ndr
, r
->out
.access_mask
);
7377 ZERO_STRUCTP(r
->out
.access_mask
);
7379 if (flags
& NDR_OUT
) {
7380 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7381 NDR_PULL_ALLOC(ndr
, r
->out
.access_mask
);
7383 _mem_save_access_mask_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7384 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.access_mask
, LIBNDR_FLAG_REF_ALLOC
);
7385 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, r
->out
.access_mask
));
7386 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_access_mask_0
, LIBNDR_FLAG_REF_ALLOC
);
7387 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7389 return NDR_ERR_SUCCESS
;
7392 _PUBLIC_
void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetSystemAccessAccount
*r
)
7394 ndr_print_struct(ndr
, name
, "lsa_GetSystemAccessAccount");
7396 if (flags
& NDR_SET_VALUES
) {
7397 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7399 if (flags
& NDR_IN
) {
7400 ndr_print_struct(ndr
, "in", "lsa_GetSystemAccessAccount");
7402 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7404 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7408 if (flags
& NDR_OUT
) {
7409 ndr_print_struct(ndr
, "out", "lsa_GetSystemAccessAccount");
7411 ndr_print_ptr(ndr
, "access_mask", r
->out
.access_mask
);
7413 ndr_print_lsa_AccountAccessMask(ndr
, "access_mask", *r
->out
.access_mask
);
7415 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7421 static enum ndr_err_code
ndr_push_lsa_SetSystemAccessAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSystemAccessAccount
*r
)
7423 if (flags
& NDR_IN
) {
7424 if (r
->in
.handle
== NULL
) {
7425 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7427 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7428 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7430 if (flags
& NDR_OUT
) {
7431 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7433 return NDR_ERR_SUCCESS
;
7436 static enum ndr_err_code
ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSystemAccessAccount
*r
)
7438 TALLOC_CTX
*_mem_save_handle_0
;
7439 if (flags
& NDR_IN
) {
7440 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7441 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7443 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7444 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7445 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7446 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7447 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7449 if (flags
& NDR_OUT
) {
7450 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7452 return NDR_ERR_SUCCESS
;
7455 _PUBLIC_
void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSystemAccessAccount
*r
)
7457 ndr_print_struct(ndr
, name
, "lsa_SetSystemAccessAccount");
7459 if (flags
& NDR_SET_VALUES
) {
7460 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7462 if (flags
& NDR_IN
) {
7463 ndr_print_struct(ndr
, "in", "lsa_SetSystemAccessAccount");
7465 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7467 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7469 ndr_print_lsa_AccountAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7472 if (flags
& NDR_OUT
) {
7473 ndr_print_struct(ndr
, "out", "lsa_SetSystemAccessAccount");
7475 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7481 static enum ndr_err_code
ndr_push_lsa_OpenTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenTrustedDomain
*r
)
7483 if (flags
& NDR_IN
) {
7484 if (r
->in
.handle
== NULL
) {
7485 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7487 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7488 if (r
->in
.sid
== NULL
) {
7489 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7491 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7492 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7494 if (flags
& NDR_OUT
) {
7495 if (r
->out
.trustdom_handle
== NULL
) {
7496 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7498 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
7499 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7501 return NDR_ERR_SUCCESS
;
7504 static enum ndr_err_code
ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenTrustedDomain
*r
)
7506 TALLOC_CTX
*_mem_save_handle_0
;
7507 TALLOC_CTX
*_mem_save_sid_0
;
7508 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7509 if (flags
& NDR_IN
) {
7510 ZERO_STRUCT(r
->out
);
7512 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7513 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7515 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7516 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7517 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7518 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7519 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7520 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
7522 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7523 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
7524 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7525 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
7526 NDR_CHECK(ndr_pull_lsa_TrustedAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7527 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
7528 ZERO_STRUCTP(r
->out
.trustdom_handle
);
7530 if (flags
& NDR_OUT
) {
7531 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7532 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
7534 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7535 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7536 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
7537 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7538 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7540 return NDR_ERR_SUCCESS
;
7543 _PUBLIC_
void ndr_print_lsa_OpenTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenTrustedDomain
*r
)
7545 ndr_print_struct(ndr
, name
, "lsa_OpenTrustedDomain");
7547 if (flags
& NDR_SET_VALUES
) {
7548 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7550 if (flags
& NDR_IN
) {
7551 ndr_print_struct(ndr
, "in", "lsa_OpenTrustedDomain");
7553 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7555 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7557 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
7559 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
7561 ndr_print_lsa_TrustedAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7564 if (flags
& NDR_OUT
) {
7565 ndr_print_struct(ndr
, "out", "lsa_OpenTrustedDomain");
7567 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
7569 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
7571 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7577 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfo
*r
)
7579 if (flags
& NDR_IN
) {
7580 if (r
->in
.trustdom_handle
== NULL
) {
7581 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7583 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7584 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7586 if (flags
& NDR_OUT
) {
7587 if (r
->out
.info
== NULL
) {
7588 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7590 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
7592 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7593 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7595 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7597 return NDR_ERR_SUCCESS
;
7600 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfo
*r
)
7603 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7604 TALLOC_CTX
*_mem_save_info_0
;
7605 TALLOC_CTX
*_mem_save_info_1
;
7606 if (flags
& NDR_IN
) {
7607 ZERO_STRUCT(r
->out
);
7609 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7610 NDR_PULL_ALLOC(ndr
, r
->in
.trustdom_handle
);
7612 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7613 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7614 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7615 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7616 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7617 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7618 ZERO_STRUCTP(r
->out
.info
);
7620 if (flags
& NDR_OUT
) {
7621 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7622 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7624 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7625 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
7626 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
7628 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
7630 *r
->out
.info
= NULL
;
7633 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7634 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
7635 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7636 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7637 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
7639 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7640 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7642 return NDR_ERR_SUCCESS
;
7645 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfo
*r
)
7647 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfo");
7649 if (flags
& NDR_SET_VALUES
) {
7650 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7652 if (flags
& NDR_IN
) {
7653 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfo");
7655 ndr_print_ptr(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7657 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7659 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
7662 if (flags
& NDR_OUT
) {
7663 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfo");
7665 ndr_print_ptr(ndr
, "info", r
->out
.info
);
7667 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
7670 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
7671 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
7675 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7681 static enum ndr_err_code
ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInformationTrustedDomain
*r
)
7683 if (flags
& NDR_IN
) {
7684 if (r
->in
.trustdom_handle
== NULL
) {
7685 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7687 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7688 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7689 if (r
->in
.info
== NULL
) {
7690 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7692 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7693 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7695 if (flags
& NDR_OUT
) {
7696 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7698 return NDR_ERR_SUCCESS
;
7701 static enum ndr_err_code
ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInformationTrustedDomain
*r
)
7703 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7704 TALLOC_CTX
*_mem_save_info_0
;
7705 if (flags
& NDR_IN
) {
7706 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7707 NDR_PULL_ALLOC(ndr
, r
->in
.trustdom_handle
);
7709 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7710 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7711 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7712 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7713 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7714 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7715 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
7717 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7718 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
7719 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7720 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7721 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7723 if (flags
& NDR_OUT
) {
7724 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7726 return NDR_ERR_SUCCESS
;
7729 _PUBLIC_
void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInformationTrustedDomain
*r
)
7731 ndr_print_struct(ndr
, name
, "lsa_SetInformationTrustedDomain");
7733 if (flags
& NDR_SET_VALUES
) {
7734 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7736 if (flags
& NDR_IN
) {
7737 ndr_print_struct(ndr
, "in", "lsa_SetInformationTrustedDomain");
7739 ndr_print_ptr(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7741 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7743 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
7744 ndr_print_ptr(ndr
, "info", r
->in
.info
);
7746 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
7747 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
7751 if (flags
& NDR_OUT
) {
7752 ndr_print_struct(ndr
, "out", "lsa_SetInformationTrustedDomain");
7754 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7760 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenSecret
*r
)
7762 if (flags
& NDR_IN
) {
7763 if (r
->in
.handle
== NULL
) {
7764 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7766 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7767 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
7768 NDR_CHECK(ndr_push_lsa_SecretAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7770 if (flags
& NDR_OUT
) {
7771 if (r
->out
.sec_handle
== NULL
) {
7772 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7774 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
7775 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7777 return NDR_ERR_SUCCESS
;
7780 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenSecret
*r
)
7782 TALLOC_CTX
*_mem_save_handle_0
;
7783 TALLOC_CTX
*_mem_save_sec_handle_0
;
7784 if (flags
& NDR_IN
) {
7785 ZERO_STRUCT(r
->out
);
7787 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7788 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7790 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7791 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7792 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7793 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7794 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
7795 NDR_CHECK(ndr_pull_lsa_SecretAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7796 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
7797 ZERO_STRUCTP(r
->out
.sec_handle
);
7799 if (flags
& NDR_OUT
) {
7800 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7801 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
7803 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7804 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
7805 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
7806 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7807 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7809 return NDR_ERR_SUCCESS
;
7812 _PUBLIC_
void ndr_print_lsa_OpenSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenSecret
*r
)
7814 ndr_print_struct(ndr
, name
, "lsa_OpenSecret");
7816 if (flags
& NDR_SET_VALUES
) {
7817 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7819 if (flags
& NDR_IN
) {
7820 ndr_print_struct(ndr
, "in", "lsa_OpenSecret");
7822 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7824 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7826 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
7827 ndr_print_lsa_SecretAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7830 if (flags
& NDR_OUT
) {
7831 ndr_print_struct(ndr
, "out", "lsa_OpenSecret");
7833 ndr_print_ptr(ndr
, "sec_handle", r
->out
.sec_handle
);
7835 ndr_print_policy_handle(ndr
, "sec_handle", r
->out
.sec_handle
);
7837 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7843 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SetSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSecret
*r
)
7845 if (flags
& NDR_IN
) {
7846 if (r
->in
.sec_handle
== NULL
) {
7847 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7849 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7850 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_val
));
7851 if (r
->in
.new_val
) {
7852 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7854 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_val
));
7855 if (r
->in
.old_val
) {
7856 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7859 if (flags
& NDR_OUT
) {
7860 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7862 return NDR_ERR_SUCCESS
;
7865 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SetSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSecret
*r
)
7867 uint32_t _ptr_new_val
;
7868 uint32_t _ptr_old_val
;
7869 TALLOC_CTX
*_mem_save_sec_handle_0
;
7870 TALLOC_CTX
*_mem_save_new_val_0
;
7871 TALLOC_CTX
*_mem_save_old_val_0
;
7872 if (flags
& NDR_IN
) {
7873 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7874 NDR_PULL_ALLOC(ndr
, r
->in
.sec_handle
);
7876 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7877 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
7878 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7879 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7880 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
7882 NDR_PULL_ALLOC(ndr
, r
->in
.new_val
);
7884 r
->in
.new_val
= NULL
;
7886 if (r
->in
.new_val
) {
7887 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7888 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_val
, 0);
7889 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7890 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
7892 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
7894 NDR_PULL_ALLOC(ndr
, r
->in
.old_val
);
7896 r
->in
.old_val
= NULL
;
7898 if (r
->in
.old_val
) {
7899 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7900 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_val
, 0);
7901 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7902 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
7905 if (flags
& NDR_OUT
) {
7906 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7908 return NDR_ERR_SUCCESS
;
7911 _PUBLIC_
void ndr_print_lsa_SetSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSecret
*r
)
7913 ndr_print_struct(ndr
, name
, "lsa_SetSecret");
7915 if (flags
& NDR_SET_VALUES
) {
7916 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7918 if (flags
& NDR_IN
) {
7919 ndr_print_struct(ndr
, "in", "lsa_SetSecret");
7921 ndr_print_ptr(ndr
, "sec_handle", r
->in
.sec_handle
);
7923 ndr_print_policy_handle(ndr
, "sec_handle", r
->in
.sec_handle
);
7925 ndr_print_ptr(ndr
, "new_val", r
->in
.new_val
);
7927 if (r
->in
.new_val
) {
7928 ndr_print_lsa_DATA_BUF(ndr
, "new_val", r
->in
.new_val
);
7931 ndr_print_ptr(ndr
, "old_val", r
->in
.old_val
);
7933 if (r
->in
.old_val
) {
7934 ndr_print_lsa_DATA_BUF(ndr
, "old_val", r
->in
.old_val
);
7939 if (flags
& NDR_OUT
) {
7940 ndr_print_struct(ndr
, "out", "lsa_SetSecret");
7942 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7948 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_QuerySecret(struct ndr_push
*ndr
, int flags
, const struct lsa_QuerySecret
*r
)
7950 if (flags
& NDR_IN
) {
7951 if (r
->in
.sec_handle
== NULL
) {
7952 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7954 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7955 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_val
));
7956 if (r
->in
.new_val
) {
7957 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7959 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_mtime
));
7960 if (r
->in
.new_mtime
) {
7961 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->in
.new_mtime
));
7963 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_val
));
7964 if (r
->in
.old_val
) {
7965 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7967 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_mtime
));
7968 if (r
->in
.old_mtime
) {
7969 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->in
.old_mtime
));
7972 if (flags
& NDR_OUT
) {
7973 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.new_val
));
7974 if (r
->out
.new_val
) {
7975 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.new_val
));
7977 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.new_mtime
));
7978 if (r
->out
.new_mtime
) {
7979 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->out
.new_mtime
));
7981 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.old_val
));
7982 if (r
->out
.old_val
) {
7983 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.old_val
));
7985 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.old_mtime
));
7986 if (r
->out
.old_mtime
) {
7987 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->out
.old_mtime
));
7989 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7991 return NDR_ERR_SUCCESS
;
7994 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_QuerySecret(struct ndr_pull
*ndr
, int flags
, struct lsa_QuerySecret
*r
)
7996 uint32_t _ptr_new_val
;
7997 uint32_t _ptr_new_mtime
;
7998 uint32_t _ptr_old_val
;
7999 uint32_t _ptr_old_mtime
;
8000 TALLOC_CTX
*_mem_save_sec_handle_0
;
8001 TALLOC_CTX
*_mem_save_new_val_0
;
8002 TALLOC_CTX
*_mem_save_new_mtime_0
;
8003 TALLOC_CTX
*_mem_save_old_val_0
;
8004 TALLOC_CTX
*_mem_save_old_mtime_0
;
8005 if (flags
& NDR_IN
) {
8006 ZERO_STRUCT(r
->out
);
8008 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8009 NDR_PULL_ALLOC(ndr
, r
->in
.sec_handle
);
8011 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8012 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
8013 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
8014 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8015 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
8017 NDR_PULL_ALLOC(ndr
, r
->in
.new_val
);
8019 r
->in
.new_val
= NULL
;
8021 if (r
->in
.new_val
) {
8022 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8023 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_val
, 0);
8024 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
8025 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
8027 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_mtime
));
8028 if (_ptr_new_mtime
) {
8029 NDR_PULL_ALLOC(ndr
, r
->in
.new_mtime
);
8031 r
->in
.new_mtime
= NULL
;
8033 if (r
->in
.new_mtime
) {
8034 _mem_save_new_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8035 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_mtime
, 0);
8036 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->in
.new_mtime
));
8037 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_mtime_0
, 0);
8039 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
8041 NDR_PULL_ALLOC(ndr
, r
->in
.old_val
);
8043 r
->in
.old_val
= NULL
;
8045 if (r
->in
.old_val
) {
8046 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8047 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_val
, 0);
8048 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
8049 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
8051 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_mtime
));
8052 if (_ptr_old_mtime
) {
8053 NDR_PULL_ALLOC(ndr
, r
->in
.old_mtime
);
8055 r
->in
.old_mtime
= NULL
;
8057 if (r
->in
.old_mtime
) {
8058 _mem_save_old_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8059 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_mtime
, 0);
8060 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->in
.old_mtime
));
8061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_mtime_0
, 0);
8064 if (flags
& NDR_OUT
) {
8065 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
8067 NDR_PULL_ALLOC(ndr
, r
->out
.new_val
);
8069 r
->out
.new_val
= NULL
;
8071 if (r
->out
.new_val
) {
8072 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8073 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.new_val
, 0);
8074 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.new_val
));
8075 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
8077 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_mtime
));
8078 if (_ptr_new_mtime
) {
8079 NDR_PULL_ALLOC(ndr
, r
->out
.new_mtime
);
8081 r
->out
.new_mtime
= NULL
;
8083 if (r
->out
.new_mtime
) {
8084 _mem_save_new_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8085 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.new_mtime
, 0);
8086 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->out
.new_mtime
));
8087 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_mtime_0
, 0);
8089 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
8091 NDR_PULL_ALLOC(ndr
, r
->out
.old_val
);
8093 r
->out
.old_val
= NULL
;
8095 if (r
->out
.old_val
) {
8096 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8097 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.old_val
, 0);
8098 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.old_val
));
8099 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
8101 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_mtime
));
8102 if (_ptr_old_mtime
) {
8103 NDR_PULL_ALLOC(ndr
, r
->out
.old_mtime
);
8105 r
->out
.old_mtime
= NULL
;
8107 if (r
->out
.old_mtime
) {
8108 _mem_save_old_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8109 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.old_mtime
, 0);
8110 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->out
.old_mtime
));
8111 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_mtime_0
, 0);
8113 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8115 return NDR_ERR_SUCCESS
;
8118 _PUBLIC_
void ndr_print_lsa_QuerySecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QuerySecret
*r
)
8120 ndr_print_struct(ndr
, name
, "lsa_QuerySecret");
8122 if (flags
& NDR_SET_VALUES
) {
8123 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8125 if (flags
& NDR_IN
) {
8126 ndr_print_struct(ndr
, "in", "lsa_QuerySecret");
8128 ndr_print_ptr(ndr
, "sec_handle", r
->in
.sec_handle
);
8130 ndr_print_policy_handle(ndr
, "sec_handle", r
->in
.sec_handle
);
8132 ndr_print_ptr(ndr
, "new_val", r
->in
.new_val
);
8134 if (r
->in
.new_val
) {
8135 ndr_print_lsa_DATA_BUF_PTR(ndr
, "new_val", r
->in
.new_val
);
8138 ndr_print_ptr(ndr
, "new_mtime", r
->in
.new_mtime
);
8140 if (r
->in
.new_mtime
) {
8141 ndr_print_NTTIME_hyper(ndr
, "new_mtime", *r
->in
.new_mtime
);
8144 ndr_print_ptr(ndr
, "old_val", r
->in
.old_val
);
8146 if (r
->in
.old_val
) {
8147 ndr_print_lsa_DATA_BUF_PTR(ndr
, "old_val", r
->in
.old_val
);
8150 ndr_print_ptr(ndr
, "old_mtime", r
->in
.old_mtime
);
8152 if (r
->in
.old_mtime
) {
8153 ndr_print_NTTIME_hyper(ndr
, "old_mtime", *r
->in
.old_mtime
);
8158 if (flags
& NDR_OUT
) {
8159 ndr_print_struct(ndr
, "out", "lsa_QuerySecret");
8161 ndr_print_ptr(ndr
, "new_val", r
->out
.new_val
);
8163 if (r
->out
.new_val
) {
8164 ndr_print_lsa_DATA_BUF_PTR(ndr
, "new_val", r
->out
.new_val
);
8167 ndr_print_ptr(ndr
, "new_mtime", r
->out
.new_mtime
);
8169 if (r
->out
.new_mtime
) {
8170 ndr_print_NTTIME_hyper(ndr
, "new_mtime", *r
->out
.new_mtime
);
8173 ndr_print_ptr(ndr
, "old_val", r
->out
.old_val
);
8175 if (r
->out
.old_val
) {
8176 ndr_print_lsa_DATA_BUF_PTR(ndr
, "old_val", r
->out
.old_val
);
8179 ndr_print_ptr(ndr
, "old_mtime", r
->out
.old_mtime
);
8181 if (r
->out
.old_mtime
) {
8182 ndr_print_NTTIME_hyper(ndr
, "old_mtime", *r
->out
.old_mtime
);
8185 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8191 static enum ndr_err_code
ndr_push_lsa_LookupPrivValue(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivValue
*r
)
8193 if (flags
& NDR_IN
) {
8194 if (r
->in
.handle
== NULL
) {
8195 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8197 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8198 if (r
->in
.name
== NULL
) {
8199 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8201 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8203 if (flags
& NDR_OUT
) {
8204 if (r
->out
.luid
== NULL
) {
8205 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8207 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, r
->out
.luid
));
8208 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8210 return NDR_ERR_SUCCESS
;
8213 static enum ndr_err_code
ndr_pull_lsa_LookupPrivValue(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivValue
*r
)
8215 TALLOC_CTX
*_mem_save_handle_0
;
8216 TALLOC_CTX
*_mem_save_name_0
;
8217 TALLOC_CTX
*_mem_save_luid_0
;
8218 if (flags
& NDR_IN
) {
8219 ZERO_STRUCT(r
->out
);
8221 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8222 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8224 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8225 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8226 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8227 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8228 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8229 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8231 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8232 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
8233 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8234 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8235 NDR_PULL_ALLOC(ndr
, r
->out
.luid
);
8236 ZERO_STRUCTP(r
->out
.luid
);
8238 if (flags
& NDR_OUT
) {
8239 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8240 NDR_PULL_ALLOC(ndr
, r
->out
.luid
);
8242 _mem_save_luid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8243 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.luid
, LIBNDR_FLAG_REF_ALLOC
);
8244 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, r
->out
.luid
));
8245 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_luid_0
, LIBNDR_FLAG_REF_ALLOC
);
8246 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8248 return NDR_ERR_SUCCESS
;
8251 _PUBLIC_
void ndr_print_lsa_LookupPrivValue(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivValue
*r
)
8253 ndr_print_struct(ndr
, name
, "lsa_LookupPrivValue");
8255 if (flags
& NDR_SET_VALUES
) {
8256 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8258 if (flags
& NDR_IN
) {
8259 ndr_print_struct(ndr
, "in", "lsa_LookupPrivValue");
8261 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8263 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8265 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8267 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8271 if (flags
& NDR_OUT
) {
8272 ndr_print_struct(ndr
, "out", "lsa_LookupPrivValue");
8274 ndr_print_ptr(ndr
, "luid", r
->out
.luid
);
8276 ndr_print_lsa_LUID(ndr
, "luid", r
->out
.luid
);
8278 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8284 static enum ndr_err_code
ndr_push_lsa_LookupPrivName(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivName
*r
)
8286 if (flags
& NDR_IN
) {
8287 if (r
->in
.handle
== NULL
) {
8288 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8290 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8291 if (r
->in
.luid
== NULL
) {
8292 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8294 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, r
->in
.luid
));
8296 if (flags
& NDR_OUT
) {
8297 if (r
->out
.name
== NULL
) {
8298 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8300 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.name
));
8302 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.name
));
8304 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8306 return NDR_ERR_SUCCESS
;
8309 static enum ndr_err_code
ndr_pull_lsa_LookupPrivName(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivName
*r
)
8312 TALLOC_CTX
*_mem_save_handle_0
;
8313 TALLOC_CTX
*_mem_save_luid_0
;
8314 TALLOC_CTX
*_mem_save_name_0
;
8315 TALLOC_CTX
*_mem_save_name_1
;
8316 if (flags
& NDR_IN
) {
8317 ZERO_STRUCT(r
->out
);
8319 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8320 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8322 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8323 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8324 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8325 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8326 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8327 NDR_PULL_ALLOC(ndr
, r
->in
.luid
);
8329 _mem_save_luid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8330 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.luid
, LIBNDR_FLAG_REF_ALLOC
);
8331 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, r
->in
.luid
));
8332 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_luid_0
, LIBNDR_FLAG_REF_ALLOC
);
8333 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
8334 ZERO_STRUCTP(r
->out
.name
);
8336 if (flags
& NDR_OUT
) {
8337 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8338 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
8340 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8341 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.name
, LIBNDR_FLAG_REF_ALLOC
);
8342 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
8344 NDR_PULL_ALLOC(ndr
, *r
->out
.name
);
8346 *r
->out
.name
= NULL
;
8349 _mem_save_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8350 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.name
, 0);
8351 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.name
));
8352 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_1
, 0);
8354 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8355 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8357 return NDR_ERR_SUCCESS
;
8360 _PUBLIC_
void ndr_print_lsa_LookupPrivName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivName
*r
)
8362 ndr_print_struct(ndr
, name
, "lsa_LookupPrivName");
8364 if (flags
& NDR_SET_VALUES
) {
8365 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8367 if (flags
& NDR_IN
) {
8368 ndr_print_struct(ndr
, "in", "lsa_LookupPrivName");
8370 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8372 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8374 ndr_print_ptr(ndr
, "luid", r
->in
.luid
);
8376 ndr_print_lsa_LUID(ndr
, "luid", r
->in
.luid
);
8380 if (flags
& NDR_OUT
) {
8381 ndr_print_struct(ndr
, "out", "lsa_LookupPrivName");
8383 ndr_print_ptr(ndr
, "name", r
->out
.name
);
8385 ndr_print_ptr(ndr
, "name", *r
->out
.name
);
8388 ndr_print_lsa_StringLarge(ndr
, "name", *r
->out
.name
);
8392 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8398 static enum ndr_err_code
ndr_push_lsa_LookupPrivDisplayName(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivDisplayName
*r
)
8400 if (flags
& NDR_IN
) {
8401 if (r
->in
.handle
== NULL
) {
8402 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8404 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8405 if (r
->in
.name
== NULL
) {
8406 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8408 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8409 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.language_id
));
8410 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.language_id_sys
));
8412 if (flags
& NDR_OUT
) {
8413 if (r
->out
.disp_name
== NULL
) {
8414 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8416 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.disp_name
));
8417 if (*r
->out
.disp_name
) {
8418 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.disp_name
));
8420 if (r
->out
.returned_language_id
== NULL
) {
8421 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8423 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->out
.returned_language_id
));
8424 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8426 return NDR_ERR_SUCCESS
;
8429 static enum ndr_err_code
ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivDisplayName
*r
)
8431 uint32_t _ptr_disp_name
;
8432 TALLOC_CTX
*_mem_save_handle_0
;
8433 TALLOC_CTX
*_mem_save_name_0
;
8434 TALLOC_CTX
*_mem_save_disp_name_0
;
8435 TALLOC_CTX
*_mem_save_disp_name_1
;
8436 TALLOC_CTX
*_mem_save_returned_language_id_0
;
8437 if (flags
& NDR_IN
) {
8438 ZERO_STRUCT(r
->out
);
8440 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8441 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8443 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8444 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8445 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8446 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8447 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8448 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8450 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8451 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
8452 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8453 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8454 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.language_id
));
8455 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.language_id_sys
));
8456 NDR_PULL_ALLOC(ndr
, r
->out
.disp_name
);
8457 ZERO_STRUCTP(r
->out
.disp_name
);
8458 NDR_PULL_ALLOC(ndr
, r
->out
.returned_language_id
);
8459 ZERO_STRUCTP(r
->out
.returned_language_id
);
8461 if (flags
& NDR_OUT
) {
8462 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8463 NDR_PULL_ALLOC(ndr
, r
->out
.disp_name
);
8465 _mem_save_disp_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8466 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.disp_name
, LIBNDR_FLAG_REF_ALLOC
);
8467 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_disp_name
));
8468 if (_ptr_disp_name
) {
8469 NDR_PULL_ALLOC(ndr
, *r
->out
.disp_name
);
8471 *r
->out
.disp_name
= NULL
;
8473 if (*r
->out
.disp_name
) {
8474 _mem_save_disp_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8475 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.disp_name
, 0);
8476 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.disp_name
));
8477 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_disp_name_1
, 0);
8479 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_disp_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8480 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8481 NDR_PULL_ALLOC(ndr
, r
->out
.returned_language_id
);
8483 _mem_save_returned_language_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8484 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_language_id
, LIBNDR_FLAG_REF_ALLOC
);
8485 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->out
.returned_language_id
));
8486 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_language_id_0
, LIBNDR_FLAG_REF_ALLOC
);
8487 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8489 return NDR_ERR_SUCCESS
;
8492 _PUBLIC_
void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivDisplayName
*r
)
8494 ndr_print_struct(ndr
, name
, "lsa_LookupPrivDisplayName");
8496 if (flags
& NDR_SET_VALUES
) {
8497 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8499 if (flags
& NDR_IN
) {
8500 ndr_print_struct(ndr
, "in", "lsa_LookupPrivDisplayName");
8502 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8504 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8506 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8508 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8510 ndr_print_uint16(ndr
, "language_id", r
->in
.language_id
);
8511 ndr_print_uint16(ndr
, "language_id_sys", r
->in
.language_id_sys
);
8514 if (flags
& NDR_OUT
) {
8515 ndr_print_struct(ndr
, "out", "lsa_LookupPrivDisplayName");
8517 ndr_print_ptr(ndr
, "disp_name", r
->out
.disp_name
);
8519 ndr_print_ptr(ndr
, "disp_name", *r
->out
.disp_name
);
8521 if (*r
->out
.disp_name
) {
8522 ndr_print_lsa_StringLarge(ndr
, "disp_name", *r
->out
.disp_name
);
8526 ndr_print_ptr(ndr
, "returned_language_id", r
->out
.returned_language_id
);
8528 ndr_print_uint16(ndr
, "returned_language_id", *r
->out
.returned_language_id
);
8530 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8536 static enum ndr_err_code
ndr_push_lsa_DeleteObject(struct ndr_push
*ndr
, int flags
, const struct lsa_DeleteObject
*r
)
8538 if (flags
& NDR_IN
) {
8539 if (r
->in
.handle
== NULL
) {
8540 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8542 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8544 if (flags
& NDR_OUT
) {
8545 if (r
->out
.handle
== NULL
) {
8546 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8548 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
8549 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8551 return NDR_ERR_SUCCESS
;
8554 static enum ndr_err_code
ndr_pull_lsa_DeleteObject(struct ndr_pull
*ndr
, int flags
, struct lsa_DeleteObject
*r
)
8556 TALLOC_CTX
*_mem_save_handle_0
;
8557 if (flags
& NDR_IN
) {
8558 ZERO_STRUCT(r
->out
);
8560 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8561 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8563 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8564 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8565 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8566 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8567 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
8568 *r
->out
.handle
= *r
->in
.handle
;
8570 if (flags
& NDR_OUT
) {
8571 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8572 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
8574 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8575 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8576 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
8577 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8578 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8580 return NDR_ERR_SUCCESS
;
8583 _PUBLIC_
void ndr_print_lsa_DeleteObject(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_DeleteObject
*r
)
8585 ndr_print_struct(ndr
, name
, "lsa_DeleteObject");
8587 if (flags
& NDR_SET_VALUES
) {
8588 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8590 if (flags
& NDR_IN
) {
8591 ndr_print_struct(ndr
, "in", "lsa_DeleteObject");
8593 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8595 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8599 if (flags
& NDR_OUT
) {
8600 ndr_print_struct(ndr
, "out", "lsa_DeleteObject");
8602 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
8604 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
8606 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8612 static enum ndr_err_code
ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccountsWithUserRight
*r
)
8614 if (flags
& NDR_IN
) {
8615 if (r
->in
.handle
== NULL
) {
8616 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8618 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8619 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.name
));
8621 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8624 if (flags
& NDR_OUT
) {
8625 if (r
->out
.sids
== NULL
) {
8626 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8628 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8629 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8631 return NDR_ERR_SUCCESS
;
8634 static enum ndr_err_code
ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccountsWithUserRight
*r
)
8637 TALLOC_CTX
*_mem_save_handle_0
;
8638 TALLOC_CTX
*_mem_save_name_0
;
8639 TALLOC_CTX
*_mem_save_sids_0
;
8640 if (flags
& NDR_IN
) {
8641 ZERO_STRUCT(r
->out
);
8643 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8644 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8646 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8647 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8648 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8649 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8650 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
8652 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8657 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8658 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, 0);
8659 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8660 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
8662 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8663 ZERO_STRUCTP(r
->out
.sids
);
8665 if (flags
& NDR_OUT
) {
8666 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8667 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8669 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8670 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
8671 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8672 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
8673 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8675 return NDR_ERR_SUCCESS
;
8678 _PUBLIC_
void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccountsWithUserRight
*r
)
8680 ndr_print_struct(ndr
, name
, "lsa_EnumAccountsWithUserRight");
8682 if (flags
& NDR_SET_VALUES
) {
8683 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8685 if (flags
& NDR_IN
) {
8686 ndr_print_struct(ndr
, "in", "lsa_EnumAccountsWithUserRight");
8688 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8690 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8692 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8695 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8700 if (flags
& NDR_OUT
) {
8701 ndr_print_struct(ndr
, "out", "lsa_EnumAccountsWithUserRight");
8703 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
8705 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
8707 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8713 static enum ndr_err_code
ndr_push_lsa_EnumAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccountRights
*r
)
8715 if (flags
& NDR_IN
) {
8716 if (r
->in
.handle
== NULL
) {
8717 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8719 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8720 if (r
->in
.sid
== NULL
) {
8721 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8723 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8725 if (flags
& NDR_OUT
) {
8726 if (r
->out
.rights
== NULL
) {
8727 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8729 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rights
));
8730 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8732 return NDR_ERR_SUCCESS
;
8735 static enum ndr_err_code
ndr_pull_lsa_EnumAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccountRights
*r
)
8737 TALLOC_CTX
*_mem_save_handle_0
;
8738 TALLOC_CTX
*_mem_save_sid_0
;
8739 TALLOC_CTX
*_mem_save_rights_0
;
8740 if (flags
& NDR_IN
) {
8741 ZERO_STRUCT(r
->out
);
8743 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8744 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8746 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8747 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8748 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8749 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8750 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8751 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8753 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8754 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8755 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8756 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8757 NDR_PULL_ALLOC(ndr
, r
->out
.rights
);
8758 ZERO_STRUCTP(r
->out
.rights
);
8760 if (flags
& NDR_OUT
) {
8761 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8762 NDR_PULL_ALLOC(ndr
, r
->out
.rights
);
8764 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8765 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8766 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rights
));
8767 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8768 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8770 return NDR_ERR_SUCCESS
;
8773 _PUBLIC_
void ndr_print_lsa_EnumAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccountRights
*r
)
8775 ndr_print_struct(ndr
, name
, "lsa_EnumAccountRights");
8777 if (flags
& NDR_SET_VALUES
) {
8778 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8780 if (flags
& NDR_IN
) {
8781 ndr_print_struct(ndr
, "in", "lsa_EnumAccountRights");
8783 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8785 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8787 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8789 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8793 if (flags
& NDR_OUT
) {
8794 ndr_print_struct(ndr
, "out", "lsa_EnumAccountRights");
8796 ndr_print_ptr(ndr
, "rights", r
->out
.rights
);
8798 ndr_print_lsa_RightSet(ndr
, "rights", r
->out
.rights
);
8800 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8806 static enum ndr_err_code
ndr_push_lsa_AddAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_AddAccountRights
*r
)
8808 if (flags
& NDR_IN
) {
8809 if (r
->in
.handle
== NULL
) {
8810 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8812 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8813 if (r
->in
.sid
== NULL
) {
8814 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8816 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8817 if (r
->in
.rights
== NULL
) {
8818 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8820 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8822 if (flags
& NDR_OUT
) {
8823 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8825 return NDR_ERR_SUCCESS
;
8828 static enum ndr_err_code
ndr_pull_lsa_AddAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_AddAccountRights
*r
)
8830 TALLOC_CTX
*_mem_save_handle_0
;
8831 TALLOC_CTX
*_mem_save_sid_0
;
8832 TALLOC_CTX
*_mem_save_rights_0
;
8833 if (flags
& NDR_IN
) {
8834 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8835 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8837 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8838 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8839 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8840 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8841 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8842 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8844 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8845 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8846 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8847 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8848 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8849 NDR_PULL_ALLOC(ndr
, r
->in
.rights
);
8851 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8852 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8853 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8854 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8856 if (flags
& NDR_OUT
) {
8857 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8859 return NDR_ERR_SUCCESS
;
8862 _PUBLIC_
void ndr_print_lsa_AddAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_AddAccountRights
*r
)
8864 ndr_print_struct(ndr
, name
, "lsa_AddAccountRights");
8866 if (flags
& NDR_SET_VALUES
) {
8867 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8869 if (flags
& NDR_IN
) {
8870 ndr_print_struct(ndr
, "in", "lsa_AddAccountRights");
8872 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8874 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8876 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8878 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8880 ndr_print_ptr(ndr
, "rights", r
->in
.rights
);
8882 ndr_print_lsa_RightSet(ndr
, "rights", r
->in
.rights
);
8886 if (flags
& NDR_OUT
) {
8887 ndr_print_struct(ndr
, "out", "lsa_AddAccountRights");
8889 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8895 static enum ndr_err_code
ndr_push_lsa_RemoveAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_RemoveAccountRights
*r
)
8897 if (flags
& NDR_IN
) {
8898 if (r
->in
.handle
== NULL
) {
8899 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8901 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8902 if (r
->in
.sid
== NULL
) {
8903 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8905 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8906 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.remove_all
));
8907 if (r
->in
.rights
== NULL
) {
8908 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8910 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8912 if (flags
& NDR_OUT
) {
8913 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8915 return NDR_ERR_SUCCESS
;
8918 static enum ndr_err_code
ndr_pull_lsa_RemoveAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_RemoveAccountRights
*r
)
8920 TALLOC_CTX
*_mem_save_handle_0
;
8921 TALLOC_CTX
*_mem_save_sid_0
;
8922 TALLOC_CTX
*_mem_save_rights_0
;
8923 if (flags
& NDR_IN
) {
8924 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8925 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8927 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8928 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8929 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8930 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8931 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8932 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8934 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8935 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8936 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8937 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8938 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.remove_all
));
8939 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8940 NDR_PULL_ALLOC(ndr
, r
->in
.rights
);
8942 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8943 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8944 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8945 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8947 if (flags
& NDR_OUT
) {
8948 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8950 return NDR_ERR_SUCCESS
;
8953 _PUBLIC_
void ndr_print_lsa_RemoveAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RemoveAccountRights
*r
)
8955 ndr_print_struct(ndr
, name
, "lsa_RemoveAccountRights");
8957 if (flags
& NDR_SET_VALUES
) {
8958 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8960 if (flags
& NDR_IN
) {
8961 ndr_print_struct(ndr
, "in", "lsa_RemoveAccountRights");
8963 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8965 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8967 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8969 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8971 ndr_print_uint8(ndr
, "remove_all", r
->in
.remove_all
);
8972 ndr_print_ptr(ndr
, "rights", r
->in
.rights
);
8974 ndr_print_lsa_RightSet(ndr
, "rights", r
->in
.rights
);
8978 if (flags
& NDR_OUT
) {
8979 ndr_print_struct(ndr
, "out", "lsa_RemoveAccountRights");
8981 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8987 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfoBySid
*r
)
8989 if (flags
& NDR_IN
) {
8990 if (r
->in
.handle
== NULL
) {
8991 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8993 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8994 if (r
->in
.dom_sid
== NULL
) {
8995 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8997 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
8998 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
9000 if (flags
& NDR_OUT
) {
9001 if (r
->out
.info
== NULL
) {
9002 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9004 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9006 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9007 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9009 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9011 return NDR_ERR_SUCCESS
;
9014 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfoBySid
*r
)
9017 TALLOC_CTX
*_mem_save_handle_0
;
9018 TALLOC_CTX
*_mem_save_dom_sid_0
;
9019 TALLOC_CTX
*_mem_save_info_0
;
9020 TALLOC_CTX
*_mem_save_info_1
;
9021 if (flags
& NDR_IN
) {
9022 ZERO_STRUCT(r
->out
);
9024 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9025 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9027 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9028 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9029 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9030 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9031 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9032 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9034 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9035 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9036 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9037 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9038 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9039 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9040 ZERO_STRUCTP(r
->out
.info
);
9042 if (flags
& NDR_OUT
) {
9043 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9044 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9046 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9047 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9048 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9050 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9052 *r
->out
.info
= NULL
;
9055 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9056 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9057 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9058 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9059 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9062 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9064 return NDR_ERR_SUCCESS
;
9067 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfoBySid
*r
)
9069 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfoBySid");
9071 if (flags
& NDR_SET_VALUES
) {
9072 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9074 if (flags
& NDR_IN
) {
9075 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfoBySid");
9077 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9079 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9081 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9083 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9085 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
9088 if (flags
& NDR_OUT
) {
9089 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfoBySid");
9091 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9093 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
9096 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
9097 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
9101 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9107 static enum ndr_err_code
ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push
*ndr
, int flags
, const struct lsa_SetTrustedDomainInfo
*r
)
9109 if (flags
& NDR_IN
) {
9110 if (r
->in
.handle
== NULL
) {
9111 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9113 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9114 if (r
->in
.dom_sid
== NULL
) {
9115 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9117 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9118 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
9119 if (r
->in
.info
== NULL
) {
9120 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9122 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9123 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9125 if (flags
& NDR_OUT
) {
9126 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9128 return NDR_ERR_SUCCESS
;
9131 static enum ndr_err_code
ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull
*ndr
, int flags
, struct lsa_SetTrustedDomainInfo
*r
)
9133 TALLOC_CTX
*_mem_save_handle_0
;
9134 TALLOC_CTX
*_mem_save_dom_sid_0
;
9135 TALLOC_CTX
*_mem_save_info_0
;
9136 if (flags
& NDR_IN
) {
9137 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9138 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9140 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9141 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9142 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9143 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9144 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9145 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9147 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9148 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9149 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9150 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9151 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9152 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9153 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
9155 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9156 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
9157 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9158 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9159 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9161 if (flags
& NDR_OUT
) {
9162 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9164 return NDR_ERR_SUCCESS
;
9167 _PUBLIC_
void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetTrustedDomainInfo
*r
)
9169 ndr_print_struct(ndr
, name
, "lsa_SetTrustedDomainInfo");
9171 if (flags
& NDR_SET_VALUES
) {
9172 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9174 if (flags
& NDR_IN
) {
9175 ndr_print_struct(ndr
, "in", "lsa_SetTrustedDomainInfo");
9177 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9179 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9181 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9183 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9185 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
9186 ndr_print_ptr(ndr
, "info", r
->in
.info
);
9188 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
9189 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
9193 if (flags
& NDR_OUT
) {
9194 ndr_print_struct(ndr
, "out", "lsa_SetTrustedDomainInfo");
9196 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9202 static enum ndr_err_code
ndr_push_lsa_DeleteTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_DeleteTrustedDomain
*r
)
9204 if (flags
& NDR_IN
) {
9205 if (r
->in
.handle
== NULL
) {
9206 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9208 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9209 if (r
->in
.dom_sid
== NULL
) {
9210 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9212 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9214 if (flags
& NDR_OUT
) {
9215 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9217 return NDR_ERR_SUCCESS
;
9220 static enum ndr_err_code
ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_DeleteTrustedDomain
*r
)
9222 TALLOC_CTX
*_mem_save_handle_0
;
9223 TALLOC_CTX
*_mem_save_dom_sid_0
;
9224 if (flags
& NDR_IN
) {
9225 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9226 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9228 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9229 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9230 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9231 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9232 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9233 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9235 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9236 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9237 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9238 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9240 if (flags
& NDR_OUT
) {
9241 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9243 return NDR_ERR_SUCCESS
;
9246 _PUBLIC_
void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_DeleteTrustedDomain
*r
)
9248 ndr_print_struct(ndr
, name
, "lsa_DeleteTrustedDomain");
9250 if (flags
& NDR_SET_VALUES
) {
9251 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9253 if (flags
& NDR_IN
) {
9254 ndr_print_struct(ndr
, "in", "lsa_DeleteTrustedDomain");
9256 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9258 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9260 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9262 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9266 if (flags
& NDR_OUT
) {
9267 ndr_print_struct(ndr
, "out", "lsa_DeleteTrustedDomain");
9269 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9275 static enum ndr_err_code
ndr_push_lsa_StorePrivateData(struct ndr_push
*ndr
, int flags
, const struct lsa_StorePrivateData
*r
)
9277 if (flags
& NDR_IN
) {
9278 if (r
->in
.handle
== NULL
) {
9279 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9281 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9282 if (r
->in
.name
== NULL
) {
9283 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9285 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9286 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.val
));
9288 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.val
));
9291 if (flags
& NDR_OUT
) {
9292 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9294 return NDR_ERR_SUCCESS
;
9297 static enum ndr_err_code
ndr_pull_lsa_StorePrivateData(struct ndr_pull
*ndr
, int flags
, struct lsa_StorePrivateData
*r
)
9300 TALLOC_CTX
*_mem_save_handle_0
;
9301 TALLOC_CTX
*_mem_save_name_0
;
9302 TALLOC_CTX
*_mem_save_val_0
;
9303 if (flags
& NDR_IN
) {
9304 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9305 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9307 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9308 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9309 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9310 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9311 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9312 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
9314 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9315 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
9316 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9317 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9318 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_val
));
9320 NDR_PULL_ALLOC(ndr
, r
->in
.val
);
9325 _mem_save_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9326 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.val
, 0);
9327 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.val
));
9328 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_0
, 0);
9331 if (flags
& NDR_OUT
) {
9332 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9334 return NDR_ERR_SUCCESS
;
9337 _PUBLIC_
void ndr_print_lsa_StorePrivateData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_StorePrivateData
*r
)
9339 ndr_print_struct(ndr
, name
, "lsa_StorePrivateData");
9341 if (flags
& NDR_SET_VALUES
) {
9342 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9344 if (flags
& NDR_IN
) {
9345 ndr_print_struct(ndr
, "in", "lsa_StorePrivateData");
9347 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9349 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9351 ndr_print_ptr(ndr
, "name", r
->in
.name
);
9353 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
9355 ndr_print_ptr(ndr
, "val", r
->in
.val
);
9358 ndr_print_lsa_DATA_BUF(ndr
, "val", r
->in
.val
);
9363 if (flags
& NDR_OUT
) {
9364 ndr_print_struct(ndr
, "out", "lsa_StorePrivateData");
9366 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9372 static enum ndr_err_code
ndr_push_lsa_RetrievePrivateData(struct ndr_push
*ndr
, int flags
, const struct lsa_RetrievePrivateData
*r
)
9374 if (flags
& NDR_IN
) {
9375 if (r
->in
.handle
== NULL
) {
9376 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9378 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9379 if (r
->in
.name
== NULL
) {
9380 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9382 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9383 if (r
->in
.val
== NULL
) {
9384 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9386 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.val
));
9388 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.val
));
9391 if (flags
& NDR_OUT
) {
9392 if (r
->out
.val
== NULL
) {
9393 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9395 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.val
));
9397 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.val
));
9399 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9401 return NDR_ERR_SUCCESS
;
9404 static enum ndr_err_code
ndr_pull_lsa_RetrievePrivateData(struct ndr_pull
*ndr
, int flags
, struct lsa_RetrievePrivateData
*r
)
9407 TALLOC_CTX
*_mem_save_handle_0
;
9408 TALLOC_CTX
*_mem_save_name_0
;
9409 TALLOC_CTX
*_mem_save_val_0
;
9410 TALLOC_CTX
*_mem_save_val_1
;
9411 if (flags
& NDR_IN
) {
9412 ZERO_STRUCT(r
->out
);
9414 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9415 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9417 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9418 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9419 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9420 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9421 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9422 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
9424 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9425 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
9426 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9427 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9428 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9429 NDR_PULL_ALLOC(ndr
, r
->in
.val
);
9431 _mem_save_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9432 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.val
, LIBNDR_FLAG_REF_ALLOC
);
9433 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_val
));
9435 NDR_PULL_ALLOC(ndr
, *r
->in
.val
);
9440 _mem_save_val_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9441 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.val
, 0);
9442 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.val
));
9443 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_1
, 0);
9445 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_0
, LIBNDR_FLAG_REF_ALLOC
);
9446 NDR_PULL_ALLOC(ndr
, r
->out
.val
);
9447 *r
->out
.val
= *r
->in
.val
;
9449 if (flags
& NDR_OUT
) {
9450 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9451 NDR_PULL_ALLOC(ndr
, r
->out
.val
);
9453 _mem_save_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9454 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.val
, LIBNDR_FLAG_REF_ALLOC
);
9455 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_val
));
9457 NDR_PULL_ALLOC(ndr
, *r
->out
.val
);
9462 _mem_save_val_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9463 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.val
, 0);
9464 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.val
));
9465 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_1
, 0);
9467 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_0
, LIBNDR_FLAG_REF_ALLOC
);
9468 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9470 return NDR_ERR_SUCCESS
;
9473 _PUBLIC_
void ndr_print_lsa_RetrievePrivateData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RetrievePrivateData
*r
)
9475 ndr_print_struct(ndr
, name
, "lsa_RetrievePrivateData");
9477 if (flags
& NDR_SET_VALUES
) {
9478 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9480 if (flags
& NDR_IN
) {
9481 ndr_print_struct(ndr
, "in", "lsa_RetrievePrivateData");
9483 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9485 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9487 ndr_print_ptr(ndr
, "name", r
->in
.name
);
9489 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
9491 ndr_print_ptr(ndr
, "val", r
->in
.val
);
9493 ndr_print_ptr(ndr
, "val", *r
->in
.val
);
9496 ndr_print_lsa_DATA_BUF(ndr
, "val", *r
->in
.val
);
9502 if (flags
& NDR_OUT
) {
9503 ndr_print_struct(ndr
, "out", "lsa_RetrievePrivateData");
9505 ndr_print_ptr(ndr
, "val", r
->out
.val
);
9507 ndr_print_ptr(ndr
, "val", *r
->out
.val
);
9510 ndr_print_lsa_DATA_BUF(ndr
, "val", *r
->out
.val
);
9514 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9520 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenPolicy2
*r
)
9522 if (flags
& NDR_IN
) {
9523 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
9524 if (r
->in
.system_name
) {
9525 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9526 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9527 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9528 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
));
9530 if (r
->in
.attr
== NULL
) {
9531 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9533 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
9534 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
9536 if (flags
& NDR_OUT
) {
9537 if (r
->out
.handle
== NULL
) {
9538 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9540 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
9541 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9543 return NDR_ERR_SUCCESS
;
9546 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenPolicy2
*r
)
9548 uint32_t _ptr_system_name
;
9549 TALLOC_CTX
*_mem_save_system_name_0
;
9550 TALLOC_CTX
*_mem_save_attr_0
;
9551 TALLOC_CTX
*_mem_save_handle_0
;
9552 if (flags
& NDR_IN
) {
9553 ZERO_STRUCT(r
->out
);
9555 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
9556 if (_ptr_system_name
) {
9557 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
9559 r
->in
.system_name
= NULL
;
9561 if (r
->in
.system_name
) {
9562 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9563 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
9564 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
9565 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
9566 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
9567 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
));
9569 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
9570 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
));
9571 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
9573 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9574 NDR_PULL_ALLOC(ndr
, r
->in
.attr
);
9576 _mem_save_attr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9577 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.attr
, LIBNDR_FLAG_REF_ALLOC
);
9578 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
9579 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attr_0
, LIBNDR_FLAG_REF_ALLOC
);
9580 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
9581 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
9582 ZERO_STRUCTP(r
->out
.handle
);
9584 if (flags
& NDR_OUT
) {
9585 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9586 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
9588 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9589 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9590 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
9591 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9592 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9594 return NDR_ERR_SUCCESS
;
9597 _PUBLIC_
void ndr_print_lsa_OpenPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenPolicy2
*r
)
9599 ndr_print_struct(ndr
, name
, "lsa_OpenPolicy2");
9601 if (flags
& NDR_SET_VALUES
) {
9602 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9604 if (flags
& NDR_IN
) {
9605 ndr_print_struct(ndr
, "in", "lsa_OpenPolicy2");
9607 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
9609 if (r
->in
.system_name
) {
9610 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
9613 ndr_print_ptr(ndr
, "attr", r
->in
.attr
);
9615 ndr_print_lsa_ObjectAttribute(ndr
, "attr", r
->in
.attr
);
9617 ndr_print_lsa_PolicyAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
9620 if (flags
& NDR_OUT
) {
9621 ndr_print_struct(ndr
, "out", "lsa_OpenPolicy2");
9623 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
9625 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
9627 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9633 static enum ndr_err_code
ndr_push_lsa_GetUserName(struct ndr_push
*ndr
, int flags
, const struct lsa_GetUserName
*r
)
9635 if (flags
& NDR_IN
) {
9636 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
9637 if (r
->in
.system_name
) {
9638 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9639 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9640 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9641 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
));
9643 if (r
->in
.account_name
== NULL
) {
9644 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9646 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.account_name
));
9647 if (*r
->in
.account_name
) {
9648 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.account_name
));
9650 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.authority_name
));
9651 if (r
->in
.authority_name
) {
9652 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.authority_name
));
9653 if (*r
->in
.authority_name
) {
9654 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.authority_name
));
9658 if (flags
& NDR_OUT
) {
9659 if (r
->out
.account_name
== NULL
) {
9660 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9662 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.account_name
));
9663 if (*r
->out
.account_name
) {
9664 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.account_name
));
9666 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.authority_name
));
9667 if (r
->out
.authority_name
) {
9668 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.authority_name
));
9669 if (*r
->out
.authority_name
) {
9670 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.authority_name
));
9673 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9675 return NDR_ERR_SUCCESS
;
9678 static enum ndr_err_code
ndr_pull_lsa_GetUserName(struct ndr_pull
*ndr
, int flags
, struct lsa_GetUserName
*r
)
9680 uint32_t _ptr_system_name
;
9681 uint32_t _ptr_account_name
;
9682 uint32_t _ptr_authority_name
;
9683 TALLOC_CTX
*_mem_save_system_name_0
;
9684 TALLOC_CTX
*_mem_save_account_name_0
;
9685 TALLOC_CTX
*_mem_save_account_name_1
;
9686 TALLOC_CTX
*_mem_save_authority_name_0
;
9687 TALLOC_CTX
*_mem_save_authority_name_1
;
9688 if (flags
& NDR_IN
) {
9689 ZERO_STRUCT(r
->out
);
9691 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
9692 if (_ptr_system_name
) {
9693 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
9695 r
->in
.system_name
= NULL
;
9697 if (r
->in
.system_name
) {
9698 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9699 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
9700 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
9701 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
9702 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
9703 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
));
9705 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
9706 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
));
9707 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
9709 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9710 NDR_PULL_ALLOC(ndr
, r
->in
.account_name
);
9712 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9713 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
9714 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
9715 if (_ptr_account_name
) {
9716 NDR_PULL_ALLOC(ndr
, *r
->in
.account_name
);
9718 *r
->in
.account_name
= NULL
;
9720 if (*r
->in
.account_name
) {
9721 _mem_save_account_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9722 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.account_name
, 0);
9723 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.account_name
));
9724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_1
, 0);
9726 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9727 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9728 if (_ptr_authority_name
) {
9729 NDR_PULL_ALLOC(ndr
, r
->in
.authority_name
);
9731 r
->in
.authority_name
= NULL
;
9733 if (r
->in
.authority_name
) {
9734 _mem_save_authority_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9735 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.authority_name
, 0);
9736 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9737 if (_ptr_authority_name
) {
9738 NDR_PULL_ALLOC(ndr
, *r
->in
.authority_name
);
9740 *r
->in
.authority_name
= NULL
;
9742 if (*r
->in
.authority_name
) {
9743 _mem_save_authority_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9744 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.authority_name
, 0);
9745 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.authority_name
));
9746 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_1
, 0);
9748 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_0
, 0);
9750 NDR_PULL_ALLOC(ndr
, r
->out
.account_name
);
9751 *r
->out
.account_name
= *r
->in
.account_name
;
9753 if (flags
& NDR_OUT
) {
9754 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9755 NDR_PULL_ALLOC(ndr
, r
->out
.account_name
);
9757 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9758 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
9759 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
9760 if (_ptr_account_name
) {
9761 NDR_PULL_ALLOC(ndr
, *r
->out
.account_name
);
9763 *r
->out
.account_name
= NULL
;
9765 if (*r
->out
.account_name
) {
9766 _mem_save_account_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9767 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.account_name
, 0);
9768 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.account_name
));
9769 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_1
, 0);
9771 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9772 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9773 if (_ptr_authority_name
) {
9774 NDR_PULL_ALLOC(ndr
, r
->out
.authority_name
);
9776 r
->out
.authority_name
= NULL
;
9778 if (r
->out
.authority_name
) {
9779 _mem_save_authority_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9780 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.authority_name
, 0);
9781 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9782 if (_ptr_authority_name
) {
9783 NDR_PULL_ALLOC(ndr
, *r
->out
.authority_name
);
9785 *r
->out
.authority_name
= NULL
;
9787 if (*r
->out
.authority_name
) {
9788 _mem_save_authority_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9789 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.authority_name
, 0);
9790 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.authority_name
));
9791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_1
, 0);
9793 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_0
, 0);
9795 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9797 return NDR_ERR_SUCCESS
;
9800 _PUBLIC_
void ndr_print_lsa_GetUserName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetUserName
*r
)
9802 ndr_print_struct(ndr
, name
, "lsa_GetUserName");
9804 if (flags
& NDR_SET_VALUES
) {
9805 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9807 if (flags
& NDR_IN
) {
9808 ndr_print_struct(ndr
, "in", "lsa_GetUserName");
9810 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
9812 if (r
->in
.system_name
) {
9813 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
9816 ndr_print_ptr(ndr
, "account_name", r
->in
.account_name
);
9818 ndr_print_ptr(ndr
, "account_name", *r
->in
.account_name
);
9820 if (*r
->in
.account_name
) {
9821 ndr_print_lsa_String(ndr
, "account_name", *r
->in
.account_name
);
9825 ndr_print_ptr(ndr
, "authority_name", r
->in
.authority_name
);
9827 if (r
->in
.authority_name
) {
9828 ndr_print_ptr(ndr
, "authority_name", *r
->in
.authority_name
);
9830 if (*r
->in
.authority_name
) {
9831 ndr_print_lsa_String(ndr
, "authority_name", *r
->in
.authority_name
);
9838 if (flags
& NDR_OUT
) {
9839 ndr_print_struct(ndr
, "out", "lsa_GetUserName");
9841 ndr_print_ptr(ndr
, "account_name", r
->out
.account_name
);
9843 ndr_print_ptr(ndr
, "account_name", *r
->out
.account_name
);
9845 if (*r
->out
.account_name
) {
9846 ndr_print_lsa_String(ndr
, "account_name", *r
->out
.account_name
);
9850 ndr_print_ptr(ndr
, "authority_name", r
->out
.authority_name
);
9852 if (r
->out
.authority_name
) {
9853 ndr_print_ptr(ndr
, "authority_name", *r
->out
.authority_name
);
9855 if (*r
->out
.authority_name
) {
9856 ndr_print_lsa_String(ndr
, "authority_name", *r
->out
.authority_name
);
9861 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9867 static enum ndr_err_code
ndr_push_lsa_QueryInfoPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryInfoPolicy2
*r
)
9869 if (flags
& NDR_IN
) {
9870 if (r
->in
.handle
== NULL
) {
9871 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9873 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9874 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
9876 if (flags
& NDR_OUT
) {
9877 if (r
->out
.info
== NULL
) {
9878 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9880 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9882 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9883 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9885 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9887 return NDR_ERR_SUCCESS
;
9890 static enum ndr_err_code
ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryInfoPolicy2
*r
)
9893 TALLOC_CTX
*_mem_save_handle_0
;
9894 TALLOC_CTX
*_mem_save_info_0
;
9895 TALLOC_CTX
*_mem_save_info_1
;
9896 if (flags
& NDR_IN
) {
9897 ZERO_STRUCT(r
->out
);
9899 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9900 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9902 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9903 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9904 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9905 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9906 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
9907 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9908 ZERO_STRUCTP(r
->out
.info
);
9910 if (flags
& NDR_OUT
) {
9911 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9912 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9914 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9915 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9916 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9918 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9920 *r
->out
.info
= NULL
;
9923 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9924 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9925 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9926 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9927 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9929 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9930 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9932 return NDR_ERR_SUCCESS
;
9935 _PUBLIC_
void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryInfoPolicy2
*r
)
9937 ndr_print_struct(ndr
, name
, "lsa_QueryInfoPolicy2");
9939 if (flags
& NDR_SET_VALUES
) {
9940 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9942 if (flags
& NDR_IN
) {
9943 ndr_print_struct(ndr
, "in", "lsa_QueryInfoPolicy2");
9945 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9947 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9949 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
9952 if (flags
& NDR_OUT
) {
9953 ndr_print_struct(ndr
, "out", "lsa_QueryInfoPolicy2");
9955 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9957 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
9960 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
9961 ndr_print_lsa_PolicyInformation(ndr
, "info", *r
->out
.info
);
9965 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9971 static enum ndr_err_code
ndr_push_lsa_SetInfoPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInfoPolicy2
*r
)
9973 if (flags
& NDR_IN
) {
9974 if (r
->in
.handle
== NULL
) {
9975 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9977 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9978 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
9979 if (r
->in
.info
== NULL
) {
9980 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9982 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9983 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9985 if (flags
& NDR_OUT
) {
9986 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9988 return NDR_ERR_SUCCESS
;
9991 static enum ndr_err_code
ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInfoPolicy2
*r
)
9993 TALLOC_CTX
*_mem_save_handle_0
;
9994 TALLOC_CTX
*_mem_save_info_0
;
9995 if (flags
& NDR_IN
) {
9996 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9997 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9999 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10000 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10001 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10002 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10003 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
10004 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10005 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10007 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10008 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
10009 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10010 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10011 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10013 if (flags
& NDR_OUT
) {
10014 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10016 return NDR_ERR_SUCCESS
;
10019 _PUBLIC_
void ndr_print_lsa_SetInfoPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInfoPolicy2
*r
)
10021 ndr_print_struct(ndr
, name
, "lsa_SetInfoPolicy2");
10023 if (flags
& NDR_SET_VALUES
) {
10024 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10026 if (flags
& NDR_IN
) {
10027 ndr_print_struct(ndr
, "in", "lsa_SetInfoPolicy2");
10029 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10031 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10033 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
10034 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10036 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
10037 ndr_print_lsa_PolicyInformation(ndr
, "info", r
->in
.info
);
10041 if (flags
& NDR_OUT
) {
10042 ndr_print_struct(ndr
, "out", "lsa_SetInfoPolicy2");
10044 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10050 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfoByName
*r
)
10052 if (flags
& NDR_IN
) {
10053 if (r
->in
.handle
== NULL
) {
10054 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10056 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10057 if (r
->in
.trusted_domain
== NULL
) {
10058 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10060 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain
));
10061 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
10063 if (flags
& NDR_OUT
) {
10064 if (r
->out
.info
== NULL
) {
10065 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10067 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
10068 if (*r
->out
.info
) {
10069 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10070 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10072 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10074 return NDR_ERR_SUCCESS
;
10077 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfoByName
*r
)
10079 uint32_t _ptr_info
;
10080 TALLOC_CTX
*_mem_save_handle_0
;
10081 TALLOC_CTX
*_mem_save_trusted_domain_0
;
10082 TALLOC_CTX
*_mem_save_info_0
;
10083 TALLOC_CTX
*_mem_save_info_1
;
10084 if (flags
& NDR_IN
) {
10085 ZERO_STRUCT(r
->out
);
10087 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10088 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10090 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10091 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10092 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10093 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10094 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10095 NDR_PULL_ALLOC(ndr
, r
->in
.trusted_domain
);
10097 _mem_save_trusted_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10098 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trusted_domain
, LIBNDR_FLAG_REF_ALLOC
);
10099 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain
));
10100 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_0
, LIBNDR_FLAG_REF_ALLOC
);
10101 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
10102 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10103 ZERO_STRUCTP(r
->out
.info
);
10105 if (flags
& NDR_OUT
) {
10106 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10107 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10109 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10110 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10111 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10113 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10115 *r
->out
.info
= NULL
;
10117 if (*r
->out
.info
) {
10118 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10119 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10120 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10121 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10122 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10124 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10125 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10127 return NDR_ERR_SUCCESS
;
10130 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfoByName
*r
)
10132 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfoByName");
10134 if (flags
& NDR_SET_VALUES
) {
10135 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10137 if (flags
& NDR_IN
) {
10138 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfoByName");
10140 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10142 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10144 ndr_print_ptr(ndr
, "trusted_domain", r
->in
.trusted_domain
);
10146 ndr_print_lsa_String(ndr
, "trusted_domain", r
->in
.trusted_domain
);
10148 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
10151 if (flags
& NDR_OUT
) {
10152 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfoByName");
10154 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10156 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10158 if (*r
->out
.info
) {
10159 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10160 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
10164 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10170 static enum ndr_err_code
ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push
*ndr
, int flags
, const struct lsa_SetTrustedDomainInfoByName
*r
)
10172 if (flags
& NDR_IN
) {
10173 if (r
->in
.handle
== NULL
) {
10174 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10176 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10177 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.trusted_domain
));
10178 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
10179 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
10181 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10182 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10185 if (flags
& NDR_OUT
) {
10186 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10188 return NDR_ERR_SUCCESS
;
10191 static enum ndr_err_code
ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull
*ndr
, int flags
, struct lsa_SetTrustedDomainInfoByName
*r
)
10193 uint32_t _ptr_info
;
10194 TALLOC_CTX
*_mem_save_handle_0
;
10195 TALLOC_CTX
*_mem_save_info_0
;
10196 if (flags
& NDR_IN
) {
10197 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10198 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10200 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10201 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10202 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10203 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10204 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.trusted_domain
));
10205 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
10206 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10208 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10213 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10214 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
10215 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10216 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10217 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
10220 if (flags
& NDR_OUT
) {
10221 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10223 return NDR_ERR_SUCCESS
;
10226 _PUBLIC_
void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetTrustedDomainInfoByName
*r
)
10228 ndr_print_struct(ndr
, name
, "lsa_SetTrustedDomainInfoByName");
10230 if (flags
& NDR_SET_VALUES
) {
10231 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10233 if (flags
& NDR_IN
) {
10234 ndr_print_struct(ndr
, "in", "lsa_SetTrustedDomainInfoByName");
10236 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10238 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10240 ndr_print_lsa_String(ndr
, "trusted_domain", &r
->in
.trusted_domain
);
10241 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
10242 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10245 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
10246 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
10251 if (flags
& NDR_OUT
) {
10252 ndr_print_struct(ndr
, "out", "lsa_SetTrustedDomainInfoByName");
10254 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10260 static enum ndr_err_code
ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumTrustedDomainsEx
*r
)
10262 if (flags
& NDR_IN
) {
10263 if (r
->in
.handle
== NULL
) {
10264 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10266 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10267 if (r
->in
.resume_handle
== NULL
) {
10268 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10270 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
10271 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
10273 if (flags
& NDR_OUT
) {
10274 if (r
->out
.resume_handle
== NULL
) {
10275 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10277 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
10278 if (r
->out
.domains
== NULL
) {
10279 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10281 NDR_CHECK(ndr_push_lsa_DomainListEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
10282 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10284 return NDR_ERR_SUCCESS
;
10287 static enum ndr_err_code
ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumTrustedDomainsEx
*r
)
10289 TALLOC_CTX
*_mem_save_handle_0
;
10290 TALLOC_CTX
*_mem_save_resume_handle_0
;
10291 TALLOC_CTX
*_mem_save_domains_0
;
10292 if (flags
& NDR_IN
) {
10293 ZERO_STRUCT(r
->out
);
10295 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10296 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10298 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10299 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10300 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10301 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10302 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10303 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
10305 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10306 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
10307 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
10308 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10309 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
10310 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
10311 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
10312 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10313 ZERO_STRUCTP(r
->out
.domains
);
10315 if (flags
& NDR_OUT
) {
10316 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10317 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
10319 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10320 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
10321 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
10322 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10323 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10324 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10326 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10327 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
10328 NDR_CHECK(ndr_pull_lsa_DomainListEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
10329 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
10330 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10332 return NDR_ERR_SUCCESS
;
10335 _PUBLIC_
void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumTrustedDomainsEx
*r
)
10337 ndr_print_struct(ndr
, name
, "lsa_EnumTrustedDomainsEx");
10339 if (flags
& NDR_SET_VALUES
) {
10340 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10342 if (flags
& NDR_IN
) {
10343 ndr_print_struct(ndr
, "in", "lsa_EnumTrustedDomainsEx");
10345 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10347 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10349 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
10351 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
10353 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
10356 if (flags
& NDR_OUT
) {
10357 ndr_print_struct(ndr
, "out", "lsa_EnumTrustedDomainsEx");
10359 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
10361 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
10363 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
10365 ndr_print_lsa_DomainListEx(ndr
, "domains", r
->out
.domains
);
10367 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10373 static enum ndr_err_code
ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomainEx
*r
)
10375 if (flags
& NDR_IN
) {
10376 if (r
->in
.policy_handle
== NULL
) {
10377 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10379 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
10380 if (r
->in
.info
== NULL
) {
10381 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10383 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10384 if (r
->in
.auth_info
== NULL
) {
10385 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10387 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
10388 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10390 if (flags
& NDR_OUT
) {
10391 if (r
->out
.trustdom_handle
== NULL
) {
10392 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10394 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10395 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10397 return NDR_ERR_SUCCESS
;
10400 static enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomainEx
*r
)
10402 TALLOC_CTX
*_mem_save_policy_handle_0
;
10403 TALLOC_CTX
*_mem_save_info_0
;
10404 TALLOC_CTX
*_mem_save_auth_info_0
;
10405 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
10406 if (flags
& NDR_IN
) {
10407 ZERO_STRUCT(r
->out
);
10409 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10410 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
10412 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10413 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
10414 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
10415 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10416 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10417 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10419 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10420 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
10421 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10422 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10423 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10424 NDR_PULL_ALLOC(ndr
, r
->in
.auth_info
);
10426 _mem_save_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10427 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.auth_info
, LIBNDR_FLAG_REF_ALLOC
);
10428 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
10429 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_auth_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10430 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10431 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10432 ZERO_STRUCTP(r
->out
.trustdom_handle
);
10434 if (flags
& NDR_OUT
) {
10435 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10436 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10438 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10439 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
10440 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10441 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10442 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10444 return NDR_ERR_SUCCESS
;
10447 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomainEx
*r
)
10449 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomainEx");
10451 if (flags
& NDR_SET_VALUES
) {
10452 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10454 if (flags
& NDR_IN
) {
10455 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomainEx");
10457 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
10459 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
10461 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10463 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info", r
->in
.info
);
10465 ndr_print_ptr(ndr
, "auth_info", r
->in
.auth_info
);
10467 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", r
->in
.auth_info
);
10469 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
10472 if (flags
& NDR_OUT
) {
10473 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomainEx");
10475 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10477 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10479 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10485 static enum ndr_err_code
ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push
*ndr
, int flags
, const struct lsa_CloseTrustedDomainEx
*r
)
10487 if (flags
& NDR_IN
) {
10488 if (r
->in
.handle
== NULL
) {
10489 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10491 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10493 if (flags
& NDR_OUT
) {
10494 if (r
->out
.handle
== NULL
) {
10495 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10497 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
10498 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10500 return NDR_ERR_SUCCESS
;
10503 static enum ndr_err_code
ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull
*ndr
, int flags
, struct lsa_CloseTrustedDomainEx
*r
)
10505 TALLOC_CTX
*_mem_save_handle_0
;
10506 if (flags
& NDR_IN
) {
10507 ZERO_STRUCT(r
->out
);
10509 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10510 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10512 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10513 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10514 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10515 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10516 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
10517 *r
->out
.handle
= *r
->in
.handle
;
10519 if (flags
& NDR_OUT
) {
10520 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10521 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
10523 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10524 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10525 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
10526 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10527 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10529 return NDR_ERR_SUCCESS
;
10532 _PUBLIC_
void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CloseTrustedDomainEx
*r
)
10534 ndr_print_struct(ndr
, name
, "lsa_CloseTrustedDomainEx");
10536 if (flags
& NDR_SET_VALUES
) {
10537 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10539 if (flags
& NDR_IN
) {
10540 ndr_print_struct(ndr
, "in", "lsa_CloseTrustedDomainEx");
10542 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10544 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10548 if (flags
& NDR_OUT
) {
10549 ndr_print_struct(ndr
, "out", "lsa_CloseTrustedDomainEx");
10551 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
10553 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
10555 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10561 static enum ndr_err_code
ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryDomainInformationPolicy
*r
)
10563 if (flags
& NDR_IN
) {
10564 if (r
->in
.handle
== NULL
) {
10565 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10567 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10568 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10570 if (flags
& NDR_OUT
) {
10571 if (r
->out
.info
== NULL
) {
10572 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10574 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
10575 if (*r
->out
.info
) {
10576 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10577 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10579 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10581 return NDR_ERR_SUCCESS
;
10584 static enum ndr_err_code
ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryDomainInformationPolicy
*r
)
10586 uint32_t _ptr_info
;
10587 TALLOC_CTX
*_mem_save_handle_0
;
10588 TALLOC_CTX
*_mem_save_info_0
;
10589 TALLOC_CTX
*_mem_save_info_1
;
10590 if (flags
& NDR_IN
) {
10591 ZERO_STRUCT(r
->out
);
10593 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10594 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10596 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10597 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10598 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10599 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10600 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10601 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10602 ZERO_STRUCTP(r
->out
.info
);
10604 if (flags
& NDR_OUT
) {
10605 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10606 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10608 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10609 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10610 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10612 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10614 *r
->out
.info
= NULL
;
10616 if (*r
->out
.info
) {
10617 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10618 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10619 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10620 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10621 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10623 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10624 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10626 return NDR_ERR_SUCCESS
;
10629 _PUBLIC_
void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryDomainInformationPolicy
*r
)
10631 ndr_print_struct(ndr
, name
, "lsa_QueryDomainInformationPolicy");
10633 if (flags
& NDR_SET_VALUES
) {
10634 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10636 if (flags
& NDR_IN
) {
10637 ndr_print_struct(ndr
, "in", "lsa_QueryDomainInformationPolicy");
10639 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10641 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10643 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10646 if (flags
& NDR_OUT
) {
10647 ndr_print_struct(ndr
, "out", "lsa_QueryDomainInformationPolicy");
10649 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10651 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10653 if (*r
->out
.info
) {
10654 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10655 ndr_print_lsa_DomainInformationPolicy(ndr
, "info", *r
->out
.info
);
10659 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10665 static enum ndr_err_code
ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_SetDomainInformationPolicy
*r
)
10667 if (flags
& NDR_IN
) {
10668 if (r
->in
.handle
== NULL
) {
10669 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10671 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10672 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10673 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
10675 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10676 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10679 if (flags
& NDR_OUT
) {
10680 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10682 return NDR_ERR_SUCCESS
;
10685 static enum ndr_err_code
ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_SetDomainInformationPolicy
*r
)
10687 uint32_t _ptr_info
;
10688 TALLOC_CTX
*_mem_save_handle_0
;
10689 TALLOC_CTX
*_mem_save_info_0
;
10690 if (flags
& NDR_IN
) {
10691 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10692 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10694 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10695 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10696 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10697 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10698 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10699 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10701 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10706 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10707 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
10708 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10709 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10710 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
10713 if (flags
& NDR_OUT
) {
10714 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10716 return NDR_ERR_SUCCESS
;
10719 _PUBLIC_
void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetDomainInformationPolicy
*r
)
10721 ndr_print_struct(ndr
, name
, "lsa_SetDomainInformationPolicy");
10723 if (flags
& NDR_SET_VALUES
) {
10724 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10726 if (flags
& NDR_IN
) {
10727 ndr_print_struct(ndr
, "in", "lsa_SetDomainInformationPolicy");
10729 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10731 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10733 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10734 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10737 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
10738 ndr_print_lsa_DomainInformationPolicy(ndr
, "info", r
->in
.info
);
10743 if (flags
& NDR_OUT
) {
10744 ndr_print_struct(ndr
, "out", "lsa_SetDomainInformationPolicy");
10746 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10752 static enum ndr_err_code
ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenTrustedDomainByName
*r
)
10754 if (flags
& NDR_IN
) {
10755 if (r
->in
.handle
== NULL
) {
10756 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10758 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10759 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
10760 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10762 if (flags
& NDR_OUT
) {
10763 if (r
->out
.trustdom_handle
== NULL
) {
10764 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10766 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10767 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10769 return NDR_ERR_SUCCESS
;
10772 static enum ndr_err_code
ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenTrustedDomainByName
*r
)
10774 TALLOC_CTX
*_mem_save_handle_0
;
10775 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
10776 if (flags
& NDR_IN
) {
10777 ZERO_STRUCT(r
->out
);
10779 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10780 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10782 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10783 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10784 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10785 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10786 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
10787 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10788 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10789 ZERO_STRUCTP(r
->out
.trustdom_handle
);
10791 if (flags
& NDR_OUT
) {
10792 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10793 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10795 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10796 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
10797 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10798 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10799 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10801 return NDR_ERR_SUCCESS
;
10804 _PUBLIC_
void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenTrustedDomainByName
*r
)
10806 ndr_print_struct(ndr
, name
, "lsa_OpenTrustedDomainByName");
10808 if (flags
& NDR_SET_VALUES
) {
10809 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10811 if (flags
& NDR_IN
) {
10812 ndr_print_struct(ndr
, "in", "lsa_OpenTrustedDomainByName");
10814 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10816 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10818 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
10819 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
10822 if (flags
& NDR_OUT
) {
10823 ndr_print_struct(ndr
, "out", "lsa_OpenTrustedDomainByName");
10825 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10827 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10829 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10835 static enum ndr_err_code
ndr_push_lsa_TestCall(struct ndr_push
*ndr
, int flags
, const struct lsa_TestCall
*r
)
10837 if (flags
& NDR_IN
) {
10839 if (flags
& NDR_OUT
) {
10840 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10842 return NDR_ERR_SUCCESS
;
10845 static enum ndr_err_code
ndr_pull_lsa_TestCall(struct ndr_pull
*ndr
, int flags
, struct lsa_TestCall
*r
)
10847 if (flags
& NDR_IN
) {
10849 if (flags
& NDR_OUT
) {
10850 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10852 return NDR_ERR_SUCCESS
;
10855 _PUBLIC_
void ndr_print_lsa_TestCall(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_TestCall
*r
)
10857 ndr_print_struct(ndr
, name
, "lsa_TestCall");
10859 if (flags
& NDR_SET_VALUES
) {
10860 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10862 if (flags
& NDR_IN
) {
10863 ndr_print_struct(ndr
, "in", "lsa_TestCall");
10867 if (flags
& NDR_OUT
) {
10868 ndr_print_struct(ndr
, "out", "lsa_TestCall");
10870 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10876 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids2(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids2
*r
)
10878 if (flags
& NDR_IN
) {
10879 if (r
->in
.handle
== NULL
) {
10880 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10882 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10883 if (r
->in
.sids
== NULL
) {
10884 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10886 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10887 if (r
->in
.names
== NULL
) {
10888 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10890 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
10891 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
10892 if (r
->in
.count
== NULL
) {
10893 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10895 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
10896 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
10897 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
10899 if (flags
& NDR_OUT
) {
10900 if (r
->out
.domains
== NULL
) {
10901 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10903 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
10904 if (*r
->out
.domains
) {
10905 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
10907 if (r
->out
.names
== NULL
) {
10908 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10910 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
10911 if (r
->out
.count
== NULL
) {
10912 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10914 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
10915 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10917 return NDR_ERR_SUCCESS
;
10920 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids2(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids2
*r
)
10922 uint32_t _ptr_domains
;
10923 TALLOC_CTX
*_mem_save_handle_0
;
10924 TALLOC_CTX
*_mem_save_sids_0
;
10925 TALLOC_CTX
*_mem_save_domains_0
;
10926 TALLOC_CTX
*_mem_save_domains_1
;
10927 TALLOC_CTX
*_mem_save_names_0
;
10928 TALLOC_CTX
*_mem_save_count_0
;
10929 if (flags
& NDR_IN
) {
10930 ZERO_STRUCT(r
->out
);
10932 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10933 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10935 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10936 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10937 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10938 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10939 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10940 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
10942 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10943 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
10944 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10945 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
10946 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10947 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
10949 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10950 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
10951 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
10952 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
10953 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
10954 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10955 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
10957 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10958 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
10959 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
10960 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
10961 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
10962 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
10963 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10964 ZERO_STRUCTP(r
->out
.domains
);
10965 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
10966 *r
->out
.names
= *r
->in
.names
;
10967 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
10968 *r
->out
.count
= *r
->in
.count
;
10970 if (flags
& NDR_OUT
) {
10971 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10972 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10974 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10975 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
10976 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
10977 if (_ptr_domains
) {
10978 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
10980 *r
->out
.domains
= NULL
;
10982 if (*r
->out
.domains
) {
10983 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10984 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
10985 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
10986 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
10988 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
10989 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10990 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
10992 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10993 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
10994 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
10995 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
10996 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10997 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
10999 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11000 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
11001 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
11002 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11003 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11005 return NDR_ERR_SUCCESS
;
11008 _PUBLIC_
void ndr_print_lsa_LookupSids2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids2
*r
)
11010 ndr_print_struct(ndr
, name
, "lsa_LookupSids2");
11012 if (flags
& NDR_SET_VALUES
) {
11013 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11015 if (flags
& NDR_IN
) {
11016 ndr_print_struct(ndr
, "in", "lsa_LookupSids2");
11018 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
11020 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
11022 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
11024 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
11026 ndr_print_ptr(ndr
, "names", r
->in
.names
);
11028 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->in
.names
);
11030 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
11031 ndr_print_ptr(ndr
, "count", r
->in
.count
);
11033 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
11035 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
11036 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
11039 if (flags
& NDR_OUT
) {
11040 ndr_print_struct(ndr
, "out", "lsa_LookupSids2");
11042 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
11044 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
11046 if (*r
->out
.domains
) {
11047 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
11051 ndr_print_ptr(ndr
, "names", r
->out
.names
);
11053 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->out
.names
);
11055 ndr_print_ptr(ndr
, "count", r
->out
.count
);
11057 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
11059 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11065 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames2(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames2
*r
)
11067 uint32_t cntr_names_0
;
11068 if (flags
& NDR_IN
) {
11069 if (r
->in
.handle
== NULL
) {
11070 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11072 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11073 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11074 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11075 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11076 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11078 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11079 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11081 if (r
->in
.sids
== NULL
) {
11082 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11084 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11085 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
11086 if (r
->in
.count
== NULL
) {
11087 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11089 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
11090 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
11091 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
11093 if (flags
& NDR_OUT
) {
11094 if (r
->out
.domains
== NULL
) {
11095 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11097 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
11098 if (*r
->out
.domains
) {
11099 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11101 if (r
->out
.sids
== NULL
) {
11102 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11104 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11105 if (r
->out
.count
== NULL
) {
11106 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11108 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
11109 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11111 return NDR_ERR_SUCCESS
;
11114 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames2(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames2
*r
)
11116 uint32_t cntr_names_0
;
11117 uint32_t _ptr_domains
;
11118 TALLOC_CTX
*_mem_save_handle_0
;
11119 TALLOC_CTX
*_mem_save_names_0
;
11120 TALLOC_CTX
*_mem_save_domains_0
;
11121 TALLOC_CTX
*_mem_save_domains_1
;
11122 TALLOC_CTX
*_mem_save_sids_0
;
11123 TALLOC_CTX
*_mem_save_count_0
;
11124 if (flags
& NDR_IN
) {
11125 ZERO_STRUCT(r
->out
);
11127 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11128 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
11130 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11131 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
11132 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11133 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11134 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
11135 if (r
->in
.num_names
> 1000) {
11136 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11138 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
11139 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
11140 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11141 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
11142 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11143 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11145 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11146 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11148 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
11149 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11150 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
11152 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11153 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11154 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11155 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11156 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11157 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11158 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
11160 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11161 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
11162 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
11163 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11164 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
11165 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
11166 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11167 ZERO_STRUCTP(r
->out
.domains
);
11168 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11169 *r
->out
.sids
= *r
->in
.sids
;
11170 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11171 *r
->out
.count
= *r
->in
.count
;
11173 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
11176 if (flags
& NDR_OUT
) {
11177 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11178 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11180 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11181 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
11182 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
11183 if (_ptr_domains
) {
11184 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
11186 *r
->out
.domains
= NULL
;
11188 if (*r
->out
.domains
) {
11189 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11190 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
11191 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11192 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
11194 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
11195 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11196 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11198 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11199 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11200 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11201 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11202 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11203 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11205 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11206 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
11207 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
11208 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11209 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11211 return NDR_ERR_SUCCESS
;
11214 _PUBLIC_
void ndr_print_lsa_LookupNames2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames2
*r
)
11216 uint32_t cntr_names_0
;
11217 ndr_print_struct(ndr
, name
, "lsa_LookupNames2");
11219 if (flags
& NDR_SET_VALUES
) {
11220 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11222 if (flags
& NDR_IN
) {
11223 ndr_print_struct(ndr
, "in", "lsa_LookupNames2");
11225 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
11227 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
11229 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
11230 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
11232 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
11234 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
11235 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
11240 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
11242 ndr_print_lsa_TransSidArray2(ndr
, "sids", r
->in
.sids
);
11244 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
11245 ndr_print_ptr(ndr
, "count", r
->in
.count
);
11247 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
11249 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
11250 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
11253 if (flags
& NDR_OUT
) {
11254 ndr_print_struct(ndr
, "out", "lsa_LookupNames2");
11256 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
11258 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
11260 if (*r
->out
.domains
) {
11261 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
11265 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
11267 ndr_print_lsa_TransSidArray2(ndr
, "sids", r
->out
.sids
);
11269 ndr_print_ptr(ndr
, "count", r
->out
.count
);
11271 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
11273 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11279 static enum ndr_err_code
ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomainEx2
*r
)
11281 if (flags
& NDR_IN
) {
11282 if (r
->in
.policy_handle
== NULL
) {
11283 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11285 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
11286 if (r
->in
.info
== NULL
) {
11287 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11289 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11290 if (r
->in
.auth_info
== NULL
) {
11291 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11293 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
11294 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11296 if (flags
& NDR_OUT
) {
11297 if (r
->out
.trustdom_handle
== NULL
) {
11298 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11300 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
11301 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11303 return NDR_ERR_SUCCESS
;
11306 static enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomainEx2
*r
)
11308 TALLOC_CTX
*_mem_save_policy_handle_0
;
11309 TALLOC_CTX
*_mem_save_info_0
;
11310 TALLOC_CTX
*_mem_save_auth_info_0
;
11311 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
11312 if (flags
& NDR_IN
) {
11313 ZERO_STRUCT(r
->out
);
11315 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11316 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
11318 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11319 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
11320 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
11321 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11322 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11323 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
11325 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11326 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
11327 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11328 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11329 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11330 NDR_PULL_ALLOC(ndr
, r
->in
.auth_info
);
11332 _mem_save_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11333 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.auth_info
, LIBNDR_FLAG_REF_ALLOC
);
11334 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
11335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_auth_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11336 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11337 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
11338 ZERO_STRUCTP(r
->out
.trustdom_handle
);
11340 if (flags
& NDR_OUT
) {
11341 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11342 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
11344 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11345 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
11346 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
11347 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11348 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11350 return NDR_ERR_SUCCESS
;
11353 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomainEx2
*r
)
11355 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomainEx2");
11357 if (flags
& NDR_SET_VALUES
) {
11358 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11360 if (flags
& NDR_IN
) {
11361 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomainEx2");
11363 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
11365 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
11367 ndr_print_ptr(ndr
, "info", r
->in
.info
);
11369 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info", r
->in
.info
);
11371 ndr_print_ptr(ndr
, "auth_info", r
->in
.auth_info
);
11373 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", r
->in
.auth_info
);
11375 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
11378 if (flags
& NDR_OUT
) {
11379 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomainEx2");
11381 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
11383 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
11385 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11391 static enum ndr_err_code
ndr_push_lsa_CREDRWRITE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRWRITE
*r
)
11393 if (flags
& NDR_IN
) {
11395 if (flags
& NDR_OUT
) {
11396 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11398 return NDR_ERR_SUCCESS
;
11401 static enum ndr_err_code
ndr_pull_lsa_CREDRWRITE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRWRITE
*r
)
11403 if (flags
& NDR_IN
) {
11405 if (flags
& NDR_OUT
) {
11406 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11408 return NDR_ERR_SUCCESS
;
11411 _PUBLIC_
void ndr_print_lsa_CREDRWRITE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRWRITE
*r
)
11413 ndr_print_struct(ndr
, name
, "lsa_CREDRWRITE");
11415 if (flags
& NDR_SET_VALUES
) {
11416 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11418 if (flags
& NDR_IN
) {
11419 ndr_print_struct(ndr
, "in", "lsa_CREDRWRITE");
11423 if (flags
& NDR_OUT
) {
11424 ndr_print_struct(ndr
, "out", "lsa_CREDRWRITE");
11426 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11432 static enum ndr_err_code
ndr_push_lsa_CREDRREAD(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRREAD
*r
)
11434 if (flags
& NDR_IN
) {
11436 if (flags
& NDR_OUT
) {
11437 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11439 return NDR_ERR_SUCCESS
;
11442 static enum ndr_err_code
ndr_pull_lsa_CREDRREAD(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRREAD
*r
)
11444 if (flags
& NDR_IN
) {
11446 if (flags
& NDR_OUT
) {
11447 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11449 return NDR_ERR_SUCCESS
;
11452 _PUBLIC_
void ndr_print_lsa_CREDRREAD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRREAD
*r
)
11454 ndr_print_struct(ndr
, name
, "lsa_CREDRREAD");
11456 if (flags
& NDR_SET_VALUES
) {
11457 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11459 if (flags
& NDR_IN
) {
11460 ndr_print_struct(ndr
, "in", "lsa_CREDRREAD");
11464 if (flags
& NDR_OUT
) {
11465 ndr_print_struct(ndr
, "out", "lsa_CREDRREAD");
11467 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11473 static enum ndr_err_code
ndr_push_lsa_CREDRENUMERATE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRENUMERATE
*r
)
11475 if (flags
& NDR_IN
) {
11477 if (flags
& NDR_OUT
) {
11478 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11480 return NDR_ERR_SUCCESS
;
11483 static enum ndr_err_code
ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRENUMERATE
*r
)
11485 if (flags
& NDR_IN
) {
11487 if (flags
& NDR_OUT
) {
11488 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11490 return NDR_ERR_SUCCESS
;
11493 _PUBLIC_
void ndr_print_lsa_CREDRENUMERATE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRENUMERATE
*r
)
11495 ndr_print_struct(ndr
, name
, "lsa_CREDRENUMERATE");
11497 if (flags
& NDR_SET_VALUES
) {
11498 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11500 if (flags
& NDR_IN
) {
11501 ndr_print_struct(ndr
, "in", "lsa_CREDRENUMERATE");
11505 if (flags
& NDR_OUT
) {
11506 ndr_print_struct(ndr
, "out", "lsa_CREDRENUMERATE");
11508 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11514 static enum ndr_err_code
ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11516 if (flags
& NDR_IN
) {
11518 if (flags
& NDR_OUT
) {
11519 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11521 return NDR_ERR_SUCCESS
;
11524 static enum ndr_err_code
ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11526 if (flags
& NDR_IN
) {
11528 if (flags
& NDR_OUT
) {
11529 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11531 return NDR_ERR_SUCCESS
;
11534 _PUBLIC_
void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11536 ndr_print_struct(ndr
, name
, "lsa_CREDRWRITEDOMAINCREDENTIALS");
11538 if (flags
& NDR_SET_VALUES
) {
11539 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11541 if (flags
& NDR_IN
) {
11542 ndr_print_struct(ndr
, "in", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11546 if (flags
& NDR_OUT
) {
11547 ndr_print_struct(ndr
, "out", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11549 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11555 static enum ndr_err_code
ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11557 if (flags
& NDR_IN
) {
11559 if (flags
& NDR_OUT
) {
11560 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11562 return NDR_ERR_SUCCESS
;
11565 static enum ndr_err_code
ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11567 if (flags
& NDR_IN
) {
11569 if (flags
& NDR_OUT
) {
11570 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11572 return NDR_ERR_SUCCESS
;
11575 _PUBLIC_
void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11577 ndr_print_struct(ndr
, name
, "lsa_CREDRREADDOMAINCREDENTIALS");
11579 if (flags
& NDR_SET_VALUES
) {
11580 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11582 if (flags
& NDR_IN
) {
11583 ndr_print_struct(ndr
, "in", "lsa_CREDRREADDOMAINCREDENTIALS");
11587 if (flags
& NDR_OUT
) {
11588 ndr_print_struct(ndr
, "out", "lsa_CREDRREADDOMAINCREDENTIALS");
11590 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11596 static enum ndr_err_code
ndr_push_lsa_CREDRDELETE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRDELETE
*r
)
11598 if (flags
& NDR_IN
) {
11600 if (flags
& NDR_OUT
) {
11601 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11603 return NDR_ERR_SUCCESS
;
11606 static enum ndr_err_code
ndr_pull_lsa_CREDRDELETE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRDELETE
*r
)
11608 if (flags
& NDR_IN
) {
11610 if (flags
& NDR_OUT
) {
11611 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11613 return NDR_ERR_SUCCESS
;
11616 _PUBLIC_
void ndr_print_lsa_CREDRDELETE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRDELETE
*r
)
11618 ndr_print_struct(ndr
, name
, "lsa_CREDRDELETE");
11620 if (flags
& NDR_SET_VALUES
) {
11621 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11623 if (flags
& NDR_IN
) {
11624 ndr_print_struct(ndr
, "in", "lsa_CREDRDELETE");
11628 if (flags
& NDR_OUT
) {
11629 ndr_print_struct(ndr
, "out", "lsa_CREDRDELETE");
11631 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11637 static enum ndr_err_code
ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRGETTARGETINFO
*r
)
11639 if (flags
& NDR_IN
) {
11641 if (flags
& NDR_OUT
) {
11642 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11644 return NDR_ERR_SUCCESS
;
11647 static enum ndr_err_code
ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRGETTARGETINFO
*r
)
11649 if (flags
& NDR_IN
) {
11651 if (flags
& NDR_OUT
) {
11652 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11654 return NDR_ERR_SUCCESS
;
11657 _PUBLIC_
void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRGETTARGETINFO
*r
)
11659 ndr_print_struct(ndr
, name
, "lsa_CREDRGETTARGETINFO");
11661 if (flags
& NDR_SET_VALUES
) {
11662 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11664 if (flags
& NDR_IN
) {
11665 ndr_print_struct(ndr
, "in", "lsa_CREDRGETTARGETINFO");
11669 if (flags
& NDR_OUT
) {
11670 ndr_print_struct(ndr
, "out", "lsa_CREDRGETTARGETINFO");
11672 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11678 static enum ndr_err_code
ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRPROFILELOADED
*r
)
11680 if (flags
& NDR_IN
) {
11682 if (flags
& NDR_OUT
) {
11683 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11685 return NDR_ERR_SUCCESS
;
11688 static enum ndr_err_code
ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRPROFILELOADED
*r
)
11690 if (flags
& NDR_IN
) {
11692 if (flags
& NDR_OUT
) {
11693 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11695 return NDR_ERR_SUCCESS
;
11698 _PUBLIC_
void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRPROFILELOADED
*r
)
11700 ndr_print_struct(ndr
, name
, "lsa_CREDRPROFILELOADED");
11702 if (flags
& NDR_SET_VALUES
) {
11703 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11705 if (flags
& NDR_IN
) {
11706 ndr_print_struct(ndr
, "in", "lsa_CREDRPROFILELOADED");
11710 if (flags
& NDR_OUT
) {
11711 ndr_print_struct(ndr
, "out", "lsa_CREDRPROFILELOADED");
11713 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11719 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames3(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames3
*r
)
11721 uint32_t cntr_names_0
;
11722 if (flags
& NDR_IN
) {
11723 if (r
->in
.handle
== NULL
) {
11724 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11726 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11727 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11728 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11729 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11730 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11732 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11733 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11735 if (r
->in
.sids
== NULL
) {
11736 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11738 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11739 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
11740 if (r
->in
.count
== NULL
) {
11741 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11743 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
11744 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
11745 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
11747 if (flags
& NDR_OUT
) {
11748 if (r
->out
.domains
== NULL
) {
11749 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11751 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
11752 if (*r
->out
.domains
) {
11753 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11755 if (r
->out
.sids
== NULL
) {
11756 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11758 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11759 if (r
->out
.count
== NULL
) {
11760 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11762 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
11763 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11765 return NDR_ERR_SUCCESS
;
11768 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames3(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames3
*r
)
11770 uint32_t cntr_names_0
;
11771 uint32_t _ptr_domains
;
11772 TALLOC_CTX
*_mem_save_handle_0
;
11773 TALLOC_CTX
*_mem_save_names_0
;
11774 TALLOC_CTX
*_mem_save_domains_0
;
11775 TALLOC_CTX
*_mem_save_domains_1
;
11776 TALLOC_CTX
*_mem_save_sids_0
;
11777 TALLOC_CTX
*_mem_save_count_0
;
11778 if (flags
& NDR_IN
) {
11779 ZERO_STRUCT(r
->out
);
11781 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11782 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
11784 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11785 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
11786 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11787 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11788 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
11789 if (r
->in
.num_names
> 1000) {
11790 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11792 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
11793 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
11794 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11795 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
11796 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11797 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11799 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11800 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11802 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
11803 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11804 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
11806 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11807 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11808 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11809 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11810 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11811 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11812 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
11814 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11815 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
11816 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
11817 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11818 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
11819 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
11820 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11821 ZERO_STRUCTP(r
->out
.domains
);
11822 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11823 *r
->out
.sids
= *r
->in
.sids
;
11824 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11825 *r
->out
.count
= *r
->in
.count
;
11827 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
11830 if (flags
& NDR_OUT
) {
11831 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11832 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11834 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11835 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
11836 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
11837 if (_ptr_domains
) {
11838 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
11840 *r
->out
.domains
= NULL
;
11842 if (*r
->out
.domains
) {
11843 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11844 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
11845 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11846 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
11848 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
11849 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11850 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11852 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11853 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11854 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11855 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11856 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11857 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11859 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11860 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
11861 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
11862 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11863 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11865 return NDR_ERR_SUCCESS
;
11868 _PUBLIC_
void ndr_print_lsa_LookupNames3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames3
*r
)
11870 uint32_t cntr_names_0
;
11871 ndr_print_struct(ndr
, name
, "lsa_LookupNames3");
11873 if (flags
& NDR_SET_VALUES
) {
11874 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11876 if (flags
& NDR_IN
) {
11877 ndr_print_struct(ndr
, "in", "lsa_LookupNames3");
11879 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
11881 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
11883 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
11884 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
11886 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
11888 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
11889 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
11894 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
11896 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->in
.sids
);
11898 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
11899 ndr_print_ptr(ndr
, "count", r
->in
.count
);
11901 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
11903 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
11904 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
11907 if (flags
& NDR_OUT
) {
11908 ndr_print_struct(ndr
, "out", "lsa_LookupNames3");
11910 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
11912 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
11914 if (*r
->out
.domains
) {
11915 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
11919 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
11921 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->out
.sids
);
11923 ndr_print_ptr(ndr
, "count", r
->out
.count
);
11925 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
11927 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11933 static enum ndr_err_code
ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRGETSESSIONTYPES
*r
)
11935 if (flags
& NDR_IN
) {
11937 if (flags
& NDR_OUT
) {
11938 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11940 return NDR_ERR_SUCCESS
;
11943 static enum ndr_err_code
ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRGETSESSIONTYPES
*r
)
11945 if (flags
& NDR_IN
) {
11947 if (flags
& NDR_OUT
) {
11948 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11950 return NDR_ERR_SUCCESS
;
11953 _PUBLIC_
void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRGETSESSIONTYPES
*r
)
11955 ndr_print_struct(ndr
, name
, "lsa_CREDRGETSESSIONTYPES");
11957 if (flags
& NDR_SET_VALUES
) {
11958 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11960 if (flags
& NDR_IN
) {
11961 ndr_print_struct(ndr
, "in", "lsa_CREDRGETSESSIONTYPES");
11965 if (flags
& NDR_OUT
) {
11966 ndr_print_struct(ndr
, "out", "lsa_CREDRGETSESSIONTYPES");
11968 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11974 static enum ndr_err_code
ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARREGISTERAUDITEVENT
*r
)
11976 if (flags
& NDR_IN
) {
11978 if (flags
& NDR_OUT
) {
11979 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11981 return NDR_ERR_SUCCESS
;
11984 static enum ndr_err_code
ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARREGISTERAUDITEVENT
*r
)
11986 if (flags
& NDR_IN
) {
11988 if (flags
& NDR_OUT
) {
11989 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11991 return NDR_ERR_SUCCESS
;
11994 _PUBLIC_
void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARREGISTERAUDITEVENT
*r
)
11996 ndr_print_struct(ndr
, name
, "lsa_LSARREGISTERAUDITEVENT");
11998 if (flags
& NDR_SET_VALUES
) {
11999 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12001 if (flags
& NDR_IN
) {
12002 ndr_print_struct(ndr
, "in", "lsa_LSARREGISTERAUDITEVENT");
12006 if (flags
& NDR_OUT
) {
12007 ndr_print_struct(ndr
, "out", "lsa_LSARREGISTERAUDITEVENT");
12009 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12015 static enum ndr_err_code
ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARGENAUDITEVENT
*r
)
12017 if (flags
& NDR_IN
) {
12019 if (flags
& NDR_OUT
) {
12020 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12022 return NDR_ERR_SUCCESS
;
12025 static enum ndr_err_code
ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARGENAUDITEVENT
*r
)
12027 if (flags
& NDR_IN
) {
12029 if (flags
& NDR_OUT
) {
12030 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12032 return NDR_ERR_SUCCESS
;
12035 _PUBLIC_
void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARGENAUDITEVENT
*r
)
12037 ndr_print_struct(ndr
, name
, "lsa_LSARGENAUDITEVENT");
12039 if (flags
& NDR_SET_VALUES
) {
12040 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12042 if (flags
& NDR_IN
) {
12043 ndr_print_struct(ndr
, "in", "lsa_LSARGENAUDITEVENT");
12047 if (flags
& NDR_OUT
) {
12048 ndr_print_struct(ndr
, "out", "lsa_LSARGENAUDITEVENT");
12050 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12056 static enum ndr_err_code
ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
12058 if (flags
& NDR_IN
) {
12060 if (flags
& NDR_OUT
) {
12061 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12063 return NDR_ERR_SUCCESS
;
12066 static enum ndr_err_code
ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
12068 if (flags
& NDR_IN
) {
12070 if (flags
& NDR_OUT
) {
12071 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12073 return NDR_ERR_SUCCESS
;
12076 _PUBLIC_
void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
12078 ndr_print_struct(ndr
, name
, "lsa_LSARUNREGISTERAUDITEVENT");
12080 if (flags
& NDR_SET_VALUES
) {
12081 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12083 if (flags
& NDR_IN
) {
12084 ndr_print_struct(ndr
, "in", "lsa_LSARUNREGISTERAUDITEVENT");
12088 if (flags
& NDR_OUT
) {
12089 ndr_print_struct(ndr
, "out", "lsa_LSARUNREGISTERAUDITEVENT");
12091 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12097 static enum ndr_err_code
ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr_push
*ndr
, int flags
, const struct lsa_lsaRQueryForestTrustInformation
*r
)
12099 if (flags
& NDR_IN
) {
12100 if (r
->in
.handle
== NULL
) {
12101 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12103 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
12104 if (r
->in
.trusted_domain_name
== NULL
) {
12105 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12107 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain_name
));
12108 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.unknown
));
12110 if (flags
& NDR_OUT
) {
12111 if (r
->out
.forest_trust_info
== NULL
) {
12112 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12114 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.forest_trust_info
));
12115 if (*r
->out
.forest_trust_info
) {
12116 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
12118 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12120 return NDR_ERR_SUCCESS
;
12123 static enum ndr_err_code
ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr_pull
*ndr
, int flags
, struct lsa_lsaRQueryForestTrustInformation
*r
)
12125 uint32_t _ptr_forest_trust_info
;
12126 TALLOC_CTX
*_mem_save_handle_0
;
12127 TALLOC_CTX
*_mem_save_trusted_domain_name_0
;
12128 TALLOC_CTX
*_mem_save_forest_trust_info_0
;
12129 TALLOC_CTX
*_mem_save_forest_trust_info_1
;
12130 if (flags
& NDR_IN
) {
12131 ZERO_STRUCT(r
->out
);
12133 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12134 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
12136 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12137 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
12138 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
12139 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12140 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12141 NDR_PULL_ALLOC(ndr
, r
->in
.trusted_domain_name
);
12143 _mem_save_trusted_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12144 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trusted_domain_name
, LIBNDR_FLAG_REF_ALLOC
);
12145 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain_name
));
12146 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_name_0
, LIBNDR_FLAG_REF_ALLOC
);
12147 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
12148 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
12149 ZERO_STRUCTP(r
->out
.forest_trust_info
);
12151 if (flags
& NDR_OUT
) {
12152 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12153 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
12155 _mem_save_forest_trust_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12156 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.forest_trust_info
, LIBNDR_FLAG_REF_ALLOC
);
12157 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_info
));
12158 if (_ptr_forest_trust_info
) {
12159 NDR_PULL_ALLOC(ndr
, *r
->out
.forest_trust_info
);
12161 *r
->out
.forest_trust_info
= NULL
;
12163 if (*r
->out
.forest_trust_info
) {
12164 _mem_save_forest_trust_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12165 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.forest_trust_info
, 0);
12166 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
12167 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_1
, 0);
12169 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_0
, LIBNDR_FLAG_REF_ALLOC
);
12170 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12172 return NDR_ERR_SUCCESS
;
12175 _PUBLIC_
void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_lsaRQueryForestTrustInformation
*r
)
12177 ndr_print_struct(ndr
, name
, "lsa_lsaRQueryForestTrustInformation");
12179 if (flags
& NDR_SET_VALUES
) {
12180 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12182 if (flags
& NDR_IN
) {
12183 ndr_print_struct(ndr
, "in", "lsa_lsaRQueryForestTrustInformation");
12185 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
12187 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
12189 ndr_print_ptr(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
12191 ndr_print_lsa_String(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
12193 ndr_print_uint16(ndr
, "unknown", r
->in
.unknown
);
12196 if (flags
& NDR_OUT
) {
12197 ndr_print_struct(ndr
, "out", "lsa_lsaRQueryForestTrustInformation");
12199 ndr_print_ptr(ndr
, "forest_trust_info", r
->out
.forest_trust_info
);
12201 ndr_print_ptr(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
12203 if (*r
->out
.forest_trust_info
) {
12204 ndr_print_lsa_ForestTrustInformation(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
12208 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12214 static enum ndr_err_code
ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
12216 if (flags
& NDR_IN
) {
12218 if (flags
& NDR_OUT
) {
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_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
12226 if (flags
& NDR_IN
) {
12228 if (flags
& NDR_OUT
) {
12229 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12231 return NDR_ERR_SUCCESS
;
12234 _PUBLIC_
void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
12236 ndr_print_struct(ndr
, name
, "lsa_LSARSETFORESTTRUSTINFORMATION");
12238 if (flags
& NDR_SET_VALUES
) {
12239 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12241 if (flags
& NDR_IN
) {
12242 ndr_print_struct(ndr
, "in", "lsa_LSARSETFORESTTRUSTINFORMATION");
12246 if (flags
& NDR_OUT
) {
12247 ndr_print_struct(ndr
, "out", "lsa_LSARSETFORESTTRUSTINFORMATION");
12249 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12255 static enum ndr_err_code
ndr_push_lsa_CREDRRENAME(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRRENAME
*r
)
12257 if (flags
& NDR_IN
) {
12259 if (flags
& NDR_OUT
) {
12260 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12262 return NDR_ERR_SUCCESS
;
12265 static enum ndr_err_code
ndr_pull_lsa_CREDRRENAME(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRRENAME
*r
)
12267 if (flags
& NDR_IN
) {
12269 if (flags
& NDR_OUT
) {
12270 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12272 return NDR_ERR_SUCCESS
;
12275 _PUBLIC_
void ndr_print_lsa_CREDRRENAME(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRRENAME
*r
)
12277 ndr_print_struct(ndr
, name
, "lsa_CREDRRENAME");
12279 if (flags
& NDR_SET_VALUES
) {
12280 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12282 if (flags
& NDR_IN
) {
12283 ndr_print_struct(ndr
, "in", "lsa_CREDRRENAME");
12287 if (flags
& NDR_OUT
) {
12288 ndr_print_struct(ndr
, "out", "lsa_CREDRRENAME");
12290 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12296 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids3(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids3
*r
)
12298 if (flags
& NDR_IN
) {
12299 if (r
->in
.sids
== NULL
) {
12300 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12302 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12303 if (r
->in
.names
== NULL
) {
12304 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12306 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
12307 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
12308 if (r
->in
.count
== NULL
) {
12309 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
12312 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
12313 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
12315 if (flags
& NDR_OUT
) {
12316 if (r
->out
.domains
== NULL
) {
12317 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12319 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
12320 if (*r
->out
.domains
) {
12321 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12323 if (r
->out
.names
== NULL
) {
12324 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12326 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
12327 if (r
->out
.count
== NULL
) {
12328 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12330 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
12331 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12333 return NDR_ERR_SUCCESS
;
12336 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids3(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids3
*r
)
12338 uint32_t _ptr_domains
;
12339 TALLOC_CTX
*_mem_save_sids_0
;
12340 TALLOC_CTX
*_mem_save_domains_0
;
12341 TALLOC_CTX
*_mem_save_domains_1
;
12342 TALLOC_CTX
*_mem_save_names_0
;
12343 TALLOC_CTX
*_mem_save_count_0
;
12344 if (flags
& NDR_IN
) {
12345 ZERO_STRUCT(r
->out
);
12347 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12348 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
12350 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12351 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12352 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12353 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12354 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12355 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
12357 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12358 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
12359 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
12360 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
12361 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
12362 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12363 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
12365 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12366 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
12367 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12368 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12369 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
12370 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
12371 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12372 ZERO_STRUCTP(r
->out
.domains
);
12373 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
12374 *r
->out
.names
= *r
->in
.names
;
12375 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12376 *r
->out
.count
= *r
->in
.count
;
12378 if (flags
& NDR_OUT
) {
12379 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12380 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12382 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12383 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
12384 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
12385 if (_ptr_domains
) {
12386 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
12388 *r
->out
.domains
= NULL
;
12390 if (*r
->out
.domains
) {
12391 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12392 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
12393 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12394 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
12396 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
12397 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12398 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
12400 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12401 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
12402 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
12403 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
12404 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12405 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12407 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12408 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
12409 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
12410 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12411 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12413 return NDR_ERR_SUCCESS
;
12416 _PUBLIC_
void ndr_print_lsa_LookupSids3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids3
*r
)
12418 ndr_print_struct(ndr
, name
, "lsa_LookupSids3");
12420 if (flags
& NDR_SET_VALUES
) {
12421 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12423 if (flags
& NDR_IN
) {
12424 ndr_print_struct(ndr
, "in", "lsa_LookupSids3");
12426 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
12428 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
12430 ndr_print_ptr(ndr
, "names", r
->in
.names
);
12432 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->in
.names
);
12434 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
12435 ndr_print_ptr(ndr
, "count", r
->in
.count
);
12437 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
12439 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
12440 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
12443 if (flags
& NDR_OUT
) {
12444 ndr_print_struct(ndr
, "out", "lsa_LookupSids3");
12446 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
12448 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
12450 if (*r
->out
.domains
) {
12451 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
12455 ndr_print_ptr(ndr
, "names", r
->out
.names
);
12457 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->out
.names
);
12459 ndr_print_ptr(ndr
, "count", r
->out
.count
);
12461 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
12463 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12469 static enum ndr_err_code
ndr_push_lsa_LookupNames4(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames4
*r
)
12471 uint32_t cntr_names_0
;
12472 if (flags
& NDR_IN
) {
12473 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
12474 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
12475 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12476 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
12478 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12479 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
12481 if (r
->in
.sids
== NULL
) {
12482 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12484 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12485 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
12486 if (r
->in
.count
== NULL
) {
12487 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12489 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
12490 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
12491 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
12493 if (flags
& NDR_OUT
) {
12494 if (r
->out
.domains
== NULL
) {
12495 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12497 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
12498 if (*r
->out
.domains
) {
12499 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12501 if (r
->out
.sids
== NULL
) {
12502 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12504 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
12505 if (r
->out
.count
== NULL
) {
12506 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12508 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
12509 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12511 return NDR_ERR_SUCCESS
;
12514 static enum ndr_err_code
ndr_pull_lsa_LookupNames4(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames4
*r
)
12516 uint32_t cntr_names_0
;
12517 uint32_t _ptr_domains
;
12518 TALLOC_CTX
*_mem_save_names_0
;
12519 TALLOC_CTX
*_mem_save_domains_0
;
12520 TALLOC_CTX
*_mem_save_domains_1
;
12521 TALLOC_CTX
*_mem_save_sids_0
;
12522 TALLOC_CTX
*_mem_save_count_0
;
12523 if (flags
& NDR_IN
) {
12524 ZERO_STRUCT(r
->out
);
12526 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
12527 if (r
->in
.num_names
> 1000) {
12528 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
12530 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
12531 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
12532 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12533 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
12534 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12535 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
12537 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12538 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
12540 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
12541 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12542 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
12544 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12545 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12546 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12547 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12548 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
12549 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12550 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
12552 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12553 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
12554 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12555 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12556 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
12557 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
12558 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12559 ZERO_STRUCTP(r
->out
.domains
);
12560 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
12561 *r
->out
.sids
= *r
->in
.sids
;
12562 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12563 *r
->out
.count
= *r
->in
.count
;
12565 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
12568 if (flags
& NDR_OUT
) {
12569 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12570 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12572 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12573 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
12574 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
12575 if (_ptr_domains
) {
12576 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
12578 *r
->out
.domains
= NULL
;
12580 if (*r
->out
.domains
) {
12581 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12582 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
12583 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12584 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
12586 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
12587 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12588 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
12590 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12591 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12592 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
12593 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12594 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12595 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12597 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12598 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
12599 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
12600 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12601 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12603 return NDR_ERR_SUCCESS
;
12606 _PUBLIC_
void ndr_print_lsa_LookupNames4(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames4
*r
)
12608 uint32_t cntr_names_0
;
12609 ndr_print_struct(ndr
, name
, "lsa_LookupNames4");
12611 if (flags
& NDR_SET_VALUES
) {
12612 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12614 if (flags
& NDR_IN
) {
12615 ndr_print_struct(ndr
, "in", "lsa_LookupNames4");
12617 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
12618 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
12620 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
12622 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
12623 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
12628 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
12630 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->in
.sids
);
12632 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
12633 ndr_print_ptr(ndr
, "count", r
->in
.count
);
12635 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
12637 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
12638 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
12641 if (flags
& NDR_OUT
) {
12642 ndr_print_struct(ndr
, "out", "lsa_LookupNames4");
12644 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
12646 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
12648 if (*r
->out
.domains
) {
12649 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
12653 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
12655 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->out
.sids
);
12657 ndr_print_ptr(ndr
, "count", r
->out
.count
);
12659 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
12661 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12667 static enum ndr_err_code
ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSAROPENPOLICYSCE
*r
)
12669 if (flags
& NDR_IN
) {
12671 if (flags
& NDR_OUT
) {
12672 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12674 return NDR_ERR_SUCCESS
;
12677 static enum ndr_err_code
ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSAROPENPOLICYSCE
*r
)
12679 if (flags
& NDR_IN
) {
12681 if (flags
& NDR_OUT
) {
12682 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12684 return NDR_ERR_SUCCESS
;
12687 _PUBLIC_
void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSAROPENPOLICYSCE
*r
)
12689 ndr_print_struct(ndr
, name
, "lsa_LSAROPENPOLICYSCE");
12691 if (flags
& NDR_SET_VALUES
) {
12692 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12694 if (flags
& NDR_IN
) {
12695 ndr_print_struct(ndr
, "in", "lsa_LSAROPENPOLICYSCE");
12699 if (flags
& NDR_OUT
) {
12700 ndr_print_struct(ndr
, "out", "lsa_LSAROPENPOLICYSCE");
12702 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12708 static enum ndr_err_code
ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12710 if (flags
& NDR_IN
) {
12712 if (flags
& NDR_OUT
) {
12713 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12715 return NDR_ERR_SUCCESS
;
12718 static enum ndr_err_code
ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12720 if (flags
& NDR_IN
) {
12722 if (flags
& NDR_OUT
) {
12723 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12725 return NDR_ERR_SUCCESS
;
12728 _PUBLIC_
void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12730 ndr_print_struct(ndr
, name
, "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12732 if (flags
& NDR_SET_VALUES
) {
12733 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12735 if (flags
& NDR_IN
) {
12736 ndr_print_struct(ndr
, "in", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12740 if (flags
& NDR_OUT
) {
12741 ndr_print_struct(ndr
, "out", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12743 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12749 static enum ndr_err_code
ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12751 if (flags
& NDR_IN
) {
12753 if (flags
& NDR_OUT
) {
12754 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12756 return NDR_ERR_SUCCESS
;
12759 static enum ndr_err_code
ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12761 if (flags
& NDR_IN
) {
12763 if (flags
& NDR_OUT
) {
12764 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12766 return NDR_ERR_SUCCESS
;
12769 _PUBLIC_
void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12771 ndr_print_struct(ndr
, name
, "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12773 if (flags
& NDR_SET_VALUES
) {
12774 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12776 if (flags
& NDR_IN
) {
12777 ndr_print_struct(ndr
, "in", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12781 if (flags
& NDR_OUT
) {
12782 ndr_print_struct(ndr
, "out", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12784 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12790 static enum ndr_err_code
ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12792 if (flags
& NDR_IN
) {
12794 if (flags
& NDR_OUT
) {
12795 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12797 return NDR_ERR_SUCCESS
;
12800 static enum ndr_err_code
ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12802 if (flags
& NDR_IN
) {
12804 if (flags
& NDR_OUT
) {
12805 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12807 return NDR_ERR_SUCCESS
;
12810 _PUBLIC_
void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12812 ndr_print_struct(ndr
, name
, "lsa_LSARADTREPORTSECURITYEVENT");
12814 if (flags
& NDR_SET_VALUES
) {
12815 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12817 if (flags
& NDR_IN
) {
12818 ndr_print_struct(ndr
, "in", "lsa_LSARADTREPORTSECURITYEVENT");
12822 if (flags
& NDR_OUT
) {
12823 ndr_print_struct(ndr
, "out", "lsa_LSARADTREPORTSECURITYEVENT");
12825 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12831 static const struct ndr_interface_call lsarpc_calls
[] = {
12834 sizeof(struct lsa_Close
),
12835 (ndr_push_flags_fn_t
) ndr_push_lsa_Close
,
12836 (ndr_pull_flags_fn_t
) ndr_pull_lsa_Close
,
12837 (ndr_print_function_t
) ndr_print_lsa_Close
,
12842 sizeof(struct lsa_Delete
),
12843 (ndr_push_flags_fn_t
) ndr_push_lsa_Delete
,
12844 (ndr_pull_flags_fn_t
) ndr_pull_lsa_Delete
,
12845 (ndr_print_function_t
) ndr_print_lsa_Delete
,
12850 sizeof(struct lsa_EnumPrivs
),
12851 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumPrivs
,
12852 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumPrivs
,
12853 (ndr_print_function_t
) ndr_print_lsa_EnumPrivs
,
12857 "lsa_QuerySecurity",
12858 sizeof(struct lsa_QuerySecurity
),
12859 (ndr_push_flags_fn_t
) ndr_push_lsa_QuerySecurity
,
12860 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QuerySecurity
,
12861 (ndr_print_function_t
) ndr_print_lsa_QuerySecurity
,
12866 sizeof(struct lsa_SetSecObj
),
12867 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSecObj
,
12868 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSecObj
,
12869 (ndr_print_function_t
) ndr_print_lsa_SetSecObj
,
12873 "lsa_ChangePassword",
12874 sizeof(struct lsa_ChangePassword
),
12875 (ndr_push_flags_fn_t
) ndr_push_lsa_ChangePassword
,
12876 (ndr_pull_flags_fn_t
) ndr_pull_lsa_ChangePassword
,
12877 (ndr_print_function_t
) ndr_print_lsa_ChangePassword
,
12882 sizeof(struct lsa_OpenPolicy
),
12883 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenPolicy
,
12884 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenPolicy
,
12885 (ndr_print_function_t
) ndr_print_lsa_OpenPolicy
,
12889 "lsa_QueryInfoPolicy",
12890 sizeof(struct lsa_QueryInfoPolicy
),
12891 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryInfoPolicy
,
12892 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryInfoPolicy
,
12893 (ndr_print_function_t
) ndr_print_lsa_QueryInfoPolicy
,
12897 "lsa_SetInfoPolicy",
12898 sizeof(struct lsa_SetInfoPolicy
),
12899 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInfoPolicy
,
12900 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInfoPolicy
,
12901 (ndr_print_function_t
) ndr_print_lsa_SetInfoPolicy
,
12905 "lsa_ClearAuditLog",
12906 sizeof(struct lsa_ClearAuditLog
),
12907 (ndr_push_flags_fn_t
) ndr_push_lsa_ClearAuditLog
,
12908 (ndr_pull_flags_fn_t
) ndr_pull_lsa_ClearAuditLog
,
12909 (ndr_print_function_t
) ndr_print_lsa_ClearAuditLog
,
12913 "lsa_CreateAccount",
12914 sizeof(struct lsa_CreateAccount
),
12915 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateAccount
,
12916 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateAccount
,
12917 (ndr_print_function_t
) ndr_print_lsa_CreateAccount
,
12921 "lsa_EnumAccounts",
12922 sizeof(struct lsa_EnumAccounts
),
12923 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccounts
,
12924 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccounts
,
12925 (ndr_print_function_t
) ndr_print_lsa_EnumAccounts
,
12929 "lsa_CreateTrustedDomain",
12930 sizeof(struct lsa_CreateTrustedDomain
),
12931 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomain
,
12932 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomain
,
12933 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomain
,
12937 "lsa_EnumTrustDom",
12938 sizeof(struct lsa_EnumTrustDom
),
12939 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumTrustDom
,
12940 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumTrustDom
,
12941 (ndr_print_function_t
) ndr_print_lsa_EnumTrustDom
,
12946 sizeof(struct lsa_LookupNames
),
12947 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames
,
12948 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames
,
12949 (ndr_print_function_t
) ndr_print_lsa_LookupNames
,
12954 sizeof(struct lsa_LookupSids
),
12955 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids
,
12956 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids
,
12957 (ndr_print_function_t
) ndr_print_lsa_LookupSids
,
12961 "lsa_CreateSecret",
12962 sizeof(struct lsa_CreateSecret
),
12963 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateSecret
,
12964 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateSecret
,
12965 (ndr_print_function_t
) ndr_print_lsa_CreateSecret
,
12970 sizeof(struct lsa_OpenAccount
),
12971 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenAccount
,
12972 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenAccount
,
12973 (ndr_print_function_t
) ndr_print_lsa_OpenAccount
,
12977 "lsa_EnumPrivsAccount",
12978 sizeof(struct lsa_EnumPrivsAccount
),
12979 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumPrivsAccount
,
12980 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumPrivsAccount
,
12981 (ndr_print_function_t
) ndr_print_lsa_EnumPrivsAccount
,
12985 "lsa_AddPrivilegesToAccount",
12986 sizeof(struct lsa_AddPrivilegesToAccount
),
12987 (ndr_push_flags_fn_t
) ndr_push_lsa_AddPrivilegesToAccount
,
12988 (ndr_pull_flags_fn_t
) ndr_pull_lsa_AddPrivilegesToAccount
,
12989 (ndr_print_function_t
) ndr_print_lsa_AddPrivilegesToAccount
,
12993 "lsa_RemovePrivilegesFromAccount",
12994 sizeof(struct lsa_RemovePrivilegesFromAccount
),
12995 (ndr_push_flags_fn_t
) ndr_push_lsa_RemovePrivilegesFromAccount
,
12996 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RemovePrivilegesFromAccount
,
12997 (ndr_print_function_t
) ndr_print_lsa_RemovePrivilegesFromAccount
,
13001 "lsa_GetQuotasForAccount",
13002 sizeof(struct lsa_GetQuotasForAccount
),
13003 (ndr_push_flags_fn_t
) ndr_push_lsa_GetQuotasForAccount
,
13004 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetQuotasForAccount
,
13005 (ndr_print_function_t
) ndr_print_lsa_GetQuotasForAccount
,
13009 "lsa_SetQuotasForAccount",
13010 sizeof(struct lsa_SetQuotasForAccount
),
13011 (ndr_push_flags_fn_t
) ndr_push_lsa_SetQuotasForAccount
,
13012 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetQuotasForAccount
,
13013 (ndr_print_function_t
) ndr_print_lsa_SetQuotasForAccount
,
13017 "lsa_GetSystemAccessAccount",
13018 sizeof(struct lsa_GetSystemAccessAccount
),
13019 (ndr_push_flags_fn_t
) ndr_push_lsa_GetSystemAccessAccount
,
13020 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetSystemAccessAccount
,
13021 (ndr_print_function_t
) ndr_print_lsa_GetSystemAccessAccount
,
13025 "lsa_SetSystemAccessAccount",
13026 sizeof(struct lsa_SetSystemAccessAccount
),
13027 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSystemAccessAccount
,
13028 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSystemAccessAccount
,
13029 (ndr_print_function_t
) ndr_print_lsa_SetSystemAccessAccount
,
13033 "lsa_OpenTrustedDomain",
13034 sizeof(struct lsa_OpenTrustedDomain
),
13035 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenTrustedDomain
,
13036 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenTrustedDomain
,
13037 (ndr_print_function_t
) ndr_print_lsa_OpenTrustedDomain
,
13041 "lsa_QueryTrustedDomainInfo",
13042 sizeof(struct lsa_QueryTrustedDomainInfo
),
13043 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfo
,
13044 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfo
,
13045 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfo
,
13049 "lsa_SetInformationTrustedDomain",
13050 sizeof(struct lsa_SetInformationTrustedDomain
),
13051 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInformationTrustedDomain
,
13052 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInformationTrustedDomain
,
13053 (ndr_print_function_t
) ndr_print_lsa_SetInformationTrustedDomain
,
13058 sizeof(struct lsa_OpenSecret
),
13059 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenSecret
,
13060 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenSecret
,
13061 (ndr_print_function_t
) ndr_print_lsa_OpenSecret
,
13066 sizeof(struct lsa_SetSecret
),
13067 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSecret
,
13068 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSecret
,
13069 (ndr_print_function_t
) ndr_print_lsa_SetSecret
,
13074 sizeof(struct lsa_QuerySecret
),
13075 (ndr_push_flags_fn_t
) ndr_push_lsa_QuerySecret
,
13076 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QuerySecret
,
13077 (ndr_print_function_t
) ndr_print_lsa_QuerySecret
,
13081 "lsa_LookupPrivValue",
13082 sizeof(struct lsa_LookupPrivValue
),
13083 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivValue
,
13084 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivValue
,
13085 (ndr_print_function_t
) ndr_print_lsa_LookupPrivValue
,
13089 "lsa_LookupPrivName",
13090 sizeof(struct lsa_LookupPrivName
),
13091 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivName
,
13092 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivName
,
13093 (ndr_print_function_t
) ndr_print_lsa_LookupPrivName
,
13097 "lsa_LookupPrivDisplayName",
13098 sizeof(struct lsa_LookupPrivDisplayName
),
13099 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivDisplayName
,
13100 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivDisplayName
,
13101 (ndr_print_function_t
) ndr_print_lsa_LookupPrivDisplayName
,
13105 "lsa_DeleteObject",
13106 sizeof(struct lsa_DeleteObject
),
13107 (ndr_push_flags_fn_t
) ndr_push_lsa_DeleteObject
,
13108 (ndr_pull_flags_fn_t
) ndr_pull_lsa_DeleteObject
,
13109 (ndr_print_function_t
) ndr_print_lsa_DeleteObject
,
13113 "lsa_EnumAccountsWithUserRight",
13114 sizeof(struct lsa_EnumAccountsWithUserRight
),
13115 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccountsWithUserRight
,
13116 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccountsWithUserRight
,
13117 (ndr_print_function_t
) ndr_print_lsa_EnumAccountsWithUserRight
,
13121 "lsa_EnumAccountRights",
13122 sizeof(struct lsa_EnumAccountRights
),
13123 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccountRights
,
13124 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccountRights
,
13125 (ndr_print_function_t
) ndr_print_lsa_EnumAccountRights
,
13129 "lsa_AddAccountRights",
13130 sizeof(struct lsa_AddAccountRights
),
13131 (ndr_push_flags_fn_t
) ndr_push_lsa_AddAccountRights
,
13132 (ndr_pull_flags_fn_t
) ndr_pull_lsa_AddAccountRights
,
13133 (ndr_print_function_t
) ndr_print_lsa_AddAccountRights
,
13137 "lsa_RemoveAccountRights",
13138 sizeof(struct lsa_RemoveAccountRights
),
13139 (ndr_push_flags_fn_t
) ndr_push_lsa_RemoveAccountRights
,
13140 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RemoveAccountRights
,
13141 (ndr_print_function_t
) ndr_print_lsa_RemoveAccountRights
,
13145 "lsa_QueryTrustedDomainInfoBySid",
13146 sizeof(struct lsa_QueryTrustedDomainInfoBySid
),
13147 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfoBySid
,
13148 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfoBySid
,
13149 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfoBySid
,
13153 "lsa_SetTrustedDomainInfo",
13154 sizeof(struct lsa_SetTrustedDomainInfo
),
13155 (ndr_push_flags_fn_t
) ndr_push_lsa_SetTrustedDomainInfo
,
13156 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetTrustedDomainInfo
,
13157 (ndr_print_function_t
) ndr_print_lsa_SetTrustedDomainInfo
,
13161 "lsa_DeleteTrustedDomain",
13162 sizeof(struct lsa_DeleteTrustedDomain
),
13163 (ndr_push_flags_fn_t
) ndr_push_lsa_DeleteTrustedDomain
,
13164 (ndr_pull_flags_fn_t
) ndr_pull_lsa_DeleteTrustedDomain
,
13165 (ndr_print_function_t
) ndr_print_lsa_DeleteTrustedDomain
,
13169 "lsa_StorePrivateData",
13170 sizeof(struct lsa_StorePrivateData
),
13171 (ndr_push_flags_fn_t
) ndr_push_lsa_StorePrivateData
,
13172 (ndr_pull_flags_fn_t
) ndr_pull_lsa_StorePrivateData
,
13173 (ndr_print_function_t
) ndr_print_lsa_StorePrivateData
,
13177 "lsa_RetrievePrivateData",
13178 sizeof(struct lsa_RetrievePrivateData
),
13179 (ndr_push_flags_fn_t
) ndr_push_lsa_RetrievePrivateData
,
13180 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RetrievePrivateData
,
13181 (ndr_print_function_t
) ndr_print_lsa_RetrievePrivateData
,
13186 sizeof(struct lsa_OpenPolicy2
),
13187 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenPolicy2
,
13188 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenPolicy2
,
13189 (ndr_print_function_t
) ndr_print_lsa_OpenPolicy2
,
13194 sizeof(struct lsa_GetUserName
),
13195 (ndr_push_flags_fn_t
) ndr_push_lsa_GetUserName
,
13196 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetUserName
,
13197 (ndr_print_function_t
) ndr_print_lsa_GetUserName
,
13201 "lsa_QueryInfoPolicy2",
13202 sizeof(struct lsa_QueryInfoPolicy2
),
13203 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryInfoPolicy2
,
13204 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryInfoPolicy2
,
13205 (ndr_print_function_t
) ndr_print_lsa_QueryInfoPolicy2
,
13209 "lsa_SetInfoPolicy2",
13210 sizeof(struct lsa_SetInfoPolicy2
),
13211 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInfoPolicy2
,
13212 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInfoPolicy2
,
13213 (ndr_print_function_t
) ndr_print_lsa_SetInfoPolicy2
,
13217 "lsa_QueryTrustedDomainInfoByName",
13218 sizeof(struct lsa_QueryTrustedDomainInfoByName
),
13219 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfoByName
,
13220 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfoByName
,
13221 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfoByName
,
13225 "lsa_SetTrustedDomainInfoByName",
13226 sizeof(struct lsa_SetTrustedDomainInfoByName
),
13227 (ndr_push_flags_fn_t
) ndr_push_lsa_SetTrustedDomainInfoByName
,
13228 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetTrustedDomainInfoByName
,
13229 (ndr_print_function_t
) ndr_print_lsa_SetTrustedDomainInfoByName
,
13233 "lsa_EnumTrustedDomainsEx",
13234 sizeof(struct lsa_EnumTrustedDomainsEx
),
13235 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumTrustedDomainsEx
,
13236 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumTrustedDomainsEx
,
13237 (ndr_print_function_t
) ndr_print_lsa_EnumTrustedDomainsEx
,
13241 "lsa_CreateTrustedDomainEx",
13242 sizeof(struct lsa_CreateTrustedDomainEx
),
13243 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomainEx
,
13244 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomainEx
,
13245 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomainEx
,
13249 "lsa_CloseTrustedDomainEx",
13250 sizeof(struct lsa_CloseTrustedDomainEx
),
13251 (ndr_push_flags_fn_t
) ndr_push_lsa_CloseTrustedDomainEx
,
13252 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CloseTrustedDomainEx
,
13253 (ndr_print_function_t
) ndr_print_lsa_CloseTrustedDomainEx
,
13257 "lsa_QueryDomainInformationPolicy",
13258 sizeof(struct lsa_QueryDomainInformationPolicy
),
13259 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryDomainInformationPolicy
,
13260 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryDomainInformationPolicy
,
13261 (ndr_print_function_t
) ndr_print_lsa_QueryDomainInformationPolicy
,
13265 "lsa_SetDomainInformationPolicy",
13266 sizeof(struct lsa_SetDomainInformationPolicy
),
13267 (ndr_push_flags_fn_t
) ndr_push_lsa_SetDomainInformationPolicy
,
13268 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetDomainInformationPolicy
,
13269 (ndr_print_function_t
) ndr_print_lsa_SetDomainInformationPolicy
,
13273 "lsa_OpenTrustedDomainByName",
13274 sizeof(struct lsa_OpenTrustedDomainByName
),
13275 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenTrustedDomainByName
,
13276 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenTrustedDomainByName
,
13277 (ndr_print_function_t
) ndr_print_lsa_OpenTrustedDomainByName
,
13282 sizeof(struct lsa_TestCall
),
13283 (ndr_push_flags_fn_t
) ndr_push_lsa_TestCall
,
13284 (ndr_pull_flags_fn_t
) ndr_pull_lsa_TestCall
,
13285 (ndr_print_function_t
) ndr_print_lsa_TestCall
,
13290 sizeof(struct lsa_LookupSids2
),
13291 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids2
,
13292 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids2
,
13293 (ndr_print_function_t
) ndr_print_lsa_LookupSids2
,
13297 "lsa_LookupNames2",
13298 sizeof(struct lsa_LookupNames2
),
13299 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames2
,
13300 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames2
,
13301 (ndr_print_function_t
) ndr_print_lsa_LookupNames2
,
13305 "lsa_CreateTrustedDomainEx2",
13306 sizeof(struct lsa_CreateTrustedDomainEx2
),
13307 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomainEx2
,
13308 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomainEx2
,
13309 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomainEx2
,
13314 sizeof(struct lsa_CREDRWRITE
),
13315 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRWRITE
,
13316 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRWRITE
,
13317 (ndr_print_function_t
) ndr_print_lsa_CREDRWRITE
,
13322 sizeof(struct lsa_CREDRREAD
),
13323 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRREAD
,
13324 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRREAD
,
13325 (ndr_print_function_t
) ndr_print_lsa_CREDRREAD
,
13329 "lsa_CREDRENUMERATE",
13330 sizeof(struct lsa_CREDRENUMERATE
),
13331 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRENUMERATE
,
13332 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRENUMERATE
,
13333 (ndr_print_function_t
) ndr_print_lsa_CREDRENUMERATE
,
13337 "lsa_CREDRWRITEDOMAINCREDENTIALS",
13338 sizeof(struct lsa_CREDRWRITEDOMAINCREDENTIALS
),
13339 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13340 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13341 (ndr_print_function_t
) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13345 "lsa_CREDRREADDOMAINCREDENTIALS",
13346 sizeof(struct lsa_CREDRREADDOMAINCREDENTIALS
),
13347 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS
,
13348 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS
,
13349 (ndr_print_function_t
) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS
,
13354 sizeof(struct lsa_CREDRDELETE
),
13355 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRDELETE
,
13356 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRDELETE
,
13357 (ndr_print_function_t
) ndr_print_lsa_CREDRDELETE
,
13361 "lsa_CREDRGETTARGETINFO",
13362 sizeof(struct lsa_CREDRGETTARGETINFO
),
13363 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRGETTARGETINFO
,
13364 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRGETTARGETINFO
,
13365 (ndr_print_function_t
) ndr_print_lsa_CREDRGETTARGETINFO
,
13369 "lsa_CREDRPROFILELOADED",
13370 sizeof(struct lsa_CREDRPROFILELOADED
),
13371 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRPROFILELOADED
,
13372 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRPROFILELOADED
,
13373 (ndr_print_function_t
) ndr_print_lsa_CREDRPROFILELOADED
,
13377 "lsa_LookupNames3",
13378 sizeof(struct lsa_LookupNames3
),
13379 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames3
,
13380 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames3
,
13381 (ndr_print_function_t
) ndr_print_lsa_LookupNames3
,
13385 "lsa_CREDRGETSESSIONTYPES",
13386 sizeof(struct lsa_CREDRGETSESSIONTYPES
),
13387 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRGETSESSIONTYPES
,
13388 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRGETSESSIONTYPES
,
13389 (ndr_print_function_t
) ndr_print_lsa_CREDRGETSESSIONTYPES
,
13393 "lsa_LSARREGISTERAUDITEVENT",
13394 sizeof(struct lsa_LSARREGISTERAUDITEVENT
),
13395 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARREGISTERAUDITEVENT
,
13396 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARREGISTERAUDITEVENT
,
13397 (ndr_print_function_t
) ndr_print_lsa_LSARREGISTERAUDITEVENT
,
13401 "lsa_LSARGENAUDITEVENT",
13402 sizeof(struct lsa_LSARGENAUDITEVENT
),
13403 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARGENAUDITEVENT
,
13404 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARGENAUDITEVENT
,
13405 (ndr_print_function_t
) ndr_print_lsa_LSARGENAUDITEVENT
,
13409 "lsa_LSARUNREGISTERAUDITEVENT",
13410 sizeof(struct lsa_LSARUNREGISTERAUDITEVENT
),
13411 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARUNREGISTERAUDITEVENT
,
13412 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT
,
13413 (ndr_print_function_t
) ndr_print_lsa_LSARUNREGISTERAUDITEVENT
,
13417 "lsa_lsaRQueryForestTrustInformation",
13418 sizeof(struct lsa_lsaRQueryForestTrustInformation
),
13419 (ndr_push_flags_fn_t
) ndr_push_lsa_lsaRQueryForestTrustInformation
,
13420 (ndr_pull_flags_fn_t
) ndr_pull_lsa_lsaRQueryForestTrustInformation
,
13421 (ndr_print_function_t
) ndr_print_lsa_lsaRQueryForestTrustInformation
,
13425 "lsa_LSARSETFORESTTRUSTINFORMATION",
13426 sizeof(struct lsa_LSARSETFORESTTRUSTINFORMATION
),
13427 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION
,
13428 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION
,
13429 (ndr_print_function_t
) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION
,
13434 sizeof(struct lsa_CREDRRENAME
),
13435 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRRENAME
,
13436 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRRENAME
,
13437 (ndr_print_function_t
) ndr_print_lsa_CREDRRENAME
,
13442 sizeof(struct lsa_LookupSids3
),
13443 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids3
,
13444 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids3
,
13445 (ndr_print_function_t
) ndr_print_lsa_LookupSids3
,
13449 "lsa_LookupNames4",
13450 sizeof(struct lsa_LookupNames4
),
13451 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames4
,
13452 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames4
,
13453 (ndr_print_function_t
) ndr_print_lsa_LookupNames4
,
13457 "lsa_LSAROPENPOLICYSCE",
13458 sizeof(struct lsa_LSAROPENPOLICYSCE
),
13459 (ndr_push_flags_fn_t
) ndr_push_lsa_LSAROPENPOLICYSCE
,
13460 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSAROPENPOLICYSCE
,
13461 (ndr_print_function_t
) ndr_print_lsa_LSAROPENPOLICYSCE
,
13465 "lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
13466 sizeof(struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
),
13467 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13468 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13469 (ndr_print_function_t
) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13473 "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
13474 sizeof(struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
),
13475 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13476 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13477 (ndr_print_function_t
) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13481 "lsa_LSARADTREPORTSECURITYEVENT",
13482 sizeof(struct lsa_LSARADTREPORTSECURITYEVENT
),
13483 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTREPORTSECURITYEVENT
,
13484 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT
,
13485 (ndr_print_function_t
) ndr_print_lsa_LSARADTREPORTSECURITYEVENT
,
13488 { NULL
, 0, NULL
, NULL
, NULL
, false }
13491 static const char * const lsarpc_endpoint_strings
[] = {
13492 "ncacn_np:[\\pipe\\lsarpc]",
13493 "ncacn_np:[\\pipe\\netlogon]",
13494 "ncacn_np:[\\pipe\\lsass]",
13499 static const struct ndr_interface_string_array lsarpc_endpoints
= {
13501 .names
= lsarpc_endpoint_strings
13504 static const char * const lsarpc_authservice_strings
[] = {
13508 static const struct ndr_interface_string_array lsarpc_authservices
= {
13510 .names
= lsarpc_authservice_strings
13514 const struct ndr_interface_table ndr_table_lsarpc
= {
13517 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
13520 .helpstring
= NDR_LSARPC_HELPSTRING
,
13522 .calls
= lsarpc_calls
,
13523 .endpoints
= &lsarpc_endpoints
,
13524 .authservices
= &lsarpc_authservices