s3/s4:samr.idl - Corrects the "userPwdChangeFailureInformation" structure
[ira/wip.git] / librpc / gen_ndr / ndr_samr.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_samr.h"
5
6 #include "librpc/gen_ndr/ndr_misc.h"
7 #include "librpc/gen_ndr/ndr_lsa.h"
8 #include "librpc/gen_ndr/ndr_security.h"
9 _PUBLIC_ enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r)
10 {
11         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
12         return NDR_ERR_SUCCESS;
13 }
14
15 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r)
16 {
17         uint32_t v;
18         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
19         *r = v;
20         return NDR_ERR_SUCCESS;
21 }
22
23 _PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r)
24 {
25         const char *val = NULL;
26
27         switch (r) {
28                 case SAM_DATABASE_DOMAIN: val = "SAM_DATABASE_DOMAIN"; break;
29                 case SAM_DATABASE_BUILTIN: val = "SAM_DATABASE_BUILTIN"; break;
30                 case SAM_DATABASE_PRIVS: val = "SAM_DATABASE_PRIVS"; break;
31         }
32         ndr_print_enum(ndr, name, "ENUM", val, r);
33 }
34
35 _PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
36 {
37         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
38         return NDR_ERR_SUCCESS;
39 }
40
41 _PUBLIC_ enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
42 {
43         uint32_t v;
44         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
45         *r = v;
46         return NDR_ERR_SUCCESS;
47 }
48
49 _PUBLIC_ void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r)
50 {
51         ndr_print_uint32(ndr, name, r);
52         ndr->depth++;
53         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DISABLED", ACB_DISABLED, r);
54         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_HOMDIRREQ", ACB_HOMDIRREQ, r);
55         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PWNOTREQ", ACB_PWNOTREQ, r);
56         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_TEMPDUP", ACB_TEMPDUP, r);
57         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NORMAL", ACB_NORMAL, r);
58         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_MNS", ACB_MNS, r);
59         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DOMTRUST", ACB_DOMTRUST, r);
60         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_WSTRUST", ACB_WSTRUST, r);
61         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_SVRTRUST", ACB_SVRTRUST, r);
62         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PWNOEXP", ACB_PWNOEXP, r);
63         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_AUTOLOCK", ACB_AUTOLOCK, r);
64         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_ENC_TXT_PWD_ALLOWED", ACB_ENC_TXT_PWD_ALLOWED, r);
65         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_SMARTCARD_REQUIRED", ACB_SMARTCARD_REQUIRED, r);
66         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_TRUSTED_FOR_DELEGATION", ACB_TRUSTED_FOR_DELEGATION, r);
67         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NOT_DELEGATED", ACB_NOT_DELEGATED, r);
68         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_USE_DES_KEY_ONLY", ACB_USE_DES_KEY_ONLY, r);
69         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DONT_REQUIRE_PREAUTH", ACB_DONT_REQUIRE_PREAUTH, r);
70         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PW_EXPIRED", ACB_PW_EXPIRED, r);
71         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NO_AUTH_DATA_REQD", ACB_NO_AUTH_DATA_REQD, r);
72         ndr->depth--;
73 }
74
75 static enum ndr_err_code ndr_push_samr_ConnectAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
76 {
77         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
78         return NDR_ERR_SUCCESS;
79 }
80
81 static enum ndr_err_code ndr_pull_samr_ConnectAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
82 {
83         uint32_t v;
84         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
85         *r = v;
86         return NDR_ERR_SUCCESS;
87 }
88
89 _PUBLIC_ void ndr_print_samr_ConnectAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
90 {
91         ndr_print_uint32(ndr, name, r);
92         ndr->depth++;
93         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_CONNECT_TO_SERVER", SAMR_ACCESS_CONNECT_TO_SERVER, r);
94         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_SHUTDOWN_SERVER", SAMR_ACCESS_SHUTDOWN_SERVER, r);
95         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_INITIALIZE_SERVER", SAMR_ACCESS_INITIALIZE_SERVER, r);
96         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_CREATE_DOMAIN", SAMR_ACCESS_CREATE_DOMAIN, r);
97         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_ENUM_DOMAINS", SAMR_ACCESS_ENUM_DOMAINS, r);
98         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_LOOKUP_DOMAIN", SAMR_ACCESS_LOOKUP_DOMAIN, r);
99         ndr->depth--;
100 }
101
102 static enum ndr_err_code ndr_push_samr_UserAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
103 {
104         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
105         return NDR_ERR_SUCCESS;
106 }
107
108 static enum ndr_err_code ndr_pull_samr_UserAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
109 {
110         uint32_t v;
111         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
112         *r = v;
113         return NDR_ERR_SUCCESS;
114 }
115
116 _PUBLIC_ void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
117 {
118         ndr_print_uint32(ndr, name, r);
119         ndr->depth++;
120         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_NAME_ETC", SAMR_USER_ACCESS_GET_NAME_ETC, r);
121         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOCALE", SAMR_USER_ACCESS_GET_LOCALE, r);
122         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_LOC_COM", SAMR_USER_ACCESS_SET_LOC_COM, r);
123         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOGONINFO", SAMR_USER_ACCESS_GET_LOGONINFO, r);
124         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_ATTRIBUTES", SAMR_USER_ACCESS_GET_ATTRIBUTES, r);
125         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_ATTRIBUTES", SAMR_USER_ACCESS_SET_ATTRIBUTES, r);
126         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_PASSWORD", SAMR_USER_ACCESS_CHANGE_PASSWORD, r);
127         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_PASSWORD", SAMR_USER_ACCESS_SET_PASSWORD, r);
128         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUPS", SAMR_USER_ACCESS_GET_GROUPS, r);
129         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP, r);
130         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP, r);
131         ndr->depth--;
132 }
133
134 static enum ndr_err_code ndr_push_samr_DomainAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
135 {
136         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
137         return NDR_ERR_SUCCESS;
138 }
139
140 static enum ndr_err_code ndr_pull_samr_DomainAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
141 {
142         uint32_t v;
143         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
144         *r = v;
145         return NDR_ERR_SUCCESS;
146 }
147
148 _PUBLIC_ void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
149 {
150         ndr_print_uint32(ndr, name, r);
151         ndr->depth++;
152         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1, r);
153         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_1", SAMR_DOMAIN_ACCESS_SET_INFO_1, r);
154         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2, r);
155         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_2", SAMR_DOMAIN_ACCESS_SET_INFO_2, r);
156         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_USER", SAMR_DOMAIN_ACCESS_CREATE_USER, r);
157         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_GROUP", SAMR_DOMAIN_ACCESS_CREATE_GROUP, r);
158         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_ALIAS", SAMR_DOMAIN_ACCESS_CREATE_ALIAS, r);
159         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS", SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS, r);
160         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS", SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS, r);
161         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT", SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT, r);
162         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_3", SAMR_DOMAIN_ACCESS_SET_INFO_3, r);
163         ndr->depth--;
164 }
165
166 static enum ndr_err_code ndr_push_samr_GroupAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
167 {
168         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
169         return NDR_ERR_SUCCESS;
170 }
171
172 static enum ndr_err_code ndr_pull_samr_GroupAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
173 {
174         uint32_t v;
175         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
176         *r = v;
177         return NDR_ERR_SUCCESS;
178 }
179
180 _PUBLIC_ void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
181 {
182         ndr_print_uint32(ndr, name, r);
183         ndr->depth++;
184         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_LOOKUP_INFO", SAMR_GROUP_ACCESS_LOOKUP_INFO, r);
185         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_SET_INFO", SAMR_GROUP_ACCESS_SET_INFO, r);
186         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_ADD_MEMBER", SAMR_GROUP_ACCESS_ADD_MEMBER, r);
187         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_REMOVE_MEMBER", SAMR_GROUP_ACCESS_REMOVE_MEMBER, r);
188         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_GET_MEMBERS", SAMR_GROUP_ACCESS_GET_MEMBERS, r);
189         ndr->depth--;
190 }
191
192 static enum ndr_err_code ndr_push_samr_AliasAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
193 {
194         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
195         return NDR_ERR_SUCCESS;
196 }
197
198 static enum ndr_err_code ndr_pull_samr_AliasAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
199 {
200         uint32_t v;
201         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
202         *r = v;
203         return NDR_ERR_SUCCESS;
204 }
205
206 _PUBLIC_ void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
207 {
208         ndr_print_uint32(ndr, name, r);
209         ndr->depth++;
210         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_ADD_MEMBER", SAMR_ALIAS_ACCESS_ADD_MEMBER, r);
211         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_REMOVE_MEMBER", SAMR_ALIAS_ACCESS_REMOVE_MEMBER, r);
212         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_GET_MEMBERS", SAMR_ALIAS_ACCESS_GET_MEMBERS, r);
213         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_LOOKUP_INFO", SAMR_ALIAS_ACCESS_LOOKUP_INFO, r);
214         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_SET_INFO", SAMR_ALIAS_ACCESS_SET_INFO, r);
215         ndr->depth--;
216 }
217
218 static enum ndr_err_code ndr_push_samr_SamEntry(struct ndr_push *ndr, int ndr_flags, const struct samr_SamEntry *r)
219 {
220         if (ndr_flags & NDR_SCALARS) {
221                 NDR_CHECK(ndr_push_align(ndr, 5));
222                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
223                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
224                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
225         }
226         if (ndr_flags & NDR_BUFFERS) {
227                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
228         }
229         return NDR_ERR_SUCCESS;
230 }
231
232 static enum ndr_err_code ndr_pull_samr_SamEntry(struct ndr_pull *ndr, int ndr_flags, struct samr_SamEntry *r)
233 {
234         if (ndr_flags & NDR_SCALARS) {
235                 NDR_CHECK(ndr_pull_align(ndr, 5));
236                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
237                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
238                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
239         }
240         if (ndr_flags & NDR_BUFFERS) {
241                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
242         }
243         return NDR_ERR_SUCCESS;
244 }
245
246 _PUBLIC_ void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r)
247 {
248         ndr_print_struct(ndr, name, "samr_SamEntry");
249         ndr->depth++;
250         ndr_print_uint32(ndr, "idx", r->idx);
251         ndr_print_lsa_String(ndr, "name", &r->name);
252         ndr->depth--;
253 }
254
255 static enum ndr_err_code ndr_push_samr_SamArray(struct ndr_push *ndr, int ndr_flags, const struct samr_SamArray *r)
256 {
257         uint32_t cntr_entries_1;
258         if (ndr_flags & NDR_SCALARS) {
259                 NDR_CHECK(ndr_push_align(ndr, 5));
260                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
261                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
262                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
263         }
264         if (ndr_flags & NDR_BUFFERS) {
265                 if (r->entries) {
266                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
267                         for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
268                                 NDR_CHECK(ndr_push_samr_SamEntry(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
269                         }
270                         for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
271                                 NDR_CHECK(ndr_push_samr_SamEntry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
272                         }
273                 }
274         }
275         return NDR_ERR_SUCCESS;
276 }
277
278 static enum ndr_err_code ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r)
279 {
280         uint32_t _ptr_entries;
281         uint32_t cntr_entries_1;
282         TALLOC_CTX *_mem_save_entries_0;
283         TALLOC_CTX *_mem_save_entries_1;
284         if (ndr_flags & NDR_SCALARS) {
285                 NDR_CHECK(ndr_pull_align(ndr, 5));
286                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
287                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
288                 if (_ptr_entries) {
289                         NDR_PULL_ALLOC(ndr, r->entries);
290                 } else {
291                         r->entries = NULL;
292                 }
293                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
294         }
295         if (ndr_flags & NDR_BUFFERS) {
296                 if (r->entries) {
297                         _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
298                         NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
299                         NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
300                         NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
301                         _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
302                         NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
303                         for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
304                                 NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
305                         }
306                         for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
307                                 NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
308                         }
309                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
310                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
311                 }
312                 if (r->entries) {
313                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
314                 }
315         }
316         return NDR_ERR_SUCCESS;
317 }
318
319 _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r)
320 {
321         uint32_t cntr_entries_1;
322         ndr_print_struct(ndr, name, "samr_SamArray");
323         ndr->depth++;
324         ndr_print_uint32(ndr, "count", r->count);
325         ndr_print_ptr(ndr, "entries", r->entries);
326         ndr->depth++;
327         if (r->entries) {
328                 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
329                 ndr->depth++;
330                 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
331                         char *idx_1=NULL;
332                         if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
333                                 ndr_print_samr_SamEntry(ndr, "entries", &r->entries[cntr_entries_1]);
334                                 free(idx_1);
335                         }
336                 }
337                 ndr->depth--;
338         }
339         ndr->depth--;
340         ndr->depth--;
341 }
342
343 static enum ndr_err_code ndr_push_samr_DomainInfoClass(struct ndr_push *ndr, int ndr_flags, enum samr_DomainInfoClass r)
344 {
345         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
346         return NDR_ERR_SUCCESS;
347 }
348
349 static enum ndr_err_code ndr_pull_samr_DomainInfoClass(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainInfoClass *r)
350 {
351         uint16_t v;
352         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
353         *r = v;
354         return NDR_ERR_SUCCESS;
355 }
356
357 _PUBLIC_ void ndr_print_samr_DomainInfoClass(struct ndr_print *ndr, const char *name, enum samr_DomainInfoClass r)
358 {
359         const char *val = NULL;
360
361         switch (r) {
362                 case DomainPasswordInformation: val = "DomainPasswordInformation"; break;
363                 case DomainGeneralInformation: val = "DomainGeneralInformation"; break;
364                 case DomainLogoffInformation: val = "DomainLogoffInformation"; break;
365                 case DomainOemInformation: val = "DomainOemInformation"; break;
366                 case DomainNameInformation: val = "DomainNameInformation"; break;
367                 case DomainReplicationInformation: val = "DomainReplicationInformation"; break;
368                 case DomainServerRoleInformation: val = "DomainServerRoleInformation"; break;
369                 case DomainModifiedInformation: val = "DomainModifiedInformation"; break;
370                 case DomainStateInformation: val = "DomainStateInformation"; break;
371                 case DomainUasInformation: val = "DomainUasInformation"; break;
372                 case DomainGeneralInformation2: val = "DomainGeneralInformation2"; break;
373                 case DomainLockoutInformation: val = "DomainLockoutInformation"; break;
374                 case DomainModifiedInformation2: val = "DomainModifiedInformation2"; break;
375         }
376         ndr_print_enum(ndr, name, "ENUM", val, r);
377 }
378
379 static enum ndr_err_code ndr_push_samr_Role(struct ndr_push *ndr, int ndr_flags, enum samr_Role r)
380 {
381         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
382         return NDR_ERR_SUCCESS;
383 }
384
385 static enum ndr_err_code ndr_pull_samr_Role(struct ndr_pull *ndr, int ndr_flags, enum samr_Role *r)
386 {
387         uint32_t v;
388         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
389         *r = v;
390         return NDR_ERR_SUCCESS;
391 }
392
393 _PUBLIC_ void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r)
394 {
395         const char *val = NULL;
396
397         switch (r) {
398                 case SAMR_ROLE_STANDALONE: val = "SAMR_ROLE_STANDALONE"; break;
399                 case SAMR_ROLE_DOMAIN_MEMBER: val = "SAMR_ROLE_DOMAIN_MEMBER"; break;
400                 case SAMR_ROLE_DOMAIN_BDC: val = "SAMR_ROLE_DOMAIN_BDC"; break;
401                 case SAMR_ROLE_DOMAIN_PDC: val = "SAMR_ROLE_DOMAIN_PDC"; break;
402         }
403         ndr_print_enum(ndr, name, "ENUM", val, r);
404 }
405
406 _PUBLIC_ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r)
407 {
408         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
409         return NDR_ERR_SUCCESS;
410 }
411
412 _PUBLIC_ enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
413 {
414         uint32_t v;
415         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
416         *r = v;
417         return NDR_ERR_SUCCESS;
418 }
419
420 _PUBLIC_ void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r)
421 {
422         ndr_print_uint32(ndr, name, r);
423         ndr->depth++;
424         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_COMPLEX", DOMAIN_PASSWORD_COMPLEX, r);
425         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_ANON_CHANGE", DOMAIN_PASSWORD_NO_ANON_CHANGE, r);
426         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_CLEAR_CHANGE", DOMAIN_PASSWORD_NO_CLEAR_CHANGE, r);
427         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_LOCKOUT_ADMINS", DOMAIN_PASSWORD_LOCKOUT_ADMINS, r);
428         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_STORE_CLEARTEXT", DOMAIN_PASSWORD_STORE_CLEARTEXT, r);
429         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_REFUSE_PASSWORD_CHANGE", DOMAIN_REFUSE_PASSWORD_CHANGE, r);
430         ndr->depth--;
431 }
432
433 static enum ndr_err_code ndr_push_samr_DomainServerState(struct ndr_push *ndr, int ndr_flags, enum samr_DomainServerState r)
434 {
435         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
436         return NDR_ERR_SUCCESS;
437 }
438
439 static enum ndr_err_code ndr_pull_samr_DomainServerState(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainServerState *r)
440 {
441         uint32_t v;
442         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
443         *r = v;
444         return NDR_ERR_SUCCESS;
445 }
446
447 _PUBLIC_ void ndr_print_samr_DomainServerState(struct ndr_print *ndr, const char *name, enum samr_DomainServerState r)
448 {
449         const char *val = NULL;
450
451         switch (r) {
452                 case DOMAIN_SERVER_ENABLED: val = "DOMAIN_SERVER_ENABLED"; break;
453                 case DOMAIN_SERVER_DISABLED: val = "DOMAIN_SERVER_DISABLED"; break;
454         }
455         ndr_print_enum(ndr, name, "ENUM", val, r);
456 }
457
458 static enum ndr_err_code ndr_push_samr_DomInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo1 *r)
459 {
460         if (ndr_flags & NDR_SCALARS) {
461                 NDR_CHECK(ndr_push_align(ndr, 4));
462                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
463                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length));
464                 NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties));
465                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age));
466                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age));
467                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
468         }
469         if (ndr_flags & NDR_BUFFERS) {
470         }
471         return NDR_ERR_SUCCESS;
472 }
473
474 static enum ndr_err_code ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo1 *r)
475 {
476         if (ndr_flags & NDR_SCALARS) {
477                 NDR_CHECK(ndr_pull_align(ndr, 4));
478                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
479                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length));
480                 NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties));
481                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age));
482                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age));
483                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
484         }
485         if (ndr_flags & NDR_BUFFERS) {
486         }
487         return NDR_ERR_SUCCESS;
488 }
489
490 _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r)
491 {
492         ndr_print_struct(ndr, name, "samr_DomInfo1");
493         ndr->depth++;
494         ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
495         ndr_print_uint16(ndr, "password_history_length", r->password_history_length);
496         ndr_print_samr_PasswordProperties(ndr, "password_properties", r->password_properties);
497         ndr_print_dlong(ndr, "max_password_age", r->max_password_age);
498         ndr_print_dlong(ndr, "min_password_age", r->min_password_age);
499         ndr->depth--;
500 }
501
502 static enum ndr_err_code ndr_push_samr_DomGeneralInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation *r)
503 {
504         if (ndr_flags & NDR_SCALARS) {
505                 NDR_CHECK(ndr_push_align(ndr, 5));
506                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time));
507                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
508                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
509                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary));
510                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
511                 NDR_CHECK(ndr_push_samr_DomainServerState(ndr, NDR_SCALARS, r->domain_server_state));
512                 NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role));
513                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
514                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
515                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_groups));
516                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aliases));
517                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
518         }
519         if (ndr_flags & NDR_BUFFERS) {
520                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
521                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
522                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary));
523         }
524         return NDR_ERR_SUCCESS;
525 }
526
527 static enum ndr_err_code ndr_pull_samr_DomGeneralInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation *r)
528 {
529         if (ndr_flags & NDR_SCALARS) {
530                 NDR_CHECK(ndr_pull_align(ndr, 5));
531                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time));
532                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
533                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
534                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary));
535                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
536                 NDR_CHECK(ndr_pull_samr_DomainServerState(ndr, NDR_SCALARS, &r->domain_server_state));
537                 NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role));
538                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
539                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
540                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_groups));
541                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aliases));
542                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
543         }
544         if (ndr_flags & NDR_BUFFERS) {
545                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
546                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
547                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary));
548         }
549         return NDR_ERR_SUCCESS;
550 }
551
552 _PUBLIC_ void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r)
553 {
554         ndr_print_struct(ndr, name, "samr_DomGeneralInformation");
555         ndr->depth++;
556         ndr_print_NTTIME(ndr, "force_logoff_time", r->force_logoff_time);
557         ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
558         ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
559         ndr_print_lsa_String(ndr, "primary", &r->primary);
560         ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
561         ndr_print_samr_DomainServerState(ndr, "domain_server_state", r->domain_server_state);
562         ndr_print_samr_Role(ndr, "role", r->role);
563         ndr_print_uint32(ndr, "unknown3", r->unknown3);
564         ndr_print_uint32(ndr, "num_users", r->num_users);
565         ndr_print_uint32(ndr, "num_groups", r->num_groups);
566         ndr_print_uint32(ndr, "num_aliases", r->num_aliases);
567         ndr->depth--;
568 }
569
570 static enum ndr_err_code ndr_push_samr_DomInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo3 *r)
571 {
572         if (ndr_flags & NDR_SCALARS) {
573                 NDR_CHECK(ndr_push_align(ndr, 4));
574                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time));
575                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
576         }
577         if (ndr_flags & NDR_BUFFERS) {
578         }
579         return NDR_ERR_SUCCESS;
580 }
581
582 static enum ndr_err_code ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo3 *r)
583 {
584         if (ndr_flags & NDR_SCALARS) {
585                 NDR_CHECK(ndr_pull_align(ndr, 4));
586                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time));
587                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
588         }
589         if (ndr_flags & NDR_BUFFERS) {
590         }
591         return NDR_ERR_SUCCESS;
592 }
593
594 _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r)
595 {
596         ndr_print_struct(ndr, name, "samr_DomInfo3");
597         ndr->depth++;
598         ndr_print_NTTIME(ndr, "force_logoff_time", r->force_logoff_time);
599         ndr->depth--;
600 }
601
602 static enum ndr_err_code ndr_push_samr_DomOEMInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomOEMInformation *r)
603 {
604         if (ndr_flags & NDR_SCALARS) {
605                 NDR_CHECK(ndr_push_align(ndr, 5));
606                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
607                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
608         }
609         if (ndr_flags & NDR_BUFFERS) {
610                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
611         }
612         return NDR_ERR_SUCCESS;
613 }
614
615 static enum ndr_err_code ndr_pull_samr_DomOEMInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomOEMInformation *r)
616 {
617         if (ndr_flags & NDR_SCALARS) {
618                 NDR_CHECK(ndr_pull_align(ndr, 5));
619                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
620                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
621         }
622         if (ndr_flags & NDR_BUFFERS) {
623                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
624         }
625         return NDR_ERR_SUCCESS;
626 }
627
628 _PUBLIC_ void ndr_print_samr_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *r)
629 {
630         ndr_print_struct(ndr, name, "samr_DomOEMInformation");
631         ndr->depth++;
632         ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
633         ndr->depth--;
634 }
635
636 static enum ndr_err_code ndr_push_samr_DomInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo5 *r)
637 {
638         if (ndr_flags & NDR_SCALARS) {
639                 NDR_CHECK(ndr_push_align(ndr, 5));
640                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
641                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
642         }
643         if (ndr_flags & NDR_BUFFERS) {
644                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
645         }
646         return NDR_ERR_SUCCESS;
647 }
648
649 static enum ndr_err_code ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo5 *r)
650 {
651         if (ndr_flags & NDR_SCALARS) {
652                 NDR_CHECK(ndr_pull_align(ndr, 5));
653                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
654                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
655         }
656         if (ndr_flags & NDR_BUFFERS) {
657                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
658         }
659         return NDR_ERR_SUCCESS;
660 }
661
662 _PUBLIC_ void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r)
663 {
664         ndr_print_struct(ndr, name, "samr_DomInfo5");
665         ndr->depth++;
666         ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
667         ndr->depth--;
668 }
669
670 static enum ndr_err_code ndr_push_samr_DomInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo6 *r)
671 {
672         if (ndr_flags & NDR_SCALARS) {
673                 NDR_CHECK(ndr_push_align(ndr, 5));
674                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary));
675                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
676         }
677         if (ndr_flags & NDR_BUFFERS) {
678                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary));
679         }
680         return NDR_ERR_SUCCESS;
681 }
682
683 static enum ndr_err_code ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo6 *r)
684 {
685         if (ndr_flags & NDR_SCALARS) {
686                 NDR_CHECK(ndr_pull_align(ndr, 5));
687                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary));
688                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
689         }
690         if (ndr_flags & NDR_BUFFERS) {
691                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary));
692         }
693         return NDR_ERR_SUCCESS;
694 }
695
696 _PUBLIC_ void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r)
697 {
698         ndr_print_struct(ndr, name, "samr_DomInfo6");
699         ndr->depth++;
700         ndr_print_lsa_String(ndr, "primary", &r->primary);
701         ndr->depth--;
702 }
703
704 static enum ndr_err_code ndr_push_samr_DomInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo7 *r)
705 {
706         if (ndr_flags & NDR_SCALARS) {
707                 NDR_CHECK(ndr_push_align(ndr, 4));
708                 NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role));
709                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
710         }
711         if (ndr_flags & NDR_BUFFERS) {
712         }
713         return NDR_ERR_SUCCESS;
714 }
715
716 static enum ndr_err_code ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo7 *r)
717 {
718         if (ndr_flags & NDR_SCALARS) {
719                 NDR_CHECK(ndr_pull_align(ndr, 4));
720                 NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role));
721                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
722         }
723         if (ndr_flags & NDR_BUFFERS) {
724         }
725         return NDR_ERR_SUCCESS;
726 }
727
728 _PUBLIC_ void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r)
729 {
730         ndr_print_struct(ndr, name, "samr_DomInfo7");
731         ndr->depth++;
732         ndr_print_samr_Role(ndr, "role", r->role);
733         ndr->depth--;
734 }
735
736 static enum ndr_err_code ndr_push_samr_DomInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo8 *r)
737 {
738         if (ndr_flags & NDR_SCALARS) {
739                 NDR_CHECK(ndr_push_align(ndr, 8));
740                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num));
741                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
742                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
743         }
744         if (ndr_flags & NDR_BUFFERS) {
745         }
746         return NDR_ERR_SUCCESS;
747 }
748
749 static enum ndr_err_code ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo8 *r)
750 {
751         if (ndr_flags & NDR_SCALARS) {
752                 NDR_CHECK(ndr_pull_align(ndr, 8));
753                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num));
754                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
755                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
756         }
757         if (ndr_flags & NDR_BUFFERS) {
758         }
759         return NDR_ERR_SUCCESS;
760 }
761
762 _PUBLIC_ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r)
763 {
764         ndr_print_struct(ndr, name, "samr_DomInfo8");
765         ndr->depth++;
766         ndr_print_hyper(ndr, "sequence_num", r->sequence_num);
767         ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
768         ndr->depth--;
769 }
770
771 static enum ndr_err_code ndr_push_samr_DomInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo9 *r)
772 {
773         if (ndr_flags & NDR_SCALARS) {
774                 NDR_CHECK(ndr_push_align(ndr, 4));
775                 NDR_CHECK(ndr_push_samr_DomainServerState(ndr, NDR_SCALARS, r->domain_server_state));
776                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
777         }
778         if (ndr_flags & NDR_BUFFERS) {
779         }
780         return NDR_ERR_SUCCESS;
781 }
782
783 static enum ndr_err_code ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo9 *r)
784 {
785         if (ndr_flags & NDR_SCALARS) {
786                 NDR_CHECK(ndr_pull_align(ndr, 4));
787                 NDR_CHECK(ndr_pull_samr_DomainServerState(ndr, NDR_SCALARS, &r->domain_server_state));
788                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
789         }
790         if (ndr_flags & NDR_BUFFERS) {
791         }
792         return NDR_ERR_SUCCESS;
793 }
794
795 _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r)
796 {
797         ndr_print_struct(ndr, name, "samr_DomInfo9");
798         ndr->depth++;
799         ndr_print_samr_DomainServerState(ndr, "domain_server_state", r->domain_server_state);
800         ndr->depth--;
801 }
802
803 static enum ndr_err_code ndr_push_samr_DomGeneralInformation2(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation2 *r)
804 {
805         if (ndr_flags & NDR_SCALARS) {
806                 NDR_CHECK(ndr_push_align(ndr, 8));
807                 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
808                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration));
809                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window));
810                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold));
811                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
812         }
813         if (ndr_flags & NDR_BUFFERS) {
814                 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
815         }
816         return NDR_ERR_SUCCESS;
817 }
818
819 static enum ndr_err_code ndr_pull_samr_DomGeneralInformation2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation2 *r)
820 {
821         if (ndr_flags & NDR_SCALARS) {
822                 NDR_CHECK(ndr_pull_align(ndr, 8));
823                 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
824                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration));
825                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window));
826                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold));
827                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
828         }
829         if (ndr_flags & NDR_BUFFERS) {
830                 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
831         }
832         return NDR_ERR_SUCCESS;
833 }
834
835 _PUBLIC_ void ndr_print_samr_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *r)
836 {
837         ndr_print_struct(ndr, name, "samr_DomGeneralInformation2");
838         ndr->depth++;
839         ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general);
840         ndr_print_hyper(ndr, "lockout_duration", r->lockout_duration);
841         ndr_print_hyper(ndr, "lockout_window", r->lockout_window);
842         ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold);
843         ndr->depth--;
844 }
845
846 static enum ndr_err_code ndr_push_samr_DomInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo12 *r)
847 {
848         if (ndr_flags & NDR_SCALARS) {
849                 NDR_CHECK(ndr_push_align(ndr, 8));
850                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration));
851                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window));
852                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold));
853                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
854         }
855         if (ndr_flags & NDR_BUFFERS) {
856         }
857         return NDR_ERR_SUCCESS;
858 }
859
860 static enum ndr_err_code ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo12 *r)
861 {
862         if (ndr_flags & NDR_SCALARS) {
863                 NDR_CHECK(ndr_pull_align(ndr, 8));
864                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration));
865                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window));
866                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold));
867                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
868         }
869         if (ndr_flags & NDR_BUFFERS) {
870         }
871         return NDR_ERR_SUCCESS;
872 }
873
874 _PUBLIC_ void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r)
875 {
876         ndr_print_struct(ndr, name, "samr_DomInfo12");
877         ndr->depth++;
878         ndr_print_hyper(ndr, "lockout_duration", r->lockout_duration);
879         ndr_print_hyper(ndr, "lockout_window", r->lockout_window);
880         ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold);
881         ndr->depth--;
882 }
883
884 static enum ndr_err_code ndr_push_samr_DomInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo13 *r)
885 {
886         if (ndr_flags & NDR_SCALARS) {
887                 NDR_CHECK(ndr_push_align(ndr, 8));
888                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num));
889                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
890                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_count_at_last_promotion));
891                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
892         }
893         if (ndr_flags & NDR_BUFFERS) {
894         }
895         return NDR_ERR_SUCCESS;
896 }
897
898 static enum ndr_err_code ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo13 *r)
899 {
900         if (ndr_flags & NDR_SCALARS) {
901                 NDR_CHECK(ndr_pull_align(ndr, 8));
902                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num));
903                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
904                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_count_at_last_promotion));
905                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
906         }
907         if (ndr_flags & NDR_BUFFERS) {
908         }
909         return NDR_ERR_SUCCESS;
910 }
911
912 _PUBLIC_ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r)
913 {
914         ndr_print_struct(ndr, name, "samr_DomInfo13");
915         ndr->depth++;
916         ndr_print_hyper(ndr, "sequence_num", r->sequence_num);
917         ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
918         ndr_print_hyper(ndr, "modified_count_at_last_promotion", r->modified_count_at_last_promotion);
919         ndr->depth--;
920 }
921
922 static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const union samr_DomainInfo *r)
923 {
924         if (ndr_flags & NDR_SCALARS) {
925                 int level = ndr_push_get_switch_value(ndr, r);
926                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
927                 NDR_CHECK(ndr_push_union_align(ndr, 8));
928                 switch (level) {
929                         case 1: {
930                                 NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1));
931                         break; }
932
933                         case 2: {
934                                 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
935                         break; }
936
937                         case 3: {
938                                 NDR_CHECK(ndr_push_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3));
939                         break; }
940
941                         case 4: {
942                                 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
943                         break; }
944
945                         case 5: {
946                                 NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5));
947                         break; }
948
949                         case 6: {
950                                 NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6));
951                         break; }
952
953                         case 7: {
954                                 NDR_CHECK(ndr_push_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7));
955                         break; }
956
957                         case 8: {
958                                 NDR_CHECK(ndr_push_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8));
959                         break; }
960
961                         case 9: {
962                                 NDR_CHECK(ndr_push_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9));
963                         break; }
964
965                         case 11: {
966                                 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
967                         break; }
968
969                         case 12: {
970                                 NDR_CHECK(ndr_push_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12));
971                         break; }
972
973                         case 13: {
974                                 NDR_CHECK(ndr_push_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13));
975                         break; }
976
977                         default:
978                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
979                 }
980         }
981         if (ndr_flags & NDR_BUFFERS) {
982                 int level = ndr_push_get_switch_value(ndr, r);
983                 switch (level) {
984                         case 1:
985                         break;
986
987                         case 2:
988                                 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
989                         break;
990
991                         case 3:
992                         break;
993
994                         case 4:
995                                 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
996                         break;
997
998                         case 5:
999                                 NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5));
1000                         break;
1001
1002                         case 6:
1003                                 NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6));
1004                         break;
1005
1006                         case 7:
1007                         break;
1008
1009                         case 8:
1010                         break;
1011
1012                         case 9:
1013                         break;
1014
1015                         case 11:
1016                                 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
1017                         break;
1018
1019                         case 12:
1020                         break;
1021
1022                         case 13:
1023                         break;
1024
1025                         default:
1026                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1027                 }
1028         }
1029         return NDR_ERR_SUCCESS;
1030 }
1031
1032 static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, union samr_DomainInfo *r)
1033 {
1034         int level;
1035         uint16_t _level;
1036         level = ndr_pull_get_switch_value(ndr, r);
1037         if (ndr_flags & NDR_SCALARS) {
1038                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
1039                 if (_level != level) {
1040                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1041                 }
1042                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
1043                 switch (level) {
1044                         case 1: {
1045                                 NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1));
1046                         break; }
1047
1048                         case 2: {
1049                                 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
1050                         break; }
1051
1052                         case 3: {
1053                                 NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3));
1054                         break; }
1055
1056                         case 4: {
1057                                 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
1058                         break; }
1059
1060                         case 5: {
1061                                 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5));
1062                         break; }
1063
1064                         case 6: {
1065                                 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6));
1066                         break; }
1067
1068                         case 7: {
1069                                 NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7));
1070                         break; }
1071
1072                         case 8: {
1073                                 NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8));
1074                         break; }
1075
1076                         case 9: {
1077                                 NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9));
1078                         break; }
1079
1080                         case 11: {
1081                                 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
1082                         break; }
1083
1084                         case 12: {
1085                                 NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12));
1086                         break; }
1087
1088                         case 13: {
1089                                 NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13));
1090                         break; }
1091
1092                         default:
1093                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1094                 }
1095         }
1096         if (ndr_flags & NDR_BUFFERS) {
1097                 switch (level) {
1098                         case 1:
1099                         break;
1100
1101                         case 2:
1102                                 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
1103                         break;
1104
1105                         case 3:
1106                         break;
1107
1108                         case 4:
1109                                 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
1110                         break;
1111
1112                         case 5:
1113                                 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5));
1114                         break;
1115
1116                         case 6:
1117                                 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6));
1118                         break;
1119
1120                         case 7:
1121                         break;
1122
1123                         case 8:
1124                         break;
1125
1126                         case 9:
1127                         break;
1128
1129                         case 11:
1130                                 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
1131                         break;
1132
1133                         case 12:
1134                         break;
1135
1136                         case 13:
1137                         break;
1138
1139                         default:
1140                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1141                 }
1142         }
1143         return NDR_ERR_SUCCESS;
1144 }
1145
1146 _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r)
1147 {
1148         int level;
1149         level = ndr_print_get_switch_value(ndr, r);
1150         ndr_print_union(ndr, name, level, "samr_DomainInfo");
1151         switch (level) {
1152                 case 1:
1153                         ndr_print_samr_DomInfo1(ndr, "info1", &r->info1);
1154                 break;
1155
1156                 case 2:
1157                         ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general);
1158                 break;
1159
1160                 case 3:
1161                         ndr_print_samr_DomInfo3(ndr, "info3", &r->info3);
1162                 break;
1163
1164                 case 4:
1165                         ndr_print_samr_DomOEMInformation(ndr, "oem", &r->oem);
1166                 break;
1167
1168                 case 5:
1169                         ndr_print_samr_DomInfo5(ndr, "info5", &r->info5);
1170                 break;
1171
1172                 case 6:
1173                         ndr_print_samr_DomInfo6(ndr, "info6", &r->info6);
1174                 break;
1175
1176                 case 7:
1177                         ndr_print_samr_DomInfo7(ndr, "info7", &r->info7);
1178                 break;
1179
1180                 case 8:
1181                         ndr_print_samr_DomInfo8(ndr, "info8", &r->info8);
1182                 break;
1183
1184                 case 9:
1185                         ndr_print_samr_DomInfo9(ndr, "info9", &r->info9);
1186                 break;
1187
1188                 case 11:
1189                         ndr_print_samr_DomGeneralInformation2(ndr, "general2", &r->general2);
1190                 break;
1191
1192                 case 12:
1193                         ndr_print_samr_DomInfo12(ndr, "info12", &r->info12);
1194                 break;
1195
1196                 case 13:
1197                         ndr_print_samr_DomInfo13(ndr, "info13", &r->info13);
1198                 break;
1199
1200                 default:
1201                         ndr_print_bad_level(ndr, name, level);
1202         }
1203 }
1204
1205 static enum ndr_err_code ndr_push_samr_Ids(struct ndr_push *ndr, int ndr_flags, const struct samr_Ids *r)
1206 {
1207         uint32_t cntr_ids_1;
1208         if (ndr_flags & NDR_SCALARS) {
1209                 NDR_CHECK(ndr_push_align(ndr, 5));
1210                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1211                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ids));
1212                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1213         }
1214         if (ndr_flags & NDR_BUFFERS) {
1215                 if (r->ids) {
1216                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1217                         for (cntr_ids_1 = 0; cntr_ids_1 < r->count; cntr_ids_1++) {
1218                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ids[cntr_ids_1]));
1219                         }
1220                 }
1221         }
1222         return NDR_ERR_SUCCESS;
1223 }
1224
1225 static enum ndr_err_code ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags, struct samr_Ids *r)
1226 {
1227         uint32_t _ptr_ids;
1228         uint32_t cntr_ids_1;
1229         TALLOC_CTX *_mem_save_ids_0;
1230         TALLOC_CTX *_mem_save_ids_1;
1231         if (ndr_flags & NDR_SCALARS) {
1232                 NDR_CHECK(ndr_pull_align(ndr, 5));
1233                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1234                 if (r->count > 1024) {
1235                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1236                 }
1237                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ids));
1238                 if (_ptr_ids) {
1239                         NDR_PULL_ALLOC(ndr, r->ids);
1240                 } else {
1241                         r->ids = NULL;
1242                 }
1243                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1244         }
1245         if (ndr_flags & NDR_BUFFERS) {
1246                 if (r->ids) {
1247                         _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1248                         NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
1249                         NDR_CHECK(ndr_pull_array_size(ndr, &r->ids));
1250                         NDR_PULL_ALLOC_N(ndr, r->ids, ndr_get_array_size(ndr, &r->ids));
1251                         _mem_save_ids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1252                         NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
1253                         for (cntr_ids_1 = 0; cntr_ids_1 < r->count; cntr_ids_1++) {
1254                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ids[cntr_ids_1]));
1255                         }
1256                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_1, 0);
1257                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, 0);
1258                 }
1259                 if (r->ids) {
1260                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ids, r->count));
1261                 }
1262         }
1263         return NDR_ERR_SUCCESS;
1264 }
1265
1266 _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r)
1267 {
1268         uint32_t cntr_ids_1;
1269         ndr_print_struct(ndr, name, "samr_Ids");
1270         ndr->depth++;
1271         ndr_print_uint32(ndr, "count", r->count);
1272         ndr_print_ptr(ndr, "ids", r->ids);
1273         ndr->depth++;
1274         if (r->ids) {
1275                 ndr->print(ndr, "%s: ARRAY(%d)", "ids", (int)r->count);
1276                 ndr->depth++;
1277                 for (cntr_ids_1=0;cntr_ids_1<r->count;cntr_ids_1++) {
1278                         char *idx_1=NULL;
1279                         if (asprintf(&idx_1, "[%d]", cntr_ids_1) != -1) {
1280                                 ndr_print_uint32(ndr, "ids", r->ids[cntr_ids_1]);
1281                                 free(idx_1);
1282                         }
1283                 }
1284                 ndr->depth--;
1285         }
1286         ndr->depth--;
1287         ndr->depth--;
1288 }
1289
1290 _PUBLIC_ enum ndr_err_code ndr_push_samr_GroupAttrs(struct ndr_push *ndr, int ndr_flags, uint32_t r)
1291 {
1292         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1293         return NDR_ERR_SUCCESS;
1294 }
1295
1296 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GroupAttrs(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
1297 {
1298         uint32_t v;
1299         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1300         *r = v;
1301         return NDR_ERR_SUCCESS;
1302 }
1303
1304 _PUBLIC_ void ndr_print_samr_GroupAttrs(struct ndr_print *ndr, const char *name, uint32_t r)
1305 {
1306         ndr_print_uint32(ndr, name, r);
1307         ndr->depth++;
1308         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_MANDATORY", SE_GROUP_MANDATORY, r);
1309         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_ENABLED_BY_DEFAULT", SE_GROUP_ENABLED_BY_DEFAULT, r);
1310         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_ENABLED", SE_GROUP_ENABLED, r);
1311         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_OWNER", SE_GROUP_OWNER, r);
1312         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_USE_FOR_DENY_ONLY", SE_GROUP_USE_FOR_DENY_ONLY, r);
1313         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_RESOURCE", SE_GROUP_RESOURCE, r);
1314         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_LOGON_ID", SE_GROUP_LOGON_ID, r);
1315         ndr->depth--;
1316 }
1317
1318 static enum ndr_err_code ndr_push_samr_GroupInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAll *r)
1319 {
1320         if (ndr_flags & NDR_SCALARS) {
1321                 NDR_CHECK(ndr_push_align(ndr, 5));
1322                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1323                 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
1324                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members));
1325                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1326                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1327         }
1328         if (ndr_flags & NDR_BUFFERS) {
1329                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1330                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1331         }
1332         return NDR_ERR_SUCCESS;
1333 }
1334
1335 static enum ndr_err_code ndr_pull_samr_GroupInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAll *r)
1336 {
1337         if (ndr_flags & NDR_SCALARS) {
1338                 NDR_CHECK(ndr_pull_align(ndr, 5));
1339                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1340                 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
1341                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members));
1342                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1343                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1344         }
1345         if (ndr_flags & NDR_BUFFERS) {
1346                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1347                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1348         }
1349         return NDR_ERR_SUCCESS;
1350 }
1351
1352 _PUBLIC_ void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r)
1353 {
1354         ndr_print_struct(ndr, name, "samr_GroupInfoAll");
1355         ndr->depth++;
1356         ndr_print_lsa_String(ndr, "name", &r->name);
1357         ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes);
1358         ndr_print_uint32(ndr, "num_members", r->num_members);
1359         ndr_print_lsa_String(ndr, "description", &r->description);
1360         ndr->depth--;
1361 }
1362
1363 static enum ndr_err_code ndr_push_samr_GroupInfoAttributes(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAttributes *r)
1364 {
1365         if (ndr_flags & NDR_SCALARS) {
1366                 NDR_CHECK(ndr_push_align(ndr, 4));
1367                 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
1368                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1369         }
1370         if (ndr_flags & NDR_BUFFERS) {
1371         }
1372         return NDR_ERR_SUCCESS;
1373 }
1374
1375 static enum ndr_err_code ndr_pull_samr_GroupInfoAttributes(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAttributes *r)
1376 {
1377         if (ndr_flags & NDR_SCALARS) {
1378                 NDR_CHECK(ndr_pull_align(ndr, 4));
1379                 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
1380                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1381         }
1382         if (ndr_flags & NDR_BUFFERS) {
1383         }
1384         return NDR_ERR_SUCCESS;
1385 }
1386
1387 _PUBLIC_ void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r)
1388 {
1389         ndr_print_struct(ndr, name, "samr_GroupInfoAttributes");
1390         ndr->depth++;
1391         ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes);
1392         ndr->depth--;
1393 }
1394
1395 static enum ndr_err_code ndr_push_samr_GroupInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_GroupInfoEnum r)
1396 {
1397         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1398         return NDR_ERR_SUCCESS;
1399 }
1400
1401 static enum ndr_err_code ndr_pull_samr_GroupInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_GroupInfoEnum *r)
1402 {
1403         uint16_t v;
1404         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1405         *r = v;
1406         return NDR_ERR_SUCCESS;
1407 }
1408
1409 _PUBLIC_ void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r)
1410 {
1411         const char *val = NULL;
1412
1413         switch (r) {
1414                 case GROUPINFOALL: val = "GROUPINFOALL"; break;
1415                 case GROUPINFONAME: val = "GROUPINFONAME"; break;
1416                 case GROUPINFOATTRIBUTES: val = "GROUPINFOATTRIBUTES"; break;
1417                 case GROUPINFODESCRIPTION: val = "GROUPINFODESCRIPTION"; break;
1418                 case GROUPINFOALL2: val = "GROUPINFOALL2"; break;
1419         }
1420         ndr_print_enum(ndr, name, "ENUM", val, r);
1421 }
1422
1423 static enum ndr_err_code ndr_push_samr_GroupInfo(struct ndr_push *ndr, int ndr_flags, const union samr_GroupInfo *r)
1424 {
1425         if (ndr_flags & NDR_SCALARS) {
1426                 int level = ndr_push_get_switch_value(ndr, r);
1427                 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, level));
1428                 NDR_CHECK(ndr_push_union_align(ndr, 5));
1429                 switch (level) {
1430                         case GROUPINFOALL: {
1431                                 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all));
1432                         break; }
1433
1434                         case GROUPINFONAME: {
1435                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1436                         break; }
1437
1438                         case GROUPINFOATTRIBUTES: {
1439                                 NDR_CHECK(ndr_push_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes));
1440                         break; }
1441
1442                         case GROUPINFODESCRIPTION: {
1443                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1444                         break; }
1445
1446                         case GROUPINFOALL2: {
1447                                 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2));
1448                         break; }
1449
1450                         default:
1451                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1452                 }
1453         }
1454         if (ndr_flags & NDR_BUFFERS) {
1455                 int level = ndr_push_get_switch_value(ndr, r);
1456                 switch (level) {
1457                         case GROUPINFOALL:
1458                                 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all));
1459                         break;
1460
1461                         case GROUPINFONAME:
1462                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1463                         break;
1464
1465                         case GROUPINFOATTRIBUTES:
1466                         break;
1467
1468                         case GROUPINFODESCRIPTION:
1469                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1470                         break;
1471
1472                         case GROUPINFOALL2:
1473                                 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2));
1474                         break;
1475
1476                         default:
1477                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1478                 }
1479         }
1480         return NDR_ERR_SUCCESS;
1481 }
1482
1483 static enum ndr_err_code ndr_pull_samr_GroupInfo(struct ndr_pull *ndr, int ndr_flags, union samr_GroupInfo *r)
1484 {
1485         int level;
1486         uint16_t _level;
1487         level = ndr_pull_get_switch_value(ndr, r);
1488         if (ndr_flags & NDR_SCALARS) {
1489                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
1490                 if (_level != level) {
1491                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1492                 }
1493                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1494                 switch (level) {
1495                         case GROUPINFOALL: {
1496                                 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all));
1497                         break; }
1498
1499                         case GROUPINFONAME: {
1500                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1501                         break; }
1502
1503                         case GROUPINFOATTRIBUTES: {
1504                                 NDR_CHECK(ndr_pull_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes));
1505                         break; }
1506
1507                         case GROUPINFODESCRIPTION: {
1508                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1509                         break; }
1510
1511                         case GROUPINFOALL2: {
1512                                 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2));
1513                         break; }
1514
1515                         default:
1516                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1517                 }
1518         }
1519         if (ndr_flags & NDR_BUFFERS) {
1520                 switch (level) {
1521                         case GROUPINFOALL:
1522                                 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all));
1523                         break;
1524
1525                         case GROUPINFONAME:
1526                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1527                         break;
1528
1529                         case GROUPINFOATTRIBUTES:
1530                         break;
1531
1532                         case GROUPINFODESCRIPTION:
1533                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1534                         break;
1535
1536                         case GROUPINFOALL2:
1537                                 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2));
1538                         break;
1539
1540                         default:
1541                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1542                 }
1543         }
1544         return NDR_ERR_SUCCESS;
1545 }
1546
1547 _PUBLIC_ void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r)
1548 {
1549         int level;
1550         level = ndr_print_get_switch_value(ndr, r);
1551         ndr_print_union(ndr, name, level, "samr_GroupInfo");
1552         switch (level) {
1553                 case GROUPINFOALL:
1554                         ndr_print_samr_GroupInfoAll(ndr, "all", &r->all);
1555                 break;
1556
1557                 case GROUPINFONAME:
1558                         ndr_print_lsa_String(ndr, "name", &r->name);
1559                 break;
1560
1561                 case GROUPINFOATTRIBUTES:
1562                         ndr_print_samr_GroupInfoAttributes(ndr, "attributes", &r->attributes);
1563                 break;
1564
1565                 case GROUPINFODESCRIPTION:
1566                         ndr_print_lsa_String(ndr, "description", &r->description);
1567                 break;
1568
1569                 case GROUPINFOALL2:
1570                         ndr_print_samr_GroupInfoAll(ndr, "all2", &r->all2);
1571                 break;
1572
1573                 default:
1574                         ndr_print_bad_level(ndr, name, level);
1575         }
1576 }
1577
1578 static enum ndr_err_code ndr_push_samr_RidTypeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidTypeArray *r)
1579 {
1580         uint32_t cntr_rids_1;
1581         uint32_t cntr_types_1;
1582         if (ndr_flags & NDR_SCALARS) {
1583                 NDR_CHECK(ndr_push_align(ndr, 5));
1584                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1585                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
1586                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->types));
1587                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1588         }
1589         if (ndr_flags & NDR_BUFFERS) {
1590                 if (r->rids) {
1591                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1592                         for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
1593                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_1]));
1594                         }
1595                 }
1596                 if (r->types) {
1597                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1598                         for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) {
1599                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->types[cntr_types_1]));
1600                         }
1601                 }
1602         }
1603         return NDR_ERR_SUCCESS;
1604 }
1605
1606 static enum ndr_err_code ndr_pull_samr_RidTypeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidTypeArray *r)
1607 {
1608         uint32_t _ptr_rids;
1609         uint32_t cntr_rids_1;
1610         TALLOC_CTX *_mem_save_rids_0;
1611         TALLOC_CTX *_mem_save_rids_1;
1612         uint32_t _ptr_types;
1613         uint32_t cntr_types_1;
1614         TALLOC_CTX *_mem_save_types_0;
1615         TALLOC_CTX *_mem_save_types_1;
1616         if (ndr_flags & NDR_SCALARS) {
1617                 NDR_CHECK(ndr_pull_align(ndr, 5));
1618                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1619                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
1620                 if (_ptr_rids) {
1621                         NDR_PULL_ALLOC(ndr, r->rids);
1622                 } else {
1623                         r->rids = NULL;
1624                 }
1625                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_types));
1626                 if (_ptr_types) {
1627                         NDR_PULL_ALLOC(ndr, r->types);
1628                 } else {
1629                         r->types = NULL;
1630                 }
1631                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1632         }
1633         if (ndr_flags & NDR_BUFFERS) {
1634                 if (r->rids) {
1635                         _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1636                         NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
1637                         NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
1638                         NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
1639                         _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1640                         NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
1641                         for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
1642                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
1643                         }
1644                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
1645                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
1646                 }
1647                 if (r->types) {
1648                         _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
1649                         NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
1650                         NDR_CHECK(ndr_pull_array_size(ndr, &r->types));
1651                         NDR_PULL_ALLOC_N(ndr, r->types, ndr_get_array_size(ndr, &r->types));
1652                         _mem_save_types_1 = NDR_PULL_GET_MEM_CTX(ndr);
1653                         NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
1654                         for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) {
1655                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->types[cntr_types_1]));
1656                         }
1657                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_1, 0);
1658                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, 0);
1659                 }
1660                 if (r->rids) {
1661                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->count));
1662                 }
1663                 if (r->types) {
1664                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->types, r->count));
1665                 }
1666         }
1667         return NDR_ERR_SUCCESS;
1668 }
1669
1670 _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *name, const struct samr_RidTypeArray *r)
1671 {
1672         uint32_t cntr_rids_1;
1673         uint32_t cntr_types_1;
1674         ndr_print_struct(ndr, name, "samr_RidTypeArray");
1675         ndr->depth++;
1676         ndr_print_uint32(ndr, "count", r->count);
1677         ndr_print_ptr(ndr, "rids", r->rids);
1678         ndr->depth++;
1679         if (r->rids) {
1680                 ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->count);
1681                 ndr->depth++;
1682                 for (cntr_rids_1=0;cntr_rids_1<r->count;cntr_rids_1++) {
1683                         char *idx_1=NULL;
1684                         if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) {
1685                                 ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
1686                                 free(idx_1);
1687                         }
1688                 }
1689                 ndr->depth--;
1690         }
1691         ndr->depth--;
1692         ndr_print_ptr(ndr, "types", r->types);
1693         ndr->depth++;
1694         if (r->types) {
1695                 ndr->print(ndr, "%s: ARRAY(%d)", "types", (int)r->count);
1696                 ndr->depth++;
1697                 for (cntr_types_1=0;cntr_types_1<r->count;cntr_types_1++) {
1698                         char *idx_1=NULL;
1699                         if (asprintf(&idx_1, "[%d]", cntr_types_1) != -1) {
1700                                 ndr_print_uint32(ndr, "types", r->types[cntr_types_1]);
1701                                 free(idx_1);
1702                         }
1703                 }
1704                 ndr->depth--;
1705         }
1706         ndr->depth--;
1707         ndr->depth--;
1708 }
1709
1710 static enum ndr_err_code ndr_push_samr_AliasInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_AliasInfoAll *r)
1711 {
1712         if (ndr_flags & NDR_SCALARS) {
1713                 NDR_CHECK(ndr_push_align(ndr, 5));
1714                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1715                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members));
1716                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1717                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1718         }
1719         if (ndr_flags & NDR_BUFFERS) {
1720                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1721                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1722         }
1723         return NDR_ERR_SUCCESS;
1724 }
1725
1726 static enum ndr_err_code ndr_pull_samr_AliasInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoAll *r)
1727 {
1728         if (ndr_flags & NDR_SCALARS) {
1729                 NDR_CHECK(ndr_pull_align(ndr, 5));
1730                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1731                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members));
1732                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1733                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1734         }
1735         if (ndr_flags & NDR_BUFFERS) {
1736                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1737                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1738         }
1739         return NDR_ERR_SUCCESS;
1740 }
1741
1742 _PUBLIC_ void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r)
1743 {
1744         ndr_print_struct(ndr, name, "samr_AliasInfoAll");
1745         ndr->depth++;
1746         ndr_print_lsa_String(ndr, "name", &r->name);
1747         ndr_print_uint32(ndr, "num_members", r->num_members);
1748         ndr_print_lsa_String(ndr, "description", &r->description);
1749         ndr->depth--;
1750 }
1751
1752 static enum ndr_err_code ndr_push_samr_AliasInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_AliasInfoEnum r)
1753 {
1754         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1755         return NDR_ERR_SUCCESS;
1756 }
1757
1758 static enum ndr_err_code ndr_pull_samr_AliasInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_AliasInfoEnum *r)
1759 {
1760         uint16_t v;
1761         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1762         *r = v;
1763         return NDR_ERR_SUCCESS;
1764 }
1765
1766 _PUBLIC_ void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r)
1767 {
1768         const char *val = NULL;
1769
1770         switch (r) {
1771                 case ALIASINFOALL: val = "ALIASINFOALL"; break;
1772                 case ALIASINFONAME: val = "ALIASINFONAME"; break;
1773                 case ALIASINFODESCRIPTION: val = "ALIASINFODESCRIPTION"; break;
1774         }
1775         ndr_print_enum(ndr, name, "ENUM", val, r);
1776 }
1777
1778 static enum ndr_err_code ndr_push_samr_AliasInfo(struct ndr_push *ndr, int ndr_flags, const union samr_AliasInfo *r)
1779 {
1780         if (ndr_flags & NDR_SCALARS) {
1781                 int level = ndr_push_get_switch_value(ndr, r);
1782                 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, level));
1783                 NDR_CHECK(ndr_push_union_align(ndr, 5));
1784                 switch (level) {
1785                         case ALIASINFOALL: {
1786                                 NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all));
1787                         break; }
1788
1789                         case ALIASINFONAME: {
1790                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1791                         break; }
1792
1793                         case ALIASINFODESCRIPTION: {
1794                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1795                         break; }
1796
1797                         default:
1798                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1799                 }
1800         }
1801         if (ndr_flags & NDR_BUFFERS) {
1802                 int level = ndr_push_get_switch_value(ndr, r);
1803                 switch (level) {
1804                         case ALIASINFOALL:
1805                                 NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all));
1806                         break;
1807
1808                         case ALIASINFONAME:
1809                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1810                         break;
1811
1812                         case ALIASINFODESCRIPTION:
1813                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1814                         break;
1815
1816                         default:
1817                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1818                 }
1819         }
1820         return NDR_ERR_SUCCESS;
1821 }
1822
1823 static enum ndr_err_code ndr_pull_samr_AliasInfo(struct ndr_pull *ndr, int ndr_flags, union samr_AliasInfo *r)
1824 {
1825         int level;
1826         uint16_t _level;
1827         level = ndr_pull_get_switch_value(ndr, r);
1828         if (ndr_flags & NDR_SCALARS) {
1829                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
1830                 if (_level != level) {
1831                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1832                 }
1833                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1834                 switch (level) {
1835                         case ALIASINFOALL: {
1836                                 NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all));
1837                         break; }
1838
1839                         case ALIASINFONAME: {
1840                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1841                         break; }
1842
1843                         case ALIASINFODESCRIPTION: {
1844                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1845                         break; }
1846
1847                         default:
1848                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1849                 }
1850         }
1851         if (ndr_flags & NDR_BUFFERS) {
1852                 switch (level) {
1853                         case ALIASINFOALL:
1854                                 NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all));
1855                         break;
1856
1857                         case ALIASINFONAME:
1858                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1859                         break;
1860
1861                         case ALIASINFODESCRIPTION:
1862                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1863                         break;
1864
1865                         default:
1866                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1867                 }
1868         }
1869         return NDR_ERR_SUCCESS;
1870 }
1871
1872 _PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r)
1873 {
1874         int level;
1875         level = ndr_print_get_switch_value(ndr, r);
1876         ndr_print_union(ndr, name, level, "samr_AliasInfo");
1877         switch (level) {
1878                 case ALIASINFOALL:
1879                         ndr_print_samr_AliasInfoAll(ndr, "all", &r->all);
1880                 break;
1881
1882                 case ALIASINFONAME:
1883                         ndr_print_lsa_String(ndr, "name", &r->name);
1884                 break;
1885
1886                 case ALIASINFODESCRIPTION:
1887                         ndr_print_lsa_String(ndr, "description", &r->description);
1888                 break;
1889
1890                 default:
1891                         ndr_print_bad_level(ndr, name, level);
1892         }
1893 }
1894
1895 static enum ndr_err_code ndr_push_samr_UserInfoLevel(struct ndr_push *ndr, int ndr_flags, enum samr_UserInfoLevel r)
1896 {
1897         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1898         return NDR_ERR_SUCCESS;
1899 }
1900
1901 static enum ndr_err_code ndr_pull_samr_UserInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_UserInfoLevel *r)
1902 {
1903         uint16_t v;
1904         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1905         *r = v;
1906         return NDR_ERR_SUCCESS;
1907 }
1908
1909 _PUBLIC_ void ndr_print_samr_UserInfoLevel(struct ndr_print *ndr, const char *name, enum samr_UserInfoLevel r)
1910 {
1911         const char *val = NULL;
1912
1913         switch (r) {
1914                 case UserGeneralInformation: val = "UserGeneralInformation"; break;
1915                 case UserPreferencesInformation: val = "UserPreferencesInformation"; break;
1916                 case UserLogonInformation: val = "UserLogonInformation"; break;
1917                 case UserLogonHoursInformation: val = "UserLogonHoursInformation"; break;
1918                 case UserAccountInformation: val = "UserAccountInformation"; break;
1919                 case UserNameInformation: val = "UserNameInformation"; break;
1920                 case UserAccountNameInformation: val = "UserAccountNameInformation"; break;
1921                 case UserFullNameInformation: val = "UserFullNameInformation"; break;
1922                 case UserPrimaryGroupInformation: val = "UserPrimaryGroupInformation"; break;
1923                 case UserHomeInformation: val = "UserHomeInformation"; break;
1924                 case UserScriptInformation: val = "UserScriptInformation"; break;
1925                 case UserProfileInformation: val = "UserProfileInformation"; break;
1926                 case UserAdminCommentInformation: val = "UserAdminCommentInformation"; break;
1927                 case UserWorkStationsInformation: val = "UserWorkStationsInformation"; break;
1928                 case UserControlInformation: val = "UserControlInformation"; break;
1929                 case UserExpiresInformation: val = "UserExpiresInformation"; break;
1930                 case UserInternal1Information: val = "UserInternal1Information"; break;
1931                 case UserParametersInformation: val = "UserParametersInformation"; break;
1932                 case UserAllInformation: val = "UserAllInformation"; break;
1933                 case UserInternal4Information: val = "UserInternal4Information"; break;
1934                 case UserInternal5Information: val = "UserInternal5Information"; break;
1935                 case UserInternal4InformationNew: val = "UserInternal4InformationNew"; break;
1936                 case UserInternal5InformationNew: val = "UserInternal5InformationNew"; break;
1937         }
1938         ndr_print_enum(ndr, name, "ENUM", val, r);
1939 }
1940
1941 static enum ndr_err_code ndr_push_samr_UserInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo1 *r)
1942 {
1943         if (ndr_flags & NDR_SCALARS) {
1944                 NDR_CHECK(ndr_push_align(ndr, 5));
1945                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
1946                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
1947                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
1948                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1949                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
1950                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1951         }
1952         if (ndr_flags & NDR_BUFFERS) {
1953                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
1954                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
1955                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1956                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
1957         }
1958         return NDR_ERR_SUCCESS;
1959 }
1960
1961 static enum ndr_err_code ndr_pull_samr_UserInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo1 *r)
1962 {
1963         if (ndr_flags & NDR_SCALARS) {
1964                 NDR_CHECK(ndr_pull_align(ndr, 5));
1965                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
1966                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
1967                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
1968                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1969                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
1970                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1971         }
1972         if (ndr_flags & NDR_BUFFERS) {
1973                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
1974                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
1975                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1976                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
1977         }
1978         return NDR_ERR_SUCCESS;
1979 }
1980
1981 _PUBLIC_ void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r)
1982 {
1983         ndr_print_struct(ndr, name, "samr_UserInfo1");
1984         ndr->depth++;
1985         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
1986         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
1987         ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
1988         ndr_print_lsa_String(ndr, "description", &r->description);
1989         ndr_print_lsa_String(ndr, "comment", &r->comment);
1990         ndr->depth--;
1991 }
1992
1993 static enum ndr_err_code ndr_push_samr_UserInfo2(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo2 *r)
1994 {
1995         if (ndr_flags & NDR_SCALARS) {
1996                 NDR_CHECK(ndr_push_align(ndr, 5));
1997                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
1998                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown));
1999                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
2000                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
2001                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2002         }
2003         if (ndr_flags & NDR_BUFFERS) {
2004                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2005                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown));
2006         }
2007         return NDR_ERR_SUCCESS;
2008 }
2009
2010 static enum ndr_err_code ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo2 *r)
2011 {
2012         if (ndr_flags & NDR_SCALARS) {
2013                 NDR_CHECK(ndr_pull_align(ndr, 5));
2014                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
2015                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown));
2016                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
2017                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
2018                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2019         }
2020         if (ndr_flags & NDR_BUFFERS) {
2021                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2022                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown));
2023         }
2024         return NDR_ERR_SUCCESS;
2025 }
2026
2027 _PUBLIC_ void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r)
2028 {
2029         ndr_print_struct(ndr, name, "samr_UserInfo2");
2030         ndr->depth++;
2031         ndr_print_lsa_String(ndr, "comment", &r->comment);
2032         ndr_print_lsa_String(ndr, "unknown", &r->unknown);
2033         ndr_print_uint16(ndr, "country_code", r->country_code);
2034         ndr_print_uint16(ndr, "code_page", r->code_page);
2035         ndr->depth--;
2036 }
2037
2038 _PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r)
2039 {
2040         {
2041                 uint32_t _flags_save_STRUCT = ndr->flags;
2042                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2043                 if (ndr_flags & NDR_SCALARS) {
2044                         NDR_CHECK(ndr_push_align(ndr, 5));
2045                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->units_per_week));
2046                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->bits));
2047                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2048                 }
2049                 if (ndr_flags & NDR_BUFFERS) {
2050                         if (r->bits) {
2051                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1260));
2052                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2053                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->units_per_week / 8));
2054                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->bits, r->units_per_week / 8));
2055                         }
2056                 }
2057                 ndr->flags = _flags_save_STRUCT;
2058         }
2059         return NDR_ERR_SUCCESS;
2060 }
2061
2062 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r)
2063 {
2064         uint32_t _ptr_bits;
2065         TALLOC_CTX *_mem_save_bits_0;
2066         {
2067                 uint32_t _flags_save_STRUCT = ndr->flags;
2068                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2069                 if (ndr_flags & NDR_SCALARS) {
2070                         NDR_CHECK(ndr_pull_align(ndr, 5));
2071                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->units_per_week));
2072                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bits));
2073                         if (_ptr_bits) {
2074                                 NDR_PULL_ALLOC(ndr, r->bits);
2075                         } else {
2076                                 r->bits = NULL;
2077                         }
2078                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2079                 }
2080                 if (ndr_flags & NDR_BUFFERS) {
2081                         if (r->bits) {
2082                                 _mem_save_bits_0 = NDR_PULL_GET_MEM_CTX(ndr);
2083                                 NDR_PULL_SET_MEM_CTX(ndr, r->bits, 0);
2084                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->bits));
2085                                 NDR_CHECK(ndr_pull_array_length(ndr, &r->bits));
2086                                 if (ndr_get_array_length(ndr, &r->bits) > ndr_get_array_size(ndr, &r->bits)) {
2087                                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->bits), ndr_get_array_length(ndr, &r->bits));
2088                                 }
2089                                 NDR_PULL_ALLOC_N(ndr, r->bits, ndr_get_array_size(ndr, &r->bits));
2090                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->bits, ndr_get_array_length(ndr, &r->bits)));
2091                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bits_0, 0);
2092                         }
2093                         if (r->bits) {
2094                                 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->bits, 1260));
2095                         }
2096                         if (r->bits) {
2097                                 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->bits, r->units_per_week / 8));
2098                         }
2099                 }
2100                 ndr->flags = _flags_save_STRUCT;
2101         }
2102         return NDR_ERR_SUCCESS;
2103 }
2104
2105 _PUBLIC_ void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r)
2106 {
2107         ndr_print_struct(ndr, name, "samr_LogonHours");
2108         {
2109                 uint32_t _flags_save_STRUCT = ndr->flags;
2110                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2111                 ndr->depth++;
2112                 ndr_print_uint16(ndr, "units_per_week", r->units_per_week);
2113                 ndr_print_ptr(ndr, "bits", r->bits);
2114                 ndr->depth++;
2115                 if (r->bits) {
2116                         ndr_print_array_uint8(ndr, "bits", r->bits, r->units_per_week / 8);
2117                 }
2118                 ndr->depth--;
2119                 ndr->depth--;
2120                 ndr->flags = _flags_save_STRUCT;
2121         }
2122 }
2123
2124 static enum ndr_err_code ndr_push_samr_UserInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo3 *r)
2125 {
2126         if (ndr_flags & NDR_SCALARS) {
2127                 NDR_CHECK(ndr_push_align(ndr, 5));
2128                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2129                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2130                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2131                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2132                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2133                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2134                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2135                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2136                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2137                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2138                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2139                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2140                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
2141                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
2142                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2143                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2144                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2145                 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2146                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2147         }
2148         if (ndr_flags & NDR_BUFFERS) {
2149                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2150                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2151                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2152                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2153                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2154                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2155                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2156                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2157         }
2158         return NDR_ERR_SUCCESS;
2159 }
2160
2161 static enum ndr_err_code ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo3 *r)
2162 {
2163         if (ndr_flags & NDR_SCALARS) {
2164                 NDR_CHECK(ndr_pull_align(ndr, 5));
2165                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2166                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2167                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2168                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2169                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2170                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2171                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2172                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2173                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2174                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
2175                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
2176                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
2177                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
2178                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
2179                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2180                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
2181                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
2182                 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2183                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2184         }
2185         if (ndr_flags & NDR_BUFFERS) {
2186                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2187                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2188                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2189                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2190                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2191                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2192                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2193                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2194         }
2195         return NDR_ERR_SUCCESS;
2196 }
2197
2198 _PUBLIC_ void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r)
2199 {
2200         ndr_print_struct(ndr, name, "samr_UserInfo3");
2201         ndr->depth++;
2202         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2203         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2204         ndr_print_uint32(ndr, "rid", r->rid);
2205         ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2206         ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2207         ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2208         ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2209         ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2210         ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2211         ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
2212         ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
2213         ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
2214         ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
2215         ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
2216         ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2217         ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
2218         ndr_print_uint16(ndr, "logon_count", r->logon_count);
2219         ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2220         ndr->depth--;
2221 }
2222
2223 static enum ndr_err_code ndr_push_samr_UserInfo4(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo4 *r)
2224 {
2225         if (ndr_flags & NDR_SCALARS) {
2226                 NDR_CHECK(ndr_push_align(ndr, 5));
2227                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2228                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2229         }
2230         if (ndr_flags & NDR_BUFFERS) {
2231                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2232         }
2233         return NDR_ERR_SUCCESS;
2234 }
2235
2236 static enum ndr_err_code ndr_pull_samr_UserInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo4 *r)
2237 {
2238         if (ndr_flags & NDR_SCALARS) {
2239                 NDR_CHECK(ndr_pull_align(ndr, 5));
2240                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2241                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2242         }
2243         if (ndr_flags & NDR_BUFFERS) {
2244                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2245         }
2246         return NDR_ERR_SUCCESS;
2247 }
2248
2249 _PUBLIC_ void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r)
2250 {
2251         ndr_print_struct(ndr, name, "samr_UserInfo4");
2252         ndr->depth++;
2253         ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2254         ndr->depth--;
2255 }
2256
2257 static enum ndr_err_code ndr_push_samr_UserInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo5 *r)
2258 {
2259         if (ndr_flags & NDR_SCALARS) {
2260                 NDR_CHECK(ndr_push_align(ndr, 5));
2261                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2262                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2263                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2264                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2265                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2266                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2267                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2268                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2269                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2270                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2271                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2272                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2273                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2274                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2275                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2276                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2277                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2278                 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2279                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2280         }
2281         if (ndr_flags & NDR_BUFFERS) {
2282                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2283                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2284                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2285                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2286                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2287                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2288                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2289                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2290                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2291         }
2292         return NDR_ERR_SUCCESS;
2293 }
2294
2295 static enum ndr_err_code ndr_pull_samr_UserInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo5 *r)
2296 {
2297         if (ndr_flags & NDR_SCALARS) {
2298                 NDR_CHECK(ndr_pull_align(ndr, 5));
2299                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2300                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2301                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2302                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2303                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2304                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2305                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2306                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2307                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2308                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2309                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
2310                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
2311                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2312                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
2313                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
2314                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
2315                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
2316                 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2317                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2318         }
2319         if (ndr_flags & NDR_BUFFERS) {
2320                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2321                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2322                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2323                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2324                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2325                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2326                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2327                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2328                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2329         }
2330         return NDR_ERR_SUCCESS;
2331 }
2332
2333 _PUBLIC_ void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r)
2334 {
2335         ndr_print_struct(ndr, name, "samr_UserInfo5");
2336         ndr->depth++;
2337         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2338         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2339         ndr_print_uint32(ndr, "rid", r->rid);
2340         ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2341         ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2342         ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2343         ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2344         ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2345         ndr_print_lsa_String(ndr, "description", &r->description);
2346         ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2347         ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
2348         ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
2349         ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2350         ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
2351         ndr_print_uint16(ndr, "logon_count", r->logon_count);
2352         ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
2353         ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
2354         ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2355         ndr->depth--;
2356 }
2357
2358 static enum ndr_err_code ndr_push_samr_UserInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo6 *r)
2359 {
2360         if (ndr_flags & NDR_SCALARS) {
2361                 NDR_CHECK(ndr_push_align(ndr, 5));
2362                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2363                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2364                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2365         }
2366         if (ndr_flags & NDR_BUFFERS) {
2367                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2368                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2369         }
2370         return NDR_ERR_SUCCESS;
2371 }
2372
2373 static enum ndr_err_code ndr_pull_samr_UserInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo6 *r)
2374 {
2375         if (ndr_flags & NDR_SCALARS) {
2376                 NDR_CHECK(ndr_pull_align(ndr, 5));
2377                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2378                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2379                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2380         }
2381         if (ndr_flags & NDR_BUFFERS) {
2382                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2383                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2384         }
2385         return NDR_ERR_SUCCESS;
2386 }
2387
2388 _PUBLIC_ void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r)
2389 {
2390         ndr_print_struct(ndr, name, "samr_UserInfo6");
2391         ndr->depth++;
2392         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2393         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2394         ndr->depth--;
2395 }
2396
2397 static enum ndr_err_code ndr_push_samr_UserInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo7 *r)
2398 {
2399         if (ndr_flags & NDR_SCALARS) {
2400                 NDR_CHECK(ndr_push_align(ndr, 5));
2401                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2402                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2403         }
2404         if (ndr_flags & NDR_BUFFERS) {
2405                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2406         }
2407         return NDR_ERR_SUCCESS;
2408 }
2409
2410 static enum ndr_err_code ndr_pull_samr_UserInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo7 *r)
2411 {
2412         if (ndr_flags & NDR_SCALARS) {
2413                 NDR_CHECK(ndr_pull_align(ndr, 5));
2414                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2415                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2416         }
2417         if (ndr_flags & NDR_BUFFERS) {
2418                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2419         }
2420         return NDR_ERR_SUCCESS;
2421 }
2422
2423 _PUBLIC_ void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r)
2424 {
2425         ndr_print_struct(ndr, name, "samr_UserInfo7");
2426         ndr->depth++;
2427         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2428         ndr->depth--;
2429 }
2430
2431 static enum ndr_err_code ndr_push_samr_UserInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo8 *r)
2432 {
2433         if (ndr_flags & NDR_SCALARS) {
2434                 NDR_CHECK(ndr_push_align(ndr, 5));
2435                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2436                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2437         }
2438         if (ndr_flags & NDR_BUFFERS) {
2439                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2440         }
2441         return NDR_ERR_SUCCESS;
2442 }
2443
2444 static enum ndr_err_code ndr_pull_samr_UserInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo8 *r)
2445 {
2446         if (ndr_flags & NDR_SCALARS) {
2447                 NDR_CHECK(ndr_pull_align(ndr, 5));
2448                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2449                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2450         }
2451         if (ndr_flags & NDR_BUFFERS) {
2452                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2453         }
2454         return NDR_ERR_SUCCESS;
2455 }
2456
2457 _PUBLIC_ void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r)
2458 {
2459         ndr_print_struct(ndr, name, "samr_UserInfo8");
2460         ndr->depth++;
2461         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2462         ndr->depth--;
2463 }
2464
2465 static enum ndr_err_code ndr_push_samr_UserInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo9 *r)
2466 {
2467         if (ndr_flags & NDR_SCALARS) {
2468                 NDR_CHECK(ndr_push_align(ndr, 4));
2469                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2470                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2471         }
2472         if (ndr_flags & NDR_BUFFERS) {
2473         }
2474         return NDR_ERR_SUCCESS;
2475 }
2476
2477 static enum ndr_err_code ndr_pull_samr_UserInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo9 *r)
2478 {
2479         if (ndr_flags & NDR_SCALARS) {
2480                 NDR_CHECK(ndr_pull_align(ndr, 4));
2481                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2482                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2483         }
2484         if (ndr_flags & NDR_BUFFERS) {
2485         }
2486         return NDR_ERR_SUCCESS;
2487 }
2488
2489 _PUBLIC_ void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r)
2490 {
2491         ndr_print_struct(ndr, name, "samr_UserInfo9");
2492         ndr->depth++;
2493         ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2494         ndr->depth--;
2495 }
2496
2497 static enum ndr_err_code ndr_push_samr_UserInfo10(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo10 *r)
2498 {
2499         if (ndr_flags & NDR_SCALARS) {
2500                 NDR_CHECK(ndr_push_align(ndr, 5));
2501                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2502                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2503                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2504         }
2505         if (ndr_flags & NDR_BUFFERS) {
2506                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2507                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2508         }
2509         return NDR_ERR_SUCCESS;
2510 }
2511
2512 static enum ndr_err_code ndr_pull_samr_UserInfo10(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo10 *r)
2513 {
2514         if (ndr_flags & NDR_SCALARS) {
2515                 NDR_CHECK(ndr_pull_align(ndr, 5));
2516                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2517                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2518                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2519         }
2520         if (ndr_flags & NDR_BUFFERS) {
2521                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2522                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2523         }
2524         return NDR_ERR_SUCCESS;
2525 }
2526
2527 _PUBLIC_ void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r)
2528 {
2529         ndr_print_struct(ndr, name, "samr_UserInfo10");
2530         ndr->depth++;
2531         ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2532         ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2533         ndr->depth--;
2534 }
2535
2536 static enum ndr_err_code ndr_push_samr_UserInfo11(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo11 *r)
2537 {
2538         if (ndr_flags & NDR_SCALARS) {
2539                 NDR_CHECK(ndr_push_align(ndr, 5));
2540                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2541                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2542         }
2543         if (ndr_flags & NDR_BUFFERS) {
2544                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2545         }
2546         return NDR_ERR_SUCCESS;
2547 }
2548
2549 static enum ndr_err_code ndr_pull_samr_UserInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo11 *r)
2550 {
2551         if (ndr_flags & NDR_SCALARS) {
2552                 NDR_CHECK(ndr_pull_align(ndr, 5));
2553                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2554                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2555         }
2556         if (ndr_flags & NDR_BUFFERS) {
2557                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2558         }
2559         return NDR_ERR_SUCCESS;
2560 }
2561
2562 _PUBLIC_ void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r)
2563 {
2564         ndr_print_struct(ndr, name, "samr_UserInfo11");
2565         ndr->depth++;
2566         ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2567         ndr->depth--;
2568 }
2569
2570 static enum ndr_err_code ndr_push_samr_UserInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo12 *r)
2571 {
2572         if (ndr_flags & NDR_SCALARS) {
2573                 NDR_CHECK(ndr_push_align(ndr, 5));
2574                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2575                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2576         }
2577         if (ndr_flags & NDR_BUFFERS) {
2578                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2579         }
2580         return NDR_ERR_SUCCESS;
2581 }
2582
2583 static enum ndr_err_code ndr_pull_samr_UserInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo12 *r)
2584 {
2585         if (ndr_flags & NDR_SCALARS) {
2586                 NDR_CHECK(ndr_pull_align(ndr, 5));
2587                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2588                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2589         }
2590         if (ndr_flags & NDR_BUFFERS) {
2591                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2592         }
2593         return NDR_ERR_SUCCESS;
2594 }
2595
2596 _PUBLIC_ void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r)
2597 {
2598         ndr_print_struct(ndr, name, "samr_UserInfo12");
2599         ndr->depth++;
2600         ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2601         ndr->depth--;
2602 }
2603
2604 static enum ndr_err_code ndr_push_samr_UserInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo13 *r)
2605 {
2606         if (ndr_flags & NDR_SCALARS) {
2607                 NDR_CHECK(ndr_push_align(ndr, 5));
2608                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2609                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2610         }
2611         if (ndr_flags & NDR_BUFFERS) {
2612                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2613         }
2614         return NDR_ERR_SUCCESS;
2615 }
2616
2617 static enum ndr_err_code ndr_pull_samr_UserInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo13 *r)
2618 {
2619         if (ndr_flags & NDR_SCALARS) {
2620                 NDR_CHECK(ndr_pull_align(ndr, 5));
2621                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2622                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2623         }
2624         if (ndr_flags & NDR_BUFFERS) {
2625                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2626         }
2627         return NDR_ERR_SUCCESS;
2628 }
2629
2630 _PUBLIC_ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r)
2631 {
2632         ndr_print_struct(ndr, name, "samr_UserInfo13");
2633         ndr->depth++;
2634         ndr_print_lsa_String(ndr, "description", &r->description);
2635         ndr->depth--;
2636 }
2637
2638 static enum ndr_err_code ndr_push_samr_UserInfo14(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo14 *r)
2639 {
2640         if (ndr_flags & NDR_SCALARS) {
2641                 NDR_CHECK(ndr_push_align(ndr, 5));
2642                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2643                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2644         }
2645         if (ndr_flags & NDR_BUFFERS) {
2646                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2647         }
2648         return NDR_ERR_SUCCESS;
2649 }
2650
2651 static enum ndr_err_code ndr_pull_samr_UserInfo14(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo14 *r)
2652 {
2653         if (ndr_flags & NDR_SCALARS) {
2654                 NDR_CHECK(ndr_pull_align(ndr, 5));
2655                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2656                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2657         }
2658         if (ndr_flags & NDR_BUFFERS) {
2659                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2660         }
2661         return NDR_ERR_SUCCESS;
2662 }
2663
2664 _PUBLIC_ void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r)
2665 {
2666         ndr_print_struct(ndr, name, "samr_UserInfo14");
2667         ndr->depth++;
2668         ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2669         ndr->depth--;
2670 }
2671
2672 static enum ndr_err_code ndr_push_samr_UserInfo16(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo16 *r)
2673 {
2674         if (ndr_flags & NDR_SCALARS) {
2675                 NDR_CHECK(ndr_push_align(ndr, 4));
2676                 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2677                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2678         }
2679         if (ndr_flags & NDR_BUFFERS) {
2680         }
2681         return NDR_ERR_SUCCESS;
2682 }
2683
2684 static enum ndr_err_code ndr_pull_samr_UserInfo16(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo16 *r)
2685 {
2686         if (ndr_flags & NDR_SCALARS) {
2687                 NDR_CHECK(ndr_pull_align(ndr, 4));
2688                 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2689                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2690         }
2691         if (ndr_flags & NDR_BUFFERS) {
2692         }
2693         return NDR_ERR_SUCCESS;
2694 }
2695
2696 _PUBLIC_ void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r)
2697 {
2698         ndr_print_struct(ndr, name, "samr_UserInfo16");
2699         ndr->depth++;
2700         ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2701         ndr->depth--;
2702 }
2703
2704 static enum ndr_err_code ndr_push_samr_UserInfo17(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo17 *r)
2705 {
2706         if (ndr_flags & NDR_SCALARS) {
2707                 NDR_CHECK(ndr_push_align(ndr, 4));
2708                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2709                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2710         }
2711         if (ndr_flags & NDR_BUFFERS) {
2712         }
2713         return NDR_ERR_SUCCESS;
2714 }
2715
2716 static enum ndr_err_code ndr_pull_samr_UserInfo17(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo17 *r)
2717 {
2718         if (ndr_flags & NDR_SCALARS) {
2719                 NDR_CHECK(ndr_pull_align(ndr, 4));
2720                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
2721                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2722         }
2723         if (ndr_flags & NDR_BUFFERS) {
2724         }
2725         return NDR_ERR_SUCCESS;
2726 }
2727
2728 _PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r)
2729 {
2730         ndr_print_struct(ndr, name, "samr_UserInfo17");
2731         ndr->depth++;
2732         ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
2733         ndr->depth--;
2734 }
2735
2736 _PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r)
2737 {
2738         {
2739                 uint32_t _flags_save_STRUCT = ndr->flags;
2740                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2741                 if (ndr_flags & NDR_SCALARS) {
2742                         NDR_CHECK(ndr_push_align(ndr, 1));
2743                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2744                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2745                 }
2746                 if (ndr_flags & NDR_BUFFERS) {
2747                 }
2748                 ndr->flags = _flags_save_STRUCT;
2749         }
2750         return NDR_ERR_SUCCESS;
2751 }
2752
2753 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r)
2754 {
2755         {
2756                 uint32_t _flags_save_STRUCT = ndr->flags;
2757                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2758                 if (ndr_flags & NDR_SCALARS) {
2759                         NDR_CHECK(ndr_pull_align(ndr, 1));
2760                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2761                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2762                 }
2763                 if (ndr_flags & NDR_BUFFERS) {
2764                 }
2765                 ndr->flags = _flags_save_STRUCT;
2766         }
2767         return NDR_ERR_SUCCESS;
2768 }
2769
2770 _PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r)
2771 {
2772         ndr_print_struct(ndr, name, "samr_Password");
2773         {
2774                 uint32_t _flags_save_STRUCT = ndr->flags;
2775                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2776                 ndr->depth++;
2777                 ndr_print_array_uint8(ndr, "hash", r->hash, 16);
2778                 ndr->depth--;
2779                 ndr->flags = _flags_save_STRUCT;
2780         }
2781 }
2782
2783 static enum ndr_err_code ndr_push_samr_UserInfo18(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo18 *r)
2784 {
2785         if (ndr_flags & NDR_SCALARS) {
2786                 NDR_CHECK(ndr_push_align(ndr, 1));
2787                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd));
2788                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd));
2789                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_pwd_active));
2790                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_pwd_active));
2791                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
2792                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2793         }
2794         if (ndr_flags & NDR_BUFFERS) {
2795         }
2796         return NDR_ERR_SUCCESS;
2797 }
2798
2799 static enum ndr_err_code ndr_pull_samr_UserInfo18(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo18 *r)
2800 {
2801         if (ndr_flags & NDR_SCALARS) {
2802                 NDR_CHECK(ndr_pull_align(ndr, 1));
2803                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd));
2804                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd));
2805                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_pwd_active));
2806                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_pwd_active));
2807                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
2808                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2809         }
2810         if (ndr_flags & NDR_BUFFERS) {
2811         }
2812         return NDR_ERR_SUCCESS;
2813 }
2814
2815 _PUBLIC_ void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r)
2816 {
2817         ndr_print_struct(ndr, name, "samr_UserInfo18");
2818         ndr->depth++;
2819         ndr_print_samr_Password(ndr, "nt_pwd", &r->nt_pwd);
2820         ndr_print_samr_Password(ndr, "lm_pwd", &r->lm_pwd);
2821         ndr_print_uint8(ndr, "nt_pwd_active", r->nt_pwd_active);
2822         ndr_print_uint8(ndr, "lm_pwd_active", r->lm_pwd_active);
2823         ndr_print_uint8(ndr, "password_expired", r->password_expired);
2824         ndr->depth--;
2825 }
2826
2827 static enum ndr_err_code ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo20 *r)
2828 {
2829         if (ndr_flags & NDR_SCALARS) {
2830                 NDR_CHECK(ndr_push_align(ndr, 5));
2831                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2832                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2833         }
2834         if (ndr_flags & NDR_BUFFERS) {
2835                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2836         }
2837         return NDR_ERR_SUCCESS;
2838 }
2839
2840 static enum ndr_err_code ndr_pull_samr_UserInfo20(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo20 *r)
2841 {
2842         if (ndr_flags & NDR_SCALARS) {
2843                 NDR_CHECK(ndr_pull_align(ndr, 5));
2844                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2845                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2846         }
2847         if (ndr_flags & NDR_BUFFERS) {
2848                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2849         }
2850         return NDR_ERR_SUCCESS;
2851 }
2852
2853 _PUBLIC_ void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r)
2854 {
2855         ndr_print_struct(ndr, name, "samr_UserInfo20");
2856         ndr->depth++;
2857         ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
2858         ndr->depth--;
2859 }
2860
2861 static enum ndr_err_code ndr_push_samr_FieldsPresent(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2862 {
2863         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2864         return NDR_ERR_SUCCESS;
2865 }
2866
2867 static enum ndr_err_code ndr_pull_samr_FieldsPresent(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2868 {
2869         uint32_t v;
2870         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2871         *r = v;
2872         return NDR_ERR_SUCCESS;
2873 }
2874
2875 _PUBLIC_ void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r)
2876 {
2877         ndr_print_uint32(ndr, name, r);
2878         ndr->depth++;
2879         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCOUNT_NAME", SAMR_FIELD_ACCOUNT_NAME, r);
2880         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_FULL_NAME", SAMR_FIELD_FULL_NAME, r);
2881         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_RID", SAMR_FIELD_RID, r);
2882         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PRIMARY_GID", SAMR_FIELD_PRIMARY_GID, r);
2883         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_DESCRIPTION", SAMR_FIELD_DESCRIPTION, r);
2884         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_COMMENT", SAMR_FIELD_COMMENT, r);
2885         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_HOME_DIRECTORY", SAMR_FIELD_HOME_DIRECTORY, r);
2886         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_HOME_DRIVE", SAMR_FIELD_HOME_DRIVE, r);
2887         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LOGON_SCRIPT", SAMR_FIELD_LOGON_SCRIPT, r);
2888         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PROFILE_PATH", SAMR_FIELD_PROFILE_PATH, r);
2889         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_WORKSTATIONS", SAMR_FIELD_WORKSTATIONS, r);
2890         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGON", SAMR_FIELD_LAST_LOGON, r);
2891         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGOFF", SAMR_FIELD_LAST_LOGOFF, r);
2892         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LOGON_HOURS", SAMR_FIELD_LOGON_HOURS, r);
2893         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_BAD_PWD_COUNT", SAMR_FIELD_BAD_PWD_COUNT, r);
2894         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_NUM_LOGONS", SAMR_FIELD_NUM_LOGONS, r);
2895         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ALLOW_PWD_CHANGE", SAMR_FIELD_ALLOW_PWD_CHANGE, r);
2896         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_FORCE_PWD_CHANGE", SAMR_FIELD_FORCE_PWD_CHANGE, r);
2897         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_PWD_CHANGE", SAMR_FIELD_LAST_PWD_CHANGE, r);
2898         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCT_EXPIRY", SAMR_FIELD_ACCT_EXPIRY, r);
2899         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCT_FLAGS", SAMR_FIELD_ACCT_FLAGS, r);
2900         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PARAMETERS", SAMR_FIELD_PARAMETERS, r);
2901         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_COUNTRY_CODE", SAMR_FIELD_COUNTRY_CODE, r);
2902         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_CODE_PAGE", SAMR_FIELD_CODE_PAGE, r);
2903         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_NT_PASSWORD_PRESENT", SAMR_FIELD_NT_PASSWORD_PRESENT, r);
2904         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LM_PASSWORD_PRESENT", SAMR_FIELD_LM_PASSWORD_PRESENT, r);
2905         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PRIVATE_DATA", SAMR_FIELD_PRIVATE_DATA, r);
2906         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_EXPIRED_FLAG", SAMR_FIELD_EXPIRED_FLAG, r);
2907         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_SEC_DESC", SAMR_FIELD_SEC_DESC, r);
2908         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_OWF_PWD", SAMR_FIELD_OWF_PWD, r);
2909         ndr->depth--;
2910 }
2911
2912 static enum ndr_err_code ndr_push_samr_UserInfo21(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo21 *r)
2913 {
2914         if (ndr_flags & NDR_SCALARS) {
2915                 NDR_CHECK(ndr_push_align(ndr, 5));
2916                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2917                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2918                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2919                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2920                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
2921                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
2922                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2923                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2924                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2925                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2926                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2927                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2928                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2929                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2930                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
2931                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2932                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->lm_owf_password));
2933                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->nt_owf_password));
2934                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2935                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_count));
2936                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer));
2937                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2938                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2939                 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2940                 NDR_CHECK(ndr_push_samr_FieldsPresent(ndr, NDR_SCALARS, r->fields_present));
2941                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2942                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2943                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2944                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
2945                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
2946                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_set));
2947                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_set));
2948                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
2949                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->unknown4));
2950                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2951         }
2952         if (ndr_flags & NDR_BUFFERS) {
2953                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2954                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2955                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2956                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2957                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2958                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2959                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2960                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2961                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2962                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2963                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->lm_owf_password));
2964                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->nt_owf_password));
2965                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2966                 if (r->buffer) {
2967                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->buf_count));
2968                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->buf_count));
2969                 }
2970                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2971         }
2972         return NDR_ERR_SUCCESS;
2973 }
2974
2975 static enum ndr_err_code ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo21 *r)
2976 {
2977         uint32_t _ptr_buffer;
2978         TALLOC_CTX *_mem_save_buffer_0;
2979         if (ndr_flags & NDR_SCALARS) {
2980                 NDR_CHECK(ndr_pull_align(ndr, 5));
2981                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
2982                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
2983                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
2984                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
2985                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
2986                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
2987                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2988                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2989                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2990                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2991                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2992                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2993                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2994                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2995                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
2996                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2997                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->lm_owf_password));
2998                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->nt_owf_password));
2999                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3000                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_count));
3001                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
3002                 if (_ptr_buffer) {
3003                         NDR_PULL_ALLOC(ndr, r->buffer);
3004                 } else {
3005                         r->buffer = NULL;
3006                 }
3007                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3008                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
3009                 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
3010                 NDR_CHECK(ndr_pull_samr_FieldsPresent(ndr, NDR_SCALARS, &r->fields_present));
3011                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
3012                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
3013                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
3014                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
3015                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
3016                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_set));
3017                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_set));
3018                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3019                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown4));
3020                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3021         }
3022         if (ndr_flags & NDR_BUFFERS) {
3023                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
3024                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
3025                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
3026                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
3027                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
3028                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
3029                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
3030                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
3031                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
3032                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
3033                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->lm_owf_password));
3034                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->nt_owf_password));
3035                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3036                 if (r->buffer) {
3037                         _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
3038                         NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0);
3039                         NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer));
3040                         NDR_PULL_ALLOC_N(ndr, r->buffer, ndr_get_array_size(ndr, &r->buffer));
3041                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, ndr_get_array_size(ndr, &r->buffer)));
3042                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
3043                 }
3044                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
3045                 if (r->buffer) {
3046                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->buffer, r->buf_count));
3047                 }
3048         }
3049         return NDR_ERR_SUCCESS;
3050 }
3051
3052 _PUBLIC_ void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r)
3053 {
3054         ndr_print_struct(ndr, name, "samr_UserInfo21");
3055         ndr->depth++;
3056         ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
3057         ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
3058         ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
3059         ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
3060         ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
3061         ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
3062         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
3063         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
3064         ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
3065         ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
3066         ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
3067         ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
3068         ndr_print_lsa_String(ndr, "description", &r->description);
3069         ndr_print_lsa_String(ndr, "workstations", &r->workstations);
3070         ndr_print_lsa_String(ndr, "comment", &r->comment);
3071         ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
3072         ndr_print_lsa_BinaryString(ndr, "lm_owf_password", &r->lm_owf_password);
3073         ndr_print_lsa_BinaryString(ndr, "nt_owf_password", &r->nt_owf_password);
3074         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3075         ndr_print_uint32(ndr, "buf_count", r->buf_count);
3076         ndr_print_ptr(ndr, "buffer", r->buffer);
3077         ndr->depth++;
3078         if (r->buffer) {
3079                 ndr_print_array_uint8(ndr, "buffer", r->buffer, r->buf_count);
3080         }
3081         ndr->depth--;
3082         ndr_print_uint32(ndr, "rid", r->rid);
3083         ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
3084         ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
3085         ndr_print_samr_FieldsPresent(ndr, "fields_present", r->fields_present);
3086         ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
3087         ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
3088         ndr_print_uint16(ndr, "logon_count", r->logon_count);
3089         ndr_print_uint16(ndr, "country_code", r->country_code);
3090         ndr_print_uint16(ndr, "code_page", r->code_page);
3091         ndr_print_uint8(ndr, "lm_password_set", r->lm_password_set);
3092         ndr_print_uint8(ndr, "nt_password_set", r->nt_password_set);
3093         ndr_print_uint8(ndr, "password_expired", r->password_expired);
3094         ndr_print_uint8(ndr, "unknown4", r->unknown4);
3095         ndr->depth--;
3096 }
3097
3098 _PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r)
3099 {
3100         {
3101                 uint32_t _flags_save_STRUCT = ndr->flags;
3102                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3103                 if (ndr_flags & NDR_SCALARS) {
3104                         NDR_CHECK(ndr_push_align(ndr, 1));
3105                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 516));
3106                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3107                 }
3108                 if (ndr_flags & NDR_BUFFERS) {
3109                 }
3110                 ndr->flags = _flags_save_STRUCT;
3111         }
3112         return NDR_ERR_SUCCESS;
3113 }
3114
3115 _PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r)
3116 {
3117         {
3118                 uint32_t _flags_save_STRUCT = ndr->flags;
3119                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3120                 if (ndr_flags & NDR_SCALARS) {
3121                         NDR_CHECK(ndr_pull_align(ndr, 1));
3122                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 516));
3123                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3124                 }