s3:winbind: Rename wbint_GroupMember to wbint_Principal
[ira/wip.git] / source3 / librpc / gen_ndr / ndr_wbint.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_wbint.h"
5
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)
8 {
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         }
19         if (ndr_flags & NDR_BUFFERS) {
20                 if (r->acct_name) {
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));
25                 }
26                 if (r->full_name) {
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));
31                 }
32                 if (r->homedir) {
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));
37                 }
38                 if (r->shell) {
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));
43                 }
44         }
45         return NDR_ERR_SUCCESS;
46 }
47
48 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_userinfo(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfo *r)
49 {
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;
56         uint32_t _ptr_shell;
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));
61                 if (_ptr_acct_name) {
62                         NDR_PULL_ALLOC(ndr, r->acct_name);
63                 } else {
64                         r->acct_name = NULL;
65                 }
66                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_full_name));
67                 if (_ptr_full_name) {
68                         NDR_PULL_ALLOC(ndr, r->full_name);
69                 } else {
70                         r->full_name = NULL;
71                 }
72                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_homedir));
73                 if (_ptr_homedir) {
74                         NDR_PULL_ALLOC(ndr, r->homedir);
75                 } else {
76                         r->homedir = NULL;
77                 }
78                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_shell));
79                 if (_ptr_shell) {
80                         NDR_PULL_ALLOC(ndr, r->shell);
81                 } else {
82                         r->shell = NULL;
83                 }
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));
87         }
88         if (ndr_flags & NDR_BUFFERS) {
89                 if (r->acct_name) {
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));
96                         }
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);
100                 }
101                 if (r->full_name) {
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));
108                         }
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);
112                 }
113                 if (r->homedir) {
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));
120                         }
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);
124                 }
125                 if (r->shell) {
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));
132                         }
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);
136                 }
137         }
138         return NDR_ERR_SUCCESS;
139 }
140
141 _PUBLIC_ void ndr_print_wbint_userinfo(struct ndr_print *ndr, const char *name, const struct wbint_userinfo *r)
142 {
143         ndr_print_struct(ndr, name, "wbint_userinfo");
144         ndr->depth++;
145         ndr_print_ptr(ndr, "acct_name", r->acct_name);
146         ndr->depth++;
147         if (r->acct_name) {
148                 ndr_print_string(ndr, "acct_name", r->acct_name);
149         }
150         ndr->depth--;
151         ndr_print_ptr(ndr, "full_name", r->full_name);
152         ndr->depth++;
153         if (r->full_name) {
154                 ndr_print_string(ndr, "full_name", r->full_name);
155         }
156         ndr->depth--;
157         ndr_print_ptr(ndr, "homedir", r->homedir);
158         ndr->depth++;
159         if (r->homedir) {
160                 ndr_print_string(ndr, "homedir", r->homedir);
161         }
162         ndr->depth--;
163         ndr_print_ptr(ndr, "shell", r->shell);
164         ndr->depth++;
165         if (r->shell) {
166                 ndr_print_string(ndr, "shell", r->shell);
167         }
168         ndr->depth--;
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);
172         ndr->depth--;
173 }
174
175 _PUBLIC_ enum ndr_err_code ndr_push_wbint_SidArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_SidArray *r)
176 {
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]));
184                 }
185         }
186         if (ndr_flags & NDR_BUFFERS) {
187         }
188         return NDR_ERR_SUCCESS;
189 }
190
191 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_SidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_SidArray *r)
192 {
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]));
204                 }
205                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
206                 if (r->sids) {
207                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
208                 }
209         }
210         if (ndr_flags & NDR_BUFFERS) {
211         }
212         return NDR_ERR_SUCCESS;
213 }
214
215 _PUBLIC_ void ndr_print_wbint_SidArray(struct ndr_print *ndr, const char *name, const struct wbint_SidArray *r)
216 {
217         uint32_t cntr_sids_0;
218         ndr_print_struct(ndr, name, "wbint_SidArray");
219         ndr->depth++;
220         ndr_print_uint32(ndr, "num_sids", r->num_sids);
221         ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
222         ndr->depth++;
223         for (cntr_sids_0=0;cntr_sids_0<r->num_sids;cntr_sids_0++) {
224                 char *idx_0=NULL;
225                 if (asprintf(&idx_0, "[%d]", cntr_sids_0) != -1) {
226                         ndr_print_dom_sid(ndr, "sids", &r->sids[cntr_sids_0]);
227                         free(idx_0);
228                 }
229         }
230         ndr->depth--;
231         ndr->depth--;
232 }
233
234 _PUBLIC_ enum ndr_err_code ndr_push_wbint_RidArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_RidArray *r)
235 {
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]));
243                 }
244         }
245         if (ndr_flags & NDR_BUFFERS) {
246         }
247         return NDR_ERR_SUCCESS;
248 }
249
250 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_RidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_RidArray *r)
251 {
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]));
263                 }
264                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
265                 if (r->rids) {
266                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->num_rids));
267                 }
268         }
269         if (ndr_flags & NDR_BUFFERS) {
270         }
271         return NDR_ERR_SUCCESS;
272 }
273
274 _PUBLIC_ void ndr_print_wbint_RidArray(struct ndr_print *ndr, const char *name, const struct wbint_RidArray *r)
275 {
276         uint32_t cntr_rids_0;
277         ndr_print_struct(ndr, name, "wbint_RidArray");
278         ndr->depth++;
279         ndr_print_uint32(ndr, "num_rids", r->num_rids);
280         ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->num_rids);
281         ndr->depth++;
282         for (cntr_rids_0=0;cntr_rids_0<r->num_rids;cntr_rids_0++) {
283                 char *idx_0=NULL;
284                 if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
285                         ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_0]);
286                         free(idx_0);
287                 }
288         }
289         ndr->depth--;
290         ndr->depth--;
291 }
292
293 _PUBLIC_ enum ndr_err_code ndr_push_wbint_Principal(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principal *r)
294 {
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));
300         }
301         if (ndr_flags & NDR_BUFFERS) {
302                 if (r->name) {
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));
307                 }
308         }
309         return NDR_ERR_SUCCESS;
310 }
311
312 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principal(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principal *r)
313 {
314         uint32_t _ptr_name;
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));
321                 if (_ptr_name) {
322                         NDR_PULL_ALLOC(ndr, r->name);
323                 } else {
324                         r->name = NULL;
325                 }
326         }
327         if (ndr_flags & NDR_BUFFERS) {
328                 if (r->name) {
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));
335                         }
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);
339                 }
340         }
341         return NDR_ERR_SUCCESS;
342 }
343
344 _PUBLIC_ void ndr_print_wbint_Principal(struct ndr_print *ndr, const char *name, const struct wbint_Principal *r)
345 {
346         ndr_print_struct(ndr, name, "wbint_Principal");
347         ndr->depth++;
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);
351         ndr->depth++;
352         if (r->name) {
353                 ndr_print_string(ndr, "name", r->name);
354         }
355         ndr->depth--;
356         ndr->depth--;
357 }
358
359 _PUBLIC_ enum ndr_err_code ndr_push_wbint_GroupMembers(struct ndr_push *ndr, int ndr_flags, const struct wbint_GroupMembers *r)
360 {
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]));
368                 }
369         }
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]));
373                 }
374         }
375         return NDR_ERR_SUCCESS;
376 }
377
378 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_GroupMembers(struct ndr_pull *ndr, int ndr_flags, struct wbint_GroupMembers *r)
379 {
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]));
391                 }
392                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, 0);
393                 if (r->members) {
394                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->members, r->num_members));
395                 }
396         }
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]));
402                 }
403                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, 0);
404         }
405         return NDR_ERR_SUCCESS;
406 }
407
408 _PUBLIC_ void ndr_print_wbint_GroupMembers(struct ndr_print *ndr, const char *name, const struct wbint_GroupMembers *r)
409 {
410         uint32_t cntr_members_0;
411         ndr_print_struct(ndr, name, "wbint_GroupMembers");
412         ndr->depth++;
413         ndr_print_int32(ndr, "num_members", r->num_members);
414         ndr->print(ndr, "%s: ARRAY(%d)", "members", (int)r->num_members);
415         ndr->depth++;
416         for (cntr_members_0=0;cntr_members_0<r->num_members;cntr_members_0++) {
417                 char *idx_0=NULL;
418                 if (asprintf(&idx_0, "[%d]", cntr_members_0) != -1) {
419                         ndr_print_wbint_Principal(ndr, "members", &r->members[cntr_members_0]);
420                         free(idx_0);
421                 }
422         }
423         ndr->depth--;
424         ndr->depth--;
425 }
426
427 static enum ndr_err_code ndr_push_wbint_Ping(struct ndr_push *ndr, int flags, const struct wbint_Ping *r)
428 {
429         if (flags & NDR_IN) {
430                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data));
431         }
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");
435                 }
436                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.out_data));
437         }
438         return NDR_ERR_SUCCESS;
439 }
440
441 static enum ndr_err_code ndr_pull_wbint_Ping(struct ndr_pull *ndr, int flags, struct wbint_Ping *r)
442 {
443         TALLOC_CTX *_mem_save_out_data_0;
444         if (flags & NDR_IN) {
445                 ZERO_STRUCT(r->out);
446
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);
450         }
451         if (flags & NDR_OUT) {
452                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
453                         NDR_PULL_ALLOC(ndr, r->out.out_data);
454                 }
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);
459         }
460         return NDR_ERR_SUCCESS;
461 }
462
463 _PUBLIC_ void ndr_print_wbint_Ping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Ping *r)
464 {
465         ndr_print_struct(ndr, name, "wbint_Ping");
466         ndr->depth++;
467         if (flags & NDR_SET_VALUES) {
468                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
469         }
470         if (flags & NDR_IN) {
471                 ndr_print_struct(ndr, "in", "wbint_Ping");
472                 ndr->depth++;
473                 ndr_print_uint32(ndr, "in_data", r->in.in_data);
474                 ndr->depth--;
475         }
476         if (flags & NDR_OUT) {
477                 ndr_print_struct(ndr, "out", "wbint_Ping");
478                 ndr->depth++;
479                 ndr_print_ptr(ndr, "out_data", r->out.out_data);
480                 ndr->depth++;
481                 ndr_print_uint32(ndr, "out_data", *r->out.out_data);
482                 ndr->depth--;
483                 ndr->depth--;
484         }
485         ndr->depth--;
486 }
487
488 static enum ndr_err_code ndr_push_wbint_LookupSid(struct ndr_push *ndr, int flags, const struct wbint_LookupSid *r)
489 {
490         if (flags & NDR_IN) {
491                 if (r->in.sid == NULL) {
492                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
493                 }
494                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
495         }
496         if (flags & NDR_OUT) {
497                 if (r->out.type == NULL) {
498                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
499                 }
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");
503                 }
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));
510                 }
511                 if (r->out.name == NULL) {
512                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
513                 }
514                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name));
515                 if (*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));
520                 }
521                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
522         }
523         return NDR_ERR_SUCCESS;
524 }
525
526 static enum ndr_err_code ndr_pull_wbint_LookupSid(struct ndr_pull *ndr, int flags, struct wbint_LookupSid *r)
527 {
528         uint32_t _ptr_domain;
529         uint32_t _ptr_name;
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) {
537                 ZERO_STRUCT(r->out);
538
539                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
540                         NDR_PULL_ALLOC(ndr, r->in.sid);
541                 }
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);
552         }
553         if (flags & NDR_OUT) {
554                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
555                         NDR_PULL_ALLOC(ndr, r->out.type);
556                 }
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);
563                 }
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));
567                 if (_ptr_domain) {
568                         NDR_PULL_ALLOC(ndr, *r->out.domain);
569                 } else {
570                         *r->out.domain = NULL;
571                 }
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));
579                         }
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);
583                 }
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);
587                 }
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));
591                 if (_ptr_name) {
592                         NDR_PULL_ALLOC(ndr, *r->out.name);
593                 } else {
594                         *r->out.name = NULL;
595                 }
596                 if (*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));
603                         }
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);
607                 }
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));
610         }
611         return NDR_ERR_SUCCESS;
612 }
613
614 _PUBLIC_ void ndr_print_wbint_LookupSid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSid *r)
615 {
616         ndr_print_struct(ndr, name, "wbint_LookupSid");
617         ndr->depth++;
618         if (flags & NDR_SET_VALUES) {
619                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
620         }
621         if (flags & NDR_IN) {
622                 ndr_print_struct(ndr, "in", "wbint_LookupSid");
623                 ndr->depth++;
624                 ndr_print_ptr(ndr, "sid", r->in.sid);
625                 ndr->depth++;
626                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
627                 ndr->depth--;
628                 ndr->depth--;
629         }
630         if (flags & NDR_OUT) {
631                 ndr_print_struct(ndr, "out", "wbint_LookupSid");
632                 ndr->depth++;
633                 ndr_print_ptr(ndr, "type", r->out.type);
634                 ndr->depth++;
635                 ndr_print_lsa_SidType(ndr, "type", *r->out.type);
636                 ndr->depth--;
637                 ndr_print_ptr(ndr, "domain", r->out.domain);
638                 ndr->depth++;
639                 ndr_print_ptr(ndr, "domain", *r->out.domain);
640                 ndr->depth++;
641                 if (*r->out.domain) {
642                         ndr_print_string(ndr, "domain", *r->out.domain);
643                 }
644                 ndr->depth--;
645                 ndr->depth--;
646                 ndr_print_ptr(ndr, "name", r->out.name);
647                 ndr->depth++;
648                 ndr_print_ptr(ndr, "name", *r->out.name);
649                 ndr->depth++;
650                 if (*r->out.name) {
651                         ndr_print_string(ndr, "name", *r->out.name);
652                 }
653                 ndr->depth--;
654                 ndr->depth--;
655                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
656                 ndr->depth--;
657         }
658         ndr->depth--;
659 }
660
661 static enum ndr_err_code ndr_push_wbint_LookupName(struct ndr_push *ndr, int flags, const struct wbint_LookupName *r)
662 {
663         if (flags & NDR_IN) {
664                 if (r->in.domain == NULL) {
665                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
666                 }
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");
673                 }
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));
679         }
680         if (flags & NDR_OUT) {
681                 if (r->out.type == NULL) {
682                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
683                 }
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");
687                 }
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));
690         }
691         return NDR_ERR_SUCCESS;
692 }
693
694 static enum ndr_err_code ndr_pull_wbint_LookupName(struct ndr_pull *ndr, int flags, struct wbint_LookupName *r)
695 {
696         TALLOC_CTX *_mem_save_type_0;
697         TALLOC_CTX *_mem_save_sid_0;
698         if (flags & NDR_IN) {
699                 ZERO_STRUCT(r->out);
700
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));
705                 }
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));
712                 }
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);
720         }
721         if (flags & NDR_OUT) {
722                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
723                         NDR_PULL_ALLOC(ndr, r->out.type);
724                 }
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);
731                 }
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));
737         }
738         return NDR_ERR_SUCCESS;
739 }
740
741 _PUBLIC_ void ndr_print_wbint_LookupName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupName *r)
742 {
743         ndr_print_struct(ndr, name, "wbint_LookupName");
744         ndr->depth++;
745         if (flags & NDR_SET_VALUES) {
746                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
747         }
748         if (flags & NDR_IN) {
749                 ndr_print_struct(ndr, "in", "wbint_LookupName");
750                 ndr->depth++;
751                 ndr_print_ptr(ndr, "domain", r->in.domain);
752                 ndr->depth++;
753                 ndr_print_string(ndr, "domain", r->in.domain);
754                 ndr->depth--;
755                 ndr_print_ptr(ndr, "name", r->in.name);
756                 ndr->depth++;
757                 ndr_print_string(ndr, "name", r->in.name);
758                 ndr->depth--;
759                 ndr_print_uint32(ndr, "flags", r->in.flags);
760                 ndr->depth--;
761         }
762         if (flags & NDR_OUT) {
763                 ndr_print_struct(ndr, "out", "wbint_LookupName");
764                 ndr->depth++;
765                 ndr_print_ptr(ndr, "type", r->out.type);
766                 ndr->depth++;
767                 ndr_print_lsa_SidType(ndr, "type", *r->out.type);
768                 ndr->depth--;
769                 ndr_print_ptr(ndr, "sid", r->out.sid);
770                 ndr->depth++;
771                 ndr_print_dom_sid(ndr, "sid", r->out.sid);
772                 ndr->depth--;
773                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
774                 ndr->depth--;
775         }
776         ndr->depth--;
777 }
778
779 static enum ndr_err_code ndr_push_wbint_Sid2Uid(struct ndr_push *ndr, int flags, const struct wbint_Sid2Uid *r)
780 {
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));
788                 }
789                 if (r->in.sid == NULL) {
790                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
791                 }
792                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
793         }
794         if (flags & NDR_OUT) {
795                 if (r->out.uid == NULL) {
796                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
797                 }
798                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
799                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
800         }
801         return NDR_ERR_SUCCESS;
802 }
803
804 static enum ndr_err_code ndr_pull_wbint_Sid2Uid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Uid *r)
805 {
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) {
811                 ZERO_STRUCT(r->out);
812
813                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
814                 if (_ptr_dom_name) {
815                         NDR_PULL_ALLOC(ndr, r->in.dom_name);
816                 } else {
817                         r->in.dom_name = NULL;
818                 }
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));
826                         }
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);
830                 }
831                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
832                         NDR_PULL_ALLOC(ndr, r->in.sid);
833                 }
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);
840         }
841         if (flags & NDR_OUT) {
842                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
843                         NDR_PULL_ALLOC(ndr, r->out.uid);
844                 }
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));
850         }
851         return NDR_ERR_SUCCESS;
852 }
853
854 _PUBLIC_ void ndr_print_wbint_Sid2Uid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Uid *r)
855 {
856         ndr_print_struct(ndr, name, "wbint_Sid2Uid");
857         ndr->depth++;
858         if (flags & NDR_SET_VALUES) {
859                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
860         }
861         if (flags & NDR_IN) {
862                 ndr_print_struct(ndr, "in", "wbint_Sid2Uid");
863                 ndr->depth++;
864                 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
865                 ndr->depth++;
866                 if (r->in.dom_name) {
867                         ndr_print_string(ndr, "dom_name", r->in.dom_name);
868                 }
869                 ndr->depth--;
870                 ndr_print_ptr(ndr, "sid", r->in.sid);
871                 ndr->depth++;
872                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
873                 ndr->depth--;
874                 ndr->depth--;
875         }
876         if (flags & NDR_OUT) {
877                 ndr_print_struct(ndr, "out", "wbint_Sid2Uid");
878                 ndr->depth++;
879                 ndr_print_ptr(ndr, "uid", r->out.uid);
880                 ndr->depth++;
881                 ndr_print_hyper(ndr, "uid", *r->out.uid);
882                 ndr->depth--;
883                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
884                 ndr->depth--;
885         }
886         ndr->depth--;
887 }
888
889 static enum ndr_err_code ndr_push_wbint_Sid2Gid(struct ndr_push *ndr, int flags, const struct wbint_Sid2Gid *r)
890 {
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));
898                 }
899                 if (r->in.sid == NULL) {
900                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
901                 }
902                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
903         }
904         if (flags & NDR_OUT) {
905                 if (r->out.gid == NULL) {
906                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
907                 }
908                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
909                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
910         }
911         return NDR_ERR_SUCCESS;
912 }
913
914 static enum ndr_err_code ndr_pull_wbint_Sid2Gid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Gid *r)
915 {
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) {
921                 ZERO_STRUCT(r->out);
922
923                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
924                 if (_ptr_dom_name) {
925                         NDR_PULL_ALLOC(ndr, r->in.dom_name);
926                 } else {
927                         r->in.dom_name = NULL;
928                 }
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));
936                         }
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);
940                 }
941                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
942                         NDR_PULL_ALLOC(ndr, r->in.sid);
943                 }
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);
950         }
951         if (flags & NDR_OUT) {
952                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
953                         NDR_PULL_ALLOC(ndr, r->out.gid);
954                 }
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));
960         }
961         return NDR_ERR_SUCCESS;
962 }
963
964 _PUBLIC_ void ndr_print_wbint_Sid2Gid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Gid *r)
965 {
966         ndr_print_struct(ndr, name, "wbint_Sid2Gid");
967         ndr->depth++;
968         if (flags & NDR_SET_VALUES) {
969                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
970         }
971         if (flags & NDR_IN) {
972                 ndr_print_struct(ndr, "in", "wbint_Sid2Gid");
973                 ndr->depth++;
974                 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
975                 ndr->depth++;
976                 if (r->in.dom_name) {
977                         ndr_print_string(ndr, "dom_name", r->in.dom_name);
978                 }
979                 ndr->depth--;
980                 ndr_print_ptr(ndr, "sid", r->in.sid);
981                 ndr->depth++;
982                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
983                 ndr->depth--;
984                 ndr->depth--;
985         }
986         if (flags & NDR_OUT) {
987                 ndr_print_struct(ndr, "out", "wbint_Sid2Gid");
988                 ndr->depth++;
989                 ndr_print_ptr(ndr, "gid", r->out.gid);
990                 ndr->depth++;
991                 ndr_print_hyper(ndr, "gid", *r->out.gid);
992                 ndr->depth--;
993                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
994                 ndr->depth--;
995         }
996         ndr->depth--;
997 }
998
999 static enum ndr_err_code ndr_push_wbint_Uid2Sid(struct ndr_push *ndr, int flags, const struct wbint_Uid2Sid *r)
1000 {
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));
1008                 }
1009                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
1010         }
1011         if (flags & NDR_OUT) {
1012                 if (r->out.sid == NULL) {
1013                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1014                 }
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));
1017         }
1018         return NDR_ERR_SUCCESS;
1019 }
1020
1021 static enum ndr_err_code ndr_pull_wbint_Uid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Uid2Sid *r)
1022 {
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);
1028
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);
1032                 } else {
1033                         r->in.dom_name = NULL;
1034                 }
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));
1042                         }
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);
1046                 }
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);
1050         }
1051         if (flags & NDR_OUT) {
1052                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1053                         NDR_PULL_ALLOC(ndr, r->out.sid);
1054                 }
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));
1060         }
1061         return NDR_ERR_SUCCESS;
1062 }
1063
1064 _PUBLIC_ void ndr_print_wbint_Uid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Uid2Sid *r)
1065 {
1066         ndr_print_struct(ndr, name, "wbint_Uid2Sid");
1067         ndr->depth++;
1068         if (flags & NDR_SET_VALUES) {
1069                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1070         }
1071         if (flags & NDR_IN) {
1072                 ndr_print_struct(ndr, "in", "wbint_Uid2Sid");
1073                 ndr->depth++;
1074                 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1075                 ndr->depth++;
1076                 if (r->in.dom_name) {
1077                         ndr_print_string(ndr, "dom_name", r->in.dom_name);
1078                 }
1079                 ndr->depth--;
1080                 ndr_print_hyper(ndr, "uid", r->in.uid);
1081                 ndr->depth--;
1082         }
1083         if (flags & NDR_OUT) {
1084                 ndr_print_struct(ndr, "out", "wbint_Uid2Sid");
1085                 ndr->depth++;
1086                 ndr_print_ptr(ndr, "sid", r->out.sid);
1087                 ndr->depth++;
1088                 ndr_print_dom_sid(ndr, "sid", r->out.sid);
1089                 ndr->depth--;
1090                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1091                 ndr->depth--;
1092         }
1093         ndr->depth--;
1094 }
1095
1096 static enum ndr_err_code ndr_push_wbint_Gid2Sid(struct ndr_push *ndr, int flags, const struct wbint_Gid2Sid *r)
1097 {
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));
1105                 }
1106                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
1107         }
1108         if (flags & NDR_OUT) {
1109                 if (r->out.sid == NULL) {
1110                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1111                 }
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));
1114         }
1115         return NDR_ERR_SUCCESS;
1116 }
1117
1118 static enum ndr_err_code ndr_pull_wbint_Gid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Gid2Sid *r)
1119 {
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);
1125
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);
1129                 } else {
1130                         r->in.dom_name = NULL;
1131                 }
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));
1139                         }
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);
1143                 }
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);
1147         }
1148         if (flags & NDR_OUT) {
1149                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1150                         NDR_PULL_ALLOC(ndr, r->out.sid);
1151                 }
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));
1157         }
1158         return NDR_ERR_SUCCESS;
1159 }
1160
1161 _PUBLIC_ void ndr_print_wbint_Gid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Gid2Sid *r)
1162 {
1163         ndr_print_struct(ndr, name, "wbint_Gid2Sid");
1164         ndr->depth++;
1165         if (flags & NDR_SET_VALUES) {
1166                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1167         }
1168         if (flags & NDR_IN) {
1169                 ndr_print_struct(ndr, "in", "wbint_Gid2Sid");
1170                 ndr->depth++;
1171                 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1172                 ndr->depth++;
1173                 if (r->in.dom_name) {
1174                         ndr_print_string(ndr, "dom_name", r->in.dom_name);
1175                 }
1176                 ndr->depth--;
1177                 ndr_print_hyper(ndr, "gid", r->in.gid);
1178                 ndr->depth--;
1179         }
1180         if (flags & NDR_OUT) {
1181                 ndr_print_struct(ndr, "out", "wbint_Gid2Sid");
1182                 ndr->depth++;
1183                 ndr_print_ptr(ndr, "sid", r->out.sid);
1184                 ndr->depth++;
1185                 ndr_print_dom_sid(ndr, "sid", r->out.sid);
1186                 ndr->depth--;
1187                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1188                 ndr->depth--;
1189         }
1190         ndr->depth--;
1191 }
1192
1193 static enum ndr_err_code ndr_push_wbint_QueryUser(struct ndr_push *ndr, int flags, const struct wbint_QueryUser *r)
1194 {
1195         if (flags & NDR_IN) {
1196                 if (r->in.sid == NULL) {
1197                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1198                 }
1199                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1200         }
1201         if (flags & NDR_OUT) {
1202                 if (r->out.info == NULL) {
1203                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1204                 }
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));
1207         }
1208         return NDR_ERR_SUCCESS;
1209 }
1210
1211 static enum ndr_err_code ndr_pull_wbint_QueryUser(struct ndr_pull *ndr, int flags, struct wbint_QueryUser *r)
1212 {
1213         TALLOC_CTX *_mem_save_sid_0;
1214         TALLOC_CTX *_mem_save_info_0;
1215         if (flags & NDR_IN) {
1216                 ZERO_STRUCT(r->out);
1217
1218                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1219                         NDR_PULL_ALLOC(ndr, r->in.sid);
1220                 }
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);
1227         }
1228         if (flags & NDR_OUT) {
1229                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1230                         NDR_PULL_ALLOC(ndr, r->out.info);
1231                 }
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));
1237         }
1238         return NDR_ERR_SUCCESS;
1239 }
1240
1241 _PUBLIC_ void ndr_print_wbint_QueryUser(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryUser *r)
1242 {
1243         ndr_print_struct(ndr, name, "wbint_QueryUser");
1244         ndr->depth++;
1245         if (flags & NDR_SET_VALUES) {
1246                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1247         }
1248         if (flags & NDR_IN) {
1249                 ndr_print_struct(ndr, "in", "wbint_QueryUser");
1250                 ndr->depth++;
1251                 ndr_print_ptr(ndr, "sid", r->in.sid);
1252                 ndr->depth++;
1253                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1254                 ndr->depth--;
1255                 ndr->depth--;
1256         }
1257         if (flags & NDR_OUT) {
1258                 ndr_print_struct(ndr, "out", "wbint_QueryUser");
1259                 ndr->depth++;
1260                 ndr_print_ptr(ndr, "info", r->out.info);
1261                 ndr->depth++;
1262                 ndr_print_wbint_userinfo(ndr, "info", r->out.info);
1263                 ndr->depth--;
1264                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1265                 ndr->depth--;
1266         }
1267         ndr->depth--;
1268 }
1269
1270 static enum ndr_err_code ndr_push_wbint_LookupUserAliases(struct ndr_push *ndr, int flags, const struct wbint_LookupUserAliases *r)
1271 {
1272         if (flags & NDR_IN) {
1273                 if (r->in.sids == NULL) {
1274                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1275                 }
1276                 NDR_CHECK(ndr_push_wbint_SidArray(ndr, NDR_SCALARS, r->in.sids));
1277         }
1278         if (flags & NDR_OUT) {
1279                 if (r->out.rids == NULL) {
1280                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1281                 }
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));
1284         }
1285         return NDR_ERR_SUCCESS;
1286 }
1287
1288 static enum ndr_err_code ndr_pull_wbint_LookupUserAliases(struct ndr_pull *ndr, int flags, struct wbint_LookupUserAliases *r)
1289 {
1290         TALLOC_CTX *_mem_save_sids_0;
1291         TALLOC_CTX *_mem_save_rids_0;
1292         if (flags & NDR_IN) {
1293                 ZERO_STRUCT(r->out);
1294
1295                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1296                         NDR_PULL_ALLOC(ndr, r->in.sids);
1297                 }
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);
1304         }
1305         if (flags & NDR_OUT) {
1306                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1307                         NDR_PULL_ALLOC(ndr, r->out.rids);
1308                 }
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));
1314         }
1315         return NDR_ERR_SUCCESS;
1316 }
1317
1318 _PUBLIC_ void ndr_print_wbint_LookupUserAliases(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserAliases *r)
1319 {
1320         ndr_print_struct(ndr, name, "wbint_LookupUserAliases");
1321         ndr->depth++;
1322         if (flags & NDR_SET_VALUES) {
1323                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1324         }
1325         if (flags & NDR_IN) {
1326                 ndr_print_struct(ndr, "in", "wbint_LookupUserAliases");
1327                 ndr->depth++;
1328                 ndr_print_ptr(ndr, "sids", r->in.sids);
1329                 ndr->depth++;
1330                 ndr_print_wbint_SidArray(ndr, "sids", r->in.sids);
1331                 ndr->depth--;
1332                 ndr->depth--;
1333         }
1334         if (flags & NDR_OUT) {
1335                 ndr_print_struct(ndr, "out", "wbint_LookupUserAliases");
1336                 ndr->depth++;
1337                 ndr_print_ptr(ndr, "rids", r->out.rids);
1338                 ndr->depth++;
1339                 ndr_print_wbint_RidArray(ndr, "rids", r->out.rids);
1340                 ndr->depth--;
1341                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1342                 ndr->depth--;
1343         }
1344         ndr->depth--;
1345 }
1346
1347 static enum ndr_err_code ndr_push_wbint_LookupUserGroups(struct ndr_push *ndr, int flags, const struct wbint_LookupUserGroups *r)
1348 {
1349         if (flags & NDR_IN) {
1350                 if (r->in.sid == NULL) {
1351                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1352                 }
1353                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1354         }
1355         if (flags & NDR_OUT) {
1356                 if (r->out.sids == NULL) {
1357                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1358                 }
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));
1361         }
1362         return NDR_ERR_SUCCESS;
1363 }
1364
1365 static enum ndr_err_code ndr_pull_wbint_LookupUserGroups(struct ndr_pull *ndr, int flags, struct wbint_LookupUserGroups *r)
1366 {
1367         TALLOC_CTX *_mem_save_sid_0;
1368         TALLOC_CTX *_mem_save_sids_0;
1369         if (flags & NDR_IN) {
1370                 ZERO_STRUCT(r->out);
1371
1372                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1373                         NDR_PULL_ALLOC(ndr, r->in.sid);
1374                 }
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);
1381         }
1382         if (flags & NDR_OUT) {
1383                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1384                         NDR_PULL_ALLOC(ndr, r->out.sids);
1385                 }
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));
1391         }
1392         return NDR_ERR_SUCCESS;
1393 }
1394
1395 _PUBLIC_ void ndr_print_wbint_LookupUserGroups(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserGroups *r)
1396 {
1397         ndr_print_struct(ndr, name, "wbint_LookupUserGroups");
1398         ndr->depth++;
1399         if (flags & NDR_SET_VALUES) {
1400                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1401         }
1402         if (flags & NDR_IN) {
1403                 ndr_print_struct(ndr, "in", "wbint_LookupUserGroups");
1404                 ndr->depth++;
1405                 ndr_print_ptr(ndr, "sid", r->in.sid);
1406                 ndr->depth++;
1407                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1408                 ndr->depth--;
1409                 ndr->depth--;
1410         }
1411         if (flags & NDR_OUT) {
1412                 ndr_print_struct(ndr, "out", "wbint_LookupUserGroups");
1413                 ndr->depth++;
1414                 ndr_print_ptr(ndr, "sids", r->out.sids);
1415                 ndr->depth++;
1416                 ndr_print_wbint_SidArray(ndr, "sids", r->out.sids);
1417                 ndr->depth--;
1418                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1419                 ndr->depth--;
1420         }
1421         ndr->depth--;
1422 }
1423
1424 static enum ndr_err_code ndr_push_wbint_QuerySequenceNumber(struct ndr_push *ndr, int flags, const struct wbint_QuerySequenceNumber *r)
1425 {
1426         if (flags & NDR_IN) {
1427         }
1428         if (flags & NDR_OUT) {
1429                 if (r->out.sequence == NULL) {
1430                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1431                 }
1432                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sequence));
1433                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1434         }
1435         return NDR_ERR_SUCCESS;
1436 }
1437
1438 static enum ndr_err_code ndr_pull_wbint_QuerySequenceNumber(struct ndr_pull *ndr, int flags, struct wbint_QuerySequenceNumber *r)
1439 {
1440         TALLOC_CTX *_mem_save_sequence_0;
1441         if (flags & NDR_IN) {
1442                 ZERO_STRUCT(r->out);
1443
1444                 NDR_PULL_ALLOC(ndr, r->out.sequence);
1445                 ZERO_STRUCTP(r->out.sequence);
1446         }
1447         if (flags & NDR_OUT) {
1448                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1449                         NDR_PULL_ALLOC(ndr, r->out.sequence);
1450                 }
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));
1456         }
1457         return NDR_ERR_SUCCESS;
1458 }
1459
1460 _PUBLIC_ void ndr_print_wbint_QuerySequenceNumber(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QuerySequenceNumber *r)
1461 {
1462         ndr_print_struct(ndr, name, "wbint_QuerySequenceNumber");
1463         ndr->depth++;
1464         if (flags & NDR_SET_VALUES) {
1465                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1466         }
1467         if (flags & NDR_IN) {
1468                 ndr_print_struct(ndr, "in", "wbint_QuerySequenceNumber");
1469                 ndr->depth++;
1470                 ndr->depth--;
1471         }
1472         if (flags & NDR_OUT) {
1473                 ndr_print_struct(ndr, "out", "wbint_QuerySequenceNumber");
1474                 ndr->depth++;
1475                 ndr_print_ptr(ndr, "sequence", r->out.sequence);
1476                 ndr->depth++;
1477                 ndr_print_uint32(ndr, "sequence", *r->out.sequence);
1478                 ndr->depth--;
1479                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1480                 ndr->depth--;
1481         }
1482         ndr->depth--;
1483 }
1484
1485 static enum ndr_err_code ndr_push_wbint_LookupGroupMembers(struct ndr_push *ndr, int flags, const struct wbint_LookupGroupMembers *r)
1486 {
1487         if (flags & NDR_IN) {
1488                 if (r->in.sid == NULL) {
1489                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1490                 }
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));
1493         }
1494         if (flags & NDR_OUT) {
1495                 if (r->out.members == NULL) {
1496                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1497                 }
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));
1500         }
1501         return NDR_ERR_SUCCESS;
1502 }
1503
1504 static enum ndr_err_code ndr_pull_wbint_LookupGroupMembers(struct ndr_pull *ndr, int flags, struct wbint_LookupGroupMembers *r)
1505 {
1506         TALLOC_CTX *_mem_save_sid_0;
1507         TALLOC_CTX *_mem_save_members_0;
1508         if (flags & NDR_IN) {
1509                 ZERO_STRUCT(r->out);
1510
1511                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1512                         NDR_PULL_ALLOC(ndr, r->in.sid);
1513                 }
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);
1521         }
1522         if (flags & NDR_OUT) {
1523                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1524                         NDR_PULL_ALLOC(ndr, r->out.members);
1525                 }
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));
1531         }
1532         return NDR_ERR_SUCCESS;
1533 }
1534
1535 _PUBLIC_ void ndr_print_wbint_LookupGroupMembers(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupGroupMembers *r)
1536 {
1537         ndr_print_struct(ndr, name, "wbint_LookupGroupMembers");
1538         ndr->depth++;
1539         if (flags & NDR_SET_VALUES) {
1540                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1541         }
1542         if (flags & NDR_IN) {
1543                 ndr_print_struct(ndr, "in", "wbint_LookupGroupMembers");
1544                 ndr->depth++;
1545                 ndr_print_ptr(ndr, "sid", r->in.sid);
1546                 ndr->depth++;
1547                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1548                 ndr->depth--;
1549                 ndr_print_lsa_SidType(ndr, "type", r->in.type);
1550                 ndr->depth--;
1551         }
1552         if (flags & NDR_OUT) {
1553                 ndr_print_struct(ndr, "out", "wbint_LookupGroupMembers");
1554                 ndr->depth++;
1555                 ndr_print_ptr(ndr, "members", r->out.members);
1556                 ndr->depth++;
1557                 ndr_print_wbint_GroupMembers(ndr, "members", r->out.members);
1558                 ndr->depth--;
1559                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1560                 ndr->depth--;
1561         }
1562         ndr->depth--;
1563 }
1564
1565 static const struct ndr_interface_call wbint_calls[] = {
1566         {
1567                 "wbint_Ping",
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,
1572                 false,
1573         },
1574         {
1575                 "wbint_LookupSid",
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,
1580                 false,
1581         },
1582         {
1583                 "wbint_LookupName",
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,
1588                 false,
1589         },
1590         {
1591                 "wbint_Sid2Uid",
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,
1596                 false,
1597         },
1598         {
1599                 "wbint_Sid2Gid",
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,
1604                 false,
1605         },
1606         {
1607                 "wbint_Uid2Sid",
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,
1612                 false,
1613         },
1614         {
1615                 "wbint_Gid2Sid",
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,
1620                 false,
1621         },
1622         {
1623                 "wbint_QueryUser",
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,
1628                 false,
1629         },
1630         {
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,
1636                 false,
1637         },
1638         {
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,
1644                 false,
1645         },
1646         {
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,
1652                 false,
1653         },
1654         {
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,
1660                 false,
1661         },
1662         { NULL, 0, NULL, NULL, NULL, false }
1663 };
1664
1665 static const char * const wbint_endpoint_strings[] = {
1666         "ncalrpc:",
1667 };
1668
1669 static const struct ndr_interface_string_array wbint_endpoints = {
1670         .count  = 1,
1671         .names  = wbint_endpoint_strings
1672 };
1673
1674 static const char * const wbint_authservice_strings[] = {
1675         "host",
1676 };
1677
1678 static const struct ndr_interface_string_array wbint_authservices = {
1679         .count  = 1,
1680         .names  = wbint_authservice_strings
1681 };
1682
1683
1684 const struct ndr_interface_table ndr_table_wbint = {
1685         .name           = "wbint",
1686         .syntax_id      = {
1687                 {0xbf09192c,0xed60,0x4928,{0x9d,0xff},{0xd0,0xd7,0xbc,0xb0,0x3e,0xd8}},
1688                 NDR_WBINT_VERSION
1689         },
1690         .helpstring     = NDR_WBINT_HELPSTRING,
1691         .num_calls      = 12,
1692         .calls          = wbint_calls,
1693         .endpoints      = &wbint_endpoints,
1694         .authservices   = &wbint_authservices
1695 };
1696