s3-spoolss: pre cosmetics: reorder levels in construct_printer_info levels.
[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                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
19         }
20         if (ndr_flags & NDR_BUFFERS) {
21                 if (r->acct_name) {
22                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->acct_name, CH_UTF8)));
23                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->acct_name, CH_UTF8)));
25                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->acct_name, ndr_charset_length(r->acct_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
26                 }
27                 if (r->full_name) {
28                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->full_name, CH_UTF8)));
29                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
30                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->full_name, CH_UTF8)));
31                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->full_name, ndr_charset_length(r->full_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
32                 }
33                 if (r->homedir) {
34                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
35                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
36                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
37                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->homedir, ndr_charset_length(r->homedir, CH_UTF8), sizeof(uint8_t), CH_UTF8));
38                 }
39                 if (r->shell) {
40                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
41                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
42                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
43                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->shell, ndr_charset_length(r->shell, CH_UTF8), sizeof(uint8_t), CH_UTF8));
44                 }
45         }
46         return NDR_ERR_SUCCESS;
47 }
48
49 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_userinfo(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfo *r)
50 {
51         uint32_t _ptr_acct_name;
52         TALLOC_CTX *_mem_save_acct_name_0;
53         uint32_t _ptr_full_name;
54         TALLOC_CTX *_mem_save_full_name_0;
55         uint32_t _ptr_homedir;
56         TALLOC_CTX *_mem_save_homedir_0;
57         uint32_t _ptr_shell;
58         TALLOC_CTX *_mem_save_shell_0;
59         if (ndr_flags & NDR_SCALARS) {
60                 NDR_CHECK(ndr_pull_align(ndr, 8));
61                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_acct_name));
62                 if (_ptr_acct_name) {
63                         NDR_PULL_ALLOC(ndr, r->acct_name);
64                 } else {
65                         r->acct_name = NULL;
66                 }
67                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_full_name));
68                 if (_ptr_full_name) {
69                         NDR_PULL_ALLOC(ndr, r->full_name);
70                 } else {
71                         r->full_name = NULL;
72                 }
73                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_homedir));
74                 if (_ptr_homedir) {
75                         NDR_PULL_ALLOC(ndr, r->homedir);
76                 } else {
77                         r->homedir = NULL;
78                 }
79                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_shell));
80                 if (_ptr_shell) {
81                         NDR_PULL_ALLOC(ndr, r->shell);
82                 } else {
83                         r->shell = NULL;
84                 }
85                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->primary_gid));
86                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->user_sid));
87                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->group_sid));
88                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
89         }
90         if (ndr_flags & NDR_BUFFERS) {
91                 if (r->acct_name) {
92                         _mem_save_acct_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
93                         NDR_PULL_SET_MEM_CTX(ndr, r->acct_name, 0);
94                         NDR_CHECK(ndr_pull_array_size(ndr, &r->acct_name));
95                         NDR_CHECK(ndr_pull_array_length(ndr, &r->acct_name));
96                         if (ndr_get_array_length(ndr, &r->acct_name) > ndr_get_array_size(ndr, &r->acct_name)) {
97                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->acct_name), ndr_get_array_length(ndr, &r->acct_name));
98                         }
99                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->acct_name), sizeof(uint8_t)));
100                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->acct_name, ndr_get_array_length(ndr, &r->acct_name), sizeof(uint8_t), CH_UTF8));
101                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_name_0, 0);
102                 }
103                 if (r->full_name) {
104                         _mem_save_full_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
105                         NDR_PULL_SET_MEM_CTX(ndr, r->full_name, 0);
106                         NDR_CHECK(ndr_pull_array_size(ndr, &r->full_name));
107                         NDR_CHECK(ndr_pull_array_length(ndr, &r->full_name));
108                         if (ndr_get_array_length(ndr, &r->full_name) > ndr_get_array_size(ndr, &r->full_name)) {
109                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->full_name), ndr_get_array_length(ndr, &r->full_name));
110                         }
111                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->full_name), sizeof(uint8_t)));
112                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->full_name, ndr_get_array_length(ndr, &r->full_name), sizeof(uint8_t), CH_UTF8));
113                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_full_name_0, 0);
114                 }
115                 if (r->homedir) {
116                         _mem_save_homedir_0 = NDR_PULL_GET_MEM_CTX(ndr);
117                         NDR_PULL_SET_MEM_CTX(ndr, r->homedir, 0);
118                         NDR_CHECK(ndr_pull_array_size(ndr, &r->homedir));
119                         NDR_CHECK(ndr_pull_array_length(ndr, &r->homedir));
120                         if (ndr_get_array_length(ndr, &r->homedir) > ndr_get_array_size(ndr, &r->homedir)) {
121                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->homedir), ndr_get_array_length(ndr, &r->homedir));
122                         }
123                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t)));
124                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->homedir, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t), CH_UTF8));
125                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_homedir_0, 0);
126                 }
127                 if (r->shell) {
128                         _mem_save_shell_0 = NDR_PULL_GET_MEM_CTX(ndr);
129                         NDR_PULL_SET_MEM_CTX(ndr, r->shell, 0);
130                         NDR_CHECK(ndr_pull_array_size(ndr, &r->shell));
131                         NDR_CHECK(ndr_pull_array_length(ndr, &r->shell));
132                         if (ndr_get_array_length(ndr, &r->shell) > ndr_get_array_size(ndr, &r->shell)) {
133                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->shell), ndr_get_array_length(ndr, &r->shell));
134                         }
135                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t)));
136                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->shell, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t), CH_UTF8));
137                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_shell_0, 0);
138                 }
139         }
140         return NDR_ERR_SUCCESS;
141 }
142
143 _PUBLIC_ void ndr_print_wbint_userinfo(struct ndr_print *ndr, const char *name, const struct wbint_userinfo *r)
144 {
145         ndr_print_struct(ndr, name, "wbint_userinfo");
146         ndr->depth++;
147         ndr_print_ptr(ndr, "acct_name", r->acct_name);
148         ndr->depth++;
149         if (r->acct_name) {
150                 ndr_print_string(ndr, "acct_name", r->acct_name);
151         }
152         ndr->depth--;
153         ndr_print_ptr(ndr, "full_name", r->full_name);
154         ndr->depth++;
155         if (r->full_name) {
156                 ndr_print_string(ndr, "full_name", r->full_name);
157         }
158         ndr->depth--;
159         ndr_print_ptr(ndr, "homedir", r->homedir);
160         ndr->depth++;
161         if (r->homedir) {
162                 ndr_print_string(ndr, "homedir", r->homedir);
163         }
164         ndr->depth--;
165         ndr_print_ptr(ndr, "shell", r->shell);
166         ndr->depth++;
167         if (r->shell) {
168                 ndr_print_string(ndr, "shell", r->shell);
169         }
170         ndr->depth--;
171         ndr_print_hyper(ndr, "primary_gid", r->primary_gid);
172         ndr_print_dom_sid(ndr, "user_sid", &r->user_sid);
173         ndr_print_dom_sid(ndr, "group_sid", &r->group_sid);
174         ndr->depth--;
175 }
176
177 _PUBLIC_ enum ndr_err_code ndr_push_wbint_SidArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_SidArray *r)
178 {
179         uint32_t cntr_sids_0;
180         if (ndr_flags & NDR_SCALARS) {
181                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
182                 NDR_CHECK(ndr_push_align(ndr, 4));
183                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
184                 for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) {
185                         NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
186                 }
187                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
188         }
189         if (ndr_flags & NDR_BUFFERS) {
190         }
191         return NDR_ERR_SUCCESS;
192 }
193
194 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_SidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_SidArray *r)
195 {
196         uint32_t cntr_sids_0;
197         TALLOC_CTX *_mem_save_sids_0;
198         if (ndr_flags & NDR_SCALARS) {
199                 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
200                 NDR_CHECK(ndr_pull_align(ndr, 4));
201                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
202                 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
203                 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
204                 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
205                 for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) {
206                         NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
207                 }
208                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
209                 if (r->sids) {
210                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
211                 }
212                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
213         }
214         if (ndr_flags & NDR_BUFFERS) {
215         }
216         return NDR_ERR_SUCCESS;
217 }
218
219 _PUBLIC_ void ndr_print_wbint_SidArray(struct ndr_print *ndr, const char *name, const struct wbint_SidArray *r)
220 {
221         uint32_t cntr_sids_0;
222         ndr_print_struct(ndr, name, "wbint_SidArray");
223         ndr->depth++;
224         ndr_print_uint32(ndr, "num_sids", r->num_sids);
225         ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
226         ndr->depth++;
227         for (cntr_sids_0=0;cntr_sids_0<r->num_sids;cntr_sids_0++) {
228                 char *idx_0=NULL;
229                 if (asprintf(&idx_0, "[%d]", cntr_sids_0) != -1) {
230                         ndr_print_dom_sid(ndr, "sids", &r->sids[cntr_sids_0]);
231                         free(idx_0);
232                 }
233         }
234         ndr->depth--;
235         ndr->depth--;
236 }
237
238 _PUBLIC_ enum ndr_err_code ndr_push_wbint_RidArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_RidArray *r)
239 {
240         uint32_t cntr_rids_0;
241         if (ndr_flags & NDR_SCALARS) {
242                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
243                 NDR_CHECK(ndr_push_align(ndr, 4));
244                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
245                 for (cntr_rids_0 = 0; cntr_rids_0 < r->num_rids; cntr_rids_0++) {
246                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_0]));
247                 }
248                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
249         }
250         if (ndr_flags & NDR_BUFFERS) {
251         }
252         return NDR_ERR_SUCCESS;
253 }
254
255 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_RidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_RidArray *r)
256 {
257         uint32_t cntr_rids_0;
258         TALLOC_CTX *_mem_save_rids_0;
259         if (ndr_flags & NDR_SCALARS) {
260                 NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
261                 NDR_CHECK(ndr_pull_align(ndr, 4));
262                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_rids));
263                 NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
264                 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
265                 NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
266                 for (cntr_rids_0 = 0; cntr_rids_0 < r->num_rids; cntr_rids_0++) {
267                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_0]));
268                 }
269                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
270                 if (r->rids) {
271                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->num_rids));
272                 }
273                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
274         }
275         if (ndr_flags & NDR_BUFFERS) {
276         }
277         return NDR_ERR_SUCCESS;
278 }
279
280 _PUBLIC_ void ndr_print_wbint_RidArray(struct ndr_print *ndr, const char *name, const struct wbint_RidArray *r)
281 {
282         uint32_t cntr_rids_0;
283         ndr_print_struct(ndr, name, "wbint_RidArray");
284         ndr->depth++;
285         ndr_print_uint32(ndr, "num_rids", r->num_rids);
286         ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->num_rids);
287         ndr->depth++;
288         for (cntr_rids_0=0;cntr_rids_0<r->num_rids;cntr_rids_0++) {
289                 char *idx_0=NULL;
290                 if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
291                         ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_0]);
292                         free(idx_0);
293                 }
294         }
295         ndr->depth--;
296         ndr->depth--;
297 }
298
299 _PUBLIC_ enum ndr_err_code ndr_push_wbint_Principal(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principal *r)
300 {
301         if (ndr_flags & NDR_SCALARS) {
302                 NDR_CHECK(ndr_push_align(ndr, 5));
303                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
304                 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->type));
305                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
306                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
307         }
308         if (ndr_flags & NDR_BUFFERS) {
309                 if (r->name) {
310                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
311                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
312                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
313                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
314                 }
315         }
316         return NDR_ERR_SUCCESS;
317 }
318
319 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principal(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principal *r)
320 {
321         uint32_t _ptr_name;
322         TALLOC_CTX *_mem_save_name_0;
323         if (ndr_flags & NDR_SCALARS) {
324                 NDR_CHECK(ndr_pull_align(ndr, 5));
325                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sid));
326                 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->type));
327                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
328                 if (_ptr_name) {
329                         NDR_PULL_ALLOC(ndr, r->name);
330                 } else {
331                         r->name = NULL;
332                 }
333                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
334         }
335         if (ndr_flags & NDR_BUFFERS) {
336                 if (r->name) {
337                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
338                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
339                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
340                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
341                         if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
342                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
343                         }
344                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint8_t)));
345                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint8_t), CH_UTF8));
346                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
347                 }
348         }
349         return NDR_ERR_SUCCESS;
350 }
351
352 _PUBLIC_ void ndr_print_wbint_Principal(struct ndr_print *ndr, const char *name, const struct wbint_Principal *r)
353 {
354         ndr_print_struct(ndr, name, "wbint_Principal");
355         ndr->depth++;
356         ndr_print_dom_sid(ndr, "sid", &r->sid);
357         ndr_print_lsa_SidType(ndr, "type", r->type);
358         ndr_print_ptr(ndr, "name", r->name);
359         ndr->depth++;
360         if (r->name) {
361                 ndr_print_string(ndr, "name", r->name);
362         }
363         ndr->depth--;
364         ndr->depth--;
365 }
366
367 _PUBLIC_ enum ndr_err_code ndr_push_wbint_Principals(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principals *r)
368 {
369         uint32_t cntr_principals_0;
370         if (ndr_flags & NDR_SCALARS) {
371                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_principals));
372                 NDR_CHECK(ndr_push_align(ndr, 5));
373                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->num_principals));
374                 for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
375                         NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_SCALARS, &r->principals[cntr_principals_0]));
376                 }
377                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
378         }
379         if (ndr_flags & NDR_BUFFERS) {
380                 for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
381                         NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_BUFFERS, &r->principals[cntr_principals_0]));
382                 }
383         }
384         return NDR_ERR_SUCCESS;
385 }
386
387 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principals(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principals *r)
388 {
389         uint32_t cntr_principals_0;
390         TALLOC_CTX *_mem_save_principals_0;
391         if (ndr_flags & NDR_SCALARS) {
392                 NDR_CHECK(ndr_pull_array_size(ndr, &r->principals));
393                 NDR_CHECK(ndr_pull_align(ndr, 5));
394                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->num_principals));
395                 NDR_PULL_ALLOC_N(ndr, r->principals, ndr_get_array_size(ndr, &r->principals));
396                 _mem_save_principals_0 = NDR_PULL_GET_MEM_CTX(ndr);
397                 NDR_PULL_SET_MEM_CTX(ndr, r->principals, 0);
398                 for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
399                         NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_SCALARS, &r->principals[cntr_principals_0]));
400                 }
401                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_principals_0, 0);
402                 if (r->principals) {
403                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->principals, r->num_principals));
404                 }
405                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
406         }
407         if (ndr_flags & NDR_BUFFERS) {
408                 _mem_save_principals_0 = NDR_PULL_GET_MEM_CTX(ndr);
409                 NDR_PULL_SET_MEM_CTX(ndr, r->principals, 0);
410                 for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
411                         NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_BUFFERS, &r->principals[cntr_principals_0]));
412                 }
413                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_principals_0, 0);
414         }
415         return NDR_ERR_SUCCESS;
416 }
417
418 _PUBLIC_ void ndr_print_wbint_Principals(struct ndr_print *ndr, const char *name, const struct wbint_Principals *r)
419 {
420         uint32_t cntr_principals_0;
421         ndr_print_struct(ndr, name, "wbint_Principals");
422         ndr->depth++;
423         ndr_print_int32(ndr, "num_principals", r->num_principals);
424         ndr->print(ndr, "%s: ARRAY(%d)", "principals", (int)r->num_principals);
425         ndr->depth++;
426         for (cntr_principals_0=0;cntr_principals_0<r->num_principals;cntr_principals_0++) {
427                 char *idx_0=NULL;
428                 if (asprintf(&idx_0, "[%d]", cntr_principals_0) != -1) {
429                         ndr_print_wbint_Principal(ndr, "principals", &r->principals[cntr_principals_0]);
430                         free(idx_0);
431                 }
432         }
433         ndr->depth--;
434         ndr->depth--;
435 }
436
437 _PUBLIC_ enum ndr_err_code ndr_push_wbint_userinfos(struct ndr_push *ndr, int ndr_flags, const struct wbint_userinfos *r)
438 {
439         uint32_t cntr_userinfos_0;
440         if (ndr_flags & NDR_SCALARS) {
441                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_userinfos));
442                 NDR_CHECK(ndr_push_align(ndr, 8));
443                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_userinfos));
444                 for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
445                         NDR_CHECK(ndr_push_wbint_userinfo(ndr, NDR_SCALARS, &r->userinfos[cntr_userinfos_0]));
446                 }
447                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
448         }
449         if (ndr_flags & NDR_BUFFERS) {
450                 for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
451                         NDR_CHECK(ndr_push_wbint_userinfo(ndr, NDR_BUFFERS, &r->userinfos[cntr_userinfos_0]));
452                 }
453         }
454         return NDR_ERR_SUCCESS;
455 }
456
457 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_userinfos(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfos *r)
458 {
459         uint32_t cntr_userinfos_0;
460         TALLOC_CTX *_mem_save_userinfos_0;
461         if (ndr_flags & NDR_SCALARS) {
462                 NDR_CHECK(ndr_pull_array_size(ndr, &r->userinfos));
463                 NDR_CHECK(ndr_pull_align(ndr, 8));
464                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_userinfos));
465                 NDR_PULL_ALLOC_N(ndr, r->userinfos, ndr_get_array_size(ndr, &r->userinfos));
466                 _mem_save_userinfos_0 = NDR_PULL_GET_MEM_CTX(ndr);
467                 NDR_PULL_SET_MEM_CTX(ndr, r->userinfos, 0);
468                 for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
469                         NDR_CHECK(ndr_pull_wbint_userinfo(ndr, NDR_SCALARS, &r->userinfos[cntr_userinfos_0]));
470                 }
471                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userinfos_0, 0);
472                 if (r->userinfos) {
473                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->userinfos, r->num_userinfos));
474                 }
475                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
476         }
477         if (ndr_flags & NDR_BUFFERS) {
478                 _mem_save_userinfos_0 = NDR_PULL_GET_MEM_CTX(ndr);
479                 NDR_PULL_SET_MEM_CTX(ndr, r->userinfos, 0);
480                 for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
481                         NDR_CHECK(ndr_pull_wbint_userinfo(ndr, NDR_BUFFERS, &r->userinfos[cntr_userinfos_0]));
482                 }
483                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userinfos_0, 0);
484         }
485         return NDR_ERR_SUCCESS;
486 }
487
488 _PUBLIC_ void ndr_print_wbint_userinfos(struct ndr_print *ndr, const char *name, const struct wbint_userinfos *r)
489 {
490         uint32_t cntr_userinfos_0;
491         ndr_print_struct(ndr, name, "wbint_userinfos");
492         ndr->depth++;
493         ndr_print_uint32(ndr, "num_userinfos", r->num_userinfos);
494         ndr->print(ndr, "%s: ARRAY(%d)", "userinfos", (int)r->num_userinfos);
495         ndr->depth++;
496         for (cntr_userinfos_0=0;cntr_userinfos_0<r->num_userinfos;cntr_userinfos_0++) {
497                 char *idx_0=NULL;
498                 if (asprintf(&idx_0, "[%d]", cntr_userinfos_0) != -1) {
499                         ndr_print_wbint_userinfo(ndr, "userinfos", &r->userinfos[cntr_userinfos_0]);
500                         free(idx_0);
501                 }
502         }
503         ndr->depth--;
504         ndr->depth--;
505 }
506
507 _PUBLIC_ enum ndr_err_code ndr_push_wbint_IdType(struct ndr_push *ndr, int ndr_flags, enum wbint_IdType r)
508 {
509         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
510         return NDR_ERR_SUCCESS;
511 }
512
513 _PUBLIC_ enum ndr_err_code ndr_pull_wbint_IdType(struct ndr_pull *ndr, int ndr_flags, enum wbint_IdType *r)
514 {
515         uint16_t v;
516         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
517         *r = v;
518         return NDR_ERR_SUCCESS;
519 }
520
521 _PUBLIC_ void ndr_print_wbint_IdType(struct ndr_print *ndr, const char *name, enum wbint_IdType r)
522 {
523         const char *val = NULL;
524
525         switch (r) {
526                 case WBINT_ID_TYPE_NOT_SPECIFIED: val = "WBINT_ID_TYPE_NOT_SPECIFIED"; break;
527                 case WBINT_ID_TYPE_UID: val = "WBINT_ID_TYPE_UID"; break;
528                 case WBINT_ID_TYPE_GID: val = "WBINT_ID_TYPE_GID"; break;
529         }
530         ndr_print_enum(ndr, name, "ENUM", val, r);
531 }
532
533 static enum ndr_err_code ndr_push_wbint_Ping(struct ndr_push *ndr, int flags, const struct wbint_Ping *r)
534 {
535         if (flags & NDR_IN) {
536                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data));
537         }
538         if (flags & NDR_OUT) {
539                 if (r->out.out_data == NULL) {
540                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
541                 }
542                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.out_data));
543         }
544         return NDR_ERR_SUCCESS;
545 }
546
547 static enum ndr_err_code ndr_pull_wbint_Ping(struct ndr_pull *ndr, int flags, struct wbint_Ping *r)
548 {
549         TALLOC_CTX *_mem_save_out_data_0;
550         if (flags & NDR_IN) {
551                 ZERO_STRUCT(r->out);
552
553                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.in_data));
554                 NDR_PULL_ALLOC(ndr, r->out.out_data);
555                 ZERO_STRUCTP(r->out.out_data);
556         }
557         if (flags & NDR_OUT) {
558                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
559                         NDR_PULL_ALLOC(ndr, r->out.out_data);
560                 }
561                 _mem_save_out_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
562                 NDR_PULL_SET_MEM_CTX(ndr, r->out.out_data, LIBNDR_FLAG_REF_ALLOC);
563                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.out_data));
564                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_data_0, LIBNDR_FLAG_REF_ALLOC);
565         }
566         return NDR_ERR_SUCCESS;
567 }
568
569 _PUBLIC_ void ndr_print_wbint_Ping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Ping *r)
570 {
571         ndr_print_struct(ndr, name, "wbint_Ping");
572         ndr->depth++;
573         if (flags & NDR_SET_VALUES) {
574                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
575         }
576         if (flags & NDR_IN) {
577                 ndr_print_struct(ndr, "in", "wbint_Ping");
578                 ndr->depth++;
579                 ndr_print_uint32(ndr, "in_data", r->in.in_data);
580                 ndr->depth--;
581         }
582         if (flags & NDR_OUT) {
583                 ndr_print_struct(ndr, "out", "wbint_Ping");
584                 ndr->depth++;
585                 ndr_print_ptr(ndr, "out_data", r->out.out_data);
586                 ndr->depth++;
587                 ndr_print_uint32(ndr, "out_data", *r->out.out_data);
588                 ndr->depth--;
589                 ndr->depth--;
590         }
591         ndr->depth--;
592 }
593
594 static enum ndr_err_code ndr_push_wbint_LookupSid(struct ndr_push *ndr, int flags, const struct wbint_LookupSid *r)
595 {
596         if (flags & NDR_IN) {
597                 if (r->in.sid == NULL) {
598                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
599                 }
600                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
601         }
602         if (flags & NDR_OUT) {
603                 if (r->out.type == NULL) {
604                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
605                 }
606                 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, *r->out.type));
607                 if (r->out.domain == NULL) {
608                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
609                 }
610                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domain));
611                 if (*r->out.domain) {
612                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.domain, CH_UTF8)));
613                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
614                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.domain, CH_UTF8)));
615                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.domain, ndr_charset_length(*r->out.domain, CH_UTF8), sizeof(uint8_t), CH_UTF8));
616                 }
617                 if (r->out.name == NULL) {
618                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
619                 }
620                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name));
621                 if (*r->out.name) {
622                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name, CH_UTF8)));
623                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
624                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name, CH_UTF8)));
625                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.name, ndr_charset_length(*r->out.name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
626                 }
627                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
628         }
629         return NDR_ERR_SUCCESS;
630 }
631
632 static enum ndr_err_code ndr_pull_wbint_LookupSid(struct ndr_pull *ndr, int flags, struct wbint_LookupSid *r)
633 {
634         uint32_t _ptr_domain;
635         uint32_t _ptr_name;
636         TALLOC_CTX *_mem_save_sid_0;
637         TALLOC_CTX *_mem_save_type_0;
638         TALLOC_CTX *_mem_save_domain_0;
639         TALLOC_CTX *_mem_save_domain_1;
640         TALLOC_CTX *_mem_save_name_0;
641         TALLOC_CTX *_mem_save_name_1;
642         if (flags & NDR_IN) {
643                 ZERO_STRUCT(r->out);
644
645                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
646                         NDR_PULL_ALLOC(ndr, r->in.sid);
647                 }
648                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
649                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
650                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
651                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
652                 NDR_PULL_ALLOC(ndr, r->out.type);
653                 ZERO_STRUCTP(r->out.type);
654                 NDR_PULL_ALLOC(ndr, r->out.domain);
655                 ZERO_STRUCTP(r->out.domain);
656                 NDR_PULL_ALLOC(ndr, r->out.name);
657                 ZERO_STRUCTP(r->out.name);
658         }
659         if (flags & NDR_OUT) {
660                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
661                         NDR_PULL_ALLOC(ndr, r->out.type);
662                 }
663                 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
664                 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
665                 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, r->out.type));
666                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
667                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
668                         NDR_PULL_ALLOC(ndr, r->out.domain);
669                 }
670                 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
671                 NDR_PULL_SET_MEM_CTX(ndr, r->out.domain, LIBNDR_FLAG_REF_ALLOC);
672                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
673                 if (_ptr_domain) {
674                         NDR_PULL_ALLOC(ndr, *r->out.domain);
675                 } else {
676                         *r->out.domain = NULL;
677                 }
678                 if (*r->out.domain) {
679                         _mem_save_domain_1 = NDR_PULL_GET_MEM_CTX(ndr);
680                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.domain, 0);
681                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.domain));
682                         NDR_CHECK(ndr_pull_array_length(ndr, r->out.domain));
683                         if (ndr_get_array_length(ndr, r->out.domain) > ndr_get_array_size(ndr, r->out.domain)) {
684                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.domain), ndr_get_array_length(ndr, r->out.domain));
685                         }
686                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.domain), sizeof(uint8_t)));
687                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.domain, ndr_get_array_length(ndr, r->out.domain), sizeof(uint8_t), CH_UTF8));
688                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_1, 0);
689                 }
690                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, LIBNDR_FLAG_REF_ALLOC);
691                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
692                         NDR_PULL_ALLOC(ndr, r->out.name);
693                 }
694                 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
695                 NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
696                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
697                 if (_ptr_name) {
698                         NDR_PULL_ALLOC(ndr, *r->out.name);
699                 } else {
700                         *r->out.name = NULL;
701                 }
702                 if (*r->out.name) {
703                         _mem_save_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
704                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.name, 0);
705                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.name));
706                         NDR_CHECK(ndr_pull_array_length(ndr, r->out.name));
707                         if (ndr_get_array_length(ndr, r->out.name) > ndr_get_array_size(ndr, r->out.name)) {
708                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.name), ndr_get_array_length(ndr, r->out.name));
709                         }
710                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.name), sizeof(uint8_t)));
711                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.name, ndr_get_array_length(ndr, r->out.name), sizeof(uint8_t), CH_UTF8));
712                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_1, 0);
713                 }
714                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
715                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
716         }
717         return NDR_ERR_SUCCESS;
718 }
719
720 _PUBLIC_ void ndr_print_wbint_LookupSid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSid *r)
721 {
722         ndr_print_struct(ndr, name, "wbint_LookupSid");
723         ndr->depth++;
724         if (flags & NDR_SET_VALUES) {
725                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
726         }
727         if (flags & NDR_IN) {
728                 ndr_print_struct(ndr, "in", "wbint_LookupSid");
729                 ndr->depth++;
730                 ndr_print_ptr(ndr, "sid", r->in.sid);
731                 ndr->depth++;
732                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
733                 ndr->depth--;
734                 ndr->depth--;
735         }
736         if (flags & NDR_OUT) {
737                 ndr_print_struct(ndr, "out", "wbint_LookupSid");
738                 ndr->depth++;
739                 ndr_print_ptr(ndr, "type", r->out.type);
740                 ndr->depth++;
741                 ndr_print_lsa_SidType(ndr, "type", *r->out.type);
742                 ndr->depth--;
743                 ndr_print_ptr(ndr, "domain", r->out.domain);
744                 ndr->depth++;
745                 ndr_print_ptr(ndr, "domain", *r->out.domain);
746                 ndr->depth++;
747                 if (*r->out.domain) {
748                         ndr_print_string(ndr, "domain", *r->out.domain);
749                 }
750                 ndr->depth--;
751                 ndr->depth--;
752                 ndr_print_ptr(ndr, "name", r->out.name);
753                 ndr->depth++;
754                 ndr_print_ptr(ndr, "name", *r->out.name);
755                 ndr->depth++;
756                 if (*r->out.name) {
757                         ndr_print_string(ndr, "name", *r->out.name);
758                 }
759                 ndr->depth--;
760                 ndr->depth--;
761                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
762                 ndr->depth--;
763         }
764         ndr->depth--;
765 }
766
767 static enum ndr_err_code ndr_push_wbint_LookupName(struct ndr_push *ndr, int flags, const struct wbint_LookupName *r)
768 {
769         if (flags & NDR_IN) {
770                 if (r->in.domain == NULL) {
771                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
772                 }
773                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF8)));
774                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
775                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF8)));
776                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain, ndr_charset_length(r->in.domain, CH_UTF8), sizeof(uint8_t), CH_UTF8));
777                 if (r->in.name == NULL) {
778                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
779                 }
780                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF8)));
781                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
782                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF8)));
783                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
784                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
785         }
786         if (flags & NDR_OUT) {
787                 if (r->out.type == NULL) {
788                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
789                 }
790                 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, *r->out.type));
791                 if (r->out.sid == NULL) {
792                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
793                 }
794                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
795                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
796         }
797         return NDR_ERR_SUCCESS;
798 }
799
800 static enum ndr_err_code ndr_pull_wbint_LookupName(struct ndr_pull *ndr, int flags, struct wbint_LookupName *r)
801 {
802         TALLOC_CTX *_mem_save_type_0;
803         TALLOC_CTX *_mem_save_sid_0;
804         if (flags & NDR_IN) {
805                 ZERO_STRUCT(r->out);
806
807                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain));
808                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain));
809                 if (ndr_get_array_length(ndr, &r->in.domain) > ndr_get_array_size(ndr, &r->in.domain)) {
810                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain), ndr_get_array_length(ndr, &r->in.domain));
811                 }
812                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t)));
813                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t), CH_UTF8));
814                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
815                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
816                 if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) {
817                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name), ndr_get_array_length(ndr, &r->in.name));
818                 }
819                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint8_t)));
820                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint8_t), CH_UTF8));
821                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
822                 NDR_PULL_ALLOC(ndr, r->out.type);
823                 ZERO_STRUCTP(r->out.type);
824                 NDR_PULL_ALLOC(ndr, r->out.sid);
825                 ZERO_STRUCTP(r->out.sid);
826         }
827         if (flags & NDR_OUT) {
828                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
829                         NDR_PULL_ALLOC(ndr, r->out.type);
830                 }
831                 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
832                 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
833                 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, r->out.type));
834                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
835                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
836                         NDR_PULL_ALLOC(ndr, r->out.sid);
837                 }
838                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
839                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
840                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
841                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
842                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
843         }
844         return NDR_ERR_SUCCESS;
845 }
846
847 _PUBLIC_ void ndr_print_wbint_LookupName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupName *r)
848 {
849         ndr_print_struct(ndr, name, "wbint_LookupName");
850         ndr->depth++;
851         if (flags & NDR_SET_VALUES) {
852                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
853         }
854         if (flags & NDR_IN) {
855                 ndr_print_struct(ndr, "in", "wbint_LookupName");
856                 ndr->depth++;
857                 ndr_print_ptr(ndr, "domain", r->in.domain);
858                 ndr->depth++;
859                 ndr_print_string(ndr, "domain", r->in.domain);
860                 ndr->depth--;
861                 ndr_print_ptr(ndr, "name", r->in.name);
862                 ndr->depth++;
863                 ndr_print_string(ndr, "name", r->in.name);
864                 ndr->depth--;
865                 ndr_print_uint32(ndr, "flags", r->in.flags);
866                 ndr->depth--;
867         }
868         if (flags & NDR_OUT) {
869                 ndr_print_struct(ndr, "out", "wbint_LookupName");
870                 ndr->depth++;
871                 ndr_print_ptr(ndr, "type", r->out.type);
872                 ndr->depth++;
873                 ndr_print_lsa_SidType(ndr, "type", *r->out.type);
874                 ndr->depth--;
875                 ndr_print_ptr(ndr, "sid", r->out.sid);
876                 ndr->depth++;
877                 ndr_print_dom_sid(ndr, "sid", r->out.sid);
878                 ndr->depth--;
879                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
880                 ndr->depth--;
881         }
882         ndr->depth--;
883 }
884
885 static enum ndr_err_code ndr_push_wbint_Sid2Uid(struct ndr_push *ndr, int flags, const struct wbint_Sid2Uid *r)
886 {
887         if (flags & NDR_IN) {
888                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
889                 if (r->in.dom_name) {
890                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
891                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
892                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
893                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dom_name, ndr_charset_length(r->in.dom_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
894                 }
895                 if (r->in.sid == NULL) {
896                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
897                 }
898                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
899         }
900         if (flags & NDR_OUT) {
901                 if (r->out.uid == NULL) {
902                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
903                 }
904                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
905                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
906         }
907         return NDR_ERR_SUCCESS;
908 }
909
910 static enum ndr_err_code ndr_pull_wbint_Sid2Uid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Uid *r)
911 {
912         uint32_t _ptr_dom_name;
913         TALLOC_CTX *_mem_save_dom_name_0;
914         TALLOC_CTX *_mem_save_sid_0;
915         TALLOC_CTX *_mem_save_uid_0;
916         if (flags & NDR_IN) {
917                 ZERO_STRUCT(r->out);
918
919                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
920                 if (_ptr_dom_name) {
921                         NDR_PULL_ALLOC(ndr, r->in.dom_name);
922                 } else {
923                         r->in.dom_name = NULL;
924                 }
925                 if (r->in.dom_name) {
926                         _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
927                         NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
928                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
929                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
930                         if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
931                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
932                         }
933                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
934                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
935                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
936                 }
937                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
938                         NDR_PULL_ALLOC(ndr, r->in.sid);
939                 }
940                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
941                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
942                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
943                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
944                 NDR_PULL_ALLOC(ndr, r->out.uid);
945                 ZERO_STRUCTP(r->out.uid);
946         }
947         if (flags & NDR_OUT) {
948                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
949                         NDR_PULL_ALLOC(ndr, r->out.uid);
950                 }
951                 _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr);
952                 NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC);
953                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid));
954                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC);
955                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
956         }
957         return NDR_ERR_SUCCESS;
958 }
959
960 _PUBLIC_ void ndr_print_wbint_Sid2Uid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Uid *r)
961 {
962         ndr_print_struct(ndr, name, "wbint_Sid2Uid");
963         ndr->depth++;
964         if (flags & NDR_SET_VALUES) {
965                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
966         }
967         if (flags & NDR_IN) {
968                 ndr_print_struct(ndr, "in", "wbint_Sid2Uid");
969                 ndr->depth++;
970                 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
971                 ndr->depth++;
972                 if (r->in.dom_name) {
973                         ndr_print_string(ndr, "dom_name", r->in.dom_name);
974                 }
975                 ndr->depth--;
976                 ndr_print_ptr(ndr, "sid", r->in.sid);
977                 ndr->depth++;
978                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
979                 ndr->depth--;
980                 ndr->depth--;
981         }
982         if (flags & NDR_OUT) {
983                 ndr_print_struct(ndr, "out", "wbint_Sid2Uid");
984                 ndr->depth++;
985                 ndr_print_ptr(ndr, "uid", r->out.uid);
986                 ndr->depth++;
987                 ndr_print_hyper(ndr, "uid", *r->out.uid);
988                 ndr->depth--;
989                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
990                 ndr->depth--;
991         }
992         ndr->depth--;
993 }
994
995 static enum ndr_err_code ndr_push_wbint_Sid2Gid(struct ndr_push *ndr, int flags, const struct wbint_Sid2Gid *r)
996 {
997         if (flags & NDR_IN) {
998                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
999                 if (r->in.dom_name) {
1000                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1001                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1002                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1003                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dom_name, ndr_charset_length(r->in.dom_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1004                 }
1005                 if (r->in.sid == NULL) {
1006                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1007                 }
1008                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1009         }
1010         if (flags & NDR_OUT) {
1011                 if (r->out.gid == NULL) {
1012                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1013                 }
1014                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
1015                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1016         }
1017         return NDR_ERR_SUCCESS;
1018 }
1019
1020 static enum ndr_err_code ndr_pull_wbint_Sid2Gid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Gid *r)
1021 {
1022         uint32_t _ptr_dom_name;
1023         TALLOC_CTX *_mem_save_dom_name_0;
1024         TALLOC_CTX *_mem_save_sid_0;
1025         TALLOC_CTX *_mem_save_gid_0;
1026         if (flags & NDR_IN) {
1027                 ZERO_STRUCT(r->out);
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                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1048                         NDR_PULL_ALLOC(ndr, r->in.sid);
1049                 }
1050                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1051                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1052                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1053                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1054                 NDR_PULL_ALLOC(ndr, r->out.gid);
1055                 ZERO_STRUCTP(r->out.gid);
1056         }
1057         if (flags & NDR_OUT) {
1058                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1059                         NDR_PULL_ALLOC(ndr, r->out.gid);
1060                 }
1061                 _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1062                 NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC);
1063                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid));
1064                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC);
1065                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1066         }
1067         return NDR_ERR_SUCCESS;
1068 }
1069
1070 _PUBLIC_ void ndr_print_wbint_Sid2Gid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Gid *r)
1071 {
1072         ndr_print_struct(ndr, name, "wbint_Sid2Gid");
1073         ndr->depth++;
1074         if (flags & NDR_SET_VALUES) {
1075                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1076         }
1077         if (flags & NDR_IN) {
1078                 ndr_print_struct(ndr, "in", "wbint_Sid2Gid");
1079                 ndr->depth++;
1080                 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1081                 ndr->depth++;
1082                 if (r->in.dom_name) {
1083                         ndr_print_string(ndr, "dom_name", r->in.dom_name);
1084                 }
1085                 ndr->depth--;
1086                 ndr_print_ptr(ndr, "sid", r->in.sid);
1087                 ndr->depth++;
1088                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1089                 ndr->depth--;
1090                 ndr->depth--;
1091         }
1092         if (flags & NDR_OUT) {
1093                 ndr_print_struct(ndr, "out", "wbint_Sid2Gid");
1094                 ndr->depth++;
1095                 ndr_print_ptr(ndr, "gid", r->out.gid);
1096                 ndr->depth++;
1097                 ndr_print_hyper(ndr, "gid", *r->out.gid);
1098                 ndr->depth--;
1099                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1100                 ndr->depth--;
1101         }
1102         ndr->depth--;
1103 }
1104
1105 static enum ndr_err_code ndr_push_wbint_Uid2Sid(struct ndr_push *ndr, int flags, const struct wbint_Uid2Sid *r)
1106 {
1107         if (flags & NDR_IN) {
1108                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
1109                 if (r->in.dom_name) {
1110                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1111                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1112                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1113                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dom_name, ndr_charset_length(r->in.dom_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1114                 }
1115                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
1116         }
1117         if (flags & NDR_OUT) {
1118                 if (r->out.sid == NULL) {
1119                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1120                 }
1121                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1122                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1123         }
1124         return NDR_ERR_SUCCESS;
1125 }
1126
1127 static enum ndr_err_code ndr_pull_wbint_Uid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Uid2Sid *r)
1128 {
1129         uint32_t _ptr_dom_name;
1130         TALLOC_CTX *_mem_save_dom_name_0;
1131         TALLOC_CTX *_mem_save_sid_0;
1132         if (flags & NDR_IN) {
1133                 ZERO_STRUCT(r->out);
1134
1135                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
1136                 if (_ptr_dom_name) {
1137                         NDR_PULL_ALLOC(ndr, r->in.dom_name);
1138                 } else {
1139                         r->in.dom_name = NULL;
1140                 }
1141                 if (r->in.dom_name) {
1142                         _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1143                         NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1144                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1145                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1146                         if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1147                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
1148                         }
1149                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1150                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
1151                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1152                 }
1153                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
1154                 NDR_PULL_ALLOC(ndr, r->out.sid);
1155                 ZERO_STRUCTP(r->out.sid);
1156         }
1157         if (flags & NDR_OUT) {
1158                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1159                         NDR_PULL_ALLOC(ndr, r->out.sid);
1160                 }
1161                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1162                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
1163                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1164                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1165                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1166         }
1167         return NDR_ERR_SUCCESS;
1168 }
1169
1170 _PUBLIC_ void ndr_print_wbint_Uid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Uid2Sid *r)
1171 {
1172         ndr_print_struct(ndr, name, "wbint_Uid2Sid");
1173         ndr->depth++;
1174         if (flags & NDR_SET_VALUES) {
1175                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1176         }
1177         if (flags & NDR_IN) {
1178                 ndr_print_struct(ndr, "in", "wbint_Uid2Sid");
1179                 ndr->depth++;
1180                 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1181                 ndr->depth++;
1182                 if (r->in.dom_name) {
1183                         ndr_print_string(ndr, "dom_name", r->in.dom_name);
1184                 }
1185                 ndr->depth--;
1186                 ndr_print_hyper(ndr, "uid", r->in.uid);
1187                 ndr->depth--;
1188         }
1189         if (flags & NDR_OUT) {
1190                 ndr_print_struct(ndr, "out", "wbint_Uid2Sid");
1191                 ndr->depth++;
1192                 ndr_print_ptr(ndr, "sid", r->out.sid);
1193                 ndr->depth++;
1194                 ndr_print_dom_sid(ndr, "sid", r->out.sid);
1195                 ndr->depth--;
1196                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1197                 ndr->depth--;
1198         }
1199         ndr->depth--;
1200 }
1201
1202 static enum ndr_err_code ndr_push_wbint_Gid2Sid(struct ndr_push *ndr, int flags, const struct wbint_Gid2Sid *r)
1203 {
1204         if (flags & NDR_IN) {
1205                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_name));
1206                 if (r->in.dom_name) {
1207                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1208                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1209                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dom_name, CH_UTF8)));
1210                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dom_name, ndr_charset_length(r->in.dom_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1211                 }
1212                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
1213         }
1214         if (flags & NDR_OUT) {
1215                 if (r->out.sid == NULL) {
1216                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1217                 }
1218                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1219                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1220         }
1221         return NDR_ERR_SUCCESS;
1222 }
1223
1224 static enum ndr_err_code ndr_pull_wbint_Gid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Gid2Sid *r)
1225 {
1226         uint32_t _ptr_dom_name;
1227         TALLOC_CTX *_mem_save_dom_name_0;
1228         TALLOC_CTX *_mem_save_sid_0;
1229         if (flags & NDR_IN) {
1230                 ZERO_STRUCT(r->out);
1231
1232                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_name));
1233                 if (_ptr_dom_name) {
1234                         NDR_PULL_ALLOC(ndr, r->in.dom_name);
1235                 } else {
1236                         r->in.dom_name = NULL;
1237                 }
1238                 if (r->in.dom_name) {
1239                         _mem_save_dom_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1240                         NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1241                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1242                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1243                         if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1244                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
1245                         }
1246                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1247                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
1248                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1249                 }
1250                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
1251                 NDR_PULL_ALLOC(ndr, r->out.sid);
1252                 ZERO_STRUCTP(r->out.sid);
1253         }
1254         if (flags & NDR_OUT) {
1255                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1256                         NDR_PULL_ALLOC(ndr, r->out.sid);
1257                 }
1258                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1259                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
1260                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
1261                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1262                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1263         }
1264         return NDR_ERR_SUCCESS;
1265 }
1266
1267 _PUBLIC_ void ndr_print_wbint_Gid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Gid2Sid *r)
1268 {
1269         ndr_print_struct(ndr, name, "wbint_Gid2Sid");
1270         ndr->depth++;
1271         if (flags & NDR_SET_VALUES) {
1272                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1273         }
1274         if (flags & NDR_IN) {
1275                 ndr_print_struct(ndr, "in", "wbint_Gid2Sid");
1276                 ndr->depth++;
1277                 ndr_print_ptr(ndr, "dom_name", r->in.dom_name);
1278                 ndr->depth++;
1279                 if (r->in.dom_name) {
1280                         ndr_print_string(ndr, "dom_name", r->in.dom_name);
1281                 }
1282                 ndr->depth--;
1283                 ndr_print_hyper(ndr, "gid", r->in.gid);
1284                 ndr->depth--;
1285         }
1286         if (flags & NDR_OUT) {
1287                 ndr_print_struct(ndr, "out", "wbint_Gid2Sid");
1288                 ndr->depth++;
1289                 ndr_print_ptr(ndr, "sid", r->out.sid);
1290                 ndr->depth++;
1291                 ndr_print_dom_sid(ndr, "sid", r->out.sid);
1292                 ndr->depth--;
1293                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1294                 ndr->depth--;
1295         }
1296         ndr->depth--;
1297 }
1298
1299 static enum ndr_err_code ndr_push_wbint_AllocateUid(struct ndr_push *ndr, int flags, const struct wbint_AllocateUid *r)
1300 {
1301         if (flags & NDR_IN) {
1302         }
1303         if (flags & NDR_OUT) {
1304                 if (r->out.uid == NULL) {
1305                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1306                 }
1307                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
1308                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1309         }
1310         return NDR_ERR_SUCCESS;
1311 }
1312
1313 static enum ndr_err_code ndr_pull_wbint_AllocateUid(struct ndr_pull *ndr, int flags, struct wbint_AllocateUid *r)
1314 {
1315         TALLOC_CTX *_mem_save_uid_0;
1316         if (flags & NDR_IN) {
1317                 ZERO_STRUCT(r->out);
1318
1319                 NDR_PULL_ALLOC(ndr, r->out.uid);
1320                 ZERO_STRUCTP(r->out.uid);
1321         }
1322         if (flags & NDR_OUT) {
1323                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1324                         NDR_PULL_ALLOC(ndr, r->out.uid);
1325                 }
1326                 _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1327                 NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC);
1328                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid));
1329                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC);
1330                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1331         }
1332         return NDR_ERR_SUCCESS;
1333 }
1334
1335 _PUBLIC_ void ndr_print_wbint_AllocateUid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_AllocateUid *r)
1336 {
1337         ndr_print_struct(ndr, name, "wbint_AllocateUid");
1338         ndr->depth++;
1339         if (flags & NDR_SET_VALUES) {
1340                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1341         }
1342         if (flags & NDR_IN) {
1343                 ndr_print_struct(ndr, "in", "wbint_AllocateUid");
1344                 ndr->depth++;
1345                 ndr->depth--;
1346         }
1347         if (flags & NDR_OUT) {
1348                 ndr_print_struct(ndr, "out", "wbint_AllocateUid");
1349                 ndr->depth++;
1350                 ndr_print_ptr(ndr, "uid", r->out.uid);
1351                 ndr->depth++;
1352                 ndr_print_hyper(ndr, "uid", *r->out.uid);
1353                 ndr->depth--;
1354                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1355                 ndr->depth--;
1356         }
1357         ndr->depth--;
1358 }
1359
1360 static enum ndr_err_code ndr_push_wbint_AllocateGid(struct ndr_push *ndr, int flags, const struct wbint_AllocateGid *r)
1361 {
1362         if (flags & NDR_IN) {
1363         }
1364         if (flags & NDR_OUT) {
1365                 if (r->out.gid == NULL) {
1366                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1367                 }
1368                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
1369                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1370         }
1371         return NDR_ERR_SUCCESS;
1372 }
1373
1374 static enum ndr_err_code ndr_pull_wbint_AllocateGid(struct ndr_pull *ndr, int flags, struct wbint_AllocateGid *r)
1375 {
1376         TALLOC_CTX *_mem_save_gid_0;
1377         if (flags & NDR_IN) {
1378                 ZERO_STRUCT(r->out);
1379
1380                 NDR_PULL_ALLOC(ndr, r->out.gid);
1381                 ZERO_STRUCTP(r->out.gid);
1382         }
1383         if (flags & NDR_OUT) {
1384                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1385                         NDR_PULL_ALLOC(ndr, r->out.gid);
1386                 }
1387                 _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1388                 NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC);
1389                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid));
1390                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC);
1391                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1392         }
1393         return NDR_ERR_SUCCESS;
1394 }
1395
1396 _PUBLIC_ void ndr_print_wbint_AllocateGid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_AllocateGid *r)
1397 {
1398         ndr_print_struct(ndr, name, "wbint_AllocateGid");
1399         ndr->depth++;
1400         if (flags & NDR_SET_VALUES) {
1401                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1402         }
1403         if (flags & NDR_IN) {
1404                 ndr_print_struct(ndr, "in", "wbint_AllocateGid");
1405                 ndr->depth++;
1406                 ndr->depth--;
1407         }
1408         if (flags & NDR_OUT) {
1409                 ndr_print_struct(ndr, "out", "wbint_AllocateGid");
1410                 ndr->depth++;
1411                 ndr_print_ptr(ndr, "gid", r->out.gid);
1412                 ndr->depth++;
1413                 ndr_print_hyper(ndr, "gid", *r->out.gid);
1414                 ndr->depth--;
1415                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1416                 ndr->depth--;
1417         }
1418         ndr->depth--;
1419 }
1420
1421 static enum ndr_err_code ndr_push_wbint_QueryUser(struct ndr_push *ndr, int flags, const struct wbint_QueryUser *r)
1422 {
1423         if (flags & NDR_IN) {
1424                 if (r->in.sid == NULL) {
1425                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1426                 }
1427                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1428         }
1429         if (flags & NDR_OUT) {
1430                 if (r->out.info == NULL) {
1431                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1432                 }
1433                 NDR_CHECK(ndr_push_wbint_userinfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
1434                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1435         }
1436         return NDR_ERR_SUCCESS;
1437 }
1438
1439 static enum ndr_err_code ndr_pull_wbint_QueryUser(struct ndr_pull *ndr, int flags, struct wbint_QueryUser *r)
1440 {
1441         TALLOC_CTX *_mem_save_sid_0;
1442         TALLOC_CTX *_mem_save_info_0;
1443         if (flags & NDR_IN) {
1444                 ZERO_STRUCT(r->out);
1445
1446                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1447                         NDR_PULL_ALLOC(ndr, r->in.sid);
1448                 }
1449                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1450                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1451                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1452                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1453                 NDR_PULL_ALLOC(ndr, r->out.info);
1454                 ZERO_STRUCTP(r->out.info);
1455         }
1456         if (flags & NDR_OUT) {
1457                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1458                         NDR_PULL_ALLOC(ndr, r->out.info);
1459                 }
1460                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
1461                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
1462                 NDR_CHECK(ndr_pull_wbint_userinfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
1463                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
1464                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1465         }
1466         return NDR_ERR_SUCCESS;
1467 }
1468
1469 _PUBLIC_ void ndr_print_wbint_QueryUser(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryUser *r)
1470 {
1471         ndr_print_struct(ndr, name, "wbint_QueryUser");
1472         ndr->depth++;
1473         if (flags & NDR_SET_VALUES) {
1474                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1475         }
1476         if (flags & NDR_IN) {
1477                 ndr_print_struct(ndr, "in", "wbint_QueryUser");
1478                 ndr->depth++;
1479                 ndr_print_ptr(ndr, "sid", r->in.sid);
1480                 ndr->depth++;
1481                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1482                 ndr->depth--;
1483                 ndr->depth--;
1484         }
1485         if (flags & NDR_OUT) {
1486                 ndr_print_struct(ndr, "out", "wbint_QueryUser");
1487                 ndr->depth++;
1488                 ndr_print_ptr(ndr, "info", r->out.info);
1489                 ndr->depth++;
1490                 ndr_print_wbint_userinfo(ndr, "info", r->out.info);
1491                 ndr->depth--;
1492                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1493                 ndr->depth--;
1494         }
1495         ndr->depth--;
1496 }
1497
1498 static enum ndr_err_code ndr_push_wbint_LookupUserAliases(struct ndr_push *ndr, int flags, const struct wbint_LookupUserAliases *r)
1499 {
1500         if (flags & NDR_IN) {
1501                 if (r->in.sids == NULL) {
1502                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1503                 }
1504                 NDR_CHECK(ndr_push_wbint_SidArray(ndr, NDR_SCALARS, r->in.sids));
1505         }
1506         if (flags & NDR_OUT) {
1507                 if (r->out.rids == NULL) {
1508                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1509                 }
1510                 NDR_CHECK(ndr_push_wbint_RidArray(ndr, NDR_SCALARS, r->out.rids));
1511                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1512         }
1513         return NDR_ERR_SUCCESS;
1514 }
1515
1516 static enum ndr_err_code ndr_pull_wbint_LookupUserAliases(struct ndr_pull *ndr, int flags, struct wbint_LookupUserAliases *r)
1517 {
1518         TALLOC_CTX *_mem_save_sids_0;
1519         TALLOC_CTX *_mem_save_rids_0;
1520         if (flags & NDR_IN) {
1521                 ZERO_STRUCT(r->out);
1522
1523                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1524                         NDR_PULL_ALLOC(ndr, r->in.sids);
1525                 }
1526                 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1527                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
1528                 NDR_CHECK(ndr_pull_wbint_SidArray(ndr, NDR_SCALARS, r->in.sids));
1529                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
1530                 NDR_PULL_ALLOC(ndr, r->out.rids);
1531                 ZERO_STRUCTP(r->out.rids);
1532         }
1533         if (flags & NDR_OUT) {
1534                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1535                         NDR_PULL_ALLOC(ndr, r->out.rids);
1536                 }
1537                 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1538                 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
1539                 NDR_CHECK(ndr_pull_wbint_RidArray(ndr, NDR_SCALARS, r->out.rids));
1540                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
1541                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1542         }
1543         return NDR_ERR_SUCCESS;
1544 }
1545
1546 _PUBLIC_ void ndr_print_wbint_LookupUserAliases(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserAliases *r)
1547 {
1548         ndr_print_struct(ndr, name, "wbint_LookupUserAliases");
1549         ndr->depth++;
1550         if (flags & NDR_SET_VALUES) {
1551                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1552         }
1553         if (flags & NDR_IN) {
1554                 ndr_print_struct(ndr, "in", "wbint_LookupUserAliases");
1555                 ndr->depth++;
1556                 ndr_print_ptr(ndr, "sids", r->in.sids);
1557                 ndr->depth++;
1558                 ndr_print_wbint_SidArray(ndr, "sids", r->in.sids);
1559                 ndr->depth--;
1560                 ndr->depth--;
1561         }
1562         if (flags & NDR_OUT) {
1563                 ndr_print_struct(ndr, "out", "wbint_LookupUserAliases");
1564                 ndr->depth++;
1565                 ndr_print_ptr(ndr, "rids", r->out.rids);
1566                 ndr->depth++;
1567                 ndr_print_wbint_RidArray(ndr, "rids", r->out.rids);
1568                 ndr->depth--;
1569                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1570                 ndr->depth--;
1571         }
1572         ndr->depth--;
1573 }
1574
1575 static enum ndr_err_code ndr_push_wbint_LookupUserGroups(struct ndr_push *ndr, int flags, const struct wbint_LookupUserGroups *r)
1576 {
1577         if (flags & NDR_IN) {
1578                 if (r->in.sid == NULL) {
1579                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1580                 }
1581                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1582         }
1583         if (flags & NDR_OUT) {
1584                 if (r->out.sids == NULL) {
1585                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1586                 }
1587                 NDR_CHECK(ndr_push_wbint_SidArray(ndr, NDR_SCALARS, r->out.sids));
1588                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1589         }
1590         return NDR_ERR_SUCCESS;
1591 }
1592
1593 static enum ndr_err_code ndr_pull_wbint_LookupUserGroups(struct ndr_pull *ndr, int flags, struct wbint_LookupUserGroups *r)
1594 {
1595         TALLOC_CTX *_mem_save_sid_0;
1596         TALLOC_CTX *_mem_save_sids_0;
1597         if (flags & NDR_IN) {
1598                 ZERO_STRUCT(r->out);
1599
1600                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1601                         NDR_PULL_ALLOC(ndr, r->in.sid);
1602                 }
1603                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1604                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1605                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1606                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1607                 NDR_PULL_ALLOC(ndr, r->out.sids);
1608                 ZERO_STRUCTP(r->out.sids);
1609         }
1610         if (flags & NDR_OUT) {
1611                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1612                         NDR_PULL_ALLOC(ndr, r->out.sids);
1613                 }
1614                 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1615                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
1616                 NDR_CHECK(ndr_pull_wbint_SidArray(ndr, NDR_SCALARS, r->out.sids));
1617                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
1618                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1619         }
1620         return NDR_ERR_SUCCESS;
1621 }
1622
1623 _PUBLIC_ void ndr_print_wbint_LookupUserGroups(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserGroups *r)
1624 {
1625         ndr_print_struct(ndr, name, "wbint_LookupUserGroups");
1626         ndr->depth++;
1627         if (flags & NDR_SET_VALUES) {
1628                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1629         }
1630         if (flags & NDR_IN) {
1631                 ndr_print_struct(ndr, "in", "wbint_LookupUserGroups");
1632                 ndr->depth++;
1633                 ndr_print_ptr(ndr, "sid", r->in.sid);
1634                 ndr->depth++;
1635                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1636                 ndr->depth--;
1637                 ndr->depth--;
1638         }
1639         if (flags & NDR_OUT) {
1640                 ndr_print_struct(ndr, "out", "wbint_LookupUserGroups");
1641                 ndr->depth++;
1642                 ndr_print_ptr(ndr, "sids", r->out.sids);
1643                 ndr->depth++;
1644                 ndr_print_wbint_SidArray(ndr, "sids", r->out.sids);
1645                 ndr->depth--;
1646                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1647                 ndr->depth--;
1648         }
1649         ndr->depth--;
1650 }
1651
1652 static enum ndr_err_code ndr_push_wbint_QuerySequenceNumber(struct ndr_push *ndr, int flags, const struct wbint_QuerySequenceNumber *r)
1653 {
1654         if (flags & NDR_IN) {
1655         }
1656         if (flags & NDR_OUT) {
1657                 if (r->out.sequence == NULL) {
1658                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1659                 }
1660                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sequence));
1661                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1662         }
1663         return NDR_ERR_SUCCESS;
1664 }
1665
1666 static enum ndr_err_code ndr_pull_wbint_QuerySequenceNumber(struct ndr_pull *ndr, int flags, struct wbint_QuerySequenceNumber *r)
1667 {
1668         TALLOC_CTX *_mem_save_sequence_0;
1669         if (flags & NDR_IN) {
1670                 ZERO_STRUCT(r->out);
1671
1672                 NDR_PULL_ALLOC(ndr, r->out.sequence);
1673                 ZERO_STRUCTP(r->out.sequence);
1674         }
1675         if (flags & NDR_OUT) {
1676                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1677                         NDR_PULL_ALLOC(ndr, r->out.sequence);
1678                 }
1679                 _mem_save_sequence_0 = NDR_PULL_GET_MEM_CTX(ndr);
1680                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sequence, LIBNDR_FLAG_REF_ALLOC);
1681                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sequence));
1682                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_0, LIBNDR_FLAG_REF_ALLOC);
1683                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1684         }
1685         return NDR_ERR_SUCCESS;
1686 }
1687
1688 _PUBLIC_ void ndr_print_wbint_QuerySequenceNumber(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QuerySequenceNumber *r)
1689 {
1690         ndr_print_struct(ndr, name, "wbint_QuerySequenceNumber");
1691         ndr->depth++;
1692         if (flags & NDR_SET_VALUES) {
1693                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1694         }
1695         if (flags & NDR_IN) {
1696                 ndr_print_struct(ndr, "in", "wbint_QuerySequenceNumber");
1697                 ndr->depth++;
1698                 ndr->depth--;
1699         }
1700         if (flags & NDR_OUT) {
1701                 ndr_print_struct(ndr, "out", "wbint_QuerySequenceNumber");
1702                 ndr->depth++;
1703                 ndr_print_ptr(ndr, "sequence", r->out.sequence);
1704                 ndr->depth++;
1705                 ndr_print_uint32(ndr, "sequence", *r->out.sequence);
1706                 ndr->depth--;
1707                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1708                 ndr->depth--;
1709         }
1710         ndr->depth--;
1711 }
1712
1713 static enum ndr_err_code ndr_push_wbint_LookupGroupMembers(struct ndr_push *ndr, int flags, const struct wbint_LookupGroupMembers *r)
1714 {
1715         if (flags & NDR_IN) {
1716                 if (r->in.sid == NULL) {
1717                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1718                 }
1719                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1720                 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->in.type));
1721         }
1722         if (flags & NDR_OUT) {
1723                 if (r->out.members == NULL) {
1724                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1725                 }
1726                 NDR_CHECK(ndr_push_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
1727                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1728         }
1729         return NDR_ERR_SUCCESS;
1730 }
1731
1732 static enum ndr_err_code ndr_pull_wbint_LookupGroupMembers(struct ndr_pull *ndr, int flags, struct wbint_LookupGroupMembers *r)
1733 {
1734         TALLOC_CTX *_mem_save_sid_0;
1735         TALLOC_CTX *_mem_save_members_0;
1736         if (flags & NDR_IN) {
1737                 ZERO_STRUCT(r->out);
1738
1739                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1740                         NDR_PULL_ALLOC(ndr, r->in.sid);
1741                 }
1742                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1743                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
1744                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
1745                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
1746                 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->in.type));
1747                 NDR_PULL_ALLOC(ndr, r->out.members);
1748                 ZERO_STRUCTP(r->out.members);
1749         }
1750         if (flags & NDR_OUT) {
1751                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1752                         NDR_PULL_ALLOC(ndr, r->out.members);
1753                 }
1754                 _mem_save_members_0 = NDR_PULL_GET_MEM_CTX(ndr);
1755                 NDR_PULL_SET_MEM_CTX(ndr, r->out.members, LIBNDR_FLAG_REF_ALLOC);
1756                 NDR_CHECK(ndr_pull_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
1757                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, LIBNDR_FLAG_REF_ALLOC);
1758                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1759         }
1760         return NDR_ERR_SUCCESS;
1761 }
1762
1763 _PUBLIC_ void ndr_print_wbint_LookupGroupMembers(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupGroupMembers *r)
1764 {
1765         ndr_print_struct(ndr, name, "wbint_LookupGroupMembers");
1766         ndr->depth++;
1767         if (flags & NDR_SET_VALUES) {
1768                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1769         }
1770         if (flags & NDR_IN) {
1771                 ndr_print_struct(ndr, "in", "wbint_LookupGroupMembers");
1772                 ndr->depth++;
1773                 ndr_print_ptr(ndr, "sid", r->in.sid);
1774                 ndr->depth++;
1775                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
1776                 ndr->depth--;
1777                 ndr_print_lsa_SidType(ndr, "type", r->in.type);
1778                 ndr->depth--;
1779         }
1780         if (flags & NDR_OUT) {
1781                 ndr_print_struct(ndr, "out", "wbint_LookupGroupMembers");
1782                 ndr->depth++;
1783                 ndr_print_ptr(ndr, "members", r->out.members);
1784                 ndr->depth++;
1785                 ndr_print_wbint_Principals(ndr, "members", r->out.members);
1786                 ndr->depth--;
1787                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1788                 ndr->depth--;
1789         }
1790         ndr->depth--;
1791 }
1792
1793 static enum ndr_err_code ndr_push_wbint_QueryUserList(struct ndr_push *ndr, int flags, const struct wbint_QueryUserList *r)
1794 {
1795         if (flags & NDR_IN) {
1796         }
1797         if (flags & NDR_OUT) {
1798                 if (r->out.users == NULL) {
1799                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1800                 }
1801                 NDR_CHECK(ndr_push_wbint_userinfos(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.users));
1802                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1803         }
1804         return NDR_ERR_SUCCESS;
1805 }
1806
1807 static enum ndr_err_code ndr_pull_wbint_QueryUserList(struct ndr_pull *ndr, int flags, struct wbint_QueryUserList *r)
1808 {
1809         TALLOC_CTX *_mem_save_users_0;
1810         if (flags & NDR_IN) {
1811                 ZERO_STRUCT(r->out);
1812
1813                 NDR_PULL_ALLOC(ndr, r->out.users);
1814                 ZERO_STRUCTP(r->out.users);
1815         }
1816         if (flags & NDR_OUT) {
1817                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1818                         NDR_PULL_ALLOC(ndr, r->out.users);
1819                 }
1820                 _mem_save_users_0 = NDR_PULL_GET_MEM_CTX(ndr);
1821                 NDR_PULL_SET_MEM_CTX(ndr, r->out.users, LIBNDR_FLAG_REF_ALLOC);
1822                 NDR_CHECK(ndr_pull_wbint_userinfos(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.users));
1823                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_users_0, LIBNDR_FLAG_REF_ALLOC);
1824                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1825         }
1826         return NDR_ERR_SUCCESS;
1827 }
1828
1829 _PUBLIC_ void ndr_print_wbint_QueryUserList(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryUserList *r)
1830 {
1831         ndr_print_struct(ndr, name, "wbint_QueryUserList");
1832         ndr->depth++;
1833         if (flags & NDR_SET_VALUES) {
1834                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1835         }
1836         if (flags & NDR_IN) {
1837                 ndr_print_struct(ndr, "in", "wbint_QueryUserList");
1838                 ndr->depth++;
1839                 ndr->depth--;
1840         }
1841         if (flags & NDR_OUT) {
1842                 ndr_print_struct(ndr, "out", "wbint_QueryUserList");
1843                 ndr->depth++;
1844                 ndr_print_ptr(ndr, "users", r->out.users);
1845                 ndr->depth++;
1846                 ndr_print_wbint_userinfos(ndr, "users", r->out.users);
1847                 ndr->depth--;
1848                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1849                 ndr->depth--;
1850         }
1851         ndr->depth--;
1852 }
1853
1854 static enum ndr_err_code ndr_push_wbint_QueryGroupList(struct ndr_push *ndr, int flags, const struct wbint_QueryGroupList *r)
1855 {
1856         if (flags & NDR_IN) {
1857         }
1858         if (flags & NDR_OUT) {
1859                 if (r->out.groups == NULL) {
1860                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1861                 }
1862                 NDR_CHECK(ndr_push_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.groups));
1863                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1864         }
1865         return NDR_ERR_SUCCESS;
1866 }
1867
1868 static enum ndr_err_code ndr_pull_wbint_QueryGroupList(struct ndr_pull *ndr, int flags, struct wbint_QueryGroupList *r)
1869 {
1870         TALLOC_CTX *_mem_save_groups_0;
1871         if (flags & NDR_IN) {
1872                 ZERO_STRUCT(r->out);
1873
1874                 NDR_PULL_ALLOC(ndr, r->out.groups);
1875                 ZERO_STRUCTP(r->out.groups);
1876         }
1877         if (flags & NDR_OUT) {
1878                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1879                         NDR_PULL_ALLOC(ndr, r->out.groups);
1880                 }
1881                 _mem_save_groups_0 = NDR_PULL_GET_MEM_CTX(ndr);
1882                 NDR_PULL_SET_MEM_CTX(ndr, r->out.groups, LIBNDR_FLAG_REF_ALLOC);
1883                 NDR_CHECK(ndr_pull_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.groups));
1884                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_groups_0, LIBNDR_FLAG_REF_ALLOC);
1885                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1886         }
1887         return NDR_ERR_SUCCESS;
1888 }
1889
1890 _PUBLIC_ void ndr_print_wbint_QueryGroupList(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryGroupList *r)
1891 {
1892         ndr_print_struct(ndr, name, "wbint_QueryGroupList");
1893         ndr->depth++;
1894         if (flags & NDR_SET_VALUES) {
1895                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1896         }
1897         if (flags & NDR_IN) {
1898                 ndr_print_struct(ndr, "in", "wbint_QueryGroupList");
1899                 ndr->depth++;
1900                 ndr->depth--;
1901         }
1902         if (flags & NDR_OUT) {
1903                 ndr_print_struct(ndr, "out", "wbint_QueryGroupList");
1904                 ndr->depth++;
1905                 ndr_print_ptr(ndr, "groups", r->out.groups);
1906                 ndr->depth++;
1907                 ndr_print_wbint_Principals(ndr, "groups", r->out.groups);
1908                 ndr->depth--;
1909                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1910                 ndr->depth--;
1911         }
1912         ndr->depth--;
1913 }
1914
1915 static enum ndr_err_code ndr_push_wbint_DsGetDcName(struct ndr_push *ndr, int flags, const struct wbint_DsGetDcName *r)
1916 {
1917         if (flags & NDR_IN) {
1918                 if (r->in.domain_name == NULL) {
1919                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1920                 }
1921                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF8)));
1922                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1923                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF8)));
1924                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1925                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
1926                 if (r->in.domain_guid) {
1927                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
1928                 }
1929                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
1930                 if (r->in.site_name) {
1931                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF8)));
1932                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1933                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF8)));
1934                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1935                 }
1936                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
1937         }
1938         if (flags & NDR_OUT) {
1939                 if (r->out.dc_info == NULL) {
1940                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1941                 }
1942                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dc_info));
1943                 if (*r->out.dc_info) {
1944                         NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.dc_info));
1945                 }
1946                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1947         }
1948         return NDR_ERR_SUCCESS;
1949 }
1950
1951 static enum ndr_err_code ndr_pull_wbint_DsGetDcName(struct ndr_pull *ndr, int flags, struct wbint_DsGetDcName *r)
1952 {
1953         uint32_t _ptr_domain_guid;
1954         uint32_t _ptr_site_name;
1955         uint32_t _ptr_dc_info;
1956         TALLOC_CTX *_mem_save_domain_guid_0;
1957         TALLOC_CTX *_mem_save_site_name_0;
1958         TALLOC_CTX *_mem_save_dc_info_0;
1959         TALLOC_CTX *_mem_save_dc_info_1;
1960         if (flags & NDR_IN) {
1961                 ZERO_STRUCT(r->out);
1962
1963                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
1964                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
1965                 if (ndr_get_array_length(ndr, &r->in.domain_name) > ndr_get_array_size(ndr, &r->in.domain_name)) {
1966                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain_name), ndr_get_array_length(ndr, &r->in.domain_name));
1967                 }
1968                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint8_t)));
1969                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint8_t), CH_UTF8));
1970                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
1971                 if (_ptr_domain_guid) {
1972                         NDR_PULL_ALLOC(ndr, r->in.domain_guid);
1973                 } else {
1974                         r->in.domain_guid = NULL;
1975                 }
1976                 if (r->in.domain_guid) {
1977                         _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1978                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
1979                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
1980                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
1981                 }
1982                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
1983                 if (_ptr_site_name) {
1984                         NDR_PULL_ALLOC(ndr, r->in.site_name);
1985                 } else {
1986                         r->in.site_name = NULL;
1987                 }
1988                 if (r->in.site_name) {
1989                         _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1990                         NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
1991                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
1992                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
1993                         if (ndr_get_array_length(ndr, &r->in.site_name) > ndr_get_array_size(ndr, &r->in.site_name)) {
1994                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.site_name), ndr_get_array_length(ndr, &r->in.site_name));
1995                         }
1996                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint8_t)));
1997                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint8_t), CH_UTF8));
1998                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
1999                 }
2000                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2001                 NDR_PULL_ALLOC(ndr, r->out.dc_info);
2002                 ZERO_STRUCTP(r->out.dc_info);
2003         }
2004         if (flags & NDR_OUT) {
2005                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2006                         NDR_PULL_ALLOC(ndr, r->out.dc_info);
2007                 }
2008                 _mem_save_dc_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
2009                 NDR_PULL_SET_MEM_CTX(ndr, r->out.dc_info, LIBNDR_FLAG_REF_ALLOC);
2010                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_info));
2011                 if (_ptr_dc_info) {
2012                         NDR_PULL_ALLOC(ndr, *r->out.dc_info);
2013                 } else {
2014                         *r->out.dc_info = NULL;
2015                 }
2016                 if (*r->out.dc_info) {
2017                         _mem_save_dc_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
2018                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.dc_info, 0);
2019                         NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.dc_info));
2020                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_info_1, 0);
2021                 }
2022                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_info_0, LIBNDR_FLAG_REF_ALLOC);
2023                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2024         }
2025         return NDR_ERR_SUCCESS;
2026 }
2027
2028 _PUBLIC_ void ndr_print_wbint_DsGetDcName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_DsGetDcName *r)
2029 {
2030         ndr_print_struct(ndr, name, "wbint_DsGetDcName");
2031         ndr->depth++;
2032         if (flags & NDR_SET_VALUES) {
2033                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2034         }
2035         if (flags & NDR_IN) {
2036                 ndr_print_struct(ndr, "in", "wbint_DsGetDcName");
2037                 ndr->depth++;
2038                 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
2039                 ndr->depth++;
2040                 ndr_print_string(ndr, "domain_name", r->in.domain_name);
2041                 ndr->depth--;
2042                 ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
2043                 ndr->depth++;
2044                 if (r->in.domain_guid) {
2045                         ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
2046                 }
2047                 ndr->depth--;
2048                 ndr_print_ptr(ndr, "site_name", r->in.site_name);
2049                 ndr->depth++;
2050                 if (r->in.site_name) {
2051                         ndr_print_string(ndr, "site_name", r->in.site_name);
2052                 }
2053                 ndr->depth--;
2054                 ndr_print_uint32(ndr, "flags", r->in.flags);
2055                 ndr->depth--;
2056         }
2057         if (flags & NDR_OUT) {
2058                 ndr_print_struct(ndr, "out", "wbint_DsGetDcName");
2059                 ndr->depth++;
2060                 ndr_print_ptr(ndr, "dc_info", r->out.dc_info);
2061                 ndr->depth++;
2062                 ndr_print_ptr(ndr, "dc_info", *r->out.dc_info);
2063                 ndr->depth++;
2064                 if (*r->out.dc_info) {
2065                         ndr_print_netr_DsRGetDCNameInfo(ndr, "dc_info", *r->out.dc_info);
2066                 }
2067                 ndr->depth--;
2068                 ndr->depth--;
2069                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2070                 ndr->depth--;
2071         }
2072         ndr->depth--;
2073 }
2074
2075 static enum ndr_err_code ndr_push_wbint_LookupRids(struct ndr_push *ndr, int flags, const struct wbint_LookupRids *r)
2076 {
2077         if (flags & NDR_IN) {
2078                 if (r->in.rids == NULL) {
2079                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2080                 }
2081                 NDR_CHECK(ndr_push_wbint_RidArray(ndr, NDR_SCALARS, r->in.rids));
2082         }
2083         if (flags & NDR_OUT) {
2084                 if (r->out.names == NULL) {
2085                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2086                 }
2087                 NDR_CHECK(ndr_push_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
2088                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2089         }
2090         return NDR_ERR_SUCCESS;
2091 }
2092
2093 static enum ndr_err_code ndr_pull_wbint_LookupRids(struct ndr_pull *ndr, int flags, struct wbint_LookupRids *r)
2094 {
2095         TALLOC_CTX *_mem_save_rids_0;
2096         TALLOC_CTX *_mem_save_names_0;
2097         if (flags & NDR_IN) {
2098                 ZERO_STRUCT(r->out);
2099
2100                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2101                         NDR_PULL_ALLOC(ndr, r->in.rids);
2102                 }
2103                 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
2104                 NDR_PULL_SET_MEM_CTX(ndr, r->in.rids, LIBNDR_FLAG_REF_ALLOC);
2105                 NDR_CHECK(ndr_pull_wbint_RidArray(ndr, NDR_SCALARS, r->in.rids));
2106                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
2107                 NDR_PULL_ALLOC(ndr, r->out.names);
2108                 ZERO_STRUCTP(r->out.names);
2109         }
2110         if (flags & NDR_OUT) {
2111                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2112                         NDR_PULL_ALLOC(ndr, r->out.names);
2113                 }
2114                 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2115                 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
2116                 NDR_CHECK(ndr_pull_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
2117                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
2118                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2119         }
2120         return NDR_ERR_SUCCESS;
2121 }
2122
2123 _PUBLIC_ void ndr_print_wbint_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupRids *r)
2124 {
2125         ndr_print_struct(ndr, name, "wbint_LookupRids");
2126         ndr->depth++;
2127         if (flags & NDR_SET_VALUES) {
2128                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2129         }
2130         if (flags & NDR_IN) {
2131                 ndr_print_struct(ndr, "in", "wbint_LookupRids");
2132                 ndr->depth++;
2133                 ndr_print_ptr(ndr, "rids", r->in.rids);
2134                 ndr->depth++;
2135                 ndr_print_wbint_RidArray(ndr, "rids", r->in.rids);
2136                 ndr->depth--;
2137                 ndr->depth--;
2138         }
2139         if (flags & NDR_OUT) {
2140                 ndr_print_struct(ndr, "out", "wbint_LookupRids");
2141                 ndr->depth++;
2142                 ndr_print_ptr(ndr, "names", r->out.names);
2143                 ndr->depth++;
2144                 ndr_print_wbint_Principals(ndr, "names", r->out.names);
2145                 ndr->depth--;
2146                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2147                 ndr->depth--;
2148         }
2149         ndr->depth--;
2150 }
2151
2152 static enum ndr_err_code ndr_push_wbint_CheckMachineAccount(struct ndr_push *ndr, int flags, const struct wbint_CheckMachineAccount *r)
2153 {
2154         if (flags & NDR_IN) {
2155         }
2156         if (flags & NDR_OUT) {
2157                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2158         }
2159         return NDR_ERR_SUCCESS;
2160 }
2161
2162 static enum ndr_err_code ndr_pull_wbint_CheckMachineAccount(struct ndr_pull *ndr, int flags, struct wbint_CheckMachineAccount *r)
2163 {
2164         if (flags & NDR_IN) {
2165         }
2166         if (flags & NDR_OUT) {
2167                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2168         }
2169         return NDR_ERR_SUCCESS;
2170 }
2171
2172 _PUBLIC_ void ndr_print_wbint_CheckMachineAccount(struct ndr_print *ndr, const char *name, int flags, const struct wbint_CheckMachineAccount *r)
2173 {
2174         ndr_print_struct(ndr, name, "wbint_CheckMachineAccount");
2175         ndr->depth++;
2176         if (flags & NDR_SET_VALUES) {
2177                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2178         }
2179         if (flags & NDR_IN) {
2180                 ndr_print_struct(ndr, "in", "wbint_CheckMachineAccount");
2181                 ndr->depth++;
2182                 ndr->depth--;
2183         }
2184         if (flags & NDR_OUT) {
2185                 ndr_print_struct(ndr, "out", "wbint_CheckMachineAccount");
2186                 ndr->depth++;
2187                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2188                 ndr->depth--;
2189         }
2190         ndr->depth--;
2191 }
2192
2193 static enum ndr_err_code ndr_push_wbint_ChangeMachineAccount(struct ndr_push *ndr, int flags, const struct wbint_ChangeMachineAccount *r)
2194 {
2195         if (flags & NDR_IN) {
2196         }
2197         if (flags & NDR_OUT) {
2198                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2199         }
2200         return NDR_ERR_SUCCESS;
2201 }
2202
2203 static enum ndr_err_code ndr_pull_wbint_ChangeMachineAccount(struct ndr_pull *ndr, int flags, struct wbint_ChangeMachineAccount *r)
2204 {
2205         if (flags & NDR_IN) {
2206         }
2207         if (flags & NDR_OUT) {
2208                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2209         }
2210         return NDR_ERR_SUCCESS;
2211 }
2212
2213 _PUBLIC_ void ndr_print_wbint_ChangeMachineAccount(struct ndr_print *ndr, const char *name, int flags, const struct wbint_ChangeMachineAccount *r)
2214 {
2215         ndr_print_struct(ndr, name, "wbint_ChangeMachineAccount");
2216         ndr->depth++;
2217         if (flags & NDR_SET_VALUES) {
2218                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2219         }
2220         if (flags & NDR_IN) {
2221                 ndr_print_struct(ndr, "in", "wbint_ChangeMachineAccount");
2222                 ndr->depth++;
2223                 ndr->depth--;
2224         }
2225         if (flags & NDR_OUT) {
2226                 ndr_print_struct(ndr, "out", "wbint_ChangeMachineAccount");
2227                 ndr->depth++;
2228                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2229                 ndr->depth--;
2230         }
2231         ndr->depth--;
2232 }
2233
2234 static enum ndr_err_code ndr_push_wbint_SetMapping(struct ndr_push *ndr, int flags, const struct wbint_SetMapping *r)
2235 {
2236         if (flags & NDR_IN) {
2237                 if (r->in.sid == NULL) {
2238                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2239                 }
2240                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2241                 NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
2242                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
2243         }
2244         if (flags & NDR_OUT) {
2245                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2246         }
2247         return NDR_ERR_SUCCESS;
2248 }
2249
2250 static enum ndr_err_code ndr_pull_wbint_SetMapping(struct ndr_pull *ndr, int flags, struct wbint_SetMapping *r)
2251 {
2252         TALLOC_CTX *_mem_save_sid_0;
2253         if (flags & NDR_IN) {
2254                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2255                         NDR_PULL_ALLOC(ndr, r->in.sid);
2256                 }
2257                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2258                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
2259                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2260                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
2261                 NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
2262                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
2263         }
2264         if (flags & NDR_OUT) {
2265                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2266         }
2267         return NDR_ERR_SUCCESS;
2268 }
2269
2270 _PUBLIC_ void ndr_print_wbint_SetMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetMapping *r)
2271 {
2272         ndr_print_struct(ndr, name, "wbint_SetMapping");
2273         ndr->depth++;
2274         if (flags & NDR_SET_VALUES) {
2275                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2276         }
2277         if (flags & NDR_IN) {
2278                 ndr_print_struct(ndr, "in", "wbint_SetMapping");
2279                 ndr->depth++;
2280                 ndr_print_ptr(ndr, "sid", r->in.sid);
2281                 ndr->depth++;
2282                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
2283                 ndr->depth--;
2284                 ndr_print_wbint_IdType(ndr, "type", r->in.type);
2285                 ndr_print_hyper(ndr, "id", r->in.id);
2286                 ndr->depth--;
2287         }
2288         if (flags & NDR_OUT) {
2289                 ndr_print_struct(ndr, "out", "wbint_SetMapping");
2290                 ndr->depth++;
2291                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2292                 ndr->depth--;
2293         }
2294         ndr->depth--;
2295 }
2296
2297 static enum ndr_err_code ndr_push_wbint_RemoveMapping(struct ndr_push *ndr, int flags, const struct wbint_RemoveMapping *r)
2298 {
2299         if (flags & NDR_IN) {
2300                 if (r->in.sid == NULL) {
2301                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2302                 }
2303                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2304                 NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
2305                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
2306         }
2307         if (flags & NDR_OUT) {
2308                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2309         }
2310         return NDR_ERR_SUCCESS;
2311 }
2312
2313 static enum ndr_err_code ndr_pull_wbint_RemoveMapping(struct ndr_pull *ndr, int flags, struct wbint_RemoveMapping *r)
2314 {
2315         TALLOC_CTX *_mem_save_sid_0;
2316         if (flags & NDR_IN) {
2317                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2318                         NDR_PULL_ALLOC(ndr, r->in.sid);
2319                 }
2320                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2321                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
2322                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2323                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
2324                 NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
2325                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
2326         }
2327         if (flags & NDR_OUT) {
2328                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2329         }
2330         return NDR_ERR_SUCCESS;
2331 }
2332
2333 _PUBLIC_ void ndr_print_wbint_RemoveMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_RemoveMapping *r)
2334 {
2335         ndr_print_struct(ndr, name, "wbint_RemoveMapping");
2336         ndr->depth++;
2337         if (flags & NDR_SET_VALUES) {
2338                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2339         }
2340         if (flags & NDR_IN) {
2341                 ndr_print_struct(ndr, "in", "wbint_RemoveMapping");
2342                 ndr->depth++;
2343                 ndr_print_ptr(ndr, "sid", r->in.sid);
2344                 ndr->depth++;
2345                 ndr_print_dom_sid(ndr, "sid", r->in.sid);
2346                 ndr->depth--;
2347                 ndr_print_wbint_IdType(ndr, "type", r->in.type);
2348                 ndr_print_hyper(ndr, "id", r->in.id);
2349                 ndr->depth--;
2350         }
2351         if (flags & NDR_OUT) {
2352                 ndr_print_struct(ndr, "out", "wbint_RemoveMapping");
2353                 ndr->depth++;
2354                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2355                 ndr->depth--;
2356         }
2357         ndr->depth--;
2358 }
2359
2360 static enum ndr_err_code ndr_push_wbint_SetHWM(struct ndr_push *ndr, int flags, const struct wbint_SetHWM *r)
2361 {
2362         if (flags & NDR_IN) {
2363                 NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
2364                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
2365         }
2366         if (flags & NDR_OUT) {
2367                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2368         }
2369         return NDR_ERR_SUCCESS;
2370 }
2371
2372 static enum ndr_err_code ndr_pull_wbint_SetHWM(struct ndr_pull *ndr, int flags, struct wbint_SetHWM *r)
2373 {
2374         if (flags & NDR_IN) {
2375                 NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
2376                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
2377         }
2378         if (flags & NDR_OUT) {
2379                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2380         }
2381         return NDR_ERR_SUCCESS;
2382 }
2383
2384 _PUBLIC_ void ndr_print_wbint_SetHWM(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetHWM *r)
2385 {
2386         ndr_print_struct(ndr, name, "wbint_SetHWM");
2387         ndr->depth++;
2388         if (flags & NDR_SET_VALUES) {
2389                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2390         }
2391         if (flags & NDR_IN) {
2392                 ndr_print_struct(ndr, "in", "wbint_SetHWM");
2393                 ndr->depth++;
2394                 ndr_print_wbint_IdType(ndr, "type", r->in.type);
2395                 ndr_print_hyper(ndr, "id", r->in.id);
2396                 ndr->depth--;
2397         }
2398         if (flags & NDR_OUT) {
2399                 ndr_print_struct(ndr, "out", "wbint_SetHWM");
2400                 ndr->depth++;
2401                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2402                 ndr->depth--;
2403         }
2404         ndr->depth--;
2405 }
2406
2407 static const struct ndr_interface_call wbint_calls[] = {
2408         {
2409                 "wbint_Ping",
2410                 sizeof(struct wbint_Ping),
2411                 (ndr_push_flags_fn_t) ndr_push_wbint_Ping,
2412                 (ndr_pull_flags_fn_t) ndr_pull_wbint_Ping,
2413                 (ndr_print_function_t) ndr_print_wbint_Ping,
2414                 false,
2415         },
2416         {
2417                 "wbint_LookupSid",
2418                 sizeof(struct wbint_LookupSid),
2419                 (ndr_push_flags_fn_t) ndr_push_wbint_LookupSid,
2420                 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupSid,
2421                 (ndr_print_function_t) ndr_print_wbint_LookupSid,
2422                 false,
2423         },
2424         {
2425                 "wbint_LookupName",
2426                 sizeof(struct wbint_LookupName),
2427                 (ndr_push_flags_fn_t) ndr_push_wbint_LookupName,
2428                 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupName,
2429                 (ndr_print_function_t) ndr_print_wbint_LookupName,
2430                 false,
2431         },
2432         {
2433                 "wbint_Sid2Uid",
2434                 sizeof(struct wbint_Sid2Uid),
2435                 (ndr_push_flags_fn_t) ndr_push_wbint_Sid2Uid,
2436                 (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Uid,
2437                 (ndr_print_function_t) ndr_print_wbint_Sid2Uid,
2438                 false,
2439         },
2440         {
2441                 "wbint_Sid2Gid",
2442                 sizeof(struct wbint_Sid2Gid),
2443                 (ndr_push_flags_fn_t) ndr_push_wbint_Sid2Gid,
2444                 (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Gid,
2445                 (ndr_print_function_t) ndr_print_wbint_Sid2Gid,
2446                 false,
2447         },
2448         {
2449                 "wbint_Uid2Sid",
2450                 sizeof(struct wbint_Uid2Sid),
2451                 (ndr_push_flags_fn_t) ndr_push_wbint_Uid2Sid,
2452                 (ndr_pull_flags_fn_t) ndr_pull_wbint_Uid2Sid,
2453                 (ndr_print_function_t) ndr_print_wbint_Uid2Sid,
2454                 false,
2455         },
2456         {
2457                 "wbint_Gid2Sid",
2458                 sizeof(struct wbint_Gid2Sid),
2459                 (ndr_push_flags_fn_t) ndr_push_wbint_Gid2Sid,
2460                 (ndr_pull_flags_fn_t) ndr_pull_wbint_Gid2Sid,
2461                 (ndr_print_function_t) ndr_print_wbint_Gid2Sid,
2462                 false,
2463         },
2464         {
2465                 "wbint_AllocateUid",
2466                 sizeof(struct wbint_AllocateUid),
2467                 (ndr_push_flags_fn_t) ndr_push_wbint_AllocateUid,
2468                 (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateUid,
2469                 (ndr_print_function_t) ndr_print_wbint_AllocateUid,
2470                 false,
2471         },
2472         {
2473                 "wbint_AllocateGid",
2474                 sizeof(struct wbint_AllocateGid),
2475                 (ndr_push_flags_fn_t) ndr_push_wbint_AllocateGid,
2476                 (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateGid,
2477                 (ndr_print_function_t) ndr_print_wbint_AllocateGid,
2478                 false,
2479         },
2480         {
2481                 "wbint_QueryUser",
2482                 sizeof(struct wbint_QueryUser),
2483                 (ndr_push_flags_fn_t) ndr_push_wbint_QueryUser,
2484                 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUser,
2485                 (ndr_print_function_t) ndr_print_wbint_QueryUser,
2486                 false,
2487         },
2488         {
2489                 "wbint_LookupUserAliases",
2490                 sizeof(struct wbint_LookupUserAliases),
2491                 (ndr_push_flags_fn_t) ndr_push_wbint_LookupUserAliases,
2492                 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserAliases,
2493                 (ndr_print_function_t) ndr_print_wbint_LookupUserAliases,
2494                 false,
2495         },
2496         {
2497                 "wbint_LookupUserGroups",
2498                 sizeof(struct wbint_LookupUserGroups),
2499                 (ndr_push_flags_fn_t) ndr_push_wbint_LookupUserGroups,
2500                 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserGroups,
2501                 (ndr_print_function_t) ndr_print_wbint_LookupUserGroups,
2502                 false,
2503         },
2504         {
2505                 "wbint_QuerySequenceNumber",
2506                 sizeof(struct wbint_QuerySequenceNumber),
2507                 (ndr_push_flags_fn_t) ndr_push_wbint_QuerySequenceNumber,
2508                 (ndr_pull_flags_fn_t) ndr_pull_wbint_QuerySequenceNumber,
2509                 (ndr_print_function_t) ndr_print_wbint_QuerySequenceNumber,
2510                 false,
2511         },
2512         {
2513                 "wbint_LookupGroupMembers",
2514                 sizeof(struct wbint_LookupGroupMembers),
2515                 (ndr_push_flags_fn_t) ndr_push_wbint_LookupGroupMembers,
2516                 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupGroupMembers,
2517                 (ndr_print_function_t) ndr_print_wbint_LookupGroupMembers,
2518                 false,
2519         },
2520         {
2521                 "wbint_QueryUserList",
2522                 sizeof(struct wbint_QueryUserList),
2523                 (ndr_push_flags_fn_t) ndr_push_wbint_QueryUserList,
2524                 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUserList,
2525                 (ndr_print_function_t) ndr_print_wbint_QueryUserList,
2526                 false,
2527         },
2528         {
2529                 "wbint_QueryGroupList",
2530                 sizeof(struct wbint_QueryGroupList),
2531                 (ndr_push_flags_fn_t) ndr_push_wbint_QueryGroupList,
2532                 (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryGroupList,
2533                 (ndr_print_function_t) ndr_print_wbint_QueryGroupList,
2534                 false,
2535         },
2536         {
2537                 "wbint_DsGetDcName",
2538                 sizeof(struct wbint_DsGetDcName),
2539                 (ndr_push_flags_fn_t) ndr_push_wbint_DsGetDcName,
2540                 (ndr_pull_flags_fn_t) ndr_pull_wbint_DsGetDcName,
2541                 (ndr_print_function_t) ndr_print_wbint_DsGetDcName,
2542                 false,
2543         },
2544         {
2545                 "wbint_LookupRids",
2546                 sizeof(struct wbint_LookupRids),
2547                 (ndr_push_flags_fn_t) ndr_push_wbint_LookupRids,
2548                 (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupRids,
2549                 (ndr_print_function_t) ndr_print_wbint_LookupRids,
2550                 false,
2551         },
2552         {
2553                 "wbint_CheckMachineAccount",
2554                 sizeof(struct wbint_CheckMachineAccount),
2555                 (ndr_push_flags_fn_t) ndr_push_wbint_CheckMachineAccount,
2556                 (ndr_pull_flags_fn_t) ndr_pull_wbint_CheckMachineAccount,
2557                 (ndr_print_function_t) ndr_print_wbint_CheckMachineAccount,
2558                 false,
2559         },
2560         {
2561                 "wbint_ChangeMachineAccount",
2562                 sizeof(struct wbint_ChangeMachineAccount),
2563                 (ndr_push_flags_fn_t) ndr_push_wbint_ChangeMachineAccount,
2564                 (ndr_pull_flags_fn_t) ndr_pull_wbint_ChangeMachineAccount,
2565                 (ndr_print_function_t) ndr_print_wbint_ChangeMachineAccount,
2566                 false,
2567         },
2568         {
2569                 "wbint_SetMapping",
2570                 sizeof(struct wbint_SetMapping),
2571                 (ndr_push_flags_fn_t) ndr_push_wbint_SetMapping,
2572                 (ndr_pull_flags_fn_t) ndr_pull_wbint_SetMapping,
2573                 (ndr_print_function_t) ndr_print_wbint_SetMapping,
2574                 false,
2575         },
2576         {
2577                 "wbint_RemoveMapping",
2578                 sizeof(struct wbint_RemoveMapping),
2579                 (ndr_push_flags_fn_t) ndr_push_wbint_RemoveMapping,
2580                 (ndr_pull_flags_fn_t) ndr_pull_wbint_RemoveMapping,
2581                 (ndr_print_function_t) ndr_print_wbint_RemoveMapping,
2582                 false,
2583         },
2584         {
2585                 "wbint_SetHWM",
2586                 sizeof(struct wbint_SetHWM),
2587                 (ndr_push_flags_fn_t) ndr_push_wbint_SetHWM,
2588                 (ndr_pull_flags_fn_t) ndr_pull_wbint_SetHWM,
2589                 (ndr_print_function_t) ndr_print_wbint_SetHWM,
2590                 false,
2591         },
2592         { NULL, 0, NULL, NULL, NULL, false }
2593 };
2594
2595 static const char * const wbint_endpoint_strings[] = {
2596         "ncalrpc:", 
2597 };
2598
2599 static const struct ndr_interface_string_array wbint_endpoints = {
2600         .count  = 1,
2601         .names  = wbint_endpoint_strings
2602 };
2603
2604 static const char * const wbint_authservice_strings[] = {
2605         "host", 
2606 };
2607
2608 static const struct ndr_interface_string_array wbint_authservices = {
2609         .count  = 1,
2610         .names  = wbint_authservice_strings
2611 };
2612
2613
2614 const struct ndr_interface_table ndr_table_wbint = {
2615         .name           = "wbint",
2616         .syntax_id      = {
2617                 {0xbf09192c,0xed60,0x4928,{0x9d,0xff},{0xd0,0xd7,0xbc,0xb0,0x3e,0xd8}},
2618                 NDR_WBINT_VERSION
2619         },
2620         .helpstring     = NDR_WBINT_HELPSTRING,
2621         .num_calls      = 23,
2622         .calls          = wbint_calls,
2623         .endpoints      = &wbint_endpoints,
2624         .authservices   = &wbint_authservices
2625 };
2626