s3-registry: make sure root has full registry access (in particular for make test).
[Samba/nascimento.git] / librpc / gen_ndr / ndr_samr.c
blobf4c1a0cfcfd9170f507e051ba57a4218ff2623a9
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_samr.h"
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)
11 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
12 return NDR_ERR_SUCCESS;
15 _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r)
17 uint32_t v;
18 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
19 *r = v;
20 return NDR_ERR_SUCCESS;
23 _PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r)
25 const char *val = NULL;
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;
32 ndr_print_enum(ndr, name, "ENUM", val, r);
35 _PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
37 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
38 return NDR_ERR_SUCCESS;
41 _PUBLIC_ enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
43 uint32_t v;
44 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
45 *r = v;
46 return NDR_ERR_SUCCESS;
49 _PUBLIC_ void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r)
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--;
75 static enum ndr_err_code ndr_push_samr_ConnectAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
77 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
78 return NDR_ERR_SUCCESS;
81 static enum ndr_err_code ndr_pull_samr_ConnectAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
83 uint32_t v;
84 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
85 *r = v;
86 return NDR_ERR_SUCCESS;
89 _PUBLIC_ void ndr_print_samr_ConnectAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
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--;
102 static enum ndr_err_code ndr_push_samr_UserAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
104 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
105 return NDR_ERR_SUCCESS;
108 static enum ndr_err_code ndr_pull_samr_UserAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
110 uint32_t v;
111 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
112 *r = v;
113 return NDR_ERR_SUCCESS;
116 _PUBLIC_ void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
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--;
134 static enum ndr_err_code ndr_push_samr_DomainAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
136 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
137 return NDR_ERR_SUCCESS;
140 static enum ndr_err_code ndr_pull_samr_DomainAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
142 uint32_t v;
143 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
144 *r = v;
145 return NDR_ERR_SUCCESS;
148 _PUBLIC_ void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
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--;
166 static enum ndr_err_code ndr_push_samr_GroupAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
169 return NDR_ERR_SUCCESS;
172 static enum ndr_err_code ndr_pull_samr_GroupAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
174 uint32_t v;
175 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
176 *r = v;
177 return NDR_ERR_SUCCESS;
180 _PUBLIC_ void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
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--;
192 static enum ndr_err_code ndr_push_samr_AliasAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
194 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
195 return NDR_ERR_SUCCESS;
198 static enum ndr_err_code ndr_pull_samr_AliasAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
200 uint32_t v;
201 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
202 *r = v;
203 return NDR_ERR_SUCCESS;
206 _PUBLIC_ void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
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--;
218 static enum ndr_err_code ndr_push_samr_SamEntry(struct ndr_push *ndr, int ndr_flags, const struct samr_SamEntry *r)
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));
226 if (ndr_flags & NDR_BUFFERS) {
227 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
229 return NDR_ERR_SUCCESS;
232 static enum ndr_err_code ndr_pull_samr_SamEntry(struct ndr_pull *ndr, int ndr_flags, struct samr_SamEntry *r)
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));
240 if (ndr_flags & NDR_BUFFERS) {
241 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
243 return NDR_ERR_SUCCESS;
246 _PUBLIC_ void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r)
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--;
255 static enum ndr_err_code ndr_push_samr_SamArray(struct ndr_push *ndr, int ndr_flags, const struct samr_SamArray *r)
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));
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]));
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]));
275 return NDR_ERR_SUCCESS;
278 static enum ndr_err_code ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r)
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;
293 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
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]));
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]));
309 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
310 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
312 if (r->entries) {
313 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
316 return NDR_ERR_SUCCESS;
319 _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r)
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);
337 ndr->depth--;
339 ndr->depth--;
340 ndr->depth--;
343 static enum ndr_err_code ndr_push_samr_DomainInfoClass(struct ndr_push *ndr, int ndr_flags, enum samr_DomainInfoClass r)
345 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
346 return NDR_ERR_SUCCESS;
349 static enum ndr_err_code ndr_pull_samr_DomainInfoClass(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainInfoClass *r)
351 uint16_t v;
352 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
353 *r = v;
354 return NDR_ERR_SUCCESS;
357 _PUBLIC_ void ndr_print_samr_DomainInfoClass(struct ndr_print *ndr, const char *name, enum samr_DomainInfoClass r)
359 const char *val = NULL;
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;
376 ndr_print_enum(ndr, name, "ENUM", val, r);
379 static enum ndr_err_code ndr_push_samr_Role(struct ndr_push *ndr, int ndr_flags, enum samr_Role r)
381 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
382 return NDR_ERR_SUCCESS;
385 static enum ndr_err_code ndr_pull_samr_Role(struct ndr_pull *ndr, int ndr_flags, enum samr_Role *r)
387 uint32_t v;
388 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
389 *r = v;
390 return NDR_ERR_SUCCESS;
393 _PUBLIC_ void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r)
395 const char *val = NULL;
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;
403 ndr_print_enum(ndr, name, "ENUM", val, r);
406 _PUBLIC_ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r)
408 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
409 return NDR_ERR_SUCCESS;
412 _PUBLIC_ enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
414 uint32_t v;
415 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
416 *r = v;
417 return NDR_ERR_SUCCESS;
420 _PUBLIC_ void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r)
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--;
433 static enum ndr_err_code ndr_push_samr_DomainServerState(struct ndr_push *ndr, int ndr_flags, enum samr_DomainServerState r)
435 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
436 return NDR_ERR_SUCCESS;
439 static enum ndr_err_code ndr_pull_samr_DomainServerState(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainServerState *r)
441 uint32_t v;
442 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
443 *r = v;
444 return NDR_ERR_SUCCESS;
447 _PUBLIC_ void ndr_print_samr_DomainServerState(struct ndr_print *ndr, const char *name, enum samr_DomainServerState r)
449 const char *val = NULL;
451 switch (r) {
452 case DOMAIN_SERVER_ENABLED: val = "DOMAIN_SERVER_ENABLED"; break;
453 case DOMAIN_SERVER_DISABLED: val = "DOMAIN_SERVER_DISABLED"; break;
455 ndr_print_enum(ndr, name, "ENUM", val, r);
458 static enum ndr_err_code ndr_push_samr_DomInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo1 *r)
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));
469 if (ndr_flags & NDR_BUFFERS) {
471 return NDR_ERR_SUCCESS;
474 static enum ndr_err_code ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo1 *r)
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));
485 if (ndr_flags & NDR_BUFFERS) {
487 return NDR_ERR_SUCCESS;
490 _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r)
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--;
502 static enum ndr_err_code ndr_push_samr_DomGeneralInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation *r)
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));
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));
524 return NDR_ERR_SUCCESS;
527 static enum ndr_err_code ndr_pull_samr_DomGeneralInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation *r)
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));
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));
549 return NDR_ERR_SUCCESS;
552 _PUBLIC_ void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r)
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--;
570 static enum ndr_err_code ndr_push_samr_DomInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo3 *r)
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));
577 if (ndr_flags & NDR_BUFFERS) {
579 return NDR_ERR_SUCCESS;
582 static enum ndr_err_code ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo3 *r)
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));
589 if (ndr_flags & NDR_BUFFERS) {
591 return NDR_ERR_SUCCESS;
594 _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r)
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--;
602 static enum ndr_err_code ndr_push_samr_DomOEMInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomOEMInformation *r)
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));
609 if (ndr_flags & NDR_BUFFERS) {
610 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
612 return NDR_ERR_SUCCESS;
615 static enum ndr_err_code ndr_pull_samr_DomOEMInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomOEMInformation *r)
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));
622 if (ndr_flags & NDR_BUFFERS) {
623 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
625 return NDR_ERR_SUCCESS;
628 _PUBLIC_ void ndr_print_samr_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *r)
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--;
636 static enum ndr_err_code ndr_push_samr_DomInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo5 *r)
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));
643 if (ndr_flags & NDR_BUFFERS) {
644 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
646 return NDR_ERR_SUCCESS;
649 static enum ndr_err_code ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo5 *r)
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));
656 if (ndr_flags & NDR_BUFFERS) {
657 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
659 return NDR_ERR_SUCCESS;
662 _PUBLIC_ void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r)
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--;
670 static enum ndr_err_code ndr_push_samr_DomInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo6 *r)
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));
677 if (ndr_flags & NDR_BUFFERS) {
678 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary));
680 return NDR_ERR_SUCCESS;
683 static enum ndr_err_code ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo6 *r)
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));
690 if (ndr_flags & NDR_BUFFERS) {
691 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary));
693 return NDR_ERR_SUCCESS;
696 _PUBLIC_ void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r)
698 ndr_print_struct(ndr, name, "samr_DomInfo6");
699 ndr->depth++;
700 ndr_print_lsa_String(ndr, "primary", &r->primary);
701 ndr->depth--;
704 static enum ndr_err_code ndr_push_samr_DomInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo7 *r)
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));
711 if (ndr_flags & NDR_BUFFERS) {
713 return NDR_ERR_SUCCESS;
716 static enum ndr_err_code ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo7 *r)
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));
723 if (ndr_flags & NDR_BUFFERS) {
725 return NDR_ERR_SUCCESS;
728 _PUBLIC_ void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r)
730 ndr_print_struct(ndr, name, "samr_DomInfo7");
731 ndr->depth++;
732 ndr_print_samr_Role(ndr, "role", r->role);
733 ndr->depth--;
736 static enum ndr_err_code ndr_push_samr_DomInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo8 *r)
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));
744 if (ndr_flags & NDR_BUFFERS) {
746 return NDR_ERR_SUCCESS;
749 static enum ndr_err_code ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo8 *r)
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));
757 if (ndr_flags & NDR_BUFFERS) {
759 return NDR_ERR_SUCCESS;
762 _PUBLIC_ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r)
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--;
771 static enum ndr_err_code ndr_push_samr_DomInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo9 *r)
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));
778 if (ndr_flags & NDR_BUFFERS) {
780 return NDR_ERR_SUCCESS;
783 static enum ndr_err_code ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo9 *r)
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));
790 if (ndr_flags & NDR_BUFFERS) {
792 return NDR_ERR_SUCCESS;
795 _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r)
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--;
803 static enum ndr_err_code ndr_push_samr_DomGeneralInformation2(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation2 *r)
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));
813 if (ndr_flags & NDR_BUFFERS) {
814 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
816 return NDR_ERR_SUCCESS;
819 static enum ndr_err_code ndr_pull_samr_DomGeneralInformation2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation2 *r)
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));
829 if (ndr_flags & NDR_BUFFERS) {
830 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
832 return NDR_ERR_SUCCESS;
835 _PUBLIC_ void ndr_print_samr_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *r)
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--;
846 static enum ndr_err_code ndr_push_samr_DomInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo12 *r)
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));
855 if (ndr_flags & NDR_BUFFERS) {
857 return NDR_ERR_SUCCESS;
860 static enum ndr_err_code ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo12 *r)
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));
869 if (ndr_flags & NDR_BUFFERS) {
871 return NDR_ERR_SUCCESS;
874 _PUBLIC_ void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r)
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--;
884 static enum ndr_err_code ndr_push_samr_DomInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo13 *r)
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));
893 if (ndr_flags & NDR_BUFFERS) {
895 return NDR_ERR_SUCCESS;
898 static enum ndr_err_code ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo13 *r)
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));
907 if (ndr_flags & NDR_BUFFERS) {
909 return NDR_ERR_SUCCESS;
912 _PUBLIC_ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r)
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--;
922 static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const union samr_DomainInfo *r)
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; }
933 case 2: {
934 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
935 break; }
937 case 3: {
938 NDR_CHECK(ndr_push_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3));
939 break; }
941 case 4: {
942 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
943 break; }
945 case 5: {
946 NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5));
947 break; }
949 case 6: {
950 NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6));
951 break; }
953 case 7: {
954 NDR_CHECK(ndr_push_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7));
955 break; }
957 case 8: {
958 NDR_CHECK(ndr_push_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8));
959 break; }
961 case 9: {
962 NDR_CHECK(ndr_push_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9));
963 break; }
965 case 11: {
966 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
967 break; }
969 case 12: {
970 NDR_CHECK(ndr_push_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12));
971 break; }
973 case 13: {
974 NDR_CHECK(ndr_push_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13));
975 break; }
977 default:
978 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
981 if (ndr_flags & NDR_BUFFERS) {
982 int level = ndr_push_get_switch_value(ndr, r);
983 switch (level) {
984 case 1:
985 break;
987 case 2:
988 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
989 break;
991 case 3:
992 break;
994 case 4:
995 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
996 break;
998 case 5:
999 NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5));
1000 break;
1002 case 6:
1003 NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6));
1004 break;
1006 case 7:
1007 break;
1009 case 8:
1010 break;
1012 case 9:
1013 break;
1015 case 11:
1016 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
1017 break;
1019 case 12:
1020 break;
1022 case 13:
1023 break;
1025 default:
1026 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1029 return NDR_ERR_SUCCESS;
1032 static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, union samr_DomainInfo *r)
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__);
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; }
1048 case 2: {
1049 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
1050 break; }
1052 case 3: {
1053 NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3));
1054 break; }
1056 case 4: {
1057 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
1058 break; }
1060 case 5: {
1061 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5));
1062 break; }
1064 case 6: {
1065 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6));
1066 break; }
1068 case 7: {
1069 NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7));
1070 break; }
1072 case 8: {
1073 NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8));
1074 break; }
1076 case 9: {
1077 NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9));
1078 break; }
1080 case 11: {
1081 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
1082 break; }
1084 case 12: {
1085 NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12));
1086 break; }
1088 case 13: {
1089 NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13));
1090 break; }
1092 default:
1093 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1096 if (ndr_flags & NDR_BUFFERS) {
1097 switch (level) {
1098 case 1:
1099 break;
1101 case 2:
1102 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
1103 break;
1105 case 3:
1106 break;
1108 case 4:
1109 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
1110 break;
1112 case 5:
1113 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5));
1114 break;
1116 case 6:
1117 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6));
1118 break;
1120 case 7:
1121 break;
1123 case 8:
1124 break;
1126 case 9:
1127 break;
1129 case 11:
1130 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
1131 break;
1133 case 12:
1134 break;
1136 case 13:
1137 break;
1139 default:
1140 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1143 return NDR_ERR_SUCCESS;
1146 _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r)
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;
1156 case 2:
1157 ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general);
1158 break;
1160 case 3:
1161 ndr_print_samr_DomInfo3(ndr, "info3", &r->info3);
1162 break;
1164 case 4:
1165 ndr_print_samr_DomOEMInformation(ndr, "oem", &r->oem);
1166 break;
1168 case 5:
1169 ndr_print_samr_DomInfo5(ndr, "info5", &r->info5);
1170 break;
1172 case 6:
1173 ndr_print_samr_DomInfo6(ndr, "info6", &r->info6);
1174 break;
1176 case 7:
1177 ndr_print_samr_DomInfo7(ndr, "info7", &r->info7);
1178 break;
1180 case 8:
1181 ndr_print_samr_DomInfo8(ndr, "info8", &r->info8);
1182 break;
1184 case 9:
1185 ndr_print_samr_DomInfo9(ndr, "info9", &r->info9);
1186 break;
1188 case 11:
1189 ndr_print_samr_DomGeneralInformation2(ndr, "general2", &r->general2);
1190 break;
1192 case 12:
1193 ndr_print_samr_DomInfo12(ndr, "info12", &r->info12);
1194 break;
1196 case 13:
1197 ndr_print_samr_DomInfo13(ndr, "info13", &r->info13);
1198 break;
1200 default:
1201 ndr_print_bad_level(ndr, name, level);
1205 static enum ndr_err_code ndr_push_samr_Ids(struct ndr_push *ndr, int ndr_flags, const struct samr_Ids *r)
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));
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]));
1222 return NDR_ERR_SUCCESS;
1225 static enum ndr_err_code ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags, struct samr_Ids *r)
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");
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;
1243 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
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]));
1256 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_1, 0);
1257 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, 0);
1259 if (r->ids) {
1260 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ids, r->count));
1263 return NDR_ERR_SUCCESS;
1266 _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r)
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);
1284 ndr->depth--;
1286 ndr->depth--;
1287 ndr->depth--;
1290 _PUBLIC_ enum ndr_err_code ndr_push_samr_GroupAttrs(struct ndr_push *ndr, int ndr_flags, uint32_t r)
1292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1293 return NDR_ERR_SUCCESS;
1296 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GroupAttrs(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
1298 uint32_t v;
1299 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1300 *r = v;
1301 return NDR_ERR_SUCCESS;
1304 _PUBLIC_ void ndr_print_samr_GroupAttrs(struct ndr_print *ndr, const char *name, uint32_t r)
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--;
1318 static enum ndr_err_code ndr_push_samr_GroupInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAll *r)
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));
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));
1332 return NDR_ERR_SUCCESS;
1335 static enum ndr_err_code ndr_pull_samr_GroupInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAll *r)
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));
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));
1349 return NDR_ERR_SUCCESS;
1352 _PUBLIC_ void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r)
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--;
1363 static enum ndr_err_code ndr_push_samr_GroupInfoAttributes(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAttributes *r)
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));
1370 if (ndr_flags & NDR_BUFFERS) {
1372 return NDR_ERR_SUCCESS;
1375 static enum ndr_err_code ndr_pull_samr_GroupInfoAttributes(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAttributes *r)
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));
1382 if (ndr_flags & NDR_BUFFERS) {
1384 return NDR_ERR_SUCCESS;
1387 _PUBLIC_ void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r)
1389 ndr_print_struct(ndr, name, "samr_GroupInfoAttributes");
1390 ndr->depth++;
1391 ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes);
1392 ndr->depth--;
1395 static enum ndr_err_code ndr_push_samr_GroupInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_GroupInfoEnum r)
1397 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1398 return NDR_ERR_SUCCESS;
1401 static enum ndr_err_code ndr_pull_samr_GroupInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_GroupInfoEnum *r)
1403 uint16_t v;
1404 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1405 *r = v;
1406 return NDR_ERR_SUCCESS;
1409 _PUBLIC_ void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r)
1411 const char *val = NULL;
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;
1420 ndr_print_enum(ndr, name, "ENUM", val, r);
1423 static enum ndr_err_code ndr_push_samr_GroupInfo(struct ndr_push *ndr, int ndr_flags, const union samr_GroupInfo *r)
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; }
1434 case GROUPINFONAME: {
1435 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1436 break; }
1438 case GROUPINFOATTRIBUTES: {
1439 NDR_CHECK(ndr_push_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes));
1440 break; }
1442 case GROUPINFODESCRIPTION: {
1443 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1444 break; }
1446 case GROUPINFOALL2: {
1447 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2));
1448 break; }
1450 default:
1451 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
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;
1461 case GROUPINFONAME:
1462 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1463 break;
1465 case GROUPINFOATTRIBUTES:
1466 break;
1468 case GROUPINFODESCRIPTION:
1469 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1470 break;
1472 case GROUPINFOALL2:
1473 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2));
1474 break;
1476 default:
1477 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1480 return NDR_ERR_SUCCESS;
1483 static enum ndr_err_code ndr_pull_samr_GroupInfo(struct ndr_pull *ndr, int ndr_flags, union samr_GroupInfo *r)
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__);
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; }
1499 case GROUPINFONAME: {
1500 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1501 break; }
1503 case GROUPINFOATTRIBUTES: {
1504 NDR_CHECK(ndr_pull_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes));
1505 break; }
1507 case GROUPINFODESCRIPTION: {
1508 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1509 break; }
1511 case GROUPINFOALL2: {
1512 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2));
1513 break; }
1515 default:
1516 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
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;
1525 case GROUPINFONAME:
1526 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1527 break;
1529 case GROUPINFOATTRIBUTES:
1530 break;
1532 case GROUPINFODESCRIPTION:
1533 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1534 break;
1536 case GROUPINFOALL2:
1537 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2));
1538 break;
1540 default:
1541 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1544 return NDR_ERR_SUCCESS;
1547 _PUBLIC_ void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r)
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;
1557 case GROUPINFONAME:
1558 ndr_print_lsa_String(ndr, "name", &r->name);
1559 break;
1561 case GROUPINFOATTRIBUTES:
1562 ndr_print_samr_GroupInfoAttributes(ndr, "attributes", &r->attributes);
1563 break;
1565 case GROUPINFODESCRIPTION:
1566 ndr_print_lsa_String(ndr, "description", &r->description);
1567 break;
1569 case GROUPINFOALL2:
1570 ndr_print_samr_GroupInfoAll(ndr, "all2", &r->all2);
1571 break;
1573 default:
1574 ndr_print_bad_level(ndr, name, level);
1578 static enum ndr_err_code ndr_push_samr_RidTypeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidTypeArray *r)
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));
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]));
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]));
1603 return NDR_ERR_SUCCESS;
1606 static enum ndr_err_code ndr_pull_samr_RidTypeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidTypeArray *r)
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;
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;
1631 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
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]));
1644 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
1645 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
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]));
1657 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_1, 0);
1658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, 0);
1660 if (r->rids) {
1661 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->count));
1663 if (r->types) {
1664 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->types, r->count));
1667 return NDR_ERR_SUCCESS;
1670 _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *name, const struct samr_RidTypeArray *r)
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);
1689 ndr->depth--;
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);
1704 ndr->depth--;
1706 ndr->depth--;
1707 ndr->depth--;
1710 static enum ndr_err_code ndr_push_samr_AliasInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_AliasInfoAll *r)
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));
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));
1723 return NDR_ERR_SUCCESS;
1726 static enum ndr_err_code ndr_pull_samr_AliasInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoAll *r)
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));
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));
1739 return NDR_ERR_SUCCESS;
1742 _PUBLIC_ void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r)
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--;
1752 static enum ndr_err_code ndr_push_samr_AliasInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_AliasInfoEnum r)
1754 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1755 return NDR_ERR_SUCCESS;
1758 static enum ndr_err_code ndr_pull_samr_AliasInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_AliasInfoEnum *r)
1760 uint16_t v;
1761 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1762 *r = v;
1763 return NDR_ERR_SUCCESS;
1766 _PUBLIC_ void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r)
1768 const char *val = NULL;
1770 switch (r) {
1771 case ALIASINFOALL: val = "ALIASINFOALL"; break;
1772 case ALIASINFONAME: val = "ALIASINFONAME"; break;
1773 case ALIASINFODESCRIPTION: val = "ALIASINFODESCRIPTION"; break;
1775 ndr_print_enum(ndr, name, "ENUM", val, r);
1778 static enum ndr_err_code ndr_push_samr_AliasInfo(struct ndr_push *ndr, int ndr_flags, const union samr_AliasInfo *r)
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; }
1789 case ALIASINFONAME: {
1790 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1791 break; }
1793 case ALIASINFODESCRIPTION: {
1794 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1795 break; }
1797 default:
1798 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
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;
1808 case ALIASINFONAME:
1809 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1810 break;
1812 case ALIASINFODESCRIPTION:
1813 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1814 break;
1816 default:
1817 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1820 return NDR_ERR_SUCCESS;
1823 static enum ndr_err_code ndr_pull_samr_AliasInfo(struct ndr_pull *ndr, int ndr_flags, union samr_AliasInfo *r)
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__);
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; }
1839 case ALIASINFONAME: {
1840 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1841 break; }
1843 case ALIASINFODESCRIPTION: {
1844 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1845 break; }
1847 default:
1848 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
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;
1857 case ALIASINFONAME:
1858 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1859 break;
1861 case ALIASINFODESCRIPTION:
1862 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1863 break;
1865 default:
1866 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1869 return NDR_ERR_SUCCESS;
1872 _PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r)
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;
1882 case ALIASINFONAME:
1883 ndr_print_lsa_String(ndr, "name", &r->name);
1884 break;
1886 case ALIASINFODESCRIPTION:
1887 ndr_print_lsa_String(ndr, "description", &r->description);
1888 break;
1890 default:
1891 ndr_print_bad_level(ndr, name, level);
1895 static enum ndr_err_code ndr_push_samr_UserInfoLevel(struct ndr_push *ndr, int ndr_flags, enum samr_UserInfoLevel r)
1897 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1898 return NDR_ERR_SUCCESS;
1901 static enum ndr_err_code ndr_pull_samr_UserInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_UserInfoLevel *r)
1903 uint16_t v;
1904 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1905 *r = v;
1906 return NDR_ERR_SUCCESS;
1909 _PUBLIC_ void ndr_print_samr_UserInfoLevel(struct ndr_print *ndr, const char *name, enum samr_UserInfoLevel r)
1911 const char *val = NULL;
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;
1938 ndr_print_enum(ndr, name, "ENUM", val, r);
1941 static enum ndr_err_code ndr_push_samr_UserInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo1 *r)
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));
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));
1958 return NDR_ERR_SUCCESS;
1961 static enum ndr_err_code ndr_pull_samr_UserInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo1 *r)
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));
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));
1978 return NDR_ERR_SUCCESS;
1981 _PUBLIC_ void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r)
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--;
1993 static enum ndr_err_code ndr_push_samr_UserInfo2(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo2 *r)
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));
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));
2007 return NDR_ERR_SUCCESS;
2010 static enum ndr_err_code ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo2 *r)
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));
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));
2024 return NDR_ERR_SUCCESS;
2027 _PUBLIC_ void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r)
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--;
2038 _PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r)
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));
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));
2057 ndr->flags = _flags_save_STRUCT;
2059 return NDR_ERR_SUCCESS;
2062 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r)
2064 uint32_t _ptr_bits;
2065 TALLOC_CTX *_mem_save_bits_0;
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;
2078 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
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));
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);
2093 if (r->bits) {
2094 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->bits, 1260));
2096 if (r->bits) {
2097 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->bits, r->units_per_week / 8));
2100 ndr->flags = _flags_save_STRUCT;
2102 return NDR_ERR_SUCCESS;
2105 _PUBLIC_ void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r)
2107 ndr_print_struct(ndr, name, "samr_LogonHours");
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);
2118 ndr->depth--;
2119 ndr->depth--;
2120 ndr->flags = _flags_save_STRUCT;
2124 static enum ndr_err_code ndr_push_samr_UserInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo3 *r)
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));
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));
2158 return NDR_ERR_SUCCESS;
2161 static enum ndr_err_code ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo3 *r)
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));
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));
2195 return NDR_ERR_SUCCESS;
2198 _PUBLIC_ void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r)
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--;
2223 static enum ndr_err_code ndr_push_samr_UserInfo4(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo4 *r)
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));
2230 if (ndr_flags & NDR_BUFFERS) {
2231 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2233 return NDR_ERR_SUCCESS;
2236 static enum ndr_err_code ndr_pull_samr_UserInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo4 *r)
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));
2243 if (ndr_flags & NDR_BUFFERS) {
2244 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2246 return NDR_ERR_SUCCESS;
2249 _PUBLIC_ void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r)
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--;
2257 static enum ndr_err_code ndr_push_samr_UserInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo5 *r)
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));
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));
2292 return NDR_ERR_SUCCESS;
2295 static enum ndr_err_code ndr_pull_samr_UserInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo5 *r)
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));
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));
2330 return NDR_ERR_SUCCESS;
2333 _PUBLIC_ void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r)
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--;
2358 static enum ndr_err_code ndr_push_samr_UserInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo6 *r)
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));
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));
2370 return NDR_ERR_SUCCESS;
2373 static enum ndr_err_code ndr_pull_samr_UserInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo6 *r)
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));
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));
2385 return NDR_ERR_SUCCESS;
2388 _PUBLIC_ void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r)
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--;
2397 static enum ndr_err_code ndr_push_samr_UserInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo7 *r)
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));
2404 if (ndr_flags & NDR_BUFFERS) {
2405 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2407 return NDR_ERR_SUCCESS;
2410 static enum ndr_err_code ndr_pull_samr_UserInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo7 *r)
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));
2417 if (ndr_flags & NDR_BUFFERS) {
2418 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2420 return NDR_ERR_SUCCESS;
2423 _PUBLIC_ void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r)
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--;
2431 static enum ndr_err_code ndr_push_samr_UserInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo8 *r)
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));
2438 if (ndr_flags & NDR_BUFFERS) {
2439 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2441 return NDR_ERR_SUCCESS;
2444 static enum ndr_err_code ndr_pull_samr_UserInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo8 *r)
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));
2451 if (ndr_flags & NDR_BUFFERS) {
2452 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2454 return NDR_ERR_SUCCESS;
2457 _PUBLIC_ void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r)
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--;
2465 static enum ndr_err_code ndr_push_samr_UserInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo9 *r)
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));
2472 if (ndr_flags & NDR_BUFFERS) {
2474 return NDR_ERR_SUCCESS;
2477 static enum ndr_err_code ndr_pull_samr_UserInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo9 *r)
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));
2484 if (ndr_flags & NDR_BUFFERS) {
2486 return NDR_ERR_SUCCESS;
2489 _PUBLIC_ void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r)
2491 ndr_print_struct(ndr, name, "samr_UserInfo9");
2492 ndr->depth++;
2493 ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2494 ndr->depth--;
2497 static enum ndr_err_code ndr_push_samr_UserInfo10(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo10 *r)
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));
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));
2509 return NDR_ERR_SUCCESS;
2512 static enum ndr_err_code ndr_pull_samr_UserInfo10(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo10 *r)
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));
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));
2524 return NDR_ERR_SUCCESS;
2527 _PUBLIC_ void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r)
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--;
2536 static enum ndr_err_code ndr_push_samr_UserInfo11(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo11 *r)
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));
2543 if (ndr_flags & NDR_BUFFERS) {
2544 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2546 return NDR_ERR_SUCCESS;
2549 static enum ndr_err_code ndr_pull_samr_UserInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo11 *r)
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));
2556 if (ndr_flags & NDR_BUFFERS) {
2557 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2559 return NDR_ERR_SUCCESS;
2562 _PUBLIC_ void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r)
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--;
2570 static enum ndr_err_code ndr_push_samr_UserInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo12 *r)
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));
2577 if (ndr_flags & NDR_BUFFERS) {
2578 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2580 return NDR_ERR_SUCCESS;
2583 static enum ndr_err_code ndr_pull_samr_UserInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo12 *r)
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));
2590 if (ndr_flags & NDR_BUFFERS) {
2591 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2593 return NDR_ERR_SUCCESS;
2596 _PUBLIC_ void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r)
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--;
2604 static enum ndr_err_code ndr_push_samr_UserInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo13 *r)
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));
2611 if (ndr_flags & NDR_BUFFERS) {
2612 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2614 return NDR_ERR_SUCCESS;
2617 static enum ndr_err_code ndr_pull_samr_UserInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo13 *r)
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));
2624 if (ndr_flags & NDR_BUFFERS) {
2625 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2627 return NDR_ERR_SUCCESS;
2630 _PUBLIC_ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r)
2632 ndr_print_struct(ndr, name, "samr_UserInfo13");
2633 ndr->depth++;
2634 ndr_print_lsa_String(ndr, "description", &r->description);
2635 ndr->depth--;
2638 static enum ndr_err_code ndr_push_samr_UserInfo14(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo14 *r)
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));
2645 if (ndr_flags & NDR_BUFFERS) {
2646 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2648 return NDR_ERR_SUCCESS;
2651 static enum ndr_err_code ndr_pull_samr_UserInfo14(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo14 *r)
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));
2658 if (ndr_flags & NDR_BUFFERS) {
2659 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2661 return NDR_ERR_SUCCESS;
2664 _PUBLIC_ void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r)
2666 ndr_print_struct(ndr, name, "samr_UserInfo14");
2667 ndr->depth++;
2668 ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2669 ndr->depth--;
2672 static enum ndr_err_code ndr_push_samr_UserInfo16(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo16 *r)
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));
2679 if (ndr_flags & NDR_BUFFERS) {
2681 return NDR_ERR_SUCCESS;
2684 static enum ndr_err_code ndr_pull_samr_UserInfo16(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo16 *r)
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));
2691 if (ndr_flags & NDR_BUFFERS) {
2693 return NDR_ERR_SUCCESS;
2696 _PUBLIC_ void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r)
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--;
2704 static enum ndr_err_code ndr_push_samr_UserInfo17(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo17 *r)
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));
2711 if (ndr_flags & NDR_BUFFERS) {
2713 return NDR_ERR_SUCCESS;
2716 static enum ndr_err_code ndr_pull_samr_UserInfo17(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo17 *r)
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));
2723 if (ndr_flags & NDR_BUFFERS) {
2725 return NDR_ERR_SUCCESS;
2728 _PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r)
2730 ndr_print_struct(ndr, name, "samr_UserInfo17");
2731 ndr->depth++;
2732 ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
2733 ndr->depth--;
2736 _PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r)
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));
2746 if (ndr_flags & NDR_BUFFERS) {
2748 ndr->flags = _flags_save_STRUCT;
2750 return NDR_ERR_SUCCESS;
2753 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r)
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));
2763 if (ndr_flags & NDR_BUFFERS) {
2765 ndr->flags = _flags_save_STRUCT;
2767 return NDR_ERR_SUCCESS;
2770 _PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r)
2772 ndr_print_struct(ndr, name, "samr_Password");
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;
2783 static enum ndr_err_code ndr_push_samr_UserInfo18(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo18 *r)
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));
2794 if (ndr_flags & NDR_BUFFERS) {
2796 return NDR_ERR_SUCCESS;
2799 static enum ndr_err_code ndr_pull_samr_UserInfo18(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo18 *r)
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));
2810 if (ndr_flags & NDR_BUFFERS) {
2812 return NDR_ERR_SUCCESS;
2815 _PUBLIC_ void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r)
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--;
2827 static enum ndr_err_code ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo20 *r)
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));
2834 if (ndr_flags & NDR_BUFFERS) {
2835 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2837 return NDR_ERR_SUCCESS;
2840 static enum ndr_err_code ndr_pull_samr_UserInfo20(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo20 *r)
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));
2847 if (ndr_flags & NDR_BUFFERS) {
2848 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2850 return NDR_ERR_SUCCESS;
2853 _PUBLIC_ void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r)
2855 ndr_print_struct(ndr, name, "samr_UserInfo20");
2856 ndr->depth++;
2857 ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
2858 ndr->depth--;
2861 static enum ndr_err_code ndr_push_samr_FieldsPresent(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2863 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2864 return NDR_ERR_SUCCESS;
2867 static enum ndr_err_code ndr_pull_samr_FieldsPresent(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2869 uint32_t v;
2870 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2871 *r = v;
2872 return NDR_ERR_SUCCESS;
2875 _PUBLIC_ void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r)
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--;
2912 static enum ndr_err_code ndr_push_samr_UserInfo21(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo21 *r)
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));
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));
2970 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2972 return NDR_ERR_SUCCESS;
2975 static enum ndr_err_code ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo21 *r)
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;
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));
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);
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));
3049 return NDR_ERR_SUCCESS;
3052 _PUBLIC_ void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r)
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);
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--;
3098 _PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r)
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));
3108 if (ndr_flags & NDR_BUFFERS) {
3110 ndr->flags = _flags_save_STRUCT;
3112 return NDR_ERR_SUCCESS;
3115 _PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r)
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));
3125 if (ndr_flags & NDR_BUFFERS) {
3127 ndr->flags = _flags_save_STRUCT;
3129 return NDR_ERR_SUCCESS;
3132 _PUBLIC_ void ndr_print_samr_CryptPassword(struct ndr_print *ndr, const char *name, const struct samr_CryptPassword *r)
3134 ndr_print_struct(ndr, name, "samr_CryptPassword");
3136 uint32_t _flags_save_STRUCT = ndr->flags;
3137 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3138 ndr->depth++;
3139 ndr_print_array_uint8(ndr, "data", r->data, 516);
3140 ndr->depth--;
3141 ndr->flags = _flags_save_STRUCT;
3145 static enum ndr_err_code ndr_push_samr_UserInfo23(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo23 *r)
3147 if (ndr_flags & NDR_SCALARS) {
3148 NDR_CHECK(ndr_push_align(ndr, 5));
3149 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3150 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3151 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3153 if (ndr_flags & NDR_BUFFERS) {
3154 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3156 return NDR_ERR_SUCCESS;
3159 static enum ndr_err_code ndr_pull_samr_UserInfo23(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo23 *r)
3161 if (ndr_flags & NDR_SCALARS) {
3162 NDR_CHECK(ndr_pull_align(ndr, 5));
3163 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3164 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3165 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3167 if (ndr_flags & NDR_BUFFERS) {
3168 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3170 return NDR_ERR_SUCCESS;
3173 _PUBLIC_ void ndr_print_samr_UserInfo23(struct ndr_print *ndr, const char *name, const struct samr_UserInfo23 *r)
3175 ndr_print_struct(ndr, name, "samr_UserInfo23");
3176 ndr->depth++;
3177 ndr_print_samr_UserInfo21(ndr, "info", &r->info);
3178 ndr_print_samr_CryptPassword(ndr, "password", &r->password);
3179 ndr->depth--;
3182 static enum ndr_err_code ndr_push_samr_UserInfo24(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo24 *r)
3184 if (ndr_flags & NDR_SCALARS) {
3185 NDR_CHECK(ndr_push_align(ndr, 1));
3186 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3187 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
3188 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3190 if (ndr_flags & NDR_BUFFERS) {
3192 return NDR_ERR_SUCCESS;
3195 static enum ndr_err_code ndr_pull_samr_UserInfo24(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo24 *r)
3197 if (ndr_flags & NDR_SCALARS) {
3198 NDR_CHECK(ndr_pull_align(ndr, 1));
3199 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3200 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3201 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3203 if (ndr_flags & NDR_BUFFERS) {
3205 return NDR_ERR_SUCCESS;
3208 _PUBLIC_ void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name, const struct samr_UserInfo24 *r)
3210 ndr_print_struct(ndr, name, "samr_UserInfo24");
3211 ndr->depth++;
3212 ndr_print_samr_CryptPassword(ndr, "password", &r->password);
3213 ndr_print_uint8(ndr, "password_expired", r->password_expired);
3214 ndr->depth--;
3217 static enum ndr_err_code ndr_push_samr_CryptPasswordEx(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPasswordEx *r)
3220 uint32_t _flags_save_STRUCT = ndr->flags;
3221 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3222 if (ndr_flags & NDR_SCALARS) {
3223 NDR_CHECK(ndr_push_align(ndr, 1));
3224 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 532));
3225 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3227 if (ndr_flags & NDR_BUFFERS) {
3229 ndr->flags = _flags_save_STRUCT;
3231 return NDR_ERR_SUCCESS;
3234 static enum ndr_err_code ndr_pull_samr_CryptPasswordEx(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPasswordEx *r)
3237 uint32_t _flags_save_STRUCT = ndr->flags;
3238 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3239 if (ndr_flags & NDR_SCALARS) {
3240 NDR_CHECK(ndr_pull_align(ndr, 1));
3241 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 532));
3242 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3244 if (ndr_flags & NDR_BUFFERS) {
3246 ndr->flags = _flags_save_STRUCT;
3248 return NDR_ERR_SUCCESS;
3251 _PUBLIC_ void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, const struct samr_CryptPasswordEx *r)
3253 ndr_print_struct(ndr, name, "samr_CryptPasswordEx");
3255 uint32_t _flags_save_STRUCT = ndr->flags;
3256 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3257 ndr->depth++;
3258 ndr_print_array_uint8(ndr, "data", r->data, 532);
3259 ndr->depth--;
3260 ndr->flags = _flags_save_STRUCT;
3264 static enum ndr_err_code ndr_push_samr_UserInfo25(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo25 *r)
3266 if (ndr_flags & NDR_SCALARS) {
3267 NDR_CHECK(ndr_push_align(ndr, 5));
3268 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3269 NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3270 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3272 if (ndr_flags & NDR_BUFFERS) {
3273 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3275 return NDR_ERR_SUCCESS;
3278 static enum ndr_err_code ndr_pull_samr_UserInfo25(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo25 *r)
3280 if (ndr_flags & NDR_SCALARS) {
3281 NDR_CHECK(ndr_pull_align(ndr, 5));
3282 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3283 NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3284 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3286 if (ndr_flags & NDR_BUFFERS) {
3287 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3289 return NDR_ERR_SUCCESS;
3292 _PUBLIC_ void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r)
3294 ndr_print_struct(ndr, name, "samr_UserInfo25");
3295 ndr->depth++;
3296 ndr_print_samr_UserInfo21(ndr, "info", &r->info);
3297 ndr_print_samr_CryptPasswordEx(ndr, "password", &r->password);
3298 ndr->depth--;
3301 static enum ndr_err_code ndr_push_samr_UserInfo26(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo26 *r)
3303 if (ndr_flags & NDR_SCALARS) {
3304 NDR_CHECK(ndr_push_align(ndr, 1));
3305 NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3306 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
3307 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3309 if (ndr_flags & NDR_BUFFERS) {
3311 return NDR_ERR_SUCCESS;
3314 static enum ndr_err_code ndr_pull_samr_UserInfo26(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo26 *r)
3316 if (ndr_flags & NDR_SCALARS) {
3317 NDR_CHECK(ndr_pull_align(ndr, 1));
3318 NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3319 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3320 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3322 if (ndr_flags & NDR_BUFFERS) {
3324 return NDR_ERR_SUCCESS;
3327 _PUBLIC_ void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r)
3329 ndr_print_struct(ndr, name, "samr_UserInfo26");
3330 ndr->depth++;
3331 ndr_print_samr_CryptPasswordEx(ndr, "password", &r->password);
3332 ndr_print_uint8(ndr, "password_expired", r->password_expired);
3333 ndr->depth--;
3336 static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_flags, const union samr_UserInfo *r)
3338 if (ndr_flags & NDR_SCALARS) {
3339 int level = ndr_push_get_switch_value(ndr, r);
3340 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
3341 NDR_CHECK(ndr_push_union_align(ndr, 5));
3342 switch (level) {
3343 case 1: {
3344 NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1));
3345 break; }
3347 case 2: {
3348 NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2));
3349 break; }
3351 case 3: {
3352 NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3));
3353 break; }
3355 case 4: {
3356 NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4));
3357 break; }
3359 case 5: {
3360 NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5));
3361 break; }
3363 case 6: {
3364 NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6));
3365 break; }
3367 case 7: {
3368 NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7));
3369 break; }
3371 case 8: {
3372 NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8));
3373 break; }
3375 case 9: {
3376 NDR_CHECK(ndr_push_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9));
3377 break; }
3379 case 10: {
3380 NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10));
3381 break; }
3383 case 11: {
3384 NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11));
3385 break; }
3387 case 12: {
3388 NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12));
3389 break; }
3391 case 13: {
3392 NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13));
3393 break; }
3395 case 14: {
3396 NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14));
3397 break; }
3399 case 16: {
3400 NDR_CHECK(ndr_push_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16));
3401 break; }
3403 case 17: {
3404 NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17));
3405 break; }
3407 case 18: {
3408 NDR_CHECK(ndr_push_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18));
3409 break; }
3411 case 20: {
3412 NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20));
3413 break; }
3415 case 21: {
3416 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21));
3417 break; }
3419 case 23: {
3420 NDR_CHECK(ndr_push_samr_UserInfo23(ndr, NDR_SCALARS, &r->info23));
3421 break; }
3423 case 24: {
3424 NDR_CHECK(ndr_push_samr_UserInfo24(ndr, NDR_SCALARS, &r->info24));
3425 break; }
3427 case 25: {
3428 NDR_CHECK(ndr_push_samr_UserInfo25(ndr, NDR_SCALARS, &r->info25));
3429 break; }
3431 case 26: {
3432 NDR_CHECK(ndr_push_samr_UserInfo26(ndr, NDR_SCALARS, &r->info26));
3433 break; }
3435 default:
3436 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3439 if (ndr_flags & NDR_BUFFERS) {
3440 int level = ndr_push_get_switch_value(ndr, r);
3441 switch (level) {
3442 case 1:
3443 NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1));
3444 break;
3446 case 2:
3447 NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2));
3448 break;
3450 case 3:
3451 NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3));
3452 break;
3454 case 4:
3455 NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4));
3456 break;
3458 case 5:
3459 NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5));
3460 break;
3462 case 6:
3463 NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6));
3464 break;
3466 case 7:
3467 NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7));
3468 break;
3470 case 8:
3471 NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8));
3472 break;
3474 case 9:
3475 break;
3477 case 10:
3478 NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10));
3479 break;
3481 case 11:
3482 NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11));
3483 break;
3485 case 12:
3486 NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12));
3487 break;
3489 case 13:
3490 NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13));
3491 break;
3493 case 14:
3494 NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14));
3495 break;
3497 case 16:
3498 break;
3500 case 17:
3501 break;
3503 case 18:
3504 break;
3506 case 20:
3507 NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20));
3508 break;
3510 case 21:
3511 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21));
3512 break;
3514 case 23:
3515 NDR_CHECK(ndr_push_samr_UserInfo23(ndr, NDR_BUFFERS, &r->info23));
3516 break;
3518 case 24:
3519 break;
3521 case 25:
3522 NDR_CHECK(ndr_push_samr_UserInfo25(ndr, NDR_BUFFERS, &r->info25));
3523 break;
3525 case 26:
3526 break;
3528 default:
3529 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3532 return NDR_ERR_SUCCESS;
3535 static enum ndr_err_code ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_flags, union samr_UserInfo *r)
3537 int level;
3538 uint16_t _level;
3539 level = ndr_pull_get_switch_value(ndr, r);
3540 if (ndr_flags & NDR_SCALARS) {
3541 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3542 if (_level != level) {
3543 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3545 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3546 switch (level) {
3547 case 1: {
3548 NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1));
3549 break; }
3551 case 2: {
3552 NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2));
3553 break; }
3555 case 3: {
3556 NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3));
3557 break; }
3559 case 4: {
3560 NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4));
3561 break; }
3563 case 5: {
3564 NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5));
3565 break; }
3567 case 6: {
3568 NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6));
3569 break; }
3571 case 7: {
3572 NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7));
3573 break; }
3575 case 8: {
3576 NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8));
3577 break; }
3579 case 9: {
3580 NDR_CHECK(ndr_pull_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9));
3581 break; }
3583 case 10: {
3584 NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10));
3585 break; }
3587 case 11: {
3588 NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11));
3589 break; }
3591 case 12: {
3592 NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12));
3593 break; }
3595 case 13: {
3596 NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13));
3597 break; }
3599 case 14: {
3600 NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14));
3601 break; }
3603 case 16: {
3604 NDR_CHECK(ndr_pull_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16));
3605 break; }
3607 case 17: {
3608 NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17));
3609 break; }
3611 case 18: {
3612 NDR_CHECK(ndr_pull_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18));
3613 break; }
3615 case 20: {
3616 NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20));
3617 break; }
3619 case 21: {
3620 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21));
3621 break; }
3623 case 23: {
3624 NDR_CHECK(ndr_pull_samr_UserInfo23(ndr, NDR_SCALARS, &r->info23));
3625 break; }
3627 case 24: {
3628 NDR_CHECK(ndr_pull_samr_UserInfo24(ndr, NDR_SCALARS, &r->info24));
3629 break; }
3631 case 25: {
3632 NDR_CHECK(ndr_pull_samr_UserInfo25(ndr, NDR_SCALARS, &r->info25));
3633 break; }
3635 case 26: {
3636 NDR_CHECK(ndr_pull_samr_UserInfo26(ndr, NDR_SCALARS, &r->info26));
3637 break; }
3639 default:
3640 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3643 if (ndr_flags & NDR_BUFFERS) {
3644 switch (level) {
3645 case 1:
3646 NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1));
3647 break;
3649 case 2:
3650 NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2));
3651 break;
3653 case 3:
3654 NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3));
3655 break;
3657 case 4:
3658 NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4));
3659 break;
3661 case 5:
3662 NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5));
3663 break;
3665 case 6:
3666 NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6));
3667 break;
3669 case 7:
3670 NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7));
3671 break;
3673 case 8:
3674 NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8));
3675 break;
3677 case 9:
3678 break;
3680 case 10:
3681 NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10));
3682 break;
3684 case 11:
3685 NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11));
3686 break;
3688 case 12:
3689 NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12));
3690 break;
3692 case 13:
3693 NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13));
3694 break;
3696 case 14:
3697 NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14));
3698 break;
3700 case 16:
3701 break;
3703 case 17:
3704 break;
3706 case 18:
3707 break;
3709 case 20:
3710 NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20));
3711 break;
3713 case 21:
3714 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21));
3715 break;
3717 case 23:
3718 NDR_CHECK(ndr_pull_samr_UserInfo23(ndr, NDR_BUFFERS, &r->info23));
3719 break;
3721 case 24:
3722 break;
3724 case 25:
3725 NDR_CHECK(ndr_pull_samr_UserInfo25(ndr, NDR_BUFFERS, &r->info25));
3726 break;
3728 case 26:
3729 break;
3731 default:
3732 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3735 return NDR_ERR_SUCCESS;
3738 _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r)
3740 int level;
3741 level = ndr_print_get_switch_value(ndr, r);
3742 ndr_print_union(ndr, name, level, "samr_UserInfo");
3743 switch (level) {
3744 case 1:
3745 ndr_print_samr_UserInfo1(ndr, "info1", &r->info1);
3746 break;
3748 case 2:
3749 ndr_print_samr_UserInfo2(ndr, "info2", &r->info2);
3750 break;
3752 case 3:
3753 ndr_print_samr_UserInfo3(ndr, "info3", &r->info3);
3754 break;
3756 case 4:
3757 ndr_print_samr_UserInfo4(ndr, "info4", &r->info4);
3758 break;
3760 case 5:
3761 ndr_print_samr_UserInfo5(ndr, "info5", &r->info5);
3762 break;
3764 case 6:
3765 ndr_print_samr_UserInfo6(ndr, "info6", &r->info6);
3766 break;
3768 case 7:
3769 ndr_print_samr_UserInfo7(ndr, "info7", &r->info7);
3770 break;
3772 case 8:
3773 ndr_print_samr_UserInfo8(ndr, "info8", &r->info8);
3774 break;
3776 case 9:
3777 ndr_print_samr_UserInfo9(ndr, "info9", &r->info9);
3778 break;
3780 case 10:
3781 ndr_print_samr_UserInfo10(ndr, "info10", &r->info10);
3782 break;
3784 case 11:
3785 ndr_print_samr_UserInfo11(ndr, "info11", &r->info11);
3786 break;
3788 case 12:
3789 ndr_print_samr_UserInfo12(ndr, "info12", &r->info12);
3790 break;
3792 case 13:
3793 ndr_print_samr_UserInfo13(ndr, "info13", &r->info13);
3794 break;
3796 case 14:
3797 ndr_print_samr_UserInfo14(ndr, "info14", &r->info14);
3798 break;
3800 case 16:
3801 ndr_print_samr_UserInfo16(ndr, "info16", &r->info16);
3802 break;
3804 case 17:
3805 ndr_print_samr_UserInfo17(ndr, "info17", &r->info17);
3806 break;
3808 case 18:
3809 ndr_print_samr_UserInfo18(ndr, "info18", &r->info18);
3810 break;
3812 case 20:
3813 ndr_print_samr_UserInfo20(ndr, "info20", &r->info20);
3814 break;
3816 case 21:
3817 ndr_print_samr_UserInfo21(ndr, "info21", &r->info21);
3818 break;
3820 case 23:
3821 ndr_print_samr_UserInfo23(ndr, "info23", &r->info23);
3822 break;
3824 case 24:
3825 ndr_print_samr_UserInfo24(ndr, "info24", &r->info24);
3826 break;
3828 case 25:
3829 ndr_print_samr_UserInfo25(ndr, "info25", &r->info25);
3830 break;
3832 case 26:
3833 ndr_print_samr_UserInfo26(ndr, "info26", &r->info26);
3834 break;
3836 default:
3837 ndr_print_bad_level(ndr, name, level);
3841 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r)
3843 if (ndr_flags & NDR_SCALARS) {
3844 NDR_CHECK(ndr_push_align(ndr, 4));
3845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
3846 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
3847 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3849 if (ndr_flags & NDR_BUFFERS) {
3851 return NDR_ERR_SUCCESS;
3854 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r)
3856 if (ndr_flags & NDR_SCALARS) {
3857 NDR_CHECK(ndr_pull_align(ndr, 4));
3858 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3859 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
3860 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3862 if (ndr_flags & NDR_BUFFERS) {
3864 return NDR_ERR_SUCCESS;
3867 _PUBLIC_ void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r)
3869 ndr_print_struct(ndr, name, "samr_RidWithAttribute");
3870 ndr->depth++;
3871 ndr_print_uint32(ndr, "rid", r->rid);
3872 ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes);
3873 ndr->depth--;
3876 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttributeArray *r)
3878 uint32_t cntr_rids_1;
3879 if (ndr_flags & NDR_SCALARS) {
3880 NDR_CHECK(ndr_push_align(ndr, 5));
3881 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3882 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
3883 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3885 if (ndr_flags & NDR_BUFFERS) {
3886 if (r->rids) {
3887 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
3888 for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
3889 NDR_CHECK(ndr_push_samr_RidWithAttribute(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
3893 return NDR_ERR_SUCCESS;
3896 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r)
3898 uint32_t _ptr_rids;
3899 uint32_t cntr_rids_1;
3900 TALLOC_CTX *_mem_save_rids_0;
3901 TALLOC_CTX *_mem_save_rids_1;
3902 if (ndr_flags & NDR_SCALARS) {
3903 NDR_CHECK(ndr_pull_align(ndr, 5));
3904 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3905 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
3906 if (_ptr_rids) {
3907 NDR_PULL_ALLOC(ndr, r->rids);
3908 } else {
3909 r->rids = NULL;
3911 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3913 if (ndr_flags & NDR_BUFFERS) {
3914 if (r->rids) {
3915 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
3916 NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
3917 NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
3918 NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
3919 _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
3920 NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
3921 for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
3922 NDR_CHECK(ndr_pull_samr_RidWithAttribute(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
3924 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
3925 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
3927 if (r->rids) {
3928 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->count));
3931 return NDR_ERR_SUCCESS;
3934 _PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttributeArray *r)
3936 uint32_t cntr_rids_1;
3937 ndr_print_struct(ndr, name, "samr_RidWithAttributeArray");
3938 ndr->depth++;
3939 ndr_print_uint32(ndr, "count", r->count);
3940 ndr_print_ptr(ndr, "rids", r->rids);
3941 ndr->depth++;
3942 if (r->rids) {
3943 ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->count);
3944 ndr->depth++;
3945 for (cntr_rids_1=0;cntr_rids_1<r->count;cntr_rids_1++) {
3946 char *idx_1=NULL;
3947 if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) {
3948 ndr_print_samr_RidWithAttribute(ndr, "rids", &r->rids[cntr_rids_1]);
3949 free(idx_1);
3952 ndr->depth--;
3954 ndr->depth--;
3955 ndr->depth--;
3958 static enum ndr_err_code ndr_push_samr_DispEntryGeneral(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryGeneral *r)
3960 if (ndr_flags & NDR_SCALARS) {
3961 NDR_CHECK(ndr_push_align(ndr, 5));
3962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
3963 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
3964 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
3965 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
3966 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
3967 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
3968 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3970 if (ndr_flags & NDR_BUFFERS) {
3971 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
3972 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
3973 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
3975 return NDR_ERR_SUCCESS;
3978 static enum ndr_err_code ndr_pull_samr_DispEntryGeneral(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryGeneral *r)
3980 if (ndr_flags & NDR_SCALARS) {
3981 NDR_CHECK(ndr_pull_align(ndr, 5));
3982 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
3983 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3984 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
3985 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
3986 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
3987 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
3988 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3990 if (ndr_flags & NDR_BUFFERS) {
3991 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
3992 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
3993 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
3995 return NDR_ERR_SUCCESS;
3998 _PUBLIC_ void ndr_print_samr_DispEntryGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispEntryGeneral *r)
4000 ndr_print_struct(ndr, name, "samr_DispEntryGeneral");
4001 ndr->depth++;
4002 ndr_print_uint32(ndr, "idx", r->idx);
4003 ndr_print_uint32(ndr, "rid", r->rid);
4004 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
4005 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
4006 ndr_print_lsa_String(ndr, "description", &r->description);
4007 ndr_print_lsa_String(ndr, "full_name", &r->full_name);
4008 ndr->depth--;
4011 static enum ndr_err_code ndr_push_samr_DispInfoGeneral(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoGeneral *r)
4013 uint32_t cntr_entries_1;
4014 if (ndr_flags & NDR_SCALARS) {
4015 NDR_CHECK(ndr_push_align(ndr, 5));
4016 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4017 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4018 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4020 if (ndr_flags & NDR_BUFFERS) {
4021 if (r->entries) {
4022 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4023 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4024 NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4026 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4027 NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4031 return NDR_ERR_SUCCESS;
4034 static enum ndr_err_code ndr_pull_samr_DispInfoGeneral(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoGeneral *r)
4036 uint32_t _ptr_entries;
4037 uint32_t cntr_entries_1;
4038 TALLOC_CTX *_mem_save_entries_0;
4039 TALLOC_CTX *_mem_save_entries_1;
4040 if (ndr_flags & NDR_SCALARS) {
4041 NDR_CHECK(ndr_pull_align(ndr, 5));
4042 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4043 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4044 if (_ptr_entries) {
4045 NDR_PULL_ALLOC(ndr, r->entries);
4046 } else {
4047 r->entries = NULL;
4049 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4051 if (ndr_flags & NDR_BUFFERS) {
4052 if (r->entries) {
4053 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4054 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4055 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4056 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
4057 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4058 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4059 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4060 NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4062 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4063 NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4065 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4066 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4068 if (r->entries) {
4069 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4072 return NDR_ERR_SUCCESS;
4075 _PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispInfoGeneral *r)
4077 uint32_t cntr_entries_1;
4078 ndr_print_struct(ndr, name, "samr_DispInfoGeneral");
4079 ndr->depth++;
4080 ndr_print_uint32(ndr, "count", r->count);
4081 ndr_print_ptr(ndr, "entries", r->entries);
4082 ndr->depth++;
4083 if (r->entries) {
4084 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4085 ndr->depth++;
4086 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
4087 char *idx_1=NULL;
4088 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
4089 ndr_print_samr_DispEntryGeneral(ndr, "entries", &r->entries[cntr_entries_1]);
4090 free(idx_1);
4093 ndr->depth--;
4095 ndr->depth--;
4096 ndr->depth--;
4099 static enum ndr_err_code ndr_push_samr_DispEntryFull(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryFull *r)
4101 if (ndr_flags & NDR_SCALARS) {
4102 NDR_CHECK(ndr_push_align(ndr, 5));
4103 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4104 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4105 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
4106 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4107 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
4108 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4110 if (ndr_flags & NDR_BUFFERS) {
4111 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4112 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
4114 return NDR_ERR_SUCCESS;
4117 static enum ndr_err_code ndr_pull_samr_DispEntryFull(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryFull *r)
4119 if (ndr_flags & NDR_SCALARS) {
4120 NDR_CHECK(ndr_pull_align(ndr, 5));
4121 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4122 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4123 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
4124 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4125 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
4126 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4128 if (ndr_flags & NDR_BUFFERS) {
4129 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4130 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
4132 return NDR_ERR_SUCCESS;
4135 _PUBLIC_ void ndr_print_samr_DispEntryFull(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFull *r)
4137 ndr_print_struct(ndr, name, "samr_DispEntryFull");
4138 ndr->depth++;
4139 ndr_print_uint32(ndr, "idx", r->idx);
4140 ndr_print_uint32(ndr, "rid", r->rid);
4141 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
4142 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
4143 ndr_print_lsa_String(ndr, "description", &r->description);
4144 ndr->depth--;
4147 static enum ndr_err_code ndr_push_samr_DispInfoFull(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoFull *r)
4149 uint32_t cntr_entries_1;
4150 if (ndr_flags & NDR_SCALARS) {
4151 NDR_CHECK(ndr_push_align(ndr, 5));
4152 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4153 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4154 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4156 if (ndr_flags & NDR_BUFFERS) {
4157 if (r->entries) {
4158 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4159 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4160 NDR_CHECK(ndr_push_samr_DispEntryFull(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4162 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4163 NDR_CHECK(ndr_push_samr_DispEntryFull(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4167 return NDR_ERR_SUCCESS;
4170 static enum ndr_err_code ndr_pull_samr_DispInfoFull(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFull *r)
4172 uint32_t _ptr_entries;
4173 uint32_t cntr_entries_1;
4174 TALLOC_CTX *_mem_save_entries_0;
4175 TALLOC_CTX *_mem_save_entries_1;
4176 if (ndr_flags & NDR_SCALARS) {
4177 NDR_CHECK(ndr_pull_align(ndr, 5));
4178 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4179 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4180 if (_ptr_entries) {
4181 NDR_PULL_ALLOC(ndr, r->entries);
4182 } else {
4183 r->entries = NULL;
4185 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4187 if (ndr_flags & NDR_BUFFERS) {
4188 if (r->entries) {
4189 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4190 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4191 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4192 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
4193 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4194 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4195 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4196 NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4198 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4199 NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4201 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4204 if (r->entries) {
4205 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4208 return NDR_ERR_SUCCESS;
4211 _PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFull *r)
4213 uint32_t cntr_entries_1;
4214 ndr_print_struct(ndr, name, "samr_DispInfoFull");
4215 ndr->depth++;
4216 ndr_print_uint32(ndr, "count", r->count);
4217 ndr_print_ptr(ndr, "entries", r->entries);
4218 ndr->depth++;
4219 if (r->entries) {
4220 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4221 ndr->depth++;
4222 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
4223 char *idx_1=NULL;
4224 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
4225 ndr_print_samr_DispEntryFull(ndr, "entries", &r->entries[cntr_entries_1]);
4226 free(idx_1);
4229 ndr->depth--;
4231 ndr->depth--;
4232 ndr->depth--;
4235 static enum ndr_err_code ndr_push_samr_DispEntryFullGroup(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryFullGroup *r)
4237 if (ndr_flags & NDR_SCALARS) {
4238 NDR_CHECK(ndr_push_align(ndr, 5));
4239 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4240 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4241 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->acct_flags));
4242 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4243 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
4244 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4246 if (ndr_flags & NDR_BUFFERS) {
4247 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4248 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
4250 return NDR_ERR_SUCCESS;
4253 static enum ndr_err_code ndr_pull_samr_DispEntryFullGroup(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryFullGroup *r)
4255 if (ndr_flags & NDR_SCALARS) {
4256 NDR_CHECK(ndr_pull_align(ndr, 5));
4257 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4258 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4259 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->acct_flags));
4260 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4261 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
4262 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4264 if (ndr_flags & NDR_BUFFERS) {
4265 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4266 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
4268 return NDR_ERR_SUCCESS;
4271 _PUBLIC_ void ndr_print_samr_DispEntryFullGroup(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFullGroup *r)
4273 ndr_print_struct(ndr, name, "samr_DispEntryFullGroup");
4274 ndr->depth++;
4275 ndr_print_uint32(ndr, "idx", r->idx);
4276 ndr_print_uint32(ndr, "rid", r->rid);
4277 ndr_print_samr_GroupAttrs(ndr, "acct_flags", r->acct_flags);
4278 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
4279 ndr_print_lsa_String(ndr, "description", &r->description);
4280 ndr->depth--;
4283 static enum ndr_err_code ndr_push_samr_DispInfoFullGroups(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoFullGroups *r)
4285 uint32_t cntr_entries_1;
4286 if (ndr_flags & NDR_SCALARS) {
4287 NDR_CHECK(ndr_push_align(ndr, 5));
4288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4289 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4290 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4292 if (ndr_flags & NDR_BUFFERS) {
4293 if (r->entries) {
4294 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4295 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4296 NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4298 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4299 NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4303 return NDR_ERR_SUCCESS;
4306 static enum ndr_err_code ndr_pull_samr_DispInfoFullGroups(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFullGroups *r)
4308 uint32_t _ptr_entries;
4309 uint32_t cntr_entries_1;
4310 TALLOC_CTX *_mem_save_entries_0;
4311 TALLOC_CTX *_mem_save_entries_1;
4312 if (ndr_flags & NDR_SCALARS) {
4313 NDR_CHECK(ndr_pull_align(ndr, 5));
4314 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4315 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4316 if (_ptr_entries) {
4317 NDR_PULL_ALLOC(ndr, r->entries);
4318 } else {
4319 r->entries = NULL;
4321 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4323 if (ndr_flags & NDR_BUFFERS) {
4324 if (r->entries) {
4325 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4326 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4327 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4328 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
4329 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4330 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4331 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4332 NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4334 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4335 NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4337 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4338 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4340 if (r->entries) {
4341 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4344 return NDR_ERR_SUCCESS;
4347 _PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFullGroups *r)
4349 uint32_t cntr_entries_1;
4350 ndr_print_struct(ndr, name, "samr_DispInfoFullGroups");
4351 ndr->depth++;
4352 ndr_print_uint32(ndr, "count", r->count);
4353 ndr_print_ptr(ndr, "entries", r->entries);
4354 ndr->depth++;
4355 if (r->entries) {
4356 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4357 ndr->depth++;
4358 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
4359 char *idx_1=NULL;
4360 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
4361 ndr_print_samr_DispEntryFullGroup(ndr, "entries", &r->entries[cntr_entries_1]);
4362 free(idx_1);
4365 ndr->depth--;
4367 ndr->depth--;
4368 ndr->depth--;
4371 static enum ndr_err_code ndr_push_samr_DispEntryAscii(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryAscii *r)
4373 if (ndr_flags & NDR_SCALARS) {
4374 NDR_CHECK(ndr_push_align(ndr, 5));
4375 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4376 NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name));
4377 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4379 if (ndr_flags & NDR_BUFFERS) {
4380 NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name));
4382 return NDR_ERR_SUCCESS;
4385 static enum ndr_err_code ndr_pull_samr_DispEntryAscii(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryAscii *r)
4387 if (ndr_flags & NDR_SCALARS) {
4388 NDR_CHECK(ndr_pull_align(ndr, 5));
4389 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4390 NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name));
4391 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4393 if (ndr_flags & NDR_BUFFERS) {
4394 NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name));
4396 return NDR_ERR_SUCCESS;
4399 _PUBLIC_ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, const struct samr_DispEntryAscii *r)
4401 ndr_print_struct(ndr, name, "samr_DispEntryAscii");
4402 ndr->depth++;
4403 ndr_print_uint32(ndr, "idx", r->idx);
4404 ndr_print_lsa_AsciiStringLarge(ndr, "account_name", &r->account_name);
4405 ndr->depth--;
4408 static enum ndr_err_code ndr_push_samr_DispInfoAscii(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoAscii *r)
4410 uint32_t cntr_entries_1;
4411 if (ndr_flags & NDR_SCALARS) {
4412 NDR_CHECK(ndr_push_align(ndr, 5));
4413 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4414 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4415 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4417 if (ndr_flags & NDR_BUFFERS) {
4418 if (r->entries) {
4419 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4420 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4421 NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4423 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4424 NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4428 return NDR_ERR_SUCCESS;
4431 static enum ndr_err_code ndr_pull_samr_DispInfoAscii(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoAscii *r)
4433 uint32_t _ptr_entries;
4434 uint32_t cntr_entries_1;
4435 TALLOC_CTX *_mem_save_entries_0;
4436 TALLOC_CTX *_mem_save_entries_1;
4437 if (ndr_flags & NDR_SCALARS) {
4438 NDR_CHECK(ndr_pull_align(ndr, 5));
4439 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4440 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4441 if (_ptr_entries) {
4442 NDR_PULL_ALLOC(ndr, r->entries);
4443 } else {
4444 r->entries = NULL;
4446 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4448 if (ndr_flags & NDR_BUFFERS) {
4449 if (r->entries) {
4450 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4451 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4452 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4453 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
4454 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4455 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4456 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4457 NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4459 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4460 NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4462 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4463 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4465 if (r->entries) {
4466 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4469 return NDR_ERR_SUCCESS;
4472 _PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r)
4474 uint32_t cntr_entries_1;
4475 ndr_print_struct(ndr, name, "samr_DispInfoAscii");
4476 ndr->depth++;
4477 ndr_print_uint32(ndr, "count", r->count);
4478 ndr_print_ptr(ndr, "entries", r->entries);
4479 ndr->depth++;
4480 if (r->entries) {
4481 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4482 ndr->depth++;
4483 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
4484 char *idx_1=NULL;
4485 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
4486 ndr_print_samr_DispEntryAscii(ndr, "entries", &r->entries[cntr_entries_1]);
4487 free(idx_1);
4490 ndr->depth--;
4492 ndr->depth--;
4493 ndr->depth--;
4496 static enum ndr_err_code ndr_push_samr_DispInfo(struct ndr_push *ndr, int ndr_flags, const union samr_DispInfo *r)
4498 if (ndr_flags & NDR_SCALARS) {
4499 int level = ndr_push_get_switch_value(ndr, r);
4500 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
4501 NDR_CHECK(ndr_push_union_align(ndr, 5));
4502 switch (level) {
4503 case 1: {
4504 NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1));
4505 break; }
4507 case 2: {
4508 NDR_CHECK(ndr_push_samr_DispInfoFull(ndr, NDR_SCALARS, &r->info2));
4509 break; }
4511 case 3: {
4512 NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr, NDR_SCALARS, &r->info3));
4513 break; }
4515 case 4: {
4516 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info4));
4517 break; }
4519 case 5: {
4520 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info5));
4521 break; }
4523 default:
4524 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4527 if (ndr_flags & NDR_BUFFERS) {
4528 int level = ndr_push_get_switch_value(ndr, r);
4529 switch (level) {
4530 case 1:
4531 NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_BUFFERS, &r->info1));
4532 break;
4534 case 2:
4535 NDR_CHECK(ndr_push_samr_DispInfoFull(ndr, NDR_BUFFERS, &r->info2));
4536 break;
4538 case 3:
4539 NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr, NDR_BUFFERS, &r->info3));
4540 break;
4542 case 4:
4543 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info4));
4544 break;
4546 case 5:
4547 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info5));
4548 break;
4550 default:
4551 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4554 return NDR_ERR_SUCCESS;
4557 static enum ndr_err_code ndr_pull_samr_DispInfo(struct ndr_pull *ndr, int ndr_flags, union samr_DispInfo *r)
4559 int level;
4560 uint16_t _level;
4561 level = ndr_pull_get_switch_value(ndr, r);
4562 if (ndr_flags & NDR_SCALARS) {
4563 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
4564 if (_level != level) {
4565 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
4567 NDR_CHECK(ndr_pull_union_align(ndr, 5));
4568 switch (level) {
4569 case 1: {
4570 NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1));
4571 break; }
4573 case 2: {
4574 NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr, NDR_SCALARS, &r->info2));
4575 break; }
4577 case 3: {
4578 NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr, NDR_SCALARS, &r->info3));
4579 break; }
4581 case 4: {
4582 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info4));
4583 break; }
4585 case 5: {
4586 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info5));
4587 break; }
4589 default:
4590 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4593 if (ndr_flags & NDR_BUFFERS) {
4594 switch (level) {
4595 case 1:
4596 NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr, NDR_BUFFERS, &r->info1));
4597 break;
4599 case 2:
4600 NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr, NDR_BUFFERS, &r->info2));
4601 break;
4603 case 3:
4604 NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr, NDR_BUFFERS, &r->info3));
4605 break;
4607 case 4:
4608 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info4));
4609 break;
4611 case 5:
4612 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info5));
4613 break;
4615 default:
4616 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4619 return NDR_ERR_SUCCESS;
4622 _PUBLIC_ void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r)
4624 int level;
4625 level = ndr_print_get_switch_value(ndr, r);
4626 ndr_print_union(ndr, name, level, "samr_DispInfo");
4627 switch (level) {
4628 case 1:
4629 ndr_print_samr_DispInfoGeneral(ndr, "info1", &r->info1);
4630 break;
4632 case 2:
4633 ndr_print_samr_DispInfoFull(ndr, "info2", &r->info2);
4634 break;
4636 case 3:
4637 ndr_print_samr_DispInfoFullGroups(ndr, "info3", &r->info3);
4638 break;
4640 case 4:
4641 ndr_print_samr_DispInfoAscii(ndr, "info4", &r->info4);
4642 break;
4644 case 5:
4645 ndr_print_samr_DispInfoAscii(ndr, "info5", &r->info5);
4646 break;
4648 default:
4649 ndr_print_bad_level(ndr, name, level);
4653 static enum ndr_err_code ndr_push_samr_PwInfo(struct ndr_push *ndr, int ndr_flags, const struct samr_PwInfo *r)
4655 if (ndr_flags & NDR_SCALARS) {
4656 NDR_CHECK(ndr_push_align(ndr, 4));
4657 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
4658 NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties));
4659 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4661 if (ndr_flags & NDR_BUFFERS) {
4663 return NDR_ERR_SUCCESS;
4666 static enum ndr_err_code ndr_pull_samr_PwInfo(struct ndr_pull *ndr, int ndr_flags, struct samr_PwInfo *r)
4668 if (ndr_flags & NDR_SCALARS) {
4669 NDR_CHECK(ndr_pull_align(ndr, 4));
4670 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
4671 NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties));
4672 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4674 if (ndr_flags & NDR_BUFFERS) {
4676 return NDR_ERR_SUCCESS;
4679 _PUBLIC_ void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r)
4681 ndr_print_struct(ndr, name, "samr_PwInfo");
4682 ndr->depth++;
4683 ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
4684 ndr_print_samr_PasswordProperties(ndr, "password_properties", r->password_properties);
4685 ndr->depth--;
4688 static enum ndr_err_code ndr_push_samr_ConnectVersion(struct ndr_push *ndr, int ndr_flags, enum samr_ConnectVersion r)
4690 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
4691 return NDR_ERR_SUCCESS;
4694 static enum ndr_err_code ndr_pull_samr_ConnectVersion(struct ndr_pull *ndr, int ndr_flags, enum samr_ConnectVersion *r)
4696 uint32_t v;
4697 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
4698 *r = v;
4699 return NDR_ERR_SUCCESS;
4702 _PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r)
4704 const char *val = NULL;
4706 switch (r) {
4707 case SAMR_CONNECT_PRE_W2K: val = "SAMR_CONNECT_PRE_W2K"; break;
4708 case SAMR_CONNECT_W2K: val = "SAMR_CONNECT_W2K"; break;
4709 case SAMR_CONNECT_AFTER_W2K: val = "SAMR_CONNECT_AFTER_W2K"; break;
4711 ndr_print_enum(ndr, name, "ENUM", val, r);
4714 _PUBLIC_ enum ndr_err_code ndr_push_samPwdChangeReason(struct ndr_push *ndr, int ndr_flags, enum samPwdChangeReason r)
4716 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
4717 return NDR_ERR_SUCCESS;
4720 _PUBLIC_ enum ndr_err_code ndr_pull_samPwdChangeReason(struct ndr_pull *ndr, int ndr_flags, enum samPwdChangeReason *r)
4722 uint32_t v;
4723 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
4724 *r = v;
4725 return NDR_ERR_SUCCESS;
4728 _PUBLIC_ void ndr_print_samPwdChangeReason(struct ndr_print *ndr, const char *name, enum samPwdChangeReason r)
4730 const char *val = NULL;
4732 switch (r) {
4733 case SAM_PWD_CHANGE_NO_ERROR: val = "SAM_PWD_CHANGE_NO_ERROR"; break;
4734 case SAM_PWD_CHANGE_PASSWORD_TOO_SHORT: val = "SAM_PWD_CHANGE_PASSWORD_TOO_SHORT"; break;
4735 case SAM_PWD_CHANGE_PWD_IN_HISTORY: val = "SAM_PWD_CHANGE_PWD_IN_HISTORY"; break;
4736 case SAM_PWD_CHANGE_USERNAME_IN_PASSWORD: val = "SAM_PWD_CHANGE_USERNAME_IN_PASSWORD"; break;
4737 case SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD: val = "SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD"; break;
4738 case SAM_PWD_CHANGE_NOT_COMPLEX: val = "SAM_PWD_CHANGE_NOT_COMPLEX"; break;
4739 case SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT: val = "SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT"; break;
4740 case SAM_PWD_CHANGE_FAILED_BY_FILTER: val = "SAM_PWD_CHANGE_FAILED_BY_FILTER"; break;
4741 case SAM_PWD_CHANGE_PASSWORD_TOO_LONG: val = "SAM_PWD_CHANGE_PASSWORD_TOO_LONG"; break;
4743 ndr_print_enum(ndr, name, "ENUM", val, r);
4746 static enum ndr_err_code ndr_push_userPwdChangeFailureInformation(struct ndr_push *ndr, int ndr_flags, const struct userPwdChangeFailureInformation *r)
4748 if (ndr_flags & NDR_SCALARS) {
4749 NDR_CHECK(ndr_push_align(ndr, 5));
4750 NDR_CHECK(ndr_push_samPwdChangeReason(ndr, NDR_SCALARS, r->extendedFailureReason));
4751 NDR_CHECK(ndr_push_unique_ptr(ndr, r->filterModuleName));
4752 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4754 if (ndr_flags & NDR_BUFFERS) {
4755 if (r->filterModuleName) {
4756 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->filterModuleName, CH_UTF16)));
4757 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4758 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->filterModuleName, CH_UTF16)));
4759 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->filterModuleName, ndr_charset_length(r->filterModuleName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4762 return NDR_ERR_SUCCESS;
4765 static enum ndr_err_code ndr_pull_userPwdChangeFailureInformation(struct ndr_pull *ndr, int ndr_flags, struct userPwdChangeFailureInformation *r)
4767 uint32_t _ptr_filterModuleName;
4768 TALLOC_CTX *_mem_save_filterModuleName_0;
4769 if (ndr_flags & NDR_SCALARS) {
4770 NDR_CHECK(ndr_pull_align(ndr, 5));
4771 NDR_CHECK(ndr_pull_samPwdChangeReason(ndr, NDR_SCALARS, &r->extendedFailureReason));
4772 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_filterModuleName));
4773 if (_ptr_filterModuleName) {
4774 NDR_PULL_ALLOC(ndr, r->filterModuleName);
4775 } else {
4776 r->filterModuleName = NULL;
4778 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4780 if (ndr_flags & NDR_BUFFERS) {
4781 if (r->filterModuleName) {
4782 _mem_save_filterModuleName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4783 NDR_PULL_SET_MEM_CTX(ndr, r->filterModuleName, 0);
4784 NDR_CHECK(ndr_pull_array_size(ndr, &r->filterModuleName));
4785 NDR_CHECK(ndr_pull_array_length(ndr, &r->filterModuleName));
4786 if (ndr_get_array_length(ndr, &r->filterModuleName) > ndr_get_array_size(ndr, &r->filterModuleName)) {
4787 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->filterModuleName), ndr_get_array_length(ndr, &r->filterModuleName));
4789 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->filterModuleName), sizeof(uint16_t)));
4790 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->filterModuleName, ndr_get_array_length(ndr, &r->filterModuleName), sizeof(uint16_t), CH_UTF16));
4791 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filterModuleName_0, 0);
4794 return NDR_ERR_SUCCESS;
4797 _PUBLIC_ void ndr_print_userPwdChangeFailureInformation(struct ndr_print *ndr, const char *name, const struct userPwdChangeFailureInformation *r)
4799 ndr_print_struct(ndr, name, "userPwdChangeFailureInformation");
4800 ndr->depth++;
4801 ndr_print_samPwdChangeReason(ndr, "extendedFailureReason", r->extendedFailureReason);
4802 ndr_print_ptr(ndr, "filterModuleName", r->filterModuleName);
4803 ndr->depth++;
4804 if (r->filterModuleName) {
4805 ndr_print_string(ndr, "filterModuleName", r->filterModuleName);
4807 ndr->depth--;
4808 ndr->depth--;
4811 static enum ndr_err_code ndr_push_samr_ConnectInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_ConnectInfo1 *r)
4813 if (ndr_flags & NDR_SCALARS) {
4814 NDR_CHECK(ndr_push_align(ndr, 4));
4815 NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->client_version));
4816 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
4817 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4819 if (ndr_flags & NDR_BUFFERS) {
4821 return NDR_ERR_SUCCESS;
4824 static enum ndr_err_code ndr_pull_samr_ConnectInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_ConnectInfo1 *r)
4826 if (ndr_flags & NDR_SCALARS) {
4827 NDR_CHECK(ndr_pull_align(ndr, 4));
4828 NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->client_version));
4829 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
4830 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4832 if (ndr_flags & NDR_BUFFERS) {
4834 return NDR_ERR_SUCCESS;
4837 _PUBLIC_ void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r)
4839 ndr_print_struct(ndr, name, "samr_ConnectInfo1");
4840 ndr->depth++;
4841 ndr_print_samr_ConnectVersion(ndr, "client_version", r->client_version);
4842 ndr_print_uint32(ndr, "unknown2", r->unknown2);
4843 ndr->depth--;
4846 static enum ndr_err_code ndr_push_samr_ConnectInfo(struct ndr_push *ndr, int ndr_flags, const union samr_ConnectInfo *r)
4848 if (ndr_flags & NDR_SCALARS) {
4849 int level = ndr_push_get_switch_value(ndr, r);
4850 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4851 NDR_CHECK(ndr_push_union_align(ndr, 4));
4852 switch (level) {
4853 case 1: {
4854 NDR_CHECK(ndr_push_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1));
4855 break; }
4857 default:
4858 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4861 if (ndr_flags & NDR_BUFFERS) {
4862 int level = ndr_push_get_switch_value(ndr, r);
4863 switch (level) {
4864 case 1:
4865 break;
4867 default:
4868 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4871 return NDR_ERR_SUCCESS;
4874 static enum ndr_err_code ndr_pull_samr_ConnectInfo(struct ndr_pull *ndr, int ndr_flags, union samr_ConnectInfo *r)
4876 int level;
4877 uint32_t _level;
4878 level = ndr_pull_get_switch_value(ndr, r);
4879 if (ndr_flags & NDR_SCALARS) {
4880 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4881 if (_level != level) {
4882 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
4884 NDR_CHECK(ndr_pull_union_align(ndr, 4));
4885 switch (level) {
4886 case 1: {
4887 NDR_CHECK(ndr_pull_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1));
4888 break; }
4890 default:
4891 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4894 if (ndr_flags & NDR_BUFFERS) {
4895 switch (level) {
4896 case 1:
4897 break;
4899 default:
4900 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4903 return NDR_ERR_SUCCESS;
4906 _PUBLIC_ void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r)
4908 int level;
4909 level = ndr_print_get_switch_value(ndr, r);
4910 ndr_print_union(ndr, name, level, "samr_ConnectInfo");
4911 switch (level) {
4912 case 1:
4913 ndr_print_samr_ConnectInfo1(ndr, "info1", &r->info1);
4914 break;
4916 default:
4917 ndr_print_bad_level(ndr, name, level);
4921 static enum ndr_err_code ndr_push_samr_ValidateFieldsPresent(struct ndr_push *ndr, int ndr_flags, uint32_t r)
4923 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
4924 return NDR_ERR_SUCCESS;
4927 static enum ndr_err_code ndr_pull_samr_ValidateFieldsPresent(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
4929 uint32_t v;
4930 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
4931 *r = v;
4932 return NDR_ERR_SUCCESS;
4935 _PUBLIC_ void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r)
4937 ndr_print_uint32(ndr, name, r);
4938 ndr->depth++;
4939 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET", SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET, r);
4940 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME", SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME, r);
4941 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_LOCKOUT_TIME", SAMR_VALIDATE_FIELD_LOCKOUT_TIME, r);
4942 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT", SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT, r);
4943 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH, r);
4944 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY, r);
4945 ndr->depth--;
4948 static enum ndr_err_code ndr_push_samr_ValidatePasswordLevel(struct ndr_push *ndr, int ndr_flags, enum samr_ValidatePasswordLevel r)
4950 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
4951 return NDR_ERR_SUCCESS;
4954 static enum ndr_err_code ndr_pull_samr_ValidatePasswordLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidatePasswordLevel *r)
4956 uint16_t v;
4957 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
4958 *r = v;
4959 return NDR_ERR_SUCCESS;
4962 _PUBLIC_ void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const char *name, enum samr_ValidatePasswordLevel r)
4964 const char *val = NULL;
4966 switch (r) {
4967 case NetValidateAuthentication: val = "NetValidateAuthentication"; break;
4968 case NetValidatePasswordChange: val = "NetValidatePasswordChange"; break;
4969 case NetValidatePasswordReset: val = "NetValidatePasswordReset"; break;
4971 ndr_print_enum(ndr, name, "ENUM", val, r);
4974 static enum ndr_err_code ndr_push_samr_ValidationStatus(struct ndr_push *ndr, int ndr_flags, enum samr_ValidationStatus r)
4976 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
4977 return NDR_ERR_SUCCESS;
4980 static enum ndr_err_code ndr_pull_samr_ValidationStatus(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidationStatus *r)
4982 uint16_t v;
4983 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
4984 *r = v;
4985 return NDR_ERR_SUCCESS;
4988 _PUBLIC_ void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char *name, enum samr_ValidationStatus r)
4990 const char *val = NULL;
4992 switch (r) {
4993 case SAMR_VALIDATION_STATUS_SUCCESS: val = "SAMR_VALIDATION_STATUS_SUCCESS"; break;
4994 case SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE: val = "SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE"; break;
4995 case SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT: val = "SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT"; break;
4996 case SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED: val = "SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED"; break;
4997 case SAMR_VALIDATION_STATUS_BAD_PASSWORD: val = "SAMR_VALIDATION_STATUS_BAD_PASSWORD"; break;
4998 case SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT: val = "SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT"; break;
4999 case SAMR_VALIDATION_STATUS_PWD_TOO_SHORT: val = "SAMR_VALIDATION_STATUS_PWD_TOO_SHORT"; break;
5000 case SAMR_VALIDATION_STATUS_PWD_TOO_LONG: val = "SAMR_VALIDATION_STATUS_PWD_TOO_LONG"; break;
5001 case SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH: val = "SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH"; break;
5002 case SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT: val = "SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT"; break;
5003 case SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR: val = "SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR"; break;
5005 ndr_print_enum(ndr, name, "ENUM", val, r);
5008 static enum ndr_err_code ndr_push_samr_ValidationBlob(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidationBlob *r)
5010 if (ndr_flags & NDR_SCALARS) {
5011 NDR_CHECK(ndr_push_align(ndr, 5));
5012 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
5013 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
5014 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5016 if (ndr_flags & NDR_BUFFERS) {
5017 if (r->data) {
5018 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
5019 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
5022 return NDR_ERR_SUCCESS;
5025 static enum ndr_err_code ndr_pull_samr_ValidationBlob(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidationBlob *r)
5027 uint32_t _ptr_data;
5028 TALLOC_CTX *_mem_save_data_0;
5029 if (ndr_flags & NDR_SCALARS) {
5030 NDR_CHECK(ndr_pull_align(ndr, 5));
5031 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
5032 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
5033 if (_ptr_data) {
5034 NDR_PULL_ALLOC(ndr, r->data);
5035 } else {
5036 r->data = NULL;
5038 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5040 if (ndr_flags & NDR_BUFFERS) {
5041 if (r->data) {
5042 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
5043 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
5044 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
5045 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
5046 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
5047 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
5049 if (r->data) {
5050 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
5053 return NDR_ERR_SUCCESS;
5056 _PUBLIC_ void ndr_print_samr_ValidationBlob(struct ndr_print *ndr, const char *name, const struct samr_ValidationBlob *r)
5058 ndr_print_struct(ndr, name, "samr_ValidationBlob");
5059 ndr->depth++;
5060 ndr_print_uint32(ndr, "length", r->length);
5061 ndr_print_ptr(ndr, "data", r->data);
5062 ndr->depth++;
5063 if (r->data) {
5064 ndr_print_array_uint8(ndr, "data", r->data, r->length);
5066 ndr->depth--;
5067 ndr->depth--;
5070 static enum ndr_err_code ndr_push_samr_ValidatePasswordInfo(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordInfo *r)
5072 uint32_t cntr_pwd_history_1;
5073 if (ndr_flags & NDR_SCALARS) {
5074 NDR_CHECK(ndr_push_align(ndr, 8));
5075 NDR_CHECK(ndr_push_samr_ValidateFieldsPresent(ndr, NDR_SCALARS, r->fields_present));
5076 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_password_change));
5077 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->bad_password_time));
5078 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->lockout_time));
5079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pwd_count));
5080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwd_history_len));
5081 NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwd_history));
5082 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5084 if (ndr_flags & NDR_BUFFERS) {
5085 if (r->pwd_history) {
5086 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->pwd_history_len));
5087 for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
5088 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->pwd_history[cntr_pwd_history_1]));
5090 for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
5091 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->pwd_history[cntr_pwd_history_1]));
5095 return NDR_ERR_SUCCESS;
5098 static enum ndr_err_code ndr_pull_samr_ValidatePasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordInfo *r)
5100 uint32_t _ptr_pwd_history;
5101 uint32_t cntr_pwd_history_1;
5102 TALLOC_CTX *_mem_save_pwd_history_0;
5103 TALLOC_CTX *_mem_save_pwd_history_1;
5104 if (ndr_flags & NDR_SCALARS) {
5105 NDR_CHECK(ndr_pull_align(ndr, 8));
5106 NDR_CHECK(ndr_pull_samr_ValidateFieldsPresent(ndr, NDR_SCALARS, &r->fields_present));
5107 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_password_change));
5108 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->bad_password_time));
5109 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->lockout_time));
5110 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_pwd_count));
5111 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwd_history_len));
5112 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwd_history));
5113 if (_ptr_pwd_history) {
5114 NDR_PULL_ALLOC(ndr, r->pwd_history);
5115 } else {
5116 r->pwd_history = NULL;
5118 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5120 if (ndr_flags & NDR_BUFFERS) {
5121 if (r->pwd_history) {
5122 _mem_save_pwd_history_0 = NDR_PULL_GET_MEM_CTX(ndr);
5123 NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0);
5124 NDR_CHECK(ndr_pull_array_size(ndr, &r->pwd_history));
5125 NDR_PULL_ALLOC_N(ndr, r->pwd_history, ndr_get_array_size(ndr, &r->pwd_history));
5126 _mem_save_pwd_history_1 = NDR_PULL_GET_MEM_CTX(ndr);
5127 NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0);
5128 for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
5129 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->pwd_history[cntr_pwd_history_1]));
5131 for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
5132 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->pwd_history[cntr_pwd_history_1]));
5134 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwd_history_1, 0);
5135 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwd_history_0, 0);
5137 if (r->pwd_history) {
5138 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->pwd_history, r->pwd_history_len));
5141 return NDR_ERR_SUCCESS;
5144 _PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordInfo *r)
5146 uint32_t cntr_pwd_history_1;
5147 ndr_print_struct(ndr, name, "samr_ValidatePasswordInfo");
5148 ndr->depth++;
5149 ndr_print_samr_ValidateFieldsPresent(ndr, "fields_present", r->fields_present);
5150 ndr_print_NTTIME_hyper(ndr, "last_password_change", r->last_password_change);
5151 ndr_print_NTTIME_hyper(ndr, "bad_password_time", r->bad_password_time);
5152 ndr_print_NTTIME_hyper(ndr, "lockout_time", r->lockout_time);
5153 ndr_print_uint32(ndr, "bad_pwd_count", r->bad_pwd_count);
5154 ndr_print_uint32(ndr, "pwd_history_len", r->pwd_history_len);
5155 ndr_print_ptr(ndr, "pwd_history", r->pwd_history);
5156 ndr->depth++;
5157 if (r->pwd_history) {
5158 ndr->print(ndr, "%s: ARRAY(%d)", "pwd_history", (int)r->pwd_history_len);
5159 ndr->depth++;
5160 for (cntr_pwd_history_1=0;cntr_pwd_history_1<r->pwd_history_len;cntr_pwd_history_1++) {
5161 char *idx_1=NULL;
5162 if (asprintf(&idx_1, "[%d]", cntr_pwd_history_1) != -1) {
5163 ndr_print_samr_ValidationBlob(ndr, "pwd_history", &r->pwd_history[cntr_pwd_history_1]);
5164 free(idx_1);
5167 ndr->depth--;
5169 ndr->depth--;
5170 ndr->depth--;
5173 static enum ndr_err_code ndr_push_samr_ValidatePasswordRepCtr(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordRepCtr *r)
5175 if (ndr_flags & NDR_SCALARS) {
5176 NDR_CHECK(ndr_push_align(ndr, 8));
5177 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5178 NDR_CHECK(ndr_push_samr_ValidationStatus(ndr, NDR_SCALARS, r->status));
5179 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5181 if (ndr_flags & NDR_BUFFERS) {
5182 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5184 return NDR_ERR_SUCCESS;
5187 static enum ndr_err_code ndr_pull_samr_ValidatePasswordRepCtr(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordRepCtr *r)
5189 if (ndr_flags & NDR_SCALARS) {
5190 NDR_CHECK(ndr_pull_align(ndr, 8));
5191 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5192 NDR_CHECK(ndr_pull_samr_ValidationStatus(ndr, NDR_SCALARS, &r->status));
5193 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5195 if (ndr_flags & NDR_BUFFERS) {
5196 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5198 return NDR_ERR_SUCCESS;
5201 _PUBLIC_ void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordRepCtr *r)
5203 ndr_print_struct(ndr, name, "samr_ValidatePasswordRepCtr");
5204 ndr->depth++;
5205 ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5206 ndr_print_samr_ValidationStatus(ndr, "status", r->status);
5207 ndr->depth--;
5210 static enum ndr_err_code ndr_push_samr_ValidatePasswordRep(struct ndr_push *ndr, int ndr_flags, const union samr_ValidatePasswordRep *r)
5212 if (ndr_flags & NDR_SCALARS) {
5213 int level = ndr_push_get_switch_value(ndr, r);
5214 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
5215 NDR_CHECK(ndr_push_union_align(ndr, 8));
5216 switch (level) {
5217 case 1: {
5218 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1));
5219 break; }
5221 case 2: {
5222 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr2));
5223 break; }
5225 case 3: {
5226 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr3));
5227 break; }
5229 default:
5230 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5233 if (ndr_flags & NDR_BUFFERS) {
5234 int level = ndr_push_get_switch_value(ndr, r);
5235 switch (level) {
5236 case 1:
5237 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr1));
5238 break;
5240 case 2:
5241 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr2));
5242 break;
5244 case 3:
5245 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr3));
5246 break;
5248 default:
5249 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5252 return NDR_ERR_SUCCESS;
5255 static enum ndr_err_code ndr_pull_samr_ValidatePasswordRep(struct ndr_pull *ndr, int ndr_flags, union samr_ValidatePasswordRep *r)
5257 int level;
5258 uint16_t _level;
5259 level = ndr_pull_get_switch_value(ndr, r);
5260 if (ndr_flags & NDR_SCALARS) {
5261 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
5262 if (_level != level) {
5263 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5265 NDR_CHECK(ndr_pull_union_align(ndr, 8));
5266 switch (level) {
5267 case 1: {
5268 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1));
5269 break; }
5271 case 2: {
5272 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr2));
5273 break; }
5275 case 3: {
5276 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr3));
5277 break; }
5279 default:
5280 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5283 if (ndr_flags & NDR_BUFFERS) {
5284 switch (level) {
5285 case 1:
5286 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr1));
5287 break;
5289 case 2:
5290 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr2));
5291 break;
5293 case 3:
5294 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr3));
5295 break;
5297 default:
5298 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5301 return NDR_ERR_SUCCESS;
5304 _PUBLIC_ void ndr_print_samr_ValidatePasswordRep(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordRep *r)
5306 int level;
5307 level = ndr_print_get_switch_value(ndr, r);
5308 ndr_print_union(ndr, name, level, "samr_ValidatePasswordRep");
5309 switch (level) {
5310 case 1:
5311 ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr1", &r->ctr1);
5312 break;
5314 case 2:
5315 ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr2", &r->ctr2);
5316 break;
5318 case 3:
5319 ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr3", &r->ctr3);
5320 break;
5322 default:
5323 ndr_print_bad_level(ndr, name, level);
5327 static enum ndr_err_code ndr_push_samr_ValidatePasswordReq3(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq3 *r)
5329 if (ndr_flags & NDR_SCALARS) {
5330 NDR_CHECK(ndr_push_align(ndr, 8));
5331 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5332 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5333 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5334 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5335 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pwd_must_change_at_next_logon));
5336 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->clear_lockout));
5337 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5339 if (ndr_flags & NDR_BUFFERS) {
5340 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5341 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5342 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5343 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5345 return NDR_ERR_SUCCESS;
5348 static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq3(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq3 *r)
5350 if (ndr_flags & NDR_SCALARS) {
5351 NDR_CHECK(ndr_pull_align(ndr, 8));
5352 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5353 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5354 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5355 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5356 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pwd_must_change_at_next_logon));
5357 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->clear_lockout));
5358 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5360 if (ndr_flags & NDR_BUFFERS) {
5361 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5362 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5363 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5364 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5366 return NDR_ERR_SUCCESS;
5369 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq3(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq3 *r)
5371 ndr_print_struct(ndr, name, "samr_ValidatePasswordReq3");
5372 ndr->depth++;
5373 ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5374 ndr_print_lsa_StringLarge(ndr, "password", &r->password);
5375 ndr_print_lsa_StringLarge(ndr, "account", &r->account);
5376 ndr_print_samr_ValidationBlob(ndr, "hash", &r->hash);
5377 ndr_print_uint8(ndr, "pwd_must_change_at_next_logon", r->pwd_must_change_at_next_logon);
5378 ndr_print_uint8(ndr, "clear_lockout", r->clear_lockout);
5379 ndr->depth--;
5382 static enum ndr_err_code ndr_push_samr_ValidatePasswordReq2(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq2 *r)
5384 if (ndr_flags & NDR_SCALARS) {
5385 NDR_CHECK(ndr_push_align(ndr, 8));
5386 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5387 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5388 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5389 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5390 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched));
5391 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5393 if (ndr_flags & NDR_BUFFERS) {
5394 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5395 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5396 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5397 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5399 return NDR_ERR_SUCCESS;
5402 static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq2(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq2 *r)
5404 if (ndr_flags & NDR_SCALARS) {
5405 NDR_CHECK(ndr_pull_align(ndr, 8));
5406 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5407 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5408 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5409 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5410 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched));
5411 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5413 if (ndr_flags & NDR_BUFFERS) {
5414 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5415 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5416 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5417 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5419 return NDR_ERR_SUCCESS;
5422 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq2(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq2 *r)
5424 ndr_print_struct(ndr, name, "samr_ValidatePasswordReq2");
5425 ndr->depth++;
5426 ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5427 ndr_print_lsa_StringLarge(ndr, "password", &r->password);
5428 ndr_print_lsa_StringLarge(ndr, "account", &r->account);
5429 ndr_print_samr_ValidationBlob(ndr, "hash", &r->hash);
5430 ndr_print_uint8(ndr, "password_matched", r->password_matched);
5431 ndr->depth--;
5434 static enum ndr_err_code ndr_push_samr_ValidatePasswordReq1(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq1 *r)
5436 if (ndr_flags & NDR_SCALARS) {
5437 NDR_CHECK(ndr_push_align(ndr, 8));
5438 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5439 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched));
5440 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5442 if (ndr_flags & NDR_BUFFERS) {
5443 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5445 return NDR_ERR_SUCCESS;
5448 static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq1(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq1 *r)
5450 if (ndr_flags & NDR_SCALARS) {
5451 NDR_CHECK(ndr_pull_align(ndr, 8));
5452 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5453 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched));
5454 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5456 if (ndr_flags & NDR_BUFFERS) {
5457 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5459 return NDR_ERR_SUCCESS;
5462 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq1(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq1 *r)
5464 ndr_print_struct(ndr, name, "samr_ValidatePasswordReq1");
5465 ndr->depth++;
5466 ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5467 ndr_print_uint8(ndr, "password_matched", r->password_matched);
5468 ndr->depth--;
5471 static enum ndr_err_code ndr_push_samr_ValidatePasswordReq(struct ndr_push *ndr, int ndr_flags, const union samr_ValidatePasswordReq *r)
5473 if (ndr_flags & NDR_SCALARS) {
5474 int level = ndr_push_get_switch_value(ndr, r);
5475 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
5476 NDR_CHECK(ndr_push_union_align(ndr, 8));
5477 switch (level) {
5478 case 1: {
5479 NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1));
5480 break; }
5482 case 2: {
5483 NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr, NDR_SCALARS, &r->req2));
5484 break; }
5486 case 3: {
5487 NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr, NDR_SCALARS, &r->req3));
5488 break; }
5490 default:
5491 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5494 if (ndr_flags & NDR_BUFFERS) {
5495 int level = ndr_push_get_switch_value(ndr, r);
5496 switch (level) {
5497 case 1:
5498 NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_BUFFERS, &r->req1));
5499 break;
5501 case 2:
5502 NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr, NDR_BUFFERS, &r->req2));
5503 break;
5505 case 3:
5506 NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr, NDR_BUFFERS, &r->req3));
5507 break;
5509 default:
5510 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5513 return NDR_ERR_SUCCESS;
5516 static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq(struct ndr_pull *ndr, int ndr_flags, union samr_ValidatePasswordReq *r)
5518 int level;
5519 uint16_t _level;
5520 level = ndr_pull_get_switch_value(ndr, r);
5521 if (ndr_flags & NDR_SCALARS) {
5522 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
5523 if (_level != level) {
5524 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5526 NDR_CHECK(ndr_pull_union_align(ndr, 8));
5527 switch (level) {
5528 case 1: {
5529 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1));
5530 break; }
5532 case 2: {
5533 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr, NDR_SCALARS, &r->req2));
5534 break; }
5536 case 3: {
5537 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr, NDR_SCALARS, &r->req3));
5538 break; }
5540 default:
5541 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5544 if (ndr_flags & NDR_BUFFERS) {
5545 switch (level) {
5546 case 1:
5547 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr, NDR_BUFFERS, &r->req1));
5548 break;
5550 case 2:
5551 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr, NDR_BUFFERS, &r->req2));
5552 break;
5554 case 3:
5555 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr, NDR_BUFFERS, &r->req3));
5556 break;
5558 default:
5559 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5562 return NDR_ERR_SUCCESS;
5565 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordReq *r)
5567 int level;
5568 level = ndr_print_get_switch_value(ndr, r);
5569 ndr_print_union(ndr, name, level, "samr_ValidatePasswordReq");
5570 switch (level) {
5571 case 1:
5572 ndr_print_samr_ValidatePasswordReq1(ndr, "req1", &r->req1);
5573 break;
5575 case 2:
5576 ndr_print_samr_ValidatePasswordReq2(ndr, "req2", &r->req2);
5577 break;
5579 case 3:
5580 ndr_print_samr_ValidatePasswordReq3(ndr, "req3", &r->req3);
5581 break;
5583 default:
5584 ndr_print_bad_level(ndr, name, level);
5588 static enum ndr_err_code ndr_push_samr_Connect(struct ndr_push *ndr, int flags, const struct samr_Connect *r)
5590 if (flags & NDR_IN) {
5591 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
5592 if (r->in.system_name) {
5593 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
5595 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
5597 if (flags & NDR_OUT) {
5598 if (r->out.connect_handle == NULL) {
5599 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5601 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
5602 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5604 return NDR_ERR_SUCCESS;
5607 static enum ndr_err_code ndr_pull_samr_Connect(struct ndr_pull *ndr, int flags, struct samr_Connect *r)
5609 uint32_t _ptr_system_name;
5610 TALLOC_CTX *_mem_save_system_name_0;
5611 TALLOC_CTX *_mem_save_connect_handle_0;
5612 if (flags & NDR_IN) {
5613 ZERO_STRUCT(r->out);
5615 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
5616 if (_ptr_system_name) {
5617 NDR_PULL_ALLOC(ndr, r->in.system_name);
5618 } else {
5619 r->in.system_name = NULL;
5621 if (r->in.system_name) {
5622 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5623 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
5624 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
5625 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
5627 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
5628 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
5629 ZERO_STRUCTP(r->out.connect_handle);
5631 if (flags & NDR_OUT) {
5632 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5633 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
5635 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5636 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
5637 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
5638 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
5639 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5641 return NDR_ERR_SUCCESS;
5644 _PUBLIC_ void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect *r)
5646 ndr_print_struct(ndr, name, "samr_Connect");
5647 ndr->depth++;
5648 if (flags & NDR_SET_VALUES) {
5649 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5651 if (flags & NDR_IN) {
5652 ndr_print_struct(ndr, "in", "samr_Connect");
5653 ndr->depth++;
5654 ndr_print_ptr(ndr, "system_name", r->in.system_name);
5655 ndr->depth++;
5656 if (r->in.system_name) {
5657 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
5659 ndr->depth--;
5660 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
5661 ndr->depth--;
5663 if (flags & NDR_OUT) {
5664 ndr_print_struct(ndr, "out", "samr_Connect");
5665 ndr->depth++;
5666 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
5667 ndr->depth++;
5668 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
5669 ndr->depth--;
5670 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5671 ndr->depth--;
5673 ndr->depth--;
5676 _PUBLIC_ enum ndr_err_code ndr_push_samr_Close(struct ndr_push *ndr, int flags, const struct samr_Close *r)
5678 if (flags & NDR_IN) {
5679 if (r->in.handle == NULL) {
5680 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5682 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5684 if (flags & NDR_OUT) {
5685 if (r->out.handle == NULL) {
5686 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5688 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5689 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5691 return NDR_ERR_SUCCESS;
5694 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Close(struct ndr_pull *ndr, int flags, struct samr_Close *r)
5696 TALLOC_CTX *_mem_save_handle_0;
5697 if (flags & NDR_IN) {
5698 ZERO_STRUCT(r->out);
5700 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5701 NDR_PULL_ALLOC(ndr, r->in.handle);
5703 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5704 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5705 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5707 NDR_PULL_ALLOC(ndr, r->out.handle);
5708 *r->out.handle = *r->in.handle;
5710 if (flags & NDR_OUT) {
5711 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5712 NDR_PULL_ALLOC(ndr, r->out.handle);
5714 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5715 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5716 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5717 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5718 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5720 return NDR_ERR_SUCCESS;
5723 _PUBLIC_ void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, const struct samr_Close *r)
5725 ndr_print_struct(ndr, name, "samr_Close");
5726 ndr->depth++;
5727 if (flags & NDR_SET_VALUES) {
5728 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5730 if (flags & NDR_IN) {
5731 ndr_print_struct(ndr, "in", "samr_Close");
5732 ndr->depth++;
5733 ndr_print_ptr(ndr, "handle", r->in.handle);
5734 ndr->depth++;
5735 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5736 ndr->depth--;
5737 ndr->depth--;
5739 if (flags & NDR_OUT) {
5740 ndr_print_struct(ndr, "out", "samr_Close");
5741 ndr->depth++;
5742 ndr_print_ptr(ndr, "handle", r->out.handle);
5743 ndr->depth++;
5744 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5745 ndr->depth--;
5746 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5747 ndr->depth--;
5749 ndr->depth--;
5752 static enum ndr_err_code ndr_push_samr_SetSecurity(struct ndr_push *ndr, int flags, const struct samr_SetSecurity *r)
5754 if (flags & NDR_IN) {
5755 if (r->in.handle == NULL) {
5756 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5758 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5759 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5760 if (r->in.sdbuf == NULL) {
5761 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5763 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5765 if (flags & NDR_OUT) {
5766 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5768 return NDR_ERR_SUCCESS;
5771 static enum ndr_err_code ndr_pull_samr_SetSecurity(struct ndr_pull *ndr, int flags, struct samr_SetSecurity *r)
5773 TALLOC_CTX *_mem_save_handle_0;
5774 TALLOC_CTX *_mem_save_sdbuf_0;
5775 if (flags & NDR_IN) {
5776 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5777 NDR_PULL_ALLOC(ndr, r->in.handle);
5779 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5780 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5781 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5782 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5783 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5784 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5785 NDR_PULL_ALLOC(ndr, r->in.sdbuf);
5787 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5788 NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5789 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5790 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5792 if (flags & NDR_OUT) {
5793 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5795 return NDR_ERR_SUCCESS;
5798 _PUBLIC_ void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetSecurity *r)
5800 ndr_print_struct(ndr, name, "samr_SetSecurity");
5801 ndr->depth++;
5802 if (flags & NDR_SET_VALUES) {
5803 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5805 if (flags & NDR_IN) {
5806 ndr_print_struct(ndr, "in", "samr_SetSecurity");
5807 ndr->depth++;
5808 ndr_print_ptr(ndr, "handle", r->in.handle);
5809 ndr->depth++;
5810 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5811 ndr->depth--;
5812 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5813 ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf);
5814 ndr->depth++;
5815 ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf);
5816 ndr->depth--;
5817 ndr->depth--;
5819 if (flags & NDR_OUT) {
5820 ndr_print_struct(ndr, "out", "samr_SetSecurity");
5821 ndr->depth++;
5822 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5823 ndr->depth--;
5825 ndr->depth--;
5828 static enum ndr_err_code ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int flags, const struct samr_QuerySecurity *r)
5830 if (flags & NDR_IN) {
5831 if (r->in.handle == NULL) {
5832 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5834 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5835 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5837 if (flags & NDR_OUT) {
5838 if (r->out.sdbuf == NULL) {
5839 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5841 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf));
5842 if (*r->out.sdbuf) {
5843 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5845 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5847 return NDR_ERR_SUCCESS;
5850 static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int flags, struct samr_QuerySecurity *r)
5852 uint32_t _ptr_sdbuf;
5853 TALLOC_CTX *_mem_save_handle_0;
5854 TALLOC_CTX *_mem_save_sdbuf_0;
5855 TALLOC_CTX *_mem_save_sdbuf_1;
5856 if (flags & NDR_IN) {
5857 ZERO_STRUCT(r->out);
5859 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5860 NDR_PULL_ALLOC(ndr, r->in.handle);
5862 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5863 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5864 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5865 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5866 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5867 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5868 ZERO_STRUCTP(r->out.sdbuf);
5870 if (flags & NDR_OUT) {
5871 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5872 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5874 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5875 NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5876 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf));
5877 if (_ptr_sdbuf) {
5878 NDR_PULL_ALLOC(ndr, *r->out.sdbuf);
5879 } else {
5880 *r->out.sdbuf = NULL;
5882 if (*r->out.sdbuf) {
5883 _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr);
5884 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0);
5885 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5886 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0);
5888 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5889 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5891 return NDR_ERR_SUCCESS;
5894 _PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_QuerySecurity *r)
5896 ndr_print_struct(ndr, name, "samr_QuerySecurity");
5897 ndr->depth++;
5898 if (flags & NDR_SET_VALUES) {
5899 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5901 if (flags & NDR_IN) {
5902 ndr_print_struct(ndr, "in", "samr_QuerySecurity");
5903 ndr->depth++;
5904 ndr_print_ptr(ndr, "handle", r->in.handle);
5905 ndr->depth++;
5906 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5907 ndr->depth--;
5908 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5909 ndr->depth--;
5911 if (flags & NDR_OUT) {
5912 ndr_print_struct(ndr, "out", "samr_QuerySecurity");
5913 ndr->depth++;
5914 ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
5915 ndr->depth++;
5916 ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf);
5917 ndr->depth++;
5918 if (*r->out.sdbuf) {
5919 ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf);
5921 ndr->depth--;
5922 ndr->depth--;
5923 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5924 ndr->depth--;
5926 ndr->depth--;
5929 static enum ndr_err_code ndr_push_samr_Shutdown(struct ndr_push *ndr, int flags, const struct samr_Shutdown *r)
5931 if (flags & NDR_IN) {
5932 if (r->in.connect_handle == NULL) {
5933 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5935 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
5937 if (flags & NDR_OUT) {
5938 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5940 return NDR_ERR_SUCCESS;
5943 static enum ndr_err_code ndr_pull_samr_Shutdown(struct ndr_pull *ndr, int flags, struct samr_Shutdown *r)
5945 TALLOC_CTX *_mem_save_connect_handle_0;
5946 if (flags & NDR_IN) {
5947 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5948 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
5950 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5951 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
5952 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
5953 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
5955 if (flags & NDR_OUT) {
5956 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5958 return NDR_ERR_SUCCESS;
5961 _PUBLIC_ void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, const struct samr_Shutdown *r)
5963 ndr_print_struct(ndr, name, "samr_Shutdown");
5964 ndr->depth++;
5965 if (flags & NDR_SET_VALUES) {
5966 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5968 if (flags & NDR_IN) {
5969 ndr_print_struct(ndr, "in", "samr_Shutdown");
5970 ndr->depth++;
5971 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
5972 ndr->depth++;
5973 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
5974 ndr->depth--;
5975 ndr->depth--;
5977 if (flags & NDR_OUT) {
5978 ndr_print_struct(ndr, "out", "samr_Shutdown");
5979 ndr->depth++;
5980 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5981 ndr->depth--;
5983 ndr->depth--;
5986 static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int flags, const struct samr_LookupDomain *r)
5988 if (flags & NDR_IN) {
5989 if (r->in.connect_handle == NULL) {
5990 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5992 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
5993 if (r->in.domain_name == NULL) {
5994 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5996 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
5998 if (flags & NDR_OUT) {
5999 if (r->out.sid == NULL) {
6000 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6002 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sid));
6003 if (*r->out.sid) {
6004 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
6006 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6008 return NDR_ERR_SUCCESS;
6011 static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int flags, struct samr_LookupDomain *r)
6013 uint32_t _ptr_sid;
6014 TALLOC_CTX *_mem_save_connect_handle_0;
6015 TALLOC_CTX *_mem_save_domain_name_0;
6016 TALLOC_CTX *_mem_save_sid_0;
6017 TALLOC_CTX *_mem_save_sid_1;
6018 if (flags & NDR_IN) {
6019 ZERO_STRUCT(r->out);
6021 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6022 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6024 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6025 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6026 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6027 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6028 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6029 NDR_PULL_ALLOC(ndr, r->in.domain_name);
6031 _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6032 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, LIBNDR_FLAG_REF_ALLOC);
6033 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
6034 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, LIBNDR_FLAG_REF_ALLOC);
6035 NDR_PULL_ALLOC(ndr, r->out.sid);
6036 ZERO_STRUCTP(r->out.sid);
6038 if (flags & NDR_OUT) {
6039 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6040 NDR_PULL_ALLOC(ndr, r->out.sid);
6042 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6043 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
6044 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
6045 if (_ptr_sid) {
6046 NDR_PULL_ALLOC(ndr, *r->out.sid);
6047 } else {
6048 *r->out.sid = NULL;
6050 if (*r->out.sid) {
6051 _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr);
6052 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, 0);
6053 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
6054 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, 0);
6056 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6057 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6059 return NDR_ERR_SUCCESS;
6062 _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupDomain *r)
6064 ndr_print_struct(ndr, name, "samr_LookupDomain");
6065 ndr->depth++;
6066 if (flags & NDR_SET_VALUES) {
6067 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6069 if (flags & NDR_IN) {
6070 ndr_print_struct(ndr, "in", "samr_LookupDomain");
6071 ndr->depth++;
6072 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6073 ndr->depth++;
6074 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6075 ndr->depth--;
6076 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
6077 ndr->depth++;
6078 ndr_print_lsa_String(ndr, "domain_name", r->in.domain_name);
6079 ndr->depth--;
6080 ndr->depth--;
6082 if (flags & NDR_OUT) {
6083 ndr_print_struct(ndr, "out", "samr_LookupDomain");
6084 ndr->depth++;
6085 ndr_print_ptr(ndr, "sid", r->out.sid);
6086 ndr->depth++;
6087 ndr_print_ptr(ndr, "sid", *r->out.sid);
6088 ndr->depth++;
6089 if (*r->out.sid) {
6090 ndr_print_dom_sid2(ndr, "sid", *r->out.sid);
6092 ndr->depth--;
6093 ndr->depth--;
6094 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6095 ndr->depth--;
6097 ndr->depth--;
6100 static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int flags, const struct samr_EnumDomains *r)
6102 if (flags & NDR_IN) {
6103 if (r->in.connect_handle == NULL) {
6104 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6106 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6107 if (r->in.resume_handle == NULL) {
6108 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6110 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6111 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
6113 if (flags & NDR_OUT) {
6114 if (r->out.resume_handle == NULL) {
6115 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6117 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6118 if (r->out.sam == NULL) {
6119 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6121 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
6122 if (*r->out.sam) {
6123 NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6125 if (r->out.num_entries == NULL) {
6126 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6128 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
6129 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6131 return NDR_ERR_SUCCESS;
6134 static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int flags, struct samr_EnumDomains *r)
6136 uint32_t _ptr_sam;
6137 TALLOC_CTX *_mem_save_connect_handle_0;
6138 TALLOC_CTX *_mem_save_resume_handle_0;
6139 TALLOC_CTX *_mem_save_sam_0;
6140 TALLOC_CTX *_mem_save_sam_1;
6141 TALLOC_CTX *_mem_save_num_entries_0;
6142 if (flags & NDR_IN) {
6143 ZERO_STRUCT(r->out);
6145 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6146 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6148 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6149 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6150 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6151 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6152 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6153 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6155 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6156 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6157 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6158 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6159 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
6160 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6161 *r->out.resume_handle = *r->in.resume_handle;
6162 NDR_PULL_ALLOC(ndr, r->out.sam);
6163 ZERO_STRUCTP(r->out.sam);
6164 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6165 ZERO_STRUCTP(r->out.num_entries);
6167 if (flags & NDR_OUT) {
6168 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6169 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6171 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6172 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6173 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6174 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6175 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6176 NDR_PULL_ALLOC(ndr, r->out.sam);
6178 _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
6179 NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
6180 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
6181 if (_ptr_sam) {
6182 NDR_PULL_ALLOC(ndr, *r->out.sam);
6183 } else {
6184 *r->out.sam = NULL;
6186 if (*r->out.sam) {
6187 _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
6188 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
6189 NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6190 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
6192 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
6193 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6194 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6196 _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6197 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
6198 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
6199 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
6200 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6202 return NDR_ERR_SUCCESS;
6205 _PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomains *r)
6207 ndr_print_struct(ndr, name, "samr_EnumDomains");
6208 ndr->depth++;
6209 if (flags & NDR_SET_VALUES) {
6210 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6212 if (flags & NDR_IN) {
6213 ndr_print_struct(ndr, "in", "samr_EnumDomains");
6214 ndr->depth++;
6215 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6216 ndr->depth++;
6217 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6218 ndr->depth--;
6219 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6220 ndr->depth++;
6221 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6222 ndr->depth--;
6223 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
6224 ndr->depth--;
6226 if (flags & NDR_OUT) {
6227 ndr_print_struct(ndr, "out", "samr_EnumDomains");
6228 ndr->depth++;
6229 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6230 ndr->depth++;
6231 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6232 ndr->depth--;
6233 ndr_print_ptr(ndr, "sam", r->out.sam);
6234 ndr->depth++;
6235 ndr_print_ptr(ndr, "sam", *r->out.sam);
6236 ndr->depth++;
6237 if (*r->out.sam) {
6238 ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
6240 ndr->depth--;
6241 ndr->depth--;
6242 ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
6243 ndr->depth++;
6244 ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
6245 ndr->depth--;
6246 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6247 ndr->depth--;
6249 ndr->depth--;
6252 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenDomain(struct ndr_push *ndr, int flags, const struct samr_OpenDomain *r)
6254 if (flags & NDR_IN) {
6255 if (r->in.connect_handle == NULL) {
6256 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6258 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6259 NDR_CHECK(ndr_push_samr_DomainAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6260 if (r->in.sid == NULL) {
6261 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6263 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6265 if (flags & NDR_OUT) {
6266 if (r->out.domain_handle == NULL) {
6267 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6269 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.domain_handle));
6270 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6272 return NDR_ERR_SUCCESS;
6275 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, int flags, struct samr_OpenDomain *r)
6277 TALLOC_CTX *_mem_save_connect_handle_0;
6278 TALLOC_CTX *_mem_save_sid_0;
6279 TALLOC_CTX *_mem_save_domain_handle_0;
6280 if (flags & NDR_IN) {
6281 ZERO_STRUCT(r->out);
6283 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6284 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6286 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6287 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6288 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6289 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6290 NDR_CHECK(ndr_pull_samr_DomainAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6291 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6292 NDR_PULL_ALLOC(ndr, r->in.sid);
6294 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6295 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
6296 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6297 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6298 NDR_PULL_ALLOC(ndr, r->out.domain_handle);
6299 ZERO_STRUCTP(r->out.domain_handle);
6301 if (flags & NDR_OUT) {
6302 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6303 NDR_PULL_ALLOC(ndr, r->out.domain_handle);
6305 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6306 NDR_PULL_SET_MEM_CTX(ndr, r->out.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6307 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.domain_handle));
6308 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6309 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6311 return NDR_ERR_SUCCESS;
6314 _PUBLIC_ void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenDomain *r)
6316 ndr_print_struct(ndr, name, "samr_OpenDomain");
6317 ndr->depth++;
6318 if (flags & NDR_SET_VALUES) {
6319 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6321 if (flags & NDR_IN) {
6322 ndr_print_struct(ndr, "in", "samr_OpenDomain");
6323 ndr->depth++;
6324 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6325 ndr->depth++;
6326 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6327 ndr->depth--;
6328 ndr_print_samr_DomainAccessMask(ndr, "access_mask", r->in.access_mask);
6329 ndr_print_ptr(ndr, "sid", r->in.sid);
6330 ndr->depth++;
6331 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
6332 ndr->depth--;
6333 ndr->depth--;
6335 if (flags & NDR_OUT) {
6336 ndr_print_struct(ndr, "out", "samr_OpenDomain");
6337 ndr->depth++;
6338 ndr_print_ptr(ndr, "domain_handle", r->out.domain_handle);
6339 ndr->depth++;
6340 ndr_print_policy_handle(ndr, "domain_handle", r->out.domain_handle);
6341 ndr->depth--;
6342 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6343 ndr->depth--;
6345 ndr->depth--;
6348 static enum ndr_err_code ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, int flags, const struct samr_QueryDomainInfo *r)
6350 if (flags & NDR_IN) {
6351 if (r->in.domain_handle == NULL) {
6352 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6354 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6355 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
6357 if (flags & NDR_OUT) {
6358 if (r->out.info == NULL) {
6359 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6361 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
6362 if (*r->out.info) {
6363 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
6364 NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
6366 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6368 return NDR_ERR_SUCCESS;
6371 static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo *r)
6373 uint32_t _ptr_info;
6374 TALLOC_CTX *_mem_save_domain_handle_0;
6375 TALLOC_CTX *_mem_save_info_0;
6376 TALLOC_CTX *_mem_save_info_1;
6377 if (flags & NDR_IN) {
6378 ZERO_STRUCT(r->out);
6380 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6381 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6383 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6384 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6385 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6386 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6387 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
6388 NDR_PULL_ALLOC(ndr, r->out.info);
6389 ZERO_STRUCTP(r->out.info);
6391 if (flags & NDR_OUT) {
6392 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6393 NDR_PULL_ALLOC(ndr, r->out.info);
6395 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6396 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
6397 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
6398 if (_ptr_info) {
6399 NDR_PULL_ALLOC(ndr, *r->out.info);
6400 } else {
6401 *r->out.info = NULL;
6403 if (*r->out.info) {
6404 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
6405 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
6406 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
6407 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
6408 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
6410 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6411 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6413 return NDR_ERR_SUCCESS;
6416 _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo *r)
6418 ndr_print_struct(ndr, name, "samr_QueryDomainInfo");
6419 ndr->depth++;
6420 if (flags & NDR_SET_VALUES) {
6421 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6423 if (flags & NDR_IN) {
6424 ndr_print_struct(ndr, "in", "samr_QueryDomainInfo");
6425 ndr->depth++;
6426 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6427 ndr->depth++;
6428 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6429 ndr->depth--;
6430 ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
6431 ndr->depth--;
6433 if (flags & NDR_OUT) {
6434 ndr_print_struct(ndr, "out", "samr_QueryDomainInfo");
6435 ndr->depth++;
6436 ndr_print_ptr(ndr, "info", r->out.info);
6437 ndr->depth++;
6438 ndr_print_ptr(ndr, "info", *r->out.info);
6439 ndr->depth++;
6440 if (*r->out.info) {
6441 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
6442 ndr_print_samr_DomainInfo(ndr, "info", *r->out.info);
6444 ndr->depth--;
6445 ndr->depth--;
6446 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6447 ndr->depth--;
6449 ndr->depth--;
6452 static enum ndr_err_code ndr_push_samr_SetDomainInfo(struct ndr_push *ndr, int flags, const struct samr_SetDomainInfo *r)
6454 if (flags & NDR_IN) {
6455 if (r->in.domain_handle == NULL) {
6456 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6458 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6459 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
6460 if (r->in.info == NULL) {
6461 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6463 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
6464 NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6466 if (flags & NDR_OUT) {
6467 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6469 return NDR_ERR_SUCCESS;
6472 static enum ndr_err_code ndr_pull_samr_SetDomainInfo(struct ndr_pull *ndr, int flags, struct samr_SetDomainInfo *r)
6474 TALLOC_CTX *_mem_save_domain_handle_0;
6475 TALLOC_CTX *_mem_save_info_0;
6476 if (flags & NDR_IN) {
6477 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6478 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6480 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6481 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6482 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6483 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6484 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
6485 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6486 NDR_PULL_ALLOC(ndr, r->in.info);
6488 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6489 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6490 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
6491 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6492 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6494 if (flags & NDR_OUT) {
6495 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6497 return NDR_ERR_SUCCESS;
6500 _PUBLIC_ void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDomainInfo *r)
6502 ndr_print_struct(ndr, name, "samr_SetDomainInfo");
6503 ndr->depth++;
6504 if (flags & NDR_SET_VALUES) {
6505 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6507 if (flags & NDR_IN) {
6508 ndr_print_struct(ndr, "in", "samr_SetDomainInfo");
6509 ndr->depth++;
6510 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6511 ndr->depth++;
6512 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6513 ndr->depth--;
6514 ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
6515 ndr_print_ptr(ndr, "info", r->in.info);
6516 ndr->depth++;
6517 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
6518 ndr_print_samr_DomainInfo(ndr, "info", r->in.info);
6519 ndr->depth--;
6520 ndr->depth--;
6522 if (flags & NDR_OUT) {
6523 ndr_print_struct(ndr, "out", "samr_SetDomainInfo");
6524 ndr->depth++;
6525 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6526 ndr->depth--;
6528 ndr->depth--;
6531 static enum ndr_err_code ndr_push_samr_CreateDomainGroup(struct ndr_push *ndr, int flags, const struct samr_CreateDomainGroup *r)
6533 if (flags & NDR_IN) {
6534 if (r->in.domain_handle == NULL) {
6535 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6537 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6538 if (r->in.name == NULL) {
6539 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6541 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
6542 NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6544 if (flags & NDR_OUT) {
6545 if (r->out.group_handle == NULL) {
6546 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6548 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
6549 if (r->out.rid == NULL) {
6550 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6552 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
6553 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6555 return NDR_ERR_SUCCESS;
6558 static enum ndr_err_code ndr_pull_samr_CreateDomainGroup(struct ndr_pull *ndr, int flags, struct samr_CreateDomainGroup *r)
6560 TALLOC_CTX *_mem_save_domain_handle_0;
6561 TALLOC_CTX *_mem_save_name_0;
6562 TALLOC_CTX *_mem_save_group_handle_0;
6563 TALLOC_CTX *_mem_save_rid_0;
6564 if (flags & NDR_IN) {
6565 ZERO_STRUCT(r->out);
6567 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6568 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6570 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6571 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6572 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6573 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6574 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6575 NDR_PULL_ALLOC(ndr, r->in.name);
6577 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6578 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
6579 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
6580 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
6581 NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6582 NDR_PULL_ALLOC(ndr, r->out.group_handle);
6583 ZERO_STRUCTP(r->out.group_handle);
6584 NDR_PULL_ALLOC(ndr, r->out.rid);
6585 ZERO_STRUCTP(r->out.rid);
6587 if (flags & NDR_OUT) {
6588 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6589 NDR_PULL_ALLOC(ndr, r->out.group_handle);
6591 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6592 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC);
6593 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
6594 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
6595 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6596 NDR_PULL_ALLOC(ndr, r->out.rid);
6598 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6599 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
6600 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
6601 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
6602 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6604 return NDR_ERR_SUCCESS;
6607 _PUBLIC_ void ndr_print_samr_CreateDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomainGroup *r)
6609 ndr_print_struct(ndr, name, "samr_CreateDomainGroup");
6610 ndr->depth++;
6611 if (flags & NDR_SET_VALUES) {
6612 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6614 if (flags & NDR_IN) {
6615 ndr_print_struct(ndr, "in", "samr_CreateDomainGroup");
6616 ndr->depth++;
6617 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6618 ndr->depth++;
6619 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6620 ndr->depth--;
6621 ndr_print_ptr(ndr, "name", r->in.name);
6622 ndr->depth++;
6623 ndr_print_lsa_String(ndr, "name", r->in.name);
6624 ndr->depth--;
6625 ndr_print_samr_GroupAccessMask(ndr, "access_mask", r->in.access_mask);
6626 ndr->depth--;
6628 if (flags & NDR_OUT) {
6629 ndr_print_struct(ndr, "out", "samr_CreateDomainGroup");
6630 ndr->depth++;
6631 ndr_print_ptr(ndr, "group_handle", r->out.group_handle);
6632 ndr->depth++;
6633 ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle);
6634 ndr->depth--;
6635 ndr_print_ptr(ndr, "rid", r->out.rid);
6636 ndr->depth++;
6637 ndr_print_uint32(ndr, "rid", *r->out.rid);
6638 ndr->depth--;
6639 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6640 ndr->depth--;
6642 ndr->depth--;
6645 static enum ndr_err_code ndr_push_samr_EnumDomainGroups(struct ndr_push *ndr, int flags, const struct samr_EnumDomainGroups *r)
6647 if (flags & NDR_IN) {
6648 if (r->in.domain_handle == NULL) {
6649 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6651 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6652 if (r->in.resume_handle == NULL) {
6653 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6655 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6656 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
6658 if (flags & NDR_OUT) {
6659 if (r->out.resume_handle == NULL) {
6660 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6662 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6663 if (r->out.sam == NULL) {
6664 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6666 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
6667 if (*r->out.sam) {
6668 NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6670 if (r->out.num_entries == NULL) {
6671 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6673 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
6674 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6676 return NDR_ERR_SUCCESS;
6679 static enum ndr_err_code ndr_pull_samr_EnumDomainGroups(struct ndr_pull *ndr, int flags, struct samr_EnumDomainGroups *r)
6681 uint32_t _ptr_sam;
6682 TALLOC_CTX *_mem_save_domain_handle_0;
6683 TALLOC_CTX *_mem_save_resume_handle_0;
6684 TALLOC_CTX *_mem_save_sam_0;
6685 TALLOC_CTX *_mem_save_sam_1;
6686 TALLOC_CTX *_mem_save_num_entries_0;
6687 if (flags & NDR_IN) {
6688 ZERO_STRUCT(r->out);
6690 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6691 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6693 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6694 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6695 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6696 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6697 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6698 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6700 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6701 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6702 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6703 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6704 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
6705 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6706 *r->out.resume_handle = *r->in.resume_handle;
6707 NDR_PULL_ALLOC(ndr, r->out.sam);
6708 ZERO_STRUCTP(r->out.sam);
6709 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6710 ZERO_STRUCTP(r->out.num_entries);
6712 if (flags & NDR_OUT) {
6713 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6714 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6716 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6717 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6718 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6719 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6720 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6721 NDR_PULL_ALLOC(ndr, r->out.sam);
6723 _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
6724 NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
6725 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
6726 if (_ptr_sam) {
6727 NDR_PULL_ALLOC(ndr, *r->out.sam);
6728 } else {
6729 *r->out.sam = NULL;
6731 if (*r->out.sam) {
6732 _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
6733 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
6734 NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6735 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
6737 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
6738 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6739 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6741 _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6742 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
6743 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
6744 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
6745 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6747 return NDR_ERR_SUCCESS;
6750 _PUBLIC_ void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainGroups *r)
6752 ndr_print_struct(ndr, name, "samr_EnumDomainGroups");
6753 ndr->depth++;
6754 if (flags & NDR_SET_VALUES) {
6755 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6757 if (flags & NDR_IN) {
6758 ndr_print_struct(ndr, "in", "samr_EnumDomainGroups");
6759 ndr->depth++;
6760 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6761 ndr->depth++;
6762 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6763 ndr->depth--;
6764 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6765 ndr->depth++;
6766 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6767 ndr->depth--;
6768 ndr_print_uint32(ndr, "max_size", r->in.max_size);
6769 ndr->depth--;
6771 if (flags & NDR_OUT) {
6772 ndr_print_struct(ndr, "out", "samr_EnumDomainGroups");
6773 ndr->depth++;
6774 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6775 ndr->depth++;
6776 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6777 ndr->depth--;
6778 ndr_print_ptr(ndr, "sam", r->out.sam);
6779 ndr->depth++;
6780 ndr_print_ptr(ndr, "sam", *r->out.sam);
6781 ndr->depth++;
6782 if (*r->out.sam) {
6783 ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
6785 ndr->depth--;
6786 ndr->depth--;
6787 ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
6788 ndr->depth++;
6789 ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
6790 ndr->depth--;
6791 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6792 ndr->depth--;
6794 ndr->depth--;
6797 static enum ndr_err_code ndr_push_samr_CreateUser(struct ndr_push *ndr, int flags, const struct samr_CreateUser *r)
6799 if (flags & NDR_IN) {
6800 if (r->in.domain_handle == NULL) {
6801 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6803 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6804 if (r->in.account_name == NULL) {
6805 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6807 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
6808 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6810 if (flags & NDR_OUT) {
6811 if (r->out.user_handle == NULL) {
6812 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6814 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
6815 if (r->out.rid == NULL) {
6816 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6818 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
6819 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6821 return NDR_ERR_SUCCESS;
6824 static enum ndr_err_code ndr_pull_samr_CreateUser(struct ndr_pull *ndr, int flags, struct samr_CreateUser *r)
6826 TALLOC_CTX *_mem_save_domain_handle_0;
6827 TALLOC_CTX *_mem_save_account_name_0;
6828 TALLOC_CTX *_mem_save_user_handle_0;
6829 TALLOC_CTX *_mem_save_rid_0;
6830 if (flags & NDR_IN) {
6831 ZERO_STRUCT(r->out);
6833 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6834 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6836 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6837 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6838 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6839 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6840 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6841 NDR_PULL_ALLOC(ndr, r->in.account_name);
6843 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6844 NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
6845 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
6846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
6847 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6848 NDR_PULL_ALLOC(ndr, r->out.user_handle);
6849 ZERO_STRUCTP(r->out.user_handle);
6850 NDR_PULL_ALLOC(ndr, r->out.rid);
6851 ZERO_STRUCTP(r->out.rid);
6853 if (flags & NDR_OUT) {
6854 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6855 NDR_PULL_ALLOC(ndr, r->out.user_handle);
6857 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6858 NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
6859 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
6860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
6861 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6862 NDR_PULL_ALLOC(ndr, r->out.rid);
6864 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6865 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
6866 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
6867 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
6868 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6870 return NDR_ERR_SUCCESS;
6873 _PUBLIC_ void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser *r)
6875 ndr_print_struct(ndr, name, "samr_CreateUser");
6876 ndr->depth++;
6877 if (flags & NDR_SET_VALUES) {
6878 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6880 if (flags & NDR_IN) {
6881 ndr_print_struct(ndr, "in", "samr_CreateUser");
6882 ndr->depth++;
6883 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6884 ndr->depth++;
6885 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6886 ndr->depth--;
6887 ndr_print_ptr(ndr, "account_name", r->in.account_name);
6888 ndr->depth++;
6889 ndr_print_lsa_String(ndr, "account_name", r->in.account_name);
6890 ndr->depth--;
6891 ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask);
6892 ndr->depth--;
6894 if (flags & NDR_OUT) {
6895 ndr_print_struct(ndr, "out", "samr_CreateUser");
6896 ndr->depth++;
6897 ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
6898 ndr->depth++;
6899 ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
6900 ndr->depth--;
6901 ndr_print_ptr(ndr, "rid", r->out.rid);
6902 ndr->depth++;
6903 ndr_print_uint32(ndr, "rid", *r->out.rid);
6904 ndr->depth--;
6905 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6906 ndr->depth--;
6908 ndr->depth--;
6911 static enum ndr_err_code ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, int flags, const struct samr_EnumDomainUsers *r)
6913 if (flags & NDR_IN) {
6914 if (r->in.domain_handle == NULL) {
6915 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6917 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6918 if (r->in.resume_handle == NULL) {
6919 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6922 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags));
6923 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
6925 if (flags & NDR_OUT) {
6926 if (r->out.resume_handle == NULL) {
6927 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6929 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6930 if (r->out.sam == NULL) {
6931 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6933 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
6934 if (*r->out.sam) {
6935 NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6937 if (r->out.num_entries == NULL) {
6938 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6940 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
6941 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6943 return NDR_ERR_SUCCESS;
6946 static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int flags, struct samr_EnumDomainUsers *r)
6948 uint32_t _ptr_sam;
6949 TALLOC_CTX *_mem_save_domain_handle_0;
6950 TALLOC_CTX *_mem_save_resume_handle_0;
6951 TALLOC_CTX *_mem_save_sam_0;
6952 TALLOC_CTX *_mem_save_sam_1;
6953 TALLOC_CTX *_mem_save_num_entries_0;
6954 if (flags & NDR_IN) {
6955 ZERO_STRUCT(r->out);
6957 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6958 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6960 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6961 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6962 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6963 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6964 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6965 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6967 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6968 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6969 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6970 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6971 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags));
6972 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
6973 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6974 *r->out.resume_handle = *r->in.resume_handle;
6975 NDR_PULL_ALLOC(ndr, r->out.sam);
6976 ZERO_STRUCTP(r->out.sam);
6977 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6978 ZERO_STRUCTP(r->out.num_entries);
6980 if (flags & NDR_OUT) {
6981 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6982 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6984 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6985 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6986 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6987 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6988 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6989 NDR_PULL_ALLOC(ndr, r->out.sam);
6991 _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
6992 NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
6993 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
6994 if (_ptr_sam) {
6995 NDR_PULL_ALLOC(ndr, *r->out.sam);
6996 } else {
6997 *r->out.sam = NULL;
6999 if (*r->out.sam) {
7000 _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
7001 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
7002 NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7003 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
7005 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
7006 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7007 NDR_PULL_ALLOC(ndr, r->out.num_entries);
7009 _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
7010 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
7011 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
7012 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
7013 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7015 return NDR_ERR_SUCCESS;
7018 _PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainUsers *r)
7020 ndr_print_struct(ndr, name, "samr_EnumDomainUsers");
7021 ndr->depth++;
7022 if (flags & NDR_SET_VALUES) {
7023 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7025 if (flags & NDR_IN) {
7026 ndr_print_struct(ndr, "in", "samr_EnumDomainUsers");
7027 ndr->depth++;
7028 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7029 ndr->depth++;
7030 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7031 ndr->depth--;
7032 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7033 ndr->depth++;
7034 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7035 ndr->depth--;
7036 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags);
7037 ndr_print_uint32(ndr, "max_size", r->in.max_size);
7038 ndr->depth--;
7040 if (flags & NDR_OUT) {
7041 ndr_print_struct(ndr, "out", "samr_EnumDomainUsers");
7042 ndr->depth++;
7043 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7044 ndr->depth++;
7045 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7046 ndr->depth--;
7047 ndr_print_ptr(ndr, "sam", r->out.sam);
7048 ndr->depth++;
7049 ndr_print_ptr(ndr, "sam", *r->out.sam);
7050 ndr->depth++;
7051 if (*r->out.sam) {
7052 ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
7054 ndr->depth--;
7055 ndr->depth--;
7056 ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
7057 ndr->depth++;
7058 ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
7059 ndr->depth--;
7060 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7061 ndr->depth--;
7063 ndr->depth--;
7066 static enum ndr_err_code ndr_push_samr_CreateDomAlias(struct ndr_push *ndr, int flags, const struct samr_CreateDomAlias *r)
7068 if (flags & NDR_IN) {
7069 if (r->in.domain_handle == NULL) {
7070 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7072 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7073 if (r->in.alias_name == NULL) {
7074 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7076 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.alias_name));
7077 NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7079 if (flags & NDR_OUT) {
7080 if (r->out.alias_handle == NULL) {
7081 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7083 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
7084 if (r->out.rid == NULL) {
7085 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7087 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
7088 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7090 return NDR_ERR_SUCCESS;
7093 static enum ndr_err_code ndr_pull_samr_CreateDomAlias(struct ndr_pull *ndr, int flags, struct samr_CreateDomAlias *r)
7095 TALLOC_CTX *_mem_save_domain_handle_0;
7096 TALLOC_CTX *_mem_save_alias_name_0;
7097 TALLOC_CTX *_mem_save_alias_handle_0;
7098 TALLOC_CTX *_mem_save_rid_0;
7099 if (flags & NDR_IN) {
7100 ZERO_STRUCT(r->out);
7102 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7103 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7105 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7106 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7107 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7108 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7109 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7110 NDR_PULL_ALLOC(ndr, r->in.alias_name);
7112 _mem_save_alias_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7113 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_name, LIBNDR_FLAG_REF_ALLOC);
7114 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.alias_name));
7115 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_name_0, LIBNDR_FLAG_REF_ALLOC);
7116 NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7117 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
7118 ZERO_STRUCTP(r->out.alias_handle);
7119 NDR_PULL_ALLOC(ndr, r->out.rid);
7120 ZERO_STRUCTP(r->out.rid);
7122 if (flags & NDR_OUT) {
7123 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7124 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
7126 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7127 NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC);
7128 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
7129 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
7130 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7131 NDR_PULL_ALLOC(ndr, r->out.rid);
7133 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7134 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
7135 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
7136 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
7137 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7139 return NDR_ERR_SUCCESS;
7142 _PUBLIC_ void ndr_print_samr_CreateDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomAlias *r)
7144 ndr_print_struct(ndr, name, "samr_CreateDomAlias");
7145 ndr->depth++;
7146 if (flags & NDR_SET_VALUES) {
7147 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7149 if (flags & NDR_IN) {
7150 ndr_print_struct(ndr, "in", "samr_CreateDomAlias");
7151 ndr->depth++;
7152 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7153 ndr->depth++;
7154 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7155 ndr->depth--;
7156 ndr_print_ptr(ndr, "alias_name", r->in.alias_name);
7157 ndr->depth++;
7158 ndr_print_lsa_String(ndr, "alias_name", r->in.alias_name);
7159 ndr->depth--;
7160 ndr_print_samr_AliasAccessMask(ndr, "access_mask", r->in.access_mask);
7161 ndr->depth--;
7163 if (flags & NDR_OUT) {
7164 ndr_print_struct(ndr, "out", "samr_CreateDomAlias");
7165 ndr->depth++;
7166 ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle);
7167 ndr->depth++;
7168 ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle);
7169 ndr->depth--;
7170 ndr_print_ptr(ndr, "rid", r->out.rid);
7171 ndr->depth++;
7172 ndr_print_uint32(ndr, "rid", *r->out.rid);
7173 ndr->depth--;
7174 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7175 ndr->depth--;
7177 ndr->depth--;
7180 static enum ndr_err_code ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, int flags, const struct samr_EnumDomainAliases *r)
7182 if (flags & NDR_IN) {
7183 if (r->in.domain_handle == NULL) {
7184 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7186 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7187 if (r->in.resume_handle == NULL) {
7188 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7190 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
7191 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
7193 if (flags & NDR_OUT) {
7194 if (r->out.resume_handle == NULL) {
7195 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7197 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
7198 if (r->out.sam == NULL) {
7199 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7201 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
7202 if (*r->out.sam) {
7203 NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7205 if (r->out.num_entries == NULL) {
7206 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7208 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
7209 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7211 return NDR_ERR_SUCCESS;
7214 static enum ndr_err_code ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, int flags, struct samr_EnumDomainAliases *r)
7216 uint32_t _ptr_sam;
7217 TALLOC_CTX *_mem_save_domain_handle_0;
7218 TALLOC_CTX *_mem_save_resume_handle_0;
7219 TALLOC_CTX *_mem_save_sam_0;
7220 TALLOC_CTX *_mem_save_sam_1;
7221 TALLOC_CTX *_mem_save_num_entries_0;
7222 if (flags & NDR_IN) {
7223 ZERO_STRUCT(r->out);
7225 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7226 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7228 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7229 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7230 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7231 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7232 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7233 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7235 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7236 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7237 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
7238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7239 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
7240 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7241 *r->out.resume_handle = *r->in.resume_handle;
7242 NDR_PULL_ALLOC(ndr, r->out.sam);
7243 ZERO_STRUCTP(r->out.sam);
7244 NDR_PULL_ALLOC(ndr, r->out.num_entries);
7245 ZERO_STRUCTP(r->out.num_entries);
7247 if (flags & NDR_OUT) {
7248 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7249 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7251 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7252 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7253 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7254 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7255 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7256 NDR_PULL_ALLOC(ndr, r->out.sam);
7258 _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
7259 NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
7260 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
7261 if (_ptr_sam) {
7262 NDR_PULL_ALLOC(ndr, *r->out.sam);
7263 } else {
7264 *r->out.sam = NULL;
7266 if (*r->out.sam) {
7267 _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
7268 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
7269 NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7270 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
7272 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
7273 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7274 NDR_PULL_ALLOC(ndr, r->out.num_entries);
7276 _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
7277 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
7278 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
7279 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
7280 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7282 return NDR_ERR_SUCCESS;
7285 _PUBLIC_ void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainAliases *r)
7287 ndr_print_struct(ndr, name, "samr_EnumDomainAliases");
7288 ndr->depth++;
7289 if (flags & NDR_SET_VALUES) {
7290 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7292 if (flags & NDR_IN) {
7293 ndr_print_struct(ndr, "in", "samr_EnumDomainAliases");
7294 ndr->depth++;
7295 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7296 ndr->depth++;
7297 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7298 ndr->depth--;
7299 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7300 ndr->depth++;
7301 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7302 ndr->depth--;
7303 ndr_print_uint32(ndr, "max_size", r->in.max_size);
7304 ndr->depth--;
7306 if (flags & NDR_OUT) {
7307 ndr_print_struct(ndr, "out", "samr_EnumDomainAliases");
7308 ndr->depth++;
7309 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7310 ndr->depth++;
7311 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7312 ndr->depth--;
7313 ndr_print_ptr(ndr, "sam", r->out.sam);
7314 ndr->depth++;
7315 ndr_print_ptr(ndr, "sam", *r->out.sam);
7316 ndr->depth++;
7317 if (*r->out.sam) {
7318 ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
7320 ndr->depth--;
7321 ndr->depth--;
7322 ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
7323 ndr->depth++;
7324 ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
7325 ndr->depth--;
7326 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7327 ndr->depth--;
7329 ndr->depth--;
7332 static enum ndr_err_code ndr_push_samr_GetAliasMembership(struct ndr_push *ndr, int flags, const struct samr_GetAliasMembership *r)
7334 if (flags & NDR_IN) {
7335 if (r->in.domain_handle == NULL) {
7336 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7338 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7339 if (r->in.sids == NULL) {
7340 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7342 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
7344 if (flags & NDR_OUT) {
7345 if (r->out.rids == NULL) {
7346 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7348 NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
7349 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7351 return NDR_ERR_SUCCESS;
7354 static enum ndr_err_code ndr_pull_samr_GetAliasMembership(struct ndr_pull *ndr, int flags, struct samr_GetAliasMembership *r)
7356 TALLOC_CTX *_mem_save_domain_handle_0;
7357 TALLOC_CTX *_mem_save_sids_0;
7358 TALLOC_CTX *_mem_save_rids_0;
7359 if (flags & NDR_IN) {
7360 ZERO_STRUCT(r->out);
7362 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7363 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7365 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7366 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7367 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7368 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7369 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7370 NDR_PULL_ALLOC(ndr, r->in.sids);
7372 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
7373 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
7374 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
7375 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
7376 NDR_PULL_ALLOC(ndr, r->out.rids);
7377 ZERO_STRUCTP(r->out.rids);
7379 if (flags & NDR_OUT) {
7380 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7381 NDR_PULL_ALLOC(ndr, r->out.rids);
7383 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
7384 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
7385 NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
7386 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
7387 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7389 return NDR_ERR_SUCCESS;
7392 _PUBLIC_ void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetAliasMembership *r)
7394 ndr_print_struct(ndr, name, "samr_GetAliasMembership");
7395 ndr->depth++;
7396 if (flags & NDR_SET_VALUES) {
7397 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7399 if (flags & NDR_IN) {
7400 ndr_print_struct(ndr, "in", "samr_GetAliasMembership");
7401 ndr->depth++;
7402 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7403 ndr->depth++;
7404 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7405 ndr->depth--;
7406 ndr_print_ptr(ndr, "sids", r->in.sids);
7407 ndr->depth++;
7408 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
7409 ndr->depth--;
7410 ndr->depth--;
7412 if (flags & NDR_OUT) {
7413 ndr_print_struct(ndr, "out", "samr_GetAliasMembership");
7414 ndr->depth++;
7415 ndr_print_ptr(ndr, "rids", r->out.rids);
7416 ndr->depth++;
7417 ndr_print_samr_Ids(ndr, "rids", r->out.rids);
7418 ndr->depth--;
7419 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7420 ndr->depth--;
7422 ndr->depth--;
7425 _PUBLIC_ enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int flags, const struct samr_LookupNames *r)
7427 uint32_t cntr_names_0;
7428 if (flags & NDR_IN) {
7429 if (r->in.domain_handle == NULL) {
7430 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7432 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7433 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
7434 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1000));
7435 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7436 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
7437 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
7438 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
7440 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
7441 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
7444 if (flags & NDR_OUT) {
7445 if (r->out.rids == NULL) {
7446 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7448 NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
7449 if (r->out.types == NULL) {
7450 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7452 NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
7453 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7455 return NDR_ERR_SUCCESS;
7458 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r)
7460 uint32_t cntr_names_0;
7461 TALLOC_CTX *_mem_save_domain_handle_0;
7462 TALLOC_CTX *_mem_save_names_0;
7463 TALLOC_CTX *_mem_save_rids_0;
7464 TALLOC_CTX *_mem_save_types_0;
7465 if (flags & NDR_IN) {
7466 ZERO_STRUCT(r->out);
7468 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7469 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7471 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7472 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7473 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7474 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7475 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
7476 if (r->in.num_names > 1000) {
7477 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7479 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
7480 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.names));
7481 if (ndr_get_array_length(ndr, &r->in.names) > ndr_get_array_size(ndr, &r->in.names)) {
7482 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.names), ndr_get_array_length(ndr, &r->in.names));
7484 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
7485 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
7486 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
7487 for (cntr_names_0 = 0; cntr_names_0 < ndr_get_array_length(ndr, &r->in.names); cntr_names_0++) {
7488 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
7490 for (cntr_names_0 = 0; cntr_names_0 < ndr_get_array_length(ndr, &r->in.names); cntr_names_0++) {
7491 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
7493 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
7494 NDR_PULL_ALLOC(ndr, r->out.rids);
7495 ZERO_STRUCTP(r->out.rids);
7496 NDR_PULL_ALLOC(ndr, r->out.types);
7497 ZERO_STRUCTP(r->out.types);
7498 if (r->in.names) {
7499 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, 1000));
7501 if (r->in.names) {
7502 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.names, r->in.num_names));
7505 if (flags & NDR_OUT) {
7506 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7507 NDR_PULL_ALLOC(ndr, r->out.rids);
7509 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
7510 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
7511 NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
7512 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
7513 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7514 NDR_PULL_ALLOC(ndr, r->out.types);
7516 _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
7517 NDR_PULL_SET_MEM_CTX(ndr, r->out.types, LIBNDR_FLAG_REF_ALLOC);
7518 NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
7519 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, LIBNDR_FLAG_REF_ALLOC);
7520 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7522 return NDR_ERR_SUCCESS;
7525 _PUBLIC_ void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupNames *r)
7527 uint32_t cntr_names_0;
7528 ndr_print_struct(ndr, name, "samr_LookupNames");
7529 ndr->depth++;
7530 if (flags & NDR_SET_VALUES) {
7531 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7533 if (flags & NDR_IN) {
7534 ndr_print_struct(ndr, "in", "samr_LookupNames");
7535 ndr->depth++;
7536 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7537 ndr->depth++;
7538 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7539 ndr->depth--;
7540 ndr_print_uint32(ndr, "num_names", r->in.num_names);
7541 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
7542 ndr->depth++;
7543 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
7544 char *idx_0=NULL;
7545 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
7546 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
7547 free(idx_0);
7550 ndr->depth--;
7551 ndr->depth--;
7553 if (flags & NDR_OUT) {
7554 ndr_print_struct(ndr, "out", "samr_LookupNames");
7555 ndr->depth++;
7556 ndr_print_ptr(ndr, "rids", r->out.rids);
7557 ndr->depth++;
7558 ndr_print_samr_Ids(ndr, "rids", r->out.rids);
7559 ndr->depth--;
7560 ndr_print_ptr(ndr, "types", r->out.types);
7561 ndr->depth++;
7562 ndr_print_samr_Ids(ndr, "types", r->out.types);
7563 ndr->depth--;
7564 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7565 ndr->depth--;
7567 ndr->depth--;
7570 static enum ndr_err_code ndr_push_samr_LookupRids(struct ndr_push *ndr, int flags, const struct samr_LookupRids *r)
7572 uint32_t cntr_rids_0;
7573 if (flags & NDR_IN) {
7574 if (r->in.domain_handle == NULL) {
7575 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7577 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7578 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_rids));
7579 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1000));
7580 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7581 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_rids));
7582 for (cntr_rids_0 = 0; cntr_rids_0 < r->in.num_rids; cntr_rids_0++) {
7583 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rids[cntr_rids_0]));
7586 if (flags & NDR_OUT) {
7587 if (r->out.names == NULL) {
7588 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7590 NDR_CHECK(ndr_push_lsa_Strings(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
7591 if (r->out.types == NULL) {
7592 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7594 NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
7595 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7597 return NDR_ERR_SUCCESS;
7600 static enum ndr_err_code ndr_pull_samr_LookupRids(struct ndr_pull *ndr, int flags, struct samr_LookupRids *r)
7602 uint32_t cntr_rids_0;
7603 TALLOC_CTX *_mem_save_domain_handle_0;
7604 TALLOC_CTX *_mem_save_rids_0;
7605 TALLOC_CTX *_mem_save_names_0;
7606 TALLOC_CTX *_mem_save_types_0;
7607 if (flags & NDR_IN) {
7608 ZERO_STRUCT(r->out);
7610 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7611 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7613 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7614 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7615 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7616 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7617 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_rids));
7618 if (r->in.num_rids > 1000) {
7619 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7621 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rids));
7622 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rids));
7623 if (ndr_get_array_length(ndr, &r->in.rids) > ndr_get_array_size(ndr, &r->in.rids)) {
7624 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rids), ndr_get_array_length(ndr, &r->in.rids));
7626 NDR_PULL_ALLOC_N(ndr, r->in.rids, ndr_get_array_size(ndr, &r->in.rids));
7627 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
7628 NDR_PULL_SET_MEM_CTX(ndr, r->in.rids, 0);
7629 for (cntr_rids_0 = 0; cntr_rids_0 < ndr_get_array_length(ndr, &r->in.rids); cntr_rids_0++) {
7630 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rids[cntr_rids_0]));
7632 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
7633 NDR_PULL_ALLOC(ndr, r->out.names);
7634 ZERO_STRUCTP(r->out.names);
7635 NDR_PULL_ALLOC(ndr, r->out.types);
7636 ZERO_STRUCTP(r->out.types);
7637 if (r->in.rids) {
7638 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.rids, 1000));
7640 if (r->in.rids) {
7641 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.rids, r->in.num_rids));
7644 if (flags & NDR_OUT) {
7645 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7646 NDR_PULL_ALLOC(ndr, r->out.names);
7648 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
7649 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
7650 NDR_CHECK(ndr_pull_lsa_Strings(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
7651 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
7652 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7653 NDR_PULL_ALLOC(ndr, r->out.types);
7655 _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
7656 NDR_PULL_SET_MEM_CTX(ndr, r->out.types, LIBNDR_FLAG_REF_ALLOC);
7657 NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
7658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, LIBNDR_FLAG_REF_ALLOC);
7659 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7661 return NDR_ERR_SUCCESS;
7664 _PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupRids *r)
7666 uint32_t cntr_rids_0;
7667 ndr_print_struct(ndr, name, "samr_LookupRids");
7668 ndr->depth++;
7669 if (flags & NDR_SET_VALUES) {
7670 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7672 if (flags & NDR_IN) {
7673 ndr_print_struct(ndr, "in", "samr_LookupRids");
7674 ndr->depth++;
7675 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7676 ndr->depth++;
7677 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7678 ndr->depth--;
7679 ndr_print_uint32(ndr, "num_rids", r->in.num_rids);
7680 ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->in.num_rids);
7681 ndr->depth++;
7682 for (cntr_rids_0=0;cntr_rids_0<r->in.num_rids;cntr_rids_0++) {
7683 char *idx_0=NULL;
7684 if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
7685 ndr_print_uint32(ndr, "rids", r->in.rids[cntr_rids_0]);
7686 free(idx_0);
7689 ndr->depth--;
7690 ndr->depth--;
7692 if (flags & NDR_OUT) {
7693 ndr_print_struct(ndr, "out", "samr_LookupRids");
7694 ndr->depth++;
7695 ndr_print_ptr(ndr, "names", r->out.names);
7696 ndr->depth++;
7697 ndr_print_lsa_Strings(ndr, "names", r->out.names);
7698 ndr->depth--;
7699 ndr_print_ptr(ndr, "types", r->out.types);
7700 ndr->depth++;
7701 ndr_print_samr_Ids(ndr, "types", r->out.types);
7702 ndr->depth--;
7703 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7704 ndr->depth--;
7706 ndr->depth--;
7709 static enum ndr_err_code ndr_push_samr_OpenGroup(struct ndr_push *ndr, int flags, const struct samr_OpenGroup *r)
7711 if (flags & NDR_IN) {
7712 if (r->in.domain_handle == NULL) {
7713 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7715 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7716 NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7717 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
7719 if (flags & NDR_OUT) {
7720 if (r->out.group_handle == NULL) {
7721 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7723 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
7724 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7726 return NDR_ERR_SUCCESS;
7729 static enum ndr_err_code ndr_pull_samr_OpenGroup(struct ndr_pull *ndr, int flags, struct samr_OpenGroup *r)
7731 TALLOC_CTX *_mem_save_domain_handle_0;
7732 TALLOC_CTX *_mem_save_group_handle_0;
7733 if (flags & NDR_IN) {
7734 ZERO_STRUCT(r->out);
7736 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7737 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7739 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7740 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7741 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7743 NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7744 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
7745 NDR_PULL_ALLOC(ndr, r->out.group_handle);
7746 ZERO_STRUCTP(r->out.group_handle);
7748 if (flags & NDR_OUT) {
7749 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7750 NDR_PULL_ALLOC(ndr, r->out.group_handle);
7752 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7753 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC);
7754 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
7755 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
7756 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7758 return NDR_ERR_SUCCESS;
7761 _PUBLIC_ void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenGroup *r)
7763 ndr_print_struct(ndr, name, "samr_OpenGroup");
7764 ndr->depth++;
7765 if (flags & NDR_SET_VALUES) {
7766 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7768 if (flags & NDR_IN) {
7769 ndr_print_struct(ndr, "in", "samr_OpenGroup");
7770 ndr->depth++;
7771 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7772 ndr->depth++;
7773 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7774 ndr->depth--;
7775 ndr_print_samr_GroupAccessMask(ndr, "access_mask", r->in.access_mask);
7776 ndr_print_uint32(ndr, "rid", r->in.rid);
7777 ndr->depth--;
7779 if (flags & NDR_OUT) {
7780 ndr_print_struct(ndr, "out", "samr_OpenGroup");
7781 ndr->depth++;
7782 ndr_print_ptr(ndr, "group_handle", r->out.group_handle);
7783 ndr->depth++;
7784 ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle);
7785 ndr->depth--;
7786 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7787 ndr->depth--;
7789 ndr->depth--;
7792 static enum ndr_err_code ndr_push_samr_QueryGroupInfo(struct ndr_push *ndr, int flags, const struct samr_QueryGroupInfo *r)
7794 if (flags & NDR_IN) {
7795 if (r->in.group_handle == NULL) {
7796 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7798 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7799 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, r->in.level));
7801 if (flags & NDR_OUT) {
7802 if (r->out.info == NULL) {
7803 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7805 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
7806 if (*r->out.info) {
7807 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
7808 NDR_CHECK(ndr_push_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7810 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7812 return NDR_ERR_SUCCESS;
7815 static enum ndr_err_code ndr_pull_samr_QueryGroupInfo(struct ndr_pull *ndr, int flags, struct samr_QueryGroupInfo *r)
7817 uint32_t _ptr_info;
7818 TALLOC_CTX *_mem_save_group_handle_0;
7819 TALLOC_CTX *_mem_save_info_0;
7820 TALLOC_CTX *_mem_save_info_1;
7821 if (flags & NDR_IN) {
7822 ZERO_STRUCT(r->out);
7824 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7825 NDR_PULL_ALLOC(ndr, r->in.group_handle);
7827 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7828 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
7829 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7830 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
7831 NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7832 NDR_PULL_ALLOC(ndr, r->out.info);
7833 ZERO_STRUCTP(r->out.info);
7835 if (flags & NDR_OUT) {
7836 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7837 NDR_PULL_ALLOC(ndr, r->out.info);
7839 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7840 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
7841 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
7842 if (_ptr_info) {
7843 NDR_PULL_ALLOC(ndr, *r->out.info);
7844 } else {
7845 *r->out.info = NULL;
7847 if (*r->out.info) {
7848 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
7849 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
7850 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
7851 NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7852 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
7854 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7855 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7857 return NDR_ERR_SUCCESS;
7860 _PUBLIC_ void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupInfo *r)
7862 ndr_print_struct(ndr, name, "samr_QueryGroupInfo");
7863 ndr->depth++;
7864 if (flags & NDR_SET_VALUES) {
7865 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7867 if (flags & NDR_IN) {
7868 ndr_print_struct(ndr, "in", "samr_QueryGroupInfo");
7869 ndr->depth++;
7870 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
7871 ndr->depth++;
7872 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
7873 ndr->depth--;
7874 ndr_print_samr_GroupInfoEnum(ndr, "level", r->in.level);
7875 ndr->depth--;
7877 if (flags & NDR_OUT) {
7878 ndr_print_struct(ndr, "out", "samr_QueryGroupInfo");
7879 ndr->depth++;
7880 ndr_print_ptr(ndr, "info", r->out.info);
7881 ndr->depth++;
7882 ndr_print_ptr(ndr, "info", *r->out.info);
7883 ndr->depth++;
7884 if (*r->out.info) {
7885 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
7886 ndr_print_samr_GroupInfo(ndr, "info", *r->out.info);
7888 ndr->depth--;
7889 ndr->depth--;
7890 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7891 ndr->depth--;
7893 ndr->depth--;
7896 static enum ndr_err_code ndr_push_samr_SetGroupInfo(struct ndr_push *ndr, int flags, const struct samr_SetGroupInfo *r)
7898 if (flags & NDR_IN) {
7899 if (r->in.group_handle == NULL) {
7900 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7902 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7903 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, r->in.level));
7904 if (r->in.info == NULL) {
7905 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7907 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
7908 NDR_CHECK(ndr_push_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7910 if (flags & NDR_OUT) {
7911 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7913 return NDR_ERR_SUCCESS;
7916 static enum ndr_err_code ndr_pull_samr_SetGroupInfo(struct ndr_pull *ndr, int flags, struct samr_SetGroupInfo *r)
7918 TALLOC_CTX *_mem_save_group_handle_0;
7919 TALLOC_CTX *_mem_save_info_0;
7920 if (flags & NDR_IN) {
7921 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7922 NDR_PULL_ALLOC(ndr, r->in.group_handle);
7924 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7925 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
7926 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7927 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
7928 NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7929 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7930 NDR_PULL_ALLOC(ndr, r->in.info);
7932 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7933 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
7934 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
7935 NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7936 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7938 if (flags & NDR_OUT) {
7939 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7941 return NDR_ERR_SUCCESS;
7944 _PUBLIC_ void ndr_print_samr_SetGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetGroupInfo *r)
7946 ndr_print_struct(ndr, name, "samr_SetGroupInfo");
7947 ndr->depth++;
7948 if (flags & NDR_SET_VALUES) {
7949 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7951 if (flags & NDR_IN) {
7952 ndr_print_struct(ndr, "in", "samr_SetGroupInfo");
7953 ndr->depth++;
7954 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
7955 ndr->depth++;
7956 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
7957 ndr->depth--;
7958 ndr_print_samr_GroupInfoEnum(ndr, "level", r->in.level);
7959 ndr_print_ptr(ndr, "info", r->in.info);
7960 ndr->depth++;
7961 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
7962 ndr_print_samr_GroupInfo(ndr, "info", r->in.info);
7963 ndr->depth--;
7964 ndr->depth--;
7966 if (flags & NDR_OUT) {
7967 ndr_print_struct(ndr, "out", "samr_SetGroupInfo");
7968 ndr->depth++;
7969 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7970 ndr->depth--;
7972 ndr->depth--;
7975 static enum ndr_err_code ndr_push_samr_AddGroupMember(struct ndr_push *ndr, int flags, const struct samr_AddGroupMember *r)
7977 if (flags & NDR_IN) {
7978 if (r->in.group_handle == NULL) {
7979 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7981 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
7983 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
7985 if (flags & NDR_OUT) {
7986 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7988 return NDR_ERR_SUCCESS;
7991 static enum ndr_err_code ndr_pull_samr_AddGroupMember(struct ndr_pull *ndr, int flags, struct samr_AddGroupMember *r)
7993 TALLOC_CTX *_mem_save_group_handle_0;
7994 if (flags & NDR_IN) {
7995 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7996 NDR_PULL_ALLOC(ndr, r->in.group_handle);
7998 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7999 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8000 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8001 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8002 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8003 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
8005 if (flags & NDR_OUT) {
8006 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8008 return NDR_ERR_SUCCESS;
8011 _PUBLIC_ void ndr_print_samr_AddGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddGroupMember *r)
8013 ndr_print_struct(ndr, name, "samr_AddGroupMember");
8014 ndr->depth++;
8015 if (flags & NDR_SET_VALUES) {
8016 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8018 if (flags & NDR_IN) {
8019 ndr_print_struct(ndr, "in", "samr_AddGroupMember");
8020 ndr->depth++;
8021 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8022 ndr->depth++;
8023 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8024 ndr->depth--;
8025 ndr_print_uint32(ndr, "rid", r->in.rid);
8026 ndr_print_uint32(ndr, "flags", r->in.flags);
8027 ndr->depth--;
8029 if (flags & NDR_OUT) {
8030 ndr_print_struct(ndr, "out", "samr_AddGroupMember");
8031 ndr->depth++;
8032 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8033 ndr->depth--;
8035 ndr->depth--;
8038 static enum ndr_err_code ndr_push_samr_DeleteDomainGroup(struct ndr_push *ndr, int flags, const struct samr_DeleteDomainGroup *r)
8040 if (flags & NDR_IN) {
8041 if (r->in.group_handle == NULL) {
8042 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8044 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8046 if (flags & NDR_OUT) {
8047 if (r->out.group_handle == NULL) {
8048 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8050 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
8051 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8053 return NDR_ERR_SUCCESS;
8056 static enum ndr_err_code ndr_pull_samr_DeleteDomainGroup(struct ndr_pull *ndr, int flags, struct samr_DeleteDomainGroup *r)
8058 TALLOC_CTX *_mem_save_group_handle_0;
8059 if (flags & NDR_IN) {
8060 ZERO_STRUCT(r->out);
8062 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8063 NDR_PULL_ALLOC(ndr, r->in.group_handle);
8065 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8066 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8067 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8068 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8069 NDR_PULL_ALLOC(ndr, r->out.group_handle);
8070 *r->out.group_handle = *r->in.group_handle;
8072 if (flags & NDR_OUT) {
8073 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8074 NDR_PULL_ALLOC(ndr, r->out.group_handle);
8076 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8077 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC);
8078 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
8079 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8080 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8082 return NDR_ERR_SUCCESS;
8085 _PUBLIC_ void ndr_print_samr_DeleteDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomainGroup *r)
8087 ndr_print_struct(ndr, name, "samr_DeleteDomainGroup");
8088 ndr->depth++;
8089 if (flags & NDR_SET_VALUES) {
8090 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8092 if (flags & NDR_IN) {
8093 ndr_print_struct(ndr, "in", "samr_DeleteDomainGroup");
8094 ndr->depth++;
8095 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8096 ndr->depth++;
8097 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8098 ndr->depth--;
8099 ndr->depth--;
8101 if (flags & NDR_OUT) {
8102 ndr_print_struct(ndr, "out", "samr_DeleteDomainGroup");
8103 ndr->depth++;
8104 ndr_print_ptr(ndr, "group_handle", r->out.group_handle);
8105 ndr->depth++;
8106 ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle);
8107 ndr->depth--;
8108 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8109 ndr->depth--;
8111 ndr->depth--;
8114 static enum ndr_err_code ndr_push_samr_DeleteGroupMember(struct ndr_push *ndr, int flags, const struct samr_DeleteGroupMember *r)
8116 if (flags & NDR_IN) {
8117 if (r->in.group_handle == NULL) {
8118 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8120 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8121 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
8123 if (flags & NDR_OUT) {
8124 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8126 return NDR_ERR_SUCCESS;
8129 static enum ndr_err_code ndr_pull_samr_DeleteGroupMember(struct ndr_pull *ndr, int flags, struct samr_DeleteGroupMember *r)
8131 TALLOC_CTX *_mem_save_group_handle_0;
8132 if (flags & NDR_IN) {
8133 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8134 NDR_PULL_ALLOC(ndr, r->in.group_handle);
8136 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8137 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8138 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8139 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8140 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8142 if (flags & NDR_OUT) {
8143 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8145 return NDR_ERR_SUCCESS;
8148 _PUBLIC_ void ndr_print_samr_DeleteGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteGroupMember *r)
8150 ndr_print_struct(ndr, name, "samr_DeleteGroupMember");
8151 ndr->depth++;
8152 if (flags & NDR_SET_VALUES) {
8153 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8155 if (flags & NDR_IN) {
8156 ndr_print_struct(ndr, "in", "samr_DeleteGroupMember");
8157 ndr->depth++;
8158 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8159 ndr->depth++;
8160 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8161 ndr->depth--;
8162 ndr_print_uint32(ndr, "rid", r->in.rid);
8163 ndr->depth--;
8165 if (flags & NDR_OUT) {
8166 ndr_print_struct(ndr, "out", "samr_DeleteGroupMember");
8167 ndr->depth++;
8168 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8169 ndr->depth--;
8171 ndr->depth--;
8174 static enum ndr_err_code ndr_push_samr_QueryGroupMember(struct ndr_push *ndr, int flags, const struct samr_QueryGroupMember *r)
8176 if (flags & NDR_IN) {
8177 if (r->in.group_handle == NULL) {
8178 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8180 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8182 if (flags & NDR_OUT) {
8183 if (r->out.rids == NULL) {
8184 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8186 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rids));
8187 if (*r->out.rids) {
8188 NDR_CHECK(ndr_push_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
8190 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8192 return NDR_ERR_SUCCESS;
8195 static enum ndr_err_code ndr_pull_samr_QueryGroupMember(struct ndr_pull *ndr, int flags, struct samr_QueryGroupMember *r)
8197 uint32_t _ptr_rids;
8198 TALLOC_CTX *_mem_save_group_handle_0;
8199 TALLOC_CTX *_mem_save_rids_0;
8200 TALLOC_CTX *_mem_save_rids_1;
8201 if (flags & NDR_IN) {
8202 ZERO_STRUCT(r->out);
8204 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8205 NDR_PULL_ALLOC(ndr, r->in.group_handle);
8207 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8208 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8209 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8210 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8211 NDR_PULL_ALLOC(ndr, r->out.rids);
8212 ZERO_STRUCTP(r->out.rids);
8214 if (flags & NDR_OUT) {
8215 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8216 NDR_PULL_ALLOC(ndr, r->out.rids);
8218 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8219 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
8220 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
8221 if (_ptr_rids) {
8222 NDR_PULL_ALLOC(ndr, *r->out.rids);
8223 } else {
8224 *r->out.rids = NULL;
8226 if (*r->out.rids) {
8227 _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
8228 NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, 0);
8229 NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
8230 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
8232 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
8233 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8235 return NDR_ERR_SUCCESS;
8238 _PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupMember *r)
8240 ndr_print_struct(ndr, name, "samr_QueryGroupMember");
8241 ndr->depth++;
8242 if (flags & NDR_SET_VALUES) {
8243 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8245 if (flags & NDR_IN) {
8246 ndr_print_struct(ndr, "in", "samr_QueryGroupMember");
8247 ndr->depth++;
8248 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8249 ndr->depth++;
8250 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8251 ndr->depth--;
8252 ndr->depth--;
8254 if (flags & NDR_OUT) {
8255 ndr_print_struct(ndr, "out", "samr_QueryGroupMember");
8256 ndr->depth++;
8257 ndr_print_ptr(ndr, "rids", r->out.rids);
8258 ndr->depth++;
8259 ndr_print_ptr(ndr, "rids", *r->out.rids);
8260 ndr->depth++;
8261 if (*r->out.rids) {
8262 ndr_print_samr_RidTypeArray(ndr, "rids", *r->out.rids);
8264 ndr->depth--;
8265 ndr->depth--;
8266 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8267 ndr->depth--;
8269 ndr->depth--;
8272 static enum ndr_err_code ndr_push_samr_SetMemberAttributesOfGroup(struct ndr_push *ndr, int flags, const struct samr_SetMemberAttributesOfGroup *r)
8274 if (flags & NDR_IN) {
8275 if (r->in.group_handle == NULL) {
8276 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8278 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
8280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
8282 if (flags & NDR_OUT) {
8283 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8285 return NDR_ERR_SUCCESS;
8288 static enum ndr_err_code ndr_pull_samr_SetMemberAttributesOfGroup(struct ndr_pull *ndr, int flags, struct samr_SetMemberAttributesOfGroup *r)
8290 TALLOC_CTX *_mem_save_group_handle_0;
8291 if (flags & NDR_IN) {
8292 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8293 NDR_PULL_ALLOC(ndr, r->in.group_handle);
8295 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8296 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8297 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8298 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8299 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
8300 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
8302 if (flags & NDR_OUT) {
8303 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8305 return NDR_ERR_SUCCESS;
8308 _PUBLIC_ void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetMemberAttributesOfGroup *r)
8310 ndr_print_struct(ndr, name, "samr_SetMemberAttributesOfGroup");
8311 ndr->depth++;
8312 if (flags & NDR_SET_VALUES) {
8313 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8315 if (flags & NDR_IN) {
8316 ndr_print_struct(ndr, "in", "samr_SetMemberAttributesOfGroup");
8317 ndr->depth++;
8318 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8319 ndr->depth++;
8320 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8321 ndr->depth--;
8322 ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
8323 ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
8324 ndr->depth--;
8326 if (flags & NDR_OUT) {
8327 ndr_print_struct(ndr, "out", "samr_SetMemberAttributesOfGroup");
8328 ndr->depth++;
8329 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8330 ndr->depth--;
8332 ndr->depth--;
8335 static enum ndr_err_code ndr_push_samr_OpenAlias(struct ndr_push *ndr, int flags, const struct samr_OpenAlias *r)
8337 if (flags & NDR_IN) {
8338 if (r->in.domain_handle == NULL) {
8339 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8341 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8342 NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
8343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
8345 if (flags & NDR_OUT) {
8346 if (r->out.alias_handle == NULL) {
8347 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8349 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
8350 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8352 return NDR_ERR_SUCCESS;
8355 static enum ndr_err_code ndr_pull_samr_OpenAlias(struct ndr_pull *ndr, int flags, struct samr_OpenAlias *r)
8357 TALLOC_CTX *_mem_save_domain_handle_0;
8358 TALLOC_CTX *_mem_save_alias_handle_0;
8359 if (flags & NDR_IN) {
8360 ZERO_STRUCT(r->out);
8362 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8363 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8365 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8366 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
8367 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8368 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
8369 NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
8370 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8371 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
8372 ZERO_STRUCTP(r->out.alias_handle);
8374 if (flags & NDR_OUT) {
8375 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8376 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
8378 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8379 NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8380 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
8381 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8382 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8384 return NDR_ERR_SUCCESS;
8387 _PUBLIC_ void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenAlias *r)
8389 ndr_print_struct(ndr, name, "samr_OpenAlias");
8390 ndr->depth++;
8391 if (flags & NDR_SET_VALUES) {
8392 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8394 if (flags & NDR_IN) {
8395 ndr_print_struct(ndr, "in", "samr_OpenAlias");
8396 ndr->depth++;
8397 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
8398 ndr->depth++;
8399 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
8400 ndr->depth--;
8401 ndr_print_samr_AliasAccessMask(ndr, "access_mask", r->in.access_mask);
8402 ndr_print_uint32(ndr, "rid", r->in.rid);
8403 ndr->depth--;
8405 if (flags & NDR_OUT) {
8406 ndr_print_struct(ndr, "out", "samr_OpenAlias");
8407 ndr->depth++;
8408 ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle);
8409 ndr->depth++;
8410 ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle);
8411 ndr->depth--;
8412 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8413 ndr->depth--;
8415 ndr->depth--;
8418 static enum ndr_err_code ndr_push_samr_QueryAliasInfo(struct ndr_push *ndr, int flags, const struct samr_QueryAliasInfo *r)
8420 if (flags & NDR_IN) {
8421 if (r->in.alias_handle == NULL) {
8422 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8424 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8425 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, r->in.level));
8427 if (flags & NDR_OUT) {
8428 if (r->out.info == NULL) {
8429 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8431 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
8432 if (*r->out.info) {
8433 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
8434 NDR_CHECK(ndr_push_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
8436 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8438 return NDR_ERR_SUCCESS;
8441 static enum ndr_err_code ndr_pull_samr_QueryAliasInfo(struct ndr_pull *ndr, int flags, struct samr_QueryAliasInfo *r)
8443 uint32_t _ptr_info;
8444 TALLOC_CTX *_mem_save_alias_handle_0;
8445 TALLOC_CTX *_mem_save_info_0;
8446 TALLOC_CTX *_mem_save_info_1;
8447 if (flags & NDR_IN) {
8448 ZERO_STRUCT(r->out);
8450 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8451 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8453 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8454 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8455 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8456 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8457 NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr, NDR_SCALARS, &r->in.level));
8458 NDR_PULL_ALLOC(ndr, r->out.info);
8459 ZERO_STRUCTP(r->out.info);
8461 if (flags & NDR_OUT) {
8462 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8463 NDR_PULL_ALLOC(ndr, r->out.info);
8465 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8466 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
8467 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
8468 if (_ptr_info) {
8469 NDR_PULL_ALLOC(ndr, *r->out.info);
8470 } else {
8471 *r->out.info = NULL;
8473 if (*r->out.info) {
8474 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
8475 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
8476 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
8477 NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
8478 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
8480 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
8481 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8483 return NDR_ERR_SUCCESS;
8486 _PUBLIC_ void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryAliasInfo *r)
8488 ndr_print_struct(ndr, name, "samr_QueryAliasInfo");
8489 ndr->depth++;
8490 if (flags & NDR_SET_VALUES) {
8491 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8493 if (flags & NDR_IN) {
8494 ndr_print_struct(ndr, "in", "samr_QueryAliasInfo");
8495 ndr->depth++;
8496 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8497 ndr->depth++;
8498 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8499 ndr->depth--;
8500 ndr_print_samr_AliasInfoEnum(ndr, "level", r->in.level);
8501 ndr->depth--;
8503 if (flags & NDR_OUT) {
8504 ndr_print_struct(ndr, "out", "samr_QueryAliasInfo");
8505 ndr->depth++;
8506 ndr_print_ptr(ndr, "info", r->out.info);
8507 ndr->depth++;
8508 ndr_print_ptr(ndr, "info", *r->out.info);
8509 ndr->depth++;
8510 if (*r->out.info) {
8511 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
8512 ndr_print_samr_AliasInfo(ndr, "info", *r->out.info);
8514 ndr->depth--;
8515 ndr->depth--;
8516 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8517 ndr->depth--;
8519 ndr->depth--;
8522 static enum ndr_err_code ndr_push_samr_SetAliasInfo(struct ndr_push *ndr, int flags, const struct samr_SetAliasInfo *r)
8524 if (flags & NDR_IN) {
8525 if (r->in.alias_handle == NULL) {
8526 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8528 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8529 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, r->in.level));
8530 if (r->in.info == NULL) {
8531 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8533 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
8534 NDR_CHECK(ndr_push_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
8536 if (flags & NDR_OUT) {
8537 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8539 return NDR_ERR_SUCCESS;
8542 static enum ndr_err_code ndr_pull_samr_SetAliasInfo(struct ndr_pull *ndr, int flags, struct samr_SetAliasInfo *r)
8544 TALLOC_CTX *_mem_save_alias_handle_0;
8545 TALLOC_CTX *_mem_save_info_0;
8546 if (flags & NDR_IN) {
8547 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8548 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8550 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8551 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8552 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8553 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8554 NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr, NDR_SCALARS, &r->in.level));
8555 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8556 NDR_PULL_ALLOC(ndr, r->in.info);
8558 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8559 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
8560 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
8561 NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
8562 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
8564 if (flags & NDR_OUT) {
8565 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8567 return NDR_ERR_SUCCESS;
8570 _PUBLIC_ void ndr_print_samr_SetAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetAliasInfo *r)
8572 ndr_print_struct(ndr, name, "samr_SetAliasInfo");
8573 ndr->depth++;
8574 if (flags & NDR_SET_VALUES) {
8575 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8577 if (flags & NDR_IN) {
8578 ndr_print_struct(ndr, "in", "samr_SetAliasInfo");
8579 ndr->depth++;
8580 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8581 ndr->depth++;
8582 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8583 ndr->depth--;
8584 ndr_print_samr_AliasInfoEnum(ndr, "level", r->in.level);
8585 ndr_print_ptr(ndr, "info", r->in.info);
8586 ndr->depth++;
8587 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
8588 ndr_print_samr_AliasInfo(ndr, "info", r->in.info);
8589 ndr->depth--;
8590 ndr->depth--;
8592 if (flags & NDR_OUT) {
8593 ndr_print_struct(ndr, "out", "samr_SetAliasInfo");
8594 ndr->depth++;
8595 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8596 ndr->depth--;
8598 ndr->depth--;
8601 static enum ndr_err_code ndr_push_samr_DeleteDomAlias(struct ndr_push *ndr, int flags, const struct samr_DeleteDomAlias *r)
8603 if (flags & NDR_IN) {
8604 if (r->in.alias_handle == NULL) {
8605 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8607 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8609 if (flags & NDR_OUT) {
8610 if (r->out.alias_handle == NULL) {
8611 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8613 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
8614 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8616 return NDR_ERR_SUCCESS;
8619 static enum ndr_err_code ndr_pull_samr_DeleteDomAlias(struct ndr_pull *ndr, int flags, struct samr_DeleteDomAlias *r)
8621 TALLOC_CTX *_mem_save_alias_handle_0;
8622 if (flags & NDR_IN) {
8623 ZERO_STRUCT(r->out);
8625 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8626 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8628 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8629 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8630 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8631 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8632 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
8633 *r->out.alias_handle = *r->in.alias_handle;
8635 if (flags & NDR_OUT) {
8636 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8637 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
8639 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8640 NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8641 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
8642 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8643 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8645 return NDR_ERR_SUCCESS;
8648 _PUBLIC_ void ndr_print_samr_DeleteDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomAlias *r)
8650 ndr_print_struct(ndr, name, "samr_DeleteDomAlias");
8651 ndr->depth++;
8652 if (flags & NDR_SET_VALUES) {
8653 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8655 if (flags & NDR_IN) {
8656 ndr_print_struct(ndr, "in", "samr_DeleteDomAlias");
8657 ndr->depth++;
8658 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8659 ndr->depth++;
8660 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8661 ndr->depth--;
8662 ndr->depth--;
8664 if (flags & NDR_OUT) {
8665 ndr_print_struct(ndr, "out", "samr_DeleteDomAlias");
8666 ndr->depth++;
8667 ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle);
8668 ndr->depth++;
8669 ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle);
8670 ndr->depth--;
8671 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8672 ndr->depth--;
8674 ndr->depth--;
8677 static enum ndr_err_code ndr_push_samr_AddAliasMember(struct ndr_push *ndr, int flags, const struct samr_AddAliasMember *r)
8679 if (flags & NDR_IN) {
8680 if (r->in.alias_handle == NULL) {
8681 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8683 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8684 if (r->in.sid == NULL) {
8685 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8687 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8689 if (flags & NDR_OUT) {
8690 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8692 return NDR_ERR_SUCCESS;
8695 static enum ndr_err_code ndr_pull_samr_AddAliasMember(struct ndr_pull *ndr, int flags, struct samr_AddAliasMember *r)
8697 TALLOC_CTX *_mem_save_alias_handle_0;
8698 TALLOC_CTX *_mem_save_sid_0;
8699 if (flags & NDR_IN) {
8700 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8701 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8703 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8704 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8705 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8707 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8708 NDR_PULL_ALLOC(ndr, r->in.sid);
8710 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8711 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8712 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8713 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8715 if (flags & NDR_OUT) {
8716 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8718 return NDR_ERR_SUCCESS;
8721 _PUBLIC_ void ndr_print_samr_AddAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddAliasMember *r)
8723 ndr_print_struct(ndr, name, "samr_AddAliasMember");
8724 ndr->depth++;
8725 if (flags & NDR_SET_VALUES) {
8726 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8728 if (flags & NDR_IN) {
8729 ndr_print_struct(ndr, "in", "samr_AddAliasMember");
8730 ndr->depth++;
8731 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8732 ndr->depth++;
8733 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8734 ndr->depth--;
8735 ndr_print_ptr(ndr, "sid", r->in.sid);
8736 ndr->depth++;
8737 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8738 ndr->depth--;
8739 ndr->depth--;
8741 if (flags & NDR_OUT) {
8742 ndr_print_struct(ndr, "out", "samr_AddAliasMember");
8743 ndr->depth++;
8744 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8745 ndr->depth--;
8747 ndr->depth--;
8750 static enum ndr_err_code ndr_push_samr_DeleteAliasMember(struct ndr_push *ndr, int flags, const struct samr_DeleteAliasMember *r)
8752 if (flags & NDR_IN) {
8753 if (r->in.alias_handle == NULL) {
8754 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8756 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8757 if (r->in.sid == NULL) {
8758 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8760 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8762 if (flags & NDR_OUT) {
8763 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8765 return NDR_ERR_SUCCESS;
8768 static enum ndr_err_code ndr_pull_samr_DeleteAliasMember(struct ndr_pull *ndr, int flags, struct samr_DeleteAliasMember *r)
8770 TALLOC_CTX *_mem_save_alias_handle_0;
8771 TALLOC_CTX *_mem_save_sid_0;
8772 if (flags & NDR_IN) {
8773 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8774 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8776 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8777 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8778 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8779 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8780 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8781 NDR_PULL_ALLOC(ndr, r->in.sid);
8783 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8784 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8785 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8786 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8788 if (flags & NDR_OUT) {
8789 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8791 return NDR_ERR_SUCCESS;
8794 _PUBLIC_ void ndr_print_samr_DeleteAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteAliasMember *r)
8796 ndr_print_struct(ndr, name, "samr_DeleteAliasMember");
8797 ndr->depth++;
8798 if (flags & NDR_SET_VALUES) {
8799 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8801 if (flags & NDR_IN) {
8802 ndr_print_struct(ndr, "in", "samr_DeleteAliasMember");
8803 ndr->depth++;
8804 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8805 ndr->depth++;
8806 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8807 ndr->depth--;
8808 ndr_print_ptr(ndr, "sid", r->in.sid);
8809 ndr->depth++;
8810 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8811 ndr->depth--;
8812 ndr->depth--;
8814 if (flags & NDR_OUT) {
8815 ndr_print_struct(ndr, "out", "samr_DeleteAliasMember");
8816 ndr->depth++;
8817 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8818 ndr->depth--;
8820 ndr->depth--;
8823 static enum ndr_err_code ndr_push_samr_GetMembersInAlias(struct ndr_push *ndr, int flags, const struct samr_GetMembersInAlias *r)
8825 if (flags & NDR_IN) {
8826 if (r->in.alias_handle == NULL) {
8827 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8829 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8831 if (flags & NDR_OUT) {
8832 if (r->out.sids == NULL) {
8833 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8835 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8836 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8838 return NDR_ERR_SUCCESS;
8841 static enum ndr_err_code ndr_pull_samr_GetMembersInAlias(struct ndr_pull *ndr, int flags, struct samr_GetMembersInAlias *r)
8843 TALLOC_CTX *_mem_save_alias_handle_0;
8844 TALLOC_CTX *_mem_save_sids_0;
8845 if (flags & NDR_IN) {
8846 ZERO_STRUCT(r->out);
8848 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8849 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8851 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8852 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8853 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8854 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8855 NDR_PULL_ALLOC(ndr, r->out.sids);
8856 ZERO_STRUCTP(r->out.sids);
8858 if (flags & NDR_OUT) {
8859 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8860 NDR_PULL_ALLOC(ndr, r->out.sids);
8862 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8863 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
8864 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8865 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
8866 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8868 return NDR_ERR_SUCCESS;
8871 _PUBLIC_ void ndr_print_samr_GetMembersInAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetMembersInAlias *r)
8873 ndr_print_struct(ndr, name, "samr_GetMembersInAlias");
8874 ndr->depth++;
8875 if (flags & NDR_SET_VALUES) {
8876 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8878 if (flags & NDR_IN) {
8879 ndr_print_struct(ndr, "in", "samr_GetMembersInAlias");
8880 ndr->depth++;
8881 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8882 ndr->depth++;
8883 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8884 ndr->depth--;
8885 ndr->depth--;
8887 if (flags & NDR_OUT) {
8888 ndr_print_struct(ndr, "out", "samr_GetMembersInAlias");
8889 ndr->depth++;
8890 ndr_print_ptr(ndr, "sids", r->out.sids);
8891 ndr->depth++;
8892 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
8893 ndr->depth--;
8894 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8895 ndr->depth--;
8897 ndr->depth--;
8900 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenUser(struct ndr_push *ndr, int flags, const struct samr_OpenUser *r)
8902 if (flags & NDR_IN) {
8903 if (r->in.domain_handle == NULL) {
8904 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8906 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8907 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
8908 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
8910 if (flags & NDR_OUT) {
8911 if (r->out.user_handle == NULL) {
8912 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8914 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
8915 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8917 return NDR_ERR_SUCCESS;
8920 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenUser(struct ndr_pull *ndr, int flags, struct samr_OpenUser *r)
8922 TALLOC_CTX *_mem_save_domain_handle_0;
8923 TALLOC_CTX *_mem_save_user_handle_0;
8924 if (flags & NDR_IN) {
8925 ZERO_STRUCT(r->out);
8927 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8928 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8930 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8931 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
8932 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8933 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
8934 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
8935 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8936 NDR_PULL_ALLOC(ndr, r->out.user_handle);
8937 ZERO_STRUCTP(r->out.user_handle);
8939 if (flags & NDR_OUT) {
8940 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8941 NDR_PULL_ALLOC(ndr, r->out.user_handle);
8943 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8944 NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
8945 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
8946 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
8947 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8949 return NDR_ERR_SUCCESS;
8952 _PUBLIC_ void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenUser *r)
8954 ndr_print_struct(ndr, name, "samr_OpenUser");
8955 ndr->depth++;
8956 if (flags & NDR_SET_VALUES) {
8957 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8959 if (flags & NDR_IN) {
8960 ndr_print_struct(ndr, "in", "samr_OpenUser");
8961 ndr->depth++;
8962 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
8963 ndr->depth++;
8964 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
8965 ndr->depth--;
8966 ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask);
8967 ndr_print_uint32(ndr, "rid", r->in.rid);
8968 ndr->depth--;
8970 if (flags & NDR_OUT) {
8971 ndr_print_struct(ndr, "out", "samr_OpenUser");
8972 ndr->depth++;
8973 ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
8974 ndr->depth++;
8975 ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
8976 ndr->depth--;
8977 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8978 ndr->depth--;
8980 ndr->depth--;
8983 static enum ndr_err_code ndr_push_samr_DeleteUser(struct ndr_push *ndr, int flags, const struct samr_DeleteUser *r)
8985 if (flags & NDR_IN) {
8986 if (r->in.user_handle == NULL) {
8987 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8989 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
8991 if (flags & NDR_OUT) {
8992 if (r->out.user_handle == NULL) {
8993 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8995 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
8996 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8998 return NDR_ERR_SUCCESS;
9001 static enum ndr_err_code ndr_pull_samr_DeleteUser(struct ndr_pull *ndr, int flags, struct samr_DeleteUser *r)
9003 TALLOC_CTX *_mem_save_user_handle_0;
9004 if (flags & NDR_IN) {
9005 ZERO_STRUCT(r->out);
9007 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9008 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9010 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9011 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9012 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9014 NDR_PULL_ALLOC(ndr, r->out.user_handle);
9015 *r->out.user_handle = *r->in.user_handle;
9017 if (flags & NDR_OUT) {
9018 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9019 NDR_PULL_ALLOC(ndr, r->out.user_handle);
9021 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9022 NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
9023 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
9024 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9025 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9027 return NDR_ERR_SUCCESS;
9030 _PUBLIC_ void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteUser *r)
9032 ndr_print_struct(ndr, name, "samr_DeleteUser");
9033 ndr->depth++;
9034 if (flags & NDR_SET_VALUES) {
9035 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9037 if (flags & NDR_IN) {
9038 ndr_print_struct(ndr, "in", "samr_DeleteUser");
9039 ndr->depth++;
9040 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9041 ndr->depth++;
9042 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9043 ndr->depth--;
9044 ndr->depth--;
9046 if (flags & NDR_OUT) {
9047 ndr_print_struct(ndr, "out", "samr_DeleteUser");
9048 ndr->depth++;
9049 ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
9050 ndr->depth++;
9051 ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
9052 ndr->depth--;
9053 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9054 ndr->depth--;
9056 ndr->depth--;
9059 _PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo *r)
9061 if (flags & NDR_IN) {
9062 if (r->in.user_handle == NULL) {
9063 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9065 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9066 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
9068 if (flags & NDR_OUT) {
9069 if (r->out.info == NULL) {
9070 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9072 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9073 if (*r->out.info) {
9074 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9075 NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9077 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9079 return NDR_ERR_SUCCESS;
9082 _PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r)
9084 uint32_t _ptr_info;
9085 TALLOC_CTX *_mem_save_user_handle_0;
9086 TALLOC_CTX *_mem_save_info_0;
9087 TALLOC_CTX *_mem_save_info_1;
9088 if (flags & NDR_IN) {
9089 ZERO_STRUCT(r->out);
9091 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9092 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9094 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9095 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9096 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9098 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
9099 NDR_PULL_ALLOC(ndr, r->out.info);
9100 ZERO_STRUCTP(r->out.info);
9102 if (flags & NDR_OUT) {
9103 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9104 NDR_PULL_ALLOC(ndr, r->out.info);
9106 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9107 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9108 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9109 if (_ptr_info) {
9110 NDR_PULL_ALLOC(ndr, *r->out.info);
9111 } else {
9112 *r->out.info = NULL;
9114 if (*r->out.info) {
9115 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9116 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9117 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9118 NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9121 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9122 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9124 return NDR_ERR_SUCCESS;
9127 _PUBLIC_ void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo *r)
9129 ndr_print_struct(ndr, name, "samr_QueryUserInfo");
9130 ndr->depth++;
9131 if (flags & NDR_SET_VALUES) {
9132 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9134 if (flags & NDR_IN) {
9135 ndr_print_struct(ndr, "in", "samr_QueryUserInfo");
9136 ndr->depth++;
9137 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9138 ndr->depth++;
9139 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9140 ndr->depth--;
9141 ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
9142 ndr->depth--;
9144 if (flags & NDR_OUT) {
9145 ndr_print_struct(ndr, "out", "samr_QueryUserInfo");
9146 ndr->depth++;
9147 ndr_print_ptr(ndr, "info", r->out.info);
9148 ndr->depth++;
9149 ndr_print_ptr(ndr, "info", *r->out.info);
9150 ndr->depth++;
9151 if (*r->out.info) {
9152 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9153 ndr_print_samr_UserInfo(ndr, "info", *r->out.info);
9155 ndr->depth--;
9156 ndr->depth--;
9157 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9158 ndr->depth--;
9160 ndr->depth--;
9163 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo *r)
9165 if (flags & NDR_IN) {
9166 if (r->in.user_handle == NULL) {
9167 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9169 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9170 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
9171 if (r->in.info == NULL) {
9172 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9174 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9175 NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9177 if (flags & NDR_OUT) {
9178 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9180 return NDR_ERR_SUCCESS;
9183 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo *r)
9185 TALLOC_CTX *_mem_save_user_handle_0;
9186 TALLOC_CTX *_mem_save_info_0;
9187 if (flags & NDR_IN) {
9188 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9189 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9191 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9192 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9193 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9194 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9195 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
9196 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9197 NDR_PULL_ALLOC(ndr, r->in.info);
9199 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9200 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
9201 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9202 NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9203 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9205 if (flags & NDR_OUT) {
9206 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9208 return NDR_ERR_SUCCESS;
9211 _PUBLIC_ void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo *r)
9213 ndr_print_struct(ndr, name, "samr_SetUserInfo");
9214 ndr->depth++;
9215 if (flags & NDR_SET_VALUES) {
9216 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9218 if (flags & NDR_IN) {
9219 ndr_print_struct(ndr, "in", "samr_SetUserInfo");
9220 ndr->depth++;
9221 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9222 ndr->depth++;
9223 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9224 ndr->depth--;
9225 ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
9226 ndr_print_ptr(ndr, "info", r->in.info);
9227 ndr->depth++;
9228 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9229 ndr_print_samr_UserInfo(ndr, "info", r->in.info);
9230 ndr->depth--;
9231 ndr->depth--;
9233 if (flags & NDR_OUT) {
9234 ndr_print_struct(ndr, "out", "samr_SetUserInfo");
9235 ndr->depth++;
9236 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9237 ndr->depth--;
9239 ndr->depth--;
9242 static enum ndr_err_code ndr_push_samr_ChangePasswordUser(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser *r)
9244 if (flags & NDR_IN) {
9245 if (r->in.user_handle == NULL) {
9246 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9248 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9249 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_present));
9250 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_lm_crypted));
9251 if (r->in.old_lm_crypted) {
9252 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.old_lm_crypted));
9254 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_lm_crypted));
9255 if (r->in.new_lm_crypted) {
9256 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_lm_crypted));
9258 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.nt_present));
9259 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_nt_crypted));
9260 if (r->in.old_nt_crypted) {
9261 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.old_nt_crypted));
9263 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_nt_crypted));
9264 if (r->in.new_nt_crypted) {
9265 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_nt_crypted));
9267 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.cross1_present));
9268 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_cross));
9269 if (r->in.nt_cross) {
9270 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_cross));
9272 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.cross2_present));
9273 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_cross));
9274 if (r->in.lm_cross) {
9275 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_cross));
9278 if (flags & NDR_OUT) {
9279 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9281 return NDR_ERR_SUCCESS;
9284 static enum ndr_err_code ndr_pull_samr_ChangePasswordUser(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser *r)
9286 uint32_t _ptr_old_lm_crypted;
9287 uint32_t _ptr_new_lm_crypted;
9288 uint32_t _ptr_old_nt_crypted;
9289 uint32_t _ptr_new_nt_crypted;
9290 uint32_t _ptr_nt_cross;
9291 uint32_t _ptr_lm_cross;
9292 TALLOC_CTX *_mem_save_user_handle_0;
9293 TALLOC_CTX *_mem_save_old_lm_crypted_0;
9294 TALLOC_CTX *_mem_save_new_lm_crypted_0;
9295 TALLOC_CTX *_mem_save_old_nt_crypted_0;
9296 TALLOC_CTX *_mem_save_new_nt_crypted_0;
9297 TALLOC_CTX *_mem_save_nt_cross_0;
9298 TALLOC_CTX *_mem_save_lm_cross_0;
9299 if (flags & NDR_IN) {
9300 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9301 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9303 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9304 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9305 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9307 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_present));
9308 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_lm_crypted));
9309 if (_ptr_old_lm_crypted) {
9310 NDR_PULL_ALLOC(ndr, r->in.old_lm_crypted);
9311 } else {
9312 r->in.old_lm_crypted = NULL;
9314 if (r->in.old_lm_crypted) {
9315 _mem_save_old_lm_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
9316 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_lm_crypted, 0);
9317 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.old_lm_crypted));
9318 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_lm_crypted_0, 0);
9320 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_lm_crypted));
9321 if (_ptr_new_lm_crypted) {
9322 NDR_PULL_ALLOC(ndr, r->in.new_lm_crypted);
9323 } else {
9324 r->in.new_lm_crypted = NULL;
9326 if (r->in.new_lm_crypted) {
9327 _mem_save_new_lm_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
9328 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_lm_crypted, 0);
9329 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_lm_crypted));
9330 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_lm_crypted_0, 0);
9332 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.nt_present));
9333 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_nt_crypted));
9334 if (_ptr_old_nt_crypted) {
9335 NDR_PULL_ALLOC(ndr, r->in.old_nt_crypted);
9336 } else {
9337 r->in.old_nt_crypted = NULL;
9339 if (r->in.old_nt_crypted) {
9340 _mem_save_old_nt_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
9341 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_nt_crypted, 0);
9342 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.old_nt_crypted));
9343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_nt_crypted_0, 0);
9345 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_nt_crypted));
9346 if (_ptr_new_nt_crypted) {
9347 NDR_PULL_ALLOC(ndr, r->in.new_nt_crypted);
9348 } else {
9349 r->in.new_nt_crypted = NULL;
9351 if (r->in.new_nt_crypted) {
9352 _mem_save_new_nt_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
9353 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_nt_crypted, 0);
9354 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_nt_crypted));
9355 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_nt_crypted_0, 0);
9357 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.cross1_present));
9358 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_cross));
9359 if (_ptr_nt_cross) {
9360 NDR_PULL_ALLOC(ndr, r->in.nt_cross);
9361 } else {
9362 r->in.nt_cross = NULL;
9364 if (r->in.nt_cross) {
9365 _mem_save_nt_cross_0 = NDR_PULL_GET_MEM_CTX(ndr);
9366 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_cross, 0);
9367 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_cross));
9368 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_cross_0, 0);
9370 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.cross2_present));
9371 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_cross));
9372 if (_ptr_lm_cross) {
9373 NDR_PULL_ALLOC(ndr, r->in.lm_cross);
9374 } else {
9375 r->in.lm_cross = NULL;
9377 if (r->in.lm_cross) {
9378 _mem_save_lm_cross_0 = NDR_PULL_GET_MEM_CTX(ndr);
9379 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_cross, 0);
9380 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_cross));
9381 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_cross_0, 0);
9384 if (flags & NDR_OUT) {
9385 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9387 return NDR_ERR_SUCCESS;
9390 _PUBLIC_ void ndr_print_samr_ChangePasswordUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser *r)
9392 ndr_print_struct(ndr, name, "samr_ChangePasswordUser");
9393 ndr->depth++;
9394 if (flags & NDR_SET_VALUES) {
9395 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9397 if (flags & NDR_IN) {
9398 ndr_print_struct(ndr, "in", "samr_ChangePasswordUser");
9399 ndr->depth++;
9400 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9401 ndr->depth++;
9402 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9403 ndr->depth--;
9404 ndr_print_uint8(ndr, "lm_present", r->in.lm_present);
9405 ndr_print_ptr(ndr, "old_lm_crypted", r->in.old_lm_crypted);
9406 ndr->depth++;
9407 if (r->in.old_lm_crypted) {
9408 ndr_print_samr_Password(ndr, "old_lm_crypted", r->in.old_lm_crypted);
9410 ndr->depth--;
9411 ndr_print_ptr(ndr, "new_lm_crypted", r->in.new_lm_crypted);
9412 ndr->depth++;
9413 if (r->in.new_lm_crypted) {
9414 ndr_print_samr_Password(ndr, "new_lm_crypted", r->in.new_lm_crypted);
9416 ndr->depth--;
9417 ndr_print_uint8(ndr, "nt_present", r->in.nt_present);
9418 ndr_print_ptr(ndr, "old_nt_crypted", r->in.old_nt_crypted);
9419 ndr->depth++;
9420 if (r->in.old_nt_crypted) {
9421 ndr_print_samr_Password(ndr, "old_nt_crypted", r->in.old_nt_crypted);
9423 ndr->depth--;
9424 ndr_print_ptr(ndr, "new_nt_crypted", r->in.new_nt_crypted);
9425 ndr->depth++;
9426 if (r->in.new_nt_crypted) {
9427 ndr_print_samr_Password(ndr, "new_nt_crypted", r->in.new_nt_crypted);
9429 ndr->depth--;
9430 ndr_print_uint8(ndr, "cross1_present", r->in.cross1_present);
9431 ndr_print_ptr(ndr, "nt_cross", r->in.nt_cross);
9432 ndr->depth++;
9433 if (r->in.nt_cross) {
9434 ndr_print_samr_Password(ndr, "nt_cross", r->in.nt_cross);
9436 ndr->depth--;
9437 ndr_print_uint8(ndr, "cross2_present", r->in.cross2_present);
9438 ndr_print_ptr(ndr, "lm_cross", r->in.lm_cross);
9439 ndr->depth++;
9440 if (r->in.lm_cross) {
9441 ndr_print_samr_Password(ndr, "lm_cross", r->in.lm_cross);
9443 ndr->depth--;
9444 ndr->depth--;
9446 if (flags & NDR_OUT) {
9447 ndr_print_struct(ndr, "out", "samr_ChangePasswordUser");
9448 ndr->depth++;
9449 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9450 ndr->depth--;
9452 ndr->depth--;
9455 static enum ndr_err_code ndr_push_samr_GetGroupsForUser(struct ndr_push *ndr, int flags, const struct samr_GetGroupsForUser *r)
9457 if (flags & NDR_IN) {
9458 if (r->in.user_handle == NULL) {
9459 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9461 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9463 if (flags & NDR_OUT) {
9464 if (r->out.rids == NULL) {
9465 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9467 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rids));
9468 if (*r->out.rids) {
9469 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
9471 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9473 return NDR_ERR_SUCCESS;
9476 static enum ndr_err_code ndr_pull_samr_GetGroupsForUser(struct ndr_pull *ndr, int flags, struct samr_GetGroupsForUser *r)
9478 uint32_t _ptr_rids;
9479 TALLOC_CTX *_mem_save_user_handle_0;
9480 TALLOC_CTX *_mem_save_rids_0;
9481 TALLOC_CTX *_mem_save_rids_1;
9482 if (flags & NDR_IN) {
9483 ZERO_STRUCT(r->out);
9485 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9486 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9488 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9489 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9490 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9491 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9492 NDR_PULL_ALLOC(ndr, r->out.rids);
9493 ZERO_STRUCTP(r->out.rids);
9495 if (flags & NDR_OUT) {
9496 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9497 NDR_PULL_ALLOC(ndr, r->out.rids);
9499 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
9500 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
9501 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
9502 if (_ptr_rids) {
9503 NDR_PULL_ALLOC(ndr, *r->out.rids);
9504 } else {
9505 *r->out.rids = NULL;
9507 if (*r->out.rids) {
9508 _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
9509 NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, 0);
9510 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
9511 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
9513 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
9514 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9516 return NDR_ERR_SUCCESS;
9519 _PUBLIC_ void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetGroupsForUser *r)
9521 ndr_print_struct(ndr, name, "samr_GetGroupsForUser");
9522 ndr->depth++;
9523 if (flags & NDR_SET_VALUES) {
9524 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9526 if (flags & NDR_IN) {
9527 ndr_print_struct(ndr, "in", "samr_GetGroupsForUser");
9528 ndr->depth++;
9529 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9530 ndr->depth++;
9531 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9532 ndr->depth--;
9533 ndr->depth--;
9535 if (flags & NDR_OUT) {
9536 ndr_print_struct(ndr, "out", "samr_GetGroupsForUser");
9537 ndr->depth++;
9538 ndr_print_ptr(ndr, "rids", r->out.rids);
9539 ndr->depth++;
9540 ndr_print_ptr(ndr, "rids", *r->out.rids);
9541 ndr->depth++;
9542 if (*r->out.rids) {
9543 ndr_print_samr_RidWithAttributeArray(ndr, "rids", *r->out.rids);
9545 ndr->depth--;
9546 ndr->depth--;
9547 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9548 ndr->depth--;
9550 ndr->depth--;
9553 static enum ndr_err_code ndr_push_samr_QueryDisplayInfo(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo *r)
9555 if (flags & NDR_IN) {
9556 if (r->in.domain_handle == NULL) {
9557 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9559 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9560 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
9561 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx));
9562 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries));
9563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
9565 if (flags & NDR_OUT) {
9566 if (r->out.total_size == NULL) {
9567 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size));
9570 if (r->out.returned_size == NULL) {
9571 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9573 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size));
9574 if (r->out.info == NULL) {
9575 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9577 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
9578 NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
9579 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9581 return NDR_ERR_SUCCESS;
9584 static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo *r)
9586 TALLOC_CTX *_mem_save_domain_handle_0;
9587 TALLOC_CTX *_mem_save_total_size_0;
9588 TALLOC_CTX *_mem_save_returned_size_0;
9589 TALLOC_CTX *_mem_save_info_0;
9590 if (flags & NDR_IN) {
9591 ZERO_STRUCT(r->out);
9593 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9594 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9596 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9597 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9598 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9599 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9600 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
9601 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx));
9602 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries));
9603 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
9604 NDR_PULL_ALLOC(ndr, r->out.total_size);
9605 ZERO_STRUCTP(r->out.total_size);
9606 NDR_PULL_ALLOC(ndr, r->out.returned_size);
9607 ZERO_STRUCTP(r->out.returned_size);
9608 NDR_PULL_ALLOC(ndr, r->out.info);
9609 ZERO_STRUCTP(r->out.info);
9611 if (flags & NDR_OUT) {
9612 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9613 NDR_PULL_ALLOC(ndr, r->out.total_size);
9615 _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
9616 NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC);
9617 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size));
9618 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC);
9619 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9620 NDR_PULL_ALLOC(ndr, r->out.returned_size);
9622 _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
9623 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC);
9624 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size));
9625 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC);
9626 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9627 NDR_PULL_ALLOC(ndr, r->out.info);
9629 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9630 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9631 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
9632 NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
9633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9634 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9636 return NDR_ERR_SUCCESS;
9639 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo *r)
9641 ndr_print_struct(ndr, name, "samr_QueryDisplayInfo");
9642 ndr->depth++;
9643 if (flags & NDR_SET_VALUES) {
9644 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9646 if (flags & NDR_IN) {
9647 ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo");
9648 ndr->depth++;
9649 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
9650 ndr->depth++;
9651 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
9652 ndr->depth--;
9653 ndr_print_uint16(ndr, "level", r->in.level);
9654 ndr_print_uint32(ndr, "start_idx", r->in.start_idx);
9655 ndr_print_uint32(ndr, "max_entries", r->in.max_entries);
9656 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
9657 ndr->depth--;
9659 if (flags & NDR_OUT) {
9660 ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo");
9661 ndr->depth++;
9662 ndr_print_ptr(ndr, "total_size", r->out.total_size);
9663 ndr->depth++;
9664 ndr_print_uint32(ndr, "total_size", *r->out.total_size);
9665 ndr->depth--;
9666 ndr_print_ptr(ndr, "returned_size", r->out.returned_size);
9667 ndr->depth++;
9668 ndr_print_uint32(ndr, "returned_size", *r->out.returned_size);
9669 ndr->depth--;
9670 ndr_print_ptr(ndr, "info", r->out.info);
9671 ndr->depth++;
9672 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
9673 ndr_print_samr_DispInfo(ndr, "info", r->out.info);
9674 ndr->depth--;
9675 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9676 ndr->depth--;
9678 ndr->depth--;
9681 static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex(struct ndr_push *ndr, int flags, const struct samr_GetDisplayEnumerationIndex *r)
9683 if (flags & NDR_IN) {
9684 if (r->in.domain_handle == NULL) {
9685 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9687 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9688 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
9689 if (r->in.name == NULL) {
9690 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9692 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9694 if (flags & NDR_OUT) {
9695 if (r->out.idx == NULL) {
9696 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9698 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.idx));
9699 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9701 return NDR_ERR_SUCCESS;
9704 static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex *r)
9706 TALLOC_CTX *_mem_save_domain_handle_0;
9707 TALLOC_CTX *_mem_save_name_0;
9708 TALLOC_CTX *_mem_save_idx_0;
9709 if (flags & NDR_IN) {
9710 ZERO_STRUCT(r->out);
9712 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9713 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9715 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9716 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9717 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9718 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9719 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
9720 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9721 NDR_PULL_ALLOC(ndr, r->in.name);
9723 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9724 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
9725 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
9727 NDR_PULL_ALLOC(ndr, r->out.idx);
9728 ZERO_STRUCTP(r->out.idx);
9730 if (flags & NDR_OUT) {
9731 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9732 NDR_PULL_ALLOC(ndr, r->out.idx);
9734 _mem_save_idx_0 = NDR_PULL_GET_MEM_CTX(ndr);
9735 NDR_PULL_SET_MEM_CTX(ndr, r->out.idx, LIBNDR_FLAG_REF_ALLOC);
9736 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.idx));
9737 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_idx_0, LIBNDR_FLAG_REF_ALLOC);
9738 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9740 return NDR_ERR_SUCCESS;
9743 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex *r)
9745 ndr_print_struct(ndr, name, "samr_GetDisplayEnumerationIndex");
9746 ndr->depth++;
9747 if (flags & NDR_SET_VALUES) {
9748 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9750 if (flags & NDR_IN) {
9751 ndr_print_struct(ndr, "in", "samr_GetDisplayEnumerationIndex");
9752 ndr->depth++;
9753 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
9754 ndr->depth++;
9755 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
9756 ndr->depth--;
9757 ndr_print_uint16(ndr, "level", r->in.level);
9758 ndr_print_ptr(ndr, "name", r->in.name);
9759 ndr->depth++;
9760 ndr_print_lsa_String(ndr, "name", r->in.name);
9761 ndr->depth--;
9762 ndr->depth--;
9764 if (flags & NDR_OUT) {
9765 ndr_print_struct(ndr, "out", "samr_GetDisplayEnumerationIndex");
9766 ndr->depth++;
9767 ndr_print_ptr(ndr, "idx", r->out.idx);
9768 ndr->depth++;
9769 ndr_print_uint32(ndr, "idx", *r->out.idx);
9770 ndr->depth--;
9771 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9772 ndr->depth--;
9774 ndr->depth--;
9777 static enum ndr_err_code ndr_push_samr_TestPrivateFunctionsDomain(struct ndr_push *ndr, int flags, const struct samr_TestPrivateFunctionsDomain *r)
9779 if (flags & NDR_IN) {
9780 if (r->in.domain_handle == NULL) {
9781 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9783 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9785 if (flags & NDR_OUT) {
9786 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9788 return NDR_ERR_SUCCESS;
9791 static enum ndr_err_code ndr_pull_samr_TestPrivateFunctionsDomain(struct ndr_pull *ndr, int flags, struct samr_TestPrivateFunctionsDomain *r)
9793 TALLOC_CTX *_mem_save_domain_handle_0;
9794 if (flags & NDR_IN) {
9795 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9796 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9798 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9799 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9800 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9801 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9803 if (flags & NDR_OUT) {
9804 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9806 return NDR_ERR_SUCCESS;
9809 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsDomain *r)
9811 ndr_print_struct(ndr, name, "samr_TestPrivateFunctionsDomain");
9812 ndr->depth++;
9813 if (flags & NDR_SET_VALUES) {
9814 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9816 if (flags & NDR_IN) {
9817 ndr_print_struct(ndr, "in", "samr_TestPrivateFunctionsDomain");
9818 ndr->depth++;
9819 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
9820 ndr->depth++;
9821 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
9822 ndr->depth--;
9823 ndr->depth--;
9825 if (flags & NDR_OUT) {
9826 ndr_print_struct(ndr, "out", "samr_TestPrivateFunctionsDomain");
9827 ndr->depth++;
9828 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9829 ndr->depth--;
9831 ndr->depth--;
9834 static enum ndr_err_code ndr_push_samr_TestPrivateFunctionsUser(struct ndr_push *ndr, int flags, const struct samr_TestPrivateFunctionsUser *r)
9836 if (flags & NDR_IN) {
9837 if (r->in.user_handle == NULL) {
9838 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9840 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9842 if (flags & NDR_OUT) {
9843 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9845 return NDR_ERR_SUCCESS;
9848 static enum ndr_err_code ndr_pull_samr_TestPrivateFunctionsUser(struct ndr_pull *ndr, int flags, struct samr_TestPrivateFunctionsUser *r)
9850 TALLOC_CTX *_mem_save_user_handle_0;
9851 if (flags & NDR_IN) {
9852 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9853 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9855 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9856 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9857 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9860 if (flags & NDR_OUT) {
9861 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9863 return NDR_ERR_SUCCESS;
9866 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsUser *r)
9868 ndr_print_struct(ndr, name, "samr_TestPrivateFunctionsUser");
9869 ndr->depth++;
9870 if (flags & NDR_SET_VALUES) {
9871 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9873 if (flags & NDR_IN) {
9874 ndr_print_struct(ndr, "in", "samr_TestPrivateFunctionsUser");
9875 ndr->depth++;
9876 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9877 ndr->depth++;
9878 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9879 ndr->depth--;
9880 ndr->depth--;
9882 if (flags & NDR_OUT) {
9883 ndr_print_struct(ndr, "out", "samr_TestPrivateFunctionsUser");
9884 ndr->depth++;
9885 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9886 ndr->depth--;
9888 ndr->depth--;
9891 _PUBLIC_ enum ndr_err_code ndr_push_samr_GetUserPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetUserPwInfo *r)
9893 if (flags & NDR_IN) {
9894 if (r->in.user_handle == NULL) {
9895 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9897 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9899 if (flags & NDR_OUT) {
9900 if (r->out.info == NULL) {
9901 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9903 NDR_CHECK(ndr_push_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
9904 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9906 return NDR_ERR_SUCCESS;
9909 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GetUserPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetUserPwInfo *r)
9911 TALLOC_CTX *_mem_save_user_handle_0;
9912 TALLOC_CTX *_mem_save_info_0;
9913 if (flags & NDR_IN) {
9914 ZERO_STRUCT(r->out);
9916 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9917 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9919 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9920 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9921 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9922 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9923 NDR_PULL_ALLOC(ndr, r->out.info);
9924 ZERO_STRUCTP(r->out.info);
9926 if (flags & NDR_OUT) {
9927 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9928 NDR_PULL_ALLOC(ndr, r->out.info);
9930 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9931 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9932 NDR_CHECK(ndr_pull_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
9933 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9934 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9936 return NDR_ERR_SUCCESS;
9939 _PUBLIC_ void ndr_print_samr_GetUserPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetUserPwInfo *r)
9941 ndr_print_struct(ndr, name, "samr_GetUserPwInfo");
9942 ndr->depth++;
9943 if (flags & NDR_SET_VALUES) {
9944 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9946 if (flags & NDR_IN) {
9947 ndr_print_struct(ndr, "in", "samr_GetUserPwInfo");
9948 ndr->depth++;
9949 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9950 ndr->depth++;
9951 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9952 ndr->depth--;
9953 ndr->depth--;
9955 if (flags & NDR_OUT) {
9956 ndr_print_struct(ndr, "out", "samr_GetUserPwInfo");
9957 ndr->depth++;
9958 ndr_print_ptr(ndr, "info", r->out.info);
9959 ndr->depth++;
9960 ndr_print_samr_PwInfo(ndr, "info", r->out.info);
9961 ndr->depth--;
9962 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9963 ndr->depth--;
9965 ndr->depth--;
9968 static enum ndr_err_code ndr_push_samr_RemoveMemberFromForeignDomain(struct ndr_push *ndr, int flags, const struct samr_RemoveMemberFromForeignDomain *r)
9970 if (flags & NDR_IN) {
9971 if (r->in.domain_handle == NULL) {
9972 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9974 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9975 if (r->in.sid == NULL) {
9976 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9978 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
9980 if (flags & NDR_OUT) {
9981 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9983 return NDR_ERR_SUCCESS;
9986 static enum ndr_err_code ndr_pull_samr_RemoveMemberFromForeignDomain(struct ndr_pull *ndr, int flags, struct samr_RemoveMemberFromForeignDomain *r)
9988 TALLOC_CTX *_mem_save_domain_handle_0;
9989 TALLOC_CTX *_mem_save_sid_0;
9990 if (flags & NDR_IN) {
9991 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9992 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9994 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9995 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9996 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9997 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9998 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9999 NDR_PULL_ALLOC(ndr, r->in.sid);
10001 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
10002 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
10003 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
10004 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
10006 if (flags & NDR_OUT) {
10007 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10009 return NDR_ERR_SUCCESS;
10012 _PUBLIC_ void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMemberFromForeignDomain *r)
10014 ndr_print_struct(ndr, name, "samr_RemoveMemberFromForeignDomain");
10015 ndr->depth++;
10016 if (flags & NDR_SET_VALUES) {
10017 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10019 if (flags & NDR_IN) {
10020 ndr_print_struct(ndr, "in", "samr_RemoveMemberFromForeignDomain");
10021 ndr->depth++;
10022 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10023 ndr->depth++;
10024 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10025 ndr->depth--;
10026 ndr_print_ptr(ndr, "sid", r->in.sid);
10027 ndr->depth++;
10028 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
10029 ndr->depth--;
10030 ndr->depth--;
10032 if (flags & NDR_OUT) {
10033 ndr_print_struct(ndr, "out", "samr_RemoveMemberFromForeignDomain");
10034 ndr->depth++;
10035 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10036 ndr->depth--;
10038 ndr->depth--;
10041 static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryDomainInfo2 *r)
10043 if (flags & NDR_IN) {
10044 if (r->in.domain_handle == NULL) {
10045 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10047 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10048 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
10050 if (flags & NDR_OUT) {
10051 if (r->out.info == NULL) {
10052 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10054 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10055 if (*r->out.info) {
10056 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10057 NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10059 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10061 return NDR_ERR_SUCCESS;
10064 static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo2 *r)
10066 uint32_t _ptr_info;
10067 TALLOC_CTX *_mem_save_domain_handle_0;
10068 TALLOC_CTX *_mem_save_info_0;
10069 TALLOC_CTX *_mem_save_info_1;
10070 if (flags & NDR_IN) {
10071 ZERO_STRUCT(r->out);
10073 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10074 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10076 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10077 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10078 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10079 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10080 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
10081 NDR_PULL_ALLOC(ndr, r->out.info);
10082 ZERO_STRUCTP(r->out.info);
10084 if (flags & NDR_OUT) {
10085 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10086 NDR_PULL_ALLOC(ndr, r->out.info);
10088 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10089 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10090 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10091 if (_ptr_info) {
10092 NDR_PULL_ALLOC(ndr, *r->out.info);
10093 } else {
10094 *r->out.info = NULL;
10096 if (*r->out.info) {
10097 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10098 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10099 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10100 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10101 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10103 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10104 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10106 return NDR_ERR_SUCCESS;
10109 _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo2 *r)
10111 ndr_print_struct(ndr, name, "samr_QueryDomainInfo2");
10112 ndr->depth++;
10113 if (flags & NDR_SET_VALUES) {
10114 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10116 if (flags & NDR_IN) {
10117 ndr_print_struct(ndr, "in", "samr_QueryDomainInfo2");
10118 ndr->depth++;
10119 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10120 ndr->depth++;
10121 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10122 ndr->depth--;
10123 ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
10124 ndr->depth--;
10126 if (flags & NDR_OUT) {
10127 ndr_print_struct(ndr, "out", "samr_QueryDomainInfo2");
10128 ndr->depth++;
10129 ndr_print_ptr(ndr, "info", r->out.info);
10130 ndr->depth++;
10131 ndr_print_ptr(ndr, "info", *r->out.info);
10132 ndr->depth++;
10133 if (*r->out.info) {
10134 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10135 ndr_print_samr_DomainInfo(ndr, "info", *r->out.info);
10137 ndr->depth--;
10138 ndr->depth--;
10139 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10140 ndr->depth--;
10142 ndr->depth--;
10145 static enum ndr_err_code ndr_push_samr_QueryUserInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo2 *r)
10147 if (flags & NDR_IN) {
10148 if (r->in.user_handle == NULL) {
10149 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10151 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10152 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
10154 if (flags & NDR_OUT) {
10155 if (r->out.info == NULL) {
10156 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10158 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10159 if (*r->out.info) {
10160 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10161 NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10163 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10165 return NDR_ERR_SUCCESS;
10168 static enum ndr_err_code ndr_pull_samr_QueryUserInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo2 *r)
10170 uint32_t _ptr_info;
10171 TALLOC_CTX *_mem_save_user_handle_0;
10172 TALLOC_CTX *_mem_save_info_0;
10173 TALLOC_CTX *_mem_save_info_1;
10174 if (flags & NDR_IN) {
10175 ZERO_STRUCT(r->out);
10177 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10178 NDR_PULL_ALLOC(ndr, r->in.user_handle);
10180 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10181 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
10182 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10183 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
10184 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
10185 NDR_PULL_ALLOC(ndr, r->out.info);
10186 ZERO_STRUCTP(r->out.info);
10188 if (flags & NDR_OUT) {
10189 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10190 NDR_PULL_ALLOC(ndr, r->out.info);
10192 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10193 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10194 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10195 if (_ptr_info) {
10196 NDR_PULL_ALLOC(ndr, *r->out.info);
10197 } else {
10198 *r->out.info = NULL;
10200 if (*r->out.info) {
10201 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10202 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10203 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10204 NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10205 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10207 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10208 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10210 return NDR_ERR_SUCCESS;
10213 _PUBLIC_ void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo2 *r)
10215 ndr_print_struct(ndr, name, "samr_QueryUserInfo2");
10216 ndr->depth++;
10217 if (flags & NDR_SET_VALUES) {
10218 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10220 if (flags & NDR_IN) {
10221 ndr_print_struct(ndr, "in", "samr_QueryUserInfo2");
10222 ndr->depth++;
10223 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
10224 ndr->depth++;
10225 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
10226 ndr->depth--;
10227 ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
10228 ndr->depth--;
10230 if (flags & NDR_OUT) {
10231 ndr_print_struct(ndr, "out", "samr_QueryUserInfo2");
10232 ndr->depth++;
10233 ndr_print_ptr(ndr, "info", r->out.info);
10234 ndr->depth++;
10235 ndr_print_ptr(ndr, "info", *r->out.info);
10236 ndr->depth++;
10237 if (*r->out.info) {
10238 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10239 ndr_print_samr_UserInfo(ndr, "info", *r->out.info);
10241 ndr->depth--;
10242 ndr->depth--;
10243 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10244 ndr->depth--;
10246 ndr->depth--;
10249 static enum ndr_err_code ndr_push_samr_QueryDisplayInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo2 *r)
10251 if (flags & NDR_IN) {
10252 if (r->in.domain_handle == NULL) {
10253 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10255 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10256 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx));
10258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries));
10259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
10261 if (flags & NDR_OUT) {
10262 if (r->out.total_size == NULL) {
10263 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size));
10266 if (r->out.returned_size == NULL) {
10267 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size));
10270 if (r->out.info == NULL) {
10271 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10273 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
10274 NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10275 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10277 return NDR_ERR_SUCCESS;
10280 static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo2 *r)
10282 TALLOC_CTX *_mem_save_domain_handle_0;
10283 TALLOC_CTX *_mem_save_total_size_0;
10284 TALLOC_CTX *_mem_save_returned_size_0;
10285 TALLOC_CTX *_mem_save_info_0;
10286 if (flags & NDR_IN) {
10287 ZERO_STRUCT(r->out);
10289 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10290 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10292 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10293 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10294 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10295 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10296 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10297 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx));
10298 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries));
10299 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
10300 NDR_PULL_ALLOC(ndr, r->out.total_size);
10301 ZERO_STRUCTP(r->out.total_size);
10302 NDR_PULL_ALLOC(ndr, r->out.returned_size);
10303 ZERO_STRUCTP(r->out.returned_size);
10304 NDR_PULL_ALLOC(ndr, r->out.info);
10305 ZERO_STRUCTP(r->out.info);
10307 if (flags & NDR_OUT) {
10308 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10309 NDR_PULL_ALLOC(ndr, r->out.total_size);
10311 _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10312 NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC);
10313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size));
10314 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC);
10315 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10316 NDR_PULL_ALLOC(ndr, r->out.returned_size);
10318 _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10319 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC);
10320 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size));
10321 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC);
10322 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10323 NDR_PULL_ALLOC(ndr, r->out.info);
10325 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10326 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10327 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
10328 NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10329 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10330 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10332 return NDR_ERR_SUCCESS;
10335 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo2 *r)
10337 ndr_print_struct(ndr, name, "samr_QueryDisplayInfo2");
10338 ndr->depth++;
10339 if (flags & NDR_SET_VALUES) {
10340 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10342 if (flags & NDR_IN) {
10343 ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo2");
10344 ndr->depth++;
10345 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10346 ndr->depth++;
10347 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10348 ndr->depth--;
10349 ndr_print_uint16(ndr, "level", r->in.level);
10350 ndr_print_uint32(ndr, "start_idx", r->in.start_idx);
10351 ndr_print_uint32(ndr, "max_entries", r->in.max_entries);
10352 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
10353 ndr->depth--;
10355 if (flags & NDR_OUT) {
10356 ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo2");
10357 ndr->depth++;
10358 ndr_print_ptr(ndr, "total_size", r->out.total_size);
10359 ndr->depth++;
10360 ndr_print_uint32(ndr, "total_size", *r->out.total_size);
10361 ndr->depth--;
10362 ndr_print_ptr(ndr, "returned_size", r->out.returned_size);
10363 ndr->depth++;
10364 ndr_print_uint32(ndr, "returned_size", *r->out.returned_size);
10365 ndr->depth--;
10366 ndr_print_ptr(ndr, "info", r->out.info);
10367 ndr->depth++;
10368 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
10369 ndr_print_samr_DispInfo(ndr, "info", r->out.info);
10370 ndr->depth--;
10371 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10372 ndr->depth--;
10374 ndr->depth--;
10377 static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex2(struct ndr_push *ndr, int flags, const struct samr_GetDisplayEnumerationIndex2 *r)
10379 if (flags & NDR_IN) {
10380 if (r->in.domain_handle == NULL) {
10381 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10383 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10384 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10385 if (r->in.name == NULL) {
10386 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10388 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
10390 if (flags & NDR_OUT) {
10391 if (r->out.idx == NULL) {
10392 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.idx));
10395 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10397 return NDR_ERR_SUCCESS;
10400 static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex2(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex2 *r)
10402 TALLOC_CTX *_mem_save_domain_handle_0;
10403 TALLOC_CTX *_mem_save_name_0;
10404 TALLOC_CTX *_mem_save_idx_0;
10405 if (flags & NDR_IN) {
10406 ZERO_STRUCT(r->out);
10408 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10409 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10411 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10412 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10413 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10414 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10415 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10416 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10417 NDR_PULL_ALLOC(ndr, r->in.name);
10419 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10420 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
10421 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
10422 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
10423 NDR_PULL_ALLOC(ndr, r->out.idx);
10424 ZERO_STRUCTP(r->out.idx);
10426 if (flags & NDR_OUT) {
10427 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10428 NDR_PULL_ALLOC(ndr, r->out.idx);
10430 _mem_save_idx_0 = NDR_PULL_GET_MEM_CTX(ndr);
10431 NDR_PULL_SET_MEM_CTX(ndr, r->out.idx, LIBNDR_FLAG_REF_ALLOC);
10432 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.idx));
10433 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_idx_0, LIBNDR_FLAG_REF_ALLOC);
10434 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10436 return NDR_ERR_SUCCESS;
10439 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex2 *r)
10441 ndr_print_struct(ndr, name, "samr_GetDisplayEnumerationIndex2");
10442 ndr->depth++;
10443 if (flags & NDR_SET_VALUES) {
10444 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10446 if (flags & NDR_IN) {
10447 ndr_print_struct(ndr, "in", "samr_GetDisplayEnumerationIndex2");
10448 ndr->depth++;
10449 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10450 ndr->depth++;
10451 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10452 ndr->depth--;
10453 ndr_print_uint16(ndr, "level", r->in.level);
10454 ndr_print_ptr(ndr, "name", r->in.name);
10455 ndr->depth++;
10456 ndr_print_lsa_String(ndr, "name", r->in.name);
10457 ndr->depth--;
10458 ndr->depth--;
10460 if (flags & NDR_OUT) {
10461 ndr_print_struct(ndr, "out", "samr_GetDisplayEnumerationIndex2");
10462 ndr->depth++;
10463 ndr_print_ptr(ndr, "idx", r->out.idx);
10464 ndr->depth++;
10465 ndr_print_uint32(ndr, "idx", *r->out.idx);
10466 ndr->depth--;
10467 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10468 ndr->depth--;
10470 ndr->depth--;
10473 static enum ndr_err_code ndr_push_samr_CreateUser2(struct ndr_push *ndr, int flags, const struct samr_CreateUser2 *r)
10475 if (flags & NDR_IN) {
10476 if (r->in.domain_handle == NULL) {
10477 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10479 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10480 if (r->in.account_name == NULL) {
10481 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10483 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
10484 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags));
10485 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
10487 if (flags & NDR_OUT) {
10488 if (r->out.user_handle == NULL) {
10489 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10491 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
10492 if (r->out.access_granted == NULL) {
10493 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10495 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.access_granted));
10496 if (r->out.rid == NULL) {
10497 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
10500 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10502 return NDR_ERR_SUCCESS;
10505 static enum ndr_err_code ndr_pull_samr_CreateUser2(struct ndr_pull *ndr, int flags, struct samr_CreateUser2 *r)
10507 TALLOC_CTX *_mem_save_domain_handle_0;
10508 TALLOC_CTX *_mem_save_account_name_0;
10509 TALLOC_CTX *_mem_save_user_handle_0;
10510 TALLOC_CTX *_mem_save_access_granted_0;
10511 TALLOC_CTX *_mem_save_rid_0;
10512 if (flags & NDR_IN) {
10513 ZERO_STRUCT(r->out);
10515 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10516 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10518 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10519 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10520 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10521 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10522 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10523 NDR_PULL_ALLOC(ndr, r->in.account_name);
10525 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10526 NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
10527 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
10528 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
10529 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags));
10530 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
10531 NDR_PULL_ALLOC(ndr, r->out.user_handle);
10532 ZERO_STRUCTP(r->out.user_handle);
10533 NDR_PULL_ALLOC(ndr, r->out.access_granted);
10534 ZERO_STRUCTP(r->out.access_granted);
10535 NDR_PULL_ALLOC(ndr, r->out.rid);
10536 ZERO_STRUCTP(r->out.rid);
10538 if (flags & NDR_OUT) {
10539 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10540 NDR_PULL_ALLOC(ndr, r->out.user_handle);
10542 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10543 NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
10544 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
10545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
10546 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10547 NDR_PULL_ALLOC(ndr, r->out.access_granted);
10549 _mem_save_access_granted_0 = NDR_PULL_GET_MEM_CTX(ndr);
10550 NDR_PULL_SET_MEM_CTX(ndr, r->out.access_granted, LIBNDR_FLAG_REF_ALLOC);
10551 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.access_granted));
10552 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_granted_0, LIBNDR_FLAG_REF_ALLOC);
10553 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10554 NDR_PULL_ALLOC(ndr, r->out.rid);
10556 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
10557 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
10558 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
10559 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
10560 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10562 return NDR_ERR_SUCCESS;
10565 _PUBLIC_ void ndr_print_samr_CreateUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser2 *r)
10567 ndr_print_struct(ndr, name, "samr_CreateUser2");
10568 ndr->depth++;
10569 if (flags & NDR_SET_VALUES) {
10570 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10572 if (flags & NDR_IN) {
10573 ndr_print_struct(ndr, "in", "samr_CreateUser2");
10574 ndr->depth++;
10575 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10576 ndr->depth++;
10577 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10578 ndr->depth--;
10579 ndr_print_ptr(ndr, "account_name", r->in.account_name);
10580 ndr->depth++;
10581 ndr_print_lsa_String(ndr, "account_name", r->in.account_name);
10582 ndr->depth--;
10583 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags);
10584 ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask);
10585 ndr->depth--;
10587 if (flags & NDR_OUT) {
10588 ndr_print_struct(ndr, "out", "samr_CreateUser2");
10589 ndr->depth++;
10590 ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
10591 ndr->depth++;
10592 ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
10593 ndr->depth--;
10594 ndr_print_ptr(ndr, "access_granted", r->out.access_granted);
10595 ndr->depth++;
10596 ndr_print_uint32(ndr, "access_granted", *r->out.access_granted);
10597 ndr->depth--;
10598 ndr_print_ptr(ndr, "rid", r->out.rid);
10599 ndr->depth++;
10600 ndr_print_uint32(ndr, "rid", *r->out.rid);
10601 ndr->depth--;
10602 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10603 ndr->depth--;
10605 ndr->depth--;
10608 static enum ndr_err_code ndr_push_samr_QueryDisplayInfo3(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo3 *r)
10610 if (flags & NDR_IN) {
10611 if (r->in.domain_handle == NULL) {
10612 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10614 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10615 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx));
10617 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries));
10618 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
10620 if (flags & NDR_OUT) {
10621 if (r->out.total_size == NULL) {
10622 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size));
10625 if (r->out.returned_size == NULL) {
10626 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size));
10629 if (r->out.info == NULL) {
10630 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10632 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
10633 NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10634 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10636 return NDR_ERR_SUCCESS;
10639 static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo3(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo3 *r)
10641 TALLOC_CTX *_mem_save_domain_handle_0;
10642 TALLOC_CTX *_mem_save_total_size_0;
10643 TALLOC_CTX *_mem_save_returned_size_0;
10644 TALLOC_CTX *_mem_save_info_0;
10645 if (flags & NDR_IN) {
10646 ZERO_STRUCT(r->out);
10648 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10649 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10651 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10652 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10653 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10654 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10655 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10656 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx));
10657 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries));
10658 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
10659 NDR_PULL_ALLOC(ndr, r->out.total_size);
10660 ZERO_STRUCTP(r->out.total_size);
10661 NDR_PULL_ALLOC(ndr, r->out.returned_size);
10662 ZERO_STRUCTP(r->out.returned_size);
10663 NDR_PULL_ALLOC(ndr, r->out.info);
10664 ZERO_STRUCTP(r->out.info);
10666 if (flags & NDR_OUT) {
10667 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10668 NDR_PULL_ALLOC(ndr, r->out.total_size);
10670 _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10671 NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC);
10672 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size));
10673 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC);
10674 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10675 NDR_PULL_ALLOC(ndr, r->out.returned_size);
10677 _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10678 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC);
10679 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size));
10680 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC);
10681 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10682 NDR_PULL_ALLOC(ndr, r->out.info);
10684 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10685 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10686 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
10687 NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10688 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10689 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10691 return NDR_ERR_SUCCESS;
10694 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo3(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo3 *r)
10696 ndr_print_struct(ndr, name, "samr_QueryDisplayInfo3");
10697 ndr->depth++;
10698 if (flags & NDR_SET_VALUES) {
10699 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10701 if (flags & NDR_IN) {
10702 ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo3");
10703 ndr->depth++;
10704 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10705 ndr->depth++;
10706 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10707 ndr->depth--;
10708 ndr_print_uint16(ndr, "level", r->in.level);
10709 ndr_print_uint32(ndr, "start_idx", r->in.start_idx);
10710 ndr_print_uint32(ndr, "max_entries", r->in.max_entries);
10711 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
10712 ndr->depth--;
10714 if (flags & NDR_OUT) {
10715 ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo3");
10716 ndr->depth++;
10717 ndr_print_ptr(ndr, "total_size", r->out.total_size);
10718 ndr->depth++;
10719 ndr_print_uint32(ndr, "total_size", *r->out.total_size);
10720 ndr->depth--;
10721 ndr_print_ptr(ndr, "returned_size", r->out.returned_size);
10722 ndr->depth++;
10723 ndr_print_uint32(ndr, "returned_size", *r->out.returned_size);
10724 ndr->depth--;
10725 ndr_print_ptr(ndr, "info", r->out.info);
10726 ndr->depth++;
10727 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
10728 ndr_print_samr_DispInfo(ndr, "info", r->out.info);
10729 ndr->depth--;
10730 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10731 ndr->depth--;
10733 ndr->depth--;
10736 static enum ndr_err_code ndr_push_samr_AddMultipleMembersToAlias(struct ndr_push *ndr, int flags, const struct samr_AddMultipleMembersToAlias *r)
10738 if (flags & NDR_IN) {
10739 if (r->in.alias_handle == NULL) {
10740 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10742 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
10743 if (r->in.sids == NULL) {
10744 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10746 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10748 if (flags & NDR_OUT) {
10749 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10751 return NDR_ERR_SUCCESS;
10754 static enum ndr_err_code ndr_pull_samr_AddMultipleMembersToAlias(struct ndr_pull *ndr, int flags, struct samr_AddMultipleMembersToAlias *r)
10756 TALLOC_CTX *_mem_save_alias_handle_0;
10757 TALLOC_CTX *_mem_save_sids_0;
10758 if (flags & NDR_IN) {
10759 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10760 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
10762 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10763 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
10764 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
10765 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
10766 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10767 NDR_PULL_ALLOC(ndr, r->in.sids);
10769 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10770 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
10771 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10772 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
10774 if (flags & NDR_OUT) {
10775 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10777 return NDR_ERR_SUCCESS;
10780 _PUBLIC_ void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddMultipleMembersToAlias *r)
10782 ndr_print_struct(ndr, name, "samr_AddMultipleMembersToAlias");
10783 ndr->depth++;
10784 if (flags & NDR_SET_VALUES) {
10785 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10787 if (flags & NDR_IN) {
10788 ndr_print_struct(ndr, "in", "samr_AddMultipleMembersToAlias");
10789 ndr->depth++;
10790 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
10791 ndr->depth++;
10792 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
10793 ndr->depth--;
10794 ndr_print_ptr(ndr, "sids", r->in.sids);
10795 ndr->depth++;
10796 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
10797 ndr->depth--;
10798 ndr->depth--;
10800 if (flags & NDR_OUT) {
10801 ndr_print_struct(ndr, "out", "samr_AddMultipleMembersToAlias");
10802 ndr->depth++;
10803 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10804 ndr->depth--;
10806 ndr->depth--;
10809 static enum ndr_err_code ndr_push_samr_RemoveMultipleMembersFromAlias(struct ndr_push *ndr, int flags, const struct samr_RemoveMultipleMembersFromAlias *r)
10811 if (flags & NDR_IN) {
10812 if (r->in.alias_handle == NULL) {
10813 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10815 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
10816 if (r->in.sids == NULL) {
10817 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10819 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10821 if (flags & NDR_OUT) {
10822 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10824 return NDR_ERR_SUCCESS;
10827 static enum ndr_err_code ndr_pull_samr_RemoveMultipleMembersFromAlias(struct ndr_pull *ndr, int flags, struct samr_RemoveMultipleMembersFromAlias *r)
10829 TALLOC_CTX *_mem_save_alias_handle_0;
10830 TALLOC_CTX *_mem_save_sids_0;
10831 if (flags & NDR_IN) {
10832 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10833 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
10835 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10836 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
10837 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
10838 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
10839 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10840 NDR_PULL_ALLOC(ndr, r->in.sids);
10842 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10843 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
10844 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10845 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
10847 if (flags & NDR_OUT) {
10848 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10850 return NDR_ERR_SUCCESS;
10853 _PUBLIC_ void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMultipleMembersFromAlias *r)
10855 ndr_print_struct(ndr, name, "samr_RemoveMultipleMembersFromAlias");
10856 ndr->depth++;
10857 if (flags & NDR_SET_VALUES) {
10858 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10860 if (flags & NDR_IN) {
10861 ndr_print_struct(ndr, "in", "samr_RemoveMultipleMembersFromAlias");
10862 ndr->depth++;
10863 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
10864 ndr->depth++;
10865 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
10866 ndr->depth--;
10867 ndr_print_ptr(ndr, "sids", r->in.sids);
10868 ndr->depth++;
10869 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
10870 ndr->depth--;
10871 ndr->depth--;
10873 if (flags & NDR_OUT) {
10874 ndr_print_struct(ndr, "out", "samr_RemoveMultipleMembersFromAlias");
10875 ndr->depth++;
10876 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10877 ndr->depth--;
10879 ndr->depth--;
10882 static enum ndr_err_code ndr_push_samr_OemChangePasswordUser2(struct ndr_push *ndr, int flags, const struct samr_OemChangePasswordUser2 *r)
10884 if (flags & NDR_IN) {
10885 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
10886 if (r->in.server) {
10887 NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
10889 if (r->in.account == NULL) {
10890 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10892 NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
10893 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
10894 if (r->in.password) {
10895 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password));
10897 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hash));
10898 if (r->in.hash) {
10899 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.hash));
10902 if (flags & NDR_OUT) {
10903 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10905 return NDR_ERR_SUCCESS;
10908 static enum ndr_err_code ndr_pull_samr_OemChangePasswordUser2(struct ndr_pull *ndr, int flags, struct samr_OemChangePasswordUser2 *r)
10910 uint32_t _ptr_server;
10911 uint32_t _ptr_password;
10912 uint32_t _ptr_hash;
10913 TALLOC_CTX *_mem_save_server_0;
10914 TALLOC_CTX *_mem_save_account_0;
10915 TALLOC_CTX *_mem_save_password_0;
10916 TALLOC_CTX *_mem_save_hash_0;
10917 if (flags & NDR_IN) {
10918 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
10919 if (_ptr_server) {
10920 NDR_PULL_ALLOC(ndr, r->in.server);
10921 } else {
10922 r->in.server = NULL;
10924 if (r->in.server) {
10925 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
10926 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
10927 NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
10928 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
10930 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10931 NDR_PULL_ALLOC(ndr, r->in.account);
10933 _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
10934 NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
10935 NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
10936 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
10937 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
10938 if (_ptr_password) {
10939 NDR_PULL_ALLOC(ndr, r->in.password);
10940 } else {
10941 r->in.password = NULL;
10943 if (r->in.password) {
10944 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
10945 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
10946 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password));
10947 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
10949 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hash));
10950 if (_ptr_hash) {
10951 NDR_PULL_ALLOC(ndr, r->in.hash);
10952 } else {
10953 r->in.hash = NULL;
10955 if (r->in.hash) {
10956 _mem_save_hash_0 = NDR_PULL_GET_MEM_CTX(ndr);
10957 NDR_PULL_SET_MEM_CTX(ndr, r->in.hash, 0);
10958 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.hash));
10959 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hash_0, 0);
10962 if (flags & NDR_OUT) {
10963 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10965 return NDR_ERR_SUCCESS;
10968 _PUBLIC_ void ndr_print_samr_OemChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_OemChangePasswordUser2 *r)
10970 ndr_print_struct(ndr, name, "samr_OemChangePasswordUser2");
10971 ndr->depth++;
10972 if (flags & NDR_SET_VALUES) {
10973 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10975 if (flags & NDR_IN) {
10976 ndr_print_struct(ndr, "in", "samr_OemChangePasswordUser2");
10977 ndr->depth++;
10978 ndr_print_ptr(ndr, "server", r->in.server);
10979 ndr->depth++;
10980 if (r->in.server) {
10981 ndr_print_lsa_AsciiString(ndr, "server", r->in.server);
10983 ndr->depth--;
10984 ndr_print_ptr(ndr, "account", r->in.account);
10985 ndr->depth++;
10986 ndr_print_lsa_AsciiString(ndr, "account", r->in.account);
10987 ndr->depth--;
10988 ndr_print_ptr(ndr, "password", r->in.password);
10989 ndr->depth++;
10990 if (r->in.password) {
10991 ndr_print_samr_CryptPassword(ndr, "password", r->in.password);
10993 ndr->depth--;
10994 ndr_print_ptr(ndr, "hash", r->in.hash);
10995 ndr->depth++;
10996 if (r->in.hash) {
10997 ndr_print_samr_Password(ndr, "hash", r->in.hash);
10999 ndr->depth--;
11000 ndr->depth--;
11002 if (flags & NDR_OUT) {
11003 ndr_print_struct(ndr, "out", "samr_OemChangePasswordUser2");
11004 ndr->depth++;
11005 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11006 ndr->depth--;
11008 ndr->depth--;
11011 static enum ndr_err_code ndr_push_samr_ChangePasswordUser2(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser2 *r)
11013 if (flags & NDR_IN) {
11014 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
11015 if (r->in.server) {
11016 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
11018 if (r->in.account == NULL) {
11019 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11021 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
11022 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_password));
11023 if (r->in.nt_password) {
11024 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
11026 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_verifier));
11027 if (r->in.nt_verifier) {
11028 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
11030 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_change));
11031 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_password));
11032 if (r->in.lm_password) {
11033 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
11035 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_verifier));
11036 if (r->in.lm_verifier) {
11037 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
11040 if (flags & NDR_OUT) {
11041 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11043 return NDR_ERR_SUCCESS;
11046 static enum ndr_err_code ndr_pull_samr_ChangePasswordUser2(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser2 *r)
11048 uint32_t _ptr_server;
11049 uint32_t _ptr_nt_password;
11050 uint32_t _ptr_nt_verifier;
11051 uint32_t _ptr_lm_password;
11052 uint32_t _ptr_lm_verifier;
11053 TALLOC_CTX *_mem_save_server_0;
11054 TALLOC_CTX *_mem_save_account_0;
11055 TALLOC_CTX *_mem_save_nt_password_0;
11056 TALLOC_CTX *_mem_save_nt_verifier_0;
11057 TALLOC_CTX *_mem_save_lm_password_0;
11058 TALLOC_CTX *_mem_save_lm_verifier_0;
11059 if (flags & NDR_IN) {
11060 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
11061 if (_ptr_server) {
11062 NDR_PULL_ALLOC(ndr, r->in.server);
11063 } else {
11064 r->in.server = NULL;
11066 if (r->in.server) {
11067 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
11068 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
11069 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
11070 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
11072 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11073 NDR_PULL_ALLOC(ndr, r->in.account);
11075 _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
11076 NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
11077 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
11078 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
11079 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_password));
11080 if (_ptr_nt_password) {
11081 NDR_PULL_ALLOC(ndr, r->in.nt_password);
11082 } else {
11083 r->in.nt_password = NULL;
11085 if (r->in.nt_password) {
11086 _mem_save_nt_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11087 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_password, 0);
11088 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
11089 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_password_0, 0);
11091 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_verifier));
11092 if (_ptr_nt_verifier) {
11093 NDR_PULL_ALLOC(ndr, r->in.nt_verifier);
11094 } else {
11095 r->in.nt_verifier = NULL;
11097 if (r->in.nt_verifier) {
11098 _mem_save_nt_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
11099 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_verifier, 0);
11100 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
11101 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_verifier_0, 0);
11103 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_change));
11104 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_password));
11105 if (_ptr_lm_password) {
11106 NDR_PULL_ALLOC(ndr, r->in.lm_password);
11107 } else {
11108 r->in.lm_password = NULL;
11110 if (r->in.lm_password) {
11111 _mem_save_lm_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11112 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_password, 0);
11113 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
11114 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_password_0, 0);
11116 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_verifier));
11117 if (_ptr_lm_verifier) {
11118 NDR_PULL_ALLOC(ndr, r->in.lm_verifier);
11119 } else {
11120 r->in.lm_verifier = NULL;
11122 if (r->in.lm_verifier) {
11123 _mem_save_lm_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
11124 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_verifier, 0);
11125 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
11126 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_verifier_0, 0);
11129 if (flags & NDR_OUT) {
11130 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11132 return NDR_ERR_SUCCESS;
11135 _PUBLIC_ void ndr_print_samr_ChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser2 *r)
11137 ndr_print_struct(ndr, name, "samr_ChangePasswordUser2");
11138 ndr->depth++;
11139 if (flags & NDR_SET_VALUES) {
11140 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11142 if (flags & NDR_IN) {
11143 ndr_print_struct(ndr, "in", "samr_ChangePasswordUser2");
11144 ndr->depth++;
11145 ndr_print_ptr(ndr, "server", r->in.server);
11146 ndr->depth++;
11147 if (r->in.server) {
11148 ndr_print_lsa_String(ndr, "server", r->in.server);
11150 ndr->depth--;
11151 ndr_print_ptr(ndr, "account", r->in.account);
11152 ndr->depth++;
11153 ndr_print_lsa_String(ndr, "account", r->in.account);
11154 ndr->depth--;
11155 ndr_print_ptr(ndr, "nt_password", r->in.nt_password);
11156 ndr->depth++;
11157 if (r->in.nt_password) {
11158 ndr_print_samr_CryptPassword(ndr, "nt_password", r->in.nt_password);
11160 ndr->depth--;
11161 ndr_print_ptr(ndr, "nt_verifier", r->in.nt_verifier);
11162 ndr->depth++;
11163 if (r->in.nt_verifier) {
11164 ndr_print_samr_Password(ndr, "nt_verifier", r->in.nt_verifier);
11166 ndr->depth--;
11167 ndr_print_uint8(ndr, "lm_change", r->in.lm_change);
11168 ndr_print_ptr(ndr, "lm_password", r->in.lm_password);
11169 ndr->depth++;
11170 if (r->in.lm_password) {
11171 ndr_print_samr_CryptPassword(ndr, "lm_password", r->in.lm_password);
11173 ndr->depth--;
11174 ndr_print_ptr(ndr, "lm_verifier", r->in.lm_verifier);
11175 ndr->depth++;
11176 if (r->in.lm_verifier) {
11177 ndr_print_samr_Password(ndr, "lm_verifier", r->in.lm_verifier);
11179 ndr->depth--;
11180 ndr->depth--;
11182 if (flags & NDR_OUT) {
11183 ndr_print_struct(ndr, "out", "samr_ChangePasswordUser2");
11184 ndr->depth++;
11185 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11186 ndr->depth--;
11188 ndr->depth--;
11191 static enum ndr_err_code ndr_push_samr_GetDomPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetDomPwInfo *r)
11193 if (flags & NDR_IN) {
11194 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
11195 if (r->in.domain_name) {
11196 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
11199 if (flags & NDR_OUT) {
11200 if (r->out.info == NULL) {
11201 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11203 NDR_CHECK(ndr_push_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
11204 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11206 return NDR_ERR_SUCCESS;
11209 static enum ndr_err_code ndr_pull_samr_GetDomPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetDomPwInfo *r)
11211 uint32_t _ptr_domain_name;
11212 TALLOC_CTX *_mem_save_domain_name_0;
11213 TALLOC_CTX *_mem_save_info_0;
11214 if (flags & NDR_IN) {
11215 ZERO_STRUCT(r->out);
11217 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
11218 if (_ptr_domain_name) {
11219 NDR_PULL_ALLOC(ndr, r->in.domain_name);
11220 } else {
11221 r->in.domain_name = NULL;
11223 if (r->in.domain_name) {
11224 _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11225 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
11226 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
11227 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
11229 NDR_PULL_ALLOC(ndr, r->out.info);
11230 ZERO_STRUCTP(r->out.info);
11232 if (flags & NDR_OUT) {
11233 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11234 NDR_PULL_ALLOC(ndr, r->out.info);
11236 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11237 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
11238 NDR_CHECK(ndr_pull_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
11239 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11240 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11242 return NDR_ERR_SUCCESS;
11245 _PUBLIC_ void ndr_print_samr_GetDomPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDomPwInfo *r)
11247 ndr_print_struct(ndr, name, "samr_GetDomPwInfo");
11248 ndr->depth++;
11249 if (flags & NDR_SET_VALUES) {
11250 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11252 if (flags & NDR_IN) {
11253 ndr_print_struct(ndr, "in", "samr_GetDomPwInfo");
11254 ndr->depth++;
11255 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
11256 ndr->depth++;
11257 if (r->in.domain_name) {
11258 ndr_print_lsa_String(ndr, "domain_name", r->in.domain_name);
11260 ndr->depth--;
11261 ndr->depth--;
11263 if (flags & NDR_OUT) {
11264 ndr_print_struct(ndr, "out", "samr_GetDomPwInfo");
11265 ndr->depth++;
11266 ndr_print_ptr(ndr, "info", r->out.info);
11267 ndr->depth++;
11268 ndr_print_samr_PwInfo(ndr, "info", r->out.info);
11269 ndr->depth--;
11270 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11271 ndr->depth--;
11273 ndr->depth--;
11276 static enum ndr_err_code ndr_push_samr_Connect2(struct ndr_push *ndr, int flags, const struct samr_Connect2 *r)
11278 if (flags & NDR_IN) {
11279 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
11280 if (r->in.system_name) {
11281 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11282 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11283 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11284 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11286 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
11288 if (flags & NDR_OUT) {
11289 if (r->out.connect_handle == NULL) {
11290 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11292 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11293 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11295 return NDR_ERR_SUCCESS;
11298 static enum ndr_err_code ndr_pull_samr_Connect2(struct ndr_pull *ndr, int flags, struct samr_Connect2 *r)
11300 uint32_t _ptr_system_name;
11301 TALLOC_CTX *_mem_save_system_name_0;
11302 TALLOC_CTX *_mem_save_connect_handle_0;
11303 if (flags & NDR_IN) {
11304 ZERO_STRUCT(r->out);
11306 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
11307 if (_ptr_system_name) {
11308 NDR_PULL_ALLOC(ndr, r->in.system_name);
11309 } else {
11310 r->in.system_name = NULL;
11312 if (r->in.system_name) {
11313 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11314 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
11315 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
11316 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
11317 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
11318 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
11320 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
11321 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
11322 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
11324 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
11325 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11326 ZERO_STRUCTP(r->out.connect_handle);
11328 if (flags & NDR_OUT) {
11329 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11330 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11332 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11333 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
11334 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11335 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
11336 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11338 return NDR_ERR_SUCCESS;
11341 _PUBLIC_ void ndr_print_samr_Connect2(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect2 *r)
11343 ndr_print_struct(ndr, name, "samr_Connect2");
11344 ndr->depth++;
11345 if (flags & NDR_SET_VALUES) {
11346 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11348 if (flags & NDR_IN) {
11349 ndr_print_struct(ndr, "in", "samr_Connect2");
11350 ndr->depth++;
11351 ndr_print_ptr(ndr, "system_name", r->in.system_name);
11352 ndr->depth++;
11353 if (r->in.system_name) {
11354 ndr_print_string(ndr, "system_name", r->in.system_name);
11356 ndr->depth--;
11357 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
11358 ndr->depth--;
11360 if (flags & NDR_OUT) {
11361 ndr_print_struct(ndr, "out", "samr_Connect2");
11362 ndr->depth++;
11363 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
11364 ndr->depth++;
11365 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
11366 ndr->depth--;
11367 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11368 ndr->depth--;
11370 ndr->depth--;
11373 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo2(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo2 *r)
11375 if (flags & NDR_IN) {
11376 if (r->in.user_handle == NULL) {
11377 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11379 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
11380 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
11381 if (r->in.info == NULL) {
11382 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11384 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
11385 NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11387 if (flags & NDR_OUT) {
11388 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11390 return NDR_ERR_SUCCESS;
11393 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo2 *r)
11395 TALLOC_CTX *_mem_save_user_handle_0;
11396 TALLOC_CTX *_mem_save_info_0;
11397 if (flags & NDR_IN) {
11398 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11399 NDR_PULL_ALLOC(ndr, r->in.user_handle);
11401 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11402 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
11403 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
11404 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
11405 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
11406 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11407 NDR_PULL_ALLOC(ndr, r->in.info);
11409 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11410 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
11411 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
11412 NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11415 if (flags & NDR_OUT) {
11416 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11418 return NDR_ERR_SUCCESS;
11421 _PUBLIC_ void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo2 *r)
11423 ndr_print_struct(ndr, name, "samr_SetUserInfo2");
11424 ndr->depth++;
11425 if (flags & NDR_SET_VALUES) {
11426 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11428 if (flags & NDR_IN) {
11429 ndr_print_struct(ndr, "in", "samr_SetUserInfo2");
11430 ndr->depth++;
11431 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
11432 ndr->depth++;
11433 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
11434 ndr->depth--;
11435 ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
11436 ndr_print_ptr(ndr, "info", r->in.info);
11437 ndr->depth++;
11438 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
11439 ndr_print_samr_UserInfo(ndr, "info", r->in.info);
11440 ndr->depth--;
11441 ndr->depth--;
11443 if (flags & NDR_OUT) {
11444 ndr_print_struct(ndr, "out", "samr_SetUserInfo2");
11445 ndr->depth++;
11446 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11447 ndr->depth--;
11449 ndr->depth--;
11452 static enum ndr_err_code ndr_push_samr_SetBootKeyInformation(struct ndr_push *ndr, int flags, const struct samr_SetBootKeyInformation *r)
11454 if (flags & NDR_IN) {
11455 if (r->in.connect_handle == NULL) {
11456 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11458 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
11459 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
11460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
11461 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
11463 if (flags & NDR_OUT) {
11464 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11466 return NDR_ERR_SUCCESS;
11469 static enum ndr_err_code ndr_pull_samr_SetBootKeyInformation(struct ndr_pull *ndr, int flags, struct samr_SetBootKeyInformation *r)
11471 TALLOC_CTX *_mem_save_connect_handle_0;
11472 if (flags & NDR_IN) {
11473 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11474 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
11476 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11477 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
11478 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
11479 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
11480 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
11481 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
11482 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
11484 if (flags & NDR_OUT) {
11485 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11487 return NDR_ERR_SUCCESS;
11490 _PUBLIC_ void ndr_print_samr_SetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetBootKeyInformation *r)
11492 ndr_print_struct(ndr, name, "samr_SetBootKeyInformation");
11493 ndr->depth++;
11494 if (flags & NDR_SET_VALUES) {
11495 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11497 if (flags & NDR_IN) {
11498 ndr_print_struct(ndr, "in", "samr_SetBootKeyInformation");
11499 ndr->depth++;
11500 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
11501 ndr->depth++;
11502 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
11503 ndr->depth--;
11504 ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
11505 ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
11506 ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
11507 ndr->depth--;
11509 if (flags & NDR_OUT) {
11510 ndr_print_struct(ndr, "out", "samr_SetBootKeyInformation");
11511 ndr->depth++;
11512 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11513 ndr->depth--;
11515 ndr->depth--;
11518 static enum ndr_err_code ndr_push_samr_GetBootKeyInformation(struct ndr_push *ndr, int flags, const struct samr_GetBootKeyInformation *r)
11520 if (flags & NDR_IN) {
11521 if (r->in.domain_handle == NULL) {
11522 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11524 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11526 if (flags & NDR_OUT) {
11527 if (r->out.unknown == NULL) {
11528 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown));
11531 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11533 return NDR_ERR_SUCCESS;
11536 static enum ndr_err_code ndr_pull_samr_GetBootKeyInformation(struct ndr_pull *ndr, int flags, struct samr_GetBootKeyInformation *r)
11538 TALLOC_CTX *_mem_save_domain_handle_0;
11539 TALLOC_CTX *_mem_save_unknown_0;
11540 if (flags & NDR_IN) {
11541 ZERO_STRUCT(r->out);
11543 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11544 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11546 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11547 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
11548 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11549 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
11550 NDR_PULL_ALLOC(ndr, r->out.unknown);
11551 ZERO_STRUCTP(r->out.unknown);
11553 if (flags & NDR_OUT) {
11554 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11555 NDR_PULL_ALLOC(ndr, r->out.unknown);
11557 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
11558 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, LIBNDR_FLAG_REF_ALLOC);
11559 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown));
11560 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, LIBNDR_FLAG_REF_ALLOC);
11561 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11563 return NDR_ERR_SUCCESS;
11566 _PUBLIC_ void ndr_print_samr_GetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetBootKeyInformation *r)
11568 ndr_print_struct(ndr, name, "samr_GetBootKeyInformation");
11569 ndr->depth++;
11570 if (flags & NDR_SET_VALUES) {
11571 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11573 if (flags & NDR_IN) {
11574 ndr_print_struct(ndr, "in", "samr_GetBootKeyInformation");
11575 ndr->depth++;
11576 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
11577 ndr->depth++;
11578 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
11579 ndr->depth--;
11580 ndr->depth--;
11582 if (flags & NDR_OUT) {
11583 ndr_print_struct(ndr, "out", "samr_GetBootKeyInformation");
11584 ndr->depth++;
11585 ndr_print_ptr(ndr, "unknown", r->out.unknown);
11586 ndr->depth++;
11587 ndr_print_uint32(ndr, "unknown", *r->out.unknown);
11588 ndr->depth--;
11589 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11590 ndr->depth--;
11592 ndr->depth--;
11595 static enum ndr_err_code ndr_push_samr_Connect3(struct ndr_push *ndr, int flags, const struct samr_Connect3 *r)
11597 if (flags & NDR_IN) {
11598 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
11599 if (r->in.system_name) {
11600 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11601 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11602 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11603 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11605 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
11606 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
11608 if (flags & NDR_OUT) {
11609 if (r->out.connect_handle == NULL) {
11610 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11612 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11613 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11615 return NDR_ERR_SUCCESS;
11618 static enum ndr_err_code ndr_pull_samr_Connect3(struct ndr_pull *ndr, int flags, struct samr_Connect3 *r)
11620 uint32_t _ptr_system_name;
11621 TALLOC_CTX *_mem_save_system_name_0;
11622 TALLOC_CTX *_mem_save_connect_handle_0;
11623 if (flags & NDR_IN) {
11624 ZERO_STRUCT(r->out);
11626 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
11627 if (_ptr_system_name) {
11628 NDR_PULL_ALLOC(ndr, r->in.system_name);
11629 } else {
11630 r->in.system_name = NULL;
11632 if (r->in.system_name) {
11633 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11634 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
11635 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
11636 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
11637 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
11638 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
11640 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
11641 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
11642 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
11644 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
11645 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
11646 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11647 ZERO_STRUCTP(r->out.connect_handle);
11649 if (flags & NDR_OUT) {
11650 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11651 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11653 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11654 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
11655 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11656 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
11657 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11659 return NDR_ERR_SUCCESS;
11662 _PUBLIC_ void ndr_print_samr_Connect3(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect3 *r)
11664 ndr_print_struct(ndr, name, "samr_Connect3");
11665 ndr->depth++;
11666 if (flags & NDR_SET_VALUES) {
11667 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11669 if (flags & NDR_IN) {
11670 ndr_print_struct(ndr, "in", "samr_Connect3");
11671 ndr->depth++;
11672 ndr_print_ptr(ndr, "system_name", r->in.system_name);
11673 ndr->depth++;
11674 if (r->in.system_name) {
11675 ndr_print_string(ndr, "system_name", r->in.system_name);
11677 ndr->depth--;
11678 ndr_print_uint32(ndr, "unknown", r->in.unknown);
11679 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
11680 ndr->depth--;
11682 if (flags & NDR_OUT) {
11683 ndr_print_struct(ndr, "out", "samr_Connect3");
11684 ndr->depth++;
11685 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
11686 ndr->depth++;
11687 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
11688 ndr->depth--;
11689 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11690 ndr->depth--;
11692 ndr->depth--;
11695 static enum ndr_err_code ndr_push_samr_Connect4(struct ndr_push *ndr, int flags, const struct samr_Connect4 *r)
11697 if (flags & NDR_IN) {
11698 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
11699 if (r->in.system_name) {
11700 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11701 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11702 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11703 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11705 NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->in.client_version));
11706 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
11708 if (flags & NDR_OUT) {
11709 if (r->out.connect_handle == NULL) {
11710 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11712 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11713 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11715 return NDR_ERR_SUCCESS;
11718 static enum ndr_err_code ndr_pull_samr_Connect4(struct ndr_pull *ndr, int flags, struct samr_Connect4 *r)
11720 uint32_t _ptr_system_name;
11721 TALLOC_CTX *_mem_save_system_name_0;
11722 TALLOC_CTX *_mem_save_connect_handle_0;
11723 if (flags & NDR_IN) {
11724 ZERO_STRUCT(r->out);
11726 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
11727 if (_ptr_system_name) {
11728 NDR_PULL_ALLOC(ndr, r->in.system_name);
11729 } else {
11730 r->in.system_name = NULL;
11732 if (r->in.system_name) {
11733 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11734 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
11735 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
11736 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
11737 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
11738 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
11740 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
11741 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
11742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
11744 NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->in.client_version));
11745 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
11746 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11747 ZERO_STRUCTP(r->out.connect_handle);
11749 if (flags & NDR_OUT) {
11750 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11751 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11753 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11754 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
11755 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11756 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
11757 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11759 return NDR_ERR_SUCCESS;
11762 _PUBLIC_ void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect4 *r)
11764 ndr_print_struct(ndr, name, "samr_Connect4");
11765 ndr->depth++;
11766 if (flags & NDR_SET_VALUES) {
11767 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11769 if (flags & NDR_IN) {
11770 ndr_print_struct(ndr, "in", "samr_Connect4");
11771 ndr->depth++;
11772 ndr_print_ptr(ndr, "system_name", r->in.system_name);
11773 ndr->depth++;
11774 if (r->in.system_name) {
11775 ndr_print_string(ndr, "system_name", r->in.system_name);
11777 ndr->depth--;
11778 ndr_print_samr_ConnectVersion(ndr, "client_version", r->in.client_version);
11779 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
11780 ndr->depth--;
11782 if (flags & NDR_OUT) {
11783 ndr_print_struct(ndr, "out", "samr_Connect4");
11784 ndr->depth++;
11785 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
11786 ndr->depth++;
11787 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
11788 ndr->depth--;
11789 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11790 ndr->depth--;
11792 ndr->depth--;
11795 static enum ndr_err_code ndr_push_samr_ChangePasswordUser3(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser3 *r)
11797 if (flags & NDR_IN) {
11798 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
11799 if (r->in.server) {
11800 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
11802 if (r->in.account == NULL) {
11803 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11805 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
11806 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_password));
11807 if (r->in.nt_password) {
11808 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
11810 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_verifier));
11811 if (r->in.nt_verifier) {
11812 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
11814 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_change));
11815 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_password));
11816 if (r->in.lm_password) {
11817 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
11819 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_verifier));
11820 if (r->in.lm_verifier) {
11821 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
11823 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password3));
11824 if (r->in.password3) {
11825 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password3));
11828 if (flags & NDR_OUT) {
11829 if (r->out.dominfo == NULL) {
11830 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11832 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dominfo));
11833 if (*r->out.dominfo) {
11834 NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, *r->out.dominfo));
11836 if (r->out.reject == NULL) {
11837 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11839 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.reject));
11840 if (*r->out.reject) {
11841 NDR_CHECK(ndr_push_userPwdChangeFailureInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.reject));
11843 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11845 return NDR_ERR_SUCCESS;
11848 static enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser3 *r)
11850 uint32_t _ptr_server;
11851 uint32_t _ptr_nt_password;
11852 uint32_t _ptr_nt_verifier;
11853 uint32_t _ptr_lm_password;
11854 uint32_t _ptr_lm_verifier;
11855 uint32_t _ptr_password3;
11856 uint32_t _ptr_dominfo;
11857 uint32_t _ptr_reject;
11858 TALLOC_CTX *_mem_save_server_0;
11859 TALLOC_CTX *_mem_save_account_0;
11860 TALLOC_CTX *_mem_save_nt_password_0;
11861 TALLOC_CTX *_mem_save_nt_verifier_0;
11862 TALLOC_CTX *_mem_save_lm_password_0;
11863 TALLOC_CTX *_mem_save_lm_verifier_0;
11864 TALLOC_CTX *_mem_save_password3_0;
11865 TALLOC_CTX *_mem_save_dominfo_0;
11866 TALLOC_CTX *_mem_save_dominfo_1;
11867 TALLOC_CTX *_mem_save_reject_0;
11868 TALLOC_CTX *_mem_save_reject_1;
11869 if (flags & NDR_IN) {
11870 ZERO_STRUCT(r->out);
11872 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
11873 if (_ptr_server) {
11874 NDR_PULL_ALLOC(ndr, r->in.server);
11875 } else {
11876 r->in.server = NULL;
11878 if (r->in.server) {
11879 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
11880 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
11881 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
11882 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
11884 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11885 NDR_PULL_ALLOC(ndr, r->in.account);
11887 _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
11888 NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
11889 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
11890 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
11891 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_password));
11892 if (_ptr_nt_password) {
11893 NDR_PULL_ALLOC(ndr, r->in.nt_password);
11894 } else {
11895 r->in.nt_password = NULL;
11897 if (r->in.nt_password) {
11898 _mem_save_nt_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11899 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_password, 0);
11900 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
11901 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_password_0, 0);
11903 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_verifier));
11904 if (_ptr_nt_verifier) {
11905 NDR_PULL_ALLOC(ndr, r->in.nt_verifier);
11906 } else {
11907 r->in.nt_verifier = NULL;
11909 if (r->in.nt_verifier) {
11910 _mem_save_nt_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
11911 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_verifier, 0);
11912 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
11913 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_verifier_0, 0);
11915 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_change));
11916 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_password));
11917 if (_ptr_lm_password) {
11918 NDR_PULL_ALLOC(ndr, r->in.lm_password);
11919 } else {
11920 r->in.lm_password = NULL;
11922 if (r->in.lm_password) {
11923 _mem_save_lm_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11924 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_password, 0);
11925 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
11926 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_password_0, 0);
11928 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_verifier));
11929 if (_ptr_lm_verifier) {
11930 NDR_PULL_ALLOC(ndr, r->in.lm_verifier);
11931 } else {
11932 r->in.lm_verifier = NULL;
11934 if (r->in.lm_verifier) {
11935 _mem_save_lm_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
11936 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_verifier, 0);
11937 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
11938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_verifier_0, 0);
11940 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password3));
11941 if (_ptr_password3) {
11942 NDR_PULL_ALLOC(ndr, r->in.password3);
11943 } else {
11944 r->in.password3 = NULL;
11946 if (r->in.password3) {
11947 _mem_save_password3_0 = NDR_PULL_GET_MEM_CTX(ndr);
11948 NDR_PULL_SET_MEM_CTX(ndr, r->in.password3, 0);
11949 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password3));
11950 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password3_0, 0);
11952 NDR_PULL_ALLOC(ndr, r->out.dominfo);
11953 ZERO_STRUCTP(r->out.dominfo);
11954 NDR_PULL_ALLOC(ndr, r->out.reject);
11955 ZERO_STRUCTP(r->out.reject);
11957 if (flags & NDR_OUT) {
11958 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11959 NDR_PULL_ALLOC(ndr, r->out.dominfo);
11961 _mem_save_dominfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
11962 NDR_PULL_SET_MEM_CTX(ndr, r->out.dominfo, LIBNDR_FLAG_REF_ALLOC);
11963 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dominfo));
11964 if (_ptr_dominfo) {
11965 NDR_PULL_ALLOC(ndr, *r->out.dominfo);
11966 } else {
11967 *r->out.dominfo = NULL;
11969 if (*r->out.dominfo) {
11970 _mem_save_dominfo_1 = NDR_PULL_GET_MEM_CTX(ndr);
11971 NDR_PULL_SET_MEM_CTX(ndr, *r->out.dominfo, 0);
11972 NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, *r->out.dominfo));
11973 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dominfo_1, 0);
11975 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dominfo_0, LIBNDR_FLAG_REF_ALLOC);
11976 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11977 NDR_PULL_ALLOC(ndr, r->out.reject);
11979 _mem_save_reject_0 = NDR_PULL_GET_MEM_CTX(ndr);
11980 NDR_PULL_SET_MEM_CTX(ndr, r->out.reject, LIBNDR_FLAG_REF_ALLOC);
11981 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_reject));
11982 if (_ptr_reject) {
11983 NDR_PULL_ALLOC(ndr, *r->out.reject);
11984 } else {
11985 *r->out.reject = NULL;
11987 if (*r->out.reject) {
11988 _mem_save_reject_1 = NDR_PULL_GET_MEM_CTX(ndr);
11989 NDR_PULL_SET_MEM_CTX(ndr, *r->out.reject, 0);
11990 NDR_CHECK(ndr_pull_userPwdChangeFailureInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.reject));
11991 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_1, 0);
11993 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_0, LIBNDR_FLAG_REF_ALLOC);
11994 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11996 return NDR_ERR_SUCCESS;
11999 _PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser3 *r)
12001 ndr_print_struct(ndr, name, "samr_ChangePasswordUser3");
12002 ndr->depth++;
12003 if (flags & NDR_SET_VALUES) {
12004 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12006 if (flags & NDR_IN) {
12007 ndr_print_struct(ndr, "in", "samr_ChangePasswordUser3");
12008 ndr->depth++;
12009 ndr_print_ptr(ndr, "server", r->in.server);
12010 ndr->depth++;
12011 if (r->in.server) {
12012 ndr_print_lsa_String(ndr, "server", r->in.server);
12014 ndr->depth--;
12015 ndr_print_ptr(ndr, "account", r->in.account);
12016 ndr->depth++;
12017 ndr_print_lsa_String(ndr, "account", r->in.account);
12018 ndr->depth--;
12019 ndr_print_ptr(ndr, "nt_password", r->in.nt_password);
12020 ndr->depth++;
12021 if (r->in.nt_password) {
12022 ndr_print_samr_CryptPassword(ndr, "nt_password", r->in.nt_password);
12024 ndr->depth--;
12025 ndr_print_ptr(ndr, "nt_verifier", r->in.nt_verifier);
12026 ndr->depth++;
12027 if (r->in.nt_verifier) {
12028 ndr_print_samr_Password(ndr, "nt_verifier", r->in.nt_verifier);
12030 ndr->depth--;
12031 ndr_print_uint8(ndr, "lm_change", r->in.lm_change);
12032 ndr_print_ptr(ndr, "lm_password", r->in.lm_password);
12033 ndr->depth++;
12034 if (r->in.lm_password) {
12035 ndr_print_samr_CryptPassword(ndr, "lm_password", r->in.lm_password);
12037 ndr->depth--;
12038 ndr_print_ptr(ndr, "lm_verifier", r->in.lm_verifier);
12039 ndr->depth++;
12040 if (r->in.lm_verifier) {
12041 ndr_print_samr_Password(ndr, "lm_verifier", r->in.lm_verifier);
12043 ndr->depth--;
12044 ndr_print_ptr(ndr, "password3", r->in.password3);
12045 ndr->depth++;
12046 if (r->in.password3) {
12047 ndr_print_samr_CryptPassword(ndr, "password3", r->in.password3);
12049 ndr->depth--;
12050 ndr->depth--;
12052 if (flags & NDR_OUT) {
12053 ndr_print_struct(ndr, "out", "samr_ChangePasswordUser3");
12054 ndr->depth++;
12055 ndr_print_ptr(ndr, "dominfo", r->out.dominfo);
12056 ndr->depth++;
12057 ndr_print_ptr(ndr, "dominfo", *r->out.dominfo);
12058 ndr->depth++;
12059 if (*r->out.dominfo) {
12060 ndr_print_samr_DomInfo1(ndr, "dominfo", *r->out.dominfo);
12062 ndr->depth--;
12063 ndr->depth--;
12064 ndr_print_ptr(ndr, "reject", r->out.reject);
12065 ndr->depth++;
12066 ndr_print_ptr(ndr, "reject", *r->out.reject);
12067 ndr->depth++;
12068 if (*r->out.reject) {
12069 ndr_print_userPwdChangeFailureInformation(ndr, "reject", *r->out.reject);
12071 ndr->depth--;
12072 ndr->depth--;
12073 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12074 ndr->depth--;
12076 ndr->depth--;
12079 _PUBLIC_ enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flags, const struct samr_Connect5 *r)
12081 if (flags & NDR_IN) {
12082 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
12083 if (r->in.system_name) {
12084 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12085 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12086 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12087 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12089 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
12090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level_in));
12091 if (r->in.info_in == NULL) {
12092 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12094 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info_in, r->in.level_in));
12095 NDR_CHECK(ndr_push_samr_ConnectInfo(ndr, NDR_SCALARS, r->in.info_in));
12097 if (flags & NDR_OUT) {
12098 if (r->out.level_out == NULL) {
12099 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12101 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
12102 if (r->out.info_out == NULL) {
12103 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12105 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info_out, *r->out.level_out));
12106 NDR_CHECK(ndr_push_samr_ConnectInfo(ndr, NDR_SCALARS, r->out.info_out));
12107 if (r->out.connect_handle == NULL) {
12108 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12110 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12111 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12113 return NDR_ERR_SUCCESS;
12116 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r)
12118 uint32_t _ptr_system_name;
12119 TALLOC_CTX *_mem_save_system_name_0;
12120 TALLOC_CTX *_mem_save_info_in_0;
12121 TALLOC_CTX *_mem_save_level_out_0;
12122 TALLOC_CTX *_mem_save_info_out_0;
12123 TALLOC_CTX *_mem_save_connect_handle_0;
12124 if (flags & NDR_IN) {
12125 ZERO_STRUCT(r->out);
12127 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
12128 if (_ptr_system_name) {
12129 NDR_PULL_ALLOC(ndr, r->in.system_name);
12130 } else {
12131 r->in.system_name = NULL;
12133 if (r->in.system_name) {
12134 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12135 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
12136 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
12137 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
12138 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
12139 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
12141 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
12142 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
12143 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
12145 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
12146 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level_in));
12147 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12148 NDR_PULL_ALLOC(ndr, r->in.info_in);
12150 _mem_save_info_in_0 = NDR_PULL_GET_MEM_CTX(ndr);
12151 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_in, LIBNDR_FLAG_REF_ALLOC);
12152 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info_in, r->in.level_in));
12153 NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr, NDR_SCALARS, r->in.info_in));
12154 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_in_0, LIBNDR_FLAG_REF_ALLOC);
12155 NDR_PULL_ALLOC(ndr, r->out.level_out);
12156 ZERO_STRUCTP(r->out.level_out);
12157 NDR_PULL_ALLOC(ndr, r->out.info_out);
12158 ZERO_STRUCTP(r->out.info_out);
12159 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12160 ZERO_STRUCTP(r->out.connect_handle);
12162 if (flags & NDR_OUT) {
12163 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12164 NDR_PULL_ALLOC(ndr, r->out.level_out);
12166 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
12167 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
12168 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
12169 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
12170 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12171 NDR_PULL_ALLOC(ndr, r->out.info_out);
12173 _mem_save_info_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
12174 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_out, LIBNDR_FLAG_REF_ALLOC);
12175 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info_out, *r->out.level_out));
12176 NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr, NDR_SCALARS, r->out.info_out));
12177 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_out_0, LIBNDR_FLAG_REF_ALLOC);
12178 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12179 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12181 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12182 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
12183 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12184 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
12185 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12187 return NDR_ERR_SUCCESS;
12190 _PUBLIC_ void ndr_print_samr_Connect5(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect5 *r)
12192 ndr_print_struct(ndr, name, "samr_Connect5");
12193 ndr->depth++;
12194 if (flags & NDR_SET_VALUES) {
12195 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12197 if (flags & NDR_IN) {
12198 ndr_print_struct(ndr, "in", "samr_Connect5");
12199 ndr->depth++;
12200 ndr_print_ptr(ndr, "system_name", r->in.system_name);
12201 ndr->depth++;
12202 if (r->in.system_name) {
12203 ndr_print_string(ndr, "system_name", r->in.system_name);
12205 ndr->depth--;
12206 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
12207 ndr_print_uint32(ndr, "level_in", r->in.level_in);
12208 ndr_print_ptr(ndr, "info_in", r->in.info_in);
12209 ndr->depth++;
12210 ndr_print_set_switch_value(ndr, r->in.info_in, r->in.level_in);
12211 ndr_print_samr_ConnectInfo(ndr, "info_in", r->in.info_in);
12212 ndr->depth--;
12213 ndr->depth--;
12215 if (flags & NDR_OUT) {
12216 ndr_print_struct(ndr, "out", "samr_Connect5");
12217 ndr->depth++;
12218 ndr_print_ptr(ndr, "level_out", r->out.level_out);
12219 ndr->depth++;
12220 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
12221 ndr->depth--;
12222 ndr_print_ptr(ndr, "info_out", r->out.info_out);
12223 ndr->depth++;
12224 ndr_print_set_switch_value(ndr, r->out.info_out, *r->out.level_out);
12225 ndr_print_samr_ConnectInfo(ndr, "info_out", r->out.info_out);
12226 ndr->depth--;
12227 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
12228 ndr->depth++;
12229 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
12230 ndr->depth--;
12231 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12232 ndr->depth--;
12234 ndr->depth--;
12237 static enum ndr_err_code ndr_push_samr_RidToSid(struct ndr_push *ndr, int flags, const struct samr_RidToSid *r)
12239 if (flags & NDR_IN) {
12240 if (r->in.domain_handle == NULL) {
12241 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12243 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
12244 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
12246 if (flags & NDR_OUT) {
12247 if (r->out.sid == NULL) {
12248 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12250 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sid));
12251 if (*r->out.sid) {
12252 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
12254 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12256 return NDR_ERR_SUCCESS;
12259 static enum ndr_err_code ndr_pull_samr_RidToSid(struct ndr_pull *ndr, int flags, struct samr_RidToSid *r)
12261 uint32_t _ptr_sid;
12262 TALLOC_CTX *_mem_save_domain_handle_0;
12263 TALLOC_CTX *_mem_save_sid_0;
12264 TALLOC_CTX *_mem_save_sid_1;
12265 if (flags & NDR_IN) {
12266 ZERO_STRUCT(r->out);
12268 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12269 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
12271 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12272 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
12273 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
12274 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
12275 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
12276 NDR_PULL_ALLOC(ndr, r->out.sid);
12277 ZERO_STRUCTP(r->out.sid);
12279 if (flags & NDR_OUT) {
12280 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12281 NDR_PULL_ALLOC(ndr, r->out.sid);
12283 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
12284 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
12285 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
12286 if (_ptr_sid) {
12287 NDR_PULL_ALLOC(ndr, *r->out.sid);
12288 } else {
12289 *r->out.sid = NULL;
12291 if (*r->out.sid) {
12292 _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr);
12293 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, 0);
12294 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
12295 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, 0);
12297 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
12298 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12300 return NDR_ERR_SUCCESS;
12303 _PUBLIC_ void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, int flags, const struct samr_RidToSid *r)
12305 ndr_print_struct(ndr, name, "samr_RidToSid");
12306 ndr->depth++;
12307 if (flags & NDR_SET_VALUES) {
12308 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12310 if (flags & NDR_IN) {
12311 ndr_print_struct(ndr, "in", "samr_RidToSid");
12312 ndr->depth++;
12313 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
12314 ndr->depth++;
12315 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
12316 ndr->depth--;
12317 ndr_print_uint32(ndr, "rid", r->in.rid);
12318 ndr->depth--;
12320 if (flags & NDR_OUT) {
12321 ndr_print_struct(ndr, "out", "samr_RidToSid");
12322 ndr->depth++;
12323 ndr_print_ptr(ndr, "sid", r->out.sid);
12324 ndr->depth++;
12325 ndr_print_ptr(ndr, "sid", *r->out.sid);
12326 ndr->depth++;
12327 if (*r->out.sid) {
12328 ndr_print_dom_sid2(ndr, "sid", *r->out.sid);
12330 ndr->depth--;
12331 ndr->depth--;
12332 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12333 ndr->depth--;
12335 ndr->depth--;
12338 static enum ndr_err_code ndr_push_samr_SetDsrmPassword(struct ndr_push *ndr, int flags, const struct samr_SetDsrmPassword *r)
12340 if (flags & NDR_IN) {
12341 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.name));
12342 if (r->in.name) {
12343 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
12345 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
12346 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hash));
12347 if (r->in.hash) {
12348 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.hash));
12351 if (flags & NDR_OUT) {
12352 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12354 return NDR_ERR_SUCCESS;
12357 static enum ndr_err_code ndr_pull_samr_SetDsrmPassword(struct ndr_pull *ndr, int flags, struct samr_SetDsrmPassword *r)
12359 uint32_t _ptr_name;
12360 uint32_t _ptr_hash;
12361 TALLOC_CTX *_mem_save_name_0;
12362 TALLOC_CTX *_mem_save_hash_0;
12363 if (flags & NDR_IN) {
12364 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12365 if (_ptr_name) {
12366 NDR_PULL_ALLOC(ndr, r->in.name);
12367 } else {
12368 r->in.name = NULL;
12370 if (r->in.name) {
12371 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12372 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, 0);
12373 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
12374 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12376 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
12377 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hash));
12378 if (_ptr_hash) {
12379 NDR_PULL_ALLOC(ndr, r->in.hash);
12380 } else {
12381 r->in.hash = NULL;
12383 if (r->in.hash) {
12384 _mem_save_hash_0 = NDR_PULL_GET_MEM_CTX(ndr);
12385 NDR_PULL_SET_MEM_CTX(ndr, r->in.hash, 0);
12386 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.hash));
12387 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hash_0, 0);
12390 if (flags & NDR_OUT) {
12391 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12393 return NDR_ERR_SUCCESS;
12396 _PUBLIC_ void ndr_print_samr_SetDsrmPassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDsrmPassword *r)
12398 ndr_print_struct(ndr, name, "samr_SetDsrmPassword");
12399 ndr->depth++;
12400 if (flags & NDR_SET_VALUES) {
12401 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12403 if (flags & NDR_IN) {
12404 ndr_print_struct(ndr, "in", "samr_SetDsrmPassword");
12405 ndr->depth++;
12406 ndr_print_ptr(ndr, "name", r->in.name);
12407 ndr->depth++;
12408 if (r->in.name) {
12409 ndr_print_lsa_String(ndr, "name", r->in.name);
12411 ndr->depth--;
12412 ndr_print_uint32(ndr, "unknown", r->in.unknown);
12413 ndr_print_ptr(ndr, "hash", r->in.hash);
12414 ndr->depth++;
12415 if (r->in.hash) {
12416 ndr_print_samr_Password(ndr, "hash", r->in.hash);
12418 ndr->depth--;
12419 ndr->depth--;
12421 if (flags & NDR_OUT) {
12422 ndr_print_struct(ndr, "out", "samr_SetDsrmPassword");
12423 ndr->depth++;
12424 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12425 ndr->depth--;
12427 ndr->depth--;
12430 static enum ndr_err_code ndr_push_samr_ValidatePassword(struct ndr_push *ndr, int flags, const struct samr_ValidatePassword *r)
12432 if (flags & NDR_IN) {
12433 NDR_CHECK(ndr_push_samr_ValidatePasswordLevel(ndr, NDR_SCALARS, r->in.level));
12434 if (r->in.req == NULL) {
12435 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12437 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
12438 NDR_CHECK(ndr_push_samr_ValidatePasswordReq(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
12440 if (flags & NDR_OUT) {
12441 if (r->out.rep == NULL) {
12442 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12444 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rep));
12445 if (*r->out.rep) {
12446 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.rep, r->in.level));
12447 NDR_CHECK(ndr_push_samr_ValidatePasswordRep(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rep));
12449 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12451 return NDR_ERR_SUCCESS;
12454 static enum ndr_err_code ndr_pull_samr_ValidatePassword(struct ndr_pull *ndr, int flags, struct samr_ValidatePassword *r)
12456 uint32_t _ptr_rep;
12457 TALLOC_CTX *_mem_save_req_0;
12458 TALLOC_CTX *_mem_save_rep_0;
12459 TALLOC_CTX *_mem_save_rep_1;
12460 if (flags & NDR_IN) {
12461 ZERO_STRUCT(r->out);
12463 NDR_CHECK(ndr_pull_samr_ValidatePasswordLevel(ndr, NDR_SCALARS, &r->in.level));
12464 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12465 NDR_PULL_ALLOC(ndr, r->in.req);
12467 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
12468 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
12469 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
12470 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
12471 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
12472 NDR_PULL_ALLOC(ndr, r->out.rep);
12473 ZERO_STRUCTP(r->out.rep);
12475 if (flags & NDR_OUT) {
12476 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12477 NDR_PULL_ALLOC(ndr, r->out.rep);
12479 _mem_save_rep_0 = NDR_PULL_GET_MEM_CTX(ndr);
12480 NDR_PULL_SET_MEM_CTX(ndr, r->out.rep, LIBNDR_FLAG_REF_ALLOC);
12481 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rep));
12482 if (_ptr_rep) {
12483 NDR_PULL_ALLOC(ndr, *r->out.rep);
12484 } else {
12485 *r->out.rep = NULL;
12487 if (*r->out.rep) {
12488 _mem_save_rep_1 = NDR_PULL_GET_MEM_CTX(ndr);
12489 NDR_PULL_SET_MEM_CTX(ndr, *r->out.rep, 0);
12490 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.rep, r->in.level));
12491 NDR_CHECK(ndr_pull_samr_ValidatePasswordRep(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rep));
12492 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rep_1, 0);
12494 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rep_0, LIBNDR_FLAG_REF_ALLOC);
12495 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12497 return NDR_ERR_SUCCESS;
12500 _PUBLIC_ void ndr_print_samr_ValidatePassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_ValidatePassword *r)
12502 ndr_print_struct(ndr, name, "samr_ValidatePassword");
12503 ndr->depth++;
12504 if (flags & NDR_SET_VALUES) {
12505 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12507 if (flags & NDR_IN) {
12508 ndr_print_struct(ndr, "in", "samr_ValidatePassword");
12509 ndr->depth++;
12510 ndr_print_samr_ValidatePasswordLevel(ndr, "level", r->in.level);
12511 ndr_print_ptr(ndr, "req", r->in.req);
12512 ndr->depth++;
12513 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
12514 ndr_print_samr_ValidatePasswordReq(ndr, "req", r->in.req);
12515 ndr->depth--;
12516 ndr->depth--;
12518 if (flags & NDR_OUT) {
12519 ndr_print_struct(ndr, "out", "samr_ValidatePassword");
12520 ndr->depth++;
12521 ndr_print_ptr(ndr, "rep", r->out.rep);
12522 ndr->depth++;
12523 ndr_print_ptr(ndr, "rep", *r->out.rep);
12524 ndr->depth++;
12525 if (*r->out.rep) {
12526 ndr_print_set_switch_value(ndr, *r->out.rep, r->in.level);
12527 ndr_print_samr_ValidatePasswordRep(ndr, "rep", *r->out.rep);
12529 ndr->depth--;
12530 ndr->depth--;
12531 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12532 ndr->depth--;
12534 ndr->depth--;
12537 static const struct ndr_interface_call samr_calls[] = {
12539 "samr_Connect",
12540 sizeof(struct samr_Connect),
12541 (ndr_push_flags_fn_t) ndr_push_samr_Connect,
12542 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect,
12543 (ndr_print_function_t) ndr_print_samr_Connect,
12544 false,
12547 "samr_Close",
12548 sizeof(struct samr_Close),
12549 (ndr_push_flags_fn_t) ndr_push_samr_Close,
12550 (ndr_pull_flags_fn_t) ndr_pull_samr_Close,
12551 (ndr_print_function_t) ndr_print_samr_Close,
12552 false,
12555 "samr_SetSecurity",
12556 sizeof(struct samr_SetSecurity),
12557 (ndr_push_flags_fn_t) ndr_push_samr_SetSecurity,
12558 (ndr_pull_flags_fn_t) ndr_pull_samr_SetSecurity,
12559 (ndr_print_function_t) ndr_print_samr_SetSecurity,
12560 false,
12563 "samr_QuerySecurity",
12564 sizeof(struct samr_QuerySecurity),
12565 (ndr_push_flags_fn_t) ndr_push_samr_QuerySecurity,
12566 (ndr_pull_flags_fn_t) ndr_pull_samr_QuerySecurity,
12567 (ndr_print_function_t) ndr_print_samr_QuerySecurity,
12568 false,
12571 "samr_Shutdown",
12572 sizeof(struct samr_Shutdown),
12573 (ndr_push_flags_fn_t) ndr_push_samr_Shutdown,
12574 (ndr_pull_flags_fn_t) ndr_pull_samr_Shutdown,
12575 (ndr_print_function_t) ndr_print_samr_Shutdown,
12576 false,
12579 "samr_LookupDomain",
12580 sizeof(struct samr_LookupDomain),
12581 (ndr_push_flags_fn_t) ndr_push_samr_LookupDomain,
12582 (ndr_pull_flags_fn_t) ndr_pull_samr_LookupDomain,
12583 (ndr_print_function_t) ndr_print_samr_LookupDomain,
12584 false,
12587 "samr_EnumDomains",
12588 sizeof(struct samr_EnumDomains),
12589 (ndr_push_flags_fn_t) ndr_push_samr_EnumDomains,
12590 (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomains,
12591 (ndr_print_function_t) ndr_print_samr_EnumDomains,
12592 false,
12595 "samr_OpenDomain",
12596 sizeof(struct samr_OpenDomain),
12597 (ndr_push_flags_fn_t) ndr_push_samr_OpenDomain,
12598 (ndr_pull_flags_fn_t) ndr_pull_samr_OpenDomain,
12599 (ndr_print_function_t) ndr_print_samr_OpenDomain,
12600 false,
12603 "samr_QueryDomainInfo",
12604 sizeof(struct samr_QueryDomainInfo),
12605 (ndr_push_flags_fn_t) ndr_push_samr_QueryDomainInfo,
12606 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDomainInfo,
12607 (ndr_print_function_t) ndr_print_samr_QueryDomainInfo,
12608 false,
12611 "samr_SetDomainInfo",
12612 sizeof(struct samr_SetDomainInfo),
12613 (ndr_push_flags_fn_t) ndr_push_samr_SetDomainInfo,
12614 (ndr_pull_flags_fn_t) ndr_pull_samr_SetDomainInfo,
12615 (ndr_print_function_t) ndr_print_samr_SetDomainInfo,
12616 false,
12619 "samr_CreateDomainGroup",
12620 sizeof(struct samr_CreateDomainGroup),
12621 (ndr_push_flags_fn_t) ndr_push_samr_CreateDomainGroup,
12622 (ndr_pull_flags_fn_t) ndr_pull_samr_CreateDomainGroup,
12623 (ndr_print_function_t) ndr_print_samr_CreateDomainGroup,
12624 false,
12627 "samr_EnumDomainGroups",
12628 sizeof(struct samr_EnumDomainGroups),
12629 (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainGroups,
12630 (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainGroups,
12631 (ndr_print_function_t) ndr_print_samr_EnumDomainGroups,
12632 false,
12635 "samr_CreateUser",
12636 sizeof(struct samr_CreateUser),
12637 (ndr_push_flags_fn_t) ndr_push_samr_CreateUser,
12638 (ndr_pull_flags_fn_t) ndr_pull_samr_CreateUser,
12639 (ndr_print_function_t) ndr_print_samr_CreateUser,
12640 false,
12643 "samr_EnumDomainUsers",
12644 sizeof(struct samr_EnumDomainUsers),
12645 (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainUsers,
12646 (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainUsers,
12647 (ndr_print_function_t) ndr_print_samr_EnumDomainUsers,
12648 false,
12651 "samr_CreateDomAlias",
12652 sizeof(struct samr_CreateDomAlias),
12653 (ndr_push_flags_fn_t) ndr_push_samr_CreateDomAlias,
12654 (ndr_pull_flags_fn_t) ndr_pull_samr_CreateDomAlias,
12655 (ndr_print_function_t) ndr_print_samr_CreateDomAlias,
12656 false,
12659 "samr_EnumDomainAliases",
12660 sizeof(struct samr_EnumDomainAliases),
12661 (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainAliases,
12662 (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainAliases,
12663 (ndr_print_function_t) ndr_print_samr_EnumDomainAliases,
12664 false,
12667 "samr_GetAliasMembership",
12668 sizeof(struct samr_GetAliasMembership),
12669 (ndr_push_flags_fn_t) ndr_push_samr_GetAliasMembership,
12670 (ndr_pull_flags_fn_t) ndr_pull_samr_GetAliasMembership,
12671 (ndr_print_function_t) ndr_print_samr_GetAliasMembership,
12672 false,
12675 "samr_LookupNames",
12676 sizeof(struct samr_LookupNames),
12677 (ndr_push_flags_fn_t) ndr_push_samr_LookupNames,
12678 (ndr_pull_flags_fn_t) ndr_pull_samr_LookupNames,
12679 (ndr_print_function_t) ndr_print_samr_LookupNames,
12680 false,
12683 "samr_LookupRids",
12684 sizeof(struct samr_LookupRids),
12685 (ndr_push_flags_fn_t) ndr_push_samr_LookupRids,
12686 (ndr_pull_flags_fn_t) ndr_pull_samr_LookupRids,
12687 (ndr_print_function_t) ndr_print_samr_LookupRids,
12688 false,
12691 "samr_OpenGroup",
12692 sizeof(struct samr_OpenGroup),
12693 (ndr_push_flags_fn_t) ndr_push_samr_OpenGroup,
12694 (ndr_pull_flags_fn_t) ndr_pull_samr_OpenGroup,
12695 (ndr_print_function_t) ndr_print_samr_OpenGroup,
12696 false,
12699 "samr_QueryGroupInfo",
12700 sizeof(struct samr_QueryGroupInfo),
12701 (ndr_push_flags_fn_t) ndr_push_samr_QueryGroupInfo,
12702 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryGroupInfo,
12703 (ndr_print_function_t) ndr_print_samr_QueryGroupInfo,
12704 false,
12707 "samr_SetGroupInfo",
12708 sizeof(struct samr_SetGroupInfo),
12709 (ndr_push_flags_fn_t) ndr_push_samr_SetGroupInfo,
12710 (ndr_pull_flags_fn_t) ndr_pull_samr_SetGroupInfo,
12711 (ndr_print_function_t) ndr_print_samr_SetGroupInfo,
12712 false,
12715 "samr_AddGroupMember",
12716 sizeof(struct samr_AddGroupMember),
12717 (ndr_push_flags_fn_t) ndr_push_samr_AddGroupMember,
12718 (ndr_pull_flags_fn_t) ndr_pull_samr_AddGroupMember,
12719 (ndr_print_function_t) ndr_print_samr_AddGroupMember,
12720 false,
12723 "samr_DeleteDomainGroup",
12724 sizeof(struct samr_DeleteDomainGroup),
12725 (ndr_push_flags_fn_t) ndr_push_samr_DeleteDomainGroup,
12726 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteDomainGroup,
12727 (ndr_print_function_t) ndr_print_samr_DeleteDomainGroup,
12728 false,
12731 "samr_DeleteGroupMember",
12732 sizeof(struct samr_DeleteGroupMember),
12733 (ndr_push_flags_fn_t) ndr_push_samr_DeleteGroupMember,
12734 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteGroupMember,
12735 (ndr_print_function_t) ndr_print_samr_DeleteGroupMember,
12736 false,
12739 "samr_QueryGroupMember",
12740 sizeof(struct samr_QueryGroupMember),
12741 (ndr_push_flags_fn_t) ndr_push_samr_QueryGroupMember,
12742 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryGroupMember,
12743 (ndr_print_function_t) ndr_print_samr_QueryGroupMember,
12744 false,
12747 "samr_SetMemberAttributesOfGroup",
12748 sizeof(struct samr_SetMemberAttributesOfGroup),
12749 (ndr_push_flags_fn_t) ndr_push_samr_SetMemberAttributesOfGroup,
12750 (ndr_pull_flags_fn_t) ndr_pull_samr_SetMemberAttributesOfGroup,
12751 (ndr_print_function_t) ndr_print_samr_SetMemberAttributesOfGroup,
12752 false,
12755 "samr_OpenAlias",
12756 sizeof(struct samr_OpenAlias),
12757 (ndr_push_flags_fn_t) ndr_push_samr_OpenAlias,
12758 (ndr_pull_flags_fn_t) ndr_pull_samr_OpenAlias,
12759 (ndr_print_function_t) ndr_print_samr_OpenAlias,
12760 false,
12763 "samr_QueryAliasInfo",
12764 sizeof(struct samr_QueryAliasInfo),
12765 (ndr_push_flags_fn_t) ndr_push_samr_QueryAliasInfo,
12766 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryAliasInfo,
12767 (ndr_print_function_t) ndr_print_samr_QueryAliasInfo,
12768 false,
12771 "samr_SetAliasInfo",
12772 sizeof(struct samr_SetAliasInfo),
12773 (ndr_push_flags_fn_t) ndr_push_samr_SetAliasInfo,
12774 (ndr_pull_flags_fn_t) ndr_pull_samr_SetAliasInfo,
12775 (ndr_print_function_t) ndr_print_samr_SetAliasInfo,
12776 false,
12779 "samr_DeleteDomAlias",
12780 sizeof(struct samr_DeleteDomAlias),
12781 (ndr_push_flags_fn_t) ndr_push_samr_DeleteDomAlias,
12782 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteDomAlias,
12783 (ndr_print_function_t) ndr_print_samr_DeleteDomAlias,
12784 false,
12787 "samr_AddAliasMember",
12788 sizeof(struct samr_AddAliasMember),
12789 (ndr_push_flags_fn_t) ndr_push_samr_AddAliasMember,
12790 (ndr_pull_flags_fn_t) ndr_pull_samr_AddAliasMember,
12791 (ndr_print_function_t) ndr_print_samr_AddAliasMember,
12792 false,
12795 "samr_DeleteAliasMember",
12796 sizeof(struct samr_DeleteAliasMember),
12797 (ndr_push_flags_fn_t) ndr_push_samr_DeleteAliasMember,
12798 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteAliasMember,
12799 (ndr_print_function_t) ndr_print_samr_DeleteAliasMember,
12800 false,
12803 "samr_GetMembersInAlias",
12804 sizeof(struct samr_GetMembersInAlias),
12805 (ndr_push_flags_fn_t) ndr_push_samr_GetMembersInAlias,
12806 (ndr_pull_flags_fn_t) ndr_pull_samr_GetMembersInAlias,
12807 (ndr_print_function_t) ndr_print_samr_GetMembersInAlias,
12808 false,
12811 "samr_OpenUser",
12812 sizeof(struct samr_OpenUser),
12813 (ndr_push_flags_fn_t) ndr_push_samr_OpenUser,
12814 (ndr_pull_flags_fn_t) ndr_pull_samr_OpenUser,
12815 (ndr_print_function_t) ndr_print_samr_OpenUser,
12816 false,
12819 "samr_DeleteUser",
12820 sizeof(struct samr_DeleteUser),
12821 (ndr_push_flags_fn_t) ndr_push_samr_DeleteUser,
12822 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteUser,
12823 (ndr_print_function_t) ndr_print_samr_DeleteUser,
12824 false,
12827 "samr_QueryUserInfo",
12828 sizeof(struct samr_QueryUserInfo),
12829 (ndr_push_flags_fn_t) ndr_push_samr_QueryUserInfo,
12830 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryUserInfo,
12831 (ndr_print_function_t) ndr_print_samr_QueryUserInfo,
12832 false,
12835 "samr_SetUserInfo",
12836 sizeof(struct samr_SetUserInfo),
12837 (ndr_push_flags_fn_t) ndr_push_samr_SetUserInfo,
12838 (ndr_pull_flags_fn_t) ndr_pull_samr_SetUserInfo,
12839 (ndr_print_function_t) ndr_print_samr_SetUserInfo,
12840 false,
12843 "samr_ChangePasswordUser",
12844 sizeof(struct samr_ChangePasswordUser),
12845 (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser,
12846 (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser,
12847 (ndr_print_function_t) ndr_print_samr_ChangePasswordUser,
12848 false,
12851 "samr_GetGroupsForUser",
12852 sizeof(struct samr_GetGroupsForUser),
12853 (ndr_push_flags_fn_t) ndr_push_samr_GetGroupsForUser,
12854 (ndr_pull_flags_fn_t) ndr_pull_samr_GetGroupsForUser,
12855 (ndr_print_function_t) ndr_print_samr_GetGroupsForUser,
12856 false,
12859 "samr_QueryDisplayInfo",
12860 sizeof(struct samr_QueryDisplayInfo),
12861 (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo,
12862 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo,
12863 (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo,
12864 false,
12867 "samr_GetDisplayEnumerationIndex",
12868 sizeof(struct samr_GetDisplayEnumerationIndex),
12869 (ndr_push_flags_fn_t) ndr_push_samr_GetDisplayEnumerationIndex,
12870 (ndr_pull_flags_fn_t) ndr_pull_samr_GetDisplayEnumerationIndex,
12871 (ndr_print_function_t) ndr_print_samr_GetDisplayEnumerationIndex,
12872 false,
12875 "samr_TestPrivateFunctionsDomain",
12876 sizeof(struct samr_TestPrivateFunctionsDomain),
12877 (ndr_push_flags_fn_t) ndr_push_samr_TestPrivateFunctionsDomain,
12878 (ndr_pull_flags_fn_t) ndr_pull_samr_TestPrivateFunctionsDomain,
12879 (ndr_print_function_t) ndr_print_samr_TestPrivateFunctionsDomain,
12880 false,
12883 "samr_TestPrivateFunctionsUser",
12884 sizeof(struct samr_TestPrivateFunctionsUser),
12885 (ndr_push_flags_fn_t) ndr_push_samr_TestPrivateFunctionsUser,
12886 (ndr_pull_flags_fn_t) ndr_pull_samr_TestPrivateFunctionsUser,
12887 (ndr_print_function_t) ndr_print_samr_TestPrivateFunctionsUser,
12888 false,
12891 "samr_GetUserPwInfo",
12892 sizeof(struct samr_GetUserPwInfo),
12893 (ndr_push_flags_fn_t) ndr_push_samr_GetUserPwInfo,
12894 (ndr_pull_flags_fn_t) ndr_pull_samr_GetUserPwInfo,
12895 (ndr_print_function_t) ndr_print_samr_GetUserPwInfo,
12896 false,
12899 "samr_RemoveMemberFromForeignDomain",
12900 sizeof(struct samr_RemoveMemberFromForeignDomain),
12901 (ndr_push_flags_fn_t) ndr_push_samr_RemoveMemberFromForeignDomain,
12902 (ndr_pull_flags_fn_t) ndr_pull_samr_RemoveMemberFromForeignDomain,
12903 (ndr_print_function_t) ndr_print_samr_RemoveMemberFromForeignDomain,
12904 false,
12907 "samr_QueryDomainInfo2",
12908 sizeof(struct samr_QueryDomainInfo2),
12909 (ndr_push_flags_fn_t) ndr_push_samr_QueryDomainInfo2,
12910 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDomainInfo2,
12911 (ndr_print_function_t) ndr_print_samr_QueryDomainInfo2,
12912 false,
12915 "samr_QueryUserInfo2",
12916 sizeof(struct samr_QueryUserInfo2),
12917 (ndr_push_flags_fn_t) ndr_push_samr_QueryUserInfo2,
12918 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryUserInfo2,
12919 (ndr_print_function_t) ndr_print_samr_QueryUserInfo2,
12920 false,
12923 "samr_QueryDisplayInfo2",
12924 sizeof(struct samr_QueryDisplayInfo2),
12925 (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo2,
12926 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo2,
12927 (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo2,
12928 false,
12931 "samr_GetDisplayEnumerationIndex2",
12932 sizeof(struct samr_GetDisplayEnumerationIndex2),
12933 (ndr_push_flags_fn_t) ndr_push_samr_GetDisplayEnumerationIndex2,
12934 (ndr_pull_flags_fn_t) ndr_pull_samr_GetDisplayEnumerationIndex2,
12935 (ndr_print_function_t) ndr_print_samr_GetDisplayEnumerationIndex2,
12936 false,
12939 "samr_CreateUser2",
12940 sizeof(struct samr_CreateUser2),
12941 (ndr_push_flags_fn_t) ndr_push_samr_CreateUser2,
12942 (ndr_pull_flags_fn_t) ndr_pull_samr_CreateUser2,
12943 (ndr_print_function_t) ndr_print_samr_CreateUser2,
12944 false,
12947 "samr_QueryDisplayInfo3",
12948 sizeof(struct samr_QueryDisplayInfo3),
12949 (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo3,
12950 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo3,
12951 (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo3,
12952 false,
12955 "samr_AddMultipleMembersToAlias",
12956 sizeof(struct samr_AddMultipleMembersToAlias),
12957 (ndr_push_flags_fn_t) ndr_push_samr_AddMultipleMembersToAlias,
12958 (ndr_pull_flags_fn_t) ndr_pull_samr_AddMultipleMembersToAlias,
12959 (ndr_print_function_t) ndr_print_samr_AddMultipleMembersToAlias,
12960 false,
12963 "samr_RemoveMultipleMembersFromAlias",
12964 sizeof(struct samr_RemoveMultipleMembersFromAlias),
12965 (ndr_push_flags_fn_t) ndr_push_samr_RemoveMultipleMembersFromAlias,
12966 (ndr_pull_flags_fn_t) ndr_pull_samr_RemoveMultipleMembersFromAlias,
12967 (ndr_print_function_t) ndr_print_samr_RemoveMultipleMembersFromAlias,
12968 false,
12971 "samr_OemChangePasswordUser2",
12972 sizeof(struct samr_OemChangePasswordUser2),
12973 (ndr_push_flags_fn_t) ndr_push_samr_OemChangePasswordUser2,
12974 (ndr_pull_flags_fn_t) ndr_pull_samr_OemChangePasswordUser2,
12975 (ndr_print_function_t) ndr_print_samr_OemChangePasswordUser2,
12976 false,
12979 "samr_ChangePasswordUser2",
12980 sizeof(struct samr_ChangePasswordUser2),
12981 (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser2,
12982 (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser2,
12983 (ndr_print_function_t) ndr_print_samr_ChangePasswordUser2,
12984 false,
12987 "samr_GetDomPwInfo",
12988 sizeof(struct samr_GetDomPwInfo),
12989 (ndr_push_flags_fn_t) ndr_push_samr_GetDomPwInfo,
12990 (ndr_pull_flags_fn_t) ndr_pull_samr_GetDomPwInfo,
12991 (ndr_print_function_t) ndr_print_samr_GetDomPwInfo,
12992 false,
12995 "samr_Connect2",
12996 sizeof(struct samr_Connect2),
12997 (ndr_push_flags_fn_t) ndr_push_samr_Connect2,
12998 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect2,
12999 (ndr_print_function_t) ndr_print_samr_Connect2,
13000 false,
13003 "samr_SetUserInfo2",
13004 sizeof(struct samr_SetUserInfo2),
13005 (ndr_push_flags_fn_t) ndr_push_samr_SetUserInfo2,
13006 (ndr_pull_flags_fn_t) ndr_pull_samr_SetUserInfo2,
13007 (ndr_print_function_t) ndr_print_samr_SetUserInfo2,
13008 false,
13011 "samr_SetBootKeyInformation",
13012 sizeof(struct samr_SetBootKeyInformation),
13013 (ndr_push_flags_fn_t) ndr_push_samr_SetBootKeyInformation,
13014 (ndr_pull_flags_fn_t) ndr_pull_samr_SetBootKeyInformation,
13015 (ndr_print_function_t) ndr_print_samr_SetBootKeyInformation,
13016 false,
13019 "samr_GetBootKeyInformation",
13020 sizeof(struct samr_GetBootKeyInformation),
13021 (ndr_push_flags_fn_t) ndr_push_samr_GetBootKeyInformation,
13022 (ndr_pull_flags_fn_t) ndr_pull_samr_GetBootKeyInformation,
13023 (ndr_print_function_t) ndr_print_samr_GetBootKeyInformation,
13024 false,
13027 "samr_Connect3",
13028 sizeof(struct samr_Connect3),
13029 (ndr_push_flags_fn_t) ndr_push_samr_Connect3,
13030 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect3,
13031 (ndr_print_function_t) ndr_print_samr_Connect3,
13032 false,
13035 "samr_Connect4",
13036 sizeof(struct samr_Connect4),
13037 (ndr_push_flags_fn_t) ndr_push_samr_Connect4,
13038 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect4,
13039 (ndr_print_function_t) ndr_print_samr_Connect4,
13040 false,
13043 "samr_ChangePasswordUser3",
13044 sizeof(struct samr_ChangePasswordUser3),
13045 (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser3,
13046 (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser3,
13047 (ndr_print_function_t) ndr_print_samr_ChangePasswordUser3,
13048 false,
13051 "samr_Connect5",
13052 sizeof(struct samr_Connect5),
13053 (ndr_push_flags_fn_t) ndr_push_samr_Connect5,
13054 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect5,
13055 (ndr_print_function_t) ndr_print_samr_Connect5,
13056 false,
13059 "samr_RidToSid",
13060 sizeof(struct samr_RidToSid),
13061 (ndr_push_flags_fn_t) ndr_push_samr_RidToSid,
13062 (ndr_pull_flags_fn_t) ndr_pull_samr_RidToSid,
13063 (ndr_print_function_t) ndr_print_samr_RidToSid,
13064 false,
13067 "samr_SetDsrmPassword",
13068 sizeof(struct samr_SetDsrmPassword),
13069 (ndr_push_flags_fn_t) ndr_push_samr_SetDsrmPassword,
13070 (ndr_pull_flags_fn_t) ndr_pull_samr_SetDsrmPassword,
13071 (ndr_print_function_t) ndr_print_samr_SetDsrmPassword,
13072 false,
13075 "samr_ValidatePassword",
13076 sizeof(struct samr_ValidatePassword),
13077 (ndr_push_flags_fn_t) ndr_push_samr_ValidatePassword,
13078 (ndr_pull_flags_fn_t) ndr_pull_samr_ValidatePassword,
13079 (ndr_print_function_t) ndr_print_samr_ValidatePassword,
13080 false,
13082 { NULL, 0, NULL, NULL, NULL, false }
13085 static const char * const samr_endpoint_strings[] = {
13086 "ncacn_np:[\\pipe\\samr]",
13087 "ncacn_ip_tcp:",
13088 "ncalrpc:",
13091 static const struct ndr_interface_string_array samr_endpoints = {
13092 .count = 3,
13093 .names = samr_endpoint_strings
13096 static const char * const samr_authservice_strings[] = {
13097 "host",
13100 static const struct ndr_interface_string_array samr_authservices = {
13101 .count = 1,
13102 .names = samr_authservice_strings
13106 const struct ndr_interface_table ndr_table_samr = {
13107 .name = "samr",
13108 .syntax_id = {
13109 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xac}},
13110 NDR_SAMR_VERSION
13112 .helpstring = NDR_SAMR_HELPSTRING,
13113 .num_calls = 68,
13114 .calls = samr_calls,
13115 .endpoints = &samr_endpoints,
13116 .authservices = &samr_authservices