s3: Fix handling of processes that died in g_lock
[Samba.git] / librpc / gen_ndr / ndr_samr.c
blob8e6e0059c032050b11b5093987e8fea98d662977
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_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r)
37 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
38 return NDR_ERR_SUCCESS;
41 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r)
43 uint32_t v;
44 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
45 *r = v;
46 return NDR_ERR_SUCCESS;
49 _PUBLIC_ void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r)
51 const char *val = NULL;
53 switch (r) {
54 case SAMR_REJECT_OTHER: val = "SAMR_REJECT_OTHER"; break;
55 case SAMR_REJECT_TOO_SHORT: val = "SAMR_REJECT_TOO_SHORT"; break;
56 case SAMR_REJECT_IN_HISTORY: val = "SAMR_REJECT_IN_HISTORY"; break;
57 case SAMR_REJECT_COMPLEXITY: val = "SAMR_REJECT_COMPLEXITY"; break;
59 ndr_print_enum(ndr, name, "ENUM", val, r);
62 _PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
64 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
65 return NDR_ERR_SUCCESS;
68 _PUBLIC_ enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
70 uint32_t v;
71 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
72 *r = v;
73 return NDR_ERR_SUCCESS;
76 _PUBLIC_ void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r)
78 ndr_print_uint32(ndr, name, r);
79 ndr->depth++;
80 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DISABLED", ACB_DISABLED, r);
81 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_HOMDIRREQ", ACB_HOMDIRREQ, r);
82 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PWNOTREQ", ACB_PWNOTREQ, r);
83 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_TEMPDUP", ACB_TEMPDUP, r);
84 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NORMAL", ACB_NORMAL, r);
85 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_MNS", ACB_MNS, r);
86 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DOMTRUST", ACB_DOMTRUST, r);
87 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_WSTRUST", ACB_WSTRUST, r);
88 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_SVRTRUST", ACB_SVRTRUST, r);
89 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PWNOEXP", ACB_PWNOEXP, r);
90 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_AUTOLOCK", ACB_AUTOLOCK, r);
91 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_ENC_TXT_PWD_ALLOWED", ACB_ENC_TXT_PWD_ALLOWED, r);
92 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_SMARTCARD_REQUIRED", ACB_SMARTCARD_REQUIRED, r);
93 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_TRUSTED_FOR_DELEGATION", ACB_TRUSTED_FOR_DELEGATION, r);
94 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NOT_DELEGATED", ACB_NOT_DELEGATED, r);
95 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_USE_DES_KEY_ONLY", ACB_USE_DES_KEY_ONLY, r);
96 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DONT_REQUIRE_PREAUTH", ACB_DONT_REQUIRE_PREAUTH, r);
97 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PW_EXPIRED", ACB_PW_EXPIRED, r);
98 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NO_AUTH_DATA_REQD", ACB_NO_AUTH_DATA_REQD, r);
99 ndr->depth--;
102 static enum ndr_err_code ndr_push_samr_ConnectAccessMask(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_ConnectAccessMask(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_ConnectAccessMask(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_ACCESS_CONNECT_TO_SERVER", SAMR_ACCESS_CONNECT_TO_SERVER, r);
121 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_SHUTDOWN_SERVER", SAMR_ACCESS_SHUTDOWN_SERVER, r);
122 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_INITIALIZE_SERVER", SAMR_ACCESS_INITIALIZE_SERVER, r);
123 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_CREATE_DOMAIN", SAMR_ACCESS_CREATE_DOMAIN, r);
124 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_ENUM_DOMAINS", SAMR_ACCESS_ENUM_DOMAINS, r);
125 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_LOOKUP_DOMAIN", SAMR_ACCESS_LOOKUP_DOMAIN, r);
126 ndr->depth--;
129 static enum ndr_err_code ndr_push_samr_UserAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
132 return NDR_ERR_SUCCESS;
135 static enum ndr_err_code ndr_pull_samr_UserAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
137 uint32_t v;
138 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
139 *r = v;
140 return NDR_ERR_SUCCESS;
143 _PUBLIC_ void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
145 ndr_print_uint32(ndr, name, r);
146 ndr->depth++;
147 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_NAME_ETC", SAMR_USER_ACCESS_GET_NAME_ETC, r);
148 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOCALE", SAMR_USER_ACCESS_GET_LOCALE, r);
149 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_LOC_COM", SAMR_USER_ACCESS_SET_LOC_COM, r);
150 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOGONINFO", SAMR_USER_ACCESS_GET_LOGONINFO, r);
151 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_ATTRIBUTES", SAMR_USER_ACCESS_GET_ATTRIBUTES, r);
152 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_ATTRIBUTES", SAMR_USER_ACCESS_SET_ATTRIBUTES, r);
153 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_PASSWORD", SAMR_USER_ACCESS_CHANGE_PASSWORD, r);
154 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_PASSWORD", SAMR_USER_ACCESS_SET_PASSWORD, r);
155 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUPS", SAMR_USER_ACCESS_GET_GROUPS, r);
156 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP, r);
157 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP, r);
158 ndr->depth--;
161 static enum ndr_err_code ndr_push_samr_DomainAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
164 return NDR_ERR_SUCCESS;
167 static enum ndr_err_code ndr_pull_samr_DomainAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
169 uint32_t v;
170 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
171 *r = v;
172 return NDR_ERR_SUCCESS;
175 _PUBLIC_ void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
177 ndr_print_uint32(ndr, name, r);
178 ndr->depth++;
179 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1, r);
180 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_1", SAMR_DOMAIN_ACCESS_SET_INFO_1, r);
181 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2, r);
182 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_2", SAMR_DOMAIN_ACCESS_SET_INFO_2, r);
183 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_USER", SAMR_DOMAIN_ACCESS_CREATE_USER, r);
184 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_GROUP", SAMR_DOMAIN_ACCESS_CREATE_GROUP, r);
185 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_ALIAS", SAMR_DOMAIN_ACCESS_CREATE_ALIAS, r);
186 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS", SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS, r);
187 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS", SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS, r);
188 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT", SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT, r);
189 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_3", SAMR_DOMAIN_ACCESS_SET_INFO_3, r);
190 ndr->depth--;
193 static enum ndr_err_code ndr_push_samr_GroupAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
195 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
196 return NDR_ERR_SUCCESS;
199 static enum ndr_err_code ndr_pull_samr_GroupAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
201 uint32_t v;
202 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
203 *r = v;
204 return NDR_ERR_SUCCESS;
207 _PUBLIC_ void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
209 ndr_print_uint32(ndr, name, r);
210 ndr->depth++;
211 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_LOOKUP_INFO", SAMR_GROUP_ACCESS_LOOKUP_INFO, r);
212 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_SET_INFO", SAMR_GROUP_ACCESS_SET_INFO, r);
213 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_ADD_MEMBER", SAMR_GROUP_ACCESS_ADD_MEMBER, r);
214 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_REMOVE_MEMBER", SAMR_GROUP_ACCESS_REMOVE_MEMBER, r);
215 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_GET_MEMBERS", SAMR_GROUP_ACCESS_GET_MEMBERS, r);
216 ndr->depth--;
219 static enum ndr_err_code ndr_push_samr_AliasAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
221 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
222 return NDR_ERR_SUCCESS;
225 static enum ndr_err_code ndr_pull_samr_AliasAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
227 uint32_t v;
228 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
229 *r = v;
230 return NDR_ERR_SUCCESS;
233 _PUBLIC_ void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
235 ndr_print_uint32(ndr, name, r);
236 ndr->depth++;
237 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_ADD_MEMBER", SAMR_ALIAS_ACCESS_ADD_MEMBER, r);
238 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_REMOVE_MEMBER", SAMR_ALIAS_ACCESS_REMOVE_MEMBER, r);
239 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_GET_MEMBERS", SAMR_ALIAS_ACCESS_GET_MEMBERS, r);
240 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_LOOKUP_INFO", SAMR_ALIAS_ACCESS_LOOKUP_INFO, r);
241 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_SET_INFO", SAMR_ALIAS_ACCESS_SET_INFO, r);
242 ndr->depth--;
245 static enum ndr_err_code ndr_push_samr_SamEntry(struct ndr_push *ndr, int ndr_flags, const struct samr_SamEntry *r)
247 if (ndr_flags & NDR_SCALARS) {
248 NDR_CHECK(ndr_push_align(ndr, 5));
249 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
250 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
251 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
253 if (ndr_flags & NDR_BUFFERS) {
254 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
256 return NDR_ERR_SUCCESS;
259 static enum ndr_err_code ndr_pull_samr_SamEntry(struct ndr_pull *ndr, int ndr_flags, struct samr_SamEntry *r)
261 if (ndr_flags & NDR_SCALARS) {
262 NDR_CHECK(ndr_pull_align(ndr, 5));
263 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
264 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
265 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
267 if (ndr_flags & NDR_BUFFERS) {
268 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
270 return NDR_ERR_SUCCESS;
273 _PUBLIC_ void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r)
275 ndr_print_struct(ndr, name, "samr_SamEntry");
276 ndr->depth++;
277 ndr_print_uint32(ndr, "idx", r->idx);
278 ndr_print_lsa_String(ndr, "name", &r->name);
279 ndr->depth--;
282 static enum ndr_err_code ndr_push_samr_SamArray(struct ndr_push *ndr, int ndr_flags, const struct samr_SamArray *r)
284 uint32_t cntr_entries_1;
285 if (ndr_flags & NDR_SCALARS) {
286 NDR_CHECK(ndr_push_align(ndr, 5));
287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
288 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
289 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
291 if (ndr_flags & NDR_BUFFERS) {
292 if (r->entries) {
293 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
294 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
295 NDR_CHECK(ndr_push_samr_SamEntry(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
297 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
298 NDR_CHECK(ndr_push_samr_SamEntry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
302 return NDR_ERR_SUCCESS;
305 static enum ndr_err_code ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r)
307 uint32_t _ptr_entries;
308 uint32_t cntr_entries_1;
309 TALLOC_CTX *_mem_save_entries_0;
310 TALLOC_CTX *_mem_save_entries_1;
311 if (ndr_flags & NDR_SCALARS) {
312 NDR_CHECK(ndr_pull_align(ndr, 5));
313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
314 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
315 if (_ptr_entries) {
316 NDR_PULL_ALLOC(ndr, r->entries);
317 } else {
318 r->entries = NULL;
320 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
322 if (ndr_flags & NDR_BUFFERS) {
323 if (r->entries) {
324 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
325 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
326 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
327 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
328 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
329 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
330 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
331 NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
333 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
334 NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
337 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
339 if (r->entries) {
340 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
343 return NDR_ERR_SUCCESS;
346 _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r)
348 uint32_t cntr_entries_1;
349 ndr_print_struct(ndr, name, "samr_SamArray");
350 ndr->depth++;
351 ndr_print_uint32(ndr, "count", r->count);
352 ndr_print_ptr(ndr, "entries", r->entries);
353 ndr->depth++;
354 if (r->entries) {
355 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
356 ndr->depth++;
357 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
358 char *idx_1=NULL;
359 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
360 ndr_print_samr_SamEntry(ndr, "entries", &r->entries[cntr_entries_1]);
361 free(idx_1);
364 ndr->depth--;
366 ndr->depth--;
367 ndr->depth--;
370 static enum ndr_err_code ndr_push_samr_DomainInfoClass(struct ndr_push *ndr, int ndr_flags, enum samr_DomainInfoClass r)
372 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
373 return NDR_ERR_SUCCESS;
376 static enum ndr_err_code ndr_pull_samr_DomainInfoClass(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainInfoClass *r)
378 uint16_t v;
379 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
380 *r = v;
381 return NDR_ERR_SUCCESS;
384 _PUBLIC_ void ndr_print_samr_DomainInfoClass(struct ndr_print *ndr, const char *name, enum samr_DomainInfoClass r)
386 const char *val = NULL;
388 switch (r) {
389 case DomainPasswordInformation: val = "DomainPasswordInformation"; break;
390 case DomainGeneralInformation: val = "DomainGeneralInformation"; break;
391 case DomainLogoffInformation: val = "DomainLogoffInformation"; break;
392 case DomainOemInformation: val = "DomainOemInformation"; break;
393 case DomainNameInformation: val = "DomainNameInformation"; break;
394 case DomainReplicationInformation: val = "DomainReplicationInformation"; break;
395 case DomainServerRoleInformation: val = "DomainServerRoleInformation"; break;
396 case DomainModifiedInformation: val = "DomainModifiedInformation"; break;
397 case DomainStateInformation: val = "DomainStateInformation"; break;
398 case DomainUasInformation: val = "DomainUasInformation"; break;
399 case DomainGeneralInformation2: val = "DomainGeneralInformation2"; break;
400 case DomainLockoutInformation: val = "DomainLockoutInformation"; break;
401 case DomainModifiedInformation2: val = "DomainModifiedInformation2"; break;
403 ndr_print_enum(ndr, name, "ENUM", val, r);
406 static enum ndr_err_code ndr_push_samr_Role(struct ndr_push *ndr, int ndr_flags, enum samr_Role r)
408 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
409 return NDR_ERR_SUCCESS;
412 static enum ndr_err_code ndr_pull_samr_Role(struct ndr_pull *ndr, int ndr_flags, enum samr_Role *r)
414 uint32_t v;
415 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
416 *r = v;
417 return NDR_ERR_SUCCESS;
420 _PUBLIC_ void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r)
422 const char *val = NULL;
424 switch (r) {
425 case SAMR_ROLE_STANDALONE: val = "SAMR_ROLE_STANDALONE"; break;
426 case SAMR_ROLE_DOMAIN_MEMBER: val = "SAMR_ROLE_DOMAIN_MEMBER"; break;
427 case SAMR_ROLE_DOMAIN_BDC: val = "SAMR_ROLE_DOMAIN_BDC"; break;
428 case SAMR_ROLE_DOMAIN_PDC: val = "SAMR_ROLE_DOMAIN_PDC"; break;
430 ndr_print_enum(ndr, name, "ENUM", val, r);
433 _PUBLIC_ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r)
435 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
436 return NDR_ERR_SUCCESS;
439 _PUBLIC_ enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
441 uint32_t v;
442 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
443 *r = v;
444 return NDR_ERR_SUCCESS;
447 _PUBLIC_ void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r)
449 ndr_print_uint32(ndr, name, r);
450 ndr->depth++;
451 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_COMPLEX", DOMAIN_PASSWORD_COMPLEX, r);
452 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_ANON_CHANGE", DOMAIN_PASSWORD_NO_ANON_CHANGE, r);
453 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_CLEAR_CHANGE", DOMAIN_PASSWORD_NO_CLEAR_CHANGE, r);
454 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_LOCKOUT_ADMINS", DOMAIN_PASSWORD_LOCKOUT_ADMINS, r);
455 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_STORE_CLEARTEXT", DOMAIN_PASSWORD_STORE_CLEARTEXT, r);
456 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_REFUSE_PASSWORD_CHANGE", DOMAIN_REFUSE_PASSWORD_CHANGE, r);
457 ndr->depth--;
460 static enum ndr_err_code ndr_push_samr_DomainServerState(struct ndr_push *ndr, int ndr_flags, enum samr_DomainServerState r)
462 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
463 return NDR_ERR_SUCCESS;
466 static enum ndr_err_code ndr_pull_samr_DomainServerState(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainServerState *r)
468 uint32_t v;
469 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
470 *r = v;
471 return NDR_ERR_SUCCESS;
474 _PUBLIC_ void ndr_print_samr_DomainServerState(struct ndr_print *ndr, const char *name, enum samr_DomainServerState r)
476 const char *val = NULL;
478 switch (r) {
479 case DOMAIN_SERVER_ENABLED: val = "DOMAIN_SERVER_ENABLED"; break;
480 case DOMAIN_SERVER_DISABLED: val = "DOMAIN_SERVER_DISABLED"; break;
482 ndr_print_enum(ndr, name, "ENUM", val, r);
485 static enum ndr_err_code ndr_push_samr_DomInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo1 *r)
487 if (ndr_flags & NDR_SCALARS) {
488 NDR_CHECK(ndr_push_align(ndr, 4));
489 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
490 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length));
491 NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties));
492 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age));
493 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age));
494 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
496 if (ndr_flags & NDR_BUFFERS) {
498 return NDR_ERR_SUCCESS;
501 static enum ndr_err_code ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo1 *r)
503 if (ndr_flags & NDR_SCALARS) {
504 NDR_CHECK(ndr_pull_align(ndr, 4));
505 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
506 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length));
507 NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties));
508 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age));
509 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age));
510 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
512 if (ndr_flags & NDR_BUFFERS) {
514 return NDR_ERR_SUCCESS;
517 _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r)
519 ndr_print_struct(ndr, name, "samr_DomInfo1");
520 ndr->depth++;
521 ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
522 ndr_print_uint16(ndr, "password_history_length", r->password_history_length);
523 ndr_print_samr_PasswordProperties(ndr, "password_properties", r->password_properties);
524 ndr_print_dlong(ndr, "max_password_age", r->max_password_age);
525 ndr_print_dlong(ndr, "min_password_age", r->min_password_age);
526 ndr->depth--;
529 static enum ndr_err_code ndr_push_samr_DomGeneralInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation *r)
531 if (ndr_flags & NDR_SCALARS) {
532 NDR_CHECK(ndr_push_align(ndr, 5));
533 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time));
534 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
535 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
536 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary));
537 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
538 NDR_CHECK(ndr_push_samr_DomainServerState(ndr, NDR_SCALARS, r->domain_server_state));
539 NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role));
540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_groups));
543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aliases));
544 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
546 if (ndr_flags & NDR_BUFFERS) {
547 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
548 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
549 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary));
551 return NDR_ERR_SUCCESS;
554 static enum ndr_err_code ndr_pull_samr_DomGeneralInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation *r)
556 if (ndr_flags & NDR_SCALARS) {
557 NDR_CHECK(ndr_pull_align(ndr, 5));
558 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time));
559 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
560 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
561 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary));
562 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
563 NDR_CHECK(ndr_pull_samr_DomainServerState(ndr, NDR_SCALARS, &r->domain_server_state));
564 NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role));
565 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
566 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
567 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_groups));
568 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aliases));
569 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
571 if (ndr_flags & NDR_BUFFERS) {
572 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
573 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
574 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary));
576 return NDR_ERR_SUCCESS;
579 _PUBLIC_ void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r)
581 ndr_print_struct(ndr, name, "samr_DomGeneralInformation");
582 ndr->depth++;
583 ndr_print_NTTIME(ndr, "force_logoff_time", r->force_logoff_time);
584 ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
585 ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
586 ndr_print_lsa_String(ndr, "primary", &r->primary);
587 ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
588 ndr_print_samr_DomainServerState(ndr, "domain_server_state", r->domain_server_state);
589 ndr_print_samr_Role(ndr, "role", r->role);
590 ndr_print_uint32(ndr, "unknown3", r->unknown3);
591 ndr_print_uint32(ndr, "num_users", r->num_users);
592 ndr_print_uint32(ndr, "num_groups", r->num_groups);
593 ndr_print_uint32(ndr, "num_aliases", r->num_aliases);
594 ndr->depth--;
597 static enum ndr_err_code ndr_push_samr_DomInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo3 *r)
599 if (ndr_flags & NDR_SCALARS) {
600 NDR_CHECK(ndr_push_align(ndr, 4));
601 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time));
602 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
604 if (ndr_flags & NDR_BUFFERS) {
606 return NDR_ERR_SUCCESS;
609 static enum ndr_err_code ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo3 *r)
611 if (ndr_flags & NDR_SCALARS) {
612 NDR_CHECK(ndr_pull_align(ndr, 4));
613 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time));
614 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
616 if (ndr_flags & NDR_BUFFERS) {
618 return NDR_ERR_SUCCESS;
621 _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r)
623 ndr_print_struct(ndr, name, "samr_DomInfo3");
624 ndr->depth++;
625 ndr_print_NTTIME(ndr, "force_logoff_time", r->force_logoff_time);
626 ndr->depth--;
629 static enum ndr_err_code ndr_push_samr_DomOEMInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomOEMInformation *r)
631 if (ndr_flags & NDR_SCALARS) {
632 NDR_CHECK(ndr_push_align(ndr, 5));
633 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
634 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
636 if (ndr_flags & NDR_BUFFERS) {
637 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
639 return NDR_ERR_SUCCESS;
642 static enum ndr_err_code ndr_pull_samr_DomOEMInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomOEMInformation *r)
644 if (ndr_flags & NDR_SCALARS) {
645 NDR_CHECK(ndr_pull_align(ndr, 5));
646 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
647 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
649 if (ndr_flags & NDR_BUFFERS) {
650 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
652 return NDR_ERR_SUCCESS;
655 _PUBLIC_ void ndr_print_samr_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *r)
657 ndr_print_struct(ndr, name, "samr_DomOEMInformation");
658 ndr->depth++;
659 ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
660 ndr->depth--;
663 static enum ndr_err_code ndr_push_samr_DomInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo5 *r)
665 if (ndr_flags & NDR_SCALARS) {
666 NDR_CHECK(ndr_push_align(ndr, 5));
667 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
668 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
670 if (ndr_flags & NDR_BUFFERS) {
671 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
673 return NDR_ERR_SUCCESS;
676 static enum ndr_err_code ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo5 *r)
678 if (ndr_flags & NDR_SCALARS) {
679 NDR_CHECK(ndr_pull_align(ndr, 5));
680 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
681 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
683 if (ndr_flags & NDR_BUFFERS) {
684 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
686 return NDR_ERR_SUCCESS;
689 _PUBLIC_ void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r)
691 ndr_print_struct(ndr, name, "samr_DomInfo5");
692 ndr->depth++;
693 ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
694 ndr->depth--;
697 static enum ndr_err_code ndr_push_samr_DomInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo6 *r)
699 if (ndr_flags & NDR_SCALARS) {
700 NDR_CHECK(ndr_push_align(ndr, 5));
701 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary));
702 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
704 if (ndr_flags & NDR_BUFFERS) {
705 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary));
707 return NDR_ERR_SUCCESS;
710 static enum ndr_err_code ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo6 *r)
712 if (ndr_flags & NDR_SCALARS) {
713 NDR_CHECK(ndr_pull_align(ndr, 5));
714 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary));
715 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
717 if (ndr_flags & NDR_BUFFERS) {
718 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary));
720 return NDR_ERR_SUCCESS;
723 _PUBLIC_ void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r)
725 ndr_print_struct(ndr, name, "samr_DomInfo6");
726 ndr->depth++;
727 ndr_print_lsa_String(ndr, "primary", &r->primary);
728 ndr->depth--;
731 static enum ndr_err_code ndr_push_samr_DomInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo7 *r)
733 if (ndr_flags & NDR_SCALARS) {
734 NDR_CHECK(ndr_push_align(ndr, 4));
735 NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role));
736 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
738 if (ndr_flags & NDR_BUFFERS) {
740 return NDR_ERR_SUCCESS;
743 static enum ndr_err_code ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo7 *r)
745 if (ndr_flags & NDR_SCALARS) {
746 NDR_CHECK(ndr_pull_align(ndr, 4));
747 NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role));
748 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
750 if (ndr_flags & NDR_BUFFERS) {
752 return NDR_ERR_SUCCESS;
755 _PUBLIC_ void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r)
757 ndr_print_struct(ndr, name, "samr_DomInfo7");
758 ndr->depth++;
759 ndr_print_samr_Role(ndr, "role", r->role);
760 ndr->depth--;
763 static enum ndr_err_code ndr_push_samr_DomInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo8 *r)
765 if (ndr_flags & NDR_SCALARS) {
766 NDR_CHECK(ndr_push_align(ndr, 8));
767 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num));
768 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
769 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
771 if (ndr_flags & NDR_BUFFERS) {
773 return NDR_ERR_SUCCESS;
776 static enum ndr_err_code ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo8 *r)
778 if (ndr_flags & NDR_SCALARS) {
779 NDR_CHECK(ndr_pull_align(ndr, 8));
780 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num));
781 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
782 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
784 if (ndr_flags & NDR_BUFFERS) {
786 return NDR_ERR_SUCCESS;
789 _PUBLIC_ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r)
791 ndr_print_struct(ndr, name, "samr_DomInfo8");
792 ndr->depth++;
793 ndr_print_hyper(ndr, "sequence_num", r->sequence_num);
794 ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
795 ndr->depth--;
798 static enum ndr_err_code ndr_push_samr_DomInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo9 *r)
800 if (ndr_flags & NDR_SCALARS) {
801 NDR_CHECK(ndr_push_align(ndr, 4));
802 NDR_CHECK(ndr_push_samr_DomainServerState(ndr, NDR_SCALARS, r->domain_server_state));
803 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
805 if (ndr_flags & NDR_BUFFERS) {
807 return NDR_ERR_SUCCESS;
810 static enum ndr_err_code ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo9 *r)
812 if (ndr_flags & NDR_SCALARS) {
813 NDR_CHECK(ndr_pull_align(ndr, 4));
814 NDR_CHECK(ndr_pull_samr_DomainServerState(ndr, NDR_SCALARS, &r->domain_server_state));
815 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
817 if (ndr_flags & NDR_BUFFERS) {
819 return NDR_ERR_SUCCESS;
822 _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r)
824 ndr_print_struct(ndr, name, "samr_DomInfo9");
825 ndr->depth++;
826 ndr_print_samr_DomainServerState(ndr, "domain_server_state", r->domain_server_state);
827 ndr->depth--;
830 static enum ndr_err_code ndr_push_samr_DomGeneralInformation2(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation2 *r)
832 if (ndr_flags & NDR_SCALARS) {
833 NDR_CHECK(ndr_push_align(ndr, 8));
834 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
835 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration));
836 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window));
837 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold));
838 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
840 if (ndr_flags & NDR_BUFFERS) {
841 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
843 return NDR_ERR_SUCCESS;
846 static enum ndr_err_code ndr_pull_samr_DomGeneralInformation2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation2 *r)
848 if (ndr_flags & NDR_SCALARS) {
849 NDR_CHECK(ndr_pull_align(ndr, 8));
850 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
851 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration));
852 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window));
853 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold));
854 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
856 if (ndr_flags & NDR_BUFFERS) {
857 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
859 return NDR_ERR_SUCCESS;
862 _PUBLIC_ void ndr_print_samr_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *r)
864 ndr_print_struct(ndr, name, "samr_DomGeneralInformation2");
865 ndr->depth++;
866 ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general);
867 ndr_print_hyper(ndr, "lockout_duration", r->lockout_duration);
868 ndr_print_hyper(ndr, "lockout_window", r->lockout_window);
869 ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold);
870 ndr->depth--;
873 static enum ndr_err_code ndr_push_samr_DomInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo12 *r)
875 if (ndr_flags & NDR_SCALARS) {
876 NDR_CHECK(ndr_push_align(ndr, 8));
877 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration));
878 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window));
879 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold));
880 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
882 if (ndr_flags & NDR_BUFFERS) {
884 return NDR_ERR_SUCCESS;
887 static enum ndr_err_code ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo12 *r)
889 if (ndr_flags & NDR_SCALARS) {
890 NDR_CHECK(ndr_pull_align(ndr, 8));
891 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration));
892 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window));
893 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold));
894 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
896 if (ndr_flags & NDR_BUFFERS) {
898 return NDR_ERR_SUCCESS;
901 _PUBLIC_ void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r)
903 ndr_print_struct(ndr, name, "samr_DomInfo12");
904 ndr->depth++;
905 ndr_print_hyper(ndr, "lockout_duration", r->lockout_duration);
906 ndr_print_hyper(ndr, "lockout_window", r->lockout_window);
907 ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold);
908 ndr->depth--;
911 static enum ndr_err_code ndr_push_samr_DomInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo13 *r)
913 if (ndr_flags & NDR_SCALARS) {
914 NDR_CHECK(ndr_push_align(ndr, 8));
915 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num));
916 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
917 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_count_at_last_promotion));
918 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
920 if (ndr_flags & NDR_BUFFERS) {
922 return NDR_ERR_SUCCESS;
925 static enum ndr_err_code ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo13 *r)
927 if (ndr_flags & NDR_SCALARS) {
928 NDR_CHECK(ndr_pull_align(ndr, 8));
929 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num));
930 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
931 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_count_at_last_promotion));
932 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
934 if (ndr_flags & NDR_BUFFERS) {
936 return NDR_ERR_SUCCESS;
939 _PUBLIC_ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r)
941 ndr_print_struct(ndr, name, "samr_DomInfo13");
942 ndr->depth++;
943 ndr_print_hyper(ndr, "sequence_num", r->sequence_num);
944 ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
945 ndr_print_hyper(ndr, "modified_count_at_last_promotion", r->modified_count_at_last_promotion);
946 ndr->depth--;
949 static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const union samr_DomainInfo *r)
951 if (ndr_flags & NDR_SCALARS) {
952 int level = ndr_push_get_switch_value(ndr, r);
953 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
954 NDR_CHECK(ndr_push_union_align(ndr, 8));
955 switch (level) {
956 case 1: {
957 NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1));
958 break; }
960 case 2: {
961 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
962 break; }
964 case 3: {
965 NDR_CHECK(ndr_push_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3));
966 break; }
968 case 4: {
969 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
970 break; }
972 case 5: {
973 NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5));
974 break; }
976 case 6: {
977 NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6));
978 break; }
980 case 7: {
981 NDR_CHECK(ndr_push_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7));
982 break; }
984 case 8: {
985 NDR_CHECK(ndr_push_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8));
986 break; }
988 case 9: {
989 NDR_CHECK(ndr_push_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9));
990 break; }
992 case 11: {
993 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
994 break; }
996 case 12: {
997 NDR_CHECK(ndr_push_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12));
998 break; }
1000 case 13: {
1001 NDR_CHECK(ndr_push_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13));
1002 break; }
1004 default:
1005 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1008 if (ndr_flags & NDR_BUFFERS) {
1009 int level = ndr_push_get_switch_value(ndr, r);
1010 switch (level) {
1011 case 1:
1012 break;
1014 case 2:
1015 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
1016 break;
1018 case 3:
1019 break;
1021 case 4:
1022 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
1023 break;
1025 case 5:
1026 NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5));
1027 break;
1029 case 6:
1030 NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6));
1031 break;
1033 case 7:
1034 break;
1036 case 8:
1037 break;
1039 case 9:
1040 break;
1042 case 11:
1043 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
1044 break;
1046 case 12:
1047 break;
1049 case 13:
1050 break;
1052 default:
1053 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1056 return NDR_ERR_SUCCESS;
1059 static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, union samr_DomainInfo *r)
1061 int level;
1062 uint16_t _level;
1063 level = ndr_pull_get_switch_value(ndr, r);
1064 if (ndr_flags & NDR_SCALARS) {
1065 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
1066 if (_level != level) {
1067 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1069 NDR_CHECK(ndr_pull_union_align(ndr, 8));
1070 switch (level) {
1071 case 1: {
1072 NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1));
1073 break; }
1075 case 2: {
1076 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
1077 break; }
1079 case 3: {
1080 NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3));
1081 break; }
1083 case 4: {
1084 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
1085 break; }
1087 case 5: {
1088 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5));
1089 break; }
1091 case 6: {
1092 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6));
1093 break; }
1095 case 7: {
1096 NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7));
1097 break; }
1099 case 8: {
1100 NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8));
1101 break; }
1103 case 9: {
1104 NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9));
1105 break; }
1107 case 11: {
1108 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
1109 break; }
1111 case 12: {
1112 NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12));
1113 break; }
1115 case 13: {
1116 NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13));
1117 break; }
1119 default:
1120 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1123 if (ndr_flags & NDR_BUFFERS) {
1124 switch (level) {
1125 case 1:
1126 break;
1128 case 2:
1129 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
1130 break;
1132 case 3:
1133 break;
1135 case 4:
1136 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
1137 break;
1139 case 5:
1140 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5));
1141 break;
1143 case 6:
1144 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6));
1145 break;
1147 case 7:
1148 break;
1150 case 8:
1151 break;
1153 case 9:
1154 break;
1156 case 11:
1157 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
1158 break;
1160 case 12:
1161 break;
1163 case 13:
1164 break;
1166 default:
1167 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1170 return NDR_ERR_SUCCESS;
1173 _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r)
1175 int level;
1176 level = ndr_print_get_switch_value(ndr, r);
1177 ndr_print_union(ndr, name, level, "samr_DomainInfo");
1178 switch (level) {
1179 case 1:
1180 ndr_print_samr_DomInfo1(ndr, "info1", &r->info1);
1181 break;
1183 case 2:
1184 ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general);
1185 break;
1187 case 3:
1188 ndr_print_samr_DomInfo3(ndr, "info3", &r->info3);
1189 break;
1191 case 4:
1192 ndr_print_samr_DomOEMInformation(ndr, "oem", &r->oem);
1193 break;
1195 case 5:
1196 ndr_print_samr_DomInfo5(ndr, "info5", &r->info5);
1197 break;
1199 case 6:
1200 ndr_print_samr_DomInfo6(ndr, "info6", &r->info6);
1201 break;
1203 case 7:
1204 ndr_print_samr_DomInfo7(ndr, "info7", &r->info7);
1205 break;
1207 case 8:
1208 ndr_print_samr_DomInfo8(ndr, "info8", &r->info8);
1209 break;
1211 case 9:
1212 ndr_print_samr_DomInfo9(ndr, "info9", &r->info9);
1213 break;
1215 case 11:
1216 ndr_print_samr_DomGeneralInformation2(ndr, "general2", &r->general2);
1217 break;
1219 case 12:
1220 ndr_print_samr_DomInfo12(ndr, "info12", &r->info12);
1221 break;
1223 case 13:
1224 ndr_print_samr_DomInfo13(ndr, "info13", &r->info13);
1225 break;
1227 default:
1228 ndr_print_bad_level(ndr, name, level);
1232 static enum ndr_err_code ndr_push_samr_Ids(struct ndr_push *ndr, int ndr_flags, const struct samr_Ids *r)
1234 uint32_t cntr_ids_1;
1235 if (ndr_flags & NDR_SCALARS) {
1236 NDR_CHECK(ndr_push_align(ndr, 5));
1237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1238 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ids));
1239 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1241 if (ndr_flags & NDR_BUFFERS) {
1242 if (r->ids) {
1243 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1244 for (cntr_ids_1 = 0; cntr_ids_1 < r->count; cntr_ids_1++) {
1245 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ids[cntr_ids_1]));
1249 return NDR_ERR_SUCCESS;
1252 static enum ndr_err_code ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags, struct samr_Ids *r)
1254 uint32_t _ptr_ids;
1255 uint32_t cntr_ids_1;
1256 TALLOC_CTX *_mem_save_ids_0;
1257 TALLOC_CTX *_mem_save_ids_1;
1258 if (ndr_flags & NDR_SCALARS) {
1259 NDR_CHECK(ndr_pull_align(ndr, 5));
1260 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1261 if (r->count > 1024) {
1262 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1264 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ids));
1265 if (_ptr_ids) {
1266 NDR_PULL_ALLOC(ndr, r->ids);
1267 } else {
1268 r->ids = NULL;
1270 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1272 if (ndr_flags & NDR_BUFFERS) {
1273 if (r->ids) {
1274 _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1275 NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
1276 NDR_CHECK(ndr_pull_array_size(ndr, &r->ids));
1277 NDR_PULL_ALLOC_N(ndr, r->ids, ndr_get_array_size(ndr, &r->ids));
1278 _mem_save_ids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1279 NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
1280 for (cntr_ids_1 = 0; cntr_ids_1 < r->count; cntr_ids_1++) {
1281 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ids[cntr_ids_1]));
1283 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_1, 0);
1284 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, 0);
1286 if (r->ids) {
1287 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ids, r->count));
1290 return NDR_ERR_SUCCESS;
1293 _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r)
1295 uint32_t cntr_ids_1;
1296 ndr_print_struct(ndr, name, "samr_Ids");
1297 ndr->depth++;
1298 ndr_print_uint32(ndr, "count", r->count);
1299 ndr_print_ptr(ndr, "ids", r->ids);
1300 ndr->depth++;
1301 if (r->ids) {
1302 ndr->print(ndr, "%s: ARRAY(%d)", "ids", (int)r->count);
1303 ndr->depth++;
1304 for (cntr_ids_1=0;cntr_ids_1<r->count;cntr_ids_1++) {
1305 char *idx_1=NULL;
1306 if (asprintf(&idx_1, "[%d]", cntr_ids_1) != -1) {
1307 ndr_print_uint32(ndr, "ids", r->ids[cntr_ids_1]);
1308 free(idx_1);
1311 ndr->depth--;
1313 ndr->depth--;
1314 ndr->depth--;
1317 _PUBLIC_ enum ndr_err_code ndr_push_samr_GroupAttrs(struct ndr_push *ndr, int ndr_flags, uint32_t r)
1319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1320 return NDR_ERR_SUCCESS;
1323 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GroupAttrs(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
1325 uint32_t v;
1326 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1327 *r = v;
1328 return NDR_ERR_SUCCESS;
1331 _PUBLIC_ void ndr_print_samr_GroupAttrs(struct ndr_print *ndr, const char *name, uint32_t r)
1333 ndr_print_uint32(ndr, name, r);
1334 ndr->depth++;
1335 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_MANDATORY", SE_GROUP_MANDATORY, r);
1336 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_ENABLED_BY_DEFAULT", SE_GROUP_ENABLED_BY_DEFAULT, r);
1337 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_ENABLED", SE_GROUP_ENABLED, r);
1338 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_OWNER", SE_GROUP_OWNER, r);
1339 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_USE_FOR_DENY_ONLY", SE_GROUP_USE_FOR_DENY_ONLY, r);
1340 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_RESOURCE", SE_GROUP_RESOURCE, r);
1341 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_LOGON_ID", SE_GROUP_LOGON_ID, r);
1342 ndr->depth--;
1345 static enum ndr_err_code ndr_push_samr_GroupInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAll *r)
1347 if (ndr_flags & NDR_SCALARS) {
1348 NDR_CHECK(ndr_push_align(ndr, 5));
1349 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1350 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
1351 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members));
1352 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1353 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1355 if (ndr_flags & NDR_BUFFERS) {
1356 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1357 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1359 return NDR_ERR_SUCCESS;
1362 static enum ndr_err_code ndr_pull_samr_GroupInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAll *r)
1364 if (ndr_flags & NDR_SCALARS) {
1365 NDR_CHECK(ndr_pull_align(ndr, 5));
1366 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1367 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
1368 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members));
1369 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1370 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1372 if (ndr_flags & NDR_BUFFERS) {
1373 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1374 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1376 return NDR_ERR_SUCCESS;
1379 _PUBLIC_ void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r)
1381 ndr_print_struct(ndr, name, "samr_GroupInfoAll");
1382 ndr->depth++;
1383 ndr_print_lsa_String(ndr, "name", &r->name);
1384 ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes);
1385 ndr_print_uint32(ndr, "num_members", r->num_members);
1386 ndr_print_lsa_String(ndr, "description", &r->description);
1387 ndr->depth--;
1390 static enum ndr_err_code ndr_push_samr_GroupInfoAttributes(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAttributes *r)
1392 if (ndr_flags & NDR_SCALARS) {
1393 NDR_CHECK(ndr_push_align(ndr, 4));
1394 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
1395 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1397 if (ndr_flags & NDR_BUFFERS) {
1399 return NDR_ERR_SUCCESS;
1402 static enum ndr_err_code ndr_pull_samr_GroupInfoAttributes(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAttributes *r)
1404 if (ndr_flags & NDR_SCALARS) {
1405 NDR_CHECK(ndr_pull_align(ndr, 4));
1406 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
1407 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1409 if (ndr_flags & NDR_BUFFERS) {
1411 return NDR_ERR_SUCCESS;
1414 _PUBLIC_ void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r)
1416 ndr_print_struct(ndr, name, "samr_GroupInfoAttributes");
1417 ndr->depth++;
1418 ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes);
1419 ndr->depth--;
1422 static enum ndr_err_code ndr_push_samr_GroupInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_GroupInfoEnum r)
1424 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1425 return NDR_ERR_SUCCESS;
1428 static enum ndr_err_code ndr_pull_samr_GroupInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_GroupInfoEnum *r)
1430 uint16_t v;
1431 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1432 *r = v;
1433 return NDR_ERR_SUCCESS;
1436 _PUBLIC_ void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r)
1438 const char *val = NULL;
1440 switch (r) {
1441 case GROUPINFOALL: val = "GROUPINFOALL"; break;
1442 case GROUPINFONAME: val = "GROUPINFONAME"; break;
1443 case GROUPINFOATTRIBUTES: val = "GROUPINFOATTRIBUTES"; break;
1444 case GROUPINFODESCRIPTION: val = "GROUPINFODESCRIPTION"; break;
1445 case GROUPINFOALL2: val = "GROUPINFOALL2"; break;
1447 ndr_print_enum(ndr, name, "ENUM", val, r);
1450 static enum ndr_err_code ndr_push_samr_GroupInfo(struct ndr_push *ndr, int ndr_flags, const union samr_GroupInfo *r)
1452 if (ndr_flags & NDR_SCALARS) {
1453 int level = ndr_push_get_switch_value(ndr, r);
1454 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, level));
1455 NDR_CHECK(ndr_push_union_align(ndr, 5));
1456 switch (level) {
1457 case GROUPINFOALL: {
1458 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all));
1459 break; }
1461 case GROUPINFONAME: {
1462 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1463 break; }
1465 case GROUPINFOATTRIBUTES: {
1466 NDR_CHECK(ndr_push_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes));
1467 break; }
1469 case GROUPINFODESCRIPTION: {
1470 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1471 break; }
1473 case GROUPINFOALL2: {
1474 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2));
1475 break; }
1477 default:
1478 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1481 if (ndr_flags & NDR_BUFFERS) {
1482 int level = ndr_push_get_switch_value(ndr, r);
1483 switch (level) {
1484 case GROUPINFOALL:
1485 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all));
1486 break;
1488 case GROUPINFONAME:
1489 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1490 break;
1492 case GROUPINFOATTRIBUTES:
1493 break;
1495 case GROUPINFODESCRIPTION:
1496 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1497 break;
1499 case GROUPINFOALL2:
1500 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2));
1501 break;
1503 default:
1504 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1507 return NDR_ERR_SUCCESS;
1510 static enum ndr_err_code ndr_pull_samr_GroupInfo(struct ndr_pull *ndr, int ndr_flags, union samr_GroupInfo *r)
1512 int level;
1513 uint16_t _level;
1514 level = ndr_pull_get_switch_value(ndr, r);
1515 if (ndr_flags & NDR_SCALARS) {
1516 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
1517 if (_level != level) {
1518 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1520 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1521 switch (level) {
1522 case GROUPINFOALL: {
1523 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all));
1524 break; }
1526 case GROUPINFONAME: {
1527 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1528 break; }
1530 case GROUPINFOATTRIBUTES: {
1531 NDR_CHECK(ndr_pull_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes));
1532 break; }
1534 case GROUPINFODESCRIPTION: {
1535 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1536 break; }
1538 case GROUPINFOALL2: {
1539 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2));
1540 break; }
1542 default:
1543 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1546 if (ndr_flags & NDR_BUFFERS) {
1547 switch (level) {
1548 case GROUPINFOALL:
1549 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all));
1550 break;
1552 case GROUPINFONAME:
1553 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1554 break;
1556 case GROUPINFOATTRIBUTES:
1557 break;
1559 case GROUPINFODESCRIPTION:
1560 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1561 break;
1563 case GROUPINFOALL2:
1564 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2));
1565 break;
1567 default:
1568 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1571 return NDR_ERR_SUCCESS;
1574 _PUBLIC_ void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r)
1576 int level;
1577 level = ndr_print_get_switch_value(ndr, r);
1578 ndr_print_union(ndr, name, level, "samr_GroupInfo");
1579 switch (level) {
1580 case GROUPINFOALL:
1581 ndr_print_samr_GroupInfoAll(ndr, "all", &r->all);
1582 break;
1584 case GROUPINFONAME:
1585 ndr_print_lsa_String(ndr, "name", &r->name);
1586 break;
1588 case GROUPINFOATTRIBUTES:
1589 ndr_print_samr_GroupInfoAttributes(ndr, "attributes", &r->attributes);
1590 break;
1592 case GROUPINFODESCRIPTION:
1593 ndr_print_lsa_String(ndr, "description", &r->description);
1594 break;
1596 case GROUPINFOALL2:
1597 ndr_print_samr_GroupInfoAll(ndr, "all2", &r->all2);
1598 break;
1600 default:
1601 ndr_print_bad_level(ndr, name, level);
1605 static enum ndr_err_code ndr_push_samr_RidTypeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidTypeArray *r)
1607 uint32_t cntr_rids_1;
1608 uint32_t cntr_types_1;
1609 if (ndr_flags & NDR_SCALARS) {
1610 NDR_CHECK(ndr_push_align(ndr, 5));
1611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1612 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
1613 NDR_CHECK(ndr_push_unique_ptr(ndr, r->types));
1614 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1616 if (ndr_flags & NDR_BUFFERS) {
1617 if (r->rids) {
1618 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1619 for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
1620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_1]));
1623 if (r->types) {
1624 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1625 for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) {
1626 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->types[cntr_types_1]));
1630 return NDR_ERR_SUCCESS;
1633 static enum ndr_err_code ndr_pull_samr_RidTypeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidTypeArray *r)
1635 uint32_t _ptr_rids;
1636 uint32_t cntr_rids_1;
1637 TALLOC_CTX *_mem_save_rids_0;
1638 TALLOC_CTX *_mem_save_rids_1;
1639 uint32_t _ptr_types;
1640 uint32_t cntr_types_1;
1641 TALLOC_CTX *_mem_save_types_0;
1642 TALLOC_CTX *_mem_save_types_1;
1643 if (ndr_flags & NDR_SCALARS) {
1644 NDR_CHECK(ndr_pull_align(ndr, 5));
1645 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1646 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
1647 if (_ptr_rids) {
1648 NDR_PULL_ALLOC(ndr, r->rids);
1649 } else {
1650 r->rids = NULL;
1652 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_types));
1653 if (_ptr_types) {
1654 NDR_PULL_ALLOC(ndr, r->types);
1655 } else {
1656 r->types = NULL;
1658 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1660 if (ndr_flags & NDR_BUFFERS) {
1661 if (r->rids) {
1662 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1663 NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
1664 NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
1665 NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
1666 _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1667 NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
1668 for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
1669 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
1671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
1672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
1674 if (r->types) {
1675 _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
1676 NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
1677 NDR_CHECK(ndr_pull_array_size(ndr, &r->types));
1678 NDR_PULL_ALLOC_N(ndr, r->types, ndr_get_array_size(ndr, &r->types));
1679 _mem_save_types_1 = NDR_PULL_GET_MEM_CTX(ndr);
1680 NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
1681 for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) {
1682 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->types[cntr_types_1]));
1684 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_1, 0);
1685 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, 0);
1687 if (r->rids) {
1688 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->count));
1690 if (r->types) {
1691 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->types, r->count));
1694 return NDR_ERR_SUCCESS;
1697 _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *name, const struct samr_RidTypeArray *r)
1699 uint32_t cntr_rids_1;
1700 uint32_t cntr_types_1;
1701 ndr_print_struct(ndr, name, "samr_RidTypeArray");
1702 ndr->depth++;
1703 ndr_print_uint32(ndr, "count", r->count);
1704 ndr_print_ptr(ndr, "rids", r->rids);
1705 ndr->depth++;
1706 if (r->rids) {
1707 ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->count);
1708 ndr->depth++;
1709 for (cntr_rids_1=0;cntr_rids_1<r->count;cntr_rids_1++) {
1710 char *idx_1=NULL;
1711 if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) {
1712 ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
1713 free(idx_1);
1716 ndr->depth--;
1718 ndr->depth--;
1719 ndr_print_ptr(ndr, "types", r->types);
1720 ndr->depth++;
1721 if (r->types) {
1722 ndr->print(ndr, "%s: ARRAY(%d)", "types", (int)r->count);
1723 ndr->depth++;
1724 for (cntr_types_1=0;cntr_types_1<r->count;cntr_types_1++) {
1725 char *idx_1=NULL;
1726 if (asprintf(&idx_1, "[%d]", cntr_types_1) != -1) {
1727 ndr_print_uint32(ndr, "types", r->types[cntr_types_1]);
1728 free(idx_1);
1731 ndr->depth--;
1733 ndr->depth--;
1734 ndr->depth--;
1737 static enum ndr_err_code ndr_push_samr_AliasInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_AliasInfoAll *r)
1739 if (ndr_flags & NDR_SCALARS) {
1740 NDR_CHECK(ndr_push_align(ndr, 5));
1741 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1742 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members));
1743 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1744 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1746 if (ndr_flags & NDR_BUFFERS) {
1747 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1748 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1750 return NDR_ERR_SUCCESS;
1753 static enum ndr_err_code ndr_pull_samr_AliasInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoAll *r)
1755 if (ndr_flags & NDR_SCALARS) {
1756 NDR_CHECK(ndr_pull_align(ndr, 5));
1757 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1758 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members));
1759 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1760 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1762 if (ndr_flags & NDR_BUFFERS) {
1763 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1764 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1766 return NDR_ERR_SUCCESS;
1769 _PUBLIC_ void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r)
1771 ndr_print_struct(ndr, name, "samr_AliasInfoAll");
1772 ndr->depth++;
1773 ndr_print_lsa_String(ndr, "name", &r->name);
1774 ndr_print_uint32(ndr, "num_members", r->num_members);
1775 ndr_print_lsa_String(ndr, "description", &r->description);
1776 ndr->depth--;
1779 static enum ndr_err_code ndr_push_samr_AliasInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_AliasInfoEnum r)
1781 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1782 return NDR_ERR_SUCCESS;
1785 static enum ndr_err_code ndr_pull_samr_AliasInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_AliasInfoEnum *r)
1787 uint16_t v;
1788 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1789 *r = v;
1790 return NDR_ERR_SUCCESS;
1793 _PUBLIC_ void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r)
1795 const char *val = NULL;
1797 switch (r) {
1798 case ALIASINFOALL: val = "ALIASINFOALL"; break;
1799 case ALIASINFONAME: val = "ALIASINFONAME"; break;
1800 case ALIASINFODESCRIPTION: val = "ALIASINFODESCRIPTION"; break;
1802 ndr_print_enum(ndr, name, "ENUM", val, r);
1805 static enum ndr_err_code ndr_push_samr_AliasInfo(struct ndr_push *ndr, int ndr_flags, const union samr_AliasInfo *r)
1807 if (ndr_flags & NDR_SCALARS) {
1808 int level = ndr_push_get_switch_value(ndr, r);
1809 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, level));
1810 NDR_CHECK(ndr_push_union_align(ndr, 5));
1811 switch (level) {
1812 case ALIASINFOALL: {
1813 NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all));
1814 break; }
1816 case ALIASINFONAME: {
1817 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1818 break; }
1820 case ALIASINFODESCRIPTION: {
1821 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1822 break; }
1824 default:
1825 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1828 if (ndr_flags & NDR_BUFFERS) {
1829 int level = ndr_push_get_switch_value(ndr, r);
1830 switch (level) {
1831 case ALIASINFOALL:
1832 NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all));
1833 break;
1835 case ALIASINFONAME:
1836 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1837 break;
1839 case ALIASINFODESCRIPTION:
1840 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1841 break;
1843 default:
1844 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1847 return NDR_ERR_SUCCESS;
1850 static enum ndr_err_code ndr_pull_samr_AliasInfo(struct ndr_pull *ndr, int ndr_flags, union samr_AliasInfo *r)
1852 int level;
1853 uint16_t _level;
1854 level = ndr_pull_get_switch_value(ndr, r);
1855 if (ndr_flags & NDR_SCALARS) {
1856 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
1857 if (_level != level) {
1858 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1860 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1861 switch (level) {
1862 case ALIASINFOALL: {
1863 NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all));
1864 break; }
1866 case ALIASINFONAME: {
1867 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1868 break; }
1870 case ALIASINFODESCRIPTION: {
1871 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1872 break; }
1874 default:
1875 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1878 if (ndr_flags & NDR_BUFFERS) {
1879 switch (level) {
1880 case ALIASINFOALL:
1881 NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all));
1882 break;
1884 case ALIASINFONAME:
1885 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1886 break;
1888 case ALIASINFODESCRIPTION:
1889 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1890 break;
1892 default:
1893 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1896 return NDR_ERR_SUCCESS;
1899 _PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r)
1901 int level;
1902 level = ndr_print_get_switch_value(ndr, r);
1903 ndr_print_union(ndr, name, level, "samr_AliasInfo");
1904 switch (level) {
1905 case ALIASINFOALL:
1906 ndr_print_samr_AliasInfoAll(ndr, "all", &r->all);
1907 break;
1909 case ALIASINFONAME:
1910 ndr_print_lsa_String(ndr, "name", &r->name);
1911 break;
1913 case ALIASINFODESCRIPTION:
1914 ndr_print_lsa_String(ndr, "description", &r->description);
1915 break;
1917 default:
1918 ndr_print_bad_level(ndr, name, level);
1922 static enum ndr_err_code ndr_push_samr_UserInfoLevel(struct ndr_push *ndr, int ndr_flags, enum samr_UserInfoLevel r)
1924 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1925 return NDR_ERR_SUCCESS;
1928 static enum ndr_err_code ndr_pull_samr_UserInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_UserInfoLevel *r)
1930 uint16_t v;
1931 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1932 *r = v;
1933 return NDR_ERR_SUCCESS;
1936 _PUBLIC_ void ndr_print_samr_UserInfoLevel(struct ndr_print *ndr, const char *name, enum samr_UserInfoLevel r)
1938 const char *val = NULL;
1940 switch (r) {
1941 case UserGeneralInformation: val = "UserGeneralInformation"; break;
1942 case UserPreferencesInformation: val = "UserPreferencesInformation"; break;
1943 case UserLogonInformation: val = "UserLogonInformation"; break;
1944 case UserLogonHoursInformation: val = "UserLogonHoursInformation"; break;
1945 case UserAccountInformation: val = "UserAccountInformation"; break;
1946 case UserNameInformation: val = "UserNameInformation"; break;
1947 case UserAccountNameInformation: val = "UserAccountNameInformation"; break;
1948 case UserFullNameInformation: val = "UserFullNameInformation"; break;
1949 case UserPrimaryGroupInformation: val = "UserPrimaryGroupInformation"; break;
1950 case UserHomeInformation: val = "UserHomeInformation"; break;
1951 case UserScriptInformation: val = "UserScriptInformation"; break;
1952 case UserProfileInformation: val = "UserProfileInformation"; break;
1953 case UserAdminCommentInformation: val = "UserAdminCommentInformation"; break;
1954 case UserWorkStationsInformation: val = "UserWorkStationsInformation"; break;
1955 case UserControlInformation: val = "UserControlInformation"; break;
1956 case UserExpiresInformation: val = "UserExpiresInformation"; break;
1957 case UserInternal1Information: val = "UserInternal1Information"; break;
1958 case UserParametersInformation: val = "UserParametersInformation"; break;
1959 case UserAllInformation: val = "UserAllInformation"; break;
1960 case UserInternal4Information: val = "UserInternal4Information"; break;
1961 case UserInternal5Information: val = "UserInternal5Information"; break;
1962 case UserInternal4InformationNew: val = "UserInternal4InformationNew"; break;
1963 case UserInternal5InformationNew: val = "UserInternal5InformationNew"; break;
1965 ndr_print_enum(ndr, name, "ENUM", val, r);
1968 static enum ndr_err_code ndr_push_samr_UserInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo1 *r)
1970 if (ndr_flags & NDR_SCALARS) {
1971 NDR_CHECK(ndr_push_align(ndr, 5));
1972 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
1973 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
1974 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
1975 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1976 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
1977 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1979 if (ndr_flags & NDR_BUFFERS) {
1980 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
1981 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
1982 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1983 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
1985 return NDR_ERR_SUCCESS;
1988 static enum ndr_err_code ndr_pull_samr_UserInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo1 *r)
1990 if (ndr_flags & NDR_SCALARS) {
1991 NDR_CHECK(ndr_pull_align(ndr, 5));
1992 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
1993 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
1994 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
1995 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1996 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
1997 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1999 if (ndr_flags & NDR_BUFFERS) {
2000 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2001 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2002 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2003 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2005 return NDR_ERR_SUCCESS;
2008 _PUBLIC_ void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r)
2010 ndr_print_struct(ndr, name, "samr_UserInfo1");
2011 ndr->depth++;
2012 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2013 ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2014 ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2015 ndr_print_lsa_String(ndr, "description", &r->description);
2016 ndr_print_lsa_String(ndr, "comment", &r->comment);
2017 ndr->depth--;
2020 static enum ndr_err_code ndr_push_samr_UserInfo2(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo2 *r)
2022 if (ndr_flags & NDR_SCALARS) {
2023 NDR_CHECK(ndr_push_align(ndr, 5));
2024 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
2025 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown));
2026 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
2027 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
2028 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2030 if (ndr_flags & NDR_BUFFERS) {
2031 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2032 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown));
2034 return NDR_ERR_SUCCESS;
2037 static enum ndr_err_code ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo2 *r)
2039 if (ndr_flags & NDR_SCALARS) {
2040 NDR_CHECK(ndr_pull_align(ndr, 5));
2041 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
2042 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown));
2043 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
2044 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
2045 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2047 if (ndr_flags & NDR_BUFFERS) {
2048 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2049 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown));
2051 return NDR_ERR_SUCCESS;
2054 _PUBLIC_ void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r)
2056 ndr_print_struct(ndr, name, "samr_UserInfo2");
2057 ndr->depth++;
2058 ndr_print_lsa_String(ndr, "comment", &r->comment);
2059 ndr_print_lsa_String(ndr, "unknown", &r->unknown);
2060 ndr_print_uint16(ndr, "country_code", r->country_code);
2061 ndr_print_uint16(ndr, "code_page", r->code_page);
2062 ndr->depth--;
2065 _PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r)
2068 uint32_t _flags_save_STRUCT = ndr->flags;
2069 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2070 if (ndr_flags & NDR_SCALARS) {
2071 NDR_CHECK(ndr_push_align(ndr, 5));
2072 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->units_per_week));
2073 NDR_CHECK(ndr_push_unique_ptr(ndr, r->bits));
2074 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2076 if (ndr_flags & NDR_BUFFERS) {
2077 if (r->bits) {
2078 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1260));
2079 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2080 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->units_per_week / 8));
2081 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->bits, r->units_per_week / 8));
2084 ndr->flags = _flags_save_STRUCT;
2086 return NDR_ERR_SUCCESS;
2089 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r)
2091 uint32_t _ptr_bits;
2092 TALLOC_CTX *_mem_save_bits_0;
2094 uint32_t _flags_save_STRUCT = ndr->flags;
2095 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2096 if (ndr_flags & NDR_SCALARS) {
2097 NDR_CHECK(ndr_pull_align(ndr, 5));
2098 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->units_per_week));
2099 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bits));
2100 if (_ptr_bits) {
2101 NDR_PULL_ALLOC(ndr, r->bits);
2102 } else {
2103 r->bits = NULL;
2105 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2107 if (ndr_flags & NDR_BUFFERS) {
2108 if (r->bits) {
2109 _mem_save_bits_0 = NDR_PULL_GET_MEM_CTX(ndr);
2110 NDR_PULL_SET_MEM_CTX(ndr, r->bits, 0);
2111 NDR_CHECK(ndr_pull_array_size(ndr, &r->bits));
2112 NDR_CHECK(ndr_pull_array_length(ndr, &r->bits));
2113 if (ndr_get_array_length(ndr, &r->bits) > ndr_get_array_size(ndr, &r->bits)) {
2114 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));
2116 NDR_PULL_ALLOC_N(ndr, r->bits, ndr_get_array_size(ndr, &r->bits));
2117 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->bits, ndr_get_array_length(ndr, &r->bits)));
2118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bits_0, 0);
2120 if (r->bits) {
2121 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->bits, 1260));
2123 if (r->bits) {
2124 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->bits, r->units_per_week / 8));
2127 ndr->flags = _flags_save_STRUCT;
2129 return NDR_ERR_SUCCESS;
2132 _PUBLIC_ void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r)
2134 ndr_print_struct(ndr, name, "samr_LogonHours");
2136 uint32_t _flags_save_STRUCT = ndr->flags;
2137 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2138 ndr->depth++;
2139 ndr_print_uint16(ndr, "units_per_week", r->units_per_week);
2140 ndr_print_ptr(ndr, "bits", r->bits);
2141 ndr->depth++;
2142 if (r->bits) {
2143 ndr_print_array_uint8(ndr, "bits", r->bits, r->units_per_week / 8);
2145 ndr->depth--;
2146 ndr->depth--;
2147 ndr->flags = _flags_save_STRUCT;
2151 static enum ndr_err_code ndr_push_samr_UserInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo3 *r)
2153 if (ndr_flags & NDR_SCALARS) {
2154 NDR_CHECK(ndr_push_align(ndr, 5));
2155 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2156 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2158 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2159 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2160 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2161 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2162 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2163 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2164 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2165 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2166 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2167 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
2168 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
2169 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2170 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2171 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2172 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2173 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2175 if (ndr_flags & NDR_BUFFERS) {
2176 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2177 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2178 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2179 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2180 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2181 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2182 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2183 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2185 return NDR_ERR_SUCCESS;
2188 static enum ndr_err_code ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo3 *r)
2190 if (ndr_flags & NDR_SCALARS) {
2191 NDR_CHECK(ndr_pull_align(ndr, 5));
2192 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2193 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2194 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2195 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2196 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2197 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2198 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2199 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2200 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2201 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
2202 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
2203 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
2204 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
2205 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
2206 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2207 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
2208 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
2209 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2210 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2212 if (ndr_flags & NDR_BUFFERS) {
2213 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2214 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2215 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2216 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2217 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2218 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2219 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2220 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2222 return NDR_ERR_SUCCESS;
2225 _PUBLIC_ void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r)
2227 ndr_print_struct(ndr, name, "samr_UserInfo3");
2228 ndr->depth++;
2229 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2230 ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2231 ndr_print_uint32(ndr, "rid", r->rid);
2232 ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2233 ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2234 ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2235 ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2236 ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2237 ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2238 ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
2239 ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
2240 ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
2241 ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
2242 ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
2243 ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2244 ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
2245 ndr_print_uint16(ndr, "logon_count", r->logon_count);
2246 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2247 ndr->depth--;
2250 static enum ndr_err_code ndr_push_samr_UserInfo4(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo4 *r)
2252 if (ndr_flags & NDR_SCALARS) {
2253 NDR_CHECK(ndr_push_align(ndr, 5));
2254 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2255 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2257 if (ndr_flags & NDR_BUFFERS) {
2258 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2260 return NDR_ERR_SUCCESS;
2263 static enum ndr_err_code ndr_pull_samr_UserInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo4 *r)
2265 if (ndr_flags & NDR_SCALARS) {
2266 NDR_CHECK(ndr_pull_align(ndr, 5));
2267 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2268 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2270 if (ndr_flags & NDR_BUFFERS) {
2271 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2273 return NDR_ERR_SUCCESS;
2276 _PUBLIC_ void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r)
2278 ndr_print_struct(ndr, name, "samr_UserInfo4");
2279 ndr->depth++;
2280 ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2281 ndr->depth--;
2284 static enum ndr_err_code ndr_push_samr_UserInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo5 *r)
2286 if (ndr_flags & NDR_SCALARS) {
2287 NDR_CHECK(ndr_push_align(ndr, 5));
2288 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2289 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2292 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2293 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2294 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2295 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2296 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2297 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2298 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2299 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2300 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2301 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2302 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2303 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2304 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2305 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2306 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2308 if (ndr_flags & NDR_BUFFERS) {
2309 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2310 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2311 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2312 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2313 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2314 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2315 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2316 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2317 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2319 return NDR_ERR_SUCCESS;
2322 static enum ndr_err_code ndr_pull_samr_UserInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo5 *r)
2324 if (ndr_flags & NDR_SCALARS) {
2325 NDR_CHECK(ndr_pull_align(ndr, 5));
2326 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2327 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2328 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2329 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2330 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2331 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2332 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2333 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2334 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2335 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2336 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
2337 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
2338 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2339 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
2340 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
2341 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
2342 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
2343 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2344 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2346 if (ndr_flags & NDR_BUFFERS) {
2347 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2348 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2349 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2350 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2351 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2352 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2353 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2354 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2355 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2357 return NDR_ERR_SUCCESS;
2360 _PUBLIC_ void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r)
2362 ndr_print_struct(ndr, name, "samr_UserInfo5");
2363 ndr->depth++;
2364 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2365 ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2366 ndr_print_uint32(ndr, "rid", r->rid);
2367 ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2368 ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2369 ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2370 ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2371 ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2372 ndr_print_lsa_String(ndr, "description", &r->description);
2373 ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2374 ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
2375 ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
2376 ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2377 ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
2378 ndr_print_uint16(ndr, "logon_count", r->logon_count);
2379 ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
2380 ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
2381 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2382 ndr->depth--;
2385 static enum ndr_err_code ndr_push_samr_UserInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo6 *r)
2387 if (ndr_flags & NDR_SCALARS) {
2388 NDR_CHECK(ndr_push_align(ndr, 5));
2389 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2390 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2391 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2393 if (ndr_flags & NDR_BUFFERS) {
2394 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2395 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2397 return NDR_ERR_SUCCESS;
2400 static enum ndr_err_code ndr_pull_samr_UserInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo6 *r)
2402 if (ndr_flags & NDR_SCALARS) {
2403 NDR_CHECK(ndr_pull_align(ndr, 5));
2404 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2405 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2406 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2408 if (ndr_flags & NDR_BUFFERS) {
2409 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2410 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2412 return NDR_ERR_SUCCESS;
2415 _PUBLIC_ void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r)
2417 ndr_print_struct(ndr, name, "samr_UserInfo6");
2418 ndr->depth++;
2419 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2420 ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2421 ndr->depth--;
2424 static enum ndr_err_code ndr_push_samr_UserInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo7 *r)
2426 if (ndr_flags & NDR_SCALARS) {
2427 NDR_CHECK(ndr_push_align(ndr, 5));
2428 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2429 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2431 if (ndr_flags & NDR_BUFFERS) {
2432 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2434 return NDR_ERR_SUCCESS;
2437 static enum ndr_err_code ndr_pull_samr_UserInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo7 *r)
2439 if (ndr_flags & NDR_SCALARS) {
2440 NDR_CHECK(ndr_pull_align(ndr, 5));
2441 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2442 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2444 if (ndr_flags & NDR_BUFFERS) {
2445 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2447 return NDR_ERR_SUCCESS;
2450 _PUBLIC_ void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r)
2452 ndr_print_struct(ndr, name, "samr_UserInfo7");
2453 ndr->depth++;
2454 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2455 ndr->depth--;
2458 static enum ndr_err_code ndr_push_samr_UserInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo8 *r)
2460 if (ndr_flags & NDR_SCALARS) {
2461 NDR_CHECK(ndr_push_align(ndr, 5));
2462 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2463 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2465 if (ndr_flags & NDR_BUFFERS) {
2466 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2468 return NDR_ERR_SUCCESS;
2471 static enum ndr_err_code ndr_pull_samr_UserInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo8 *r)
2473 if (ndr_flags & NDR_SCALARS) {
2474 NDR_CHECK(ndr_pull_align(ndr, 5));
2475 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2476 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2478 if (ndr_flags & NDR_BUFFERS) {
2479 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2481 return NDR_ERR_SUCCESS;
2484 _PUBLIC_ void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r)
2486 ndr_print_struct(ndr, name, "samr_UserInfo8");
2487 ndr->depth++;
2488 ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2489 ndr->depth--;
2492 static enum ndr_err_code ndr_push_samr_UserInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo9 *r)
2494 if (ndr_flags & NDR_SCALARS) {
2495 NDR_CHECK(ndr_push_align(ndr, 4));
2496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2497 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2499 if (ndr_flags & NDR_BUFFERS) {
2501 return NDR_ERR_SUCCESS;
2504 static enum ndr_err_code ndr_pull_samr_UserInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo9 *r)
2506 if (ndr_flags & NDR_SCALARS) {
2507 NDR_CHECK(ndr_pull_align(ndr, 4));
2508 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2509 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2511 if (ndr_flags & NDR_BUFFERS) {
2513 return NDR_ERR_SUCCESS;
2516 _PUBLIC_ void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r)
2518 ndr_print_struct(ndr, name, "samr_UserInfo9");
2519 ndr->depth++;
2520 ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2521 ndr->depth--;
2524 static enum ndr_err_code ndr_push_samr_UserInfo10(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo10 *r)
2526 if (ndr_flags & NDR_SCALARS) {
2527 NDR_CHECK(ndr_push_align(ndr, 5));
2528 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2529 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2530 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2532 if (ndr_flags & NDR_BUFFERS) {
2533 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2534 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2536 return NDR_ERR_SUCCESS;
2539 static enum ndr_err_code ndr_pull_samr_UserInfo10(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo10 *r)
2541 if (ndr_flags & NDR_SCALARS) {
2542 NDR_CHECK(ndr_pull_align(ndr, 5));
2543 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2544 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2545 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2547 if (ndr_flags & NDR_BUFFERS) {
2548 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2549 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2551 return NDR_ERR_SUCCESS;
2554 _PUBLIC_ void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r)
2556 ndr_print_struct(ndr, name, "samr_UserInfo10");
2557 ndr->depth++;
2558 ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2559 ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2560 ndr->depth--;
2563 static enum ndr_err_code ndr_push_samr_UserInfo11(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo11 *r)
2565 if (ndr_flags & NDR_SCALARS) {
2566 NDR_CHECK(ndr_push_align(ndr, 5));
2567 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2568 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2570 if (ndr_flags & NDR_BUFFERS) {
2571 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2573 return NDR_ERR_SUCCESS;
2576 static enum ndr_err_code ndr_pull_samr_UserInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo11 *r)
2578 if (ndr_flags & NDR_SCALARS) {
2579 NDR_CHECK(ndr_pull_align(ndr, 5));
2580 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2581 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2583 if (ndr_flags & NDR_BUFFERS) {
2584 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2586 return NDR_ERR_SUCCESS;
2589 _PUBLIC_ void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r)
2591 ndr_print_struct(ndr, name, "samr_UserInfo11");
2592 ndr->depth++;
2593 ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2594 ndr->depth--;
2597 static enum ndr_err_code ndr_push_samr_UserInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo12 *r)
2599 if (ndr_flags & NDR_SCALARS) {
2600 NDR_CHECK(ndr_push_align(ndr, 5));
2601 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2602 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2604 if (ndr_flags & NDR_BUFFERS) {
2605 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2607 return NDR_ERR_SUCCESS;
2610 static enum ndr_err_code ndr_pull_samr_UserInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo12 *r)
2612 if (ndr_flags & NDR_SCALARS) {
2613 NDR_CHECK(ndr_pull_align(ndr, 5));
2614 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2615 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2617 if (ndr_flags & NDR_BUFFERS) {
2618 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2620 return NDR_ERR_SUCCESS;
2623 _PUBLIC_ void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r)
2625 ndr_print_struct(ndr, name, "samr_UserInfo12");
2626 ndr->depth++;
2627 ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2628 ndr->depth--;
2631 static enum ndr_err_code ndr_push_samr_UserInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo13 *r)
2633 if (ndr_flags & NDR_SCALARS) {
2634 NDR_CHECK(ndr_push_align(ndr, 5));
2635 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2636 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2638 if (ndr_flags & NDR_BUFFERS) {
2639 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2641 return NDR_ERR_SUCCESS;
2644 static enum ndr_err_code ndr_pull_samr_UserInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo13 *r)
2646 if (ndr_flags & NDR_SCALARS) {
2647 NDR_CHECK(ndr_pull_align(ndr, 5));
2648 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2649 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2651 if (ndr_flags & NDR_BUFFERS) {
2652 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2654 return NDR_ERR_SUCCESS;
2657 _PUBLIC_ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r)
2659 ndr_print_struct(ndr, name, "samr_UserInfo13");
2660 ndr->depth++;
2661 ndr_print_lsa_String(ndr, "description", &r->description);
2662 ndr->depth--;
2665 static enum ndr_err_code ndr_push_samr_UserInfo14(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo14 *r)
2667 if (ndr_flags & NDR_SCALARS) {
2668 NDR_CHECK(ndr_push_align(ndr, 5));
2669 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2670 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2672 if (ndr_flags & NDR_BUFFERS) {
2673 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2675 return NDR_ERR_SUCCESS;
2678 static enum ndr_err_code ndr_pull_samr_UserInfo14(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo14 *r)
2680 if (ndr_flags & NDR_SCALARS) {
2681 NDR_CHECK(ndr_pull_align(ndr, 5));
2682 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2683 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2685 if (ndr_flags & NDR_BUFFERS) {
2686 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2688 return NDR_ERR_SUCCESS;
2691 _PUBLIC_ void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r)
2693 ndr_print_struct(ndr, name, "samr_UserInfo14");
2694 ndr->depth++;
2695 ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2696 ndr->depth--;
2699 static enum ndr_err_code ndr_push_samr_UserInfo16(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo16 *r)
2701 if (ndr_flags & NDR_SCALARS) {
2702 NDR_CHECK(ndr_push_align(ndr, 4));
2703 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2704 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2706 if (ndr_flags & NDR_BUFFERS) {
2708 return NDR_ERR_SUCCESS;
2711 static enum ndr_err_code ndr_pull_samr_UserInfo16(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo16 *r)
2713 if (ndr_flags & NDR_SCALARS) {
2714 NDR_CHECK(ndr_pull_align(ndr, 4));
2715 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2716 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2718 if (ndr_flags & NDR_BUFFERS) {
2720 return NDR_ERR_SUCCESS;
2723 _PUBLIC_ void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r)
2725 ndr_print_struct(ndr, name, "samr_UserInfo16");
2726 ndr->depth++;
2727 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2728 ndr->depth--;
2731 static enum ndr_err_code ndr_push_samr_UserInfo17(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo17 *r)
2733 if (ndr_flags & NDR_SCALARS) {
2734 NDR_CHECK(ndr_push_align(ndr, 4));
2735 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2736 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2738 if (ndr_flags & NDR_BUFFERS) {
2740 return NDR_ERR_SUCCESS;
2743 static enum ndr_err_code ndr_pull_samr_UserInfo17(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo17 *r)
2745 if (ndr_flags & NDR_SCALARS) {
2746 NDR_CHECK(ndr_pull_align(ndr, 4));
2747 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
2748 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2750 if (ndr_flags & NDR_BUFFERS) {
2752 return NDR_ERR_SUCCESS;
2755 _PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r)
2757 ndr_print_struct(ndr, name, "samr_UserInfo17");
2758 ndr->depth++;
2759 ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
2760 ndr->depth--;
2763 _PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r)
2766 uint32_t _flags_save_STRUCT = ndr->flags;
2767 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2768 if (ndr_flags & NDR_SCALARS) {
2769 NDR_CHECK(ndr_push_align(ndr, 1));
2770 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2771 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2773 if (ndr_flags & NDR_BUFFERS) {
2775 ndr->flags = _flags_save_STRUCT;
2777 return NDR_ERR_SUCCESS;
2780 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r)
2783 uint32_t _flags_save_STRUCT = ndr->flags;
2784 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2785 if (ndr_flags & NDR_SCALARS) {
2786 NDR_CHECK(ndr_pull_align(ndr, 1));
2787 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2788 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2790 if (ndr_flags & NDR_BUFFERS) {
2792 ndr->flags = _flags_save_STRUCT;
2794 return NDR_ERR_SUCCESS;
2797 _PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r)
2799 ndr_print_struct(ndr, name, "samr_Password");
2801 uint32_t _flags_save_STRUCT = ndr->flags;
2802 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2803 ndr->depth++;
2804 ndr_print_array_uint8(ndr, "hash", r->hash, 16);
2805 ndr->depth--;
2806 ndr->flags = _flags_save_STRUCT;
2810 static enum ndr_err_code ndr_push_samr_UserInfo18(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo18 *r)
2812 if (ndr_flags & NDR_SCALARS) {
2813 NDR_CHECK(ndr_push_align(ndr, 1));
2814 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd));
2815 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd));
2816 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_pwd_active));
2817 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_pwd_active));
2818 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
2819 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2821 if (ndr_flags & NDR_BUFFERS) {
2823 return NDR_ERR_SUCCESS;
2826 static enum ndr_err_code ndr_pull_samr_UserInfo18(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo18 *r)
2828 if (ndr_flags & NDR_SCALARS) {
2829 NDR_CHECK(ndr_pull_align(ndr, 1));
2830 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd));
2831 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd));
2832 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_pwd_active));
2833 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_pwd_active));
2834 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
2835 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2837 if (ndr_flags & NDR_BUFFERS) {
2839 return NDR_ERR_SUCCESS;
2842 _PUBLIC_ void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r)
2844 ndr_print_struct(ndr, name, "samr_UserInfo18");
2845 ndr->depth++;
2846 ndr_print_samr_Password(ndr, "nt_pwd", &r->nt_pwd);
2847 ndr_print_samr_Password(ndr, "lm_pwd", &r->lm_pwd);
2848 ndr_print_uint8(ndr, "nt_pwd_active", r->nt_pwd_active);
2849 ndr_print_uint8(ndr, "lm_pwd_active", r->lm_pwd_active);
2850 ndr_print_uint8(ndr, "password_expired", r->password_expired);
2851 ndr->depth--;
2854 static enum ndr_err_code ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo20 *r)
2856 if (ndr_flags & NDR_SCALARS) {
2857 NDR_CHECK(ndr_push_align(ndr, 5));
2858 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2859 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2861 if (ndr_flags & NDR_BUFFERS) {
2862 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2864 return NDR_ERR_SUCCESS;
2867 static enum ndr_err_code ndr_pull_samr_UserInfo20(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo20 *r)
2869 if (ndr_flags & NDR_SCALARS) {
2870 NDR_CHECK(ndr_pull_align(ndr, 5));
2871 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2872 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2874 if (ndr_flags & NDR_BUFFERS) {
2875 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2877 return NDR_ERR_SUCCESS;
2880 _PUBLIC_ void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r)
2882 ndr_print_struct(ndr, name, "samr_UserInfo20");
2883 ndr->depth++;
2884 ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
2885 ndr->depth--;
2888 static enum ndr_err_code ndr_push_samr_FieldsPresent(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2890 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2891 return NDR_ERR_SUCCESS;
2894 static enum ndr_err_code ndr_pull_samr_FieldsPresent(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2896 uint32_t v;
2897 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2898 *r = v;
2899 return NDR_ERR_SUCCESS;
2902 _PUBLIC_ void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r)
2904 ndr_print_uint32(ndr, name, r);
2905 ndr->depth++;
2906 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCOUNT_NAME", SAMR_FIELD_ACCOUNT_NAME, r);
2907 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_FULL_NAME", SAMR_FIELD_FULL_NAME, r);
2908 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_RID", SAMR_FIELD_RID, r);
2909 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PRIMARY_GID", SAMR_FIELD_PRIMARY_GID, r);
2910 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_DESCRIPTION", SAMR_FIELD_DESCRIPTION, r);
2911 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_COMMENT", SAMR_FIELD_COMMENT, r);
2912 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_HOME_DIRECTORY", SAMR_FIELD_HOME_DIRECTORY, r);
2913 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_HOME_DRIVE", SAMR_FIELD_HOME_DRIVE, r);
2914 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LOGON_SCRIPT", SAMR_FIELD_LOGON_SCRIPT, r);
2915 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PROFILE_PATH", SAMR_FIELD_PROFILE_PATH, r);
2916 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_WORKSTATIONS", SAMR_FIELD_WORKSTATIONS, r);
2917 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGON", SAMR_FIELD_LAST_LOGON, r);
2918 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGOFF", SAMR_FIELD_LAST_LOGOFF, r);
2919 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LOGON_HOURS", SAMR_FIELD_LOGON_HOURS, r);
2920 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_BAD_PWD_COUNT", SAMR_FIELD_BAD_PWD_COUNT, r);
2921 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_NUM_LOGONS", SAMR_FIELD_NUM_LOGONS, r);
2922 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ALLOW_PWD_CHANGE", SAMR_FIELD_ALLOW_PWD_CHANGE, r);
2923 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_FORCE_PWD_CHANGE", SAMR_FIELD_FORCE_PWD_CHANGE, r);
2924 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_PWD_CHANGE", SAMR_FIELD_LAST_PWD_CHANGE, r);
2925 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCT_EXPIRY", SAMR_FIELD_ACCT_EXPIRY, r);
2926 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCT_FLAGS", SAMR_FIELD_ACCT_FLAGS, r);
2927 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PARAMETERS", SAMR_FIELD_PARAMETERS, r);
2928 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_COUNTRY_CODE", SAMR_FIELD_COUNTRY_CODE, r);
2929 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_CODE_PAGE", SAMR_FIELD_CODE_PAGE, r);
2930 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_NT_PASSWORD_PRESENT", SAMR_FIELD_NT_PASSWORD_PRESENT, r);
2931 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LM_PASSWORD_PRESENT", SAMR_FIELD_LM_PASSWORD_PRESENT, r);
2932 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PRIVATE_DATA", SAMR_FIELD_PRIVATE_DATA, r);
2933 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_EXPIRED_FLAG", SAMR_FIELD_EXPIRED_FLAG, r);
2934 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_SEC_DESC", SAMR_FIELD_SEC_DESC, r);
2935 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_OWF_PWD", SAMR_FIELD_OWF_PWD, r);
2936 ndr->depth--;
2939 static enum ndr_err_code ndr_push_samr_UserInfo21(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo21 *r)
2941 if (ndr_flags & NDR_SCALARS) {
2942 NDR_CHECK(ndr_push_align(ndr, 5));
2943 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2944 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2945 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2946 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2947 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
2948 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
2949 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2950 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2951 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2952 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2953 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2954 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2955 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2956 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2957 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
2958 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2959 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->lm_owf_password));
2960 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->nt_owf_password));
2961 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_count));
2963 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer));
2964 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2965 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2966 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2967 NDR_CHECK(ndr_push_samr_FieldsPresent(ndr, NDR_SCALARS, r->fields_present));
2968 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2969 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2970 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2971 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
2972 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
2973 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_set));
2974 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_set));
2975 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
2976 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->unknown4));
2977 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2979 if (ndr_flags & NDR_BUFFERS) {
2980 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2981 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2982 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2983 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2984 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2985 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2986 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2987 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2988 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2989 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2990 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->lm_owf_password));
2991 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->nt_owf_password));
2992 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2993 if (r->buffer) {
2994 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->buf_count));
2995 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->buf_count));
2997 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2999 return NDR_ERR_SUCCESS;
3002 static enum ndr_err_code ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo21 *r)
3004 uint32_t _ptr_buffer;
3005 TALLOC_CTX *_mem_save_buffer_0;
3006 if (ndr_flags & NDR_SCALARS) {
3007 NDR_CHECK(ndr_pull_align(ndr, 5));
3008 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
3009 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
3010 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
3011 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
3012 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
3013 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
3014 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
3015 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
3016 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
3017 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
3018 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
3019 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
3020 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
3021 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
3022 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
3023 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
3024 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->lm_owf_password));
3025 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->nt_owf_password));
3026 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3027 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_count));
3028 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
3029 if (_ptr_buffer) {
3030 NDR_PULL_ALLOC(ndr, r->buffer);
3031 } else {
3032 r->buffer = NULL;
3034 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3035 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
3036 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
3037 NDR_CHECK(ndr_pull_samr_FieldsPresent(ndr, NDR_SCALARS, &r->fields_present));
3038 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
3039 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
3040 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
3041 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
3042 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
3043 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_set));
3044 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_set));
3045 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3046 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown4));
3047 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3049 if (ndr_flags & NDR_BUFFERS) {
3050 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
3051 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
3052 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
3053 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
3054 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
3055 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
3056 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
3057 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
3058 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
3059 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
3060 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->lm_owf_password));
3061 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->nt_owf_password));
3062 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3063 if (r->buffer) {
3064 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
3065 NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0);
3066 NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer));
3067 NDR_PULL_ALLOC_N(ndr, r->buffer, ndr_get_array_size(ndr, &r->buffer));
3068 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, ndr_get_array_size(ndr, &r->buffer)));
3069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
3071 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
3072 if (r->buffer) {
3073 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->buffer, r->buf_count));
3076 return NDR_ERR_SUCCESS;
3079 _PUBLIC_ void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r)
3081 ndr_print_struct(ndr, name, "samr_UserInfo21");
3082 ndr->depth++;
3083 ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
3084 ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
3085 ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
3086 ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
3087 ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
3088 ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
3089 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
3090 ndr_print_lsa_String(ndr, "full_name", &r->full_name);
3091 ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
3092 ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
3093 ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
3094 ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
3095 ndr_print_lsa_String(ndr, "description", &r->description);
3096 ndr_print_lsa_String(ndr, "workstations", &r->workstations);
3097 ndr_print_lsa_String(ndr, "comment", &r->comment);
3098 ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
3099 ndr_print_lsa_BinaryString(ndr, "lm_owf_password", &r->lm_owf_password);
3100 ndr_print_lsa_BinaryString(ndr, "nt_owf_password", &r->nt_owf_password);
3101 ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3102 ndr_print_uint32(ndr, "buf_count", r->buf_count);
3103 ndr_print_ptr(ndr, "buffer", r->buffer);
3104 ndr->depth++;
3105 if (r->buffer) {
3106 ndr_print_array_uint8(ndr, "buffer", r->buffer, r->buf_count);
3108 ndr->depth--;
3109 ndr_print_uint32(ndr, "rid", r->rid);
3110 ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
3111 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
3112 ndr_print_samr_FieldsPresent(ndr, "fields_present", r->fields_present);
3113 ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
3114 ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
3115 ndr_print_uint16(ndr, "logon_count", r->logon_count);
3116 ndr_print_uint16(ndr, "country_code", r->country_code);
3117 ndr_print_uint16(ndr, "code_page", r->code_page);
3118 ndr_print_uint8(ndr, "lm_password_set", r->lm_password_set);
3119 ndr_print_uint8(ndr, "nt_password_set", r->nt_password_set);
3120 ndr_print_uint8(ndr, "password_expired", r->password_expired);
3121 ndr_print_uint8(ndr, "unknown4", r->unknown4);
3122 ndr->depth--;
3125 _PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r)
3128 uint32_t _flags_save_STRUCT = ndr->flags;
3129 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3130 if (ndr_flags & NDR_SCALARS) {
3131 NDR_CHECK(ndr_push_align(ndr, 1));
3132 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 516));
3133 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3135 if (ndr_flags & NDR_BUFFERS) {
3137 ndr->flags = _flags_save_STRUCT;
3139 return NDR_ERR_SUCCESS;
3142 _PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r)
3145 uint32_t _flags_save_STRUCT = ndr->flags;
3146 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3147 if (ndr_flags & NDR_SCALARS) {
3148 NDR_CHECK(ndr_pull_align(ndr, 1));
3149 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 516));
3150 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3152 if (ndr_flags & NDR_BUFFERS) {
3154 ndr->flags = _flags_save_STRUCT;
3156 return NDR_ERR_SUCCESS;
3159 _PUBLIC_ void ndr_print_samr_CryptPassword(struct ndr_print *ndr, const char *name, const struct samr_CryptPassword *r)
3161 ndr_print_struct(ndr, name, "samr_CryptPassword");
3163 uint32_t _flags_save_STRUCT = ndr->flags;
3164 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3165 ndr->depth++;
3166 ndr_print_array_uint8(ndr, "data", r->data, 516);
3167 ndr->depth--;
3168 ndr->flags = _flags_save_STRUCT;
3172 static enum ndr_err_code ndr_push_samr_UserInfo23(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo23 *r)
3174 if (ndr_flags & NDR_SCALARS) {
3175 NDR_CHECK(ndr_push_align(ndr, 5));
3176 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3177 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3178 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3180 if (ndr_flags & NDR_BUFFERS) {
3181 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3183 return NDR_ERR_SUCCESS;
3186 static enum ndr_err_code ndr_pull_samr_UserInfo23(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo23 *r)
3188 if (ndr_flags & NDR_SCALARS) {
3189 NDR_CHECK(ndr_pull_align(ndr, 5));
3190 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3191 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3192 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3194 if (ndr_flags & NDR_BUFFERS) {
3195 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3197 return NDR_ERR_SUCCESS;
3200 _PUBLIC_ void ndr_print_samr_UserInfo23(struct ndr_print *ndr, const char *name, const struct samr_UserInfo23 *r)
3202 ndr_print_struct(ndr, name, "samr_UserInfo23");
3203 ndr->depth++;
3204 ndr_print_samr_UserInfo21(ndr, "info", &r->info);
3205 ndr_print_samr_CryptPassword(ndr, "password", &r->password);
3206 ndr->depth--;
3209 static enum ndr_err_code ndr_push_samr_UserInfo24(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo24 *r)
3211 if (ndr_flags & NDR_SCALARS) {
3212 NDR_CHECK(ndr_push_align(ndr, 1));
3213 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3214 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
3215 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3217 if (ndr_flags & NDR_BUFFERS) {
3219 return NDR_ERR_SUCCESS;
3222 static enum ndr_err_code ndr_pull_samr_UserInfo24(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo24 *r)
3224 if (ndr_flags & NDR_SCALARS) {
3225 NDR_CHECK(ndr_pull_align(ndr, 1));
3226 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3227 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3228 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3230 if (ndr_flags & NDR_BUFFERS) {
3232 return NDR_ERR_SUCCESS;
3235 _PUBLIC_ void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name, const struct samr_UserInfo24 *r)
3237 ndr_print_struct(ndr, name, "samr_UserInfo24");
3238 ndr->depth++;
3239 ndr_print_samr_CryptPassword(ndr, "password", &r->password);
3240 ndr_print_uint8(ndr, "password_expired", r->password_expired);
3241 ndr->depth--;
3244 static enum ndr_err_code ndr_push_samr_CryptPasswordEx(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPasswordEx *r)
3247 uint32_t _flags_save_STRUCT = ndr->flags;
3248 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3249 if (ndr_flags & NDR_SCALARS) {
3250 NDR_CHECK(ndr_push_align(ndr, 1));
3251 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 532));
3252 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3254 if (ndr_flags & NDR_BUFFERS) {
3256 ndr->flags = _flags_save_STRUCT;
3258 return NDR_ERR_SUCCESS;
3261 static enum ndr_err_code ndr_pull_samr_CryptPasswordEx(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPasswordEx *r)
3264 uint32_t _flags_save_STRUCT = ndr->flags;
3265 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3266 if (ndr_flags & NDR_SCALARS) {
3267 NDR_CHECK(ndr_pull_align(ndr, 1));
3268 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 532));
3269 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3271 if (ndr_flags & NDR_BUFFERS) {
3273 ndr->flags = _flags_save_STRUCT;
3275 return NDR_ERR_SUCCESS;
3278 _PUBLIC_ void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, const struct samr_CryptPasswordEx *r)
3280 ndr_print_struct(ndr, name, "samr_CryptPasswordEx");
3282 uint32_t _flags_save_STRUCT = ndr->flags;
3283 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3284 ndr->depth++;
3285 ndr_print_array_uint8(ndr, "data", r->data, 532);
3286 ndr->depth--;
3287 ndr->flags = _flags_save_STRUCT;
3291 static enum ndr_err_code ndr_push_samr_UserInfo25(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo25 *r)
3293 if (ndr_flags & NDR_SCALARS) {
3294 NDR_CHECK(ndr_push_align(ndr, 5));
3295 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3296 NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3297 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3299 if (ndr_flags & NDR_BUFFERS) {
3300 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3302 return NDR_ERR_SUCCESS;
3305 static enum ndr_err_code ndr_pull_samr_UserInfo25(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo25 *r)
3307 if (ndr_flags & NDR_SCALARS) {
3308 NDR_CHECK(ndr_pull_align(ndr, 5));
3309 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3310 NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3311 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3313 if (ndr_flags & NDR_BUFFERS) {
3314 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3316 return NDR_ERR_SUCCESS;
3319 _PUBLIC_ void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r)
3321 ndr_print_struct(ndr, name, "samr_UserInfo25");
3322 ndr->depth++;
3323 ndr_print_samr_UserInfo21(ndr, "info", &r->info);
3324 ndr_print_samr_CryptPasswordEx(ndr, "password", &r->password);
3325 ndr->depth--;
3328 static enum ndr_err_code ndr_push_samr_UserInfo26(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo26 *r)
3330 if (ndr_flags & NDR_SCALARS) {
3331 NDR_CHECK(ndr_push_align(ndr, 1));
3332 NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3333 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
3334 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3336 if (ndr_flags & NDR_BUFFERS) {
3338 return NDR_ERR_SUCCESS;
3341 static enum ndr_err_code ndr_pull_samr_UserInfo26(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo26 *r)
3343 if (ndr_flags & NDR_SCALARS) {
3344 NDR_CHECK(ndr_pull_align(ndr, 1));
3345 NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3346 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3347 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3349 if (ndr_flags & NDR_BUFFERS) {
3351 return NDR_ERR_SUCCESS;
3354 _PUBLIC_ void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r)
3356 ndr_print_struct(ndr, name, "samr_UserInfo26");
3357 ndr->depth++;
3358 ndr_print_samr_CryptPasswordEx(ndr, "password", &r->password);
3359 ndr_print_uint8(ndr, "password_expired", r->password_expired);
3360 ndr->depth--;
3363 static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_flags, const union samr_UserInfo *r)
3365 if (ndr_flags & NDR_SCALARS) {
3366 int level = ndr_push_get_switch_value(ndr, r);
3367 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
3368 NDR_CHECK(ndr_push_union_align(ndr, 5));
3369 switch (level) {
3370 case 1: {
3371 NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1));
3372 break; }
3374 case 2: {
3375 NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2));
3376 break; }
3378 case 3: {
3379 NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3));
3380 break; }
3382 case 4: {
3383 NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4));
3384 break; }
3386 case 5: {
3387 NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5));
3388 break; }
3390 case 6: {
3391 NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6));
3392 break; }
3394 case 7: {
3395 NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7));
3396 break; }
3398 case 8: {
3399 NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8));
3400 break; }
3402 case 9: {
3403 NDR_CHECK(ndr_push_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9));
3404 break; }
3406 case 10: {
3407 NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10));
3408 break; }
3410 case 11: {
3411 NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11));
3412 break; }
3414 case 12: {
3415 NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12));
3416 break; }
3418 case 13: {
3419 NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13));
3420 break; }
3422 case 14: {
3423 NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14));
3424 break; }
3426 case 16: {
3427 NDR_CHECK(ndr_push_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16));
3428 break; }
3430 case 17: {
3431 NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17));
3432 break; }
3434 case 18: {
3435 NDR_CHECK(ndr_push_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18));
3436 break; }
3438 case 20: {
3439 NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20));
3440 break; }
3442 case 21: {
3443 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21));
3444 break; }
3446 case 23: {
3447 NDR_CHECK(ndr_push_samr_UserInfo23(ndr, NDR_SCALARS, &r->info23));
3448 break; }
3450 case 24: {
3451 NDR_CHECK(ndr_push_samr_UserInfo24(ndr, NDR_SCALARS, &r->info24));
3452 break; }
3454 case 25: {
3455 NDR_CHECK(ndr_push_samr_UserInfo25(ndr, NDR_SCALARS, &r->info25));
3456 break; }
3458 case 26: {
3459 NDR_CHECK(ndr_push_samr_UserInfo26(ndr, NDR_SCALARS, &r->info26));
3460 break; }
3462 default:
3463 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3466 if (ndr_flags & NDR_BUFFERS) {
3467 int level = ndr_push_get_switch_value(ndr, r);
3468 switch (level) {
3469 case 1:
3470 NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1));
3471 break;
3473 case 2:
3474 NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2));
3475 break;
3477 case 3:
3478 NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3));
3479 break;
3481 case 4:
3482 NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4));
3483 break;
3485 case 5:
3486 NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5));
3487 break;
3489 case 6:
3490 NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6));
3491 break;
3493 case 7:
3494 NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7));
3495 break;
3497 case 8:
3498 NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8));
3499 break;
3501 case 9:
3502 break;
3504 case 10:
3505 NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10));
3506 break;
3508 case 11:
3509 NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11));
3510 break;
3512 case 12:
3513 NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12));
3514 break;
3516 case 13:
3517 NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13));
3518 break;
3520 case 14:
3521 NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14));
3522 break;
3524 case 16:
3525 break;
3527 case 17:
3528 break;
3530 case 18:
3531 break;
3533 case 20:
3534 NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20));
3535 break;
3537 case 21:
3538 NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21));
3539 break;
3541 case 23:
3542 NDR_CHECK(ndr_push_samr_UserInfo23(ndr, NDR_BUFFERS, &r->info23));
3543 break;
3545 case 24:
3546 break;
3548 case 25:
3549 NDR_CHECK(ndr_push_samr_UserInfo25(ndr, NDR_BUFFERS, &r->info25));
3550 break;
3552 case 26:
3553 break;
3555 default:
3556 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3559 return NDR_ERR_SUCCESS;
3562 static enum ndr_err_code ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_flags, union samr_UserInfo *r)
3564 int level;
3565 uint16_t _level;
3566 level = ndr_pull_get_switch_value(ndr, r);
3567 if (ndr_flags & NDR_SCALARS) {
3568 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3569 if (_level != level) {
3570 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3572 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3573 switch (level) {
3574 case 1: {
3575 NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1));
3576 break; }
3578 case 2: {
3579 NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2));
3580 break; }
3582 case 3: {
3583 NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3));
3584 break; }
3586 case 4: {
3587 NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4));
3588 break; }
3590 case 5: {
3591 NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5));
3592 break; }
3594 case 6: {
3595 NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6));
3596 break; }
3598 case 7: {
3599 NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7));
3600 break; }
3602 case 8: {
3603 NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8));
3604 break; }
3606 case 9: {
3607 NDR_CHECK(ndr_pull_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9));
3608 break; }
3610 case 10: {
3611 NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10));
3612 break; }
3614 case 11: {
3615 NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11));
3616 break; }
3618 case 12: {
3619 NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12));
3620 break; }
3622 case 13: {
3623 NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13));
3624 break; }
3626 case 14: {
3627 NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14));
3628 break; }
3630 case 16: {
3631 NDR_CHECK(ndr_pull_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16));
3632 break; }
3634 case 17: {
3635 NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17));
3636 break; }
3638 case 18: {
3639 NDR_CHECK(ndr_pull_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18));
3640 break; }
3642 case 20: {
3643 NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20));
3644 break; }
3646 case 21: {
3647 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21));
3648 break; }
3650 case 23: {
3651 NDR_CHECK(ndr_pull_samr_UserInfo23(ndr, NDR_SCALARS, &r->info23));
3652 break; }
3654 case 24: {
3655 NDR_CHECK(ndr_pull_samr_UserInfo24(ndr, NDR_SCALARS, &r->info24));
3656 break; }
3658 case 25: {
3659 NDR_CHECK(ndr_pull_samr_UserInfo25(ndr, NDR_SCALARS, &r->info25));
3660 break; }
3662 case 26: {
3663 NDR_CHECK(ndr_pull_samr_UserInfo26(ndr, NDR_SCALARS, &r->info26));
3664 break; }
3666 default:
3667 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3670 if (ndr_flags & NDR_BUFFERS) {
3671 switch (level) {
3672 case 1:
3673 NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1));
3674 break;
3676 case 2:
3677 NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2));
3678 break;
3680 case 3:
3681 NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3));
3682 break;
3684 case 4:
3685 NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4));
3686 break;
3688 case 5:
3689 NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5));
3690 break;
3692 case 6:
3693 NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6));
3694 break;
3696 case 7:
3697 NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7));
3698 break;
3700 case 8:
3701 NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8));
3702 break;
3704 case 9:
3705 break;
3707 case 10:
3708 NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10));
3709 break;
3711 case 11:
3712 NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11));
3713 break;
3715 case 12:
3716 NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12));
3717 break;
3719 case 13:
3720 NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13));
3721 break;
3723 case 14:
3724 NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14));
3725 break;
3727 case 16:
3728 break;
3730 case 17:
3731 break;
3733 case 18:
3734 break;
3736 case 20:
3737 NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20));
3738 break;
3740 case 21:
3741 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21));
3742 break;
3744 case 23:
3745 NDR_CHECK(ndr_pull_samr_UserInfo23(ndr, NDR_BUFFERS, &r->info23));
3746 break;
3748 case 24:
3749 break;
3751 case 25:
3752 NDR_CHECK(ndr_pull_samr_UserInfo25(ndr, NDR_BUFFERS, &r->info25));
3753 break;
3755 case 26:
3756 break;
3758 default:
3759 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3762 return NDR_ERR_SUCCESS;
3765 _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r)
3767 int level;
3768 level = ndr_print_get_switch_value(ndr, r);
3769 ndr_print_union(ndr, name, level, "samr_UserInfo");
3770 switch (level) {
3771 case 1:
3772 ndr_print_samr_UserInfo1(ndr, "info1", &r->info1);
3773 break;
3775 case 2:
3776 ndr_print_samr_UserInfo2(ndr, "info2", &r->info2);
3777 break;
3779 case 3:
3780 ndr_print_samr_UserInfo3(ndr, "info3", &r->info3);
3781 break;
3783 case 4:
3784 ndr_print_samr_UserInfo4(ndr, "info4", &r->info4);
3785 break;
3787 case 5:
3788 ndr_print_samr_UserInfo5(ndr, "info5", &r->info5);
3789 break;
3791 case 6:
3792 ndr_print_samr_UserInfo6(ndr, "info6", &r->info6);
3793 break;
3795 case 7:
3796 ndr_print_samr_UserInfo7(ndr, "info7", &r->info7);
3797 break;
3799 case 8:
3800 ndr_print_samr_UserInfo8(ndr, "info8", &r->info8);
3801 break;
3803 case 9:
3804 ndr_print_samr_UserInfo9(ndr, "info9", &r->info9);
3805 break;
3807 case 10:
3808 ndr_print_samr_UserInfo10(ndr, "info10", &r->info10);
3809 break;
3811 case 11:
3812 ndr_print_samr_UserInfo11(ndr, "info11", &r->info11);
3813 break;
3815 case 12:
3816 ndr_print_samr_UserInfo12(ndr, "info12", &r->info12);
3817 break;
3819 case 13:
3820 ndr_print_samr_UserInfo13(ndr, "info13", &r->info13);
3821 break;
3823 case 14:
3824 ndr_print_samr_UserInfo14(ndr, "info14", &r->info14);
3825 break;
3827 case 16:
3828 ndr_print_samr_UserInfo16(ndr, "info16", &r->info16);
3829 break;
3831 case 17:
3832 ndr_print_samr_UserInfo17(ndr, "info17", &r->info17);
3833 break;
3835 case 18:
3836 ndr_print_samr_UserInfo18(ndr, "info18", &r->info18);
3837 break;
3839 case 20:
3840 ndr_print_samr_UserInfo20(ndr, "info20", &r->info20);
3841 break;
3843 case 21:
3844 ndr_print_samr_UserInfo21(ndr, "info21", &r->info21);
3845 break;
3847 case 23:
3848 ndr_print_samr_UserInfo23(ndr, "info23", &r->info23);
3849 break;
3851 case 24:
3852 ndr_print_samr_UserInfo24(ndr, "info24", &r->info24);
3853 break;
3855 case 25:
3856 ndr_print_samr_UserInfo25(ndr, "info25", &r->info25);
3857 break;
3859 case 26:
3860 ndr_print_samr_UserInfo26(ndr, "info26", &r->info26);
3861 break;
3863 default:
3864 ndr_print_bad_level(ndr, name, level);
3868 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r)
3870 if (ndr_flags & NDR_SCALARS) {
3871 NDR_CHECK(ndr_push_align(ndr, 4));
3872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
3873 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
3874 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3876 if (ndr_flags & NDR_BUFFERS) {
3878 return NDR_ERR_SUCCESS;
3881 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r)
3883 if (ndr_flags & NDR_SCALARS) {
3884 NDR_CHECK(ndr_pull_align(ndr, 4));
3885 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3886 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
3887 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3889 if (ndr_flags & NDR_BUFFERS) {
3891 return NDR_ERR_SUCCESS;
3894 _PUBLIC_ void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r)
3896 ndr_print_struct(ndr, name, "samr_RidWithAttribute");
3897 ndr->depth++;
3898 ndr_print_uint32(ndr, "rid", r->rid);
3899 ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes);
3900 ndr->depth--;
3903 _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttributeArray *r)
3905 uint32_t cntr_rids_1;
3906 if (ndr_flags & NDR_SCALARS) {
3907 NDR_CHECK(ndr_push_align(ndr, 5));
3908 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3909 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
3910 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3912 if (ndr_flags & NDR_BUFFERS) {
3913 if (r->rids) {
3914 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
3915 for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
3916 NDR_CHECK(ndr_push_samr_RidWithAttribute(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
3920 return NDR_ERR_SUCCESS;
3923 _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r)
3925 uint32_t _ptr_rids;
3926 uint32_t cntr_rids_1;
3927 TALLOC_CTX *_mem_save_rids_0;
3928 TALLOC_CTX *_mem_save_rids_1;
3929 if (ndr_flags & NDR_SCALARS) {
3930 NDR_CHECK(ndr_pull_align(ndr, 5));
3931 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3932 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
3933 if (_ptr_rids) {
3934 NDR_PULL_ALLOC(ndr, r->rids);
3935 } else {
3936 r->rids = NULL;
3938 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3940 if (ndr_flags & NDR_BUFFERS) {
3941 if (r->rids) {
3942 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
3943 NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
3944 NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
3945 NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
3946 _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
3947 NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
3948 for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
3949 NDR_CHECK(ndr_pull_samr_RidWithAttribute(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
3951 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
3952 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
3954 if (r->rids) {
3955 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->count));
3958 return NDR_ERR_SUCCESS;
3961 _PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttributeArray *r)
3963 uint32_t cntr_rids_1;
3964 ndr_print_struct(ndr, name, "samr_RidWithAttributeArray");
3965 ndr->depth++;
3966 ndr_print_uint32(ndr, "count", r->count);
3967 ndr_print_ptr(ndr, "rids", r->rids);
3968 ndr->depth++;
3969 if (r->rids) {
3970 ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->count);
3971 ndr->depth++;
3972 for (cntr_rids_1=0;cntr_rids_1<r->count;cntr_rids_1++) {
3973 char *idx_1=NULL;
3974 if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) {
3975 ndr_print_samr_RidWithAttribute(ndr, "rids", &r->rids[cntr_rids_1]);
3976 free(idx_1);
3979 ndr->depth--;
3981 ndr->depth--;
3982 ndr->depth--;
3985 static enum ndr_err_code ndr_push_samr_DispEntryGeneral(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryGeneral *r)
3987 if (ndr_flags & NDR_SCALARS) {
3988 NDR_CHECK(ndr_push_align(ndr, 5));
3989 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
3990 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
3991 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
3992 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
3993 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
3994 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
3995 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3997 if (ndr_flags & NDR_BUFFERS) {
3998 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
3999 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
4000 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
4002 return NDR_ERR_SUCCESS;
4005 static enum ndr_err_code ndr_pull_samr_DispEntryGeneral(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryGeneral *r)
4007 if (ndr_flags & NDR_SCALARS) {
4008 NDR_CHECK(ndr_pull_align(ndr, 5));
4009 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4010 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4011 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
4012 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4013 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
4014 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
4015 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4017 if (ndr_flags & NDR_BUFFERS) {
4018 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4019 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
4020 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
4022 return NDR_ERR_SUCCESS;
4025 _PUBLIC_ void ndr_print_samr_DispEntryGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispEntryGeneral *r)
4027 ndr_print_struct(ndr, name, "samr_DispEntryGeneral");
4028 ndr->depth++;
4029 ndr_print_uint32(ndr, "idx", r->idx);
4030 ndr_print_uint32(ndr, "rid", r->rid);
4031 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
4032 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
4033 ndr_print_lsa_String(ndr, "description", &r->description);
4034 ndr_print_lsa_String(ndr, "full_name", &r->full_name);
4035 ndr->depth--;
4038 static enum ndr_err_code ndr_push_samr_DispInfoGeneral(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoGeneral *r)
4040 uint32_t cntr_entries_1;
4041 if (ndr_flags & NDR_SCALARS) {
4042 NDR_CHECK(ndr_push_align(ndr, 5));
4043 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4044 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4045 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4047 if (ndr_flags & NDR_BUFFERS) {
4048 if (r->entries) {
4049 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4050 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4051 NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4053 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4054 NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4058 return NDR_ERR_SUCCESS;
4061 static enum ndr_err_code ndr_pull_samr_DispInfoGeneral(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoGeneral *r)
4063 uint32_t _ptr_entries;
4064 uint32_t cntr_entries_1;
4065 TALLOC_CTX *_mem_save_entries_0;
4066 TALLOC_CTX *_mem_save_entries_1;
4067 if (ndr_flags & NDR_SCALARS) {
4068 NDR_CHECK(ndr_pull_align(ndr, 5));
4069 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4070 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4071 if (_ptr_entries) {
4072 NDR_PULL_ALLOC(ndr, r->entries);
4073 } else {
4074 r->entries = NULL;
4076 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4078 if (ndr_flags & NDR_BUFFERS) {
4079 if (r->entries) {
4080 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4081 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4082 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4083 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
4084 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4085 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4086 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4087 NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4089 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4090 NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4092 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4093 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4095 if (r->entries) {
4096 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4099 return NDR_ERR_SUCCESS;
4102 _PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispInfoGeneral *r)
4104 uint32_t cntr_entries_1;
4105 ndr_print_struct(ndr, name, "samr_DispInfoGeneral");
4106 ndr->depth++;
4107 ndr_print_uint32(ndr, "count", r->count);
4108 ndr_print_ptr(ndr, "entries", r->entries);
4109 ndr->depth++;
4110 if (r->entries) {
4111 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4112 ndr->depth++;
4113 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
4114 char *idx_1=NULL;
4115 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
4116 ndr_print_samr_DispEntryGeneral(ndr, "entries", &r->entries[cntr_entries_1]);
4117 free(idx_1);
4120 ndr->depth--;
4122 ndr->depth--;
4123 ndr->depth--;
4126 static enum ndr_err_code ndr_push_samr_DispEntryFull(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryFull *r)
4128 if (ndr_flags & NDR_SCALARS) {
4129 NDR_CHECK(ndr_push_align(ndr, 5));
4130 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4132 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
4133 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4134 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
4135 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4137 if (ndr_flags & NDR_BUFFERS) {
4138 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4139 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
4141 return NDR_ERR_SUCCESS;
4144 static enum ndr_err_code ndr_pull_samr_DispEntryFull(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryFull *r)
4146 if (ndr_flags & NDR_SCALARS) {
4147 NDR_CHECK(ndr_pull_align(ndr, 5));
4148 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4149 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4150 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
4151 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4152 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
4153 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4155 if (ndr_flags & NDR_BUFFERS) {
4156 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4157 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
4159 return NDR_ERR_SUCCESS;
4162 _PUBLIC_ void ndr_print_samr_DispEntryFull(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFull *r)
4164 ndr_print_struct(ndr, name, "samr_DispEntryFull");
4165 ndr->depth++;
4166 ndr_print_uint32(ndr, "idx", r->idx);
4167 ndr_print_uint32(ndr, "rid", r->rid);
4168 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
4169 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
4170 ndr_print_lsa_String(ndr, "description", &r->description);
4171 ndr->depth--;
4174 static enum ndr_err_code ndr_push_samr_DispInfoFull(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoFull *r)
4176 uint32_t cntr_entries_1;
4177 if (ndr_flags & NDR_SCALARS) {
4178 NDR_CHECK(ndr_push_align(ndr, 5));
4179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4180 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4181 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4183 if (ndr_flags & NDR_BUFFERS) {
4184 if (r->entries) {
4185 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4186 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4187 NDR_CHECK(ndr_push_samr_DispEntryFull(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4189 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4190 NDR_CHECK(ndr_push_samr_DispEntryFull(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4194 return NDR_ERR_SUCCESS;
4197 static enum ndr_err_code ndr_pull_samr_DispInfoFull(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFull *r)
4199 uint32_t _ptr_entries;
4200 uint32_t cntr_entries_1;
4201 TALLOC_CTX *_mem_save_entries_0;
4202 TALLOC_CTX *_mem_save_entries_1;
4203 if (ndr_flags & NDR_SCALARS) {
4204 NDR_CHECK(ndr_pull_align(ndr, 5));
4205 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4206 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4207 if (_ptr_entries) {
4208 NDR_PULL_ALLOC(ndr, r->entries);
4209 } else {
4210 r->entries = NULL;
4212 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4214 if (ndr_flags & NDR_BUFFERS) {
4215 if (r->entries) {
4216 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4217 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4218 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4219 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
4220 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4221 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4222 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4223 NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4225 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4226 NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4228 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4231 if (r->entries) {
4232 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4235 return NDR_ERR_SUCCESS;
4238 _PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFull *r)
4240 uint32_t cntr_entries_1;
4241 ndr_print_struct(ndr, name, "samr_DispInfoFull");
4242 ndr->depth++;
4243 ndr_print_uint32(ndr, "count", r->count);
4244 ndr_print_ptr(ndr, "entries", r->entries);
4245 ndr->depth++;
4246 if (r->entries) {
4247 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4248 ndr->depth++;
4249 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
4250 char *idx_1=NULL;
4251 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
4252 ndr_print_samr_DispEntryFull(ndr, "entries", &r->entries[cntr_entries_1]);
4253 free(idx_1);
4256 ndr->depth--;
4258 ndr->depth--;
4259 ndr->depth--;
4262 static enum ndr_err_code ndr_push_samr_DispEntryFullGroup(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryFullGroup *r)
4264 if (ndr_flags & NDR_SCALARS) {
4265 NDR_CHECK(ndr_push_align(ndr, 5));
4266 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4267 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4268 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->acct_flags));
4269 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4270 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
4271 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4273 if (ndr_flags & NDR_BUFFERS) {
4274 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4275 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
4277 return NDR_ERR_SUCCESS;
4280 static enum ndr_err_code ndr_pull_samr_DispEntryFullGroup(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryFullGroup *r)
4282 if (ndr_flags & NDR_SCALARS) {
4283 NDR_CHECK(ndr_pull_align(ndr, 5));
4284 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4285 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4286 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->acct_flags));
4287 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4288 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
4289 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4291 if (ndr_flags & NDR_BUFFERS) {
4292 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4293 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
4295 return NDR_ERR_SUCCESS;
4298 _PUBLIC_ void ndr_print_samr_DispEntryFullGroup(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFullGroup *r)
4300 ndr_print_struct(ndr, name, "samr_DispEntryFullGroup");
4301 ndr->depth++;
4302 ndr_print_uint32(ndr, "idx", r->idx);
4303 ndr_print_uint32(ndr, "rid", r->rid);
4304 ndr_print_samr_GroupAttrs(ndr, "acct_flags", r->acct_flags);
4305 ndr_print_lsa_String(ndr, "account_name", &r->account_name);
4306 ndr_print_lsa_String(ndr, "description", &r->description);
4307 ndr->depth--;
4310 static enum ndr_err_code ndr_push_samr_DispInfoFullGroups(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoFullGroups *r)
4312 uint32_t cntr_entries_1;
4313 if (ndr_flags & NDR_SCALARS) {
4314 NDR_CHECK(ndr_push_align(ndr, 5));
4315 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4316 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4317 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4319 if (ndr_flags & NDR_BUFFERS) {
4320 if (r->entries) {
4321 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4322 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4323 NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4325 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4326 NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4330 return NDR_ERR_SUCCESS;
4333 static enum ndr_err_code ndr_pull_samr_DispInfoFullGroups(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFullGroups *r)
4335 uint32_t _ptr_entries;
4336 uint32_t cntr_entries_1;
4337 TALLOC_CTX *_mem_save_entries_0;
4338 TALLOC_CTX *_mem_save_entries_1;
4339 if (ndr_flags & NDR_SCALARS) {
4340 NDR_CHECK(ndr_pull_align(ndr, 5));
4341 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4342 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4343 if (_ptr_entries) {
4344 NDR_PULL_ALLOC(ndr, r->entries);
4345 } else {
4346 r->entries = NULL;
4348 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4350 if (ndr_flags & NDR_BUFFERS) {
4351 if (r->entries) {
4352 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4353 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4354 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4355 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
4356 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4357 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4358 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4359 NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4361 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4362 NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4364 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4365 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4367 if (r->entries) {
4368 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4371 return NDR_ERR_SUCCESS;
4374 _PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFullGroups *r)
4376 uint32_t cntr_entries_1;
4377 ndr_print_struct(ndr, name, "samr_DispInfoFullGroups");
4378 ndr->depth++;
4379 ndr_print_uint32(ndr, "count", r->count);
4380 ndr_print_ptr(ndr, "entries", r->entries);
4381 ndr->depth++;
4382 if (r->entries) {
4383 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4384 ndr->depth++;
4385 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
4386 char *idx_1=NULL;
4387 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
4388 ndr_print_samr_DispEntryFullGroup(ndr, "entries", &r->entries[cntr_entries_1]);
4389 free(idx_1);
4392 ndr->depth--;
4394 ndr->depth--;
4395 ndr->depth--;
4398 static enum ndr_err_code ndr_push_samr_DispEntryAscii(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryAscii *r)
4400 if (ndr_flags & NDR_SCALARS) {
4401 NDR_CHECK(ndr_push_align(ndr, 5));
4402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4403 NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name));
4404 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4406 if (ndr_flags & NDR_BUFFERS) {
4407 NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name));
4409 return NDR_ERR_SUCCESS;
4412 static enum ndr_err_code ndr_pull_samr_DispEntryAscii(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryAscii *r)
4414 if (ndr_flags & NDR_SCALARS) {
4415 NDR_CHECK(ndr_pull_align(ndr, 5));
4416 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4417 NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name));
4418 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4420 if (ndr_flags & NDR_BUFFERS) {
4421 NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name));
4423 return NDR_ERR_SUCCESS;
4426 _PUBLIC_ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, const struct samr_DispEntryAscii *r)
4428 ndr_print_struct(ndr, name, "samr_DispEntryAscii");
4429 ndr->depth++;
4430 ndr_print_uint32(ndr, "idx", r->idx);
4431 ndr_print_lsa_AsciiStringLarge(ndr, "account_name", &r->account_name);
4432 ndr->depth--;
4435 static enum ndr_err_code ndr_push_samr_DispInfoAscii(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoAscii *r)
4437 uint32_t cntr_entries_1;
4438 if (ndr_flags & NDR_SCALARS) {
4439 NDR_CHECK(ndr_push_align(ndr, 5));
4440 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4441 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4442 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4444 if (ndr_flags & NDR_BUFFERS) {
4445 if (r->entries) {
4446 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4447 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4448 NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4450 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4451 NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4455 return NDR_ERR_SUCCESS;
4458 static enum ndr_err_code ndr_pull_samr_DispInfoAscii(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoAscii *r)
4460 uint32_t _ptr_entries;
4461 uint32_t cntr_entries_1;
4462 TALLOC_CTX *_mem_save_entries_0;
4463 TALLOC_CTX *_mem_save_entries_1;
4464 if (ndr_flags & NDR_SCALARS) {
4465 NDR_CHECK(ndr_pull_align(ndr, 5));
4466 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4467 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4468 if (_ptr_entries) {
4469 NDR_PULL_ALLOC(ndr, r->entries);
4470 } else {
4471 r->entries = NULL;
4473 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4475 if (ndr_flags & NDR_BUFFERS) {
4476 if (r->entries) {
4477 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4478 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4479 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4480 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
4481 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4482 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4483 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4484 NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4486 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
4487 NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4489 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4490 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4492 if (r->entries) {
4493 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4496 return NDR_ERR_SUCCESS;
4499 _PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r)
4501 uint32_t cntr_entries_1;
4502 ndr_print_struct(ndr, name, "samr_DispInfoAscii");
4503 ndr->depth++;
4504 ndr_print_uint32(ndr, "count", r->count);
4505 ndr_print_ptr(ndr, "entries", r->entries);
4506 ndr->depth++;
4507 if (r->entries) {
4508 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4509 ndr->depth++;
4510 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
4511 char *idx_1=NULL;
4512 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
4513 ndr_print_samr_DispEntryAscii(ndr, "entries", &r->entries[cntr_entries_1]);
4514 free(idx_1);
4517 ndr->depth--;
4519 ndr->depth--;
4520 ndr->depth--;
4523 static enum ndr_err_code ndr_push_samr_DispInfo(struct ndr_push *ndr, int ndr_flags, const union samr_DispInfo *r)
4525 if (ndr_flags & NDR_SCALARS) {
4526 int level = ndr_push_get_switch_value(ndr, r);
4527 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
4528 NDR_CHECK(ndr_push_union_align(ndr, 5));
4529 switch (level) {
4530 case 1: {
4531 NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1));
4532 break; }
4534 case 2: {
4535 NDR_CHECK(ndr_push_samr_DispInfoFull(ndr, NDR_SCALARS, &r->info2));
4536 break; }
4538 case 3: {
4539 NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr, NDR_SCALARS, &r->info3));
4540 break; }
4542 case 4: {
4543 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info4));
4544 break; }
4546 case 5: {
4547 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &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 if (ndr_flags & NDR_BUFFERS) {
4555 int level = ndr_push_get_switch_value(ndr, r);
4556 switch (level) {
4557 case 1:
4558 NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_BUFFERS, &r->info1));
4559 break;
4561 case 2:
4562 NDR_CHECK(ndr_push_samr_DispInfoFull(ndr, NDR_BUFFERS, &r->info2));
4563 break;
4565 case 3:
4566 NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr, NDR_BUFFERS, &r->info3));
4567 break;
4569 case 4:
4570 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info4));
4571 break;
4573 case 5:
4574 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info5));
4575 break;
4577 default:
4578 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4581 return NDR_ERR_SUCCESS;
4584 static enum ndr_err_code ndr_pull_samr_DispInfo(struct ndr_pull *ndr, int ndr_flags, union samr_DispInfo *r)
4586 int level;
4587 uint16_t _level;
4588 level = ndr_pull_get_switch_value(ndr, r);
4589 if (ndr_flags & NDR_SCALARS) {
4590 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
4591 if (_level != level) {
4592 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
4594 NDR_CHECK(ndr_pull_union_align(ndr, 5));
4595 switch (level) {
4596 case 1: {
4597 NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1));
4598 break; }
4600 case 2: {
4601 NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr, NDR_SCALARS, &r->info2));
4602 break; }
4604 case 3: {
4605 NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr, NDR_SCALARS, &r->info3));
4606 break; }
4608 case 4: {
4609 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info4));
4610 break; }
4612 case 5: {
4613 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info5));
4614 break; }
4616 default:
4617 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4620 if (ndr_flags & NDR_BUFFERS) {
4621 switch (level) {
4622 case 1:
4623 NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr, NDR_BUFFERS, &r->info1));
4624 break;
4626 case 2:
4627 NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr, NDR_BUFFERS, &r->info2));
4628 break;
4630 case 3:
4631 NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr, NDR_BUFFERS, &r->info3));
4632 break;
4634 case 4:
4635 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info4));
4636 break;
4638 case 5:
4639 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info5));
4640 break;
4642 default:
4643 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4646 return NDR_ERR_SUCCESS;
4649 _PUBLIC_ void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r)
4651 int level;
4652 level = ndr_print_get_switch_value(ndr, r);
4653 ndr_print_union(ndr, name, level, "samr_DispInfo");
4654 switch (level) {
4655 case 1:
4656 ndr_print_samr_DispInfoGeneral(ndr, "info1", &r->info1);
4657 break;
4659 case 2:
4660 ndr_print_samr_DispInfoFull(ndr, "info2", &r->info2);
4661 break;
4663 case 3:
4664 ndr_print_samr_DispInfoFullGroups(ndr, "info3", &r->info3);
4665 break;
4667 case 4:
4668 ndr_print_samr_DispInfoAscii(ndr, "info4", &r->info4);
4669 break;
4671 case 5:
4672 ndr_print_samr_DispInfoAscii(ndr, "info5", &r->info5);
4673 break;
4675 default:
4676 ndr_print_bad_level(ndr, name, level);
4680 static enum ndr_err_code ndr_push_samr_PwInfo(struct ndr_push *ndr, int ndr_flags, const struct samr_PwInfo *r)
4682 if (ndr_flags & NDR_SCALARS) {
4683 NDR_CHECK(ndr_push_align(ndr, 4));
4684 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
4685 NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties));
4686 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4688 if (ndr_flags & NDR_BUFFERS) {
4690 return NDR_ERR_SUCCESS;
4693 static enum ndr_err_code ndr_pull_samr_PwInfo(struct ndr_pull *ndr, int ndr_flags, struct samr_PwInfo *r)
4695 if (ndr_flags & NDR_SCALARS) {
4696 NDR_CHECK(ndr_pull_align(ndr, 4));
4697 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
4698 NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties));
4699 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4701 if (ndr_flags & NDR_BUFFERS) {
4703 return NDR_ERR_SUCCESS;
4706 _PUBLIC_ void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r)
4708 ndr_print_struct(ndr, name, "samr_PwInfo");
4709 ndr->depth++;
4710 ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
4711 ndr_print_samr_PasswordProperties(ndr, "password_properties", r->password_properties);
4712 ndr->depth--;
4715 static enum ndr_err_code ndr_push_samr_ConnectVersion(struct ndr_push *ndr, int ndr_flags, enum samr_ConnectVersion r)
4717 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
4718 return NDR_ERR_SUCCESS;
4721 static enum ndr_err_code ndr_pull_samr_ConnectVersion(struct ndr_pull *ndr, int ndr_flags, enum samr_ConnectVersion *r)
4723 uint32_t v;
4724 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
4725 *r = v;
4726 return NDR_ERR_SUCCESS;
4729 _PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r)
4731 const char *val = NULL;
4733 switch (r) {
4734 case SAMR_CONNECT_PRE_W2K: val = "SAMR_CONNECT_PRE_W2K"; break;
4735 case SAMR_CONNECT_W2K: val = "SAMR_CONNECT_W2K"; break;
4736 case SAMR_CONNECT_AFTER_W2K: val = "SAMR_CONNECT_AFTER_W2K"; break;
4738 ndr_print_enum(ndr, name, "ENUM", val, r);
4741 static enum ndr_err_code ndr_push_samr_ChangeReject(struct ndr_push *ndr, int ndr_flags, const struct samr_ChangeReject *r)
4743 if (ndr_flags & NDR_SCALARS) {
4744 NDR_CHECK(ndr_push_align(ndr, 4));
4745 NDR_CHECK(ndr_push_samr_RejectReason(ndr, NDR_SCALARS, r->reason));
4746 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
4747 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
4748 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4750 if (ndr_flags & NDR_BUFFERS) {
4752 return NDR_ERR_SUCCESS;
4755 static enum ndr_err_code ndr_pull_samr_ChangeReject(struct ndr_pull *ndr, int ndr_flags, struct samr_ChangeReject *r)
4757 if (ndr_flags & NDR_SCALARS) {
4758 NDR_CHECK(ndr_pull_align(ndr, 4));
4759 NDR_CHECK(ndr_pull_samr_RejectReason(ndr, NDR_SCALARS, &r->reason));
4760 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
4761 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
4762 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4764 if (ndr_flags & NDR_BUFFERS) {
4766 return NDR_ERR_SUCCESS;
4769 _PUBLIC_ void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r)
4771 ndr_print_struct(ndr, name, "samr_ChangeReject");
4772 ndr->depth++;
4773 ndr_print_samr_RejectReason(ndr, "reason", r->reason);
4774 ndr_print_uint32(ndr, "unknown1", r->unknown1);
4775 ndr_print_uint32(ndr, "unknown2", r->unknown2);
4776 ndr->depth--;
4779 static enum ndr_err_code ndr_push_samr_ConnectInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_ConnectInfo1 *r)
4781 if (ndr_flags & NDR_SCALARS) {
4782 NDR_CHECK(ndr_push_align(ndr, 4));
4783 NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->client_version));
4784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
4785 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4787 if (ndr_flags & NDR_BUFFERS) {
4789 return NDR_ERR_SUCCESS;
4792 static enum ndr_err_code ndr_pull_samr_ConnectInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_ConnectInfo1 *r)
4794 if (ndr_flags & NDR_SCALARS) {
4795 NDR_CHECK(ndr_pull_align(ndr, 4));
4796 NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->client_version));
4797 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
4798 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4800 if (ndr_flags & NDR_BUFFERS) {
4802 return NDR_ERR_SUCCESS;
4805 _PUBLIC_ void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r)
4807 ndr_print_struct(ndr, name, "samr_ConnectInfo1");
4808 ndr->depth++;
4809 ndr_print_samr_ConnectVersion(ndr, "client_version", r->client_version);
4810 ndr_print_uint32(ndr, "unknown2", r->unknown2);
4811 ndr->depth--;
4814 static enum ndr_err_code ndr_push_samr_ConnectInfo(struct ndr_push *ndr, int ndr_flags, const union samr_ConnectInfo *r)
4816 if (ndr_flags & NDR_SCALARS) {
4817 int level = ndr_push_get_switch_value(ndr, r);
4818 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4819 NDR_CHECK(ndr_push_union_align(ndr, 4));
4820 switch (level) {
4821 case 1: {
4822 NDR_CHECK(ndr_push_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1));
4823 break; }
4825 default:
4826 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4829 if (ndr_flags & NDR_BUFFERS) {
4830 int level = ndr_push_get_switch_value(ndr, r);
4831 switch (level) {
4832 case 1:
4833 break;
4835 default:
4836 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4839 return NDR_ERR_SUCCESS;
4842 static enum ndr_err_code ndr_pull_samr_ConnectInfo(struct ndr_pull *ndr, int ndr_flags, union samr_ConnectInfo *r)
4844 int level;
4845 uint32_t _level;
4846 level = ndr_pull_get_switch_value(ndr, r);
4847 if (ndr_flags & NDR_SCALARS) {
4848 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4849 if (_level != level) {
4850 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
4852 NDR_CHECK(ndr_pull_union_align(ndr, 4));
4853 switch (level) {
4854 case 1: {
4855 NDR_CHECK(ndr_pull_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1));
4856 break; }
4858 default:
4859 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4862 if (ndr_flags & NDR_BUFFERS) {
4863 switch (level) {
4864 case 1:
4865 break;
4867 default:
4868 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4871 return NDR_ERR_SUCCESS;
4874 _PUBLIC_ void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r)
4876 int level;
4877 level = ndr_print_get_switch_value(ndr, r);
4878 ndr_print_union(ndr, name, level, "samr_ConnectInfo");
4879 switch (level) {
4880 case 1:
4881 ndr_print_samr_ConnectInfo1(ndr, "info1", &r->info1);
4882 break;
4884 default:
4885 ndr_print_bad_level(ndr, name, level);
4889 static enum ndr_err_code ndr_push_samr_ValidateFieldsPresent(struct ndr_push *ndr, int ndr_flags, uint32_t r)
4891 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
4892 return NDR_ERR_SUCCESS;
4895 static enum ndr_err_code ndr_pull_samr_ValidateFieldsPresent(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
4897 uint32_t v;
4898 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
4899 *r = v;
4900 return NDR_ERR_SUCCESS;
4903 _PUBLIC_ void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r)
4905 ndr_print_uint32(ndr, name, r);
4906 ndr->depth++;
4907 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET", SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET, r);
4908 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME", SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME, r);
4909 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_LOCKOUT_TIME", SAMR_VALIDATE_FIELD_LOCKOUT_TIME, r);
4910 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT", SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT, r);
4911 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH, r);
4912 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY, r);
4913 ndr->depth--;
4916 static enum ndr_err_code ndr_push_samr_ValidatePasswordLevel(struct ndr_push *ndr, int ndr_flags, enum samr_ValidatePasswordLevel r)
4918 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
4919 return NDR_ERR_SUCCESS;
4922 static enum ndr_err_code ndr_pull_samr_ValidatePasswordLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidatePasswordLevel *r)
4924 uint16_t v;
4925 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
4926 *r = v;
4927 return NDR_ERR_SUCCESS;
4930 _PUBLIC_ void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const char *name, enum samr_ValidatePasswordLevel r)
4932 const char *val = NULL;
4934 switch (r) {
4935 case NetValidateAuthentication: val = "NetValidateAuthentication"; break;
4936 case NetValidatePasswordChange: val = "NetValidatePasswordChange"; break;
4937 case NetValidatePasswordReset: val = "NetValidatePasswordReset"; break;
4939 ndr_print_enum(ndr, name, "ENUM", val, r);
4942 static enum ndr_err_code ndr_push_samr_ValidationStatus(struct ndr_push *ndr, int ndr_flags, enum samr_ValidationStatus r)
4944 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
4945 return NDR_ERR_SUCCESS;
4948 static enum ndr_err_code ndr_pull_samr_ValidationStatus(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidationStatus *r)
4950 uint16_t v;
4951 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
4952 *r = v;
4953 return NDR_ERR_SUCCESS;
4956 _PUBLIC_ void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char *name, enum samr_ValidationStatus r)
4958 const char *val = NULL;
4960 switch (r) {
4961 case SAMR_VALIDATION_STATUS_SUCCESS: val = "SAMR_VALIDATION_STATUS_SUCCESS"; break;
4962 case SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE: val = "SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE"; break;
4963 case SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT: val = "SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT"; break;
4964 case SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED: val = "SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED"; break;
4965 case SAMR_VALIDATION_STATUS_BAD_PASSWORD: val = "SAMR_VALIDATION_STATUS_BAD_PASSWORD"; break;
4966 case SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT: val = "SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT"; break;
4967 case SAMR_VALIDATION_STATUS_PWD_TOO_SHORT: val = "SAMR_VALIDATION_STATUS_PWD_TOO_SHORT"; break;
4968 case SAMR_VALIDATION_STATUS_PWD_TOO_LONG: val = "SAMR_VALIDATION_STATUS_PWD_TOO_LONG"; break;
4969 case SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH: val = "SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH"; break;
4970 case SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT: val = "SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT"; break;
4971 case SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR: val = "SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR"; break;
4973 ndr_print_enum(ndr, name, "ENUM", val, r);
4976 static enum ndr_err_code ndr_push_samr_ValidationBlob(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidationBlob *r)
4978 if (ndr_flags & NDR_SCALARS) {
4979 NDR_CHECK(ndr_push_align(ndr, 5));
4980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
4981 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
4982 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4984 if (ndr_flags & NDR_BUFFERS) {
4985 if (r->data) {
4986 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
4987 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
4990 return NDR_ERR_SUCCESS;
4993 static enum ndr_err_code ndr_pull_samr_ValidationBlob(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidationBlob *r)
4995 uint32_t _ptr_data;
4996 TALLOC_CTX *_mem_save_data_0;
4997 if (ndr_flags & NDR_SCALARS) {
4998 NDR_CHECK(ndr_pull_align(ndr, 5));
4999 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
5000 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
5001 if (_ptr_data) {
5002 NDR_PULL_ALLOC(ndr, r->data);
5003 } else {
5004 r->data = NULL;
5006 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5008 if (ndr_flags & NDR_BUFFERS) {
5009 if (r->data) {
5010 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
5011 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
5012 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
5013 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
5014 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
5015 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
5017 if (r->data) {
5018 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
5021 return NDR_ERR_SUCCESS;
5024 _PUBLIC_ void ndr_print_samr_ValidationBlob(struct ndr_print *ndr, const char *name, const struct samr_ValidationBlob *r)
5026 ndr_print_struct(ndr, name, "samr_ValidationBlob");
5027 ndr->depth++;
5028 ndr_print_uint32(ndr, "length", r->length);
5029 ndr_print_ptr(ndr, "data", r->data);
5030 ndr->depth++;
5031 if (r->data) {
5032 ndr_print_array_uint8(ndr, "data", r->data, r->length);
5034 ndr->depth--;
5035 ndr->depth--;
5038 static enum ndr_err_code ndr_push_samr_ValidatePasswordInfo(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordInfo *r)
5040 uint32_t cntr_pwd_history_1;
5041 if (ndr_flags & NDR_SCALARS) {
5042 NDR_CHECK(ndr_push_align(ndr, 8));
5043 NDR_CHECK(ndr_push_samr_ValidateFieldsPresent(ndr, NDR_SCALARS, r->fields_present));
5044 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_password_change));
5045 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->bad_password_time));
5046 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->lockout_time));
5047 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pwd_count));
5048 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwd_history_len));
5049 NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwd_history));
5050 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5052 if (ndr_flags & NDR_BUFFERS) {
5053 if (r->pwd_history) {
5054 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->pwd_history_len));
5055 for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
5056 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->pwd_history[cntr_pwd_history_1]));
5058 for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
5059 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->pwd_history[cntr_pwd_history_1]));
5063 return NDR_ERR_SUCCESS;
5066 static enum ndr_err_code ndr_pull_samr_ValidatePasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordInfo *r)
5068 uint32_t _ptr_pwd_history;
5069 uint32_t cntr_pwd_history_1;
5070 TALLOC_CTX *_mem_save_pwd_history_0;
5071 TALLOC_CTX *_mem_save_pwd_history_1;
5072 if (ndr_flags & NDR_SCALARS) {
5073 NDR_CHECK(ndr_pull_align(ndr, 8));
5074 NDR_CHECK(ndr_pull_samr_ValidateFieldsPresent(ndr, NDR_SCALARS, &r->fields_present));
5075 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_password_change));
5076 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->bad_password_time));
5077 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->lockout_time));
5078 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_pwd_count));
5079 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwd_history_len));
5080 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwd_history));
5081 if (_ptr_pwd_history) {
5082 NDR_PULL_ALLOC(ndr, r->pwd_history);
5083 } else {
5084 r->pwd_history = NULL;
5086 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5088 if (ndr_flags & NDR_BUFFERS) {
5089 if (r->pwd_history) {
5090 _mem_save_pwd_history_0 = NDR_PULL_GET_MEM_CTX(ndr);
5091 NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0);
5092 NDR_CHECK(ndr_pull_array_size(ndr, &r->pwd_history));
5093 NDR_PULL_ALLOC_N(ndr, r->pwd_history, ndr_get_array_size(ndr, &r->pwd_history));
5094 _mem_save_pwd_history_1 = NDR_PULL_GET_MEM_CTX(ndr);
5095 NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0);
5096 for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
5097 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->pwd_history[cntr_pwd_history_1]));
5099 for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
5100 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->pwd_history[cntr_pwd_history_1]));
5102 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwd_history_1, 0);
5103 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwd_history_0, 0);
5105 if (r->pwd_history) {
5106 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->pwd_history, r->pwd_history_len));
5109 return NDR_ERR_SUCCESS;
5112 _PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordInfo *r)
5114 uint32_t cntr_pwd_history_1;
5115 ndr_print_struct(ndr, name, "samr_ValidatePasswordInfo");
5116 ndr->depth++;
5117 ndr_print_samr_ValidateFieldsPresent(ndr, "fields_present", r->fields_present);
5118 ndr_print_NTTIME_hyper(ndr, "last_password_change", r->last_password_change);
5119 ndr_print_NTTIME_hyper(ndr, "bad_password_time", r->bad_password_time);
5120 ndr_print_NTTIME_hyper(ndr, "lockout_time", r->lockout_time);
5121 ndr_print_uint32(ndr, "bad_pwd_count", r->bad_pwd_count);
5122 ndr_print_uint32(ndr, "pwd_history_len", r->pwd_history_len);
5123 ndr_print_ptr(ndr, "pwd_history", r->pwd_history);
5124 ndr->depth++;
5125 if (r->pwd_history) {
5126 ndr->print(ndr, "%s: ARRAY(%d)", "pwd_history", (int)r->pwd_history_len);
5127 ndr->depth++;
5128 for (cntr_pwd_history_1=0;cntr_pwd_history_1<r->pwd_history_len;cntr_pwd_history_1++) {
5129 char *idx_1=NULL;
5130 if (asprintf(&idx_1, "[%d]", cntr_pwd_history_1) != -1) {
5131 ndr_print_samr_ValidationBlob(ndr, "pwd_history", &r->pwd_history[cntr_pwd_history_1]);
5132 free(idx_1);
5135 ndr->depth--;
5137 ndr->depth--;
5138 ndr->depth--;
5141 static enum ndr_err_code ndr_push_samr_ValidatePasswordRepCtr(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordRepCtr *r)
5143 if (ndr_flags & NDR_SCALARS) {
5144 NDR_CHECK(ndr_push_align(ndr, 8));
5145 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5146 NDR_CHECK(ndr_push_samr_ValidationStatus(ndr, NDR_SCALARS, r->status));
5147 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5149 if (ndr_flags & NDR_BUFFERS) {
5150 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5152 return NDR_ERR_SUCCESS;
5155 static enum ndr_err_code ndr_pull_samr_ValidatePasswordRepCtr(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordRepCtr *r)
5157 if (ndr_flags & NDR_SCALARS) {
5158 NDR_CHECK(ndr_pull_align(ndr, 8));
5159 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5160 NDR_CHECK(ndr_pull_samr_ValidationStatus(ndr, NDR_SCALARS, &r->status));
5161 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5163 if (ndr_flags & NDR_BUFFERS) {
5164 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5166 return NDR_ERR_SUCCESS;
5169 _PUBLIC_ void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordRepCtr *r)
5171 ndr_print_struct(ndr, name, "samr_ValidatePasswordRepCtr");
5172 ndr->depth++;
5173 ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5174 ndr_print_samr_ValidationStatus(ndr, "status", r->status);
5175 ndr->depth--;
5178 static enum ndr_err_code ndr_push_samr_ValidatePasswordRep(struct ndr_push *ndr, int ndr_flags, const union samr_ValidatePasswordRep *r)
5180 if (ndr_flags & NDR_SCALARS) {
5181 int level = ndr_push_get_switch_value(ndr, r);
5182 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
5183 NDR_CHECK(ndr_push_union_align(ndr, 8));
5184 switch (level) {
5185 case 1: {
5186 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1));
5187 break; }
5189 case 2: {
5190 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr2));
5191 break; }
5193 case 3: {
5194 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr3));
5195 break; }
5197 default:
5198 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5201 if (ndr_flags & NDR_BUFFERS) {
5202 int level = ndr_push_get_switch_value(ndr, r);
5203 switch (level) {
5204 case 1:
5205 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr1));
5206 break;
5208 case 2:
5209 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr2));
5210 break;
5212 case 3:
5213 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr3));
5214 break;
5216 default:
5217 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5220 return NDR_ERR_SUCCESS;
5223 static enum ndr_err_code ndr_pull_samr_ValidatePasswordRep(struct ndr_pull *ndr, int ndr_flags, union samr_ValidatePasswordRep *r)
5225 int level;
5226 uint16_t _level;
5227 level = ndr_pull_get_switch_value(ndr, r);
5228 if (ndr_flags & NDR_SCALARS) {
5229 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
5230 if (_level != level) {
5231 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5233 NDR_CHECK(ndr_pull_union_align(ndr, 8));
5234 switch (level) {
5235 case 1: {
5236 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1));
5237 break; }
5239 case 2: {
5240 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr2));
5241 break; }
5243 case 3: {
5244 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr3));
5245 break; }
5247 default:
5248 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5251 if (ndr_flags & NDR_BUFFERS) {
5252 switch (level) {
5253 case 1:
5254 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr1));
5255 break;
5257 case 2:
5258 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr2));
5259 break;
5261 case 3:
5262 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr3));
5263 break;
5265 default:
5266 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5269 return NDR_ERR_SUCCESS;
5272 _PUBLIC_ void ndr_print_samr_ValidatePasswordRep(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordRep *r)
5274 int level;
5275 level = ndr_print_get_switch_value(ndr, r);
5276 ndr_print_union(ndr, name, level, "samr_ValidatePasswordRep");
5277 switch (level) {
5278 case 1:
5279 ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr1", &r->ctr1);
5280 break;
5282 case 2:
5283 ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr2", &r->ctr2);
5284 break;
5286 case 3:
5287 ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr3", &r->ctr3);
5288 break;
5290 default:
5291 ndr_print_bad_level(ndr, name, level);
5295 static enum ndr_err_code ndr_push_samr_ValidatePasswordReq3(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq3 *r)
5297 if (ndr_flags & NDR_SCALARS) {
5298 NDR_CHECK(ndr_push_align(ndr, 8));
5299 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5300 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5301 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5302 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5303 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pwd_must_change_at_next_logon));
5304 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->clear_lockout));
5305 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5307 if (ndr_flags & NDR_BUFFERS) {
5308 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5309 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5310 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5311 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5313 return NDR_ERR_SUCCESS;
5316 static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq3(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq3 *r)
5318 if (ndr_flags & NDR_SCALARS) {
5319 NDR_CHECK(ndr_pull_align(ndr, 8));
5320 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5321 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5322 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5323 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5324 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pwd_must_change_at_next_logon));
5325 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->clear_lockout));
5326 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5328 if (ndr_flags & NDR_BUFFERS) {
5329 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5330 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5331 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5332 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5334 return NDR_ERR_SUCCESS;
5337 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq3(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq3 *r)
5339 ndr_print_struct(ndr, name, "samr_ValidatePasswordReq3");
5340 ndr->depth++;
5341 ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5342 ndr_print_lsa_StringLarge(ndr, "password", &r->password);
5343 ndr_print_lsa_StringLarge(ndr, "account", &r->account);
5344 ndr_print_samr_ValidationBlob(ndr, "hash", &r->hash);
5345 ndr_print_uint8(ndr, "pwd_must_change_at_next_logon", r->pwd_must_change_at_next_logon);
5346 ndr_print_uint8(ndr, "clear_lockout", r->clear_lockout);
5347 ndr->depth--;
5350 static enum ndr_err_code ndr_push_samr_ValidatePasswordReq2(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq2 *r)
5352 if (ndr_flags & NDR_SCALARS) {
5353 NDR_CHECK(ndr_push_align(ndr, 8));
5354 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5355 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5356 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5357 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5358 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched));
5359 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5361 if (ndr_flags & NDR_BUFFERS) {
5362 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5363 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5364 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5365 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5367 return NDR_ERR_SUCCESS;
5370 static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq2(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq2 *r)
5372 if (ndr_flags & NDR_SCALARS) {
5373 NDR_CHECK(ndr_pull_align(ndr, 8));
5374 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5375 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5376 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5377 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5378 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched));
5379 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5381 if (ndr_flags & NDR_BUFFERS) {
5382 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5383 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5384 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5385 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5387 return NDR_ERR_SUCCESS;
5390 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq2(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq2 *r)
5392 ndr_print_struct(ndr, name, "samr_ValidatePasswordReq2");
5393 ndr->depth++;
5394 ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5395 ndr_print_lsa_StringLarge(ndr, "password", &r->password);
5396 ndr_print_lsa_StringLarge(ndr, "account", &r->account);
5397 ndr_print_samr_ValidationBlob(ndr, "hash", &r->hash);
5398 ndr_print_uint8(ndr, "password_matched", r->password_matched);
5399 ndr->depth--;
5402 static enum ndr_err_code ndr_push_samr_ValidatePasswordReq1(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq1 *r)
5404 if (ndr_flags & NDR_SCALARS) {
5405 NDR_CHECK(ndr_push_align(ndr, 8));
5406 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5407 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched));
5408 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5410 if (ndr_flags & NDR_BUFFERS) {
5411 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5413 return NDR_ERR_SUCCESS;
5416 static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq1(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq1 *r)
5418 if (ndr_flags & NDR_SCALARS) {
5419 NDR_CHECK(ndr_pull_align(ndr, 8));
5420 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5421 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched));
5422 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5424 if (ndr_flags & NDR_BUFFERS) {
5425 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5427 return NDR_ERR_SUCCESS;
5430 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq1(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq1 *r)
5432 ndr_print_struct(ndr, name, "samr_ValidatePasswordReq1");
5433 ndr->depth++;
5434 ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5435 ndr_print_uint8(ndr, "password_matched", r->password_matched);
5436 ndr->depth--;
5439 static enum ndr_err_code ndr_push_samr_ValidatePasswordReq(struct ndr_push *ndr, int ndr_flags, const union samr_ValidatePasswordReq *r)
5441 if (ndr_flags & NDR_SCALARS) {
5442 int level = ndr_push_get_switch_value(ndr, r);
5443 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
5444 NDR_CHECK(ndr_push_union_align(ndr, 8));
5445 switch (level) {
5446 case 1: {
5447 NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1));
5448 break; }
5450 case 2: {
5451 NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr, NDR_SCALARS, &r->req2));
5452 break; }
5454 case 3: {
5455 NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr, NDR_SCALARS, &r->req3));
5456 break; }
5458 default:
5459 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5462 if (ndr_flags & NDR_BUFFERS) {
5463 int level = ndr_push_get_switch_value(ndr, r);
5464 switch (level) {
5465 case 1:
5466 NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_BUFFERS, &r->req1));
5467 break;
5469 case 2:
5470 NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr, NDR_BUFFERS, &r->req2));
5471 break;
5473 case 3:
5474 NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr, NDR_BUFFERS, &r->req3));
5475 break;
5477 default:
5478 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5481 return NDR_ERR_SUCCESS;
5484 static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq(struct ndr_pull *ndr, int ndr_flags, union samr_ValidatePasswordReq *r)
5486 int level;
5487 uint16_t _level;
5488 level = ndr_pull_get_switch_value(ndr, r);
5489 if (ndr_flags & NDR_SCALARS) {
5490 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
5491 if (_level != level) {
5492 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5494 NDR_CHECK(ndr_pull_union_align(ndr, 8));
5495 switch (level) {
5496 case 1: {
5497 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1));
5498 break; }
5500 case 2: {
5501 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr, NDR_SCALARS, &r->req2));
5502 break; }
5504 case 3: {
5505 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr, NDR_SCALARS, &r->req3));
5506 break; }
5508 default:
5509 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5512 if (ndr_flags & NDR_BUFFERS) {
5513 switch (level) {
5514 case 1:
5515 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr, NDR_BUFFERS, &r->req1));
5516 break;
5518 case 2:
5519 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr, NDR_BUFFERS, &r->req2));
5520 break;
5522 case 3:
5523 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr, NDR_BUFFERS, &r->req3));
5524 break;
5526 default:
5527 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5530 return NDR_ERR_SUCCESS;
5533 _PUBLIC_ void ndr_print_samr_ValidatePasswordReq(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordReq *r)
5535 int level;
5536 level = ndr_print_get_switch_value(ndr, r);
5537 ndr_print_union(ndr, name, level, "samr_ValidatePasswordReq");
5538 switch (level) {
5539 case 1:
5540 ndr_print_samr_ValidatePasswordReq1(ndr, "req1", &r->req1);
5541 break;
5543 case 2:
5544 ndr_print_samr_ValidatePasswordReq2(ndr, "req2", &r->req2);
5545 break;
5547 case 3:
5548 ndr_print_samr_ValidatePasswordReq3(ndr, "req3", &r->req3);
5549 break;
5551 default:
5552 ndr_print_bad_level(ndr, name, level);
5556 static enum ndr_err_code ndr_push_samr_Connect(struct ndr_push *ndr, int flags, const struct samr_Connect *r)
5558 if (flags & NDR_IN) {
5559 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
5560 if (r->in.system_name) {
5561 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
5563 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
5565 if (flags & NDR_OUT) {
5566 if (r->out.connect_handle == NULL) {
5567 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5569 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
5570 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5572 return NDR_ERR_SUCCESS;
5575 static enum ndr_err_code ndr_pull_samr_Connect(struct ndr_pull *ndr, int flags, struct samr_Connect *r)
5577 uint32_t _ptr_system_name;
5578 TALLOC_CTX *_mem_save_system_name_0;
5579 TALLOC_CTX *_mem_save_connect_handle_0;
5580 if (flags & NDR_IN) {
5581 ZERO_STRUCT(r->out);
5583 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
5584 if (_ptr_system_name) {
5585 NDR_PULL_ALLOC(ndr, r->in.system_name);
5586 } else {
5587 r->in.system_name = NULL;
5589 if (r->in.system_name) {
5590 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5591 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
5592 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
5593 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
5595 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
5596 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
5597 ZERO_STRUCTP(r->out.connect_handle);
5599 if (flags & NDR_OUT) {
5600 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5601 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
5603 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5604 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
5605 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
5606 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
5607 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5609 return NDR_ERR_SUCCESS;
5612 _PUBLIC_ void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect *r)
5614 ndr_print_struct(ndr, name, "samr_Connect");
5615 ndr->depth++;
5616 if (flags & NDR_SET_VALUES) {
5617 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5619 if (flags & NDR_IN) {
5620 ndr_print_struct(ndr, "in", "samr_Connect");
5621 ndr->depth++;
5622 ndr_print_ptr(ndr, "system_name", r->in.system_name);
5623 ndr->depth++;
5624 if (r->in.system_name) {
5625 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
5627 ndr->depth--;
5628 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
5629 ndr->depth--;
5631 if (flags & NDR_OUT) {
5632 ndr_print_struct(ndr, "out", "samr_Connect");
5633 ndr->depth++;
5634 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
5635 ndr->depth++;
5636 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
5637 ndr->depth--;
5638 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5639 ndr->depth--;
5641 ndr->depth--;
5644 _PUBLIC_ enum ndr_err_code ndr_push_samr_Close(struct ndr_push *ndr, int flags, const struct samr_Close *r)
5646 if (flags & NDR_IN) {
5647 if (r->in.handle == NULL) {
5648 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5650 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5652 if (flags & NDR_OUT) {
5653 if (r->out.handle == NULL) {
5654 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5656 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5657 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5659 return NDR_ERR_SUCCESS;
5662 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Close(struct ndr_pull *ndr, int flags, struct samr_Close *r)
5664 TALLOC_CTX *_mem_save_handle_0;
5665 if (flags & NDR_IN) {
5666 ZERO_STRUCT(r->out);
5668 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5669 NDR_PULL_ALLOC(ndr, r->in.handle);
5671 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5672 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5673 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5674 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5675 NDR_PULL_ALLOC(ndr, r->out.handle);
5676 *r->out.handle = *r->in.handle;
5678 if (flags & NDR_OUT) {
5679 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5680 NDR_PULL_ALLOC(ndr, r->out.handle);
5682 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5683 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5684 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5685 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5686 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5688 return NDR_ERR_SUCCESS;
5691 _PUBLIC_ void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, const struct samr_Close *r)
5693 ndr_print_struct(ndr, name, "samr_Close");
5694 ndr->depth++;
5695 if (flags & NDR_SET_VALUES) {
5696 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5698 if (flags & NDR_IN) {
5699 ndr_print_struct(ndr, "in", "samr_Close");
5700 ndr->depth++;
5701 ndr_print_ptr(ndr, "handle", r->in.handle);
5702 ndr->depth++;
5703 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5704 ndr->depth--;
5705 ndr->depth--;
5707 if (flags & NDR_OUT) {
5708 ndr_print_struct(ndr, "out", "samr_Close");
5709 ndr->depth++;
5710 ndr_print_ptr(ndr, "handle", r->out.handle);
5711 ndr->depth++;
5712 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5713 ndr->depth--;
5714 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5715 ndr->depth--;
5717 ndr->depth--;
5720 static enum ndr_err_code ndr_push_samr_SetSecurity(struct ndr_push *ndr, int flags, const struct samr_SetSecurity *r)
5722 if (flags & NDR_IN) {
5723 if (r->in.handle == NULL) {
5724 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5726 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5727 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5728 if (r->in.sdbuf == NULL) {
5729 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5731 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5733 if (flags & NDR_OUT) {
5734 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5736 return NDR_ERR_SUCCESS;
5739 static enum ndr_err_code ndr_pull_samr_SetSecurity(struct ndr_pull *ndr, int flags, struct samr_SetSecurity *r)
5741 TALLOC_CTX *_mem_save_handle_0;
5742 TALLOC_CTX *_mem_save_sdbuf_0;
5743 if (flags & NDR_IN) {
5744 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5745 NDR_PULL_ALLOC(ndr, r->in.handle);
5747 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5748 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5749 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5750 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5751 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5752 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5753 NDR_PULL_ALLOC(ndr, r->in.sdbuf);
5755 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5756 NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5757 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5760 if (flags & NDR_OUT) {
5761 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5763 return NDR_ERR_SUCCESS;
5766 _PUBLIC_ void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetSecurity *r)
5768 ndr_print_struct(ndr, name, "samr_SetSecurity");
5769 ndr->depth++;
5770 if (flags & NDR_SET_VALUES) {
5771 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5773 if (flags & NDR_IN) {
5774 ndr_print_struct(ndr, "in", "samr_SetSecurity");
5775 ndr->depth++;
5776 ndr_print_ptr(ndr, "handle", r->in.handle);
5777 ndr->depth++;
5778 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5779 ndr->depth--;
5780 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5781 ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf);
5782 ndr->depth++;
5783 ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf);
5784 ndr->depth--;
5785 ndr->depth--;
5787 if (flags & NDR_OUT) {
5788 ndr_print_struct(ndr, "out", "samr_SetSecurity");
5789 ndr->depth++;
5790 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5791 ndr->depth--;
5793 ndr->depth--;
5796 static enum ndr_err_code ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int flags, const struct samr_QuerySecurity *r)
5798 if (flags & NDR_IN) {
5799 if (r->in.handle == NULL) {
5800 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5802 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5803 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5805 if (flags & NDR_OUT) {
5806 if (r->out.sdbuf == NULL) {
5807 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5809 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf));
5810 if (*r->out.sdbuf) {
5811 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5813 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5815 return NDR_ERR_SUCCESS;
5818 static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int flags, struct samr_QuerySecurity *r)
5820 uint32_t _ptr_sdbuf;
5821 TALLOC_CTX *_mem_save_handle_0;
5822 TALLOC_CTX *_mem_save_sdbuf_0;
5823 TALLOC_CTX *_mem_save_sdbuf_1;
5824 if (flags & NDR_IN) {
5825 ZERO_STRUCT(r->out);
5827 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5828 NDR_PULL_ALLOC(ndr, r->in.handle);
5830 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5831 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5832 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5833 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5834 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5835 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5836 ZERO_STRUCTP(r->out.sdbuf);
5838 if (flags & NDR_OUT) {
5839 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5840 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5842 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5843 NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5844 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf));
5845 if (_ptr_sdbuf) {
5846 NDR_PULL_ALLOC(ndr, *r->out.sdbuf);
5847 } else {
5848 *r->out.sdbuf = NULL;
5850 if (*r->out.sdbuf) {
5851 _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr);
5852 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0);
5853 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5854 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0);
5856 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5857 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5859 return NDR_ERR_SUCCESS;
5862 _PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_QuerySecurity *r)
5864 ndr_print_struct(ndr, name, "samr_QuerySecurity");
5865 ndr->depth++;
5866 if (flags & NDR_SET_VALUES) {
5867 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5869 if (flags & NDR_IN) {
5870 ndr_print_struct(ndr, "in", "samr_QuerySecurity");
5871 ndr->depth++;
5872 ndr_print_ptr(ndr, "handle", r->in.handle);
5873 ndr->depth++;
5874 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5875 ndr->depth--;
5876 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5877 ndr->depth--;
5879 if (flags & NDR_OUT) {
5880 ndr_print_struct(ndr, "out", "samr_QuerySecurity");
5881 ndr->depth++;
5882 ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
5883 ndr->depth++;
5884 ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf);
5885 ndr->depth++;
5886 if (*r->out.sdbuf) {
5887 ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf);
5889 ndr->depth--;
5890 ndr->depth--;
5891 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5892 ndr->depth--;
5894 ndr->depth--;
5897 static enum ndr_err_code ndr_push_samr_Shutdown(struct ndr_push *ndr, int flags, const struct samr_Shutdown *r)
5899 if (flags & NDR_IN) {
5900 if (r->in.connect_handle == NULL) {
5901 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5903 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
5905 if (flags & NDR_OUT) {
5906 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5908 return NDR_ERR_SUCCESS;
5911 static enum ndr_err_code ndr_pull_samr_Shutdown(struct ndr_pull *ndr, int flags, struct samr_Shutdown *r)
5913 TALLOC_CTX *_mem_save_connect_handle_0;
5914 if (flags & NDR_IN) {
5915 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5916 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
5918 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5919 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
5920 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
5921 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
5923 if (flags & NDR_OUT) {
5924 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5926 return NDR_ERR_SUCCESS;
5929 _PUBLIC_ void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, const struct samr_Shutdown *r)
5931 ndr_print_struct(ndr, name, "samr_Shutdown");
5932 ndr->depth++;
5933 if (flags & NDR_SET_VALUES) {
5934 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5936 if (flags & NDR_IN) {
5937 ndr_print_struct(ndr, "in", "samr_Shutdown");
5938 ndr->depth++;
5939 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
5940 ndr->depth++;
5941 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
5942 ndr->depth--;
5943 ndr->depth--;
5945 if (flags & NDR_OUT) {
5946 ndr_print_struct(ndr, "out", "samr_Shutdown");
5947 ndr->depth++;
5948 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5949 ndr->depth--;
5951 ndr->depth--;
5954 static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int flags, const struct samr_LookupDomain *r)
5956 if (flags & NDR_IN) {
5957 if (r->in.connect_handle == NULL) {
5958 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5960 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
5961 if (r->in.domain_name == NULL) {
5962 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5964 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
5966 if (flags & NDR_OUT) {
5967 if (r->out.sid == NULL) {
5968 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5970 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sid));
5971 if (*r->out.sid) {
5972 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
5974 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5976 return NDR_ERR_SUCCESS;
5979 static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int flags, struct samr_LookupDomain *r)
5981 uint32_t _ptr_sid;
5982 TALLOC_CTX *_mem_save_connect_handle_0;
5983 TALLOC_CTX *_mem_save_domain_name_0;
5984 TALLOC_CTX *_mem_save_sid_0;
5985 TALLOC_CTX *_mem_save_sid_1;
5986 if (flags & NDR_IN) {
5987 ZERO_STRUCT(r->out);
5989 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5990 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
5992 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5993 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
5994 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
5995 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
5996 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5997 NDR_PULL_ALLOC(ndr, r->in.domain_name);
5999 _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6000 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, LIBNDR_FLAG_REF_ALLOC);
6001 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
6002 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, LIBNDR_FLAG_REF_ALLOC);
6003 NDR_PULL_ALLOC(ndr, r->out.sid);
6004 ZERO_STRUCTP(r->out.sid);
6006 if (flags & NDR_OUT) {
6007 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6008 NDR_PULL_ALLOC(ndr, r->out.sid);
6010 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6011 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
6012 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
6013 if (_ptr_sid) {
6014 NDR_PULL_ALLOC(ndr, *r->out.sid);
6015 } else {
6016 *r->out.sid = NULL;
6018 if (*r->out.sid) {
6019 _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr);
6020 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, 0);
6021 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
6022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, 0);
6024 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6025 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6027 return NDR_ERR_SUCCESS;
6030 _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupDomain *r)
6032 ndr_print_struct(ndr, name, "samr_LookupDomain");
6033 ndr->depth++;
6034 if (flags & NDR_SET_VALUES) {
6035 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6037 if (flags & NDR_IN) {
6038 ndr_print_struct(ndr, "in", "samr_LookupDomain");
6039 ndr->depth++;
6040 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6041 ndr->depth++;
6042 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6043 ndr->depth--;
6044 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
6045 ndr->depth++;
6046 ndr_print_lsa_String(ndr, "domain_name", r->in.domain_name);
6047 ndr->depth--;
6048 ndr->depth--;
6050 if (flags & NDR_OUT) {
6051 ndr_print_struct(ndr, "out", "samr_LookupDomain");
6052 ndr->depth++;
6053 ndr_print_ptr(ndr, "sid", r->out.sid);
6054 ndr->depth++;
6055 ndr_print_ptr(ndr, "sid", *r->out.sid);
6056 ndr->depth++;
6057 if (*r->out.sid) {
6058 ndr_print_dom_sid2(ndr, "sid", *r->out.sid);
6060 ndr->depth--;
6061 ndr->depth--;
6062 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6063 ndr->depth--;
6065 ndr->depth--;
6068 static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int flags, const struct samr_EnumDomains *r)
6070 if (flags & NDR_IN) {
6071 if (r->in.connect_handle == NULL) {
6072 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6074 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6075 if (r->in.resume_handle == NULL) {
6076 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
6081 if (flags & NDR_OUT) {
6082 if (r->out.resume_handle == NULL) {
6083 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6085 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6086 if (r->out.sam == NULL) {
6087 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6089 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
6090 if (*r->out.sam) {
6091 NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6093 if (r->out.num_entries == NULL) {
6094 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6096 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
6097 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6099 return NDR_ERR_SUCCESS;
6102 static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int flags, struct samr_EnumDomains *r)
6104 uint32_t _ptr_sam;
6105 TALLOC_CTX *_mem_save_connect_handle_0;
6106 TALLOC_CTX *_mem_save_resume_handle_0;
6107 TALLOC_CTX *_mem_save_sam_0;
6108 TALLOC_CTX *_mem_save_sam_1;
6109 TALLOC_CTX *_mem_save_num_entries_0;
6110 if (flags & NDR_IN) {
6111 ZERO_STRUCT(r->out);
6113 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6114 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6116 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6117 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6118 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6120 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6121 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6123 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6124 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6125 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6126 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6127 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
6128 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6129 *r->out.resume_handle = *r->in.resume_handle;
6130 NDR_PULL_ALLOC(ndr, r->out.sam);
6131 ZERO_STRUCTP(r->out.sam);
6132 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6133 ZERO_STRUCTP(r->out.num_entries);
6135 if (flags & NDR_OUT) {
6136 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6137 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6139 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6140 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6141 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6142 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6143 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6144 NDR_PULL_ALLOC(ndr, r->out.sam);
6146 _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
6147 NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
6148 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
6149 if (_ptr_sam) {
6150 NDR_PULL_ALLOC(ndr, *r->out.sam);
6151 } else {
6152 *r->out.sam = NULL;
6154 if (*r->out.sam) {
6155 _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
6156 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
6157 NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6158 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
6160 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
6161 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6162 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6164 _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6165 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
6166 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
6167 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
6168 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6170 return NDR_ERR_SUCCESS;
6173 _PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomains *r)
6175 ndr_print_struct(ndr, name, "samr_EnumDomains");
6176 ndr->depth++;
6177 if (flags & NDR_SET_VALUES) {
6178 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6180 if (flags & NDR_IN) {
6181 ndr_print_struct(ndr, "in", "samr_EnumDomains");
6182 ndr->depth++;
6183 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6184 ndr->depth++;
6185 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6186 ndr->depth--;
6187 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6188 ndr->depth++;
6189 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6190 ndr->depth--;
6191 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
6192 ndr->depth--;
6194 if (flags & NDR_OUT) {
6195 ndr_print_struct(ndr, "out", "samr_EnumDomains");
6196 ndr->depth++;
6197 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6198 ndr->depth++;
6199 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6200 ndr->depth--;
6201 ndr_print_ptr(ndr, "sam", r->out.sam);
6202 ndr->depth++;
6203 ndr_print_ptr(ndr, "sam", *r->out.sam);
6204 ndr->depth++;
6205 if (*r->out.sam) {
6206 ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
6208 ndr->depth--;
6209 ndr->depth--;
6210 ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
6211 ndr->depth++;
6212 ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
6213 ndr->depth--;
6214 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6215 ndr->depth--;
6217 ndr->depth--;
6220 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenDomain(struct ndr_push *ndr, int flags, const struct samr_OpenDomain *r)
6222 if (flags & NDR_IN) {
6223 if (r->in.connect_handle == NULL) {
6224 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6226 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6227 NDR_CHECK(ndr_push_samr_DomainAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6228 if (r->in.sid == NULL) {
6229 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6231 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6233 if (flags & NDR_OUT) {
6234 if (r->out.domain_handle == NULL) {
6235 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6237 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.domain_handle));
6238 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6240 return NDR_ERR_SUCCESS;
6243 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, int flags, struct samr_OpenDomain *r)
6245 TALLOC_CTX *_mem_save_connect_handle_0;
6246 TALLOC_CTX *_mem_save_sid_0;
6247 TALLOC_CTX *_mem_save_domain_handle_0;
6248 if (flags & NDR_IN) {
6249 ZERO_STRUCT(r->out);
6251 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6252 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6254 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6255 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6256 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6257 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6258 NDR_CHECK(ndr_pull_samr_DomainAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6259 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6260 NDR_PULL_ALLOC(ndr, r->in.sid);
6262 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6263 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
6264 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6266 NDR_PULL_ALLOC(ndr, r->out.domain_handle);
6267 ZERO_STRUCTP(r->out.domain_handle);
6269 if (flags & NDR_OUT) {
6270 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6271 NDR_PULL_ALLOC(ndr, r->out.domain_handle);
6273 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6274 NDR_PULL_SET_MEM_CTX(ndr, r->out.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6275 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.domain_handle));
6276 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6277 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6279 return NDR_ERR_SUCCESS;
6282 _PUBLIC_ void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenDomain *r)
6284 ndr_print_struct(ndr, name, "samr_OpenDomain");
6285 ndr->depth++;
6286 if (flags & NDR_SET_VALUES) {
6287 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6289 if (flags & NDR_IN) {
6290 ndr_print_struct(ndr, "in", "samr_OpenDomain");
6291 ndr->depth++;
6292 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6293 ndr->depth++;
6294 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6295 ndr->depth--;
6296 ndr_print_samr_DomainAccessMask(ndr, "access_mask", r->in.access_mask);
6297 ndr_print_ptr(ndr, "sid", r->in.sid);
6298 ndr->depth++;
6299 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
6300 ndr->depth--;
6301 ndr->depth--;
6303 if (flags & NDR_OUT) {
6304 ndr_print_struct(ndr, "out", "samr_OpenDomain");
6305 ndr->depth++;
6306 ndr_print_ptr(ndr, "domain_handle", r->out.domain_handle);
6307 ndr->depth++;
6308 ndr_print_policy_handle(ndr, "domain_handle", r->out.domain_handle);
6309 ndr->depth--;
6310 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6311 ndr->depth--;
6313 ndr->depth--;
6316 static enum ndr_err_code ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, int flags, const struct samr_QueryDomainInfo *r)
6318 if (flags & NDR_IN) {
6319 if (r->in.domain_handle == NULL) {
6320 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6322 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6323 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
6325 if (flags & NDR_OUT) {
6326 if (r->out.info == NULL) {
6327 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6329 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
6330 if (*r->out.info) {
6331 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
6332 NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
6334 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6336 return NDR_ERR_SUCCESS;
6339 static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo *r)
6341 uint32_t _ptr_info;
6342 TALLOC_CTX *_mem_save_domain_handle_0;
6343 TALLOC_CTX *_mem_save_info_0;
6344 TALLOC_CTX *_mem_save_info_1;
6345 if (flags & NDR_IN) {
6346 ZERO_STRUCT(r->out);
6348 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6349 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6351 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6352 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6353 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6354 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6355 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
6356 NDR_PULL_ALLOC(ndr, r->out.info);
6357 ZERO_STRUCTP(r->out.info);
6359 if (flags & NDR_OUT) {
6360 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6361 NDR_PULL_ALLOC(ndr, r->out.info);
6363 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6364 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
6365 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
6366 if (_ptr_info) {
6367 NDR_PULL_ALLOC(ndr, *r->out.info);
6368 } else {
6369 *r->out.info = NULL;
6371 if (*r->out.info) {
6372 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
6373 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
6374 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
6375 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
6376 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
6378 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6379 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6381 return NDR_ERR_SUCCESS;
6384 _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo *r)
6386 ndr_print_struct(ndr, name, "samr_QueryDomainInfo");
6387 ndr->depth++;
6388 if (flags & NDR_SET_VALUES) {
6389 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6391 if (flags & NDR_IN) {
6392 ndr_print_struct(ndr, "in", "samr_QueryDomainInfo");
6393 ndr->depth++;
6394 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6395 ndr->depth++;
6396 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6397 ndr->depth--;
6398 ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
6399 ndr->depth--;
6401 if (flags & NDR_OUT) {
6402 ndr_print_struct(ndr, "out", "samr_QueryDomainInfo");
6403 ndr->depth++;
6404 ndr_print_ptr(ndr, "info", r->out.info);
6405 ndr->depth++;
6406 ndr_print_ptr(ndr, "info", *r->out.info);
6407 ndr->depth++;
6408 if (*r->out.info) {
6409 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
6410 ndr_print_samr_DomainInfo(ndr, "info", *r->out.info);
6412 ndr->depth--;
6413 ndr->depth--;
6414 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6415 ndr->depth--;
6417 ndr->depth--;
6420 static enum ndr_err_code ndr_push_samr_SetDomainInfo(struct ndr_push *ndr, int flags, const struct samr_SetDomainInfo *r)
6422 if (flags & NDR_IN) {
6423 if (r->in.domain_handle == NULL) {
6424 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6426 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6427 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
6428 if (r->in.info == NULL) {
6429 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6431 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
6432 NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6434 if (flags & NDR_OUT) {
6435 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6437 return NDR_ERR_SUCCESS;
6440 static enum ndr_err_code ndr_pull_samr_SetDomainInfo(struct ndr_pull *ndr, int flags, struct samr_SetDomainInfo *r)
6442 TALLOC_CTX *_mem_save_domain_handle_0;
6443 TALLOC_CTX *_mem_save_info_0;
6444 if (flags & NDR_IN) {
6445 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6446 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6448 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6449 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6450 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6452 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
6453 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6454 NDR_PULL_ALLOC(ndr, r->in.info);
6456 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6457 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6458 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
6459 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6460 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6462 if (flags & NDR_OUT) {
6463 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6465 return NDR_ERR_SUCCESS;
6468 _PUBLIC_ void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDomainInfo *r)
6470 ndr_print_struct(ndr, name, "samr_SetDomainInfo");
6471 ndr->depth++;
6472 if (flags & NDR_SET_VALUES) {
6473 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6475 if (flags & NDR_IN) {
6476 ndr_print_struct(ndr, "in", "samr_SetDomainInfo");
6477 ndr->depth++;
6478 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6479 ndr->depth++;
6480 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6481 ndr->depth--;
6482 ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
6483 ndr_print_ptr(ndr, "info", r->in.info);
6484 ndr->depth++;
6485 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
6486 ndr_print_samr_DomainInfo(ndr, "info", r->in.info);
6487 ndr->depth--;
6488 ndr->depth--;
6490 if (flags & NDR_OUT) {
6491 ndr_print_struct(ndr, "out", "samr_SetDomainInfo");
6492 ndr->depth++;
6493 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6494 ndr->depth--;
6496 ndr->depth--;
6499 static enum ndr_err_code ndr_push_samr_CreateDomainGroup(struct ndr_push *ndr, int flags, const struct samr_CreateDomainGroup *r)
6501 if (flags & NDR_IN) {
6502 if (r->in.domain_handle == NULL) {
6503 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6505 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6506 if (r->in.name == NULL) {
6507 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6509 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
6510 NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6512 if (flags & NDR_OUT) {
6513 if (r->out.group_handle == NULL) {
6514 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6516 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
6517 if (r->out.rid == NULL) {
6518 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
6521 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6523 return NDR_ERR_SUCCESS;
6526 static enum ndr_err_code ndr_pull_samr_CreateDomainGroup(struct ndr_pull *ndr, int flags, struct samr_CreateDomainGroup *r)
6528 TALLOC_CTX *_mem_save_domain_handle_0;
6529 TALLOC_CTX *_mem_save_name_0;
6530 TALLOC_CTX *_mem_save_group_handle_0;
6531 TALLOC_CTX *_mem_save_rid_0;
6532 if (flags & NDR_IN) {
6533 ZERO_STRUCT(r->out);
6535 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6536 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6538 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6539 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6540 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6541 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6542 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6543 NDR_PULL_ALLOC(ndr, r->in.name);
6545 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6546 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
6547 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
6548 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
6549 NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6550 NDR_PULL_ALLOC(ndr, r->out.group_handle);
6551 ZERO_STRUCTP(r->out.group_handle);
6552 NDR_PULL_ALLOC(ndr, r->out.rid);
6553 ZERO_STRUCTP(r->out.rid);
6555 if (flags & NDR_OUT) {
6556 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6557 NDR_PULL_ALLOC(ndr, r->out.group_handle);
6559 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6560 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC);
6561 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
6562 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
6563 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6564 NDR_PULL_ALLOC(ndr, r->out.rid);
6566 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6567 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
6568 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
6569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
6570 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6572 return NDR_ERR_SUCCESS;
6575 _PUBLIC_ void ndr_print_samr_CreateDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomainGroup *r)
6577 ndr_print_struct(ndr, name, "samr_CreateDomainGroup");
6578 ndr->depth++;
6579 if (flags & NDR_SET_VALUES) {
6580 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6582 if (flags & NDR_IN) {
6583 ndr_print_struct(ndr, "in", "samr_CreateDomainGroup");
6584 ndr->depth++;
6585 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6586 ndr->depth++;
6587 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6588 ndr->depth--;
6589 ndr_print_ptr(ndr, "name", r->in.name);
6590 ndr->depth++;
6591 ndr_print_lsa_String(ndr, "name", r->in.name);
6592 ndr->depth--;
6593 ndr_print_samr_GroupAccessMask(ndr, "access_mask", r->in.access_mask);
6594 ndr->depth--;
6596 if (flags & NDR_OUT) {
6597 ndr_print_struct(ndr, "out", "samr_CreateDomainGroup");
6598 ndr->depth++;
6599 ndr_print_ptr(ndr, "group_handle", r->out.group_handle);
6600 ndr->depth++;
6601 ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle);
6602 ndr->depth--;
6603 ndr_print_ptr(ndr, "rid", r->out.rid);
6604 ndr->depth++;
6605 ndr_print_uint32(ndr, "rid", *r->out.rid);
6606 ndr->depth--;
6607 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6608 ndr->depth--;
6610 ndr->depth--;
6613 static enum ndr_err_code ndr_push_samr_EnumDomainGroups(struct ndr_push *ndr, int flags, const struct samr_EnumDomainGroups *r)
6615 if (flags & NDR_IN) {
6616 if (r->in.domain_handle == NULL) {
6617 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6619 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6620 if (r->in.resume_handle == NULL) {
6621 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
6626 if (flags & NDR_OUT) {
6627 if (r->out.resume_handle == NULL) {
6628 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6630 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6631 if (r->out.sam == NULL) {
6632 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6634 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
6635 if (*r->out.sam) {
6636 NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6638 if (r->out.num_entries == NULL) {
6639 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
6642 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6644 return NDR_ERR_SUCCESS;
6647 static enum ndr_err_code ndr_pull_samr_EnumDomainGroups(struct ndr_pull *ndr, int flags, struct samr_EnumDomainGroups *r)
6649 uint32_t _ptr_sam;
6650 TALLOC_CTX *_mem_save_domain_handle_0;
6651 TALLOC_CTX *_mem_save_resume_handle_0;
6652 TALLOC_CTX *_mem_save_sam_0;
6653 TALLOC_CTX *_mem_save_sam_1;
6654 TALLOC_CTX *_mem_save_num_entries_0;
6655 if (flags & NDR_IN) {
6656 ZERO_STRUCT(r->out);
6658 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6659 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6661 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6662 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6663 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6664 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6665 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6666 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6668 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6669 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6670 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6672 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
6673 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6674 *r->out.resume_handle = *r->in.resume_handle;
6675 NDR_PULL_ALLOC(ndr, r->out.sam);
6676 ZERO_STRUCTP(r->out.sam);
6677 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6678 ZERO_STRUCTP(r->out.num_entries);
6680 if (flags & NDR_OUT) {
6681 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6682 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6684 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6685 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6686 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6687 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6688 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6689 NDR_PULL_ALLOC(ndr, r->out.sam);
6691 _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
6692 NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
6693 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
6694 if (_ptr_sam) {
6695 NDR_PULL_ALLOC(ndr, *r->out.sam);
6696 } else {
6697 *r->out.sam = NULL;
6699 if (*r->out.sam) {
6700 _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
6701 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
6702 NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6703 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
6705 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
6706 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6707 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6709 _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6710 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
6711 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
6712 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
6713 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6715 return NDR_ERR_SUCCESS;
6718 _PUBLIC_ void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainGroups *r)
6720 ndr_print_struct(ndr, name, "samr_EnumDomainGroups");
6721 ndr->depth++;
6722 if (flags & NDR_SET_VALUES) {
6723 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6725 if (flags & NDR_IN) {
6726 ndr_print_struct(ndr, "in", "samr_EnumDomainGroups");
6727 ndr->depth++;
6728 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6729 ndr->depth++;
6730 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6731 ndr->depth--;
6732 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6733 ndr->depth++;
6734 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6735 ndr->depth--;
6736 ndr_print_uint32(ndr, "max_size", r->in.max_size);
6737 ndr->depth--;
6739 if (flags & NDR_OUT) {
6740 ndr_print_struct(ndr, "out", "samr_EnumDomainGroups");
6741 ndr->depth++;
6742 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6743 ndr->depth++;
6744 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6745 ndr->depth--;
6746 ndr_print_ptr(ndr, "sam", r->out.sam);
6747 ndr->depth++;
6748 ndr_print_ptr(ndr, "sam", *r->out.sam);
6749 ndr->depth++;
6750 if (*r->out.sam) {
6751 ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
6753 ndr->depth--;
6754 ndr->depth--;
6755 ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
6756 ndr->depth++;
6757 ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
6758 ndr->depth--;
6759 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6760 ndr->depth--;
6762 ndr->depth--;
6765 static enum ndr_err_code ndr_push_samr_CreateUser(struct ndr_push *ndr, int flags, const struct samr_CreateUser *r)
6767 if (flags & NDR_IN) {
6768 if (r->in.domain_handle == NULL) {
6769 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6771 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6772 if (r->in.account_name == NULL) {
6773 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6775 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
6776 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6778 if (flags & NDR_OUT) {
6779 if (r->out.user_handle == NULL) {
6780 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6782 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
6783 if (r->out.rid == NULL) {
6784 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6786 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
6787 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6789 return NDR_ERR_SUCCESS;
6792 static enum ndr_err_code ndr_pull_samr_CreateUser(struct ndr_pull *ndr, int flags, struct samr_CreateUser *r)
6794 TALLOC_CTX *_mem_save_domain_handle_0;
6795 TALLOC_CTX *_mem_save_account_name_0;
6796 TALLOC_CTX *_mem_save_user_handle_0;
6797 TALLOC_CTX *_mem_save_rid_0;
6798 if (flags & NDR_IN) {
6799 ZERO_STRUCT(r->out);
6801 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6802 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6804 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6805 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6806 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6807 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6808 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6809 NDR_PULL_ALLOC(ndr, r->in.account_name);
6811 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6812 NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
6813 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
6814 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
6815 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6816 NDR_PULL_ALLOC(ndr, r->out.user_handle);
6817 ZERO_STRUCTP(r->out.user_handle);
6818 NDR_PULL_ALLOC(ndr, r->out.rid);
6819 ZERO_STRUCTP(r->out.rid);
6821 if (flags & NDR_OUT) {
6822 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6823 NDR_PULL_ALLOC(ndr, r->out.user_handle);
6825 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6826 NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
6827 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
6828 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
6829 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6830 NDR_PULL_ALLOC(ndr, r->out.rid);
6832 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6833 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
6834 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
6835 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
6836 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6838 return NDR_ERR_SUCCESS;
6841 _PUBLIC_ void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser *r)
6843 ndr_print_struct(ndr, name, "samr_CreateUser");
6844 ndr->depth++;
6845 if (flags & NDR_SET_VALUES) {
6846 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6848 if (flags & NDR_IN) {
6849 ndr_print_struct(ndr, "in", "samr_CreateUser");
6850 ndr->depth++;
6851 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6852 ndr->depth++;
6853 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6854 ndr->depth--;
6855 ndr_print_ptr(ndr, "account_name", r->in.account_name);
6856 ndr->depth++;
6857 ndr_print_lsa_String(ndr, "account_name", r->in.account_name);
6858 ndr->depth--;
6859 ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask);
6860 ndr->depth--;
6862 if (flags & NDR_OUT) {
6863 ndr_print_struct(ndr, "out", "samr_CreateUser");
6864 ndr->depth++;
6865 ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
6866 ndr->depth++;
6867 ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
6868 ndr->depth--;
6869 ndr_print_ptr(ndr, "rid", r->out.rid);
6870 ndr->depth++;
6871 ndr_print_uint32(ndr, "rid", *r->out.rid);
6872 ndr->depth--;
6873 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6874 ndr->depth--;
6876 ndr->depth--;
6879 static enum ndr_err_code ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, int flags, const struct samr_EnumDomainUsers *r)
6881 if (flags & NDR_IN) {
6882 if (r->in.domain_handle == NULL) {
6883 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6885 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6886 if (r->in.resume_handle == NULL) {
6887 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6889 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6890 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags));
6891 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
6893 if (flags & NDR_OUT) {
6894 if (r->out.resume_handle == NULL) {
6895 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6897 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6898 if (r->out.sam == NULL) {
6899 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6901 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
6902 if (*r->out.sam) {
6903 NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6905 if (r->out.num_entries == NULL) {
6906 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6908 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
6909 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6911 return NDR_ERR_SUCCESS;
6914 static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int flags, struct samr_EnumDomainUsers *r)
6916 uint32_t _ptr_sam;
6917 TALLOC_CTX *_mem_save_domain_handle_0;
6918 TALLOC_CTX *_mem_save_resume_handle_0;
6919 TALLOC_CTX *_mem_save_sam_0;
6920 TALLOC_CTX *_mem_save_sam_1;
6921 TALLOC_CTX *_mem_save_num_entries_0;
6922 if (flags & NDR_IN) {
6923 ZERO_STRUCT(r->out);
6925 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6926 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6928 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6929 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6930 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6931 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6932 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6933 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6935 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6936 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6937 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6939 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags));
6940 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
6941 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6942 *r->out.resume_handle = *r->in.resume_handle;
6943 NDR_PULL_ALLOC(ndr, r->out.sam);
6944 ZERO_STRUCTP(r->out.sam);
6945 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6946 ZERO_STRUCTP(r->out.num_entries);
6948 if (flags & NDR_OUT) {
6949 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6950 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6952 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6953 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6954 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6955 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6956 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6957 NDR_PULL_ALLOC(ndr, r->out.sam);
6959 _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
6960 NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
6961 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
6962 if (_ptr_sam) {
6963 NDR_PULL_ALLOC(ndr, *r->out.sam);
6964 } else {
6965 *r->out.sam = NULL;
6967 if (*r->out.sam) {
6968 _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
6969 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
6970 NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6971 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
6973 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
6974 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6975 NDR_PULL_ALLOC(ndr, r->out.num_entries);
6977 _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6978 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
6979 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
6980 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
6981 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6983 return NDR_ERR_SUCCESS;
6986 _PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainUsers *r)
6988 ndr_print_struct(ndr, name, "samr_EnumDomainUsers");
6989 ndr->depth++;
6990 if (flags & NDR_SET_VALUES) {
6991 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6993 if (flags & NDR_IN) {
6994 ndr_print_struct(ndr, "in", "samr_EnumDomainUsers");
6995 ndr->depth++;
6996 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
6997 ndr->depth++;
6998 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
6999 ndr->depth--;
7000 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7001 ndr->depth++;
7002 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7003 ndr->depth--;
7004 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags);
7005 ndr_print_uint32(ndr, "max_size", r->in.max_size);
7006 ndr->depth--;
7008 if (flags & NDR_OUT) {
7009 ndr_print_struct(ndr, "out", "samr_EnumDomainUsers");
7010 ndr->depth++;
7011 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7012 ndr->depth++;
7013 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7014 ndr->depth--;
7015 ndr_print_ptr(ndr, "sam", r->out.sam);
7016 ndr->depth++;
7017 ndr_print_ptr(ndr, "sam", *r->out.sam);
7018 ndr->depth++;
7019 if (*r->out.sam) {
7020 ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
7022 ndr->depth--;
7023 ndr->depth--;
7024 ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
7025 ndr->depth++;
7026 ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
7027 ndr->depth--;
7028 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7029 ndr->depth--;
7031 ndr->depth--;
7034 static enum ndr_err_code ndr_push_samr_CreateDomAlias(struct ndr_push *ndr, int flags, const struct samr_CreateDomAlias *r)
7036 if (flags & NDR_IN) {
7037 if (r->in.domain_handle == NULL) {
7038 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7040 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7041 if (r->in.alias_name == NULL) {
7042 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7044 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.alias_name));
7045 NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7047 if (flags & NDR_OUT) {
7048 if (r->out.alias_handle == NULL) {
7049 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7051 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
7052 if (r->out.rid == NULL) {
7053 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
7056 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7058 return NDR_ERR_SUCCESS;
7061 static enum ndr_err_code ndr_pull_samr_CreateDomAlias(struct ndr_pull *ndr, int flags, struct samr_CreateDomAlias *r)
7063 TALLOC_CTX *_mem_save_domain_handle_0;
7064 TALLOC_CTX *_mem_save_alias_name_0;
7065 TALLOC_CTX *_mem_save_alias_handle_0;
7066 TALLOC_CTX *_mem_save_rid_0;
7067 if (flags & NDR_IN) {
7068 ZERO_STRUCT(r->out);
7070 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7071 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7073 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7074 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7075 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7076 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7077 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7078 NDR_PULL_ALLOC(ndr, r->in.alias_name);
7080 _mem_save_alias_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7081 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_name, LIBNDR_FLAG_REF_ALLOC);
7082 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.alias_name));
7083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_name_0, LIBNDR_FLAG_REF_ALLOC);
7084 NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7085 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
7086 ZERO_STRUCTP(r->out.alias_handle);
7087 NDR_PULL_ALLOC(ndr, r->out.rid);
7088 ZERO_STRUCTP(r->out.rid);
7090 if (flags & NDR_OUT) {
7091 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7092 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
7094 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7095 NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC);
7096 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
7097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
7098 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7099 NDR_PULL_ALLOC(ndr, r->out.rid);
7101 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7102 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
7103 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
7104 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
7105 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7107 return NDR_ERR_SUCCESS;
7110 _PUBLIC_ void ndr_print_samr_CreateDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomAlias *r)
7112 ndr_print_struct(ndr, name, "samr_CreateDomAlias");
7113 ndr->depth++;
7114 if (flags & NDR_SET_VALUES) {
7115 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7117 if (flags & NDR_IN) {
7118 ndr_print_struct(ndr, "in", "samr_CreateDomAlias");
7119 ndr->depth++;
7120 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7121 ndr->depth++;
7122 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7123 ndr->depth--;
7124 ndr_print_ptr(ndr, "alias_name", r->in.alias_name);
7125 ndr->depth++;
7126 ndr_print_lsa_String(ndr, "alias_name", r->in.alias_name);
7127 ndr->depth--;
7128 ndr_print_samr_AliasAccessMask(ndr, "access_mask", r->in.access_mask);
7129 ndr->depth--;
7131 if (flags & NDR_OUT) {
7132 ndr_print_struct(ndr, "out", "samr_CreateDomAlias");
7133 ndr->depth++;
7134 ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle);
7135 ndr->depth++;
7136 ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle);
7137 ndr->depth--;
7138 ndr_print_ptr(ndr, "rid", r->out.rid);
7139 ndr->depth++;
7140 ndr_print_uint32(ndr, "rid", *r->out.rid);
7141 ndr->depth--;
7142 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7143 ndr->depth--;
7145 ndr->depth--;
7148 static enum ndr_err_code ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, int flags, const struct samr_EnumDomainAliases *r)
7150 if (flags & NDR_IN) {
7151 if (r->in.domain_handle == NULL) {
7152 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7154 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7155 if (r->in.resume_handle == NULL) {
7156 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7158 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
7159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
7161 if (flags & NDR_OUT) {
7162 if (r->out.resume_handle == NULL) {
7163 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
7166 if (r->out.sam == NULL) {
7167 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7169 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
7170 if (*r->out.sam) {
7171 NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7173 if (r->out.num_entries == NULL) {
7174 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7176 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
7177 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7179 return NDR_ERR_SUCCESS;
7182 static enum ndr_err_code ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, int flags, struct samr_EnumDomainAliases *r)
7184 uint32_t _ptr_sam;
7185 TALLOC_CTX *_mem_save_domain_handle_0;
7186 TALLOC_CTX *_mem_save_resume_handle_0;
7187 TALLOC_CTX *_mem_save_sam_0;
7188 TALLOC_CTX *_mem_save_sam_1;
7189 TALLOC_CTX *_mem_save_num_entries_0;
7190 if (flags & NDR_IN) {
7191 ZERO_STRUCT(r->out);
7193 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7194 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7196 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7197 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7198 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7199 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7200 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7201 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7203 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7204 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7205 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
7206 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7207 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
7208 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7209 *r->out.resume_handle = *r->in.resume_handle;
7210 NDR_PULL_ALLOC(ndr, r->out.sam);
7211 ZERO_STRUCTP(r->out.sam);
7212 NDR_PULL_ALLOC(ndr, r->out.num_entries);
7213 ZERO_STRUCTP(r->out.num_entries);
7215 if (flags & NDR_OUT) {
7216 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7217 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7219 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7220 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7221 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7222 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7223 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7224 NDR_PULL_ALLOC(ndr, r->out.sam);
7226 _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
7227 NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
7228 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
7229 if (_ptr_sam) {
7230 NDR_PULL_ALLOC(ndr, *r->out.sam);
7231 } else {
7232 *r->out.sam = NULL;
7234 if (*r->out.sam) {
7235 _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
7236 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
7237 NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
7240 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
7241 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7242 NDR_PULL_ALLOC(ndr, r->out.num_entries);
7244 _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
7245 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
7246 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
7247 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
7248 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7250 return NDR_ERR_SUCCESS;
7253 _PUBLIC_ void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainAliases *r)
7255 ndr_print_struct(ndr, name, "samr_EnumDomainAliases");
7256 ndr->depth++;
7257 if (flags & NDR_SET_VALUES) {
7258 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7260 if (flags & NDR_IN) {
7261 ndr_print_struct(ndr, "in", "samr_EnumDomainAliases");
7262 ndr->depth++;
7263 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7264 ndr->depth++;
7265 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7266 ndr->depth--;
7267 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7268 ndr->depth++;
7269 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7270 ndr->depth--;
7271 ndr_print_uint32(ndr, "max_size", r->in.max_size);
7272 ndr->depth--;
7274 if (flags & NDR_OUT) {
7275 ndr_print_struct(ndr, "out", "samr_EnumDomainAliases");
7276 ndr->depth++;
7277 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7278 ndr->depth++;
7279 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7280 ndr->depth--;
7281 ndr_print_ptr(ndr, "sam", r->out.sam);
7282 ndr->depth++;
7283 ndr_print_ptr(ndr, "sam", *r->out.sam);
7284 ndr->depth++;
7285 if (*r->out.sam) {
7286 ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
7288 ndr->depth--;
7289 ndr->depth--;
7290 ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
7291 ndr->depth++;
7292 ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
7293 ndr->depth--;
7294 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7295 ndr->depth--;
7297 ndr->depth--;
7300 static enum ndr_err_code ndr_push_samr_GetAliasMembership(struct ndr_push *ndr, int flags, const struct samr_GetAliasMembership *r)
7302 if (flags & NDR_IN) {
7303 if (r->in.domain_handle == NULL) {
7304 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7306 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7307 if (r->in.sids == NULL) {
7308 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7310 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
7312 if (flags & NDR_OUT) {
7313 if (r->out.rids == NULL) {
7314 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7316 NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
7317 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7319 return NDR_ERR_SUCCESS;
7322 static enum ndr_err_code ndr_pull_samr_GetAliasMembership(struct ndr_pull *ndr, int flags, struct samr_GetAliasMembership *r)
7324 TALLOC_CTX *_mem_save_domain_handle_0;
7325 TALLOC_CTX *_mem_save_sids_0;
7326 TALLOC_CTX *_mem_save_rids_0;
7327 if (flags & NDR_IN) {
7328 ZERO_STRUCT(r->out);
7330 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7331 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7333 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7334 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7335 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7337 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7338 NDR_PULL_ALLOC(ndr, r->in.sids);
7340 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
7341 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
7342 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
7343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
7344 NDR_PULL_ALLOC(ndr, r->out.rids);
7345 ZERO_STRUCTP(r->out.rids);
7347 if (flags & NDR_OUT) {
7348 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7349 NDR_PULL_ALLOC(ndr, r->out.rids);
7351 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
7352 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
7353 NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
7354 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
7355 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7357 return NDR_ERR_SUCCESS;
7360 _PUBLIC_ void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetAliasMembership *r)
7362 ndr_print_struct(ndr, name, "samr_GetAliasMembership");
7363 ndr->depth++;
7364 if (flags & NDR_SET_VALUES) {
7365 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7367 if (flags & NDR_IN) {
7368 ndr_print_struct(ndr, "in", "samr_GetAliasMembership");
7369 ndr->depth++;
7370 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7371 ndr->depth++;
7372 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7373 ndr->depth--;
7374 ndr_print_ptr(ndr, "sids", r->in.sids);
7375 ndr->depth++;
7376 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
7377 ndr->depth--;
7378 ndr->depth--;
7380 if (flags & NDR_OUT) {
7381 ndr_print_struct(ndr, "out", "samr_GetAliasMembership");
7382 ndr->depth++;
7383 ndr_print_ptr(ndr, "rids", r->out.rids);
7384 ndr->depth++;
7385 ndr_print_samr_Ids(ndr, "rids", r->out.rids);
7386 ndr->depth--;
7387 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7388 ndr->depth--;
7390 ndr->depth--;
7393 _PUBLIC_ enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int flags, const struct samr_LookupNames *r)
7395 uint32_t cntr_names_0;
7396 if (flags & NDR_IN) {
7397 if (r->in.domain_handle == NULL) {
7398 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7400 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
7402 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1000));
7403 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7404 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
7405 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
7406 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
7408 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
7409 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
7412 if (flags & NDR_OUT) {
7413 if (r->out.rids == NULL) {
7414 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7416 NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
7417 if (r->out.types == NULL) {
7418 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7420 NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
7421 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7423 return NDR_ERR_SUCCESS;
7426 _PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r)
7428 uint32_t cntr_names_0;
7429 TALLOC_CTX *_mem_save_domain_handle_0;
7430 TALLOC_CTX *_mem_save_names_0;
7431 TALLOC_CTX *_mem_save_rids_0;
7432 TALLOC_CTX *_mem_save_types_0;
7433 if (flags & NDR_IN) {
7434 ZERO_STRUCT(r->out);
7436 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7437 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7439 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7440 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7441 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7442 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7443 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
7444 if (r->in.num_names > 1000) {
7445 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7447 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
7448 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.names));
7449 if (ndr_get_array_length(ndr, &r->in.names) > ndr_get_array_size(ndr, &r->in.names)) {
7450 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));
7452 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
7453 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
7454 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
7455 for (cntr_names_0 = 0; cntr_names_0 < ndr_get_array_length(ndr, &r->in.names); cntr_names_0++) {
7456 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
7458 for (cntr_names_0 = 0; cntr_names_0 < ndr_get_array_length(ndr, &r->in.names); cntr_names_0++) {
7459 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
7461 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
7462 NDR_PULL_ALLOC(ndr, r->out.rids);
7463 ZERO_STRUCTP(r->out.rids);
7464 NDR_PULL_ALLOC(ndr, r->out.types);
7465 ZERO_STRUCTP(r->out.types);
7466 if (r->in.names) {
7467 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, 1000));
7469 if (r->in.names) {
7470 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.names, r->in.num_names));
7473 if (flags & NDR_OUT) {
7474 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7475 NDR_PULL_ALLOC(ndr, r->out.rids);
7477 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
7478 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
7479 NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
7480 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
7481 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7482 NDR_PULL_ALLOC(ndr, r->out.types);
7484 _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
7485 NDR_PULL_SET_MEM_CTX(ndr, r->out.types, LIBNDR_FLAG_REF_ALLOC);
7486 NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
7487 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, LIBNDR_FLAG_REF_ALLOC);
7488 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7490 return NDR_ERR_SUCCESS;
7493 _PUBLIC_ void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupNames *r)
7495 uint32_t cntr_names_0;
7496 ndr_print_struct(ndr, name, "samr_LookupNames");
7497 ndr->depth++;
7498 if (flags & NDR_SET_VALUES) {
7499 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7501 if (flags & NDR_IN) {
7502 ndr_print_struct(ndr, "in", "samr_LookupNames");
7503 ndr->depth++;
7504 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7505 ndr->depth++;
7506 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7507 ndr->depth--;
7508 ndr_print_uint32(ndr, "num_names", r->in.num_names);
7509 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
7510 ndr->depth++;
7511 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
7512 char *idx_0=NULL;
7513 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
7514 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
7515 free(idx_0);
7518 ndr->depth--;
7519 ndr->depth--;
7521 if (flags & NDR_OUT) {
7522 ndr_print_struct(ndr, "out", "samr_LookupNames");
7523 ndr->depth++;
7524 ndr_print_ptr(ndr, "rids", r->out.rids);
7525 ndr->depth++;
7526 ndr_print_samr_Ids(ndr, "rids", r->out.rids);
7527 ndr->depth--;
7528 ndr_print_ptr(ndr, "types", r->out.types);
7529 ndr->depth++;
7530 ndr_print_samr_Ids(ndr, "types", r->out.types);
7531 ndr->depth--;
7532 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7533 ndr->depth--;
7535 ndr->depth--;
7538 static enum ndr_err_code ndr_push_samr_LookupRids(struct ndr_push *ndr, int flags, const struct samr_LookupRids *r)
7540 uint32_t cntr_rids_0;
7541 if (flags & NDR_IN) {
7542 if (r->in.domain_handle == NULL) {
7543 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7545 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7546 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_rids));
7547 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1000));
7548 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7549 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_rids));
7550 for (cntr_rids_0 = 0; cntr_rids_0 < r->in.num_rids; cntr_rids_0++) {
7551 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rids[cntr_rids_0]));
7554 if (flags & NDR_OUT) {
7555 if (r->out.names == NULL) {
7556 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7558 NDR_CHECK(ndr_push_lsa_Strings(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
7559 if (r->out.types == NULL) {
7560 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7562 NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
7563 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7565 return NDR_ERR_SUCCESS;
7568 static enum ndr_err_code ndr_pull_samr_LookupRids(struct ndr_pull *ndr, int flags, struct samr_LookupRids *r)
7570 uint32_t cntr_rids_0;
7571 TALLOC_CTX *_mem_save_domain_handle_0;
7572 TALLOC_CTX *_mem_save_rids_0;
7573 TALLOC_CTX *_mem_save_names_0;
7574 TALLOC_CTX *_mem_save_types_0;
7575 if (flags & NDR_IN) {
7576 ZERO_STRUCT(r->out);
7578 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7579 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7581 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7582 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7583 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7584 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7585 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_rids));
7586 if (r->in.num_rids > 1000) {
7587 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7589 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rids));
7590 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rids));
7591 if (ndr_get_array_length(ndr, &r->in.rids) > ndr_get_array_size(ndr, &r->in.rids)) {
7592 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));
7594 NDR_PULL_ALLOC_N(ndr, r->in.rids, ndr_get_array_size(ndr, &r->in.rids));
7595 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
7596 NDR_PULL_SET_MEM_CTX(ndr, r->in.rids, 0);
7597 for (cntr_rids_0 = 0; cntr_rids_0 < ndr_get_array_length(ndr, &r->in.rids); cntr_rids_0++) {
7598 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rids[cntr_rids_0]));
7600 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
7601 NDR_PULL_ALLOC(ndr, r->out.names);
7602 ZERO_STRUCTP(r->out.names);
7603 NDR_PULL_ALLOC(ndr, r->out.types);
7604 ZERO_STRUCTP(r->out.types);
7605 if (r->in.rids) {
7606 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.rids, 1000));
7608 if (r->in.rids) {
7609 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.rids, r->in.num_rids));
7612 if (flags & NDR_OUT) {
7613 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7614 NDR_PULL_ALLOC(ndr, r->out.names);
7616 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
7617 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
7618 NDR_CHECK(ndr_pull_lsa_Strings(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
7619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
7620 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7621 NDR_PULL_ALLOC(ndr, r->out.types);
7623 _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
7624 NDR_PULL_SET_MEM_CTX(ndr, r->out.types, LIBNDR_FLAG_REF_ALLOC);
7625 NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
7626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, LIBNDR_FLAG_REF_ALLOC);
7627 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7629 return NDR_ERR_SUCCESS;
7632 _PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupRids *r)
7634 uint32_t cntr_rids_0;
7635 ndr_print_struct(ndr, name, "samr_LookupRids");
7636 ndr->depth++;
7637 if (flags & NDR_SET_VALUES) {
7638 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7640 if (flags & NDR_IN) {
7641 ndr_print_struct(ndr, "in", "samr_LookupRids");
7642 ndr->depth++;
7643 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7644 ndr->depth++;
7645 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7646 ndr->depth--;
7647 ndr_print_uint32(ndr, "num_rids", r->in.num_rids);
7648 ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->in.num_rids);
7649 ndr->depth++;
7650 for (cntr_rids_0=0;cntr_rids_0<r->in.num_rids;cntr_rids_0++) {
7651 char *idx_0=NULL;
7652 if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
7653 ndr_print_uint32(ndr, "rids", r->in.rids[cntr_rids_0]);
7654 free(idx_0);
7657 ndr->depth--;
7658 ndr->depth--;
7660 if (flags & NDR_OUT) {
7661 ndr_print_struct(ndr, "out", "samr_LookupRids");
7662 ndr->depth++;
7663 ndr_print_ptr(ndr, "names", r->out.names);
7664 ndr->depth++;
7665 ndr_print_lsa_Strings(ndr, "names", r->out.names);
7666 ndr->depth--;
7667 ndr_print_ptr(ndr, "types", r->out.types);
7668 ndr->depth++;
7669 ndr_print_samr_Ids(ndr, "types", r->out.types);
7670 ndr->depth--;
7671 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7672 ndr->depth--;
7674 ndr->depth--;
7677 static enum ndr_err_code ndr_push_samr_OpenGroup(struct ndr_push *ndr, int flags, const struct samr_OpenGroup *r)
7679 if (flags & NDR_IN) {
7680 if (r->in.domain_handle == NULL) {
7681 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7683 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7684 NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
7687 if (flags & NDR_OUT) {
7688 if (r->out.group_handle == NULL) {
7689 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7691 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
7692 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7694 return NDR_ERR_SUCCESS;
7697 static enum ndr_err_code ndr_pull_samr_OpenGroup(struct ndr_pull *ndr, int flags, struct samr_OpenGroup *r)
7699 TALLOC_CTX *_mem_save_domain_handle_0;
7700 TALLOC_CTX *_mem_save_group_handle_0;
7701 if (flags & NDR_IN) {
7702 ZERO_STRUCT(r->out);
7704 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7705 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7707 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7708 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7709 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7710 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7711 NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7712 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
7713 NDR_PULL_ALLOC(ndr, r->out.group_handle);
7714 ZERO_STRUCTP(r->out.group_handle);
7716 if (flags & NDR_OUT) {
7717 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7718 NDR_PULL_ALLOC(ndr, r->out.group_handle);
7720 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7721 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC);
7722 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
7723 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
7724 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7726 return NDR_ERR_SUCCESS;
7729 _PUBLIC_ void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenGroup *r)
7731 ndr_print_struct(ndr, name, "samr_OpenGroup");
7732 ndr->depth++;
7733 if (flags & NDR_SET_VALUES) {
7734 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7736 if (flags & NDR_IN) {
7737 ndr_print_struct(ndr, "in", "samr_OpenGroup");
7738 ndr->depth++;
7739 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7740 ndr->depth++;
7741 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7742 ndr->depth--;
7743 ndr_print_samr_GroupAccessMask(ndr, "access_mask", r->in.access_mask);
7744 ndr_print_uint32(ndr, "rid", r->in.rid);
7745 ndr->depth--;
7747 if (flags & NDR_OUT) {
7748 ndr_print_struct(ndr, "out", "samr_OpenGroup");
7749 ndr->depth++;
7750 ndr_print_ptr(ndr, "group_handle", r->out.group_handle);
7751 ndr->depth++;
7752 ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle);
7753 ndr->depth--;
7754 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7755 ndr->depth--;
7757 ndr->depth--;
7760 static enum ndr_err_code ndr_push_samr_QueryGroupInfo(struct ndr_push *ndr, int flags, const struct samr_QueryGroupInfo *r)
7762 if (flags & NDR_IN) {
7763 if (r->in.group_handle == NULL) {
7764 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7766 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7767 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, r->in.level));
7769 if (flags & NDR_OUT) {
7770 if (r->out.info == NULL) {
7771 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7773 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
7774 if (*r->out.info) {
7775 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
7776 NDR_CHECK(ndr_push_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7778 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7780 return NDR_ERR_SUCCESS;
7783 static enum ndr_err_code ndr_pull_samr_QueryGroupInfo(struct ndr_pull *ndr, int flags, struct samr_QueryGroupInfo *r)
7785 uint32_t _ptr_info;
7786 TALLOC_CTX *_mem_save_group_handle_0;
7787 TALLOC_CTX *_mem_save_info_0;
7788 TALLOC_CTX *_mem_save_info_1;
7789 if (flags & NDR_IN) {
7790 ZERO_STRUCT(r->out);
7792 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7793 NDR_PULL_ALLOC(ndr, r->in.group_handle);
7795 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7796 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
7797 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7798 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
7799 NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7800 NDR_PULL_ALLOC(ndr, r->out.info);
7801 ZERO_STRUCTP(r->out.info);
7803 if (flags & NDR_OUT) {
7804 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7805 NDR_PULL_ALLOC(ndr, r->out.info);
7807 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7808 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
7809 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
7810 if (_ptr_info) {
7811 NDR_PULL_ALLOC(ndr, *r->out.info);
7812 } else {
7813 *r->out.info = NULL;
7815 if (*r->out.info) {
7816 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
7817 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
7818 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
7819 NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7820 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
7822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7823 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7825 return NDR_ERR_SUCCESS;
7828 _PUBLIC_ void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupInfo *r)
7830 ndr_print_struct(ndr, name, "samr_QueryGroupInfo");
7831 ndr->depth++;
7832 if (flags & NDR_SET_VALUES) {
7833 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7835 if (flags & NDR_IN) {
7836 ndr_print_struct(ndr, "in", "samr_QueryGroupInfo");
7837 ndr->depth++;
7838 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
7839 ndr->depth++;
7840 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
7841 ndr->depth--;
7842 ndr_print_samr_GroupInfoEnum(ndr, "level", r->in.level);
7843 ndr->depth--;
7845 if (flags & NDR_OUT) {
7846 ndr_print_struct(ndr, "out", "samr_QueryGroupInfo");
7847 ndr->depth++;
7848 ndr_print_ptr(ndr, "info", r->out.info);
7849 ndr->depth++;
7850 ndr_print_ptr(ndr, "info", *r->out.info);
7851 ndr->depth++;
7852 if (*r->out.info) {
7853 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
7854 ndr_print_samr_GroupInfo(ndr, "info", *r->out.info);
7856 ndr->depth--;
7857 ndr->depth--;
7858 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7859 ndr->depth--;
7861 ndr->depth--;
7864 static enum ndr_err_code ndr_push_samr_SetGroupInfo(struct ndr_push *ndr, int flags, const struct samr_SetGroupInfo *r)
7866 if (flags & NDR_IN) {
7867 if (r->in.group_handle == NULL) {
7868 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7870 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7871 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, r->in.level));
7872 if (r->in.info == NULL) {
7873 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7875 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
7876 NDR_CHECK(ndr_push_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7878 if (flags & NDR_OUT) {
7879 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7881 return NDR_ERR_SUCCESS;
7884 static enum ndr_err_code ndr_pull_samr_SetGroupInfo(struct ndr_pull *ndr, int flags, struct samr_SetGroupInfo *r)
7886 TALLOC_CTX *_mem_save_group_handle_0;
7887 TALLOC_CTX *_mem_save_info_0;
7888 if (flags & NDR_IN) {
7889 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7890 NDR_PULL_ALLOC(ndr, r->in.group_handle);
7892 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7893 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
7894 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7895 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
7896 NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7897 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7898 NDR_PULL_ALLOC(ndr, r->in.info);
7900 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7901 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
7902 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
7903 NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7906 if (flags & NDR_OUT) {
7907 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7909 return NDR_ERR_SUCCESS;
7912 _PUBLIC_ void ndr_print_samr_SetGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetGroupInfo *r)
7914 ndr_print_struct(ndr, name, "samr_SetGroupInfo");
7915 ndr->depth++;
7916 if (flags & NDR_SET_VALUES) {
7917 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7919 if (flags & NDR_IN) {
7920 ndr_print_struct(ndr, "in", "samr_SetGroupInfo");
7921 ndr->depth++;
7922 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
7923 ndr->depth++;
7924 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
7925 ndr->depth--;
7926 ndr_print_samr_GroupInfoEnum(ndr, "level", r->in.level);
7927 ndr_print_ptr(ndr, "info", r->in.info);
7928 ndr->depth++;
7929 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
7930 ndr_print_samr_GroupInfo(ndr, "info", r->in.info);
7931 ndr->depth--;
7932 ndr->depth--;
7934 if (flags & NDR_OUT) {
7935 ndr_print_struct(ndr, "out", "samr_SetGroupInfo");
7936 ndr->depth++;
7937 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7938 ndr->depth--;
7940 ndr->depth--;
7943 static enum ndr_err_code ndr_push_samr_AddGroupMember(struct ndr_push *ndr, int flags, const struct samr_AddGroupMember *r)
7945 if (flags & NDR_IN) {
7946 if (r->in.group_handle == NULL) {
7947 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7949 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7950 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
7951 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
7953 if (flags & NDR_OUT) {
7954 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7956 return NDR_ERR_SUCCESS;
7959 static enum ndr_err_code ndr_pull_samr_AddGroupMember(struct ndr_pull *ndr, int flags, struct samr_AddGroupMember *r)
7961 TALLOC_CTX *_mem_save_group_handle_0;
7962 if (flags & NDR_IN) {
7963 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7964 NDR_PULL_ALLOC(ndr, r->in.group_handle);
7966 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7967 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
7968 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
7969 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
7970 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
7971 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
7973 if (flags & NDR_OUT) {
7974 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7976 return NDR_ERR_SUCCESS;
7979 _PUBLIC_ void ndr_print_samr_AddGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddGroupMember *r)
7981 ndr_print_struct(ndr, name, "samr_AddGroupMember");
7982 ndr->depth++;
7983 if (flags & NDR_SET_VALUES) {
7984 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7986 if (flags & NDR_IN) {
7987 ndr_print_struct(ndr, "in", "samr_AddGroupMember");
7988 ndr->depth++;
7989 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
7990 ndr->depth++;
7991 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
7992 ndr->depth--;
7993 ndr_print_uint32(ndr, "rid", r->in.rid);
7994 ndr_print_uint32(ndr, "flags", r->in.flags);
7995 ndr->depth--;
7997 if (flags & NDR_OUT) {
7998 ndr_print_struct(ndr, "out", "samr_AddGroupMember");
7999 ndr->depth++;
8000 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8001 ndr->depth--;
8003 ndr->depth--;
8006 static enum ndr_err_code ndr_push_samr_DeleteDomainGroup(struct ndr_push *ndr, int flags, const struct samr_DeleteDomainGroup *r)
8008 if (flags & NDR_IN) {
8009 if (r->in.group_handle == NULL) {
8010 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8012 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8014 if (flags & NDR_OUT) {
8015 if (r->out.group_handle == NULL) {
8016 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8018 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
8019 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8021 return NDR_ERR_SUCCESS;
8024 static enum ndr_err_code ndr_pull_samr_DeleteDomainGroup(struct ndr_pull *ndr, int flags, struct samr_DeleteDomainGroup *r)
8026 TALLOC_CTX *_mem_save_group_handle_0;
8027 if (flags & NDR_IN) {
8028 ZERO_STRUCT(r->out);
8030 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8031 NDR_PULL_ALLOC(ndr, r->in.group_handle);
8033 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8034 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8035 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8036 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8037 NDR_PULL_ALLOC(ndr, r->out.group_handle);
8038 *r->out.group_handle = *r->in.group_handle;
8040 if (flags & NDR_OUT) {
8041 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8042 NDR_PULL_ALLOC(ndr, r->out.group_handle);
8044 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8045 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC);
8046 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
8047 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8048 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8050 return NDR_ERR_SUCCESS;
8053 _PUBLIC_ void ndr_print_samr_DeleteDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomainGroup *r)
8055 ndr_print_struct(ndr, name, "samr_DeleteDomainGroup");
8056 ndr->depth++;
8057 if (flags & NDR_SET_VALUES) {
8058 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8060 if (flags & NDR_IN) {
8061 ndr_print_struct(ndr, "in", "samr_DeleteDomainGroup");
8062 ndr->depth++;
8063 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8064 ndr->depth++;
8065 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8066 ndr->depth--;
8067 ndr->depth--;
8069 if (flags & NDR_OUT) {
8070 ndr_print_struct(ndr, "out", "samr_DeleteDomainGroup");
8071 ndr->depth++;
8072 ndr_print_ptr(ndr, "group_handle", r->out.group_handle);
8073 ndr->depth++;
8074 ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle);
8075 ndr->depth--;
8076 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8077 ndr->depth--;
8079 ndr->depth--;
8082 static enum ndr_err_code ndr_push_samr_DeleteGroupMember(struct ndr_push *ndr, int flags, const struct samr_DeleteGroupMember *r)
8084 if (flags & NDR_IN) {
8085 if (r->in.group_handle == NULL) {
8086 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8088 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8089 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
8091 if (flags & NDR_OUT) {
8092 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8094 return NDR_ERR_SUCCESS;
8097 static enum ndr_err_code ndr_pull_samr_DeleteGroupMember(struct ndr_pull *ndr, int flags, struct samr_DeleteGroupMember *r)
8099 TALLOC_CTX *_mem_save_group_handle_0;
8100 if (flags & NDR_IN) {
8101 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8102 NDR_PULL_ALLOC(ndr, r->in.group_handle);
8104 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8105 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8106 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8108 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8110 if (flags & NDR_OUT) {
8111 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8113 return NDR_ERR_SUCCESS;
8116 _PUBLIC_ void ndr_print_samr_DeleteGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteGroupMember *r)
8118 ndr_print_struct(ndr, name, "samr_DeleteGroupMember");
8119 ndr->depth++;
8120 if (flags & NDR_SET_VALUES) {
8121 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8123 if (flags & NDR_IN) {
8124 ndr_print_struct(ndr, "in", "samr_DeleteGroupMember");
8125 ndr->depth++;
8126 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8127 ndr->depth++;
8128 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8129 ndr->depth--;
8130 ndr_print_uint32(ndr, "rid", r->in.rid);
8131 ndr->depth--;
8133 if (flags & NDR_OUT) {
8134 ndr_print_struct(ndr, "out", "samr_DeleteGroupMember");
8135 ndr->depth++;
8136 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8137 ndr->depth--;
8139 ndr->depth--;
8142 static enum ndr_err_code ndr_push_samr_QueryGroupMember(struct ndr_push *ndr, int flags, const struct samr_QueryGroupMember *r)
8144 if (flags & NDR_IN) {
8145 if (r->in.group_handle == NULL) {
8146 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8148 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8150 if (flags & NDR_OUT) {
8151 if (r->out.rids == NULL) {
8152 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8154 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rids));
8155 if (*r->out.rids) {
8156 NDR_CHECK(ndr_push_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
8158 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8160 return NDR_ERR_SUCCESS;
8163 static enum ndr_err_code ndr_pull_samr_QueryGroupMember(struct ndr_pull *ndr, int flags, struct samr_QueryGroupMember *r)
8165 uint32_t _ptr_rids;
8166 TALLOC_CTX *_mem_save_group_handle_0;
8167 TALLOC_CTX *_mem_save_rids_0;
8168 TALLOC_CTX *_mem_save_rids_1;
8169 if (flags & NDR_IN) {
8170 ZERO_STRUCT(r->out);
8172 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8173 NDR_PULL_ALLOC(ndr, r->in.group_handle);
8175 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8176 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8177 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8178 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8179 NDR_PULL_ALLOC(ndr, r->out.rids);
8180 ZERO_STRUCTP(r->out.rids);
8182 if (flags & NDR_OUT) {
8183 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8184 NDR_PULL_ALLOC(ndr, r->out.rids);
8186 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8187 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
8188 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
8189 if (_ptr_rids) {
8190 NDR_PULL_ALLOC(ndr, *r->out.rids);
8191 } else {
8192 *r->out.rids = NULL;
8194 if (*r->out.rids) {
8195 _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
8196 NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, 0);
8197 NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
8198 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
8200 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
8201 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8203 return NDR_ERR_SUCCESS;
8206 _PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupMember *r)
8208 ndr_print_struct(ndr, name, "samr_QueryGroupMember");
8209 ndr->depth++;
8210 if (flags & NDR_SET_VALUES) {
8211 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8213 if (flags & NDR_IN) {
8214 ndr_print_struct(ndr, "in", "samr_QueryGroupMember");
8215 ndr->depth++;
8216 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8217 ndr->depth++;
8218 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8219 ndr->depth--;
8220 ndr->depth--;
8222 if (flags & NDR_OUT) {
8223 ndr_print_struct(ndr, "out", "samr_QueryGroupMember");
8224 ndr->depth++;
8225 ndr_print_ptr(ndr, "rids", r->out.rids);
8226 ndr->depth++;
8227 ndr_print_ptr(ndr, "rids", *r->out.rids);
8228 ndr->depth++;
8229 if (*r->out.rids) {
8230 ndr_print_samr_RidTypeArray(ndr, "rids", *r->out.rids);
8232 ndr->depth--;
8233 ndr->depth--;
8234 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8235 ndr->depth--;
8237 ndr->depth--;
8240 static enum ndr_err_code ndr_push_samr_SetMemberAttributesOfGroup(struct ndr_push *ndr, int flags, const struct samr_SetMemberAttributesOfGroup *r)
8242 if (flags & NDR_IN) {
8243 if (r->in.group_handle == NULL) {
8244 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8246 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8247 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
8248 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
8250 if (flags & NDR_OUT) {
8251 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8253 return NDR_ERR_SUCCESS;
8256 static enum ndr_err_code ndr_pull_samr_SetMemberAttributesOfGroup(struct ndr_pull *ndr, int flags, struct samr_SetMemberAttributesOfGroup *r)
8258 TALLOC_CTX *_mem_save_group_handle_0;
8259 if (flags & NDR_IN) {
8260 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8261 NDR_PULL_ALLOC(ndr, r->in.group_handle);
8263 _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8264 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8265 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8266 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8267 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
8268 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
8270 if (flags & NDR_OUT) {
8271 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8273 return NDR_ERR_SUCCESS;
8276 _PUBLIC_ void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetMemberAttributesOfGroup *r)
8278 ndr_print_struct(ndr, name, "samr_SetMemberAttributesOfGroup");
8279 ndr->depth++;
8280 if (flags & NDR_SET_VALUES) {
8281 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8283 if (flags & NDR_IN) {
8284 ndr_print_struct(ndr, "in", "samr_SetMemberAttributesOfGroup");
8285 ndr->depth++;
8286 ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8287 ndr->depth++;
8288 ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8289 ndr->depth--;
8290 ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
8291 ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
8292 ndr->depth--;
8294 if (flags & NDR_OUT) {
8295 ndr_print_struct(ndr, "out", "samr_SetMemberAttributesOfGroup");
8296 ndr->depth++;
8297 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8298 ndr->depth--;
8300 ndr->depth--;
8303 static enum ndr_err_code ndr_push_samr_OpenAlias(struct ndr_push *ndr, int flags, const struct samr_OpenAlias *r)
8305 if (flags & NDR_IN) {
8306 if (r->in.domain_handle == NULL) {
8307 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8309 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8310 NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
8311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
8313 if (flags & NDR_OUT) {
8314 if (r->out.alias_handle == NULL) {
8315 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8317 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
8318 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8320 return NDR_ERR_SUCCESS;
8323 static enum ndr_err_code ndr_pull_samr_OpenAlias(struct ndr_pull *ndr, int flags, struct samr_OpenAlias *r)
8325 TALLOC_CTX *_mem_save_domain_handle_0;
8326 TALLOC_CTX *_mem_save_alias_handle_0;
8327 if (flags & NDR_IN) {
8328 ZERO_STRUCT(r->out);
8330 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8331 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8333 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8334 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
8335 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
8337 NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
8338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8339 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
8340 ZERO_STRUCTP(r->out.alias_handle);
8342 if (flags & NDR_OUT) {
8343 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8344 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
8346 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8347 NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8348 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
8349 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8350 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8352 return NDR_ERR_SUCCESS;
8355 _PUBLIC_ void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenAlias *r)
8357 ndr_print_struct(ndr, name, "samr_OpenAlias");
8358 ndr->depth++;
8359 if (flags & NDR_SET_VALUES) {
8360 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8362 if (flags & NDR_IN) {
8363 ndr_print_struct(ndr, "in", "samr_OpenAlias");
8364 ndr->depth++;
8365 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
8366 ndr->depth++;
8367 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
8368 ndr->depth--;
8369 ndr_print_samr_AliasAccessMask(ndr, "access_mask", r->in.access_mask);
8370 ndr_print_uint32(ndr, "rid", r->in.rid);
8371 ndr->depth--;
8373 if (flags & NDR_OUT) {
8374 ndr_print_struct(ndr, "out", "samr_OpenAlias");
8375 ndr->depth++;
8376 ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle);
8377 ndr->depth++;
8378 ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle);
8379 ndr->depth--;
8380 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8381 ndr->depth--;
8383 ndr->depth--;
8386 static enum ndr_err_code ndr_push_samr_QueryAliasInfo(struct ndr_push *ndr, int flags, const struct samr_QueryAliasInfo *r)
8388 if (flags & NDR_IN) {
8389 if (r->in.alias_handle == NULL) {
8390 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8392 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8393 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, r->in.level));
8395 if (flags & NDR_OUT) {
8396 if (r->out.info == NULL) {
8397 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8399 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
8400 if (*r->out.info) {
8401 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
8402 NDR_CHECK(ndr_push_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
8404 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8406 return NDR_ERR_SUCCESS;
8409 static enum ndr_err_code ndr_pull_samr_QueryAliasInfo(struct ndr_pull *ndr, int flags, struct samr_QueryAliasInfo *r)
8411 uint32_t _ptr_info;
8412 TALLOC_CTX *_mem_save_alias_handle_0;
8413 TALLOC_CTX *_mem_save_info_0;
8414 TALLOC_CTX *_mem_save_info_1;
8415 if (flags & NDR_IN) {
8416 ZERO_STRUCT(r->out);
8418 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8419 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8421 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8422 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8423 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8424 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8425 NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr, NDR_SCALARS, &r->in.level));
8426 NDR_PULL_ALLOC(ndr, r->out.info);
8427 ZERO_STRUCTP(r->out.info);
8429 if (flags & NDR_OUT) {
8430 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8431 NDR_PULL_ALLOC(ndr, r->out.info);
8433 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8434 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
8435 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
8436 if (_ptr_info) {
8437 NDR_PULL_ALLOC(ndr, *r->out.info);
8438 } else {
8439 *r->out.info = NULL;
8441 if (*r->out.info) {
8442 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
8443 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
8444 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
8445 NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
8446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
8448 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
8449 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8451 return NDR_ERR_SUCCESS;
8454 _PUBLIC_ void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryAliasInfo *r)
8456 ndr_print_struct(ndr, name, "samr_QueryAliasInfo");
8457 ndr->depth++;
8458 if (flags & NDR_SET_VALUES) {
8459 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8461 if (flags & NDR_IN) {
8462 ndr_print_struct(ndr, "in", "samr_QueryAliasInfo");
8463 ndr->depth++;
8464 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8465 ndr->depth++;
8466 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8467 ndr->depth--;
8468 ndr_print_samr_AliasInfoEnum(ndr, "level", r->in.level);
8469 ndr->depth--;
8471 if (flags & NDR_OUT) {
8472 ndr_print_struct(ndr, "out", "samr_QueryAliasInfo");
8473 ndr->depth++;
8474 ndr_print_ptr(ndr, "info", r->out.info);
8475 ndr->depth++;
8476 ndr_print_ptr(ndr, "info", *r->out.info);
8477 ndr->depth++;
8478 if (*r->out.info) {
8479 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
8480 ndr_print_samr_AliasInfo(ndr, "info", *r->out.info);
8482 ndr->depth--;
8483 ndr->depth--;
8484 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8485 ndr->depth--;
8487 ndr->depth--;
8490 static enum ndr_err_code ndr_push_samr_SetAliasInfo(struct ndr_push *ndr, int flags, const struct samr_SetAliasInfo *r)
8492 if (flags & NDR_IN) {
8493 if (r->in.alias_handle == NULL) {
8494 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8496 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8497 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, r->in.level));
8498 if (r->in.info == NULL) {
8499 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8501 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
8502 NDR_CHECK(ndr_push_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
8504 if (flags & NDR_OUT) {
8505 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8507 return NDR_ERR_SUCCESS;
8510 static enum ndr_err_code ndr_pull_samr_SetAliasInfo(struct ndr_pull *ndr, int flags, struct samr_SetAliasInfo *r)
8512 TALLOC_CTX *_mem_save_alias_handle_0;
8513 TALLOC_CTX *_mem_save_info_0;
8514 if (flags & NDR_IN) {
8515 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8516 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8518 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8519 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8520 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8521 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8522 NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr, NDR_SCALARS, &r->in.level));
8523 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8524 NDR_PULL_ALLOC(ndr, r->in.info);
8526 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8527 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
8528 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
8529 NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
8530 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
8532 if (flags & NDR_OUT) {
8533 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8535 return NDR_ERR_SUCCESS;
8538 _PUBLIC_ void ndr_print_samr_SetAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetAliasInfo *r)
8540 ndr_print_struct(ndr, name, "samr_SetAliasInfo");
8541 ndr->depth++;
8542 if (flags & NDR_SET_VALUES) {
8543 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8545 if (flags & NDR_IN) {
8546 ndr_print_struct(ndr, "in", "samr_SetAliasInfo");
8547 ndr->depth++;
8548 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8549 ndr->depth++;
8550 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8551 ndr->depth--;
8552 ndr_print_samr_AliasInfoEnum(ndr, "level", r->in.level);
8553 ndr_print_ptr(ndr, "info", r->in.info);
8554 ndr->depth++;
8555 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
8556 ndr_print_samr_AliasInfo(ndr, "info", r->in.info);
8557 ndr->depth--;
8558 ndr->depth--;
8560 if (flags & NDR_OUT) {
8561 ndr_print_struct(ndr, "out", "samr_SetAliasInfo");
8562 ndr->depth++;
8563 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8564 ndr->depth--;
8566 ndr->depth--;
8569 static enum ndr_err_code ndr_push_samr_DeleteDomAlias(struct ndr_push *ndr, int flags, const struct samr_DeleteDomAlias *r)
8571 if (flags & NDR_IN) {
8572 if (r->in.alias_handle == NULL) {
8573 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8575 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8577 if (flags & NDR_OUT) {
8578 if (r->out.alias_handle == NULL) {
8579 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8581 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
8582 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8584 return NDR_ERR_SUCCESS;
8587 static enum ndr_err_code ndr_pull_samr_DeleteDomAlias(struct ndr_pull *ndr, int flags, struct samr_DeleteDomAlias *r)
8589 TALLOC_CTX *_mem_save_alias_handle_0;
8590 if (flags & NDR_IN) {
8591 ZERO_STRUCT(r->out);
8593 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8594 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8596 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8597 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8598 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8599 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8600 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
8601 *r->out.alias_handle = *r->in.alias_handle;
8603 if (flags & NDR_OUT) {
8604 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8605 NDR_PULL_ALLOC(ndr, r->out.alias_handle);
8607 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8608 NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8609 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
8610 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8611 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8613 return NDR_ERR_SUCCESS;
8616 _PUBLIC_ void ndr_print_samr_DeleteDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomAlias *r)
8618 ndr_print_struct(ndr, name, "samr_DeleteDomAlias");
8619 ndr->depth++;
8620 if (flags & NDR_SET_VALUES) {
8621 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8623 if (flags & NDR_IN) {
8624 ndr_print_struct(ndr, "in", "samr_DeleteDomAlias");
8625 ndr->depth++;
8626 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8627 ndr->depth++;
8628 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8629 ndr->depth--;
8630 ndr->depth--;
8632 if (flags & NDR_OUT) {
8633 ndr_print_struct(ndr, "out", "samr_DeleteDomAlias");
8634 ndr->depth++;
8635 ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle);
8636 ndr->depth++;
8637 ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle);
8638 ndr->depth--;
8639 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8640 ndr->depth--;
8642 ndr->depth--;
8645 static enum ndr_err_code ndr_push_samr_AddAliasMember(struct ndr_push *ndr, int flags, const struct samr_AddAliasMember *r)
8647 if (flags & NDR_IN) {
8648 if (r->in.alias_handle == NULL) {
8649 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8651 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8652 if (r->in.sid == NULL) {
8653 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8655 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8657 if (flags & NDR_OUT) {
8658 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8660 return NDR_ERR_SUCCESS;
8663 static enum ndr_err_code ndr_pull_samr_AddAliasMember(struct ndr_pull *ndr, int flags, struct samr_AddAliasMember *r)
8665 TALLOC_CTX *_mem_save_alias_handle_0;
8666 TALLOC_CTX *_mem_save_sid_0;
8667 if (flags & NDR_IN) {
8668 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8669 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8671 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8672 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8673 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8674 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8675 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8676 NDR_PULL_ALLOC(ndr, r->in.sid);
8678 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8679 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8680 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8681 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8683 if (flags & NDR_OUT) {
8684 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8686 return NDR_ERR_SUCCESS;
8689 _PUBLIC_ void ndr_print_samr_AddAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddAliasMember *r)
8691 ndr_print_struct(ndr, name, "samr_AddAliasMember");
8692 ndr->depth++;
8693 if (flags & NDR_SET_VALUES) {
8694 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8696 if (flags & NDR_IN) {
8697 ndr_print_struct(ndr, "in", "samr_AddAliasMember");
8698 ndr->depth++;
8699 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8700 ndr->depth++;
8701 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8702 ndr->depth--;
8703 ndr_print_ptr(ndr, "sid", r->in.sid);
8704 ndr->depth++;
8705 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8706 ndr->depth--;
8707 ndr->depth--;
8709 if (flags & NDR_OUT) {
8710 ndr_print_struct(ndr, "out", "samr_AddAliasMember");
8711 ndr->depth++;
8712 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8713 ndr->depth--;
8715 ndr->depth--;
8718 static enum ndr_err_code ndr_push_samr_DeleteAliasMember(struct ndr_push *ndr, int flags, const struct samr_DeleteAliasMember *r)
8720 if (flags & NDR_IN) {
8721 if (r->in.alias_handle == NULL) {
8722 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8724 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8725 if (r->in.sid == NULL) {
8726 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8728 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8730 if (flags & NDR_OUT) {
8731 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8733 return NDR_ERR_SUCCESS;
8736 static enum ndr_err_code ndr_pull_samr_DeleteAliasMember(struct ndr_pull *ndr, int flags, struct samr_DeleteAliasMember *r)
8738 TALLOC_CTX *_mem_save_alias_handle_0;
8739 TALLOC_CTX *_mem_save_sid_0;
8740 if (flags & NDR_IN) {
8741 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8742 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8744 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8745 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8746 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8747 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8748 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8749 NDR_PULL_ALLOC(ndr, r->in.sid);
8751 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8752 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8753 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8754 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8756 if (flags & NDR_OUT) {
8757 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8759 return NDR_ERR_SUCCESS;
8762 _PUBLIC_ void ndr_print_samr_DeleteAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteAliasMember *r)
8764 ndr_print_struct(ndr, name, "samr_DeleteAliasMember");
8765 ndr->depth++;
8766 if (flags & NDR_SET_VALUES) {
8767 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8769 if (flags & NDR_IN) {
8770 ndr_print_struct(ndr, "in", "samr_DeleteAliasMember");
8771 ndr->depth++;
8772 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8773 ndr->depth++;
8774 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8775 ndr->depth--;
8776 ndr_print_ptr(ndr, "sid", r->in.sid);
8777 ndr->depth++;
8778 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8779 ndr->depth--;
8780 ndr->depth--;
8782 if (flags & NDR_OUT) {
8783 ndr_print_struct(ndr, "out", "samr_DeleteAliasMember");
8784 ndr->depth++;
8785 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8786 ndr->depth--;
8788 ndr->depth--;
8791 static enum ndr_err_code ndr_push_samr_GetMembersInAlias(struct ndr_push *ndr, int flags, const struct samr_GetMembersInAlias *r)
8793 if (flags & NDR_IN) {
8794 if (r->in.alias_handle == NULL) {
8795 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8797 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8799 if (flags & NDR_OUT) {
8800 if (r->out.sids == NULL) {
8801 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8803 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8804 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8806 return NDR_ERR_SUCCESS;
8809 static enum ndr_err_code ndr_pull_samr_GetMembersInAlias(struct ndr_pull *ndr, int flags, struct samr_GetMembersInAlias *r)
8811 TALLOC_CTX *_mem_save_alias_handle_0;
8812 TALLOC_CTX *_mem_save_sids_0;
8813 if (flags & NDR_IN) {
8814 ZERO_STRUCT(r->out);
8816 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8817 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
8819 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8820 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
8821 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
8822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
8823 NDR_PULL_ALLOC(ndr, r->out.sids);
8824 ZERO_STRUCTP(r->out.sids);
8826 if (flags & NDR_OUT) {
8827 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8828 NDR_PULL_ALLOC(ndr, r->out.sids);
8830 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8831 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
8832 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8833 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
8834 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8836 return NDR_ERR_SUCCESS;
8839 _PUBLIC_ void ndr_print_samr_GetMembersInAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetMembersInAlias *r)
8841 ndr_print_struct(ndr, name, "samr_GetMembersInAlias");
8842 ndr->depth++;
8843 if (flags & NDR_SET_VALUES) {
8844 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8846 if (flags & NDR_IN) {
8847 ndr_print_struct(ndr, "in", "samr_GetMembersInAlias");
8848 ndr->depth++;
8849 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
8850 ndr->depth++;
8851 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
8852 ndr->depth--;
8853 ndr->depth--;
8855 if (flags & NDR_OUT) {
8856 ndr_print_struct(ndr, "out", "samr_GetMembersInAlias");
8857 ndr->depth++;
8858 ndr_print_ptr(ndr, "sids", r->out.sids);
8859 ndr->depth++;
8860 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
8861 ndr->depth--;
8862 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8863 ndr->depth--;
8865 ndr->depth--;
8868 _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenUser(struct ndr_push *ndr, int flags, const struct samr_OpenUser *r)
8870 if (flags & NDR_IN) {
8871 if (r->in.domain_handle == NULL) {
8872 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8874 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8875 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
8876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
8878 if (flags & NDR_OUT) {
8879 if (r->out.user_handle == NULL) {
8880 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8882 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
8883 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8885 return NDR_ERR_SUCCESS;
8888 _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenUser(struct ndr_pull *ndr, int flags, struct samr_OpenUser *r)
8890 TALLOC_CTX *_mem_save_domain_handle_0;
8891 TALLOC_CTX *_mem_save_user_handle_0;
8892 if (flags & NDR_IN) {
8893 ZERO_STRUCT(r->out);
8895 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8896 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8898 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8899 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
8900 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8901 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
8902 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
8903 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8904 NDR_PULL_ALLOC(ndr, r->out.user_handle);
8905 ZERO_STRUCTP(r->out.user_handle);
8907 if (flags & NDR_OUT) {
8908 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8909 NDR_PULL_ALLOC(ndr, r->out.user_handle);
8911 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8912 NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
8913 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
8914 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
8915 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8917 return NDR_ERR_SUCCESS;
8920 _PUBLIC_ void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenUser *r)
8922 ndr_print_struct(ndr, name, "samr_OpenUser");
8923 ndr->depth++;
8924 if (flags & NDR_SET_VALUES) {
8925 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8927 if (flags & NDR_IN) {
8928 ndr_print_struct(ndr, "in", "samr_OpenUser");
8929 ndr->depth++;
8930 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
8931 ndr->depth++;
8932 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
8933 ndr->depth--;
8934 ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask);
8935 ndr_print_uint32(ndr, "rid", r->in.rid);
8936 ndr->depth--;
8938 if (flags & NDR_OUT) {
8939 ndr_print_struct(ndr, "out", "samr_OpenUser");
8940 ndr->depth++;
8941 ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
8942 ndr->depth++;
8943 ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
8944 ndr->depth--;
8945 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8946 ndr->depth--;
8948 ndr->depth--;
8951 static enum ndr_err_code ndr_push_samr_DeleteUser(struct ndr_push *ndr, int flags, const struct samr_DeleteUser *r)
8953 if (flags & NDR_IN) {
8954 if (r->in.user_handle == NULL) {
8955 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8957 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
8959 if (flags & NDR_OUT) {
8960 if (r->out.user_handle == NULL) {
8961 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8963 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
8964 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8966 return NDR_ERR_SUCCESS;
8969 static enum ndr_err_code ndr_pull_samr_DeleteUser(struct ndr_pull *ndr, int flags, struct samr_DeleteUser *r)
8971 TALLOC_CTX *_mem_save_user_handle_0;
8972 if (flags & NDR_IN) {
8973 ZERO_STRUCT(r->out);
8975 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8976 NDR_PULL_ALLOC(ndr, r->in.user_handle);
8978 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8979 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
8980 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
8981 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
8982 NDR_PULL_ALLOC(ndr, r->out.user_handle);
8983 *r->out.user_handle = *r->in.user_handle;
8985 if (flags & NDR_OUT) {
8986 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8987 NDR_PULL_ALLOC(ndr, r->out.user_handle);
8989 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8990 NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
8991 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
8992 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
8993 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8995 return NDR_ERR_SUCCESS;
8998 _PUBLIC_ void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteUser *r)
9000 ndr_print_struct(ndr, name, "samr_DeleteUser");
9001 ndr->depth++;
9002 if (flags & NDR_SET_VALUES) {
9003 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9005 if (flags & NDR_IN) {
9006 ndr_print_struct(ndr, "in", "samr_DeleteUser");
9007 ndr->depth++;
9008 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9009 ndr->depth++;
9010 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9011 ndr->depth--;
9012 ndr->depth--;
9014 if (flags & NDR_OUT) {
9015 ndr_print_struct(ndr, "out", "samr_DeleteUser");
9016 ndr->depth++;
9017 ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
9018 ndr->depth++;
9019 ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
9020 ndr->depth--;
9021 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9022 ndr->depth--;
9024 ndr->depth--;
9027 _PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo *r)
9029 if (flags & NDR_IN) {
9030 if (r->in.user_handle == NULL) {
9031 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9033 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9034 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
9036 if (flags & NDR_OUT) {
9037 if (r->out.info == NULL) {
9038 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9040 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9041 if (*r->out.info) {
9042 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9043 NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9045 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9047 return NDR_ERR_SUCCESS;
9050 _PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r)
9052 uint32_t _ptr_info;
9053 TALLOC_CTX *_mem_save_user_handle_0;
9054 TALLOC_CTX *_mem_save_info_0;
9055 TALLOC_CTX *_mem_save_info_1;
9056 if (flags & NDR_IN) {
9057 ZERO_STRUCT(r->out);
9059 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9060 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9062 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9063 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9064 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9065 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9066 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
9067 NDR_PULL_ALLOC(ndr, r->out.info);
9068 ZERO_STRUCTP(r->out.info);
9070 if (flags & NDR_OUT) {
9071 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9072 NDR_PULL_ALLOC(ndr, r->out.info);
9074 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9075 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9076 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9077 if (_ptr_info) {
9078 NDR_PULL_ALLOC(ndr, *r->out.info);
9079 } else {
9080 *r->out.info = NULL;
9082 if (*r->out.info) {
9083 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9084 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9085 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9086 NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9087 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9089 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9090 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9092 return NDR_ERR_SUCCESS;
9095 _PUBLIC_ void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo *r)
9097 ndr_print_struct(ndr, name, "samr_QueryUserInfo");
9098 ndr->depth++;
9099 if (flags & NDR_SET_VALUES) {
9100 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9102 if (flags & NDR_IN) {
9103 ndr_print_struct(ndr, "in", "samr_QueryUserInfo");
9104 ndr->depth++;
9105 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9106 ndr->depth++;
9107 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9108 ndr->depth--;
9109 ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
9110 ndr->depth--;
9112 if (flags & NDR_OUT) {
9113 ndr_print_struct(ndr, "out", "samr_QueryUserInfo");
9114 ndr->depth++;
9115 ndr_print_ptr(ndr, "info", r->out.info);
9116 ndr->depth++;
9117 ndr_print_ptr(ndr, "info", *r->out.info);
9118 ndr->depth++;
9119 if (*r->out.info) {
9120 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9121 ndr_print_samr_UserInfo(ndr, "info", *r->out.info);
9123 ndr->depth--;
9124 ndr->depth--;
9125 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9126 ndr->depth--;
9128 ndr->depth--;
9131 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo *r)
9133 if (flags & NDR_IN) {
9134 if (r->in.user_handle == NULL) {
9135 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9137 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9138 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
9139 if (r->in.info == NULL) {
9140 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9142 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9143 NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9145 if (flags & NDR_OUT) {
9146 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9148 return NDR_ERR_SUCCESS;
9151 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo *r)
9153 TALLOC_CTX *_mem_save_user_handle_0;
9154 TALLOC_CTX *_mem_save_info_0;
9155 if (flags & NDR_IN) {
9156 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9157 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9159 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9160 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9161 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9162 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9163 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
9164 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9165 NDR_PULL_ALLOC(ndr, r->in.info);
9167 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9168 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
9169 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9170 NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9171 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9173 if (flags & NDR_OUT) {
9174 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9176 return NDR_ERR_SUCCESS;
9179 _PUBLIC_ void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo *r)
9181 ndr_print_struct(ndr, name, "samr_SetUserInfo");
9182 ndr->depth++;
9183 if (flags & NDR_SET_VALUES) {
9184 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9186 if (flags & NDR_IN) {
9187 ndr_print_struct(ndr, "in", "samr_SetUserInfo");
9188 ndr->depth++;
9189 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9190 ndr->depth++;
9191 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9192 ndr->depth--;
9193 ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
9194 ndr_print_ptr(ndr, "info", r->in.info);
9195 ndr->depth++;
9196 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9197 ndr_print_samr_UserInfo(ndr, "info", r->in.info);
9198 ndr->depth--;
9199 ndr->depth--;
9201 if (flags & NDR_OUT) {
9202 ndr_print_struct(ndr, "out", "samr_SetUserInfo");
9203 ndr->depth++;
9204 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9205 ndr->depth--;
9207 ndr->depth--;
9210 static enum ndr_err_code ndr_push_samr_ChangePasswordUser(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser *r)
9212 if (flags & NDR_IN) {
9213 if (r->in.user_handle == NULL) {
9214 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9216 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9217 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_present));
9218 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_lm_crypted));
9219 if (r->in.old_lm_crypted) {
9220 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.old_lm_crypted));
9222 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_lm_crypted));
9223 if (r->in.new_lm_crypted) {
9224 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_lm_crypted));
9226 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.nt_present));
9227 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_nt_crypted));
9228 if (r->in.old_nt_crypted) {
9229 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.old_nt_crypted));
9231 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_nt_crypted));
9232 if (r->in.new_nt_crypted) {
9233 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_nt_crypted));
9235 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.cross1_present));
9236 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_cross));
9237 if (r->in.nt_cross) {
9238 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_cross));
9240 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.cross2_present));
9241 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_cross));
9242 if (r->in.lm_cross) {
9243 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_cross));
9246 if (flags & NDR_OUT) {
9247 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9249 return NDR_ERR_SUCCESS;
9252 static enum ndr_err_code ndr_pull_samr_ChangePasswordUser(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser *r)
9254 uint32_t _ptr_old_lm_crypted;
9255 uint32_t _ptr_new_lm_crypted;
9256 uint32_t _ptr_old_nt_crypted;
9257 uint32_t _ptr_new_nt_crypted;
9258 uint32_t _ptr_nt_cross;
9259 uint32_t _ptr_lm_cross;
9260 TALLOC_CTX *_mem_save_user_handle_0;
9261 TALLOC_CTX *_mem_save_old_lm_crypted_0;
9262 TALLOC_CTX *_mem_save_new_lm_crypted_0;
9263 TALLOC_CTX *_mem_save_old_nt_crypted_0;
9264 TALLOC_CTX *_mem_save_new_nt_crypted_0;
9265 TALLOC_CTX *_mem_save_nt_cross_0;
9266 TALLOC_CTX *_mem_save_lm_cross_0;
9267 if (flags & NDR_IN) {
9268 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9269 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9271 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9272 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9273 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9274 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9275 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_present));
9276 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_lm_crypted));
9277 if (_ptr_old_lm_crypted) {
9278 NDR_PULL_ALLOC(ndr, r->in.old_lm_crypted);
9279 } else {
9280 r->in.old_lm_crypted = NULL;
9282 if (r->in.old_lm_crypted) {
9283 _mem_save_old_lm_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
9284 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_lm_crypted, 0);
9285 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.old_lm_crypted));
9286 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_lm_crypted_0, 0);
9288 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_lm_crypted));
9289 if (_ptr_new_lm_crypted) {
9290 NDR_PULL_ALLOC(ndr, r->in.new_lm_crypted);
9291 } else {
9292 r->in.new_lm_crypted = NULL;
9294 if (r->in.new_lm_crypted) {
9295 _mem_save_new_lm_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
9296 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_lm_crypted, 0);
9297 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_lm_crypted));
9298 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_lm_crypted_0, 0);
9300 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.nt_present));
9301 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_nt_crypted));
9302 if (_ptr_old_nt_crypted) {
9303 NDR_PULL_ALLOC(ndr, r->in.old_nt_crypted);
9304 } else {
9305 r->in.old_nt_crypted = NULL;
9307 if (r->in.old_nt_crypted) {
9308 _mem_save_old_nt_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
9309 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_nt_crypted, 0);
9310 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.old_nt_crypted));
9311 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_nt_crypted_0, 0);
9313 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_nt_crypted));
9314 if (_ptr_new_nt_crypted) {
9315 NDR_PULL_ALLOC(ndr, r->in.new_nt_crypted);
9316 } else {
9317 r->in.new_nt_crypted = NULL;
9319 if (r->in.new_nt_crypted) {
9320 _mem_save_new_nt_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
9321 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_nt_crypted, 0);
9322 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_nt_crypted));
9323 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_nt_crypted_0, 0);
9325 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.cross1_present));
9326 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_cross));
9327 if (_ptr_nt_cross) {
9328 NDR_PULL_ALLOC(ndr, r->in.nt_cross);
9329 } else {
9330 r->in.nt_cross = NULL;
9332 if (r->in.nt_cross) {
9333 _mem_save_nt_cross_0 = NDR_PULL_GET_MEM_CTX(ndr);
9334 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_cross, 0);
9335 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_cross));
9336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_cross_0, 0);
9338 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.cross2_present));
9339 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_cross));
9340 if (_ptr_lm_cross) {
9341 NDR_PULL_ALLOC(ndr, r->in.lm_cross);
9342 } else {
9343 r->in.lm_cross = NULL;
9345 if (r->in.lm_cross) {
9346 _mem_save_lm_cross_0 = NDR_PULL_GET_MEM_CTX(ndr);
9347 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_cross, 0);
9348 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_cross));
9349 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_cross_0, 0);
9352 if (flags & NDR_OUT) {
9353 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9355 return NDR_ERR_SUCCESS;
9358 _PUBLIC_ void ndr_print_samr_ChangePasswordUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser *r)
9360 ndr_print_struct(ndr, name, "samr_ChangePasswordUser");
9361 ndr->depth++;
9362 if (flags & NDR_SET_VALUES) {
9363 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9365 if (flags & NDR_IN) {
9366 ndr_print_struct(ndr, "in", "samr_ChangePasswordUser");
9367 ndr->depth++;
9368 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9369 ndr->depth++;
9370 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9371 ndr->depth--;
9372 ndr_print_uint8(ndr, "lm_present", r->in.lm_present);
9373 ndr_print_ptr(ndr, "old_lm_crypted", r->in.old_lm_crypted);
9374 ndr->depth++;
9375 if (r->in.old_lm_crypted) {
9376 ndr_print_samr_Password(ndr, "old_lm_crypted", r->in.old_lm_crypted);
9378 ndr->depth--;
9379 ndr_print_ptr(ndr, "new_lm_crypted", r->in.new_lm_crypted);
9380 ndr->depth++;
9381 if (r->in.new_lm_crypted) {
9382 ndr_print_samr_Password(ndr, "new_lm_crypted", r->in.new_lm_crypted);
9384 ndr->depth--;
9385 ndr_print_uint8(ndr, "nt_present", r->in.nt_present);
9386 ndr_print_ptr(ndr, "old_nt_crypted", r->in.old_nt_crypted);
9387 ndr->depth++;
9388 if (r->in.old_nt_crypted) {
9389 ndr_print_samr_Password(ndr, "old_nt_crypted", r->in.old_nt_crypted);
9391 ndr->depth--;
9392 ndr_print_ptr(ndr, "new_nt_crypted", r->in.new_nt_crypted);
9393 ndr->depth++;
9394 if (r->in.new_nt_crypted) {
9395 ndr_print_samr_Password(ndr, "new_nt_crypted", r->in.new_nt_crypted);
9397 ndr->depth--;
9398 ndr_print_uint8(ndr, "cross1_present", r->in.cross1_present);
9399 ndr_print_ptr(ndr, "nt_cross", r->in.nt_cross);
9400 ndr->depth++;
9401 if (r->in.nt_cross) {
9402 ndr_print_samr_Password(ndr, "nt_cross", r->in.nt_cross);
9404 ndr->depth--;
9405 ndr_print_uint8(ndr, "cross2_present", r->in.cross2_present);
9406 ndr_print_ptr(ndr, "lm_cross", r->in.lm_cross);
9407 ndr->depth++;
9408 if (r->in.lm_cross) {
9409 ndr_print_samr_Password(ndr, "lm_cross", r->in.lm_cross);
9411 ndr->depth--;
9412 ndr->depth--;
9414 if (flags & NDR_OUT) {
9415 ndr_print_struct(ndr, "out", "samr_ChangePasswordUser");
9416 ndr->depth++;
9417 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9418 ndr->depth--;
9420 ndr->depth--;
9423 static enum ndr_err_code ndr_push_samr_GetGroupsForUser(struct ndr_push *ndr, int flags, const struct samr_GetGroupsForUser *r)
9425 if (flags & NDR_IN) {
9426 if (r->in.user_handle == NULL) {
9427 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9429 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9431 if (flags & NDR_OUT) {
9432 if (r->out.rids == NULL) {
9433 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9435 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rids));
9436 if (*r->out.rids) {
9437 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
9439 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9441 return NDR_ERR_SUCCESS;
9444 static enum ndr_err_code ndr_pull_samr_GetGroupsForUser(struct ndr_pull *ndr, int flags, struct samr_GetGroupsForUser *r)
9446 uint32_t _ptr_rids;
9447 TALLOC_CTX *_mem_save_user_handle_0;
9448 TALLOC_CTX *_mem_save_rids_0;
9449 TALLOC_CTX *_mem_save_rids_1;
9450 if (flags & NDR_IN) {
9451 ZERO_STRUCT(r->out);
9453 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9454 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9456 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9457 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9458 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9459 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9460 NDR_PULL_ALLOC(ndr, r->out.rids);
9461 ZERO_STRUCTP(r->out.rids);
9463 if (flags & NDR_OUT) {
9464 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9465 NDR_PULL_ALLOC(ndr, r->out.rids);
9467 _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
9468 NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
9469 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
9470 if (_ptr_rids) {
9471 NDR_PULL_ALLOC(ndr, *r->out.rids);
9472 } else {
9473 *r->out.rids = NULL;
9475 if (*r->out.rids) {
9476 _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
9477 NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, 0);
9478 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
9479 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
9481 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
9482 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9484 return NDR_ERR_SUCCESS;
9487 _PUBLIC_ void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetGroupsForUser *r)
9489 ndr_print_struct(ndr, name, "samr_GetGroupsForUser");
9490 ndr->depth++;
9491 if (flags & NDR_SET_VALUES) {
9492 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9494 if (flags & NDR_IN) {
9495 ndr_print_struct(ndr, "in", "samr_GetGroupsForUser");
9496 ndr->depth++;
9497 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9498 ndr->depth++;
9499 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9500 ndr->depth--;
9501 ndr->depth--;
9503 if (flags & NDR_OUT) {
9504 ndr_print_struct(ndr, "out", "samr_GetGroupsForUser");
9505 ndr->depth++;
9506 ndr_print_ptr(ndr, "rids", r->out.rids);
9507 ndr->depth++;
9508 ndr_print_ptr(ndr, "rids", *r->out.rids);
9509 ndr->depth++;
9510 if (*r->out.rids) {
9511 ndr_print_samr_RidWithAttributeArray(ndr, "rids", *r->out.rids);
9513 ndr->depth--;
9514 ndr->depth--;
9515 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9516 ndr->depth--;
9518 ndr->depth--;
9521 static enum ndr_err_code ndr_push_samr_QueryDisplayInfo(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo *r)
9523 if (flags & NDR_IN) {
9524 if (r->in.domain_handle == NULL) {
9525 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9527 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9528 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
9529 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx));
9530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries));
9531 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
9533 if (flags & NDR_OUT) {
9534 if (r->out.total_size == NULL) {
9535 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size));
9538 if (r->out.returned_size == NULL) {
9539 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size));
9542 if (r->out.info == NULL) {
9543 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9545 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
9546 NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
9547 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9549 return NDR_ERR_SUCCESS;
9552 static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo *r)
9554 TALLOC_CTX *_mem_save_domain_handle_0;
9555 TALLOC_CTX *_mem_save_total_size_0;
9556 TALLOC_CTX *_mem_save_returned_size_0;
9557 TALLOC_CTX *_mem_save_info_0;
9558 if (flags & NDR_IN) {
9559 ZERO_STRUCT(r->out);
9561 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9562 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9564 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9565 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9566 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9567 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9568 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
9569 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx));
9570 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries));
9571 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
9572 NDR_PULL_ALLOC(ndr, r->out.total_size);
9573 ZERO_STRUCTP(r->out.total_size);
9574 NDR_PULL_ALLOC(ndr, r->out.returned_size);
9575 ZERO_STRUCTP(r->out.returned_size);
9576 NDR_PULL_ALLOC(ndr, r->out.info);
9577 ZERO_STRUCTP(r->out.info);
9579 if (flags & NDR_OUT) {
9580 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9581 NDR_PULL_ALLOC(ndr, r->out.total_size);
9583 _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
9584 NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC);
9585 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size));
9586 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC);
9587 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9588 NDR_PULL_ALLOC(ndr, r->out.returned_size);
9590 _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
9591 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC);
9592 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size));
9593 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC);
9594 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9595 NDR_PULL_ALLOC(ndr, r->out.info);
9597 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9598 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9599 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
9600 NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
9601 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9602 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9604 return NDR_ERR_SUCCESS;
9607 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo *r)
9609 ndr_print_struct(ndr, name, "samr_QueryDisplayInfo");
9610 ndr->depth++;
9611 if (flags & NDR_SET_VALUES) {
9612 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9614 if (flags & NDR_IN) {
9615 ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo");
9616 ndr->depth++;
9617 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
9618 ndr->depth++;
9619 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
9620 ndr->depth--;
9621 ndr_print_uint16(ndr, "level", r->in.level);
9622 ndr_print_uint32(ndr, "start_idx", r->in.start_idx);
9623 ndr_print_uint32(ndr, "max_entries", r->in.max_entries);
9624 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
9625 ndr->depth--;
9627 if (flags & NDR_OUT) {
9628 ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo");
9629 ndr->depth++;
9630 ndr_print_ptr(ndr, "total_size", r->out.total_size);
9631 ndr->depth++;
9632 ndr_print_uint32(ndr, "total_size", *r->out.total_size);
9633 ndr->depth--;
9634 ndr_print_ptr(ndr, "returned_size", r->out.returned_size);
9635 ndr->depth++;
9636 ndr_print_uint32(ndr, "returned_size", *r->out.returned_size);
9637 ndr->depth--;
9638 ndr_print_ptr(ndr, "info", r->out.info);
9639 ndr->depth++;
9640 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
9641 ndr_print_samr_DispInfo(ndr, "info", r->out.info);
9642 ndr->depth--;
9643 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9644 ndr->depth--;
9646 ndr->depth--;
9649 static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex(struct ndr_push *ndr, int flags, const struct samr_GetDisplayEnumerationIndex *r)
9651 if (flags & NDR_IN) {
9652 if (r->in.domain_handle == NULL) {
9653 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9655 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9656 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
9657 if (r->in.name == NULL) {
9658 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9660 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9662 if (flags & NDR_OUT) {
9663 if (r->out.idx == NULL) {
9664 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.idx));
9667 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9669 return NDR_ERR_SUCCESS;
9672 static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex *r)
9674 TALLOC_CTX *_mem_save_domain_handle_0;
9675 TALLOC_CTX *_mem_save_name_0;
9676 TALLOC_CTX *_mem_save_idx_0;
9677 if (flags & NDR_IN) {
9678 ZERO_STRUCT(r->out);
9680 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9681 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9683 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9684 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9685 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9686 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9687 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
9688 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9689 NDR_PULL_ALLOC(ndr, r->in.name);
9691 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9692 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
9693 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9694 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
9695 NDR_PULL_ALLOC(ndr, r->out.idx);
9696 ZERO_STRUCTP(r->out.idx);
9698 if (flags & NDR_OUT) {
9699 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9700 NDR_PULL_ALLOC(ndr, r->out.idx);
9702 _mem_save_idx_0 = NDR_PULL_GET_MEM_CTX(ndr);
9703 NDR_PULL_SET_MEM_CTX(ndr, r->out.idx, LIBNDR_FLAG_REF_ALLOC);
9704 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.idx));
9705 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_idx_0, LIBNDR_FLAG_REF_ALLOC);
9706 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9708 return NDR_ERR_SUCCESS;
9711 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex *r)
9713 ndr_print_struct(ndr, name, "samr_GetDisplayEnumerationIndex");
9714 ndr->depth++;
9715 if (flags & NDR_SET_VALUES) {
9716 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9718 if (flags & NDR_IN) {
9719 ndr_print_struct(ndr, "in", "samr_GetDisplayEnumerationIndex");
9720 ndr->depth++;
9721 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
9722 ndr->depth++;
9723 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
9724 ndr->depth--;
9725 ndr_print_uint16(ndr, "level", r->in.level);
9726 ndr_print_ptr(ndr, "name", r->in.name);
9727 ndr->depth++;
9728 ndr_print_lsa_String(ndr, "name", r->in.name);
9729 ndr->depth--;
9730 ndr->depth--;
9732 if (flags & NDR_OUT) {
9733 ndr_print_struct(ndr, "out", "samr_GetDisplayEnumerationIndex");
9734 ndr->depth++;
9735 ndr_print_ptr(ndr, "idx", r->out.idx);
9736 ndr->depth++;
9737 ndr_print_uint32(ndr, "idx", *r->out.idx);
9738 ndr->depth--;
9739 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9740 ndr->depth--;
9742 ndr->depth--;
9745 static enum ndr_err_code ndr_push_samr_TestPrivateFunctionsDomain(struct ndr_push *ndr, int flags, const struct samr_TestPrivateFunctionsDomain *r)
9747 if (flags & NDR_IN) {
9748 if (r->in.domain_handle == NULL) {
9749 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9751 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9753 if (flags & NDR_OUT) {
9754 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9756 return NDR_ERR_SUCCESS;
9759 static enum ndr_err_code ndr_pull_samr_TestPrivateFunctionsDomain(struct ndr_pull *ndr, int flags, struct samr_TestPrivateFunctionsDomain *r)
9761 TALLOC_CTX *_mem_save_domain_handle_0;
9762 if (flags & NDR_IN) {
9763 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9764 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9766 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9767 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9768 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9769 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9771 if (flags & NDR_OUT) {
9772 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9774 return NDR_ERR_SUCCESS;
9777 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsDomain *r)
9779 ndr_print_struct(ndr, name, "samr_TestPrivateFunctionsDomain");
9780 ndr->depth++;
9781 if (flags & NDR_SET_VALUES) {
9782 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9784 if (flags & NDR_IN) {
9785 ndr_print_struct(ndr, "in", "samr_TestPrivateFunctionsDomain");
9786 ndr->depth++;
9787 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
9788 ndr->depth++;
9789 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
9790 ndr->depth--;
9791 ndr->depth--;
9793 if (flags & NDR_OUT) {
9794 ndr_print_struct(ndr, "out", "samr_TestPrivateFunctionsDomain");
9795 ndr->depth++;
9796 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9797 ndr->depth--;
9799 ndr->depth--;
9802 static enum ndr_err_code ndr_push_samr_TestPrivateFunctionsUser(struct ndr_push *ndr, int flags, const struct samr_TestPrivateFunctionsUser *r)
9804 if (flags & NDR_IN) {
9805 if (r->in.user_handle == NULL) {
9806 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9808 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9810 if (flags & NDR_OUT) {
9811 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9813 return NDR_ERR_SUCCESS;
9816 static enum ndr_err_code ndr_pull_samr_TestPrivateFunctionsUser(struct ndr_pull *ndr, int flags, struct samr_TestPrivateFunctionsUser *r)
9818 TALLOC_CTX *_mem_save_user_handle_0;
9819 if (flags & NDR_IN) {
9820 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9821 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9823 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9824 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9825 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9826 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9828 if (flags & NDR_OUT) {
9829 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9831 return NDR_ERR_SUCCESS;
9834 _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsUser *r)
9836 ndr_print_struct(ndr, name, "samr_TestPrivateFunctionsUser");
9837 ndr->depth++;
9838 if (flags & NDR_SET_VALUES) {
9839 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9841 if (flags & NDR_IN) {
9842 ndr_print_struct(ndr, "in", "samr_TestPrivateFunctionsUser");
9843 ndr->depth++;
9844 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9845 ndr->depth++;
9846 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9847 ndr->depth--;
9848 ndr->depth--;
9850 if (flags & NDR_OUT) {
9851 ndr_print_struct(ndr, "out", "samr_TestPrivateFunctionsUser");
9852 ndr->depth++;
9853 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9854 ndr->depth--;
9856 ndr->depth--;
9859 _PUBLIC_ enum ndr_err_code ndr_push_samr_GetUserPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetUserPwInfo *r)
9861 if (flags & NDR_IN) {
9862 if (r->in.user_handle == NULL) {
9863 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9865 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9867 if (flags & NDR_OUT) {
9868 if (r->out.info == NULL) {
9869 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9871 NDR_CHECK(ndr_push_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
9872 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9874 return NDR_ERR_SUCCESS;
9877 _PUBLIC_ enum ndr_err_code ndr_pull_samr_GetUserPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetUserPwInfo *r)
9879 TALLOC_CTX *_mem_save_user_handle_0;
9880 TALLOC_CTX *_mem_save_info_0;
9881 if (flags & NDR_IN) {
9882 ZERO_STRUCT(r->out);
9884 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9885 NDR_PULL_ALLOC(ndr, r->in.user_handle);
9887 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9888 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9889 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9890 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9891 NDR_PULL_ALLOC(ndr, r->out.info);
9892 ZERO_STRUCTP(r->out.info);
9894 if (flags & NDR_OUT) {
9895 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9896 NDR_PULL_ALLOC(ndr, r->out.info);
9898 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9899 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9900 NDR_CHECK(ndr_pull_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
9901 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9902 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9904 return NDR_ERR_SUCCESS;
9907 _PUBLIC_ void ndr_print_samr_GetUserPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetUserPwInfo *r)
9909 ndr_print_struct(ndr, name, "samr_GetUserPwInfo");
9910 ndr->depth++;
9911 if (flags & NDR_SET_VALUES) {
9912 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9914 if (flags & NDR_IN) {
9915 ndr_print_struct(ndr, "in", "samr_GetUserPwInfo");
9916 ndr->depth++;
9917 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9918 ndr->depth++;
9919 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9920 ndr->depth--;
9921 ndr->depth--;
9923 if (flags & NDR_OUT) {
9924 ndr_print_struct(ndr, "out", "samr_GetUserPwInfo");
9925 ndr->depth++;
9926 ndr_print_ptr(ndr, "info", r->out.info);
9927 ndr->depth++;
9928 ndr_print_samr_PwInfo(ndr, "info", r->out.info);
9929 ndr->depth--;
9930 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9931 ndr->depth--;
9933 ndr->depth--;
9936 static enum ndr_err_code ndr_push_samr_RemoveMemberFromForeignDomain(struct ndr_push *ndr, int flags, const struct samr_RemoveMemberFromForeignDomain *r)
9938 if (flags & NDR_IN) {
9939 if (r->in.domain_handle == NULL) {
9940 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9942 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9943 if (r->in.sid == NULL) {
9944 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9946 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
9948 if (flags & NDR_OUT) {
9949 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9951 return NDR_ERR_SUCCESS;
9954 static enum ndr_err_code ndr_pull_samr_RemoveMemberFromForeignDomain(struct ndr_pull *ndr, int flags, struct samr_RemoveMemberFromForeignDomain *r)
9956 TALLOC_CTX *_mem_save_domain_handle_0;
9957 TALLOC_CTX *_mem_save_sid_0;
9958 if (flags & NDR_IN) {
9959 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9960 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9962 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9963 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9964 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9965 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9966 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9967 NDR_PULL_ALLOC(ndr, r->in.sid);
9969 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9970 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
9971 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
9972 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
9974 if (flags & NDR_OUT) {
9975 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9977 return NDR_ERR_SUCCESS;
9980 _PUBLIC_ void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMemberFromForeignDomain *r)
9982 ndr_print_struct(ndr, name, "samr_RemoveMemberFromForeignDomain");
9983 ndr->depth++;
9984 if (flags & NDR_SET_VALUES) {
9985 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9987 if (flags & NDR_IN) {
9988 ndr_print_struct(ndr, "in", "samr_RemoveMemberFromForeignDomain");
9989 ndr->depth++;
9990 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
9991 ndr->depth++;
9992 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
9993 ndr->depth--;
9994 ndr_print_ptr(ndr, "sid", r->in.sid);
9995 ndr->depth++;
9996 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
9997 ndr->depth--;
9998 ndr->depth--;
10000 if (flags & NDR_OUT) {
10001 ndr_print_struct(ndr, "out", "samr_RemoveMemberFromForeignDomain");
10002 ndr->depth++;
10003 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10004 ndr->depth--;
10006 ndr->depth--;
10009 static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryDomainInfo2 *r)
10011 if (flags & NDR_IN) {
10012 if (r->in.domain_handle == NULL) {
10013 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10015 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10016 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
10018 if (flags & NDR_OUT) {
10019 if (r->out.info == NULL) {
10020 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10022 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10023 if (*r->out.info) {
10024 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10025 NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10027 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10029 return NDR_ERR_SUCCESS;
10032 static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo2 *r)
10034 uint32_t _ptr_info;
10035 TALLOC_CTX *_mem_save_domain_handle_0;
10036 TALLOC_CTX *_mem_save_info_0;
10037 TALLOC_CTX *_mem_save_info_1;
10038 if (flags & NDR_IN) {
10039 ZERO_STRUCT(r->out);
10041 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10042 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10044 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10045 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10046 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10047 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10048 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
10049 NDR_PULL_ALLOC(ndr, r->out.info);
10050 ZERO_STRUCTP(r->out.info);
10052 if (flags & NDR_OUT) {
10053 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10054 NDR_PULL_ALLOC(ndr, r->out.info);
10056 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10057 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10058 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10059 if (_ptr_info) {
10060 NDR_PULL_ALLOC(ndr, *r->out.info);
10061 } else {
10062 *r->out.info = NULL;
10064 if (*r->out.info) {
10065 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10066 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10067 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10068 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10071 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10072 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10074 return NDR_ERR_SUCCESS;
10077 _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo2 *r)
10079 ndr_print_struct(ndr, name, "samr_QueryDomainInfo2");
10080 ndr->depth++;
10081 if (flags & NDR_SET_VALUES) {
10082 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10084 if (flags & NDR_IN) {
10085 ndr_print_struct(ndr, "in", "samr_QueryDomainInfo2");
10086 ndr->depth++;
10087 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10088 ndr->depth++;
10089 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10090 ndr->depth--;
10091 ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
10092 ndr->depth--;
10094 if (flags & NDR_OUT) {
10095 ndr_print_struct(ndr, "out", "samr_QueryDomainInfo2");
10096 ndr->depth++;
10097 ndr_print_ptr(ndr, "info", r->out.info);
10098 ndr->depth++;
10099 ndr_print_ptr(ndr, "info", *r->out.info);
10100 ndr->depth++;
10101 if (*r->out.info) {
10102 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10103 ndr_print_samr_DomainInfo(ndr, "info", *r->out.info);
10105 ndr->depth--;
10106 ndr->depth--;
10107 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10108 ndr->depth--;
10110 ndr->depth--;
10113 static enum ndr_err_code ndr_push_samr_QueryUserInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo2 *r)
10115 if (flags & NDR_IN) {
10116 if (r->in.user_handle == NULL) {
10117 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10119 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10120 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
10122 if (flags & NDR_OUT) {
10123 if (r->out.info == NULL) {
10124 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10126 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10127 if (*r->out.info) {
10128 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10129 NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10131 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10133 return NDR_ERR_SUCCESS;
10136 static enum ndr_err_code ndr_pull_samr_QueryUserInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo2 *r)
10138 uint32_t _ptr_info;
10139 TALLOC_CTX *_mem_save_user_handle_0;
10140 TALLOC_CTX *_mem_save_info_0;
10141 TALLOC_CTX *_mem_save_info_1;
10142 if (flags & NDR_IN) {
10143 ZERO_STRUCT(r->out);
10145 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10146 NDR_PULL_ALLOC(ndr, r->in.user_handle);
10148 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10149 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
10150 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10151 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
10152 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
10153 NDR_PULL_ALLOC(ndr, r->out.info);
10154 ZERO_STRUCTP(r->out.info);
10156 if (flags & NDR_OUT) {
10157 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10158 NDR_PULL_ALLOC(ndr, r->out.info);
10160 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10161 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10162 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10163 if (_ptr_info) {
10164 NDR_PULL_ALLOC(ndr, *r->out.info);
10165 } else {
10166 *r->out.info = NULL;
10168 if (*r->out.info) {
10169 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10170 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10171 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10172 NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10173 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10175 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10176 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10178 return NDR_ERR_SUCCESS;
10181 _PUBLIC_ void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo2 *r)
10183 ndr_print_struct(ndr, name, "samr_QueryUserInfo2");
10184 ndr->depth++;
10185 if (flags & NDR_SET_VALUES) {
10186 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10188 if (flags & NDR_IN) {
10189 ndr_print_struct(ndr, "in", "samr_QueryUserInfo2");
10190 ndr->depth++;
10191 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
10192 ndr->depth++;
10193 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
10194 ndr->depth--;
10195 ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
10196 ndr->depth--;
10198 if (flags & NDR_OUT) {
10199 ndr_print_struct(ndr, "out", "samr_QueryUserInfo2");
10200 ndr->depth++;
10201 ndr_print_ptr(ndr, "info", r->out.info);
10202 ndr->depth++;
10203 ndr_print_ptr(ndr, "info", *r->out.info);
10204 ndr->depth++;
10205 if (*r->out.info) {
10206 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10207 ndr_print_samr_UserInfo(ndr, "info", *r->out.info);
10209 ndr->depth--;
10210 ndr->depth--;
10211 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10212 ndr->depth--;
10214 ndr->depth--;
10217 static enum ndr_err_code ndr_push_samr_QueryDisplayInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo2 *r)
10219 if (flags & NDR_IN) {
10220 if (r->in.domain_handle == NULL) {
10221 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10223 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10224 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10225 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx));
10226 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries));
10227 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
10229 if (flags & NDR_OUT) {
10230 if (r->out.total_size == NULL) {
10231 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10233 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size));
10234 if (r->out.returned_size == NULL) {
10235 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size));
10238 if (r->out.info == NULL) {
10239 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10241 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
10242 NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10243 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10245 return NDR_ERR_SUCCESS;
10248 static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo2 *r)
10250 TALLOC_CTX *_mem_save_domain_handle_0;
10251 TALLOC_CTX *_mem_save_total_size_0;
10252 TALLOC_CTX *_mem_save_returned_size_0;
10253 TALLOC_CTX *_mem_save_info_0;
10254 if (flags & NDR_IN) {
10255 ZERO_STRUCT(r->out);
10257 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10258 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10260 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10261 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10262 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10263 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10264 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10265 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx));
10266 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries));
10267 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
10268 NDR_PULL_ALLOC(ndr, r->out.total_size);
10269 ZERO_STRUCTP(r->out.total_size);
10270 NDR_PULL_ALLOC(ndr, r->out.returned_size);
10271 ZERO_STRUCTP(r->out.returned_size);
10272 NDR_PULL_ALLOC(ndr, r->out.info);
10273 ZERO_STRUCTP(r->out.info);
10275 if (flags & NDR_OUT) {
10276 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10277 NDR_PULL_ALLOC(ndr, r->out.total_size);
10279 _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10280 NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC);
10281 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size));
10282 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC);
10283 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10284 NDR_PULL_ALLOC(ndr, r->out.returned_size);
10286 _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10287 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC);
10288 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size));
10289 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC);
10290 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10291 NDR_PULL_ALLOC(ndr, r->out.info);
10293 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10294 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10295 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
10296 NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10297 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10298 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10300 return NDR_ERR_SUCCESS;
10303 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo2 *r)
10305 ndr_print_struct(ndr, name, "samr_QueryDisplayInfo2");
10306 ndr->depth++;
10307 if (flags & NDR_SET_VALUES) {
10308 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10310 if (flags & NDR_IN) {
10311 ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo2");
10312 ndr->depth++;
10313 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10314 ndr->depth++;
10315 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10316 ndr->depth--;
10317 ndr_print_uint16(ndr, "level", r->in.level);
10318 ndr_print_uint32(ndr, "start_idx", r->in.start_idx);
10319 ndr_print_uint32(ndr, "max_entries", r->in.max_entries);
10320 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
10321 ndr->depth--;
10323 if (flags & NDR_OUT) {
10324 ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo2");
10325 ndr->depth++;
10326 ndr_print_ptr(ndr, "total_size", r->out.total_size);
10327 ndr->depth++;
10328 ndr_print_uint32(ndr, "total_size", *r->out.total_size);
10329 ndr->depth--;
10330 ndr_print_ptr(ndr, "returned_size", r->out.returned_size);
10331 ndr->depth++;
10332 ndr_print_uint32(ndr, "returned_size", *r->out.returned_size);
10333 ndr->depth--;
10334 ndr_print_ptr(ndr, "info", r->out.info);
10335 ndr->depth++;
10336 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
10337 ndr_print_samr_DispInfo(ndr, "info", r->out.info);
10338 ndr->depth--;
10339 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10340 ndr->depth--;
10342 ndr->depth--;
10345 static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex2(struct ndr_push *ndr, int flags, const struct samr_GetDisplayEnumerationIndex2 *r)
10347 if (flags & NDR_IN) {
10348 if (r->in.domain_handle == NULL) {
10349 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10351 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10352 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10353 if (r->in.name == NULL) {
10354 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10356 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
10358 if (flags & NDR_OUT) {
10359 if (r->out.idx == NULL) {
10360 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.idx));
10363 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10365 return NDR_ERR_SUCCESS;
10368 static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex2(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex2 *r)
10370 TALLOC_CTX *_mem_save_domain_handle_0;
10371 TALLOC_CTX *_mem_save_name_0;
10372 TALLOC_CTX *_mem_save_idx_0;
10373 if (flags & NDR_IN) {
10374 ZERO_STRUCT(r->out);
10376 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10377 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10379 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10380 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10381 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10382 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10383 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10384 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10385 NDR_PULL_ALLOC(ndr, r->in.name);
10387 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10388 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
10389 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
10390 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
10391 NDR_PULL_ALLOC(ndr, r->out.idx);
10392 ZERO_STRUCTP(r->out.idx);
10394 if (flags & NDR_OUT) {
10395 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10396 NDR_PULL_ALLOC(ndr, r->out.idx);
10398 _mem_save_idx_0 = NDR_PULL_GET_MEM_CTX(ndr);
10399 NDR_PULL_SET_MEM_CTX(ndr, r->out.idx, LIBNDR_FLAG_REF_ALLOC);
10400 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.idx));
10401 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_idx_0, LIBNDR_FLAG_REF_ALLOC);
10402 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10404 return NDR_ERR_SUCCESS;
10407 _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex2 *r)
10409 ndr_print_struct(ndr, name, "samr_GetDisplayEnumerationIndex2");
10410 ndr->depth++;
10411 if (flags & NDR_SET_VALUES) {
10412 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10414 if (flags & NDR_IN) {
10415 ndr_print_struct(ndr, "in", "samr_GetDisplayEnumerationIndex2");
10416 ndr->depth++;
10417 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10418 ndr->depth++;
10419 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10420 ndr->depth--;
10421 ndr_print_uint16(ndr, "level", r->in.level);
10422 ndr_print_ptr(ndr, "name", r->in.name);
10423 ndr->depth++;
10424 ndr_print_lsa_String(ndr, "name", r->in.name);
10425 ndr->depth--;
10426 ndr->depth--;
10428 if (flags & NDR_OUT) {
10429 ndr_print_struct(ndr, "out", "samr_GetDisplayEnumerationIndex2");
10430 ndr->depth++;
10431 ndr_print_ptr(ndr, "idx", r->out.idx);
10432 ndr->depth++;
10433 ndr_print_uint32(ndr, "idx", *r->out.idx);
10434 ndr->depth--;
10435 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10436 ndr->depth--;
10438 ndr->depth--;
10441 static enum ndr_err_code ndr_push_samr_CreateUser2(struct ndr_push *ndr, int flags, const struct samr_CreateUser2 *r)
10443 if (flags & NDR_IN) {
10444 if (r->in.domain_handle == NULL) {
10445 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10447 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10448 if (r->in.account_name == NULL) {
10449 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10451 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
10452 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags));
10453 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
10455 if (flags & NDR_OUT) {
10456 if (r->out.user_handle == NULL) {
10457 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10459 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
10460 if (r->out.access_granted == NULL) {
10461 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10463 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.access_granted));
10464 if (r->out.rid == NULL) {
10465 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10467 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
10468 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10470 return NDR_ERR_SUCCESS;
10473 static enum ndr_err_code ndr_pull_samr_CreateUser2(struct ndr_pull *ndr, int flags, struct samr_CreateUser2 *r)
10475 TALLOC_CTX *_mem_save_domain_handle_0;
10476 TALLOC_CTX *_mem_save_account_name_0;
10477 TALLOC_CTX *_mem_save_user_handle_0;
10478 TALLOC_CTX *_mem_save_access_granted_0;
10479 TALLOC_CTX *_mem_save_rid_0;
10480 if (flags & NDR_IN) {
10481 ZERO_STRUCT(r->out);
10483 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10484 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10486 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10487 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10488 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10489 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10490 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10491 NDR_PULL_ALLOC(ndr, r->in.account_name);
10493 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10494 NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
10495 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
10496 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
10497 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags));
10498 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
10499 NDR_PULL_ALLOC(ndr, r->out.user_handle);
10500 ZERO_STRUCTP(r->out.user_handle);
10501 NDR_PULL_ALLOC(ndr, r->out.access_granted);
10502 ZERO_STRUCTP(r->out.access_granted);
10503 NDR_PULL_ALLOC(ndr, r->out.rid);
10504 ZERO_STRUCTP(r->out.rid);
10506 if (flags & NDR_OUT) {
10507 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10508 NDR_PULL_ALLOC(ndr, r->out.user_handle);
10510 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10511 NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
10512 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
10513 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
10514 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10515 NDR_PULL_ALLOC(ndr, r->out.access_granted);
10517 _mem_save_access_granted_0 = NDR_PULL_GET_MEM_CTX(ndr);
10518 NDR_PULL_SET_MEM_CTX(ndr, r->out.access_granted, LIBNDR_FLAG_REF_ALLOC);
10519 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.access_granted));
10520 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_granted_0, LIBNDR_FLAG_REF_ALLOC);
10521 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10522 NDR_PULL_ALLOC(ndr, r->out.rid);
10524 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
10525 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
10526 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
10527 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
10528 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10530 return NDR_ERR_SUCCESS;
10533 _PUBLIC_ void ndr_print_samr_CreateUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser2 *r)
10535 ndr_print_struct(ndr, name, "samr_CreateUser2");
10536 ndr->depth++;
10537 if (flags & NDR_SET_VALUES) {
10538 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10540 if (flags & NDR_IN) {
10541 ndr_print_struct(ndr, "in", "samr_CreateUser2");
10542 ndr->depth++;
10543 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10544 ndr->depth++;
10545 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10546 ndr->depth--;
10547 ndr_print_ptr(ndr, "account_name", r->in.account_name);
10548 ndr->depth++;
10549 ndr_print_lsa_String(ndr, "account_name", r->in.account_name);
10550 ndr->depth--;
10551 ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags);
10552 ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask);
10553 ndr->depth--;
10555 if (flags & NDR_OUT) {
10556 ndr_print_struct(ndr, "out", "samr_CreateUser2");
10557 ndr->depth++;
10558 ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
10559 ndr->depth++;
10560 ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
10561 ndr->depth--;
10562 ndr_print_ptr(ndr, "access_granted", r->out.access_granted);
10563 ndr->depth++;
10564 ndr_print_uint32(ndr, "access_granted", *r->out.access_granted);
10565 ndr->depth--;
10566 ndr_print_ptr(ndr, "rid", r->out.rid);
10567 ndr->depth++;
10568 ndr_print_uint32(ndr, "rid", *r->out.rid);
10569 ndr->depth--;
10570 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10571 ndr->depth--;
10573 ndr->depth--;
10576 static enum ndr_err_code ndr_push_samr_QueryDisplayInfo3(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo3 *r)
10578 if (flags & NDR_IN) {
10579 if (r->in.domain_handle == NULL) {
10580 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10582 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10583 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10584 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx));
10585 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries));
10586 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
10588 if (flags & NDR_OUT) {
10589 if (r->out.total_size == NULL) {
10590 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size));
10593 if (r->out.returned_size == NULL) {
10594 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10596 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size));
10597 if (r->out.info == NULL) {
10598 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10600 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
10601 NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10602 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10604 return NDR_ERR_SUCCESS;
10607 static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo3(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo3 *r)
10609 TALLOC_CTX *_mem_save_domain_handle_0;
10610 TALLOC_CTX *_mem_save_total_size_0;
10611 TALLOC_CTX *_mem_save_returned_size_0;
10612 TALLOC_CTX *_mem_save_info_0;
10613 if (flags & NDR_IN) {
10614 ZERO_STRUCT(r->out);
10616 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10617 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10619 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10620 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10621 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10622 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10623 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10624 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx));
10625 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries));
10626 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
10627 NDR_PULL_ALLOC(ndr, r->out.total_size);
10628 ZERO_STRUCTP(r->out.total_size);
10629 NDR_PULL_ALLOC(ndr, r->out.returned_size);
10630 ZERO_STRUCTP(r->out.returned_size);
10631 NDR_PULL_ALLOC(ndr, r->out.info);
10632 ZERO_STRUCTP(r->out.info);
10634 if (flags & NDR_OUT) {
10635 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10636 NDR_PULL_ALLOC(ndr, r->out.total_size);
10638 _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10639 NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC);
10640 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size));
10641 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC);
10642 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10643 NDR_PULL_ALLOC(ndr, r->out.returned_size);
10645 _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10646 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC);
10647 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size));
10648 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC);
10649 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10650 NDR_PULL_ALLOC(ndr, r->out.info);
10652 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10653 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10654 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
10655 NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10656 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10657 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10659 return NDR_ERR_SUCCESS;
10662 _PUBLIC_ void ndr_print_samr_QueryDisplayInfo3(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo3 *r)
10664 ndr_print_struct(ndr, name, "samr_QueryDisplayInfo3");
10665 ndr->depth++;
10666 if (flags & NDR_SET_VALUES) {
10667 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10669 if (flags & NDR_IN) {
10670 ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo3");
10671 ndr->depth++;
10672 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10673 ndr->depth++;
10674 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10675 ndr->depth--;
10676 ndr_print_uint16(ndr, "level", r->in.level);
10677 ndr_print_uint32(ndr, "start_idx", r->in.start_idx);
10678 ndr_print_uint32(ndr, "max_entries", r->in.max_entries);
10679 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
10680 ndr->depth--;
10682 if (flags & NDR_OUT) {
10683 ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo3");
10684 ndr->depth++;
10685 ndr_print_ptr(ndr, "total_size", r->out.total_size);
10686 ndr->depth++;
10687 ndr_print_uint32(ndr, "total_size", *r->out.total_size);
10688 ndr->depth--;
10689 ndr_print_ptr(ndr, "returned_size", r->out.returned_size);
10690 ndr->depth++;
10691 ndr_print_uint32(ndr, "returned_size", *r->out.returned_size);
10692 ndr->depth--;
10693 ndr_print_ptr(ndr, "info", r->out.info);
10694 ndr->depth++;
10695 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
10696 ndr_print_samr_DispInfo(ndr, "info", r->out.info);
10697 ndr->depth--;
10698 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10699 ndr->depth--;
10701 ndr->depth--;
10704 static enum ndr_err_code ndr_push_samr_AddMultipleMembersToAlias(struct ndr_push *ndr, int flags, const struct samr_AddMultipleMembersToAlias *r)
10706 if (flags & NDR_IN) {
10707 if (r->in.alias_handle == NULL) {
10708 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10710 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
10711 if (r->in.sids == NULL) {
10712 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10714 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10716 if (flags & NDR_OUT) {
10717 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10719 return NDR_ERR_SUCCESS;
10722 static enum ndr_err_code ndr_pull_samr_AddMultipleMembersToAlias(struct ndr_pull *ndr, int flags, struct samr_AddMultipleMembersToAlias *r)
10724 TALLOC_CTX *_mem_save_alias_handle_0;
10725 TALLOC_CTX *_mem_save_sids_0;
10726 if (flags & NDR_IN) {
10727 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10728 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
10730 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10731 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
10732 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
10733 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
10734 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10735 NDR_PULL_ALLOC(ndr, r->in.sids);
10737 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10738 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
10739 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10740 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
10742 if (flags & NDR_OUT) {
10743 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10745 return NDR_ERR_SUCCESS;
10748 _PUBLIC_ void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddMultipleMembersToAlias *r)
10750 ndr_print_struct(ndr, name, "samr_AddMultipleMembersToAlias");
10751 ndr->depth++;
10752 if (flags & NDR_SET_VALUES) {
10753 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10755 if (flags & NDR_IN) {
10756 ndr_print_struct(ndr, "in", "samr_AddMultipleMembersToAlias");
10757 ndr->depth++;
10758 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
10759 ndr->depth++;
10760 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
10761 ndr->depth--;
10762 ndr_print_ptr(ndr, "sids", r->in.sids);
10763 ndr->depth++;
10764 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
10765 ndr->depth--;
10766 ndr->depth--;
10768 if (flags & NDR_OUT) {
10769 ndr_print_struct(ndr, "out", "samr_AddMultipleMembersToAlias");
10770 ndr->depth++;
10771 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10772 ndr->depth--;
10774 ndr->depth--;
10777 static enum ndr_err_code ndr_push_samr_RemoveMultipleMembersFromAlias(struct ndr_push *ndr, int flags, const struct samr_RemoveMultipleMembersFromAlias *r)
10779 if (flags & NDR_IN) {
10780 if (r->in.alias_handle == NULL) {
10781 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10783 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
10784 if (r->in.sids == NULL) {
10785 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10787 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10789 if (flags & NDR_OUT) {
10790 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10792 return NDR_ERR_SUCCESS;
10795 static enum ndr_err_code ndr_pull_samr_RemoveMultipleMembersFromAlias(struct ndr_pull *ndr, int flags, struct samr_RemoveMultipleMembersFromAlias *r)
10797 TALLOC_CTX *_mem_save_alias_handle_0;
10798 TALLOC_CTX *_mem_save_sids_0;
10799 if (flags & NDR_IN) {
10800 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10801 NDR_PULL_ALLOC(ndr, r->in.alias_handle);
10803 _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10804 NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
10805 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
10806 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
10807 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10808 NDR_PULL_ALLOC(ndr, r->in.sids);
10810 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10811 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
10812 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10813 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
10815 if (flags & NDR_OUT) {
10816 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10818 return NDR_ERR_SUCCESS;
10821 _PUBLIC_ void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMultipleMembersFromAlias *r)
10823 ndr_print_struct(ndr, name, "samr_RemoveMultipleMembersFromAlias");
10824 ndr->depth++;
10825 if (flags & NDR_SET_VALUES) {
10826 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10828 if (flags & NDR_IN) {
10829 ndr_print_struct(ndr, "in", "samr_RemoveMultipleMembersFromAlias");
10830 ndr->depth++;
10831 ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
10832 ndr->depth++;
10833 ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
10834 ndr->depth--;
10835 ndr_print_ptr(ndr, "sids", r->in.sids);
10836 ndr->depth++;
10837 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
10838 ndr->depth--;
10839 ndr->depth--;
10841 if (flags & NDR_OUT) {
10842 ndr_print_struct(ndr, "out", "samr_RemoveMultipleMembersFromAlias");
10843 ndr->depth++;
10844 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10845 ndr->depth--;
10847 ndr->depth--;
10850 static enum ndr_err_code ndr_push_samr_OemChangePasswordUser2(struct ndr_push *ndr, int flags, const struct samr_OemChangePasswordUser2 *r)
10852 if (flags & NDR_IN) {
10853 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
10854 if (r->in.server) {
10855 NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
10857 if (r->in.account == NULL) {
10858 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10860 NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
10861 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
10862 if (r->in.password) {
10863 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password));
10865 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hash));
10866 if (r->in.hash) {
10867 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.hash));
10870 if (flags & NDR_OUT) {
10871 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10873 return NDR_ERR_SUCCESS;
10876 static enum ndr_err_code ndr_pull_samr_OemChangePasswordUser2(struct ndr_pull *ndr, int flags, struct samr_OemChangePasswordUser2 *r)
10878 uint32_t _ptr_server;
10879 uint32_t _ptr_password;
10880 uint32_t _ptr_hash;
10881 TALLOC_CTX *_mem_save_server_0;
10882 TALLOC_CTX *_mem_save_account_0;
10883 TALLOC_CTX *_mem_save_password_0;
10884 TALLOC_CTX *_mem_save_hash_0;
10885 if (flags & NDR_IN) {
10886 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
10887 if (_ptr_server) {
10888 NDR_PULL_ALLOC(ndr, r->in.server);
10889 } else {
10890 r->in.server = NULL;
10892 if (r->in.server) {
10893 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
10894 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
10895 NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
10896 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
10898 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10899 NDR_PULL_ALLOC(ndr, r->in.account);
10901 _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
10902 NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
10903 NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
10904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
10905 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
10906 if (_ptr_password) {
10907 NDR_PULL_ALLOC(ndr, r->in.password);
10908 } else {
10909 r->in.password = NULL;
10911 if (r->in.password) {
10912 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
10913 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
10914 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password));
10915 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
10917 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hash));
10918 if (_ptr_hash) {
10919 NDR_PULL_ALLOC(ndr, r->in.hash);
10920 } else {
10921 r->in.hash = NULL;
10923 if (r->in.hash) {
10924 _mem_save_hash_0 = NDR_PULL_GET_MEM_CTX(ndr);
10925 NDR_PULL_SET_MEM_CTX(ndr, r->in.hash, 0);
10926 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.hash));
10927 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hash_0, 0);
10930 if (flags & NDR_OUT) {
10931 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10933 return NDR_ERR_SUCCESS;
10936 _PUBLIC_ void ndr_print_samr_OemChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_OemChangePasswordUser2 *r)
10938 ndr_print_struct(ndr, name, "samr_OemChangePasswordUser2");
10939 ndr->depth++;
10940 if (flags & NDR_SET_VALUES) {
10941 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10943 if (flags & NDR_IN) {
10944 ndr_print_struct(ndr, "in", "samr_OemChangePasswordUser2");
10945 ndr->depth++;
10946 ndr_print_ptr(ndr, "server", r->in.server);
10947 ndr->depth++;
10948 if (r->in.server) {
10949 ndr_print_lsa_AsciiString(ndr, "server", r->in.server);
10951 ndr->depth--;
10952 ndr_print_ptr(ndr, "account", r->in.account);
10953 ndr->depth++;
10954 ndr_print_lsa_AsciiString(ndr, "account", r->in.account);
10955 ndr->depth--;
10956 ndr_print_ptr(ndr, "password", r->in.password);
10957 ndr->depth++;
10958 if (r->in.password) {
10959 ndr_print_samr_CryptPassword(ndr, "password", r->in.password);
10961 ndr->depth--;
10962 ndr_print_ptr(ndr, "hash", r->in.hash);
10963 ndr->depth++;
10964 if (r->in.hash) {
10965 ndr_print_samr_Password(ndr, "hash", r->in.hash);
10967 ndr->depth--;
10968 ndr->depth--;
10970 if (flags & NDR_OUT) {
10971 ndr_print_struct(ndr, "out", "samr_OemChangePasswordUser2");
10972 ndr->depth++;
10973 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10974 ndr->depth--;
10976 ndr->depth--;
10979 static enum ndr_err_code ndr_push_samr_ChangePasswordUser2(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser2 *r)
10981 if (flags & NDR_IN) {
10982 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
10983 if (r->in.server) {
10984 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
10986 if (r->in.account == NULL) {
10987 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10989 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
10990 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_password));
10991 if (r->in.nt_password) {
10992 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
10994 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_verifier));
10995 if (r->in.nt_verifier) {
10996 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
10998 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_change));
10999 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_password));
11000 if (r->in.lm_password) {
11001 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
11003 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_verifier));
11004 if (r->in.lm_verifier) {
11005 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
11008 if (flags & NDR_OUT) {
11009 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11011 return NDR_ERR_SUCCESS;
11014 static enum ndr_err_code ndr_pull_samr_ChangePasswordUser2(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser2 *r)
11016 uint32_t _ptr_server;
11017 uint32_t _ptr_nt_password;
11018 uint32_t _ptr_nt_verifier;
11019 uint32_t _ptr_lm_password;
11020 uint32_t _ptr_lm_verifier;
11021 TALLOC_CTX *_mem_save_server_0;
11022 TALLOC_CTX *_mem_save_account_0;
11023 TALLOC_CTX *_mem_save_nt_password_0;
11024 TALLOC_CTX *_mem_save_nt_verifier_0;
11025 TALLOC_CTX *_mem_save_lm_password_0;
11026 TALLOC_CTX *_mem_save_lm_verifier_0;
11027 if (flags & NDR_IN) {
11028 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
11029 if (_ptr_server) {
11030 NDR_PULL_ALLOC(ndr, r->in.server);
11031 } else {
11032 r->in.server = NULL;
11034 if (r->in.server) {
11035 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
11036 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
11037 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
11038 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
11040 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11041 NDR_PULL_ALLOC(ndr, r->in.account);
11043 _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
11044 NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
11045 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
11046 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
11047 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_password));
11048 if (_ptr_nt_password) {
11049 NDR_PULL_ALLOC(ndr, r->in.nt_password);
11050 } else {
11051 r->in.nt_password = NULL;
11053 if (r->in.nt_password) {
11054 _mem_save_nt_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11055 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_password, 0);
11056 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
11057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_password_0, 0);
11059 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_verifier));
11060 if (_ptr_nt_verifier) {
11061 NDR_PULL_ALLOC(ndr, r->in.nt_verifier);
11062 } else {
11063 r->in.nt_verifier = NULL;
11065 if (r->in.nt_verifier) {
11066 _mem_save_nt_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
11067 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_verifier, 0);
11068 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
11069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_verifier_0, 0);
11071 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_change));
11072 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_password));
11073 if (_ptr_lm_password) {
11074 NDR_PULL_ALLOC(ndr, r->in.lm_password);
11075 } else {
11076 r->in.lm_password = NULL;
11078 if (r->in.lm_password) {
11079 _mem_save_lm_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11080 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_password, 0);
11081 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
11082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_password_0, 0);
11084 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_verifier));
11085 if (_ptr_lm_verifier) {
11086 NDR_PULL_ALLOC(ndr, r->in.lm_verifier);
11087 } else {
11088 r->in.lm_verifier = NULL;
11090 if (r->in.lm_verifier) {
11091 _mem_save_lm_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
11092 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_verifier, 0);
11093 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
11094 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_verifier_0, 0);
11097 if (flags & NDR_OUT) {
11098 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11100 return NDR_ERR_SUCCESS;
11103 _PUBLIC_ void ndr_print_samr_ChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser2 *r)
11105 ndr_print_struct(ndr, name, "samr_ChangePasswordUser2");
11106 ndr->depth++;
11107 if (flags & NDR_SET_VALUES) {
11108 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11110 if (flags & NDR_IN) {
11111 ndr_print_struct(ndr, "in", "samr_ChangePasswordUser2");
11112 ndr->depth++;
11113 ndr_print_ptr(ndr, "server", r->in.server);
11114 ndr->depth++;
11115 if (r->in.server) {
11116 ndr_print_lsa_String(ndr, "server", r->in.server);
11118 ndr->depth--;
11119 ndr_print_ptr(ndr, "account", r->in.account);
11120 ndr->depth++;
11121 ndr_print_lsa_String(ndr, "account", r->in.account);
11122 ndr->depth--;
11123 ndr_print_ptr(ndr, "nt_password", r->in.nt_password);
11124 ndr->depth++;
11125 if (r->in.nt_password) {
11126 ndr_print_samr_CryptPassword(ndr, "nt_password", r->in.nt_password);
11128 ndr->depth--;
11129 ndr_print_ptr(ndr, "nt_verifier", r->in.nt_verifier);
11130 ndr->depth++;
11131 if (r->in.nt_verifier) {
11132 ndr_print_samr_Password(ndr, "nt_verifier", r->in.nt_verifier);
11134 ndr->depth--;
11135 ndr_print_uint8(ndr, "lm_change", r->in.lm_change);
11136 ndr_print_ptr(ndr, "lm_password", r->in.lm_password);
11137 ndr->depth++;
11138 if (r->in.lm_password) {
11139 ndr_print_samr_CryptPassword(ndr, "lm_password", r->in.lm_password);
11141 ndr->depth--;
11142 ndr_print_ptr(ndr, "lm_verifier", r->in.lm_verifier);
11143 ndr->depth++;
11144 if (r->in.lm_verifier) {
11145 ndr_print_samr_Password(ndr, "lm_verifier", r->in.lm_verifier);
11147 ndr->depth--;
11148 ndr->depth--;
11150 if (flags & NDR_OUT) {
11151 ndr_print_struct(ndr, "out", "samr_ChangePasswordUser2");
11152 ndr->depth++;
11153 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11154 ndr->depth--;
11156 ndr->depth--;
11159 static enum ndr_err_code ndr_push_samr_GetDomPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetDomPwInfo *r)
11161 if (flags & NDR_IN) {
11162 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
11163 if (r->in.domain_name) {
11164 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
11167 if (flags & NDR_OUT) {
11168 if (r->out.info == NULL) {
11169 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11171 NDR_CHECK(ndr_push_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
11172 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11174 return NDR_ERR_SUCCESS;
11177 static enum ndr_err_code ndr_pull_samr_GetDomPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetDomPwInfo *r)
11179 uint32_t _ptr_domain_name;
11180 TALLOC_CTX *_mem_save_domain_name_0;
11181 TALLOC_CTX *_mem_save_info_0;
11182 if (flags & NDR_IN) {
11183 ZERO_STRUCT(r->out);
11185 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
11186 if (_ptr_domain_name) {
11187 NDR_PULL_ALLOC(ndr, r->in.domain_name);
11188 } else {
11189 r->in.domain_name = NULL;
11191 if (r->in.domain_name) {
11192 _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11193 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
11194 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
11195 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
11197 NDR_PULL_ALLOC(ndr, r->out.info);
11198 ZERO_STRUCTP(r->out.info);
11200 if (flags & NDR_OUT) {
11201 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11202 NDR_PULL_ALLOC(ndr, r->out.info);
11204 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11205 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
11206 NDR_CHECK(ndr_pull_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
11207 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11208 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11210 return NDR_ERR_SUCCESS;
11213 _PUBLIC_ void ndr_print_samr_GetDomPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDomPwInfo *r)
11215 ndr_print_struct(ndr, name, "samr_GetDomPwInfo");
11216 ndr->depth++;
11217 if (flags & NDR_SET_VALUES) {
11218 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11220 if (flags & NDR_IN) {
11221 ndr_print_struct(ndr, "in", "samr_GetDomPwInfo");
11222 ndr->depth++;
11223 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
11224 ndr->depth++;
11225 if (r->in.domain_name) {
11226 ndr_print_lsa_String(ndr, "domain_name", r->in.domain_name);
11228 ndr->depth--;
11229 ndr->depth--;
11231 if (flags & NDR_OUT) {
11232 ndr_print_struct(ndr, "out", "samr_GetDomPwInfo");
11233 ndr->depth++;
11234 ndr_print_ptr(ndr, "info", r->out.info);
11235 ndr->depth++;
11236 ndr_print_samr_PwInfo(ndr, "info", r->out.info);
11237 ndr->depth--;
11238 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11239 ndr->depth--;
11241 ndr->depth--;
11244 static enum ndr_err_code ndr_push_samr_Connect2(struct ndr_push *ndr, int flags, const struct samr_Connect2 *r)
11246 if (flags & NDR_IN) {
11247 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
11248 if (r->in.system_name) {
11249 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11250 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11251 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11252 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));
11254 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
11256 if (flags & NDR_OUT) {
11257 if (r->out.connect_handle == NULL) {
11258 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11260 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11261 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11263 return NDR_ERR_SUCCESS;
11266 static enum ndr_err_code ndr_pull_samr_Connect2(struct ndr_pull *ndr, int flags, struct samr_Connect2 *r)
11268 uint32_t _ptr_system_name;
11269 TALLOC_CTX *_mem_save_system_name_0;
11270 TALLOC_CTX *_mem_save_connect_handle_0;
11271 if (flags & NDR_IN) {
11272 ZERO_STRUCT(r->out);
11274 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
11275 if (_ptr_system_name) {
11276 NDR_PULL_ALLOC(ndr, r->in.system_name);
11277 } else {
11278 r->in.system_name = NULL;
11280 if (r->in.system_name) {
11281 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11282 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
11283 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
11284 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
11285 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
11286 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));
11288 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
11289 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));
11290 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
11292 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
11293 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11294 ZERO_STRUCTP(r->out.connect_handle);
11296 if (flags & NDR_OUT) {
11297 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11298 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11300 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11301 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
11302 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11303 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
11304 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11306 return NDR_ERR_SUCCESS;
11309 _PUBLIC_ void ndr_print_samr_Connect2(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect2 *r)
11311 ndr_print_struct(ndr, name, "samr_Connect2");
11312 ndr->depth++;
11313 if (flags & NDR_SET_VALUES) {
11314 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11316 if (flags & NDR_IN) {
11317 ndr_print_struct(ndr, "in", "samr_Connect2");
11318 ndr->depth++;
11319 ndr_print_ptr(ndr, "system_name", r->in.system_name);
11320 ndr->depth++;
11321 if (r->in.system_name) {
11322 ndr_print_string(ndr, "system_name", r->in.system_name);
11324 ndr->depth--;
11325 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
11326 ndr->depth--;
11328 if (flags & NDR_OUT) {
11329 ndr_print_struct(ndr, "out", "samr_Connect2");
11330 ndr->depth++;
11331 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
11332 ndr->depth++;
11333 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
11334 ndr->depth--;
11335 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11336 ndr->depth--;
11338 ndr->depth--;
11341 _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo2(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo2 *r)
11343 if (flags & NDR_IN) {
11344 if (r->in.user_handle == NULL) {
11345 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11347 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
11348 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
11349 if (r->in.info == NULL) {
11350 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11352 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
11353 NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11355 if (flags & NDR_OUT) {
11356 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11358 return NDR_ERR_SUCCESS;
11361 _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo2 *r)
11363 TALLOC_CTX *_mem_save_user_handle_0;
11364 TALLOC_CTX *_mem_save_info_0;
11365 if (flags & NDR_IN) {
11366 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11367 NDR_PULL_ALLOC(ndr, r->in.user_handle);
11369 _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11370 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
11371 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
11372 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
11373 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
11374 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11375 NDR_PULL_ALLOC(ndr, r->in.info);
11377 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11378 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
11379 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
11380 NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11381 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11383 if (flags & NDR_OUT) {
11384 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11386 return NDR_ERR_SUCCESS;
11389 _PUBLIC_ void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo2 *r)
11391 ndr_print_struct(ndr, name, "samr_SetUserInfo2");
11392 ndr->depth++;
11393 if (flags & NDR_SET_VALUES) {
11394 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11396 if (flags & NDR_IN) {
11397 ndr_print_struct(ndr, "in", "samr_SetUserInfo2");
11398 ndr->depth++;
11399 ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
11400 ndr->depth++;
11401 ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
11402 ndr->depth--;
11403 ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
11404 ndr_print_ptr(ndr, "info", r->in.info);
11405 ndr->depth++;
11406 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
11407 ndr_print_samr_UserInfo(ndr, "info", r->in.info);
11408 ndr->depth--;
11409 ndr->depth--;
11411 if (flags & NDR_OUT) {
11412 ndr_print_struct(ndr, "out", "samr_SetUserInfo2");
11413 ndr->depth++;
11414 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11415 ndr->depth--;
11417 ndr->depth--;
11420 static enum ndr_err_code ndr_push_samr_SetBootKeyInformation(struct ndr_push *ndr, int flags, const struct samr_SetBootKeyInformation *r)
11422 if (flags & NDR_IN) {
11423 if (r->in.connect_handle == NULL) {
11424 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11426 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
11427 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
11428 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
11429 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
11431 if (flags & NDR_OUT) {
11432 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11434 return NDR_ERR_SUCCESS;
11437 static enum ndr_err_code ndr_pull_samr_SetBootKeyInformation(struct ndr_pull *ndr, int flags, struct samr_SetBootKeyInformation *r)
11439 TALLOC_CTX *_mem_save_connect_handle_0;
11440 if (flags & NDR_IN) {
11441 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11442 NDR_PULL_ALLOC(ndr, r->in.connect_handle);
11444 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11445 NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
11446 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
11447 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
11448 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
11449 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
11450 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
11452 if (flags & NDR_OUT) {
11453 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11455 return NDR_ERR_SUCCESS;
11458 _PUBLIC_ void ndr_print_samr_SetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetBootKeyInformation *r)
11460 ndr_print_struct(ndr, name, "samr_SetBootKeyInformation");
11461 ndr->depth++;
11462 if (flags & NDR_SET_VALUES) {
11463 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11465 if (flags & NDR_IN) {
11466 ndr_print_struct(ndr, "in", "samr_SetBootKeyInformation");
11467 ndr->depth++;
11468 ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
11469 ndr->depth++;
11470 ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
11471 ndr->depth--;
11472 ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
11473 ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
11474 ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
11475 ndr->depth--;
11477 if (flags & NDR_OUT) {
11478 ndr_print_struct(ndr, "out", "samr_SetBootKeyInformation");
11479 ndr->depth++;
11480 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11481 ndr->depth--;
11483 ndr->depth--;
11486 static enum ndr_err_code ndr_push_samr_GetBootKeyInformation(struct ndr_push *ndr, int flags, const struct samr_GetBootKeyInformation *r)
11488 if (flags & NDR_IN) {
11489 if (r->in.domain_handle == NULL) {
11490 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11492 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11494 if (flags & NDR_OUT) {
11495 if (r->out.unknown == NULL) {
11496 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11498 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown));
11499 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11501 return NDR_ERR_SUCCESS;
11504 static enum ndr_err_code ndr_pull_samr_GetBootKeyInformation(struct ndr_pull *ndr, int flags, struct samr_GetBootKeyInformation *r)
11506 TALLOC_CTX *_mem_save_domain_handle_0;
11507 TALLOC_CTX *_mem_save_unknown_0;
11508 if (flags & NDR_IN) {
11509 ZERO_STRUCT(r->out);
11511 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11512 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11514 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11515 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
11516 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11517 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
11518 NDR_PULL_ALLOC(ndr, r->out.unknown);
11519 ZERO_STRUCTP(r->out.unknown);
11521 if (flags & NDR_OUT) {
11522 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11523 NDR_PULL_ALLOC(ndr, r->out.unknown);
11525 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
11526 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, LIBNDR_FLAG_REF_ALLOC);
11527 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown));
11528 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, LIBNDR_FLAG_REF_ALLOC);
11529 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11531 return NDR_ERR_SUCCESS;
11534 _PUBLIC_ void ndr_print_samr_GetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetBootKeyInformation *r)
11536 ndr_print_struct(ndr, name, "samr_GetBootKeyInformation");
11537 ndr->depth++;
11538 if (flags & NDR_SET_VALUES) {
11539 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11541 if (flags & NDR_IN) {
11542 ndr_print_struct(ndr, "in", "samr_GetBootKeyInformation");
11543 ndr->depth++;
11544 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
11545 ndr->depth++;
11546 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
11547 ndr->depth--;
11548 ndr->depth--;
11550 if (flags & NDR_OUT) {
11551 ndr_print_struct(ndr, "out", "samr_GetBootKeyInformation");
11552 ndr->depth++;
11553 ndr_print_ptr(ndr, "unknown", r->out.unknown);
11554 ndr->depth++;
11555 ndr_print_uint32(ndr, "unknown", *r->out.unknown);
11556 ndr->depth--;
11557 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11558 ndr->depth--;
11560 ndr->depth--;
11563 static enum ndr_err_code ndr_push_samr_Connect3(struct ndr_push *ndr, int flags, const struct samr_Connect3 *r)
11565 if (flags & NDR_IN) {
11566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
11567 if (r->in.system_name) {
11568 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11569 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11570 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11571 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));
11573 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
11574 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
11576 if (flags & NDR_OUT) {
11577 if (r->out.connect_handle == NULL) {
11578 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11580 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11581 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11583 return NDR_ERR_SUCCESS;
11586 static enum ndr_err_code ndr_pull_samr_Connect3(struct ndr_pull *ndr, int flags, struct samr_Connect3 *r)
11588 uint32_t _ptr_system_name;
11589 TALLOC_CTX *_mem_save_system_name_0;
11590 TALLOC_CTX *_mem_save_connect_handle_0;
11591 if (flags & NDR_IN) {
11592 ZERO_STRUCT(r->out);
11594 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
11595 if (_ptr_system_name) {
11596 NDR_PULL_ALLOC(ndr, r->in.system_name);
11597 } else {
11598 r->in.system_name = NULL;
11600 if (r->in.system_name) {
11601 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11602 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
11603 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
11604 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
11605 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
11606 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));
11608 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
11609 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));
11610 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
11612 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
11613 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
11614 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11615 ZERO_STRUCTP(r->out.connect_handle);
11617 if (flags & NDR_OUT) {
11618 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11619 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11621 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11622 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
11623 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11624 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
11625 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11627 return NDR_ERR_SUCCESS;
11630 _PUBLIC_ void ndr_print_samr_Connect3(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect3 *r)
11632 ndr_print_struct(ndr, name, "samr_Connect3");
11633 ndr->depth++;
11634 if (flags & NDR_SET_VALUES) {
11635 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11637 if (flags & NDR_IN) {
11638 ndr_print_struct(ndr, "in", "samr_Connect3");
11639 ndr->depth++;
11640 ndr_print_ptr(ndr, "system_name", r->in.system_name);
11641 ndr->depth++;
11642 if (r->in.system_name) {
11643 ndr_print_string(ndr, "system_name", r->in.system_name);
11645 ndr->depth--;
11646 ndr_print_uint32(ndr, "unknown", r->in.unknown);
11647 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
11648 ndr->depth--;
11650 if (flags & NDR_OUT) {
11651 ndr_print_struct(ndr, "out", "samr_Connect3");
11652 ndr->depth++;
11653 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
11654 ndr->depth++;
11655 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
11656 ndr->depth--;
11657 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11658 ndr->depth--;
11660 ndr->depth--;
11663 static enum ndr_err_code ndr_push_samr_Connect4(struct ndr_push *ndr, int flags, const struct samr_Connect4 *r)
11665 if (flags & NDR_IN) {
11666 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
11667 if (r->in.system_name) {
11668 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11669 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11670 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
11671 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));
11673 NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->in.client_version));
11674 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
11676 if (flags & NDR_OUT) {
11677 if (r->out.connect_handle == NULL) {
11678 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11680 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11681 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11683 return NDR_ERR_SUCCESS;
11686 static enum ndr_err_code ndr_pull_samr_Connect4(struct ndr_pull *ndr, int flags, struct samr_Connect4 *r)
11688 uint32_t _ptr_system_name;
11689 TALLOC_CTX *_mem_save_system_name_0;
11690 TALLOC_CTX *_mem_save_connect_handle_0;
11691 if (flags & NDR_IN) {
11692 ZERO_STRUCT(r->out);
11694 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
11695 if (_ptr_system_name) {
11696 NDR_PULL_ALLOC(ndr, r->in.system_name);
11697 } else {
11698 r->in.system_name = NULL;
11700 if (r->in.system_name) {
11701 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11702 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
11703 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
11704 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
11705 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
11706 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));
11708 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
11709 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));
11710 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
11712 NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->in.client_version));
11713 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
11714 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11715 ZERO_STRUCTP(r->out.connect_handle);
11717 if (flags & NDR_OUT) {
11718 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11719 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
11721 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11722 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
11723 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
11724 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
11725 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11727 return NDR_ERR_SUCCESS;
11730 _PUBLIC_ void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect4 *r)
11732 ndr_print_struct(ndr, name, "samr_Connect4");
11733 ndr->depth++;
11734 if (flags & NDR_SET_VALUES) {
11735 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11737 if (flags & NDR_IN) {
11738 ndr_print_struct(ndr, "in", "samr_Connect4");
11739 ndr->depth++;
11740 ndr_print_ptr(ndr, "system_name", r->in.system_name);
11741 ndr->depth++;
11742 if (r->in.system_name) {
11743 ndr_print_string(ndr, "system_name", r->in.system_name);
11745 ndr->depth--;
11746 ndr_print_samr_ConnectVersion(ndr, "client_version", r->in.client_version);
11747 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
11748 ndr->depth--;
11750 if (flags & NDR_OUT) {
11751 ndr_print_struct(ndr, "out", "samr_Connect4");
11752 ndr->depth++;
11753 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
11754 ndr->depth++;
11755 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
11756 ndr->depth--;
11757 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11758 ndr->depth--;
11760 ndr->depth--;
11763 static enum ndr_err_code ndr_push_samr_ChangePasswordUser3(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser3 *r)
11765 if (flags & NDR_IN) {
11766 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
11767 if (r->in.server) {
11768 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
11770 if (r->in.account == NULL) {
11771 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11773 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
11774 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_password));
11775 if (r->in.nt_password) {
11776 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
11778 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_verifier));
11779 if (r->in.nt_verifier) {
11780 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
11782 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_change));
11783 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_password));
11784 if (r->in.lm_password) {
11785 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
11787 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_verifier));
11788 if (r->in.lm_verifier) {
11789 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
11791 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password3));
11792 if (r->in.password3) {
11793 NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password3));
11796 if (flags & NDR_OUT) {
11797 if (r->out.dominfo == NULL) {
11798 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11800 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dominfo));
11801 if (*r->out.dominfo) {
11802 NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, *r->out.dominfo));
11804 if (r->out.reject == NULL) {
11805 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11807 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.reject));
11808 if (*r->out.reject) {
11809 NDR_CHECK(ndr_push_samr_ChangeReject(ndr, NDR_SCALARS, *r->out.reject));
11811 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11813 return NDR_ERR_SUCCESS;
11816 static enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser3 *r)
11818 uint32_t _ptr_server;
11819 uint32_t _ptr_nt_password;
11820 uint32_t _ptr_nt_verifier;
11821 uint32_t _ptr_lm_password;
11822 uint32_t _ptr_lm_verifier;
11823 uint32_t _ptr_password3;
11824 uint32_t _ptr_dominfo;
11825 uint32_t _ptr_reject;
11826 TALLOC_CTX *_mem_save_server_0;
11827 TALLOC_CTX *_mem_save_account_0;
11828 TALLOC_CTX *_mem_save_nt_password_0;
11829 TALLOC_CTX *_mem_save_nt_verifier_0;
11830 TALLOC_CTX *_mem_save_lm_password_0;
11831 TALLOC_CTX *_mem_save_lm_verifier_0;
11832 TALLOC_CTX *_mem_save_password3_0;
11833 TALLOC_CTX *_mem_save_dominfo_0;
11834 TALLOC_CTX *_mem_save_dominfo_1;
11835 TALLOC_CTX *_mem_save_reject_0;
11836 TALLOC_CTX *_mem_save_reject_1;
11837 if (flags & NDR_IN) {
11838 ZERO_STRUCT(r->out);
11840 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
11841 if (_ptr_server) {
11842 NDR_PULL_ALLOC(ndr, r->in.server);
11843 } else {
11844 r->in.server = NULL;
11846 if (r->in.server) {
11847 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
11848 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
11849 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
11850 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
11852 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11853 NDR_PULL_ALLOC(ndr, r->in.account);
11855 _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
11856 NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
11857 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
11858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
11859 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_password));
11860 if (_ptr_nt_password) {
11861 NDR_PULL_ALLOC(ndr, r->in.nt_password);
11862 } else {
11863 r->in.nt_password = NULL;
11865 if (r->in.nt_password) {
11866 _mem_save_nt_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11867 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_password, 0);
11868 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
11869 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_password_0, 0);
11871 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_verifier));
11872 if (_ptr_nt_verifier) {
11873 NDR_PULL_ALLOC(ndr, r->in.nt_verifier);
11874 } else {
11875 r->in.nt_verifier = NULL;
11877 if (r->in.nt_verifier) {
11878 _mem_save_nt_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
11879 NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_verifier, 0);
11880 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
11881 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_verifier_0, 0);
11883 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_change));
11884 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_password));
11885 if (_ptr_lm_password) {
11886 NDR_PULL_ALLOC(ndr, r->in.lm_password);
11887 } else {
11888 r->in.lm_password = NULL;
11890 if (r->in.lm_password) {
11891 _mem_save_lm_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11892 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_password, 0);
11893 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
11894 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_password_0, 0);
11896 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_verifier));
11897 if (_ptr_lm_verifier) {
11898 NDR_PULL_ALLOC(ndr, r->in.lm_verifier);
11899 } else {
11900 r->in.lm_verifier = NULL;
11902 if (r->in.lm_verifier) {
11903 _mem_save_lm_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
11904 NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_verifier, 0);
11905 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
11906 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_verifier_0, 0);
11908 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password3));
11909 if (_ptr_password3) {
11910 NDR_PULL_ALLOC(ndr, r->in.password3);
11911 } else {
11912 r->in.password3 = NULL;
11914 if (r->in.password3) {
11915 _mem_save_password3_0 = NDR_PULL_GET_MEM_CTX(ndr);
11916 NDR_PULL_SET_MEM_CTX(ndr, r->in.password3, 0);
11917 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password3));
11918 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password3_0, 0);
11920 NDR_PULL_ALLOC(ndr, r->out.dominfo);
11921 ZERO_STRUCTP(r->out.dominfo);
11922 NDR_PULL_ALLOC(ndr, r->out.reject);
11923 ZERO_STRUCTP(r->out.reject);
11925 if (flags & NDR_OUT) {
11926 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11927 NDR_PULL_ALLOC(ndr, r->out.dominfo);
11929 _mem_save_dominfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
11930 NDR_PULL_SET_MEM_CTX(ndr, r->out.dominfo, LIBNDR_FLAG_REF_ALLOC);
11931 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dominfo));
11932 if (_ptr_dominfo) {
11933 NDR_PULL_ALLOC(ndr, *r->out.dominfo);
11934 } else {
11935 *r->out.dominfo = NULL;
11937 if (*r->out.dominfo) {
11938 _mem_save_dominfo_1 = NDR_PULL_GET_MEM_CTX(ndr);
11939 NDR_PULL_SET_MEM_CTX(ndr, *r->out.dominfo, 0);
11940 NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, *r->out.dominfo));
11941 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dominfo_1, 0);
11943 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dominfo_0, LIBNDR_FLAG_REF_ALLOC);
11944 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11945 NDR_PULL_ALLOC(ndr, r->out.reject);
11947 _mem_save_reject_0 = NDR_PULL_GET_MEM_CTX(ndr);
11948 NDR_PULL_SET_MEM_CTX(ndr, r->out.reject, LIBNDR_FLAG_REF_ALLOC);
11949 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_reject));
11950 if (_ptr_reject) {
11951 NDR_PULL_ALLOC(ndr, *r->out.reject);
11952 } else {
11953 *r->out.reject = NULL;
11955 if (*r->out.reject) {
11956 _mem_save_reject_1 = NDR_PULL_GET_MEM_CTX(ndr);
11957 NDR_PULL_SET_MEM_CTX(ndr, *r->out.reject, 0);
11958 NDR_CHECK(ndr_pull_samr_ChangeReject(ndr, NDR_SCALARS, *r->out.reject));
11959 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_1, 0);
11961 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_0, LIBNDR_FLAG_REF_ALLOC);
11962 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11964 return NDR_ERR_SUCCESS;
11967 _PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser3 *r)
11969 ndr_print_struct(ndr, name, "samr_ChangePasswordUser3");
11970 ndr->depth++;
11971 if (flags & NDR_SET_VALUES) {
11972 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11974 if (flags & NDR_IN) {
11975 ndr_print_struct(ndr, "in", "samr_ChangePasswordUser3");
11976 ndr->depth++;
11977 ndr_print_ptr(ndr, "server", r->in.server);
11978 ndr->depth++;
11979 if (r->in.server) {
11980 ndr_print_lsa_String(ndr, "server", r->in.server);
11982 ndr->depth--;
11983 ndr_print_ptr(ndr, "account", r->in.account);
11984 ndr->depth++;
11985 ndr_print_lsa_String(ndr, "account", r->in.account);
11986 ndr->depth--;
11987 ndr_print_ptr(ndr, "nt_password", r->in.nt_password);
11988 ndr->depth++;
11989 if (r->in.nt_password) {
11990 ndr_print_samr_CryptPassword(ndr, "nt_password", r->in.nt_password);
11992 ndr->depth--;
11993 ndr_print_ptr(ndr, "nt_verifier", r->in.nt_verifier);
11994 ndr->depth++;
11995 if (r->in.nt_verifier) {
11996 ndr_print_samr_Password(ndr, "nt_verifier", r->in.nt_verifier);
11998 ndr->depth--;
11999 ndr_print_uint8(ndr, "lm_change", r->in.lm_change);
12000 ndr_print_ptr(ndr, "lm_password", r->in.lm_password);
12001 ndr->depth++;
12002 if (r->in.lm_password) {
12003 ndr_print_samr_CryptPassword(ndr, "lm_password", r->in.lm_password);
12005 ndr->depth--;
12006 ndr_print_ptr(ndr, "lm_verifier", r->in.lm_verifier);
12007 ndr->depth++;
12008 if (r->in.lm_verifier) {
12009 ndr_print_samr_Password(ndr, "lm_verifier", r->in.lm_verifier);
12011 ndr->depth--;
12012 ndr_print_ptr(ndr, "password3", r->in.password3);
12013 ndr->depth++;
12014 if (r->in.password3) {
12015 ndr_print_samr_CryptPassword(ndr, "password3", r->in.password3);
12017 ndr->depth--;
12018 ndr->depth--;
12020 if (flags & NDR_OUT) {
12021 ndr_print_struct(ndr, "out", "samr_ChangePasswordUser3");
12022 ndr->depth++;
12023 ndr_print_ptr(ndr, "dominfo", r->out.dominfo);
12024 ndr->depth++;
12025 ndr_print_ptr(ndr, "dominfo", *r->out.dominfo);
12026 ndr->depth++;
12027 if (*r->out.dominfo) {
12028 ndr_print_samr_DomInfo1(ndr, "dominfo", *r->out.dominfo);
12030 ndr->depth--;
12031 ndr->depth--;
12032 ndr_print_ptr(ndr, "reject", r->out.reject);
12033 ndr->depth++;
12034 ndr_print_ptr(ndr, "reject", *r->out.reject);
12035 ndr->depth++;
12036 if (*r->out.reject) {
12037 ndr_print_samr_ChangeReject(ndr, "reject", *r->out.reject);
12039 ndr->depth--;
12040 ndr->depth--;
12041 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12042 ndr->depth--;
12044 ndr->depth--;
12047 _PUBLIC_ enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flags, const struct samr_Connect5 *r)
12049 if (flags & NDR_IN) {
12050 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
12051 if (r->in.system_name) {
12052 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12053 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12054 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12055 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));
12057 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
12058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level_in));
12059 if (r->in.info_in == NULL) {
12060 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12062 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info_in, r->in.level_in));
12063 NDR_CHECK(ndr_push_samr_ConnectInfo(ndr, NDR_SCALARS, r->in.info_in));
12065 if (flags & NDR_OUT) {
12066 if (r->out.level_out == NULL) {
12067 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12069 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
12070 if (r->out.info_out == NULL) {
12071 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12073 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info_out, *r->out.level_out));
12074 NDR_CHECK(ndr_push_samr_ConnectInfo(ndr, NDR_SCALARS, r->out.info_out));
12075 if (r->out.connect_handle == NULL) {
12076 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12078 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12079 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12081 return NDR_ERR_SUCCESS;
12084 _PUBLIC_ enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r)
12086 uint32_t _ptr_system_name;
12087 TALLOC_CTX *_mem_save_system_name_0;
12088 TALLOC_CTX *_mem_save_info_in_0;
12089 TALLOC_CTX *_mem_save_level_out_0;
12090 TALLOC_CTX *_mem_save_info_out_0;
12091 TALLOC_CTX *_mem_save_connect_handle_0;
12092 if (flags & NDR_IN) {
12093 ZERO_STRUCT(r->out);
12095 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
12096 if (_ptr_system_name) {
12097 NDR_PULL_ALLOC(ndr, r->in.system_name);
12098 } else {
12099 r->in.system_name = NULL;
12101 if (r->in.system_name) {
12102 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12103 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
12104 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
12105 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
12106 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
12107 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));
12109 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
12110 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));
12111 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
12113 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
12114 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level_in));
12115 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12116 NDR_PULL_ALLOC(ndr, r->in.info_in);
12118 _mem_save_info_in_0 = NDR_PULL_GET_MEM_CTX(ndr);
12119 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_in, LIBNDR_FLAG_REF_ALLOC);
12120 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info_in, r->in.level_in));
12121 NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr, NDR_SCALARS, r->in.info_in));
12122 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_in_0, LIBNDR_FLAG_REF_ALLOC);
12123 NDR_PULL_ALLOC(ndr, r->out.level_out);
12124 ZERO_STRUCTP(r->out.level_out);
12125 NDR_PULL_ALLOC(ndr, r->out.info_out);
12126 ZERO_STRUCTP(r->out.info_out);
12127 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12128 ZERO_STRUCTP(r->out.connect_handle);
12130 if (flags & NDR_OUT) {
12131 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12132 NDR_PULL_ALLOC(ndr, r->out.level_out);
12134 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
12135 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
12136 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
12137 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
12138 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12139 NDR_PULL_ALLOC(ndr, r->out.info_out);
12141 _mem_save_info_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
12142 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_out, LIBNDR_FLAG_REF_ALLOC);
12143 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info_out, *r->out.level_out));
12144 NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr, NDR_SCALARS, r->out.info_out));
12145 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_out_0, LIBNDR_FLAG_REF_ALLOC);
12146 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12147 NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12149 _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12150 NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
12151 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12152 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
12153 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12155 return NDR_ERR_SUCCESS;
12158 _PUBLIC_ void ndr_print_samr_Connect5(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect5 *r)
12160 ndr_print_struct(ndr, name, "samr_Connect5");
12161 ndr->depth++;
12162 if (flags & NDR_SET_VALUES) {
12163 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12165 if (flags & NDR_IN) {
12166 ndr_print_struct(ndr, "in", "samr_Connect5");
12167 ndr->depth++;
12168 ndr_print_ptr(ndr, "system_name", r->in.system_name);
12169 ndr->depth++;
12170 if (r->in.system_name) {
12171 ndr_print_string(ndr, "system_name", r->in.system_name);
12173 ndr->depth--;
12174 ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
12175 ndr_print_uint32(ndr, "level_in", r->in.level_in);
12176 ndr_print_ptr(ndr, "info_in", r->in.info_in);
12177 ndr->depth++;
12178 ndr_print_set_switch_value(ndr, r->in.info_in, r->in.level_in);
12179 ndr_print_samr_ConnectInfo(ndr, "info_in", r->in.info_in);
12180 ndr->depth--;
12181 ndr->depth--;
12183 if (flags & NDR_OUT) {
12184 ndr_print_struct(ndr, "out", "samr_Connect5");
12185 ndr->depth++;
12186 ndr_print_ptr(ndr, "level_out", r->out.level_out);
12187 ndr->depth++;
12188 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
12189 ndr->depth--;
12190 ndr_print_ptr(ndr, "info_out", r->out.info_out);
12191 ndr->depth++;
12192 ndr_print_set_switch_value(ndr, r->out.info_out, *r->out.level_out);
12193 ndr_print_samr_ConnectInfo(ndr, "info_out", r->out.info_out);
12194 ndr->depth--;
12195 ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
12196 ndr->depth++;
12197 ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
12198 ndr->depth--;
12199 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12200 ndr->depth--;
12202 ndr->depth--;
12205 static enum ndr_err_code ndr_push_samr_RidToSid(struct ndr_push *ndr, int flags, const struct samr_RidToSid *r)
12207 if (flags & NDR_IN) {
12208 if (r->in.domain_handle == NULL) {
12209 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12211 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
12212 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
12214 if (flags & NDR_OUT) {
12215 if (r->out.sid == NULL) {
12216 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12218 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sid));
12219 if (*r->out.sid) {
12220 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
12222 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12224 return NDR_ERR_SUCCESS;
12227 static enum ndr_err_code ndr_pull_samr_RidToSid(struct ndr_pull *ndr, int flags, struct samr_RidToSid *r)
12229 uint32_t _ptr_sid;
12230 TALLOC_CTX *_mem_save_domain_handle_0;
12231 TALLOC_CTX *_mem_save_sid_0;
12232 TALLOC_CTX *_mem_save_sid_1;
12233 if (flags & NDR_IN) {
12234 ZERO_STRUCT(r->out);
12236 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12237 NDR_PULL_ALLOC(ndr, r->in.domain_handle);
12239 _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12240 NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
12241 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
12242 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
12243 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
12244 NDR_PULL_ALLOC(ndr, r->out.sid);
12245 ZERO_STRUCTP(r->out.sid);
12247 if (flags & NDR_OUT) {
12248 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12249 NDR_PULL_ALLOC(ndr, r->out.sid);
12251 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
12252 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
12253 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
12254 if (_ptr_sid) {
12255 NDR_PULL_ALLOC(ndr, *r->out.sid);
12256 } else {
12257 *r->out.sid = NULL;
12259 if (*r->out.sid) {
12260 _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr);
12261 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, 0);
12262 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
12263 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, 0);
12265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
12266 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12268 return NDR_ERR_SUCCESS;
12271 _PUBLIC_ void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, int flags, const struct samr_RidToSid *r)
12273 ndr_print_struct(ndr, name, "samr_RidToSid");
12274 ndr->depth++;
12275 if (flags & NDR_SET_VALUES) {
12276 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12278 if (flags & NDR_IN) {
12279 ndr_print_struct(ndr, "in", "samr_RidToSid");
12280 ndr->depth++;
12281 ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
12282 ndr->depth++;
12283 ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
12284 ndr->depth--;
12285 ndr_print_uint32(ndr, "rid", r->in.rid);
12286 ndr->depth--;
12288 if (flags & NDR_OUT) {
12289 ndr_print_struct(ndr, "out", "samr_RidToSid");
12290 ndr->depth++;
12291 ndr_print_ptr(ndr, "sid", r->out.sid);
12292 ndr->depth++;
12293 ndr_print_ptr(ndr, "sid", *r->out.sid);
12294 ndr->depth++;
12295 if (*r->out.sid) {
12296 ndr_print_dom_sid2(ndr, "sid", *r->out.sid);
12298 ndr->depth--;
12299 ndr->depth--;
12300 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12301 ndr->depth--;
12303 ndr->depth--;
12306 static enum ndr_err_code ndr_push_samr_SetDsrmPassword(struct ndr_push *ndr, int flags, const struct samr_SetDsrmPassword *r)
12308 if (flags & NDR_IN) {
12309 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.name));
12310 if (r->in.name) {
12311 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
12313 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
12314 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hash));
12315 if (r->in.hash) {
12316 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.hash));
12319 if (flags & NDR_OUT) {
12320 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12322 return NDR_ERR_SUCCESS;
12325 static enum ndr_err_code ndr_pull_samr_SetDsrmPassword(struct ndr_pull *ndr, int flags, struct samr_SetDsrmPassword *r)
12327 uint32_t _ptr_name;
12328 uint32_t _ptr_hash;
12329 TALLOC_CTX *_mem_save_name_0;
12330 TALLOC_CTX *_mem_save_hash_0;
12331 if (flags & NDR_IN) {
12332 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12333 if (_ptr_name) {
12334 NDR_PULL_ALLOC(ndr, r->in.name);
12335 } else {
12336 r->in.name = NULL;
12338 if (r->in.name) {
12339 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12340 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, 0);
12341 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
12342 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12344 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
12345 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hash));
12346 if (_ptr_hash) {
12347 NDR_PULL_ALLOC(ndr, r->in.hash);
12348 } else {
12349 r->in.hash = NULL;
12351 if (r->in.hash) {
12352 _mem_save_hash_0 = NDR_PULL_GET_MEM_CTX(ndr);
12353 NDR_PULL_SET_MEM_CTX(ndr, r->in.hash, 0);
12354 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.hash));
12355 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hash_0, 0);
12358 if (flags & NDR_OUT) {
12359 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12361 return NDR_ERR_SUCCESS;
12364 _PUBLIC_ void ndr_print_samr_SetDsrmPassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDsrmPassword *r)
12366 ndr_print_struct(ndr, name, "samr_SetDsrmPassword");
12367 ndr->depth++;
12368 if (flags & NDR_SET_VALUES) {
12369 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12371 if (flags & NDR_IN) {
12372 ndr_print_struct(ndr, "in", "samr_SetDsrmPassword");
12373 ndr->depth++;
12374 ndr_print_ptr(ndr, "name", r->in.name);
12375 ndr->depth++;
12376 if (r->in.name) {
12377 ndr_print_lsa_String(ndr, "name", r->in.name);
12379 ndr->depth--;
12380 ndr_print_uint32(ndr, "unknown", r->in.unknown);
12381 ndr_print_ptr(ndr, "hash", r->in.hash);
12382 ndr->depth++;
12383 if (r->in.hash) {
12384 ndr_print_samr_Password(ndr, "hash", r->in.hash);
12386 ndr->depth--;
12387 ndr->depth--;
12389 if (flags & NDR_OUT) {
12390 ndr_print_struct(ndr, "out", "samr_SetDsrmPassword");
12391 ndr->depth++;
12392 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12393 ndr->depth--;
12395 ndr->depth--;
12398 static enum ndr_err_code ndr_push_samr_ValidatePassword(struct ndr_push *ndr, int flags, const struct samr_ValidatePassword *r)
12400 if (flags & NDR_IN) {
12401 NDR_CHECK(ndr_push_samr_ValidatePasswordLevel(ndr, NDR_SCALARS, r->in.level));
12402 if (r->in.req == NULL) {
12403 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12405 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
12406 NDR_CHECK(ndr_push_samr_ValidatePasswordReq(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
12408 if (flags & NDR_OUT) {
12409 if (r->out.rep == NULL) {
12410 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12412 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rep));
12413 if (*r->out.rep) {
12414 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.rep, r->in.level));
12415 NDR_CHECK(ndr_push_samr_ValidatePasswordRep(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rep));
12417 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12419 return NDR_ERR_SUCCESS;
12422 static enum ndr_err_code ndr_pull_samr_ValidatePassword(struct ndr_pull *ndr, int flags, struct samr_ValidatePassword *r)
12424 uint32_t _ptr_rep;
12425 TALLOC_CTX *_mem_save_req_0;
12426 TALLOC_CTX *_mem_save_rep_0;
12427 TALLOC_CTX *_mem_save_rep_1;
12428 if (flags & NDR_IN) {
12429 ZERO_STRUCT(r->out);
12431 NDR_CHECK(ndr_pull_samr_ValidatePasswordLevel(ndr, NDR_SCALARS, &r->in.level));
12432 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12433 NDR_PULL_ALLOC(ndr, r->in.req);
12435 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
12436 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
12437 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
12438 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
12439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
12440 NDR_PULL_ALLOC(ndr, r->out.rep);
12441 ZERO_STRUCTP(r->out.rep);
12443 if (flags & NDR_OUT) {
12444 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12445 NDR_PULL_ALLOC(ndr, r->out.rep);
12447 _mem_save_rep_0 = NDR_PULL_GET_MEM_CTX(ndr);
12448 NDR_PULL_SET_MEM_CTX(ndr, r->out.rep, LIBNDR_FLAG_REF_ALLOC);
12449 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rep));
12450 if (_ptr_rep) {
12451 NDR_PULL_ALLOC(ndr, *r->out.rep);
12452 } else {
12453 *r->out.rep = NULL;
12455 if (*r->out.rep) {
12456 _mem_save_rep_1 = NDR_PULL_GET_MEM_CTX(ndr);
12457 NDR_PULL_SET_MEM_CTX(ndr, *r->out.rep, 0);
12458 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.rep, r->in.level));
12459 NDR_CHECK(ndr_pull_samr_ValidatePasswordRep(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rep));
12460 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rep_1, 0);
12462 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rep_0, LIBNDR_FLAG_REF_ALLOC);
12463 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12465 return NDR_ERR_SUCCESS;
12468 _PUBLIC_ void ndr_print_samr_ValidatePassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_ValidatePassword *r)
12470 ndr_print_struct(ndr, name, "samr_ValidatePassword");
12471 ndr->depth++;
12472 if (flags & NDR_SET_VALUES) {
12473 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12475 if (flags & NDR_IN) {
12476 ndr_print_struct(ndr, "in", "samr_ValidatePassword");
12477 ndr->depth++;
12478 ndr_print_samr_ValidatePasswordLevel(ndr, "level", r->in.level);
12479 ndr_print_ptr(ndr, "req", r->in.req);
12480 ndr->depth++;
12481 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
12482 ndr_print_samr_ValidatePasswordReq(ndr, "req", r->in.req);
12483 ndr->depth--;
12484 ndr->depth--;
12486 if (flags & NDR_OUT) {
12487 ndr_print_struct(ndr, "out", "samr_ValidatePassword");
12488 ndr->depth++;
12489 ndr_print_ptr(ndr, "rep", r->out.rep);
12490 ndr->depth++;
12491 ndr_print_ptr(ndr, "rep", *r->out.rep);
12492 ndr->depth++;
12493 if (*r->out.rep) {
12494 ndr_print_set_switch_value(ndr, *r->out.rep, r->in.level);
12495 ndr_print_samr_ValidatePasswordRep(ndr, "rep", *r->out.rep);
12497 ndr->depth--;
12498 ndr->depth--;
12499 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12500 ndr->depth--;
12502 ndr->depth--;
12505 static const struct ndr_interface_call samr_calls[] = {
12507 "samr_Connect",
12508 sizeof(struct samr_Connect),
12509 (ndr_push_flags_fn_t) ndr_push_samr_Connect,
12510 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect,
12511 (ndr_print_function_t) ndr_print_samr_Connect,
12512 false,
12515 "samr_Close",
12516 sizeof(struct samr_Close),
12517 (ndr_push_flags_fn_t) ndr_push_samr_Close,
12518 (ndr_pull_flags_fn_t) ndr_pull_samr_Close,
12519 (ndr_print_function_t) ndr_print_samr_Close,
12520 false,
12523 "samr_SetSecurity",
12524 sizeof(struct samr_SetSecurity),
12525 (ndr_push_flags_fn_t) ndr_push_samr_SetSecurity,
12526 (ndr_pull_flags_fn_t) ndr_pull_samr_SetSecurity,
12527 (ndr_print_function_t) ndr_print_samr_SetSecurity,
12528 false,
12531 "samr_QuerySecurity",
12532 sizeof(struct samr_QuerySecurity),
12533 (ndr_push_flags_fn_t) ndr_push_samr_QuerySecurity,
12534 (ndr_pull_flags_fn_t) ndr_pull_samr_QuerySecurity,
12535 (ndr_print_function_t) ndr_print_samr_QuerySecurity,
12536 false,
12539 "samr_Shutdown",
12540 sizeof(struct samr_Shutdown),
12541 (ndr_push_flags_fn_t) ndr_push_samr_Shutdown,
12542 (ndr_pull_flags_fn_t) ndr_pull_samr_Shutdown,
12543 (ndr_print_function_t) ndr_print_samr_Shutdown,
12544 false,
12547 "samr_LookupDomain",
12548 sizeof(struct samr_LookupDomain),
12549 (ndr_push_flags_fn_t) ndr_push_samr_LookupDomain,
12550 (ndr_pull_flags_fn_t) ndr_pull_samr_LookupDomain,
12551 (ndr_print_function_t) ndr_print_samr_LookupDomain,
12552 false,
12555 "samr_EnumDomains",
12556 sizeof(struct samr_EnumDomains),
12557 (ndr_push_flags_fn_t) ndr_push_samr_EnumDomains,
12558 (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomains,
12559 (ndr_print_function_t) ndr_print_samr_EnumDomains,
12560 false,
12563 "samr_OpenDomain",
12564 sizeof(struct samr_OpenDomain),
12565 (ndr_push_flags_fn_t) ndr_push_samr_OpenDomain,
12566 (ndr_pull_flags_fn_t) ndr_pull_samr_OpenDomain,
12567 (ndr_print_function_t) ndr_print_samr_OpenDomain,
12568 false,
12571 "samr_QueryDomainInfo",
12572 sizeof(struct samr_QueryDomainInfo),
12573 (ndr_push_flags_fn_t) ndr_push_samr_QueryDomainInfo,
12574 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDomainInfo,
12575 (ndr_print_function_t) ndr_print_samr_QueryDomainInfo,
12576 false,
12579 "samr_SetDomainInfo",
12580 sizeof(struct samr_SetDomainInfo),
12581 (ndr_push_flags_fn_t) ndr_push_samr_SetDomainInfo,
12582 (ndr_pull_flags_fn_t) ndr_pull_samr_SetDomainInfo,
12583 (ndr_print_function_t) ndr_print_samr_SetDomainInfo,
12584 false,
12587 "samr_CreateDomainGroup",
12588 sizeof(struct samr_CreateDomainGroup),
12589 (ndr_push_flags_fn_t) ndr_push_samr_CreateDomainGroup,
12590 (ndr_pull_flags_fn_t) ndr_pull_samr_CreateDomainGroup,
12591 (ndr_print_function_t) ndr_print_samr_CreateDomainGroup,
12592 false,
12595 "samr_EnumDomainGroups",
12596 sizeof(struct samr_EnumDomainGroups),
12597 (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainGroups,
12598 (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainGroups,
12599 (ndr_print_function_t) ndr_print_samr_EnumDomainGroups,
12600 false,
12603 "samr_CreateUser",
12604 sizeof(struct samr_CreateUser),
12605 (ndr_push_flags_fn_t) ndr_push_samr_CreateUser,
12606 (ndr_pull_flags_fn_t) ndr_pull_samr_CreateUser,
12607 (ndr_print_function_t) ndr_print_samr_CreateUser,
12608 false,
12611 "samr_EnumDomainUsers",
12612 sizeof(struct samr_EnumDomainUsers),
12613 (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainUsers,
12614 (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainUsers,
12615 (ndr_print_function_t) ndr_print_samr_EnumDomainUsers,
12616 false,
12619 "samr_CreateDomAlias",
12620 sizeof(struct samr_CreateDomAlias),
12621 (ndr_push_flags_fn_t) ndr_push_samr_CreateDomAlias,
12622 (ndr_pull_flags_fn_t) ndr_pull_samr_CreateDomAlias,
12623 (ndr_print_function_t) ndr_print_samr_CreateDomAlias,
12624 false,
12627 "samr_EnumDomainAliases",
12628 sizeof(struct samr_EnumDomainAliases),
12629 (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainAliases,
12630 (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainAliases,
12631 (ndr_print_function_t) ndr_print_samr_EnumDomainAliases,
12632 false,
12635 "samr_GetAliasMembership",
12636 sizeof(struct samr_GetAliasMembership),
12637 (ndr_push_flags_fn_t) ndr_push_samr_GetAliasMembership,
12638 (ndr_pull_flags_fn_t) ndr_pull_samr_GetAliasMembership,
12639 (ndr_print_function_t) ndr_print_samr_GetAliasMembership,
12640 false,
12643 "samr_LookupNames",
12644 sizeof(struct samr_LookupNames),
12645 (ndr_push_flags_fn_t) ndr_push_samr_LookupNames,
12646 (ndr_pull_flags_fn_t) ndr_pull_samr_LookupNames,
12647 (ndr_print_function_t) ndr_print_samr_LookupNames,
12648 false,
12651 "samr_LookupRids",
12652 sizeof(struct samr_LookupRids),
12653 (ndr_push_flags_fn_t) ndr_push_samr_LookupRids,
12654 (ndr_pull_flags_fn_t) ndr_pull_samr_LookupRids,
12655 (ndr_print_function_t) ndr_print_samr_LookupRids,
12656 false,
12659 "samr_OpenGroup",
12660 sizeof(struct samr_OpenGroup),
12661 (ndr_push_flags_fn_t) ndr_push_samr_OpenGroup,
12662 (ndr_pull_flags_fn_t) ndr_pull_samr_OpenGroup,
12663 (ndr_print_function_t) ndr_print_samr_OpenGroup,
12664 false,
12667 "samr_QueryGroupInfo",
12668 sizeof(struct samr_QueryGroupInfo),
12669 (ndr_push_flags_fn_t) ndr_push_samr_QueryGroupInfo,
12670 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryGroupInfo,
12671 (ndr_print_function_t) ndr_print_samr_QueryGroupInfo,
12672 false,
12675 "samr_SetGroupInfo",
12676 sizeof(struct samr_SetGroupInfo),
12677 (ndr_push_flags_fn_t) ndr_push_samr_SetGroupInfo,
12678 (ndr_pull_flags_fn_t) ndr_pull_samr_SetGroupInfo,
12679 (ndr_print_function_t) ndr_print_samr_SetGroupInfo,
12680 false,
12683 "samr_AddGroupMember",
12684 sizeof(struct samr_AddGroupMember),
12685 (ndr_push_flags_fn_t) ndr_push_samr_AddGroupMember,
12686 (ndr_pull_flags_fn_t) ndr_pull_samr_AddGroupMember,
12687 (ndr_print_function_t) ndr_print_samr_AddGroupMember,
12688 false,
12691 "samr_DeleteDomainGroup",
12692 sizeof(struct samr_DeleteDomainGroup),
12693 (ndr_push_flags_fn_t) ndr_push_samr_DeleteDomainGroup,
12694 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteDomainGroup,
12695 (ndr_print_function_t) ndr_print_samr_DeleteDomainGroup,
12696 false,
12699 "samr_DeleteGroupMember",
12700 sizeof(struct samr_DeleteGroupMember),
12701 (ndr_push_flags_fn_t) ndr_push_samr_DeleteGroupMember,
12702 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteGroupMember,
12703 (ndr_print_function_t) ndr_print_samr_DeleteGroupMember,
12704 false,
12707 "samr_QueryGroupMember",
12708 sizeof(struct samr_QueryGroupMember),
12709 (ndr_push_flags_fn_t) ndr_push_samr_QueryGroupMember,
12710 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryGroupMember,
12711 (ndr_print_function_t) ndr_print_samr_QueryGroupMember,
12712 false,
12715 "samr_SetMemberAttributesOfGroup",
12716 sizeof(struct samr_SetMemberAttributesOfGroup),
12717 (ndr_push_flags_fn_t) ndr_push_samr_SetMemberAttributesOfGroup,
12718 (ndr_pull_flags_fn_t) ndr_pull_samr_SetMemberAttributesOfGroup,
12719 (ndr_print_function_t) ndr_print_samr_SetMemberAttributesOfGroup,
12720 false,
12723 "samr_OpenAlias",
12724 sizeof(struct samr_OpenAlias),
12725 (ndr_push_flags_fn_t) ndr_push_samr_OpenAlias,
12726 (ndr_pull_flags_fn_t) ndr_pull_samr_OpenAlias,
12727 (ndr_print_function_t) ndr_print_samr_OpenAlias,
12728 false,
12731 "samr_QueryAliasInfo",
12732 sizeof(struct samr_QueryAliasInfo),
12733 (ndr_push_flags_fn_t) ndr_push_samr_QueryAliasInfo,
12734 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryAliasInfo,
12735 (ndr_print_function_t) ndr_print_samr_QueryAliasInfo,
12736 false,
12739 "samr_SetAliasInfo",
12740 sizeof(struct samr_SetAliasInfo),
12741 (ndr_push_flags_fn_t) ndr_push_samr_SetAliasInfo,
12742 (ndr_pull_flags_fn_t) ndr_pull_samr_SetAliasInfo,
12743 (ndr_print_function_t) ndr_print_samr_SetAliasInfo,
12744 false,
12747 "samr_DeleteDomAlias",
12748 sizeof(struct samr_DeleteDomAlias),
12749 (ndr_push_flags_fn_t) ndr_push_samr_DeleteDomAlias,
12750 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteDomAlias,
12751 (ndr_print_function_t) ndr_print_samr_DeleteDomAlias,
12752 false,
12755 "samr_AddAliasMember",
12756 sizeof(struct samr_AddAliasMember),
12757 (ndr_push_flags_fn_t) ndr_push_samr_AddAliasMember,
12758 (ndr_pull_flags_fn_t) ndr_pull_samr_AddAliasMember,
12759 (ndr_print_function_t) ndr_print_samr_AddAliasMember,
12760 false,
12763 "samr_DeleteAliasMember",
12764 sizeof(struct samr_DeleteAliasMember),
12765 (ndr_push_flags_fn_t) ndr_push_samr_DeleteAliasMember,
12766 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteAliasMember,
12767 (ndr_print_function_t) ndr_print_samr_DeleteAliasMember,
12768 false,
12771 "samr_GetMembersInAlias",
12772 sizeof(struct samr_GetMembersInAlias),
12773 (ndr_push_flags_fn_t) ndr_push_samr_GetMembersInAlias,
12774 (ndr_pull_flags_fn_t) ndr_pull_samr_GetMembersInAlias,
12775 (ndr_print_function_t) ndr_print_samr_GetMembersInAlias,
12776 false,
12779 "samr_OpenUser",
12780 sizeof(struct samr_OpenUser),
12781 (ndr_push_flags_fn_t) ndr_push_samr_OpenUser,
12782 (ndr_pull_flags_fn_t) ndr_pull_samr_OpenUser,
12783 (ndr_print_function_t) ndr_print_samr_OpenUser,
12784 false,
12787 "samr_DeleteUser",
12788 sizeof(struct samr_DeleteUser),
12789 (ndr_push_flags_fn_t) ndr_push_samr_DeleteUser,
12790 (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteUser,
12791 (ndr_print_function_t) ndr_print_samr_DeleteUser,
12792 false,
12795 "samr_QueryUserInfo",
12796 sizeof(struct samr_QueryUserInfo),
12797 (ndr_push_flags_fn_t) ndr_push_samr_QueryUserInfo,
12798 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryUserInfo,
12799 (ndr_print_function_t) ndr_print_samr_QueryUserInfo,
12800 false,
12803 "samr_SetUserInfo",
12804 sizeof(struct samr_SetUserInfo),
12805 (ndr_push_flags_fn_t) ndr_push_samr_SetUserInfo,
12806 (ndr_pull_flags_fn_t) ndr_pull_samr_SetUserInfo,
12807 (ndr_print_function_t) ndr_print_samr_SetUserInfo,
12808 false,
12811 "samr_ChangePasswordUser",
12812 sizeof(struct samr_ChangePasswordUser),
12813 (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser,
12814 (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser,
12815 (ndr_print_function_t) ndr_print_samr_ChangePasswordUser,
12816 false,
12819 "samr_GetGroupsForUser",
12820 sizeof(struct samr_GetGroupsForUser),
12821 (ndr_push_flags_fn_t) ndr_push_samr_GetGroupsForUser,
12822 (ndr_pull_flags_fn_t) ndr_pull_samr_GetGroupsForUser,
12823 (ndr_print_function_t) ndr_print_samr_GetGroupsForUser,
12824 false,
12827 "samr_QueryDisplayInfo",
12828 sizeof(struct samr_QueryDisplayInfo),
12829 (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo,
12830 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo,
12831 (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo,
12832 false,
12835 "samr_GetDisplayEnumerationIndex",
12836 sizeof(struct samr_GetDisplayEnumerationIndex),
12837 (ndr_push_flags_fn_t) ndr_push_samr_GetDisplayEnumerationIndex,
12838 (ndr_pull_flags_fn_t) ndr_pull_samr_GetDisplayEnumerationIndex,
12839 (ndr_print_function_t) ndr_print_samr_GetDisplayEnumerationIndex,
12840 false,
12843 "samr_TestPrivateFunctionsDomain",
12844 sizeof(struct samr_TestPrivateFunctionsDomain),
12845 (ndr_push_flags_fn_t) ndr_push_samr_TestPrivateFunctionsDomain,
12846 (ndr_pull_flags_fn_t) ndr_pull_samr_TestPrivateFunctionsDomain,
12847 (ndr_print_function_t) ndr_print_samr_TestPrivateFunctionsDomain,
12848 false,
12851 "samr_TestPrivateFunctionsUser",
12852 sizeof(struct samr_TestPrivateFunctionsUser),
12853 (ndr_push_flags_fn_t) ndr_push_samr_TestPrivateFunctionsUser,
12854 (ndr_pull_flags_fn_t) ndr_pull_samr_TestPrivateFunctionsUser,
12855 (ndr_print_function_t) ndr_print_samr_TestPrivateFunctionsUser,
12856 false,
12859 "samr_GetUserPwInfo",
12860 sizeof(struct samr_GetUserPwInfo),
12861 (ndr_push_flags_fn_t) ndr_push_samr_GetUserPwInfo,
12862 (ndr_pull_flags_fn_t) ndr_pull_samr_GetUserPwInfo,
12863 (ndr_print_function_t) ndr_print_samr_GetUserPwInfo,
12864 false,
12867 "samr_RemoveMemberFromForeignDomain",
12868 sizeof(struct samr_RemoveMemberFromForeignDomain),
12869 (ndr_push_flags_fn_t) ndr_push_samr_RemoveMemberFromForeignDomain,
12870 (ndr_pull_flags_fn_t) ndr_pull_samr_RemoveMemberFromForeignDomain,
12871 (ndr_print_function_t) ndr_print_samr_RemoveMemberFromForeignDomain,
12872 false,
12875 "samr_QueryDomainInfo2",
12876 sizeof(struct samr_QueryDomainInfo2),
12877 (ndr_push_flags_fn_t) ndr_push_samr_QueryDomainInfo2,
12878 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDomainInfo2,
12879 (ndr_print_function_t) ndr_print_samr_QueryDomainInfo2,
12880 false,
12883 "samr_QueryUserInfo2",
12884 sizeof(struct samr_QueryUserInfo2),
12885 (ndr_push_flags_fn_t) ndr_push_samr_QueryUserInfo2,
12886 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryUserInfo2,
12887 (ndr_print_function_t) ndr_print_samr_QueryUserInfo2,
12888 false,
12891 "samr_QueryDisplayInfo2",
12892 sizeof(struct samr_QueryDisplayInfo2),
12893 (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo2,
12894 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo2,
12895 (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo2,
12896 false,
12899 "samr_GetDisplayEnumerationIndex2",
12900 sizeof(struct samr_GetDisplayEnumerationIndex2),
12901 (ndr_push_flags_fn_t) ndr_push_samr_GetDisplayEnumerationIndex2,
12902 (ndr_pull_flags_fn_t) ndr_pull_samr_GetDisplayEnumerationIndex2,
12903 (ndr_print_function_t) ndr_print_samr_GetDisplayEnumerationIndex2,
12904 false,
12907 "samr_CreateUser2",
12908 sizeof(struct samr_CreateUser2),
12909 (ndr_push_flags_fn_t) ndr_push_samr_CreateUser2,
12910 (ndr_pull_flags_fn_t) ndr_pull_samr_CreateUser2,
12911 (ndr_print_function_t) ndr_print_samr_CreateUser2,
12912 false,
12915 "samr_QueryDisplayInfo3",
12916 sizeof(struct samr_QueryDisplayInfo3),
12917 (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo3,
12918 (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo3,
12919 (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo3,
12920 false,
12923 "samr_AddMultipleMembersToAlias",
12924 sizeof(struct samr_AddMultipleMembersToAlias),
12925 (ndr_push_flags_fn_t) ndr_push_samr_AddMultipleMembersToAlias,
12926 (ndr_pull_flags_fn_t) ndr_pull_samr_AddMultipleMembersToAlias,
12927 (ndr_print_function_t) ndr_print_samr_AddMultipleMembersToAlias,
12928 false,
12931 "samr_RemoveMultipleMembersFromAlias",
12932 sizeof(struct samr_RemoveMultipleMembersFromAlias),
12933 (ndr_push_flags_fn_t) ndr_push_samr_RemoveMultipleMembersFromAlias,
12934 (ndr_pull_flags_fn_t) ndr_pull_samr_RemoveMultipleMembersFromAlias,
12935 (ndr_print_function_t) ndr_print_samr_RemoveMultipleMembersFromAlias,
12936 false,
12939 "samr_OemChangePasswordUser2",
12940 sizeof(struct samr_OemChangePasswordUser2),
12941 (ndr_push_flags_fn_t) ndr_push_samr_OemChangePasswordUser2,
12942 (ndr_pull_flags_fn_t) ndr_pull_samr_OemChangePasswordUser2,
12943 (ndr_print_function_t) ndr_print_samr_OemChangePasswordUser2,
12944 false,
12947 "samr_ChangePasswordUser2",
12948 sizeof(struct samr_ChangePasswordUser2),
12949 (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser2,
12950 (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser2,
12951 (ndr_print_function_t) ndr_print_samr_ChangePasswordUser2,
12952 false,
12955 "samr_GetDomPwInfo",
12956 sizeof(struct samr_GetDomPwInfo),
12957 (ndr_push_flags_fn_t) ndr_push_samr_GetDomPwInfo,
12958 (ndr_pull_flags_fn_t) ndr_pull_samr_GetDomPwInfo,
12959 (ndr_print_function_t) ndr_print_samr_GetDomPwInfo,
12960 false,
12963 "samr_Connect2",
12964 sizeof(struct samr_Connect2),
12965 (ndr_push_flags_fn_t) ndr_push_samr_Connect2,
12966 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect2,
12967 (ndr_print_function_t) ndr_print_samr_Connect2,
12968 false,
12971 "samr_SetUserInfo2",
12972 sizeof(struct samr_SetUserInfo2),
12973 (ndr_push_flags_fn_t) ndr_push_samr_SetUserInfo2,
12974 (ndr_pull_flags_fn_t) ndr_pull_samr_SetUserInfo2,
12975 (ndr_print_function_t) ndr_print_samr_SetUserInfo2,
12976 false,
12979 "samr_SetBootKeyInformation",
12980 sizeof(struct samr_SetBootKeyInformation),
12981 (ndr_push_flags_fn_t) ndr_push_samr_SetBootKeyInformation,
12982 (ndr_pull_flags_fn_t) ndr_pull_samr_SetBootKeyInformation,
12983 (ndr_print_function_t) ndr_print_samr_SetBootKeyInformation,
12984 false,
12987 "samr_GetBootKeyInformation",
12988 sizeof(struct samr_GetBootKeyInformation),
12989 (ndr_push_flags_fn_t) ndr_push_samr_GetBootKeyInformation,
12990 (ndr_pull_flags_fn_t) ndr_pull_samr_GetBootKeyInformation,
12991 (ndr_print_function_t) ndr_print_samr_GetBootKeyInformation,
12992 false,
12995 "samr_Connect3",
12996 sizeof(struct samr_Connect3),
12997 (ndr_push_flags_fn_t) ndr_push_samr_Connect3,
12998 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect3,
12999 (ndr_print_function_t) ndr_print_samr_Connect3,
13000 false,
13003 "samr_Connect4",
13004 sizeof(struct samr_Connect4),
13005 (ndr_push_flags_fn_t) ndr_push_samr_Connect4,
13006 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect4,
13007 (ndr_print_function_t) ndr_print_samr_Connect4,
13008 false,
13011 "samr_ChangePasswordUser3",
13012 sizeof(struct samr_ChangePasswordUser3),
13013 (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser3,
13014 (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser3,
13015 (ndr_print_function_t) ndr_print_samr_ChangePasswordUser3,
13016 false,
13019 "samr_Connect5",
13020 sizeof(struct samr_Connect5),
13021 (ndr_push_flags_fn_t) ndr_push_samr_Connect5,
13022 (ndr_pull_flags_fn_t) ndr_pull_samr_Connect5,
13023 (ndr_print_function_t) ndr_print_samr_Connect5,
13024 false,
13027 "samr_RidToSid",
13028 sizeof(struct samr_RidToSid),
13029 (ndr_push_flags_fn_t) ndr_push_samr_RidToSid,
13030 (ndr_pull_flags_fn_t) ndr_pull_samr_RidToSid,
13031 (ndr_print_function_t) ndr_print_samr_RidToSid,
13032 false,
13035 "samr_SetDsrmPassword",
13036 sizeof(struct samr_SetDsrmPassword),
13037 (ndr_push_flags_fn_t) ndr_push_samr_SetDsrmPassword,
13038 (ndr_pull_flags_fn_t) ndr_pull_samr_SetDsrmPassword,
13039 (ndr_print_function_t) ndr_print_samr_SetDsrmPassword,
13040 false,
13043 "samr_ValidatePassword",
13044 sizeof(struct samr_ValidatePassword),
13045 (ndr_push_flags_fn_t) ndr_push_samr_ValidatePassword,
13046 (ndr_pull_flags_fn_t) ndr_pull_samr_ValidatePassword,
13047 (ndr_print_function_t) ndr_print_samr_ValidatePassword,
13048 false,
13050 { NULL, 0, NULL, NULL, NULL, false }
13053 static const char * const samr_endpoint_strings[] = {
13054 "ncacn_np:[\\pipe\\samr]",
13055 "ncacn_ip_tcp:",
13056 "ncalrpc:",
13059 static const struct ndr_interface_string_array samr_endpoints = {
13060 .count = 3,
13061 .names = samr_endpoint_strings
13064 static const char * const samr_authservice_strings[] = {
13065 "host",
13068 static const struct ndr_interface_string_array samr_authservices = {
13069 .count = 1,
13070 .names = samr_authservice_strings
13074 const struct ndr_interface_table ndr_table_samr = {
13075 .name = "samr",
13076 .syntax_id = {
13077 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xac}},
13078 NDR_SAMR_VERSION
13080 .helpstring = NDR_SAMR_HELPSTRING,
13081 .num_calls = 68,
13082 .calls = samr_calls,
13083 .endpoints = &samr_endpoints,
13084 .authservices = &samr_authservices