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));
19 if (ndr_flags & NDR_BUFFERS) {
21 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->acct_name, CH_UTF8)));
22 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
23 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->acct_name, CH_UTF8)));
24 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->acct_name, ndr_charset_length(r->acct_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
27 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->full_name, CH_UTF8)));
28 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
29 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->full_name, CH_UTF8)));
30 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->full_name, ndr_charset_length(r->full_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
33 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
34 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
35 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
36 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->homedir, ndr_charset_length(r->homedir, CH_UTF8), sizeof(uint8_t), CH_UTF8));
39 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
40 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
41 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
42 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->shell, ndr_charset_length(r->shell, CH_UTF8), sizeof(uint8_t), CH_UTF8));
45 return NDR_ERR_SUCCESS;
48 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_userinfo(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfo *r)
50 uint32_t _ptr_acct_name;
51 TALLOC_CTX *_mem_save_acct_name_0;
52 uint32_t _ptr_full_name;
53 TALLOC_CTX *_mem_save_full_name_0;
54 uint32_t _ptr_homedir;
55 TALLOC_CTX *_mem_save_homedir_0;
57 TALLOC_CTX *_mem_save_shell_0;
58 if (ndr_flags & NDR_SCALARS) {
59 NDR_CHECK(ndr_pull_align(ndr, 8));
60 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_acct_name));
62 NDR_PULL_ALLOC(ndr, r->acct_name);
66 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_full_name));
68 NDR_PULL_ALLOC(ndr, r->full_name);
72 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_homedir));
74 NDR_PULL_ALLOC(ndr, r->homedir);
78 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_shell));
80 NDR_PULL_ALLOC(ndr, r->shell);
84 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->primary_gid));
85 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->user_sid));
86 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->group_sid));
88 if (ndr_flags & NDR_BUFFERS) {
90 _mem_save_acct_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
91 NDR_PULL_SET_MEM_CTX(ndr, r->acct_name, 0);
92 NDR_CHECK(ndr_pull_array_size(ndr, &r->acct_name));
93 NDR_CHECK(ndr_pull_array_length(ndr, &r->acct_name));
94 if (ndr_get_array_length(ndr, &r->acct_name) > ndr_get_array_size(ndr, &r->acct_name)) {
95 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));
97 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->acct_name), sizeof(uint8_t)));
98 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->acct_name, ndr_get_array_length(ndr, &r->acct_name), sizeof(uint8_t), CH_UTF8));
99 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_name_0, 0);
102 _mem_save_full_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
103 NDR_PULL_SET_MEM_CTX(ndr, r->full_name, 0);
104 NDR_CHECK(ndr_pull_array_size(ndr, &r->full_name));
105 NDR_CHECK(ndr_pull_array_length(ndr, &r->full_name));
106 if (ndr_get_array_length(ndr, &r->full_name) > ndr_get_array_size(ndr, &r->full_name)) {
107 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));
109 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->full_name), sizeof(uint8_t)));
110 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->full_name, ndr_get_array_length(ndr, &r->full_name), sizeof(uint8_t), CH_UTF8));
111 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_full_name_0, 0);
114 _mem_save_homedir_0 = NDR_PULL_GET_MEM_CTX(ndr);
115 NDR_PULL_SET_MEM_CTX(ndr, r->homedir, 0);
116 NDR_CHECK(ndr_pull_array_size(ndr, &r->homedir));
117 NDR_CHECK(ndr_pull_array_length(ndr, &r->homedir));
118 if (ndr_get_array_length(ndr, &r->homedir) > ndr_get_array_size(ndr, &r->homedir)) {
119 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));
121 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t)));
122 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->homedir, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t), CH_UTF8));
123 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_homedir_0, 0);
126 _mem_save_shell_0 = NDR_PULL_GET_MEM_CTX(ndr);
127 NDR_PULL_SET_MEM_CTX(ndr, r->shell, 0);
128 NDR_CHECK(ndr_pull_array_size(ndr, &r->shell));
129 NDR_CHECK(ndr_pull_array_length(ndr, &r->shell));
130 if (ndr_get_array_length(ndr, &r->shell) > ndr_get_array_size(ndr, &r->shell)) {
131 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));
133 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t)));
134 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->shell, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t), CH_UTF8));
135 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_shell_0, 0);
138 return NDR_ERR_SUCCESS;
141 _PUBLIC_ void ndr_print_wbint_userinfo(struct ndr_print *ndr, const char *name, const struct wbint_userinfo *r)
143 ndr_print_struct(ndr, name, "wbint_userinfo");
145 ndr_print_ptr(ndr, "acct_name", r->acct_name);
148 ndr_print_string(ndr, "acct_name", r->acct_name);
151 ndr_print_ptr(ndr, "full_name", r->full_name);
154 ndr_print_string(ndr, "full_name", r->full_name);
157 ndr_print_ptr(ndr, "homedir", r->homedir);
160 ndr_print_string(ndr, "homedir", r->homedir);
163 ndr_print_ptr(ndr, "shell", r->shell);
166 ndr_print_string(ndr, "shell", r->shell);
169 ndr_print_hyper(ndr, "primary_gid", r->primary_gid);
170 ndr_print_dom_sid(ndr, "user_sid", &r->user_sid);
171 ndr_print_dom_sid(ndr, "group_sid", &r->group_sid);
175 _PUBLIC_ enum ndr_err_code ndr_push_wbint_SidArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_SidArray *r)
177 uint32_t cntr_sids_0;
178 if (ndr_flags & NDR_SCALARS) {
179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
180 NDR_CHECK(ndr_push_align(ndr, 4));
181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
182 for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) {
183 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
186 if (ndr_flags & NDR_BUFFERS) {
188 return NDR_ERR_SUCCESS;
191 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_SidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_SidArray *r)
193 uint32_t cntr_sids_0;
194 TALLOC_CTX *_mem_save_sids_0;
195 if (ndr_flags & NDR_SCALARS) {
196 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
197 NDR_CHECK(ndr_pull_align(ndr, 4));
198 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
199 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
200 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
201 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
202 for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) {
203 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
205 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
207 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
210 if (ndr_flags & NDR_BUFFERS) {
212 return NDR_ERR_SUCCESS;
215 _PUBLIC_ void ndr_print_wbint_SidArray(struct ndr_print *ndr, const char *name, const struct wbint_SidArray *r)
217 uint32_t cntr_sids_0;
218 ndr_print_struct(ndr, name, "wbint_SidArray");
220 ndr_print_uint32(ndr, "num_sids", r->num_sids);
221 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
223 for (cntr_sids_0=0;cntr_sids_0<r->num_sids;cntr_sids_0++) {
225 if (asprintf(&idx_0, "[%d]", cntr_sids_0) != -1) {
226 ndr_print_dom_sid(ndr, "sids", &r->sids[cntr_sids_0]);
234 _PUBLIC_ enum ndr_err_code ndr_push_wbint_RidArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_RidArray *r)
236 uint32_t cntr_rids_0;
237 if (ndr_flags & NDR_SCALARS) {
238 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
239 NDR_CHECK(ndr_push_align(ndr, 4));
240 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
241 for (cntr_rids_0 = 0; cntr_rids_0 < r->num_rids; cntr_rids_0++) {
242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_0]));
245 if (ndr_flags & NDR_BUFFERS) {
247 return NDR_ERR_SUCCESS;
250 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_RidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_RidArray *r)
252 uint32_t cntr_rids_0;
253 TALLOC_CTX *_mem_save_rids_0;
254 if (ndr_flags & NDR_SCALARS) {
255 NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
256 NDR_CHECK(ndr_pull_align(ndr, 4));
257 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_rids));
258 NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
259 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
260 NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
261 for (cntr_rids_0 = 0; cntr_rids_0 < r->num_rids; cntr_rids_0++) {
262 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_0]));
264 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
266 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->num_rids));
269 if (ndr_flags & NDR_BUFFERS) {
271 return NDR_ERR_SUCCESS;
274 _PUBLIC_ void ndr_print_wbint_RidArray(struct ndr_print *ndr, const char *name, const struct wbint_RidArray *r)
276 uint32_t cntr_rids_0;
277 ndr_print_struct(ndr, name, "wbint_RidArray");
279 ndr_print_uint32(ndr, "num_rids", r->num_rids);
280 ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->num_rids);
282 for (cntr_rids_0=0;cntr_rids_0<r->num_rids;cntr_rids_0++) {
284 if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
285 ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_0]);
293 _PUBLIC_ enum ndr_err_code ndr_push_wbint_Principal(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principal *r)
295 if (ndr_flags & NDR_SCALARS) {
296 NDR_CHECK(ndr_push_align(ndr, 4));
297 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
298 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->type));
299 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
301 if (ndr_flags & NDR_BUFFERS) {
303 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
304 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
305 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
306 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
309 return NDR_ERR_SUCCESS;
312 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principal(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principal *r)
315 TALLOC_CTX *_mem_save_name_0;
316 if (ndr_flags & NDR_SCALARS) {
317 NDR_CHECK(ndr_pull_align(ndr, 4));
318 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sid));
319 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->type));
320 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
322 NDR_PULL_ALLOC(ndr, r->name);
327 if (ndr_flags & NDR_BUFFERS) {
329 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
330 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
331 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
332 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
333 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
334 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));
336 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint8_t)));
337 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint8_t), CH_UTF8));
338 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
341 return NDR_ERR_SUCCESS;
344 _PUBLIC_ void ndr_print_wbint_Principal(struct ndr_print *ndr, const char *name, const struct wbint_Principal *r)
346 ndr_print_struct(ndr, name, "wbint_Principal");
348 ndr_print_dom_sid(ndr, "sid", &r->sid);
349 ndr_print_lsa_SidType(ndr, "type", r->type);
350 ndr_print_ptr(ndr, "name", r->name);
353 ndr_print_string(ndr, "name", r->name);
359 _PUBLIC_ enum ndr_err_code ndr_push_wbint_GroupMembers(struct ndr_push *ndr, int ndr_flags, const struct wbint_GroupMembers *r)
361 uint32_t cntr_members_0;
362 if (ndr_flags & NDR_SCALARS) {
363 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members));
364 NDR_CHECK(ndr_push_align(ndr, 4));
365 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->num_members));
366 for (cntr_members_0 = 0; cntr_members_0 < r->num_members; cntr_members_0++) {
367 NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_SCALARS, &r->members[cntr_members_0]));
370 if (ndr_flags & NDR_BUFFERS) {
371 for (cntr_members_0 = 0; cntr_members_0 < r->num_members; cntr_members_0++) {
372 NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_BUFFERS, &r->members[cntr_members_0]));
375 return NDR_ERR_SUCCESS;
378 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_GroupMembers(struct ndr_pull *ndr, int ndr_flags, struct wbint_GroupMembers *r)
380 uint32_t cntr_members_0;
381 TALLOC_CTX *_mem_save_members_0;
382 if (ndr_flags & NDR_SCALARS) {
383 NDR_CHECK(ndr_pull_array_size(ndr, &r->members));
384 NDR_CHECK(ndr_pull_align(ndr, 4));
385 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->num_members));
386 NDR_PULL_ALLOC_N(ndr, r->members, ndr_get_array_size(ndr, &r->members));
387 _mem_save_members_0 = NDR_PULL_GET_MEM_CTX(ndr);
388 NDR_PULL_SET_MEM_CTX(ndr, r->members, 0);
389 for (cntr_members_0 = 0; cntr_members_0 < r->num_members; cntr_members_0++) {
390 NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_SCALARS, &r->members[cntr_members_0]));
392 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, 0);
394 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->members, r->num_members));
397 if (ndr_flags & NDR_BUFFERS) {
398 _mem_save_members_0 = NDR_PULL_GET_MEM_CTX(ndr);
399 NDR_PULL_SET_MEM_CTX(ndr, r->members, 0);
400 for (cntr_members_0 = 0; cntr_members_0 < r->num_members; cntr_members_0++) {
401 NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_BUFFERS, &r->members[cntr_members_0]));
403 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, 0);
405 return NDR_ERR_SUCCESS;
408 _PUBLIC_ void ndr_print_wbint_GroupMembers(struct ndr_print *ndr, const char *name, const struct wbint_GroupMembers *r)
410 uint32_t cntr_members_0;
411 ndr_print_struct(ndr, name, "wbint_GroupMembers");
413 ndr_print_int32(ndr, "num_members", r->num_members);
414 ndr->print(ndr, "%s: ARRAY(%d)", "members", (int)r->num_members);
416 for (cntr_members_0=0;cntr_members_0<r->num_members;cntr_members_0++) {
418 if (asprintf(&idx_0, "[%d]", cntr_members_0) != -1) {
419 ndr_print_wbint_Principal(ndr, "members", &r->members[cntr_members_0]);
427 static enum ndr_err_code ndr_push_wbint_Ping(struct ndr_push *ndr, int flags, const struct wbint_Ping *r)
429 if (flags & NDR_IN) {
430 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data));
432 if (flags & NDR_OUT) {
433 if (r->out.out_data == NULL) {
434 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
436 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.out_data));
438 return NDR_ERR_SUCCESS;
441 static enum ndr_err_code ndr_pull_wbint_Ping(struct ndr_pull *ndr, int flags, struct wbint_Ping *r)
443 TALLOC_CTX *_mem_save_out_data_0;
444 if (flags & NDR_IN) {
447 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.in_data));
448 NDR_PULL_ALLOC(ndr, r->out.out_data);
449 ZERO_STRUCTP(r->out.out_data);
451 if (flags & NDR_OUT) {
452 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
453 NDR_PULL_ALLOC(ndr, r->out.out_data);
455 _mem_save_out_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
456 NDR_PULL_SET_MEM_CTX(ndr, r->out.out_data, LIBNDR_FLAG_REF_ALLOC);
457 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.out_data));
458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_data_0, LIBNDR_FLAG_REF_ALLOC);
460 return NDR_ERR_SUCCESS;
463 _PUBLIC_ void ndr_print_wbint_Ping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Ping *r)
465 ndr_print_struct(ndr, name, "wbint_Ping");
467 if (flags & NDR_SET_VALUES) {
468 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
470 if (flags & NDR_IN) {
471 ndr_print_struct(ndr, "in", "wbint_Ping");
473 ndr_print_uint32(ndr, "in_data", r->in.in_data);
476 if (flags & NDR_OUT) {
477 ndr_print_struct(ndr, "out", "wbint_Ping");
479 ndr_print_ptr(ndr, "out_data", r->out.out_data);
481 ndr_print_uint32(ndr, "out_data", *r->out.out_data);
488 static enum ndr_err_code ndr_push_wbint_LookupSid(struct ndr_push *ndr, int flags, const struct wbint_LookupSid *r)
490 if (flags & NDR_IN) {
491 if (r->in.sid == NULL) {
492 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
494 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
496 if (flags & NDR_OUT) {
497 if (r->out.type == NULL) {
498 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
500 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, *r->out.type));
501 if (r->out.domain == NULL) {
502 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
504 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domain));
505 if (*r->out.domain) {
506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.domain, CH_UTF8)));
507 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.domain, CH_UTF8)));
509 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.domain, ndr_charset_length(*r->out.domain, CH_UTF8), sizeof(uint8_t), CH_UTF8));
511 if (r->out.name == NULL) {
512 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
514 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name));
516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name, CH_UTF8)));
517 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
518 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name, CH_UTF8)));
519 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.name, ndr_charset_length(*r->out.name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
521 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
523 return NDR_ERR_SUCCESS;
526 static enum ndr_err_code ndr_pull_wbint_LookupSid(struct ndr_pull *ndr, int flags, struct wbint_LookupSid *r)
528 uint32_t _ptr_domain;
530 TALLOC_CTX *_mem_save_sid_0;
531 TALLOC_CTX *_mem_save_type_0;
532 TALLOC_CTX *_mem_save_domain_0;
533 TALLOC_CTX *_mem_save_domain_1;
534 TALLOC_CTX *_mem_save_name_0;
535 TALLOC_CTX *_mem_save_name_1;
536 if (flags & NDR_IN) {
539 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
540 NDR_PULL_ALLOC(ndr, r->in.sid);
542 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
543 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
544 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
546 NDR_PULL_ALLOC(ndr, r->out.type);
547 ZERO_STRUCTP(r->out.type);
548 NDR_PULL_ALLOC(ndr, r->out.domain);
549 ZERO_STRUCTP(r->out.domain);
550 NDR_PULL_ALLOC(ndr, r->out.name);
551 ZERO_STRUCTP(r->out.name);
553 if (flags & NDR_OUT) {
554 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
555 NDR_PULL_ALLOC(ndr, r->out.type);
557 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
558 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
559 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, r->out.type));
560 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
561 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
562 NDR_PULL_ALLOC(ndr, r->out.domain);
564 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
565 NDR_PULL_SET_MEM_CTX(ndr, r->out.domain, LIBNDR_FLAG_REF_ALLOC);
566 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
568 NDR_PULL_ALLOC(ndr, *r->out.domain);
570 *r->out.domain = NULL;
572 if (*r->out.domain) {
573 _mem_save_domain_1 = NDR_PULL_GET_MEM_CTX(ndr);
574 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domain, 0);
575 NDR_CHECK(ndr_pull_array_size(ndr, r->out.domain));
576 NDR_CHECK(ndr_pull_array_length(ndr, r->out.domain));
577 if (ndr_get_array_length(ndr, r->out.domain) > ndr_get_array_size(ndr, r->out.domain)) {
578 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));
580 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.domain), sizeof(uint8_t)));
581 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.domain, ndr_get_array_length(ndr, r->out.domain), sizeof(uint8_t), CH_UTF8));
582 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_1, 0);
584 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, LIBNDR_FLAG_REF_ALLOC);
585 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
586 NDR_PULL_ALLOC(ndr, r->out.name);
588 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
589 NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
590 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
592 NDR_PULL_ALLOC(ndr, *r->out.name);
597 _mem_save_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
598 NDR_PULL_SET_MEM_CTX(ndr, *r->out.name, 0);
599 NDR_CHECK(ndr_pull_array_size(ndr, r->out.name));
600 NDR_CHECK(ndr_pull_array_length(ndr, r->out.name));
601 if (ndr_get_array_length(ndr, r->out.name) > ndr_get_array_size(ndr, r->out.name)) {
602 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));
604 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.name), sizeof(uint8_t)));
605 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.name, ndr_get_array_length(ndr, r->out.name), sizeof(uint8_t), CH_UTF8));
606 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_1, 0);
608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
609 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
611 return NDR_ERR_SUCCESS;
614 _PUBLIC_ void ndr_print_wbint_LookupSid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSid *r)
616 ndr_print_struct(ndr, name, "wbint_LookupSid");
618 if (flags & NDR_SET_VALUES) {
619 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
621 if (flags & NDR_IN) {
622 ndr_print_struct(ndr, "in", "wbint_LookupSid");
624 ndr_print_ptr(ndr, "sid", r->in.sid);
626 ndr_print_dom_sid(ndr, "sid", r->in.sid);
630 if (flags & NDR_OUT) {
631 ndr_print_struct(ndr, "out", "wbint_LookupSid");
633 ndr_print_ptr(ndr, "type", r->out.type);
635 ndr_print_lsa_SidType(ndr, "type", *r->out.type);
637 ndr_print_ptr(ndr, "domain", r->out.domain);
639 ndr_print_ptr(ndr, "domain", *r->out.domain);
641 if (*r->out.domain) {
642 ndr_print_string(ndr, "domain", *r->out.domain);
646 ndr_print_ptr(ndr, "name", r->out.name);
648 ndr_print_ptr(ndr, "name", *r->out.name);
651 ndr_print_string(ndr, "name", *r->out.name);
655 ndr_print_NTSTATUS(ndr, "result", r->out.result);
661 static enum ndr_err_code ndr_push_wbint_LookupName(struct ndr_push *ndr, int flags, const struct wbint_LookupName *r)
663 if (flags & NDR_IN) {
664 if (r->in.domain == NULL) {
665 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
667 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF8)));
668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
669 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF8)));
670 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain, ndr_charset_length(r->in.domain, CH_UTF8), sizeof(uint8_t), CH_UTF8));
671 if (r->in.name == NULL) {
672 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
674 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF8)));
675 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF8)));
677 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
678 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
680 if (flags & NDR_OUT) {
681 if (r->out.type == NULL) {
682 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
684 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, *r->out.type));
685 if (r->out.sid == NULL) {
686 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
688 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
689 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
691 return NDR_ERR_SUCCESS;
694 static enum ndr_err_code ndr_pull_wbint_LookupName(struct ndr_pull *ndr, int flags, struct wbint_LookupName *r)
696 TALLOC_CTX *_mem_save_type_0;
697 TALLOC_CTX *_mem_save_sid_0;
698 if (flags & NDR_IN) {
701 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain));
702 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain));
703 if (ndr_get_array_length(ndr, &r->in.domain) > ndr_get_array_size(ndr, &r->in.domain)) {
704 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));
706 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t)));
707 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t), CH_UTF8));
708 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
709 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
710 if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) {
711 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));
713 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint8_t)));
714 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint8_t), CH_UTF8));
715 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
716 NDR_PULL_ALLOC(ndr, r->out.type);
717 ZERO_STRUCTP(r->out.type);
718 NDR_PULL_ALLOC(ndr, r->out.sid);
719 ZERO_STRUCTP(r->out.sid);
721 if (flags & NDR_OUT) {
722 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
723 NDR_PULL_ALLOC(ndr, r->out.type);
725 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
726 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
727 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, r->out.type));
728 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
729 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
730 NDR_PULL_ALLOC(ndr, r->out.sid);
732 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
733 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
734 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
735 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
736 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
738 return NDR_ERR_SUCCESS;
741 _PUBLIC_ void ndr_print_wbint_LookupName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupName *r)
743 ndr_print_struct(ndr, name, "wbint_LookupName");
745 if (flags & NDR_SET_VALUES) {
746 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
748 if (flags & NDR_IN) {
749 ndr_print_struct(ndr, "in", "wbint_LookupName");
751 ndr_print_ptr(ndr, "domain", r->in.domain);
753 ndr_print_string(ndr, "domain", r->in.domain);
755 ndr_print_ptr(ndr, "name", r->in.name);
757 ndr_print_string(ndr, "name", r->in.name);
759 ndr_print_uint32(ndr, "flags", r->in.flags);
762 if (flags & NDR_OUT) {
763 ndr_print_struct(ndr, "out", "wbint_LookupName");
765 ndr_print_ptr(ndr, "type", r->out.type);
767 ndr_print_lsa_SidType(ndr, "type", *r->out.type);
769 ndr_print_ptr(ndr, "sid", r->out.sid);
771 ndr_print_dom_sid(ndr, "sid", r->out.sid);
773 ndr_print_NTSTATUS(ndr, "result", r->out.result);
779 static enum ndr_err_code ndr_push_wbint_Sid2Uid(struct ndr_push *ndr, int flags, const struct wbint_Sid2Uid *r)
781 if (flags & NDR_IN) {
782 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
783 if (r->in.dom_name) {
784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
785 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
786 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
787 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));
789 if (r->in.sid == NULL) {
790 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
792 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
794 if (flags & NDR_OUT) {
795 if (r->out.uid == NULL) {
796 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
798 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
799 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
801 return NDR_ERR_SUCCESS;
804 static enum ndr_err_code ndr_pull_wbint_Sid2Uid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Uid *r)
806 uint32_t _ptr_dom_name;
807 TALLOC_CTX *_mem_save_dom_name_0;
808 TALLOC_CTX *_mem_save_sid_0;
809 TALLOC_CTX *_mem_save_uid_0;
810 if (flags & NDR_IN) {
813 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
815 NDR_PULL_ALLOC(ndr, r->in.dom_name);
817 r->in.dom_name = NULL;
819 if (r->in.dom_name) {
820 _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
821 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
822 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
823 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
824 if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
825 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));
827 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
828 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));
829 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
831 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
832 NDR_PULL_ALLOC(ndr, r->in.sid);
834 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
835 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
836 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
837 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
838 NDR_PULL_ALLOC(ndr, r->out.uid);
839 ZERO_STRUCTP(r->out.uid);
841 if (flags & NDR_OUT) {
842 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
843 NDR_PULL_ALLOC(ndr, r->out.uid);
845 _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr);
846 NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC);
847 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid));
848 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC);
849 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
851 return NDR_ERR_SUCCESS;
854 _PUBLIC_ void ndr_print_wbint_Sid2Uid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Uid *r)
856 ndr_print_struct(ndr, name, "wbint_Sid2Uid");
858 if (flags & NDR_SET_VALUES) {
859 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
861 if (flags & NDR_IN) {
862 ndr_print_struct(ndr, "in", "wbint_Sid2Uid");
864 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
866 if (r->in.dom_name) {
867 ndr_print_string(ndr, "dom_name", r->in.dom_name);
870 ndr_print_ptr(ndr, "sid", r->in.sid);
872 ndr_print_dom_sid(ndr, "sid", r->in.sid);
876 if (flags & NDR_OUT) {
877 ndr_print_struct(ndr, "out", "wbint_Sid2Uid");
879 ndr_print_ptr(ndr, "uid", r->out.uid);
881 ndr_print_hyper(ndr, "uid", *r->out.uid);
883 ndr_print_NTSTATUS(ndr, "result", r->out.result);
889 static enum ndr_err_code ndr_push_wbint_Sid2Gid(struct ndr_push *ndr, int flags, const struct wbint_Sid2Gid *r)
891 if (flags & NDR_IN) {
892 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
893 if (r->in.dom_name) {
894 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
895 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
896 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
897 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));
899 if (r->in.sid == NULL) {
900 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
902 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
904 if (flags & NDR_OUT) {
905 if (r->out.gid == NULL) {
906 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
908 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
909 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
911 return NDR_ERR_SUCCESS;
914 static enum ndr_err_code ndr_pull_wbint_Sid2Gid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Gid *r)
916 uint32_t _ptr_dom_name;
917 TALLOC_CTX *_mem_save_dom_name_0;
918 TALLOC_CTX *_mem_save_sid_0;
919 TALLOC_CTX *_mem_save_gid_0;
920 if (flags & NDR_IN) {
923 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
925 NDR_PULL_ALLOC(ndr, r->in.dom_name);
927 r->in.dom_name = NULL;
929 if (r->in.dom_name) {
930 _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
931 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
932 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
933 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
934 if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
935 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));
937 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
938 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));
939 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
941 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
942 NDR_PULL_ALLOC(ndr, r->in.sid);
944 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
945 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
946 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
947 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
948 NDR_PULL_ALLOC(ndr, r->out.gid);
949 ZERO_STRUCTP(r->out.gid);
951 if (flags & NDR_OUT) {
952 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
953 NDR_PULL_ALLOC(ndr, r->out.gid);
955 _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr);
956 NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC);
957 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid));
958 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC);
959 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
961 return NDR_ERR_SUCCESS;
964 _PUBLIC_ void ndr_print_wbint_Sid2Gid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Gid *r)
966 ndr_print_struct(ndr, name, "wbint_Sid2Gid");
968 if (flags & NDR_SET_VALUES) {
969 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
971 if (flags & NDR_IN) {
972 ndr_print_struct(ndr, "in", "wbint_Sid2Gid");
974 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
976 if (r->in.dom_name) {
977 ndr_print_string(ndr, "dom_name", r->in.dom_name);
980 ndr_print_ptr(ndr, "sid", r->in.sid);
982 ndr_print_dom_sid(ndr, "sid", r->in.sid);
986 if (flags & NDR_OUT) {
987 ndr_print_struct(ndr, "out", "wbint_Sid2Gid");
989 ndr_print_ptr(ndr, "gid", r->out.gid);
991 ndr_print_hyper(ndr, "gid", *r->out.gid);
993 ndr_print_NTSTATUS(ndr, "result", r->out.result);
999 static enum ndr_err_code ndr_push_wbint_Uid2Sid(struct ndr_push *ndr, int flags, const struct wbint_Uid2Sid *r)
1001 if (flags & NDR_IN) {
1002 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
1003 if (r->in.dom_name) {
1004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1005 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1006 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1007 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));
1009 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
1011 if (flags & NDR_OUT) {
1012 if (r->out.sid == NULL) {
1013 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1015 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1016 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1018 return NDR_ERR_SUCCESS;
1021 static enum ndr_err_code ndr_pull_wbint_Uid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Uid2Sid *r)
1023 uint32_t _ptr_dom_name;
1024 TALLOC_CTX *_mem_save_dom_name_0;
1025 TALLOC_CTX *_mem_save_sid_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 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
1048 NDR_PULL_ALLOC(ndr, r->out.sid);
1049 ZERO_STRUCTP(r->out.sid);
1051 if (flags & NDR_OUT) {
1052 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1053 NDR_PULL_ALLOC(ndr, r->out.sid);
1055 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1056 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
1057 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1058 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1059 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1061 return NDR_ERR_SUCCESS;
1064 _PUBLIC_ void ndr_print_wbint_Uid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Uid2Sid *r)
1066 ndr_print_struct(ndr, name, "wbint_Uid2Sid");
1068 if (flags & NDR_SET_VALUES) {
1069 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1071 if (flags & NDR_IN) {
1072 ndr_print_struct(ndr, "in", "wbint_Uid2Sid");
1074 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1076 if (r->in.dom_name) {
1077 ndr_print_string(ndr, "dom_name", r->in.dom_name);
1080 ndr_print_hyper(ndr, "uid", r->in.uid);
1083 if (flags & NDR_OUT) {
1084 ndr_print_struct(ndr, "out", "wbint_Uid2Sid");
1086 ndr_print_ptr(ndr, "sid", r->out.sid);
1088 ndr_print_dom_sid(ndr, "sid", r->out.sid);
1090 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1096 static enum ndr_err_code ndr_push_wbint_Gid2Sid(struct ndr_push *ndr, int flags, const struct wbint_Gid2Sid *r)
1098 if (flags & NDR_IN) {
1099 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
1100 if (r->in.dom_name) {
1101 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1102 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1103 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1104 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));
1106 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
1108 if (flags & NDR_OUT) {
1109 if (r->out.sid == NULL) {
1110 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1112 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1113 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1115 return NDR_ERR_SUCCESS;
1118 static enum ndr_err_code ndr_pull_wbint_Gid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Gid2Sid *r)
1120 uint32_t _ptr_dom_name;
1121 TALLOC_CTX *_mem_save_dom_name_0;
1122 TALLOC_CTX *_mem_save_sid_0;
1123 if (flags & NDR_IN) {
1124 ZERO_STRUCT(r->out);
1126 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
1127 if (_ptr_dom_name) {
1128 NDR_PULL_ALLOC(ndr, r->in.dom_name);
1130 r->in.dom_name = NULL;
1132 if (r->in.dom_name) {
1133 _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1134 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1135 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1136 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1137 if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1138 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));
1140 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1141 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));
1142 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1144 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
1145 NDR_PULL_ALLOC(ndr, r->out.sid);
1146 ZERO_STRUCTP(r->out.sid);
1148 if (flags & NDR_OUT) {
1149 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1150 NDR_PULL_ALLOC(ndr, r->out.sid);
1152 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1153 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
1154 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1155 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1156 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1158 return NDR_ERR_SUCCESS;
1161 _PUBLIC_ void ndr_print_wbint_Gid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Gid2Sid *r)
1163 ndr_print_struct(ndr, name, "wbint_Gid2Sid");
1165 if (flags & NDR_SET_VALUES) {
1166 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1168 if (flags & NDR_IN) {
1169 ndr_print_struct(ndr, "in", "wbint_Gid2Sid");
1171 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1173 if (r->in.dom_name) {
1174 ndr_print_string(ndr, "dom_name", r->in.dom_name);
1177 ndr_print_hyper(ndr, "gid", r->in.gid);
1180 if (flags & NDR_OUT) {
1181 ndr_print_struct(ndr, "out", "wbint_Gid2Sid");
1183 ndr_print_ptr(ndr, "sid", r->out.sid);
1185 ndr_print_dom_sid(ndr, "sid", r->out.sid);
1187 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1193 static enum ndr_err_code ndr_push_wbint_QueryUser(struct ndr_push *ndr, int flags, const struct wbint_QueryUser *r)
1195 if (flags & NDR_IN) {
1196 if (r->in.sid == NULL) {
1197 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1199 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1201 if (flags & NDR_OUT) {
1202 if (r->out.info == NULL) {
1203 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1205 NDR_CHECK(ndr_push_wbint_userinfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
1206 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1208 return NDR_ERR_SUCCESS;
1211 static enum ndr_err_code ndr_pull_wbint_QueryUser(struct ndr_pull *ndr, int flags, struct wbint_QueryUser *r)
1213 TALLOC_CTX *_mem_save_sid_0;
1214 TALLOC_CTX *_mem_save_info_0;
1215 if (flags & NDR_IN) {
1216 ZERO_STRUCT(r->out);
1218 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1219 NDR_PULL_ALLOC(ndr, r->in.sid);
1221 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1222 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1223 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1224 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1225 NDR_PULL_ALLOC(ndr, r->out.info);
1226 ZERO_STRUCTP(r->out.info);
1228 if (flags & NDR_OUT) {
1229 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1230 NDR_PULL_ALLOC(ndr, r->out.info);
1232 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
1233 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
1234 NDR_CHECK(ndr_pull_wbint_userinfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
1235 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
1236 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1238 return NDR_ERR_SUCCESS;
1241 _PUBLIC_ void ndr_print_wbint_QueryUser(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryUser *r)
1243 ndr_print_struct(ndr, name, "wbint_QueryUser");
1245 if (flags & NDR_SET_VALUES) {
1246 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1248 if (flags & NDR_IN) {
1249 ndr_print_struct(ndr, "in", "wbint_QueryUser");
1251 ndr_print_ptr(ndr, "sid", r->in.sid);
1253 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1257 if (flags & NDR_OUT) {
1258 ndr_print_struct(ndr, "out", "wbint_QueryUser");
1260 ndr_print_ptr(ndr, "info", r->out.info);
1262 ndr_print_wbint_userinfo(ndr, "info", r->out.info);
1264 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1270 static enum ndr_err_code ndr_push_wbint_LookupUserAliases(struct ndr_push *ndr, int flags, const struct wbint_LookupUserAliases *r)
1272 if (flags & NDR_IN) {
1273 if (r->in.sids == NULL) {
1274 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1276 NDR_CHECK(ndr_push_wbint_SidArray(ndr, NDR_SCALARS, r->in.sids));
1278 if (flags & NDR_OUT) {
1279 if (r->out.rids == NULL) {
1280 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1282 NDR_CHECK(ndr_push_wbint_RidArray(ndr, NDR_SCALARS, r->out.rids));
1283 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1285 return NDR_ERR_SUCCESS;
1288 static enum ndr_err_code ndr_pull_wbint_LookupUserAliases(struct ndr_pull *ndr, int flags, struct wbint_LookupUserAliases *r)
1290 TALLOC_CTX *_mem_save_sids_0;
1291 TALLOC_CTX *_mem_save_rids_0;
1292 if (flags & NDR_IN) {
1293 ZERO_STRUCT(r->out);
1295 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1296 NDR_PULL_ALLOC(ndr, r->in.sids);
1298 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1299 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
1300 NDR_CHECK(ndr_pull_wbint_SidArray(ndr, NDR_SCALARS, r->in.sids));
1301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
1302 NDR_PULL_ALLOC(ndr, r->out.rids);
1303 ZERO_STRUCTP(r->out.rids);
1305 if (flags & NDR_OUT) {
1306 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1307 NDR_PULL_ALLOC(ndr, r->out.rids);
1309 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1310 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
1311 NDR_CHECK(ndr_pull_wbint_RidArray(ndr, NDR_SCALARS, r->out.rids));
1312 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
1313 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1315 return NDR_ERR_SUCCESS;
1318 _PUBLIC_ void ndr_print_wbint_LookupUserAliases(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserAliases *r)
1320 ndr_print_struct(ndr, name, "wbint_LookupUserAliases");
1322 if (flags & NDR_SET_VALUES) {
1323 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1325 if (flags & NDR_IN) {
1326 ndr_print_struct(ndr, "in", "wbint_LookupUserAliases");
1328 ndr_print_ptr(ndr, "sids", r->in.sids);
1330 ndr_print_wbint_SidArray(ndr, "sids", r->in.sids);
1334 if (flags & NDR_OUT) {
1335 ndr_print_struct(ndr, "out", "wbint_LookupUserAliases");
1337 ndr_print_ptr(ndr, "rids", r->out.rids);
1339 ndr_print_wbint_RidArray(ndr, "rids", r->out.rids);
1341 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1347 static enum ndr_err_code ndr_push_wbint_LookupUserGroups(struct ndr_push *ndr, int flags, const struct wbint_LookupUserGroups *r)
1349 if (flags & NDR_IN) {
1350 if (r->in.sid == NULL) {
1351 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1353 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1355 if (flags & NDR_OUT) {
1356 if (r->out.sids == NULL) {
1357 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1359 NDR_CHECK(ndr_push_wbint_SidArray(ndr, NDR_SCALARS, r->out.sids));
1360 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1362 return NDR_ERR_SUCCESS;
1365 static enum ndr_err_code ndr_pull_wbint_LookupUserGroups(struct ndr_pull *ndr, int flags, struct wbint_LookupUserGroups *r)
1367 TALLOC_CTX *_mem_save_sid_0;
1368 TALLOC_CTX *_mem_save_sids_0;
1369 if (flags & NDR_IN) {
1370 ZERO_STRUCT(r->out);
1372 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1373 NDR_PULL_ALLOC(ndr, r->in.sid);
1375 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1376 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1377 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1378 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1379 NDR_PULL_ALLOC(ndr, r->out.sids);
1380 ZERO_STRUCTP(r->out.sids);
1382 if (flags & NDR_OUT) {
1383 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1384 NDR_PULL_ALLOC(ndr, r->out.sids);
1386 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1387 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
1388 NDR_CHECK(ndr_pull_wbint_SidArray(ndr, NDR_SCALARS, r->out.sids));
1389 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
1390 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1392 return NDR_ERR_SUCCESS;
1395 _PUBLIC_ void ndr_print_wbint_LookupUserGroups(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserGroups *r)
1397 ndr_print_struct(ndr, name, "wbint_LookupUserGroups");
1399 if (flags & NDR_SET_VALUES) {
1400 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1402 if (flags & NDR_IN) {
1403 ndr_print_struct(ndr, "in", "wbint_LookupUserGroups");
1405 ndr_print_ptr(ndr, "sid", r->in.sid);
1407 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1411 if (flags & NDR_OUT) {
1412 ndr_print_struct(ndr, "out", "wbint_LookupUserGroups");
1414 ndr_print_ptr(ndr, "sids", r->out.sids);
1416 ndr_print_wbint_SidArray(ndr, "sids", r->out.sids);
1418 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1424 static enum ndr_err_code ndr_push_wbint_QuerySequenceNumber(struct ndr_push *ndr, int flags, const struct wbint_QuerySequenceNumber *r)
1426 if (flags & NDR_IN) {
1428 if (flags & NDR_OUT) {
1429 if (r->out.sequence == NULL) {
1430 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1432 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sequence));
1433 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1435 return NDR_ERR_SUCCESS;
1438 static enum ndr_err_code ndr_pull_wbint_QuerySequenceNumber(struct ndr_pull *ndr, int flags, struct wbint_QuerySequenceNumber *r)
1440 TALLOC_CTX *_mem_save_sequence_0;
1441 if (flags & NDR_IN) {
1442 ZERO_STRUCT(r->out);
1444 NDR_PULL_ALLOC(ndr, r->out.sequence);
1445 ZERO_STRUCTP(r->out.sequence);
1447 if (flags & NDR_OUT) {
1448 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1449 NDR_PULL_ALLOC(ndr, r->out.sequence);
1451 _mem_save_sequence_0 = NDR_PULL_GET_MEM_CTX(ndr);
1452 NDR_PULL_SET_MEM_CTX(ndr, r->out.sequence, LIBNDR_FLAG_REF_ALLOC);
1453 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sequence));
1454 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_0, LIBNDR_FLAG_REF_ALLOC);
1455 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1457 return NDR_ERR_SUCCESS;
1460 _PUBLIC_ void ndr_print_wbint_QuerySequenceNumber(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QuerySequenceNumber *r)
1462 ndr_print_struct(ndr, name, "wbint_QuerySequenceNumber");
1464 if (flags & NDR_SET_VALUES) {
1465 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1467 if (flags & NDR_IN) {
1468 ndr_print_struct(ndr, "in", "wbint_QuerySequenceNumber");
1472 if (flags & NDR_OUT) {
1473 ndr_print_struct(ndr, "out", "wbint_QuerySequenceNumber");
1475 ndr_print_ptr(ndr, "sequence", r->out.sequence);
1477 ndr_print_uint32(ndr, "sequence", *r->out.sequence);
1479 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1485 static enum ndr_err_code ndr_push_wbint_LookupGroupMembers(struct ndr_push *ndr, int flags, const struct wbint_LookupGroupMembers *r)
1487 if (flags & NDR_IN) {
1488 if (r->in.sid == NULL) {
1489 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1491 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1492 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->in.type));
1494 if (flags & NDR_OUT) {
1495 if (r->out.members == NULL) {
1496 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1498 NDR_CHECK(ndr_push_wbint_GroupMembers(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
1499 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1501 return NDR_ERR_SUCCESS;
1504 static enum ndr_err_code ndr_pull_wbint_LookupGroupMembers(struct ndr_pull *ndr, int flags, struct wbint_LookupGroupMembers *r)
1506 TALLOC_CTX *_mem_save_sid_0;
1507 TALLOC_CTX *_mem_save_members_0;
1508 if (flags & NDR_IN) {
1509 ZERO_STRUCT(r->out);
1511 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1512 NDR_PULL_ALLOC(ndr, r->in.sid);
1514 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1515 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1516 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1517 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1518 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->in.type));
1519 NDR_PULL_ALLOC(ndr, r->out.members);
1520 ZERO_STRUCTP(r->out.members);
1522 if (flags & NDR_OUT) {
1523 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1524 NDR_PULL_ALLOC(ndr, r->out.members);
1526 _mem_save_members_0 = NDR_PULL_GET_MEM_CTX(ndr);
1527 NDR_PULL_SET_MEM_CTX(ndr, r->out.members, LIBNDR_FLAG_REF_ALLOC);
1528 NDR_CHECK(ndr_pull_wbint_GroupMembers(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
1529 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, LIBNDR_FLAG_REF_ALLOC);
1530 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1532 return NDR_ERR_SUCCESS;
1535 _PUBLIC_ void ndr_print_wbint_LookupGroupMembers(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupGroupMembers *r)
1537 ndr_print_struct(ndr, name, "wbint_LookupGroupMembers");
1539 if (flags & NDR_SET_VALUES) {
1540 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1542 if (flags & NDR_IN) {
1543 ndr_print_struct(ndr, "in", "wbint_LookupGroupMembers");
1545 ndr_print_ptr(ndr, "sid", r->in.sid);
1547 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1549 ndr_print_lsa_SidType(ndr, "type", r->in.type);
1552 if (flags & NDR_OUT) {
1553 ndr_print_struct(ndr, "out", "wbint_LookupGroupMembers");
1555 ndr_print_ptr(ndr, "members", r->out.members);
1557 ndr_print_wbint_GroupMembers(ndr, "members", r->out.members);
1559 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1565 static const struct ndr_interface_call wbint_calls[] = {
1568 sizeof(struct wbint_Ping),
1569 (ndr_push_flags_fn_t) ndr_push_wbint_Ping,
1570 (ndr_pull_flags_fn_t) ndr_pull_wbint_Ping,
1571 (ndr_print_function_t) ndr_print_wbint_Ping,
1576 sizeof(struct wbint_LookupSid),
1577 (ndr_push_flags_fn_t) ndr_push_wbint_LookupSid,
1578 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupSid,
1579 (ndr_print_function_t) ndr_print_wbint_LookupSid,
1584 sizeof(struct wbint_LookupName),
1585 (ndr_push_flags_fn_t) ndr_push_wbint_LookupName,
1586 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupName,
1587 (ndr_print_function_t) ndr_print_wbint_LookupName,
1592 sizeof(struct wbint_Sid2Uid),
1593 (ndr_push_flags_fn_t) ndr_push_wbint_Sid2Uid,
1594 (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Uid,
1595 (ndr_print_function_t) ndr_print_wbint_Sid2Uid,
1600 sizeof(struct wbint_Sid2Gid),
1601 (ndr_push_flags_fn_t) ndr_push_wbint_Sid2Gid,
1602 (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Gid,
1603 (ndr_print_function_t) ndr_print_wbint_Sid2Gid,
1608 sizeof(struct wbint_Uid2Sid),
1609 (ndr_push_flags_fn_t) ndr_push_wbint_Uid2Sid,
1610 (ndr_pull_flags_fn_t) ndr_pull_wbint_Uid2Sid,
1611 (ndr_print_function_t) ndr_print_wbint_Uid2Sid,
1616 sizeof(struct wbint_Gid2Sid),
1617 (ndr_push_flags_fn_t) ndr_push_wbint_Gid2Sid,
1618 (ndr_pull_flags_fn_t) ndr_pull_wbint_Gid2Sid,
1619 (ndr_print_function_t) ndr_print_wbint_Gid2Sid,
1624 sizeof(struct wbint_QueryUser),
1625 (ndr_push_flags_fn_t) ndr_push_wbint_QueryUser,
1626 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUser,
1627 (ndr_print_function_t) ndr_print_wbint_QueryUser,
1631 "wbint_LookupUserAliases",
1632 sizeof(struct wbint_LookupUserAliases),
1633 (ndr_push_flags_fn_t) ndr_push_wbint_LookupUserAliases,
1634 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserAliases,
1635 (ndr_print_function_t) ndr_print_wbint_LookupUserAliases,
1639 "wbint_LookupUserGroups",
1640 sizeof(struct wbint_LookupUserGroups),
1641 (ndr_push_flags_fn_t) ndr_push_wbint_LookupUserGroups,
1642 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserGroups,
1643 (ndr_print_function_t) ndr_print_wbint_LookupUserGroups,
1647 "wbint_QuerySequenceNumber",
1648 sizeof(struct wbint_QuerySequenceNumber),
1649 (ndr_push_flags_fn_t) ndr_push_wbint_QuerySequenceNumber,
1650 (ndr_pull_flags_fn_t) ndr_pull_wbint_QuerySequenceNumber,
1651 (ndr_print_function_t) ndr_print_wbint_QuerySequenceNumber,
1655 "wbint_LookupGroupMembers",
1656 sizeof(struct wbint_LookupGroupMembers),
1657 (ndr_push_flags_fn_t) ndr_push_wbint_LookupGroupMembers,
1658 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupGroupMembers,
1659 (ndr_print_function_t) ndr_print_wbint_LookupGroupMembers,
1662 { NULL, 0, NULL, NULL, NULL, false }
1665 static const char * const wbint_endpoint_strings[] = {
1669 static const struct ndr_interface_string_array wbint_endpoints = {
1671 .names = wbint_endpoint_strings
1674 static const char * const wbint_authservice_strings[] = {
1678 static const struct ndr_interface_string_array wbint_authservices = {
1680 .names = wbint_authservice_strings
1684 const struct ndr_interface_table ndr_table_wbint = {
1687 {0xbf09192c,0xed60,0x4928,{0x9d,0xff},{0xd0,0xd7,0xbc,0xb0,0x3e,0xd8}},
1690 .helpstring = NDR_WBINT_HELPSTRING,
1692 .calls = wbint_calls,
1693 .endpoints = &wbint_endpoints,
1694 .authservices = &wbint_authservices