1 /* parser auto-generated by pidl */
4 #include "librpc/gen_ndr/ndr_wbint.h"
6 #include "librpc/gen_ndr/ndr_lsa.h"
7 _PUBLIC_ enum ndr_err_code ndr_push_wbint_userinfo(struct ndr_push *ndr, int ndr_flags, const struct wbint_userinfo *r)
9 if (ndr_flags & NDR_SCALARS) {
10 NDR_CHECK(ndr_push_align(ndr, 8));
11 NDR_CHECK(ndr_push_unique_ptr(ndr, r->acct_name));
12 NDR_CHECK(ndr_push_unique_ptr(ndr, r->full_name));
13 NDR_CHECK(ndr_push_unique_ptr(ndr, r->homedir));
14 NDR_CHECK(ndr_push_unique_ptr(ndr, r->shell));
15 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->primary_gid));
16 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->user_sid));
17 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->group_sid));
18 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
20 if (ndr_flags & NDR_BUFFERS) {
22 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->acct_name, CH_UTF8)));
23 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->acct_name, CH_UTF8)));
25 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->acct_name, ndr_charset_length(r->acct_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
28 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->full_name, CH_UTF8)));
29 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
30 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->full_name, CH_UTF8)));
31 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->full_name, ndr_charset_length(r->full_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
34 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
35 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
36 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
37 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->homedir, ndr_charset_length(r->homedir, CH_UTF8), sizeof(uint8_t), CH_UTF8));
40 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
41 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
42 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
43 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->shell, ndr_charset_length(r->shell, CH_UTF8), sizeof(uint8_t), CH_UTF8));
46 return NDR_ERR_SUCCESS;
49 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_userinfo(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfo *r)
51 uint32_t _ptr_acct_name;
52 TALLOC_CTX *_mem_save_acct_name_0;
53 uint32_t _ptr_full_name;
54 TALLOC_CTX *_mem_save_full_name_0;
55 uint32_t _ptr_homedir;
56 TALLOC_CTX *_mem_save_homedir_0;
58 TALLOC_CTX *_mem_save_shell_0;
59 if (ndr_flags & NDR_SCALARS) {
60 NDR_CHECK(ndr_pull_align(ndr, 8));
61 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_acct_name));
63 NDR_PULL_ALLOC(ndr, r->acct_name);
67 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_full_name));
69 NDR_PULL_ALLOC(ndr, r->full_name);
73 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_homedir));
75 NDR_PULL_ALLOC(ndr, r->homedir);
79 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_shell));
81 NDR_PULL_ALLOC(ndr, r->shell);
85 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->primary_gid));
86 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->user_sid));
87 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->group_sid));
88 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
90 if (ndr_flags & NDR_BUFFERS) {
92 _mem_save_acct_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
93 NDR_PULL_SET_MEM_CTX(ndr, r->acct_name, 0);
94 NDR_CHECK(ndr_pull_array_size(ndr, &r->acct_name));
95 NDR_CHECK(ndr_pull_array_length(ndr, &r->acct_name));
96 if (ndr_get_array_length(ndr, &r->acct_name) > ndr_get_array_size(ndr, &r->acct_name)) {
97 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->acct_name), ndr_get_array_length(ndr, &r->acct_name));
99 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->acct_name), sizeof(uint8_t)));
100 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->acct_name, ndr_get_array_length(ndr, &r->acct_name), sizeof(uint8_t), CH_UTF8));
101 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_name_0, 0);
104 _mem_save_full_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
105 NDR_PULL_SET_MEM_CTX(ndr, r->full_name, 0);
106 NDR_CHECK(ndr_pull_array_size(ndr, &r->full_name));
107 NDR_CHECK(ndr_pull_array_length(ndr, &r->full_name));
108 if (ndr_get_array_length(ndr, &r->full_name) > ndr_get_array_size(ndr, &r->full_name)) {
109 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->full_name), ndr_get_array_length(ndr, &r->full_name));
111 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->full_name), sizeof(uint8_t)));
112 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->full_name, ndr_get_array_length(ndr, &r->full_name), sizeof(uint8_t), CH_UTF8));
113 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_full_name_0, 0);
116 _mem_save_homedir_0 = NDR_PULL_GET_MEM_CTX(ndr);
117 NDR_PULL_SET_MEM_CTX(ndr, r->homedir, 0);
118 NDR_CHECK(ndr_pull_array_size(ndr, &r->homedir));
119 NDR_CHECK(ndr_pull_array_length(ndr, &r->homedir));
120 if (ndr_get_array_length(ndr, &r->homedir) > ndr_get_array_size(ndr, &r->homedir)) {
121 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->homedir), ndr_get_array_length(ndr, &r->homedir));
123 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t)));
124 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->homedir, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t), CH_UTF8));
125 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_homedir_0, 0);
128 _mem_save_shell_0 = NDR_PULL_GET_MEM_CTX(ndr);
129 NDR_PULL_SET_MEM_CTX(ndr, r->shell, 0);
130 NDR_CHECK(ndr_pull_array_size(ndr, &r->shell));
131 NDR_CHECK(ndr_pull_array_length(ndr, &r->shell));
132 if (ndr_get_array_length(ndr, &r->shell) > ndr_get_array_size(ndr, &r->shell)) {
133 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->shell), ndr_get_array_length(ndr, &r->shell));
135 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t)));
136 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->shell, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t), CH_UTF8));
137 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_shell_0, 0);
140 return NDR_ERR_SUCCESS;
143 _PUBLIC_ void ndr_print_wbint_userinfo(struct ndr_print *ndr, const char *name, const struct wbint_userinfo *r)
145 ndr_print_struct(ndr, name, "wbint_userinfo");
147 ndr_print_ptr(ndr, "acct_name", r->acct_name);
150 ndr_print_string(ndr, "acct_name", r->acct_name);
153 ndr_print_ptr(ndr, "full_name", r->full_name);
156 ndr_print_string(ndr, "full_name", r->full_name);
159 ndr_print_ptr(ndr, "homedir", r->homedir);
162 ndr_print_string(ndr, "homedir", r->homedir);
165 ndr_print_ptr(ndr, "shell", r->shell);
168 ndr_print_string(ndr, "shell", r->shell);
171 ndr_print_hyper(ndr, "primary_gid", r->primary_gid);
172 ndr_print_dom_sid(ndr, "user_sid", &r->user_sid);
173 ndr_print_dom_sid(ndr, "group_sid", &r->group_sid);
177 _PUBLIC_ enum ndr_err_code ndr_push_wbint_SidArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_SidArray *r)
179 uint32_t cntr_sids_0;
180 if (ndr_flags & NDR_SCALARS) {
181 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
182 NDR_CHECK(ndr_push_align(ndr, 4));
183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
184 for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) {
185 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
187 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
189 if (ndr_flags & NDR_BUFFERS) {
191 return NDR_ERR_SUCCESS;
194 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_SidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_SidArray *r)
196 uint32_t cntr_sids_0;
197 TALLOC_CTX *_mem_save_sids_0;
198 if (ndr_flags & NDR_SCALARS) {
199 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
200 NDR_CHECK(ndr_pull_align(ndr, 4));
201 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
202 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
203 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
204 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
205 for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) {
206 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
208 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
210 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
212 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
214 if (ndr_flags & NDR_BUFFERS) {
216 return NDR_ERR_SUCCESS;
219 _PUBLIC_ void ndr_print_wbint_SidArray(struct ndr_print *ndr, const char *name, const struct wbint_SidArray *r)
221 uint32_t cntr_sids_0;
222 ndr_print_struct(ndr, name, "wbint_SidArray");
224 ndr_print_uint32(ndr, "num_sids", r->num_sids);
225 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
227 for (cntr_sids_0=0;cntr_sids_0<r->num_sids;cntr_sids_0++) {
229 if (asprintf(&idx_0, "[%d]", cntr_sids_0) != -1) {
230 ndr_print_dom_sid(ndr, "sids", &r->sids[cntr_sids_0]);
238 _PUBLIC_ enum ndr_err_code ndr_push_wbint_RidArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_RidArray *r)
240 uint32_t cntr_rids_0;
241 if (ndr_flags & NDR_SCALARS) {
242 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
243 NDR_CHECK(ndr_push_align(ndr, 4));
244 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
245 for (cntr_rids_0 = 0; cntr_rids_0 < r->num_rids; cntr_rids_0++) {
246 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_0]));
248 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
250 if (ndr_flags & NDR_BUFFERS) {
252 return NDR_ERR_SUCCESS;
255 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_RidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_RidArray *r)
257 uint32_t cntr_rids_0;
258 TALLOC_CTX *_mem_save_rids_0;
259 if (ndr_flags & NDR_SCALARS) {
260 NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
261 NDR_CHECK(ndr_pull_align(ndr, 4));
262 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_rids));
263 NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
264 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
265 NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
266 for (cntr_rids_0 = 0; cntr_rids_0 < r->num_rids; cntr_rids_0++) {
267 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_0]));
269 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
271 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->num_rids));
273 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
275 if (ndr_flags & NDR_BUFFERS) {
277 return NDR_ERR_SUCCESS;
280 _PUBLIC_ void ndr_print_wbint_RidArray(struct ndr_print *ndr, const char *name, const struct wbint_RidArray *r)
282 uint32_t cntr_rids_0;
283 ndr_print_struct(ndr, name, "wbint_RidArray");
285 ndr_print_uint32(ndr, "num_rids", r->num_rids);
286 ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->num_rids);
288 for (cntr_rids_0=0;cntr_rids_0<r->num_rids;cntr_rids_0++) {
290 if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
291 ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_0]);
299 _PUBLIC_ enum ndr_err_code ndr_push_wbint_Principal(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principal *r)
301 if (ndr_flags & NDR_SCALARS) {
302 NDR_CHECK(ndr_push_align(ndr, 5));
303 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
304 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->type));
305 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
306 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
308 if (ndr_flags & NDR_BUFFERS) {
310 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
311 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
312 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
313 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
316 return NDR_ERR_SUCCESS;
319 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principal(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principal *r)
322 TALLOC_CTX *_mem_save_name_0;
323 if (ndr_flags & NDR_SCALARS) {
324 NDR_CHECK(ndr_pull_align(ndr, 5));
325 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sid));
326 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->type));
327 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
329 NDR_PULL_ALLOC(ndr, r->name);
333 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
335 if (ndr_flags & NDR_BUFFERS) {
337 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
338 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
339 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
340 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
341 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
342 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
344 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint8_t)));
345 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint8_t), CH_UTF8));
346 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
349 return NDR_ERR_SUCCESS;
352 _PUBLIC_ void ndr_print_wbint_Principal(struct ndr_print *ndr, const char *name, const struct wbint_Principal *r)
354 ndr_print_struct(ndr, name, "wbint_Principal");
356 ndr_print_dom_sid(ndr, "sid", &r->sid);
357 ndr_print_lsa_SidType(ndr, "type", r->type);
358 ndr_print_ptr(ndr, "name", r->name);
361 ndr_print_string(ndr, "name", r->name);
367 _PUBLIC_ enum ndr_err_code ndr_push_wbint_Principals(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principals *r)
369 uint32_t cntr_principals_0;
370 if (ndr_flags & NDR_SCALARS) {
371 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_principals));
372 NDR_CHECK(ndr_push_align(ndr, 5));
373 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->num_principals));
374 for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
375 NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_SCALARS, &r->principals[cntr_principals_0]));
377 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
379 if (ndr_flags & NDR_BUFFERS) {
380 for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
381 NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_BUFFERS, &r->principals[cntr_principals_0]));
384 return NDR_ERR_SUCCESS;
387 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principals(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principals *r)
389 uint32_t cntr_principals_0;
390 TALLOC_CTX *_mem_save_principals_0;
391 if (ndr_flags & NDR_SCALARS) {
392 NDR_CHECK(ndr_pull_array_size(ndr, &r->principals));
393 NDR_CHECK(ndr_pull_align(ndr, 5));
394 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->num_principals));
395 NDR_PULL_ALLOC_N(ndr, r->principals, ndr_get_array_size(ndr, &r->principals));
396 _mem_save_principals_0 = NDR_PULL_GET_MEM_CTX(ndr);
397 NDR_PULL_SET_MEM_CTX(ndr, r->principals, 0);
398 for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
399 NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_SCALARS, &r->principals[cntr_principals_0]));
401 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_principals_0, 0);
403 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->principals, r->num_principals));
405 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
407 if (ndr_flags & NDR_BUFFERS) {
408 _mem_save_principals_0 = NDR_PULL_GET_MEM_CTX(ndr);
409 NDR_PULL_SET_MEM_CTX(ndr, r->principals, 0);
410 for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
411 NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_BUFFERS, &r->principals[cntr_principals_0]));
413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_principals_0, 0);
415 return NDR_ERR_SUCCESS;
418 _PUBLIC_ void ndr_print_wbint_Principals(struct ndr_print *ndr, const char *name, const struct wbint_Principals *r)
420 uint32_t cntr_principals_0;
421 ndr_print_struct(ndr, name, "wbint_Principals");
423 ndr_print_int32(ndr, "num_principals", r->num_principals);
424 ndr->print(ndr, "%s: ARRAY(%d)", "principals", (int)r->num_principals);
426 for (cntr_principals_0=0;cntr_principals_0<r->num_principals;cntr_principals_0++) {
428 if (asprintf(&idx_0, "[%d]", cntr_principals_0) != -1) {
429 ndr_print_wbint_Principal(ndr, "principals", &r->principals[cntr_principals_0]);
437 _PUBLIC_ enum ndr_err_code ndr_push_wbint_userinfos(struct ndr_push *ndr, int ndr_flags, const struct wbint_userinfos *r)
439 uint32_t cntr_userinfos_0;
440 if (ndr_flags & NDR_SCALARS) {
441 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_userinfos));
442 NDR_CHECK(ndr_push_align(ndr, 8));
443 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_userinfos));
444 for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
445 NDR_CHECK(ndr_push_wbint_userinfo(ndr, NDR_SCALARS, &r->userinfos[cntr_userinfos_0]));
447 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
449 if (ndr_flags & NDR_BUFFERS) {
450 for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
451 NDR_CHECK(ndr_push_wbint_userinfo(ndr, NDR_BUFFERS, &r->userinfos[cntr_userinfos_0]));
454 return NDR_ERR_SUCCESS;
457 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_userinfos(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfos *r)
459 uint32_t cntr_userinfos_0;
460 TALLOC_CTX *_mem_save_userinfos_0;
461 if (ndr_flags & NDR_SCALARS) {
462 NDR_CHECK(ndr_pull_array_size(ndr, &r->userinfos));
463 NDR_CHECK(ndr_pull_align(ndr, 8));
464 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_userinfos));
465 NDR_PULL_ALLOC_N(ndr, r->userinfos, ndr_get_array_size(ndr, &r->userinfos));
466 _mem_save_userinfos_0 = NDR_PULL_GET_MEM_CTX(ndr);
467 NDR_PULL_SET_MEM_CTX(ndr, r->userinfos, 0);
468 for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
469 NDR_CHECK(ndr_pull_wbint_userinfo(ndr, NDR_SCALARS, &r->userinfos[cntr_userinfos_0]));
471 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userinfos_0, 0);
473 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->userinfos, r->num_userinfos));
475 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
477 if (ndr_flags & NDR_BUFFERS) {
478 _mem_save_userinfos_0 = NDR_PULL_GET_MEM_CTX(ndr);
479 NDR_PULL_SET_MEM_CTX(ndr, r->userinfos, 0);
480 for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
481 NDR_CHECK(ndr_pull_wbint_userinfo(ndr, NDR_BUFFERS, &r->userinfos[cntr_userinfos_0]));
483 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userinfos_0, 0);
485 return NDR_ERR_SUCCESS;
488 _PUBLIC_ void ndr_print_wbint_userinfos(struct ndr_print *ndr, const char *name, const struct wbint_userinfos *r)
490 uint32_t cntr_userinfos_0;
491 ndr_print_struct(ndr, name, "wbint_userinfos");
493 ndr_print_uint32(ndr, "num_userinfos", r->num_userinfos);
494 ndr->print(ndr, "%s: ARRAY(%d)", "userinfos", (int)r->num_userinfos);
496 for (cntr_userinfos_0=0;cntr_userinfos_0<r->num_userinfos;cntr_userinfos_0++) {
498 if (asprintf(&idx_0, "[%d]", cntr_userinfos_0) != -1) {
499 ndr_print_wbint_userinfo(ndr, "userinfos", &r->userinfos[cntr_userinfos_0]);
507 _PUBLIC_ enum ndr_err_code ndr_push_wbint_IdType(struct ndr_push *ndr, int ndr_flags, enum wbint_IdType r)
509 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
510 return NDR_ERR_SUCCESS;
513 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_IdType(struct ndr_pull *ndr, int ndr_flags, enum wbint_IdType *r)
516 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
518 return NDR_ERR_SUCCESS;
521 _PUBLIC_ void ndr_print_wbint_IdType(struct ndr_print *ndr, const char *name, enum wbint_IdType r)
523 const char *val = NULL;
526 case WBINT_ID_TYPE_NOT_SPECIFIED: val = "WBINT_ID_TYPE_NOT_SPECIFIED"; break;
527 case WBINT_ID_TYPE_UID: val = "WBINT_ID_TYPE_UID"; break;
528 case WBINT_ID_TYPE_GID: val = "WBINT_ID_TYPE_GID"; break;
530 ndr_print_enum(ndr, name, "ENUM", val, r);
533 static enum ndr_err_code ndr_push_wbint_Ping(struct ndr_push *ndr, int flags, const struct wbint_Ping *r)
535 if (flags & NDR_IN) {
536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data));
538 if (flags & NDR_OUT) {
539 if (r->out.out_data == NULL) {
540 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.out_data));
544 return NDR_ERR_SUCCESS;
547 static enum ndr_err_code ndr_pull_wbint_Ping(struct ndr_pull *ndr, int flags, struct wbint_Ping *r)
549 TALLOC_CTX *_mem_save_out_data_0;
550 if (flags & NDR_IN) {
553 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.in_data));
554 NDR_PULL_ALLOC(ndr, r->out.out_data);
555 ZERO_STRUCTP(r->out.out_data);
557 if (flags & NDR_OUT) {
558 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
559 NDR_PULL_ALLOC(ndr, r->out.out_data);
561 _mem_save_out_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
562 NDR_PULL_SET_MEM_CTX(ndr, r->out.out_data, LIBNDR_FLAG_REF_ALLOC);
563 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.out_data));
564 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_data_0, LIBNDR_FLAG_REF_ALLOC);
566 return NDR_ERR_SUCCESS;
569 _PUBLIC_ void ndr_print_wbint_Ping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Ping *r)
571 ndr_print_struct(ndr, name, "wbint_Ping");
573 if (flags & NDR_SET_VALUES) {
574 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
576 if (flags & NDR_IN) {
577 ndr_print_struct(ndr, "in", "wbint_Ping");
579 ndr_print_uint32(ndr, "in_data", r->in.in_data);
582 if (flags & NDR_OUT) {
583 ndr_print_struct(ndr, "out", "wbint_Ping");
585 ndr_print_ptr(ndr, "out_data", r->out.out_data);
587 ndr_print_uint32(ndr, "out_data", *r->out.out_data);
594 static enum ndr_err_code ndr_push_wbint_LookupSid(struct ndr_push *ndr, int flags, const struct wbint_LookupSid *r)
596 if (flags & NDR_IN) {
597 if (r->in.sid == NULL) {
598 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
600 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
602 if (flags & NDR_OUT) {
603 if (r->out.type == NULL) {
604 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
606 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, *r->out.type));
607 if (r->out.domain == NULL) {
608 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
610 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domain));
611 if (*r->out.domain) {
612 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.domain, CH_UTF8)));
613 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
614 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.domain, CH_UTF8)));
615 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.domain, ndr_charset_length(*r->out.domain, CH_UTF8), sizeof(uint8_t), CH_UTF8));
617 if (r->out.name == NULL) {
618 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
620 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name));
622 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name, CH_UTF8)));
623 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
624 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name, CH_UTF8)));
625 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.name, ndr_charset_length(*r->out.name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
627 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
629 return NDR_ERR_SUCCESS;
632 static enum ndr_err_code ndr_pull_wbint_LookupSid(struct ndr_pull *ndr, int flags, struct wbint_LookupSid *r)
634 uint32_t _ptr_domain;
636 TALLOC_CTX *_mem_save_sid_0;
637 TALLOC_CTX *_mem_save_type_0;
638 TALLOC_CTX *_mem_save_domain_0;
639 TALLOC_CTX *_mem_save_domain_1;
640 TALLOC_CTX *_mem_save_name_0;
641 TALLOC_CTX *_mem_save_name_1;
642 if (flags & NDR_IN) {
645 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
646 NDR_PULL_ALLOC(ndr, r->in.sid);
648 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
649 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
650 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
651 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
652 NDR_PULL_ALLOC(ndr, r->out.type);
653 ZERO_STRUCTP(r->out.type);
654 NDR_PULL_ALLOC(ndr, r->out.domain);
655 ZERO_STRUCTP(r->out.domain);
656 NDR_PULL_ALLOC(ndr, r->out.name);
657 ZERO_STRUCTP(r->out.name);
659 if (flags & NDR_OUT) {
660 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
661 NDR_PULL_ALLOC(ndr, r->out.type);
663 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
664 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
665 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, r->out.type));
666 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
667 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
668 NDR_PULL_ALLOC(ndr, r->out.domain);
670 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
671 NDR_PULL_SET_MEM_CTX(ndr, r->out.domain, LIBNDR_FLAG_REF_ALLOC);
672 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
674 NDR_PULL_ALLOC(ndr, *r->out.domain);
676 *r->out.domain = NULL;
678 if (*r->out.domain) {
679 _mem_save_domain_1 = NDR_PULL_GET_MEM_CTX(ndr);
680 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domain, 0);
681 NDR_CHECK(ndr_pull_array_size(ndr, r->out.domain));
682 NDR_CHECK(ndr_pull_array_length(ndr, r->out.domain));
683 if (ndr_get_array_length(ndr, r->out.domain) > ndr_get_array_size(ndr, r->out.domain)) {
684 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.domain), ndr_get_array_length(ndr, r->out.domain));
686 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.domain), sizeof(uint8_t)));
687 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.domain, ndr_get_array_length(ndr, r->out.domain), sizeof(uint8_t), CH_UTF8));
688 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_1, 0);
690 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, LIBNDR_FLAG_REF_ALLOC);
691 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
692 NDR_PULL_ALLOC(ndr, r->out.name);
694 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
695 NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
696 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
698 NDR_PULL_ALLOC(ndr, *r->out.name);
703 _mem_save_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
704 NDR_PULL_SET_MEM_CTX(ndr, *r->out.name, 0);
705 NDR_CHECK(ndr_pull_array_size(ndr, r->out.name));
706 NDR_CHECK(ndr_pull_array_length(ndr, r->out.name));
707 if (ndr_get_array_length(ndr, r->out.name) > ndr_get_array_size(ndr, r->out.name)) {
708 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.name), ndr_get_array_length(ndr, r->out.name));
710 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.name), sizeof(uint8_t)));
711 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.name, ndr_get_array_length(ndr, r->out.name), sizeof(uint8_t), CH_UTF8));
712 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_1, 0);
714 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
715 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
717 return NDR_ERR_SUCCESS;
720 _PUBLIC_ void ndr_print_wbint_LookupSid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSid *r)
722 ndr_print_struct(ndr, name, "wbint_LookupSid");
724 if (flags & NDR_SET_VALUES) {
725 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
727 if (flags & NDR_IN) {
728 ndr_print_struct(ndr, "in", "wbint_LookupSid");
730 ndr_print_ptr(ndr, "sid", r->in.sid);
732 ndr_print_dom_sid(ndr, "sid", r->in.sid);
736 if (flags & NDR_OUT) {
737 ndr_print_struct(ndr, "out", "wbint_LookupSid");
739 ndr_print_ptr(ndr, "type", r->out.type);
741 ndr_print_lsa_SidType(ndr, "type", *r->out.type);
743 ndr_print_ptr(ndr, "domain", r->out.domain);
745 ndr_print_ptr(ndr, "domain", *r->out.domain);
747 if (*r->out.domain) {
748 ndr_print_string(ndr, "domain", *r->out.domain);
752 ndr_print_ptr(ndr, "name", r->out.name);
754 ndr_print_ptr(ndr, "name", *r->out.name);
757 ndr_print_string(ndr, "name", *r->out.name);
761 ndr_print_NTSTATUS(ndr, "result", r->out.result);
767 static enum ndr_err_code ndr_push_wbint_LookupName(struct ndr_push *ndr, int flags, const struct wbint_LookupName *r)
769 if (flags & NDR_IN) {
770 if (r->in.domain == NULL) {
771 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
773 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF8)));
774 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
775 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF8)));
776 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain, ndr_charset_length(r->in.domain, CH_UTF8), sizeof(uint8_t), CH_UTF8));
777 if (r->in.name == NULL) {
778 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
780 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF8)));
781 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
782 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF8)));
783 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
786 if (flags & NDR_OUT) {
787 if (r->out.type == NULL) {
788 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
790 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, *r->out.type));
791 if (r->out.sid == NULL) {
792 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
794 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
795 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
797 return NDR_ERR_SUCCESS;
800 static enum ndr_err_code ndr_pull_wbint_LookupName(struct ndr_pull *ndr, int flags, struct wbint_LookupName *r)
802 TALLOC_CTX *_mem_save_type_0;
803 TALLOC_CTX *_mem_save_sid_0;
804 if (flags & NDR_IN) {
807 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain));
808 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain));
809 if (ndr_get_array_length(ndr, &r->in.domain) > ndr_get_array_size(ndr, &r->in.domain)) {
810 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.domain), ndr_get_array_length(ndr, &r->in.domain));
812 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t)));
813 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t), CH_UTF8));
814 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
815 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
816 if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) {
817 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.name), ndr_get_array_length(ndr, &r->in.name));
819 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint8_t)));
820 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint8_t), CH_UTF8));
821 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
822 NDR_PULL_ALLOC(ndr, r->out.type);
823 ZERO_STRUCTP(r->out.type);
824 NDR_PULL_ALLOC(ndr, r->out.sid);
825 ZERO_STRUCTP(r->out.sid);
827 if (flags & NDR_OUT) {
828 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
829 NDR_PULL_ALLOC(ndr, r->out.type);
831 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
832 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
833 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, r->out.type));
834 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
835 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
836 NDR_PULL_ALLOC(ndr, r->out.sid);
838 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
839 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
840 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
841 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
842 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
844 return NDR_ERR_SUCCESS;
847 _PUBLIC_ void ndr_print_wbint_LookupName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupName *r)
849 ndr_print_struct(ndr, name, "wbint_LookupName");
851 if (flags & NDR_SET_VALUES) {
852 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
854 if (flags & NDR_IN) {
855 ndr_print_struct(ndr, "in", "wbint_LookupName");
857 ndr_print_ptr(ndr, "domain", r->in.domain);
859 ndr_print_string(ndr, "domain", r->in.domain);
861 ndr_print_ptr(ndr, "name", r->in.name);
863 ndr_print_string(ndr, "name", r->in.name);
865 ndr_print_uint32(ndr, "flags", r->in.flags);
868 if (flags & NDR_OUT) {
869 ndr_print_struct(ndr, "out", "wbint_LookupName");
871 ndr_print_ptr(ndr, "type", r->out.type);
873 ndr_print_lsa_SidType(ndr, "type", *r->out.type);
875 ndr_print_ptr(ndr, "sid", r->out.sid);
877 ndr_print_dom_sid(ndr, "sid", r->out.sid);
879 ndr_print_NTSTATUS(ndr, "result", r->out.result);
885 static enum ndr_err_code ndr_push_wbint_Sid2Uid(struct ndr_push *ndr, int flags, const struct wbint_Sid2Uid *r)
887 if (flags & NDR_IN) {
888 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
889 if (r->in.dom_name) {
890 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
891 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
892 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
893 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dom_name, ndr_charset_length(r->in.dom_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
895 if (r->in.sid == NULL) {
896 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
898 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
900 if (flags & NDR_OUT) {
901 if (r->out.uid == NULL) {
902 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
904 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
905 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
907 return NDR_ERR_SUCCESS;
910 static enum ndr_err_code ndr_pull_wbint_Sid2Uid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Uid *r)
912 uint32_t _ptr_dom_name;
913 TALLOC_CTX *_mem_save_dom_name_0;
914 TALLOC_CTX *_mem_save_sid_0;
915 TALLOC_CTX *_mem_save_uid_0;
916 if (flags & NDR_IN) {
919 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
921 NDR_PULL_ALLOC(ndr, r->in.dom_name);
923 r->in.dom_name = NULL;
925 if (r->in.dom_name) {
926 _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
927 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
928 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
929 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
930 if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
931 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.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
933 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
934 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
935 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
937 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
938 NDR_PULL_ALLOC(ndr, r->in.sid);
940 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
941 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
942 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
943 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
944 NDR_PULL_ALLOC(ndr, r->out.uid);
945 ZERO_STRUCTP(r->out.uid);
947 if (flags & NDR_OUT) {
948 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
949 NDR_PULL_ALLOC(ndr, r->out.uid);
951 _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr);
952 NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC);
953 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid));
954 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC);
955 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
957 return NDR_ERR_SUCCESS;
960 _PUBLIC_ void ndr_print_wbint_Sid2Uid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Uid *r)
962 ndr_print_struct(ndr, name, "wbint_Sid2Uid");
964 if (flags & NDR_SET_VALUES) {
965 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
967 if (flags & NDR_IN) {
968 ndr_print_struct(ndr, "in", "wbint_Sid2Uid");
970 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
972 if (r->in.dom_name) {
973 ndr_print_string(ndr, "dom_name", r->in.dom_name);
976 ndr_print_ptr(ndr, "sid", r->in.sid);
978 ndr_print_dom_sid(ndr, "sid", r->in.sid);
982 if (flags & NDR_OUT) {
983 ndr_print_struct(ndr, "out", "wbint_Sid2Uid");
985 ndr_print_ptr(ndr, "uid", r->out.uid);
987 ndr_print_hyper(ndr, "uid", *r->out.uid);
989 ndr_print_NTSTATUS(ndr, "result", r->out.result);
995 static enum ndr_err_code ndr_push_wbint_Sid2Gid(struct ndr_push *ndr, int flags, const struct wbint_Sid2Gid *r)
997 if (flags & NDR_IN) {
998 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
999 if (r->in.dom_name) {
1000 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1001 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1002 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1003 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dom_name, ndr_charset_length(r->in.dom_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1005 if (r->in.sid == NULL) {
1006 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1008 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1010 if (flags & NDR_OUT) {
1011 if (r->out.gid == NULL) {
1012 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1014 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
1015 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1017 return NDR_ERR_SUCCESS;
1020 static enum ndr_err_code ndr_pull_wbint_Sid2Gid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Gid *r)
1022 uint32_t _ptr_dom_name;
1023 TALLOC_CTX *_mem_save_dom_name_0;
1024 TALLOC_CTX *_mem_save_sid_0;
1025 TALLOC_CTX *_mem_save_gid_0;
1026 if (flags & NDR_IN) {
1027 ZERO_STRUCT(r->out);
1029 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
1030 if (_ptr_dom_name) {
1031 NDR_PULL_ALLOC(ndr, r->in.dom_name);
1033 r->in.dom_name = NULL;
1035 if (r->in.dom_name) {
1036 _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1037 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1038 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1039 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1040 if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1041 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.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
1043 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1044 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
1045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1047 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1048 NDR_PULL_ALLOC(ndr, r->in.sid);
1050 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1051 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1052 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1053 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1054 NDR_PULL_ALLOC(ndr, r->out.gid);
1055 ZERO_STRUCTP(r->out.gid);
1057 if (flags & NDR_OUT) {
1058 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1059 NDR_PULL_ALLOC(ndr, r->out.gid);
1061 _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1062 NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC);
1063 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid));
1064 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC);
1065 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1067 return NDR_ERR_SUCCESS;
1070 _PUBLIC_ void ndr_print_wbint_Sid2Gid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Gid *r)
1072 ndr_print_struct(ndr, name, "wbint_Sid2Gid");
1074 if (flags & NDR_SET_VALUES) {
1075 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1077 if (flags & NDR_IN) {
1078 ndr_print_struct(ndr, "in", "wbint_Sid2Gid");
1080 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1082 if (r->in.dom_name) {
1083 ndr_print_string(ndr, "dom_name", r->in.dom_name);
1086 ndr_print_ptr(ndr, "sid", r->in.sid);
1088 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1092 if (flags & NDR_OUT) {
1093 ndr_print_struct(ndr, "out", "wbint_Sid2Gid");
1095 ndr_print_ptr(ndr, "gid", r->out.gid);
1097 ndr_print_hyper(ndr, "gid", *r->out.gid);
1099 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1105 static enum ndr_err_code ndr_push_wbint_Uid2Sid(struct ndr_push *ndr, int flags, const struct wbint_Uid2Sid *r)
1107 if (flags & NDR_IN) {
1108 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
1109 if (r->in.dom_name) {
1110 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1111 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1112 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1113 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dom_name, ndr_charset_length(r->in.dom_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1115 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
1117 if (flags & NDR_OUT) {
1118 if (r->out.sid == NULL) {
1119 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1121 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1122 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1124 return NDR_ERR_SUCCESS;
1127 static enum ndr_err_code ndr_pull_wbint_Uid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Uid2Sid *r)
1129 uint32_t _ptr_dom_name;
1130 TALLOC_CTX *_mem_save_dom_name_0;
1131 TALLOC_CTX *_mem_save_sid_0;
1132 if (flags & NDR_IN) {
1133 ZERO_STRUCT(r->out);
1135 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
1136 if (_ptr_dom_name) {
1137 NDR_PULL_ALLOC(ndr, r->in.dom_name);
1139 r->in.dom_name = NULL;
1141 if (r->in.dom_name) {
1142 _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1143 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1144 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1145 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1146 if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1147 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.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
1149 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1150 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
1151 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1153 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
1154 NDR_PULL_ALLOC(ndr, r->out.sid);
1155 ZERO_STRUCTP(r->out.sid);
1157 if (flags & NDR_OUT) {
1158 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1159 NDR_PULL_ALLOC(ndr, r->out.sid);
1161 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1162 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
1163 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1164 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1165 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1167 return NDR_ERR_SUCCESS;
1170 _PUBLIC_ void ndr_print_wbint_Uid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Uid2Sid *r)
1172 ndr_print_struct(ndr, name, "wbint_Uid2Sid");
1174 if (flags & NDR_SET_VALUES) {
1175 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1177 if (flags & NDR_IN) {
1178 ndr_print_struct(ndr, "in", "wbint_Uid2Sid");
1180 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1182 if (r->in.dom_name) {
1183 ndr_print_string(ndr, "dom_name", r->in.dom_name);
1186 ndr_print_hyper(ndr, "uid", r->in.uid);
1189 if (flags & NDR_OUT) {
1190 ndr_print_struct(ndr, "out", "wbint_Uid2Sid");
1192 ndr_print_ptr(ndr, "sid", r->out.sid);
1194 ndr_print_dom_sid(ndr, "sid", r->out.sid);
1196 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1202 static enum ndr_err_code ndr_push_wbint_Gid2Sid(struct ndr_push *ndr, int flags, const struct wbint_Gid2Sid *r)
1204 if (flags & NDR_IN) {
1205 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
1206 if (r->in.dom_name) {
1207 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1208 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1209 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1210 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dom_name, ndr_charset_length(r->in.dom_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1212 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
1214 if (flags & NDR_OUT) {
1215 if (r->out.sid == NULL) {
1216 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1218 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1219 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1221 return NDR_ERR_SUCCESS;
1224 static enum ndr_err_code ndr_pull_wbint_Gid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Gid2Sid *r)
1226 uint32_t _ptr_dom_name;
1227 TALLOC_CTX *_mem_save_dom_name_0;
1228 TALLOC_CTX *_mem_save_sid_0;
1229 if (flags & NDR_IN) {
1230 ZERO_STRUCT(r->out);
1232 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
1233 if (_ptr_dom_name) {
1234 NDR_PULL_ALLOC(ndr, r->in.dom_name);
1236 r->in.dom_name = NULL;
1238 if (r->in.dom_name) {
1239 _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1240 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1241 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1242 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1243 if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1244 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.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
1246 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1247 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
1248 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1250 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
1251 NDR_PULL_ALLOC(ndr, r->out.sid);
1252 ZERO_STRUCTP(r->out.sid);
1254 if (flags & NDR_OUT) {
1255 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1256 NDR_PULL_ALLOC(ndr, r->out.sid);
1258 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1259 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
1260 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1261 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1262 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1264 return NDR_ERR_SUCCESS;
1267 _PUBLIC_ void ndr_print_wbint_Gid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Gid2Sid *r)
1269 ndr_print_struct(ndr, name, "wbint_Gid2Sid");
1271 if (flags & NDR_SET_VALUES) {
1272 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1274 if (flags & NDR_IN) {
1275 ndr_print_struct(ndr, "in", "wbint_Gid2Sid");
1277 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1279 if (r->in.dom_name) {
1280 ndr_print_string(ndr, "dom_name", r->in.dom_name);
1283 ndr_print_hyper(ndr, "gid", r->in.gid);
1286 if (flags & NDR_OUT) {
1287 ndr_print_struct(ndr, "out", "wbint_Gid2Sid");
1289 ndr_print_ptr(ndr, "sid", r->out.sid);
1291 ndr_print_dom_sid(ndr, "sid", r->out.sid);
1293 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1299 static enum ndr_err_code ndr_push_wbint_AllocateUid(struct ndr_push *ndr, int flags, const struct wbint_AllocateUid *r)
1301 if (flags & NDR_IN) {
1303 if (flags & NDR_OUT) {
1304 if (r->out.uid == NULL) {
1305 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1307 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
1308 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1310 return NDR_ERR_SUCCESS;
1313 static enum ndr_err_code ndr_pull_wbint_AllocateUid(struct ndr_pull *ndr, int flags, struct wbint_AllocateUid *r)
1315 TALLOC_CTX *_mem_save_uid_0;
1316 if (flags & NDR_IN) {
1317 ZERO_STRUCT(r->out);
1319 NDR_PULL_ALLOC(ndr, r->out.uid);
1320 ZERO_STRUCTP(r->out.uid);
1322 if (flags & NDR_OUT) {
1323 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1324 NDR_PULL_ALLOC(ndr, r->out.uid);
1326 _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1327 NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC);
1328 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid));
1329 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC);
1330 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1332 return NDR_ERR_SUCCESS;
1335 _PUBLIC_ void ndr_print_wbint_AllocateUid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_AllocateUid *r)
1337 ndr_print_struct(ndr, name, "wbint_AllocateUid");
1339 if (flags & NDR_SET_VALUES) {
1340 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1342 if (flags & NDR_IN) {
1343 ndr_print_struct(ndr, "in", "wbint_AllocateUid");
1347 if (flags & NDR_OUT) {
1348 ndr_print_struct(ndr, "out", "wbint_AllocateUid");
1350 ndr_print_ptr(ndr, "uid", r->out.uid);
1352 ndr_print_hyper(ndr, "uid", *r->out.uid);
1354 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1360 static enum ndr_err_code ndr_push_wbint_AllocateGid(struct ndr_push *ndr, int flags, const struct wbint_AllocateGid *r)
1362 if (flags & NDR_IN) {
1364 if (flags & NDR_OUT) {
1365 if (r->out.gid == NULL) {
1366 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1368 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
1369 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1371 return NDR_ERR_SUCCESS;
1374 static enum ndr_err_code ndr_pull_wbint_AllocateGid(struct ndr_pull *ndr, int flags, struct wbint_AllocateGid *r)
1376 TALLOC_CTX *_mem_save_gid_0;
1377 if (flags & NDR_IN) {
1378 ZERO_STRUCT(r->out);
1380 NDR_PULL_ALLOC(ndr, r->out.gid);
1381 ZERO_STRUCTP(r->out.gid);
1383 if (flags & NDR_OUT) {
1384 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1385 NDR_PULL_ALLOC(ndr, r->out.gid);
1387 _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1388 NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC);
1389 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid));
1390 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC);
1391 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1393 return NDR_ERR_SUCCESS;
1396 _PUBLIC_ void ndr_print_wbint_AllocateGid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_AllocateGid *r)
1398 ndr_print_struct(ndr, name, "wbint_AllocateGid");
1400 if (flags & NDR_SET_VALUES) {
1401 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1403 if (flags & NDR_IN) {
1404 ndr_print_struct(ndr, "in", "wbint_AllocateGid");
1408 if (flags & NDR_OUT) {
1409 ndr_print_struct(ndr, "out", "wbint_AllocateGid");
1411 ndr_print_ptr(ndr, "gid", r->out.gid);
1413 ndr_print_hyper(ndr, "gid", *r->out.gid);
1415 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1421 static enum ndr_err_code ndr_push_wbint_QueryUser(struct ndr_push *ndr, int flags, const struct wbint_QueryUser *r)
1423 if (flags & NDR_IN) {
1424 if (r->in.sid == NULL) {
1425 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1427 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1429 if (flags & NDR_OUT) {
1430 if (r->out.info == NULL) {
1431 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1433 NDR_CHECK(ndr_push_wbint_userinfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
1434 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1436 return NDR_ERR_SUCCESS;
1439 static enum ndr_err_code ndr_pull_wbint_QueryUser(struct ndr_pull *ndr, int flags, struct wbint_QueryUser *r)
1441 TALLOC_CTX *_mem_save_sid_0;
1442 TALLOC_CTX *_mem_save_info_0;
1443 if (flags & NDR_IN) {
1444 ZERO_STRUCT(r->out);
1446 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1447 NDR_PULL_ALLOC(ndr, r->in.sid);
1449 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1450 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1451 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1453 NDR_PULL_ALLOC(ndr, r->out.info);
1454 ZERO_STRUCTP(r->out.info);
1456 if (flags & NDR_OUT) {
1457 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1458 NDR_PULL_ALLOC(ndr, r->out.info);
1460 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
1461 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
1462 NDR_CHECK(ndr_pull_wbint_userinfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
1463 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
1464 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1466 return NDR_ERR_SUCCESS;
1469 _PUBLIC_ void ndr_print_wbint_QueryUser(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryUser *r)
1471 ndr_print_struct(ndr, name, "wbint_QueryUser");
1473 if (flags & NDR_SET_VALUES) {
1474 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1476 if (flags & NDR_IN) {
1477 ndr_print_struct(ndr, "in", "wbint_QueryUser");
1479 ndr_print_ptr(ndr, "sid", r->in.sid);
1481 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1485 if (flags & NDR_OUT) {
1486 ndr_print_struct(ndr, "out", "wbint_QueryUser");
1488 ndr_print_ptr(ndr, "info", r->out.info);
1490 ndr_print_wbint_userinfo(ndr, "info", r->out.info);
1492 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1498 static enum ndr_err_code ndr_push_wbint_LookupUserAliases(struct ndr_push *ndr, int flags, const struct wbint_LookupUserAliases *r)
1500 if (flags & NDR_IN) {
1501 if (r->in.sids == NULL) {
1502 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1504 NDR_CHECK(ndr_push_wbint_SidArray(ndr, NDR_SCALARS, r->in.sids));
1506 if (flags & NDR_OUT) {
1507 if (r->out.rids == NULL) {
1508 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1510 NDR_CHECK(ndr_push_wbint_RidArray(ndr, NDR_SCALARS, r->out.rids));
1511 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1513 return NDR_ERR_SUCCESS;
1516 static enum ndr_err_code ndr_pull_wbint_LookupUserAliases(struct ndr_pull *ndr, int flags, struct wbint_LookupUserAliases *r)
1518 TALLOC_CTX *_mem_save_sids_0;
1519 TALLOC_CTX *_mem_save_rids_0;
1520 if (flags & NDR_IN) {
1521 ZERO_STRUCT(r->out);
1523 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1524 NDR_PULL_ALLOC(ndr, r->in.sids);
1526 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1527 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
1528 NDR_CHECK(ndr_pull_wbint_SidArray(ndr, NDR_SCALARS, r->in.sids));
1529 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
1530 NDR_PULL_ALLOC(ndr, r->out.rids);
1531 ZERO_STRUCTP(r->out.rids);
1533 if (flags & NDR_OUT) {
1534 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1535 NDR_PULL_ALLOC(ndr, r->out.rids);
1537 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1538 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
1539 NDR_CHECK(ndr_pull_wbint_RidArray(ndr, NDR_SCALARS, r->out.rids));
1540 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
1541 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1543 return NDR_ERR_SUCCESS;
1546 _PUBLIC_ void ndr_print_wbint_LookupUserAliases(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserAliases *r)
1548 ndr_print_struct(ndr, name, "wbint_LookupUserAliases");
1550 if (flags & NDR_SET_VALUES) {
1551 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1553 if (flags & NDR_IN) {
1554 ndr_print_struct(ndr, "in", "wbint_LookupUserAliases");
1556 ndr_print_ptr(ndr, "sids", r->in.sids);
1558 ndr_print_wbint_SidArray(ndr, "sids", r->in.sids);
1562 if (flags & NDR_OUT) {
1563 ndr_print_struct(ndr, "out", "wbint_LookupUserAliases");
1565 ndr_print_ptr(ndr, "rids", r->out.rids);
1567 ndr_print_wbint_RidArray(ndr, "rids", r->out.rids);
1569 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1575 static enum ndr_err_code ndr_push_wbint_LookupUserGroups(struct ndr_push *ndr, int flags, const struct wbint_LookupUserGroups *r)
1577 if (flags & NDR_IN) {
1578 if (r->in.sid == NULL) {
1579 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1581 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1583 if (flags & NDR_OUT) {
1584 if (r->out.sids == NULL) {
1585 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1587 NDR_CHECK(ndr_push_wbint_SidArray(ndr, NDR_SCALARS, r->out.sids));
1588 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1590 return NDR_ERR_SUCCESS;
1593 static enum ndr_err_code ndr_pull_wbint_LookupUserGroups(struct ndr_pull *ndr, int flags, struct wbint_LookupUserGroups *r)
1595 TALLOC_CTX *_mem_save_sid_0;
1596 TALLOC_CTX *_mem_save_sids_0;
1597 if (flags & NDR_IN) {
1598 ZERO_STRUCT(r->out);
1600 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1601 NDR_PULL_ALLOC(ndr, r->in.sid);
1603 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1604 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1605 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1606 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1607 NDR_PULL_ALLOC(ndr, r->out.sids);
1608 ZERO_STRUCTP(r->out.sids);
1610 if (flags & NDR_OUT) {
1611 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1612 NDR_PULL_ALLOC(ndr, r->out.sids);
1614 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1615 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
1616 NDR_CHECK(ndr_pull_wbint_SidArray(ndr, NDR_SCALARS, r->out.sids));
1617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
1618 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1620 return NDR_ERR_SUCCESS;
1623 _PUBLIC_ void ndr_print_wbint_LookupUserGroups(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserGroups *r)
1625 ndr_print_struct(ndr, name, "wbint_LookupUserGroups");
1627 if (flags & NDR_SET_VALUES) {
1628 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1630 if (flags & NDR_IN) {
1631 ndr_print_struct(ndr, "in", "wbint_LookupUserGroups");
1633 ndr_print_ptr(ndr, "sid", r->in.sid);
1635 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1639 if (flags & NDR_OUT) {
1640 ndr_print_struct(ndr, "out", "wbint_LookupUserGroups");
1642 ndr_print_ptr(ndr, "sids", r->out.sids);
1644 ndr_print_wbint_SidArray(ndr, "sids", r->out.sids);
1646 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1652 static enum ndr_err_code ndr_push_wbint_QuerySequenceNumber(struct ndr_push *ndr, int flags, const struct wbint_QuerySequenceNumber *r)
1654 if (flags & NDR_IN) {
1656 if (flags & NDR_OUT) {
1657 if (r->out.sequence == NULL) {
1658 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sequence));
1661 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1663 return NDR_ERR_SUCCESS;
1666 static enum ndr_err_code ndr_pull_wbint_QuerySequenceNumber(struct ndr_pull *ndr, int flags, struct wbint_QuerySequenceNumber *r)
1668 TALLOC_CTX *_mem_save_sequence_0;
1669 if (flags & NDR_IN) {
1670 ZERO_STRUCT(r->out);
1672 NDR_PULL_ALLOC(ndr, r->out.sequence);
1673 ZERO_STRUCTP(r->out.sequence);
1675 if (flags & NDR_OUT) {
1676 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1677 NDR_PULL_ALLOC(ndr, r->out.sequence);
1679 _mem_save_sequence_0 = NDR_PULL_GET_MEM_CTX(ndr);
1680 NDR_PULL_SET_MEM_CTX(ndr, r->out.sequence, LIBNDR_FLAG_REF_ALLOC);
1681 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sequence));
1682 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_0, LIBNDR_FLAG_REF_ALLOC);
1683 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1685 return NDR_ERR_SUCCESS;
1688 _PUBLIC_ void ndr_print_wbint_QuerySequenceNumber(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QuerySequenceNumber *r)
1690 ndr_print_struct(ndr, name, "wbint_QuerySequenceNumber");
1692 if (flags & NDR_SET_VALUES) {
1693 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1695 if (flags & NDR_IN) {
1696 ndr_print_struct(ndr, "in", "wbint_QuerySequenceNumber");
1700 if (flags & NDR_OUT) {
1701 ndr_print_struct(ndr, "out", "wbint_QuerySequenceNumber");
1703 ndr_print_ptr(ndr, "sequence", r->out.sequence);
1705 ndr_print_uint32(ndr, "sequence", *r->out.sequence);
1707 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1713 static enum ndr_err_code ndr_push_wbint_LookupGroupMembers(struct ndr_push *ndr, int flags, const struct wbint_LookupGroupMembers *r)
1715 if (flags & NDR_IN) {
1716 if (r->in.sid == NULL) {
1717 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1719 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1720 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->in.type));
1722 if (flags & NDR_OUT) {
1723 if (r->out.members == NULL) {
1724 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1726 NDR_CHECK(ndr_push_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
1727 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1729 return NDR_ERR_SUCCESS;
1732 static enum ndr_err_code ndr_pull_wbint_LookupGroupMembers(struct ndr_pull *ndr, int flags, struct wbint_LookupGroupMembers *r)
1734 TALLOC_CTX *_mem_save_sid_0;
1735 TALLOC_CTX *_mem_save_members_0;
1736 if (flags & NDR_IN) {
1737 ZERO_STRUCT(r->out);
1739 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1740 NDR_PULL_ALLOC(ndr, r->in.sid);
1742 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1743 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1744 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1745 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1746 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->in.type));
1747 NDR_PULL_ALLOC(ndr, r->out.members);
1748 ZERO_STRUCTP(r->out.members);
1750 if (flags & NDR_OUT) {
1751 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1752 NDR_PULL_ALLOC(ndr, r->out.members);
1754 _mem_save_members_0 = NDR_PULL_GET_MEM_CTX(ndr);
1755 NDR_PULL_SET_MEM_CTX(ndr, r->out.members, LIBNDR_FLAG_REF_ALLOC);
1756 NDR_CHECK(ndr_pull_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
1757 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, LIBNDR_FLAG_REF_ALLOC);
1758 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1760 return NDR_ERR_SUCCESS;
1763 _PUBLIC_ void ndr_print_wbint_LookupGroupMembers(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupGroupMembers *r)
1765 ndr_print_struct(ndr, name, "wbint_LookupGroupMembers");
1767 if (flags & NDR_SET_VALUES) {
1768 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1770 if (flags & NDR_IN) {
1771 ndr_print_struct(ndr, "in", "wbint_LookupGroupMembers");
1773 ndr_print_ptr(ndr, "sid", r->in.sid);
1775 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1777 ndr_print_lsa_SidType(ndr, "type", r->in.type);
1780 if (flags & NDR_OUT) {
1781 ndr_print_struct(ndr, "out", "wbint_LookupGroupMembers");
1783 ndr_print_ptr(ndr, "members", r->out.members);
1785 ndr_print_wbint_Principals(ndr, "members", r->out.members);
1787 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1793 static enum ndr_err_code ndr_push_wbint_QueryUserList(struct ndr_push *ndr, int flags, const struct wbint_QueryUserList *r)
1795 if (flags & NDR_IN) {
1797 if (flags & NDR_OUT) {
1798 if (r->out.users == NULL) {
1799 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1801 NDR_CHECK(ndr_push_wbint_userinfos(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.users));
1802 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1804 return NDR_ERR_SUCCESS;
1807 static enum ndr_err_code ndr_pull_wbint_QueryUserList(struct ndr_pull *ndr, int flags, struct wbint_QueryUserList *r)
1809 TALLOC_CTX *_mem_save_users_0;
1810 if (flags & NDR_IN) {
1811 ZERO_STRUCT(r->out);
1813 NDR_PULL_ALLOC(ndr, r->out.users);
1814 ZERO_STRUCTP(r->out.users);
1816 if (flags & NDR_OUT) {
1817 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1818 NDR_PULL_ALLOC(ndr, r->out.users);
1820 _mem_save_users_0 = NDR_PULL_GET_MEM_CTX(ndr);
1821 NDR_PULL_SET_MEM_CTX(ndr, r->out.users, LIBNDR_FLAG_REF_ALLOC);
1822 NDR_CHECK(ndr_pull_wbint_userinfos(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.users));
1823 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_users_0, LIBNDR_FLAG_REF_ALLOC);
1824 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1826 return NDR_ERR_SUCCESS;
1829 _PUBLIC_ void ndr_print_wbint_QueryUserList(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryUserList *r)
1831 ndr_print_struct(ndr, name, "wbint_QueryUserList");
1833 if (flags & NDR_SET_VALUES) {
1834 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1836 if (flags & NDR_IN) {
1837 ndr_print_struct(ndr, "in", "wbint_QueryUserList");
1841 if (flags & NDR_OUT) {
1842 ndr_print_struct(ndr, "out", "wbint_QueryUserList");
1844 ndr_print_ptr(ndr, "users", r->out.users);
1846 ndr_print_wbint_userinfos(ndr, "users", r->out.users);
1848 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1854 static enum ndr_err_code ndr_push_wbint_QueryGroupList(struct ndr_push *ndr, int flags, const struct wbint_QueryGroupList *r)
1856 if (flags & NDR_IN) {
1858 if (flags & NDR_OUT) {
1859 if (r->out.groups == NULL) {
1860 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1862 NDR_CHECK(ndr_push_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.groups));
1863 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1865 return NDR_ERR_SUCCESS;
1868 static enum ndr_err_code ndr_pull_wbint_QueryGroupList(struct ndr_pull *ndr, int flags, struct wbint_QueryGroupList *r)
1870 TALLOC_CTX *_mem_save_groups_0;
1871 if (flags & NDR_IN) {
1872 ZERO_STRUCT(r->out);
1874 NDR_PULL_ALLOC(ndr, r->out.groups);
1875 ZERO_STRUCTP(r->out.groups);
1877 if (flags & NDR_OUT) {
1878 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1879 NDR_PULL_ALLOC(ndr, r->out.groups);
1881 _mem_save_groups_0 = NDR_PULL_GET_MEM_CTX(ndr);
1882 NDR_PULL_SET_MEM_CTX(ndr, r->out.groups, LIBNDR_FLAG_REF_ALLOC);
1883 NDR_CHECK(ndr_pull_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.groups));
1884 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_groups_0, LIBNDR_FLAG_REF_ALLOC);
1885 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1887 return NDR_ERR_SUCCESS;
1890 _PUBLIC_ void ndr_print_wbint_QueryGroupList(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryGroupList *r)
1892 ndr_print_struct(ndr, name, "wbint_QueryGroupList");
1894 if (flags & NDR_SET_VALUES) {
1895 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1897 if (flags & NDR_IN) {
1898 ndr_print_struct(ndr, "in", "wbint_QueryGroupList");
1902 if (flags & NDR_OUT) {
1903 ndr_print_struct(ndr, "out", "wbint_QueryGroupList");
1905 ndr_print_ptr(ndr, "groups", r->out.groups);
1907 ndr_print_wbint_Principals(ndr, "groups", r->out.groups);
1909 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1915 static enum ndr_err_code ndr_push_wbint_DsGetDcName(struct ndr_push *ndr, int flags, const struct wbint_DsGetDcName *r)
1917 if (flags & NDR_IN) {
1918 if (r->in.domain_name == NULL) {
1919 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1921 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF8)));
1922 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1923 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF8)));
1924 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1925 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
1926 if (r->in.domain_guid) {
1927 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
1929 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
1930 if (r->in.site_name) {
1931 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF8)));
1932 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1933 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF8)));
1934 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
1938 if (flags & NDR_OUT) {
1939 if (r->out.dc_info == NULL) {
1940 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1942 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dc_info));
1943 if (*r->out.dc_info) {
1944 NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.dc_info));
1946 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1948 return NDR_ERR_SUCCESS;
1951 static enum ndr_err_code ndr_pull_wbint_DsGetDcName(struct ndr_pull *ndr, int flags, struct wbint_DsGetDcName *r)
1953 uint32_t _ptr_domain_guid;
1954 uint32_t _ptr_site_name;
1955 uint32_t _ptr_dc_info;
1956 TALLOC_CTX *_mem_save_domain_guid_0;
1957 TALLOC_CTX *_mem_save_site_name_0;
1958 TALLOC_CTX *_mem_save_dc_info_0;
1959 TALLOC_CTX *_mem_save_dc_info_1;
1960 if (flags & NDR_IN) {
1961 ZERO_STRUCT(r->out);
1963 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
1964 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
1965 if (ndr_get_array_length(ndr, &r->in.domain_name) > ndr_get_array_size(ndr, &r->in.domain_name)) {
1966 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.domain_name), ndr_get_array_length(ndr, &r->in.domain_name));
1968 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint8_t)));
1969 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint8_t), CH_UTF8));
1970 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
1971 if (_ptr_domain_guid) {
1972 NDR_PULL_ALLOC(ndr, r->in.domain_guid);
1974 r->in.domain_guid = NULL;
1976 if (r->in.domain_guid) {
1977 _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1978 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
1979 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
1980 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
1982 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
1983 if (_ptr_site_name) {
1984 NDR_PULL_ALLOC(ndr, r->in.site_name);
1986 r->in.site_name = NULL;
1988 if (r->in.site_name) {
1989 _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1990 NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
1991 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
1992 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
1993 if (ndr_get_array_length(ndr, &r->in.site_name) > ndr_get_array_size(ndr, &r->in.site_name)) {
1994 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.site_name), ndr_get_array_length(ndr, &r->in.site_name));
1996 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint8_t)));
1997 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint8_t), CH_UTF8));
1998 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
2000 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2001 NDR_PULL_ALLOC(ndr, r->out.dc_info);
2002 ZERO_STRUCTP(r->out.dc_info);
2004 if (flags & NDR_OUT) {
2005 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2006 NDR_PULL_ALLOC(ndr, r->out.dc_info);
2008 _mem_save_dc_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
2009 NDR_PULL_SET_MEM_CTX(ndr, r->out.dc_info, LIBNDR_FLAG_REF_ALLOC);
2010 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_info));
2012 NDR_PULL_ALLOC(ndr, *r->out.dc_info);
2014 *r->out.dc_info = NULL;
2016 if (*r->out.dc_info) {
2017 _mem_save_dc_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
2018 NDR_PULL_SET_MEM_CTX(ndr, *r->out.dc_info, 0);
2019 NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.dc_info));
2020 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_info_1, 0);
2022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_info_0, LIBNDR_FLAG_REF_ALLOC);
2023 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2025 return NDR_ERR_SUCCESS;
2028 _PUBLIC_ void ndr_print_wbint_DsGetDcName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_DsGetDcName *r)
2030 ndr_print_struct(ndr, name, "wbint_DsGetDcName");
2032 if (flags & NDR_SET_VALUES) {
2033 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2035 if (flags & NDR_IN) {
2036 ndr_print_struct(ndr, "in", "wbint_DsGetDcName");
2038 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
2040 ndr_print_string(ndr, "domain_name", r->in.domain_name);
2042 ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
2044 if (r->in.domain_guid) {
2045 ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
2048 ndr_print_ptr(ndr, "site_name", r->in.site_name);
2050 if (r->in.site_name) {
2051 ndr_print_string(ndr, "site_name", r->in.site_name);
2054 ndr_print_uint32(ndr, "flags", r->in.flags);
2057 if (flags & NDR_OUT) {
2058 ndr_print_struct(ndr, "out", "wbint_DsGetDcName");
2060 ndr_print_ptr(ndr, "dc_info", r->out.dc_info);
2062 ndr_print_ptr(ndr, "dc_info", *r->out.dc_info);
2064 if (*r->out.dc_info) {
2065 ndr_print_netr_DsRGetDCNameInfo(ndr, "dc_info", *r->out.dc_info);
2069 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2075 static enum ndr_err_code ndr_push_wbint_LookupRids(struct ndr_push *ndr, int flags, const struct wbint_LookupRids *r)
2077 if (flags & NDR_IN) {
2078 if (r->in.rids == NULL) {
2079 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2081 NDR_CHECK(ndr_push_wbint_RidArray(ndr, NDR_SCALARS, r->in.rids));
2083 if (flags & NDR_OUT) {
2084 if (r->out.names == NULL) {
2085 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2087 NDR_CHECK(ndr_push_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
2088 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2090 return NDR_ERR_SUCCESS;
2093 static enum ndr_err_code ndr_pull_wbint_LookupRids(struct ndr_pull *ndr, int flags, struct wbint_LookupRids *r)
2095 TALLOC_CTX *_mem_save_rids_0;
2096 TALLOC_CTX *_mem_save_names_0;
2097 if (flags & NDR_IN) {
2098 ZERO_STRUCT(r->out);
2100 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2101 NDR_PULL_ALLOC(ndr, r->in.rids);
2103 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
2104 NDR_PULL_SET_MEM_CTX(ndr, r->in.rids, LIBNDR_FLAG_REF_ALLOC);
2105 NDR_CHECK(ndr_pull_wbint_RidArray(ndr, NDR_SCALARS, r->in.rids));
2106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
2107 NDR_PULL_ALLOC(ndr, r->out.names);
2108 ZERO_STRUCTP(r->out.names);
2110 if (flags & NDR_OUT) {
2111 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2112 NDR_PULL_ALLOC(ndr, r->out.names);
2114 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2115 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
2116 NDR_CHECK(ndr_pull_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
2117 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
2118 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2120 return NDR_ERR_SUCCESS;
2123 _PUBLIC_ void ndr_print_wbint_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupRids *r)
2125 ndr_print_struct(ndr, name, "wbint_LookupRids");
2127 if (flags & NDR_SET_VALUES) {
2128 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2130 if (flags & NDR_IN) {
2131 ndr_print_struct(ndr, "in", "wbint_LookupRids");
2133 ndr_print_ptr(ndr, "rids", r->in.rids);
2135 ndr_print_wbint_RidArray(ndr, "rids", r->in.rids);
2139 if (flags & NDR_OUT) {
2140 ndr_print_struct(ndr, "out", "wbint_LookupRids");
2142 ndr_print_ptr(ndr, "names", r->out.names);
2144 ndr_print_wbint_Principals(ndr, "names", r->out.names);
2146 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2152 static enum ndr_err_code ndr_push_wbint_CheckMachineAccount(struct ndr_push *ndr, int flags, const struct wbint_CheckMachineAccount *r)
2154 if (flags & NDR_IN) {
2156 if (flags & NDR_OUT) {
2157 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2159 return NDR_ERR_SUCCESS;
2162 static enum ndr_err_code ndr_pull_wbint_CheckMachineAccount(struct ndr_pull *ndr, int flags, struct wbint_CheckMachineAccount *r)
2164 if (flags & NDR_IN) {
2166 if (flags & NDR_OUT) {
2167 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2169 return NDR_ERR_SUCCESS;
2172 _PUBLIC_ void ndr_print_wbint_CheckMachineAccount(struct ndr_print *ndr, const char *name, int flags, const struct wbint_CheckMachineAccount *r)
2174 ndr_print_struct(ndr, name, "wbint_CheckMachineAccount");
2176 if (flags & NDR_SET_VALUES) {
2177 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2179 if (flags & NDR_IN) {
2180 ndr_print_struct(ndr, "in", "wbint_CheckMachineAccount");
2184 if (flags & NDR_OUT) {
2185 ndr_print_struct(ndr, "out", "wbint_CheckMachineAccount");
2187 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2193 static enum ndr_err_code ndr_push_wbint_ChangeMachineAccount(struct ndr_push *ndr, int flags, const struct wbint_ChangeMachineAccount *r)
2195 if (flags & NDR_IN) {
2197 if (flags & NDR_OUT) {
2198 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2200 return NDR_ERR_SUCCESS;
2203 static enum ndr_err_code ndr_pull_wbint_ChangeMachineAccount(struct ndr_pull *ndr, int flags, struct wbint_ChangeMachineAccount *r)
2205 if (flags & NDR_IN) {
2207 if (flags & NDR_OUT) {
2208 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2210 return NDR_ERR_SUCCESS;
2213 _PUBLIC_ void ndr_print_wbint_ChangeMachineAccount(struct ndr_print *ndr, const char *name, int flags, const struct wbint_ChangeMachineAccount *r)
2215 ndr_print_struct(ndr, name, "wbint_ChangeMachineAccount");
2217 if (flags & NDR_SET_VALUES) {
2218 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2220 if (flags & NDR_IN) {
2221 ndr_print_struct(ndr, "in", "wbint_ChangeMachineAccount");
2225 if (flags & NDR_OUT) {
2226 ndr_print_struct(ndr, "out", "wbint_ChangeMachineAccount");
2228 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2234 static enum ndr_err_code ndr_push_wbint_SetMapping(struct ndr_push *ndr, int flags, const struct wbint_SetMapping *r)
2236 if (flags & NDR_IN) {
2237 if (r->in.sid == NULL) {
2238 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2240 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2241 NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
2242 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
2244 if (flags & NDR_OUT) {
2245 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2247 return NDR_ERR_SUCCESS;
2250 static enum ndr_err_code ndr_pull_wbint_SetMapping(struct ndr_pull *ndr, int flags, struct wbint_SetMapping *r)
2252 TALLOC_CTX *_mem_save_sid_0;
2253 if (flags & NDR_IN) {
2254 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2255 NDR_PULL_ALLOC(ndr, r->in.sid);
2257 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2258 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
2259 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2260 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
2261 NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
2262 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
2264 if (flags & NDR_OUT) {
2265 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2267 return NDR_ERR_SUCCESS;
2270 _PUBLIC_ void ndr_print_wbint_SetMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetMapping *r)
2272 ndr_print_struct(ndr, name, "wbint_SetMapping");
2274 if (flags & NDR_SET_VALUES) {
2275 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2277 if (flags & NDR_IN) {
2278 ndr_print_struct(ndr, "in", "wbint_SetMapping");
2280 ndr_print_ptr(ndr, "sid", r->in.sid);
2282 ndr_print_dom_sid(ndr, "sid", r->in.sid);
2284 ndr_print_wbint_IdType(ndr, "type", r->in.type);
2285 ndr_print_hyper(ndr, "id", r->in.id);
2288 if (flags & NDR_OUT) {
2289 ndr_print_struct(ndr, "out", "wbint_SetMapping");
2291 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2297 static enum ndr_err_code ndr_push_wbint_RemoveMapping(struct ndr_push *ndr, int flags, const struct wbint_RemoveMapping *r)
2299 if (flags & NDR_IN) {
2300 if (r->in.sid == NULL) {
2301 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2303 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2304 NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
2305 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
2307 if (flags & NDR_OUT) {
2308 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2310 return NDR_ERR_SUCCESS;
2313 static enum ndr_err_code ndr_pull_wbint_RemoveMapping(struct ndr_pull *ndr, int flags, struct wbint_RemoveMapping *r)
2315 TALLOC_CTX *_mem_save_sid_0;
2316 if (flags & NDR_IN) {
2317 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2318 NDR_PULL_ALLOC(ndr, r->in.sid);
2320 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2321 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
2322 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2323 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
2324 NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
2325 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
2327 if (flags & NDR_OUT) {
2328 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2330 return NDR_ERR_SUCCESS;
2333 _PUBLIC_ void ndr_print_wbint_RemoveMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_RemoveMapping *r)
2335 ndr_print_struct(ndr, name, "wbint_RemoveMapping");
2337 if (flags & NDR_SET_VALUES) {
2338 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2340 if (flags & NDR_IN) {
2341 ndr_print_struct(ndr, "in", "wbint_RemoveMapping");
2343 ndr_print_ptr(ndr, "sid", r->in.sid);
2345 ndr_print_dom_sid(ndr, "sid", r->in.sid);
2347 ndr_print_wbint_IdType(ndr, "type", r->in.type);
2348 ndr_print_hyper(ndr, "id", r->in.id);
2351 if (flags & NDR_OUT) {
2352 ndr_print_struct(ndr, "out", "wbint_RemoveMapping");
2354 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2360 static enum ndr_err_code ndr_push_wbint_SetHWM(struct ndr_push *ndr, int flags, const struct wbint_SetHWM *r)
2362 if (flags & NDR_IN) {
2363 NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
2364 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
2366 if (flags & NDR_OUT) {
2367 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2369 return NDR_ERR_SUCCESS;
2372 static enum ndr_err_code ndr_pull_wbint_SetHWM(struct ndr_pull *ndr, int flags, struct wbint_SetHWM *r)
2374 if (flags & NDR_IN) {
2375 NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
2376 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
2378 if (flags & NDR_OUT) {
2379 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2381 return NDR_ERR_SUCCESS;
2384 _PUBLIC_ void ndr_print_wbint_SetHWM(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetHWM *r)
2386 ndr_print_struct(ndr, name, "wbint_SetHWM");
2388 if (flags & NDR_SET_VALUES) {
2389 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2391 if (flags & NDR_IN) {
2392 ndr_print_struct(ndr, "in", "wbint_SetHWM");
2394 ndr_print_wbint_IdType(ndr, "type", r->in.type);
2395 ndr_print_hyper(ndr, "id", r->in.id);
2398 if (flags & NDR_OUT) {
2399 ndr_print_struct(ndr, "out", "wbint_SetHWM");
2401 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2407 static const struct ndr_interface_call wbint_calls[] = {
2410 sizeof(struct wbint_Ping),
2411 (ndr_push_flags_fn_t) ndr_push_wbint_Ping,
2412 (ndr_pull_flags_fn_t) ndr_pull_wbint_Ping,
2413 (ndr_print_function_t) ndr_print_wbint_Ping,
2418 sizeof(struct wbint_LookupSid),
2419 (ndr_push_flags_fn_t) ndr_push_wbint_LookupSid,
2420 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupSid,
2421 (ndr_print_function_t) ndr_print_wbint_LookupSid,
2426 sizeof(struct wbint_LookupName),
2427 (ndr_push_flags_fn_t) ndr_push_wbint_LookupName,
2428 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupName,
2429 (ndr_print_function_t) ndr_print_wbint_LookupName,
2434 sizeof(struct wbint_Sid2Uid),
2435 (ndr_push_flags_fn_t) ndr_push_wbint_Sid2Uid,
2436 (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Uid,
2437 (ndr_print_function_t) ndr_print_wbint_Sid2Uid,
2442 sizeof(struct wbint_Sid2Gid),
2443 (ndr_push_flags_fn_t) ndr_push_wbint_Sid2Gid,
2444 (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Gid,
2445 (ndr_print_function_t) ndr_print_wbint_Sid2Gid,
2450 sizeof(struct wbint_Uid2Sid),
2451 (ndr_push_flags_fn_t) ndr_push_wbint_Uid2Sid,
2452 (ndr_pull_flags_fn_t) ndr_pull_wbint_Uid2Sid,
2453 (ndr_print_function_t) ndr_print_wbint_Uid2Sid,
2458 sizeof(struct wbint_Gid2Sid),
2459 (ndr_push_flags_fn_t) ndr_push_wbint_Gid2Sid,
2460 (ndr_pull_flags_fn_t) ndr_pull_wbint_Gid2Sid,
2461 (ndr_print_function_t) ndr_print_wbint_Gid2Sid,
2465 "wbint_AllocateUid",
2466 sizeof(struct wbint_AllocateUid),
2467 (ndr_push_flags_fn_t) ndr_push_wbint_AllocateUid,
2468 (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateUid,
2469 (ndr_print_function_t) ndr_print_wbint_AllocateUid,
2473 "wbint_AllocateGid",
2474 sizeof(struct wbint_AllocateGid),
2475 (ndr_push_flags_fn_t) ndr_push_wbint_AllocateGid,
2476 (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateGid,
2477 (ndr_print_function_t) ndr_print_wbint_AllocateGid,
2482 sizeof(struct wbint_QueryUser),
2483 (ndr_push_flags_fn_t) ndr_push_wbint_QueryUser,
2484 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUser,
2485 (ndr_print_function_t) ndr_print_wbint_QueryUser,
2489 "wbint_LookupUserAliases",
2490 sizeof(struct wbint_LookupUserAliases),
2491 (ndr_push_flags_fn_t) ndr_push_wbint_LookupUserAliases,
2492 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserAliases,
2493 (ndr_print_function_t) ndr_print_wbint_LookupUserAliases,
2497 "wbint_LookupUserGroups",
2498 sizeof(struct wbint_LookupUserGroups),
2499 (ndr_push_flags_fn_t) ndr_push_wbint_LookupUserGroups,
2500 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserGroups,
2501 (ndr_print_function_t) ndr_print_wbint_LookupUserGroups,
2505 "wbint_QuerySequenceNumber",
2506 sizeof(struct wbint_QuerySequenceNumber),
2507 (ndr_push_flags_fn_t) ndr_push_wbint_QuerySequenceNumber,
2508 (ndr_pull_flags_fn_t) ndr_pull_wbint_QuerySequenceNumber,
2509 (ndr_print_function_t) ndr_print_wbint_QuerySequenceNumber,
2513 "wbint_LookupGroupMembers",
2514 sizeof(struct wbint_LookupGroupMembers),
2515 (ndr_push_flags_fn_t) ndr_push_wbint_LookupGroupMembers,
2516 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupGroupMembers,
2517 (ndr_print_function_t) ndr_print_wbint_LookupGroupMembers,
2521 "wbint_QueryUserList",
2522 sizeof(struct wbint_QueryUserList),
2523 (ndr_push_flags_fn_t) ndr_push_wbint_QueryUserList,
2524 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUserList,
2525 (ndr_print_function_t) ndr_print_wbint_QueryUserList,
2529 "wbint_QueryGroupList",
2530 sizeof(struct wbint_QueryGroupList),
2531 (ndr_push_flags_fn_t) ndr_push_wbint_QueryGroupList,
2532 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryGroupList,
2533 (ndr_print_function_t) ndr_print_wbint_QueryGroupList,
2537 "wbint_DsGetDcName",
2538 sizeof(struct wbint_DsGetDcName),
2539 (ndr_push_flags_fn_t) ndr_push_wbint_DsGetDcName,
2540 (ndr_pull_flags_fn_t) ndr_pull_wbint_DsGetDcName,
2541 (ndr_print_function_t) ndr_print_wbint_DsGetDcName,
2546 sizeof(struct wbint_LookupRids),
2547 (ndr_push_flags_fn_t) ndr_push_wbint_LookupRids,
2548 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupRids,
2549 (ndr_print_function_t) ndr_print_wbint_LookupRids,
2553 "wbint_CheckMachineAccount",
2554 sizeof(struct wbint_CheckMachineAccount),
2555 (ndr_push_flags_fn_t) ndr_push_wbint_CheckMachineAccount,
2556 (ndr_pull_flags_fn_t) ndr_pull_wbint_CheckMachineAccount,
2557 (ndr_print_function_t) ndr_print_wbint_CheckMachineAccount,
2561 "wbint_ChangeMachineAccount",
2562 sizeof(struct wbint_ChangeMachineAccount),
2563 (ndr_push_flags_fn_t) ndr_push_wbint_ChangeMachineAccount,
2564 (ndr_pull_flags_fn_t) ndr_pull_wbint_ChangeMachineAccount,
2565 (ndr_print_function_t) ndr_print_wbint_ChangeMachineAccount,
2570 sizeof(struct wbint_SetMapping),
2571 (ndr_push_flags_fn_t) ndr_push_wbint_SetMapping,
2572 (ndr_pull_flags_fn_t) ndr_pull_wbint_SetMapping,
2573 (ndr_print_function_t) ndr_print_wbint_SetMapping,
2577 "wbint_RemoveMapping",
2578 sizeof(struct wbint_RemoveMapping),
2579 (ndr_push_flags_fn_t) ndr_push_wbint_RemoveMapping,
2580 (ndr_pull_flags_fn_t) ndr_pull_wbint_RemoveMapping,
2581 (ndr_print_function_t) ndr_print_wbint_RemoveMapping,
2586 sizeof(struct wbint_SetHWM),
2587 (ndr_push_flags_fn_t) ndr_push_wbint_SetHWM,
2588 (ndr_pull_flags_fn_t) ndr_pull_wbint_SetHWM,
2589 (ndr_print_function_t) ndr_print_wbint_SetHWM,
2592 { NULL, 0, NULL, NULL, NULL, false }
2595 static const char * const wbint_endpoint_strings[] = {
2599 static const struct ndr_interface_string_array wbint_endpoints = {
2601 .names = wbint_endpoint_strings
2604 static const char * const wbint_authservice_strings[] = {
2608 static const struct ndr_interface_string_array wbint_authservices = {
2610 .names = wbint_authservice_strings
2614 const struct ndr_interface_table ndr_table_wbint = {
2617 {0xbf09192c,0xed60,0x4928,{0x9d,0xff},{0xd0,0xd7,0xbc,0xb0,0x3e,0xd8}},
2620 .helpstring = NDR_WBINT_HELPSTRING,
2622 .calls = wbint_calls,
2623 .endpoints = &wbint_endpoints,
2624 .authservices = &wbint_authservices