1 /* parser auto-generated by pidl */
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
)
18 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &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
;
28 case SAM_DATABASE_DOMAIN
: val
= "SAM_DATABASE_DOMAIN"; break;
29 case SAM_DATABASE_BUILTIN
: val
= "SAM_DATABASE_BUILTIN"; break;
30 case SAM_DATABASE_PRIVS
: val
= "SAM_DATABASE_PRIVS"; break;
32 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
35 _PUBLIC_
enum ndr_err_code
ndr_push_samr_AcctFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
37 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
38 return NDR_ERR_SUCCESS
;
41 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_AcctFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
44 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
46 return NDR_ERR_SUCCESS
;
49 _PUBLIC_
void ndr_print_samr_AcctFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
51 ndr_print_uint32(ndr
, name
, r
);
53 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_DISABLED", ACB_DISABLED
, r
);
54 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_HOMDIRREQ", ACB_HOMDIRREQ
, r
);
55 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_PWNOTREQ", ACB_PWNOTREQ
, r
);
56 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_TEMPDUP", ACB_TEMPDUP
, r
);
57 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_NORMAL", ACB_NORMAL
, r
);
58 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_MNS", ACB_MNS
, r
);
59 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_DOMTRUST", ACB_DOMTRUST
, r
);
60 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_WSTRUST", ACB_WSTRUST
, r
);
61 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_SVRTRUST", ACB_SVRTRUST
, r
);
62 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_PWNOEXP", ACB_PWNOEXP
, r
);
63 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_AUTOLOCK", ACB_AUTOLOCK
, r
);
64 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_ENC_TXT_PWD_ALLOWED", ACB_ENC_TXT_PWD_ALLOWED
, r
);
65 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_SMARTCARD_REQUIRED", ACB_SMARTCARD_REQUIRED
, r
);
66 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_TRUSTED_FOR_DELEGATION", ACB_TRUSTED_FOR_DELEGATION
, r
);
67 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_NOT_DELEGATED", ACB_NOT_DELEGATED
, r
);
68 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_USE_DES_KEY_ONLY", ACB_USE_DES_KEY_ONLY
, r
);
69 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_DONT_REQUIRE_PREAUTH", ACB_DONT_REQUIRE_PREAUTH
, r
);
70 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_PW_EXPIRED", ACB_PW_EXPIRED
, r
);
71 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_NO_AUTH_DATA_REQD", ACB_NO_AUTH_DATA_REQD
, r
);
75 static enum ndr_err_code
ndr_push_samr_ConnectAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
77 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
78 return NDR_ERR_SUCCESS
;
81 static enum ndr_err_code
ndr_pull_samr_ConnectAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
84 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
86 return NDR_ERR_SUCCESS
;
89 _PUBLIC_
void ndr_print_samr_ConnectAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
91 ndr_print_uint32(ndr
, name
, r
);
93 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_CONNECT_TO_SERVER", SAMR_ACCESS_CONNECT_TO_SERVER
, r
);
94 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_SHUTDOWN_SERVER", SAMR_ACCESS_SHUTDOWN_SERVER
, r
);
95 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_INITIALIZE_SERVER", SAMR_ACCESS_INITIALIZE_SERVER
, r
);
96 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_CREATE_DOMAIN", SAMR_ACCESS_CREATE_DOMAIN
, r
);
97 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_ENUM_DOMAINS", SAMR_ACCESS_ENUM_DOMAINS
, r
);
98 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_LOOKUP_DOMAIN", SAMR_ACCESS_LOOKUP_DOMAIN
, r
);
102 static enum ndr_err_code
ndr_push_samr_UserAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
104 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
105 return NDR_ERR_SUCCESS
;
108 static enum ndr_err_code
ndr_pull_samr_UserAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
111 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
113 return NDR_ERR_SUCCESS
;
116 _PUBLIC_
void ndr_print_samr_UserAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
118 ndr_print_uint32(ndr
, name
, r
);
120 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_NAME_ETC", SAMR_USER_ACCESS_GET_NAME_ETC
, r
);
121 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOCALE", SAMR_USER_ACCESS_GET_LOCALE
, r
);
122 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_LOC_COM", SAMR_USER_ACCESS_SET_LOC_COM
, r
);
123 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOGONINFO", SAMR_USER_ACCESS_GET_LOGONINFO
, r
);
124 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_ATTRIBUTES", SAMR_USER_ACCESS_GET_ATTRIBUTES
, r
);
125 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_ATTRIBUTES", SAMR_USER_ACCESS_SET_ATTRIBUTES
, r
);
126 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_PASSWORD", SAMR_USER_ACCESS_CHANGE_PASSWORD
, r
);
127 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_PASSWORD", SAMR_USER_ACCESS_SET_PASSWORD
, r
);
128 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUPS", SAMR_USER_ACCESS_GET_GROUPS
, r
);
129 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP
, r
);
130 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP
, r
);
134 static enum ndr_err_code
ndr_push_samr_DomainAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
136 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
137 return NDR_ERR_SUCCESS
;
140 static enum ndr_err_code
ndr_pull_samr_DomainAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
143 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
145 return NDR_ERR_SUCCESS
;
148 _PUBLIC_
void ndr_print_samr_DomainAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
150 ndr_print_uint32(ndr
, name
, r
);
152 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1
, r
);
153 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_1", SAMR_DOMAIN_ACCESS_SET_INFO_1
, r
);
154 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2
, r
);
155 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_2", SAMR_DOMAIN_ACCESS_SET_INFO_2
, r
);
156 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_USER", SAMR_DOMAIN_ACCESS_CREATE_USER
, r
);
157 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_GROUP", SAMR_DOMAIN_ACCESS_CREATE_GROUP
, r
);
158 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_ALIAS", SAMR_DOMAIN_ACCESS_CREATE_ALIAS
, r
);
159 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS", SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS
, r
);
160 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS", SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS
, r
);
161 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT", SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT
, r
);
162 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_3", SAMR_DOMAIN_ACCESS_SET_INFO_3
, r
);
166 static enum ndr_err_code
ndr_push_samr_GroupAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
168 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
169 return NDR_ERR_SUCCESS
;
172 static enum ndr_err_code
ndr_pull_samr_GroupAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
175 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
177 return NDR_ERR_SUCCESS
;
180 _PUBLIC_
void ndr_print_samr_GroupAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
182 ndr_print_uint32(ndr
, name
, r
);
184 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_LOOKUP_INFO", SAMR_GROUP_ACCESS_LOOKUP_INFO
, r
);
185 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_SET_INFO", SAMR_GROUP_ACCESS_SET_INFO
, r
);
186 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_ADD_MEMBER", SAMR_GROUP_ACCESS_ADD_MEMBER
, r
);
187 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_REMOVE_MEMBER", SAMR_GROUP_ACCESS_REMOVE_MEMBER
, r
);
188 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_GET_MEMBERS", SAMR_GROUP_ACCESS_GET_MEMBERS
, r
);
192 static enum ndr_err_code
ndr_push_samr_AliasAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
194 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
195 return NDR_ERR_SUCCESS
;
198 static enum ndr_err_code
ndr_pull_samr_AliasAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
201 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
203 return NDR_ERR_SUCCESS
;
206 _PUBLIC_
void ndr_print_samr_AliasAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
208 ndr_print_uint32(ndr
, name
, r
);
210 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_ADD_MEMBER", SAMR_ALIAS_ACCESS_ADD_MEMBER
, r
);
211 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_REMOVE_MEMBER", SAMR_ALIAS_ACCESS_REMOVE_MEMBER
, r
);
212 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_GET_MEMBERS", SAMR_ALIAS_ACCESS_GET_MEMBERS
, r
);
213 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_LOOKUP_INFO", SAMR_ALIAS_ACCESS_LOOKUP_INFO
, r
);
214 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_SET_INFO", SAMR_ALIAS_ACCESS_SET_INFO
, r
);
218 static enum ndr_err_code
ndr_push_samr_SamEntry(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_SamEntry
*r
)
220 if (ndr_flags
& NDR_SCALARS
) {
221 NDR_CHECK(ndr_push_align(ndr
, 5));
222 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
223 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
224 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
226 if (ndr_flags
& NDR_BUFFERS
) {
227 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
229 return NDR_ERR_SUCCESS
;
232 static enum ndr_err_code
ndr_pull_samr_SamEntry(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_SamEntry
*r
)
234 if (ndr_flags
& NDR_SCALARS
) {
235 NDR_CHECK(ndr_pull_align(ndr
, 5));
236 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
237 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
238 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
240 if (ndr_flags
& NDR_BUFFERS
) {
241 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
243 return NDR_ERR_SUCCESS
;
246 _PUBLIC_
void ndr_print_samr_SamEntry(struct ndr_print
*ndr
, const char *name
, const struct samr_SamEntry
*r
)
248 ndr_print_struct(ndr
, name
, "samr_SamEntry");
250 ndr_print_uint32(ndr
, "idx", r
->idx
);
251 ndr_print_lsa_String(ndr
, "name", &r
->name
);
255 static enum ndr_err_code
ndr_push_samr_SamArray(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_SamArray
*r
)
257 uint32_t cntr_entries_1
;
258 if (ndr_flags
& NDR_SCALARS
) {
259 NDR_CHECK(ndr_push_align(ndr
, 5));
260 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
261 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
262 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
264 if (ndr_flags
& NDR_BUFFERS
) {
266 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
267 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
268 NDR_CHECK(ndr_push_samr_SamEntry(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
270 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
271 NDR_CHECK(ndr_push_samr_SamEntry(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
275 return NDR_ERR_SUCCESS
;
278 static enum ndr_err_code
ndr_pull_samr_SamArray(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_SamArray
*r
)
280 uint32_t _ptr_entries
;
281 uint32_t cntr_entries_1
;
282 TALLOC_CTX
*_mem_save_entries_0
;
283 TALLOC_CTX
*_mem_save_entries_1
;
284 if (ndr_flags
& NDR_SCALARS
) {
285 NDR_CHECK(ndr_pull_align(ndr
, 5));
286 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
287 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
289 NDR_PULL_ALLOC(ndr
, r
->entries
);
293 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
295 if (ndr_flags
& NDR_BUFFERS
) {
297 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
298 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
299 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
300 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
301 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
302 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
303 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
304 NDR_CHECK(ndr_pull_samr_SamEntry(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
306 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
307 NDR_CHECK(ndr_pull_samr_SamEntry(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
309 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
310 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
313 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
316 return NDR_ERR_SUCCESS
;
319 _PUBLIC_
void ndr_print_samr_SamArray(struct ndr_print
*ndr
, const char *name
, const struct samr_SamArray
*r
)
321 uint32_t cntr_entries_1
;
322 ndr_print_struct(ndr
, name
, "samr_SamArray");
324 ndr_print_uint32(ndr
, "count", r
->count
);
325 ndr_print_ptr(ndr
, "entries", r
->entries
);
328 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
330 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
332 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
333 ndr_print_samr_SamEntry(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
343 static enum ndr_err_code
ndr_push_samr_DomainInfoClass(struct ndr_push
*ndr
, int ndr_flags
, enum samr_DomainInfoClass r
)
345 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
346 return NDR_ERR_SUCCESS
;
349 static enum ndr_err_code
ndr_pull_samr_DomainInfoClass(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_DomainInfoClass
*r
)
352 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
354 return NDR_ERR_SUCCESS
;
357 _PUBLIC_
void ndr_print_samr_DomainInfoClass(struct ndr_print
*ndr
, const char *name
, enum samr_DomainInfoClass r
)
359 const char *val
= NULL
;
362 case DomainPasswordInformation
: val
= "DomainPasswordInformation"; break;
363 case DomainGeneralInformation
: val
= "DomainGeneralInformation"; break;
364 case DomainLogoffInformation
: val
= "DomainLogoffInformation"; break;
365 case DomainOemInformation
: val
= "DomainOemInformation"; break;
366 case DomainNameInformation
: val
= "DomainNameInformation"; break;
367 case DomainReplicationInformation
: val
= "DomainReplicationInformation"; break;
368 case DomainServerRoleInformation
: val
= "DomainServerRoleInformation"; break;
369 case DomainModifiedInformation
: val
= "DomainModifiedInformation"; break;
370 case DomainStateInformation
: val
= "DomainStateInformation"; break;
371 case DomainUasInformation
: val
= "DomainUasInformation"; break;
372 case DomainGeneralInformation2
: val
= "DomainGeneralInformation2"; break;
373 case DomainLockoutInformation
: val
= "DomainLockoutInformation"; break;
374 case DomainModifiedInformation2
: val
= "DomainModifiedInformation2"; break;
376 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
379 static enum ndr_err_code
ndr_push_samr_Role(struct ndr_push
*ndr
, int ndr_flags
, enum samr_Role r
)
381 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
382 return NDR_ERR_SUCCESS
;
385 static enum ndr_err_code
ndr_pull_samr_Role(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_Role
*r
)
388 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
390 return NDR_ERR_SUCCESS
;
393 _PUBLIC_
void ndr_print_samr_Role(struct ndr_print
*ndr
, const char *name
, enum samr_Role r
)
395 const char *val
= NULL
;
398 case SAMR_ROLE_STANDALONE
: val
= "SAMR_ROLE_STANDALONE"; break;
399 case SAMR_ROLE_DOMAIN_MEMBER
: val
= "SAMR_ROLE_DOMAIN_MEMBER"; break;
400 case SAMR_ROLE_DOMAIN_BDC
: val
= "SAMR_ROLE_DOMAIN_BDC"; break;
401 case SAMR_ROLE_DOMAIN_PDC
: val
= "SAMR_ROLE_DOMAIN_PDC"; break;
403 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
406 _PUBLIC_
enum ndr_err_code
ndr_push_samr_PasswordProperties(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
408 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
409 return NDR_ERR_SUCCESS
;
412 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_PasswordProperties(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
415 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
417 return NDR_ERR_SUCCESS
;
420 _PUBLIC_
void ndr_print_samr_PasswordProperties(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
422 ndr_print_uint32(ndr
, name
, r
);
424 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_COMPLEX", DOMAIN_PASSWORD_COMPLEX
, r
);
425 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_ANON_CHANGE", DOMAIN_PASSWORD_NO_ANON_CHANGE
, r
);
426 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_CLEAR_CHANGE", DOMAIN_PASSWORD_NO_CLEAR_CHANGE
, r
);
427 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_LOCKOUT_ADMINS", DOMAIN_PASSWORD_LOCKOUT_ADMINS
, r
);
428 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_STORE_CLEARTEXT", DOMAIN_PASSWORD_STORE_CLEARTEXT
, r
);
429 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_REFUSE_PASSWORD_CHANGE", DOMAIN_REFUSE_PASSWORD_CHANGE
, r
);
433 static enum ndr_err_code
ndr_push_samr_DomainServerState(struct ndr_push
*ndr
, int ndr_flags
, enum samr_DomainServerState r
)
435 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
436 return NDR_ERR_SUCCESS
;
439 static enum ndr_err_code
ndr_pull_samr_DomainServerState(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_DomainServerState
*r
)
442 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
444 return NDR_ERR_SUCCESS
;
447 _PUBLIC_
void ndr_print_samr_DomainServerState(struct ndr_print
*ndr
, const char *name
, enum samr_DomainServerState r
)
449 const char *val
= NULL
;
452 case DOMAIN_SERVER_ENABLED
: val
= "DOMAIN_SERVER_ENABLED"; break;
453 case DOMAIN_SERVER_DISABLED
: val
= "DOMAIN_SERVER_DISABLED"; break;
455 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
458 static enum ndr_err_code
ndr_push_samr_DomInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo1
*r
)
460 if (ndr_flags
& NDR_SCALARS
) {
461 NDR_CHECK(ndr_push_align(ndr
, 4));
462 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->min_password_length
));
463 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->password_history_length
));
464 NDR_CHECK(ndr_push_samr_PasswordProperties(ndr
, NDR_SCALARS
, r
->password_properties
));
465 NDR_CHECK(ndr_push_dlong(ndr
, NDR_SCALARS
, r
->max_password_age
));
466 NDR_CHECK(ndr_push_dlong(ndr
, NDR_SCALARS
, r
->min_password_age
));
467 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
469 if (ndr_flags
& NDR_BUFFERS
) {
471 return NDR_ERR_SUCCESS
;
474 static enum ndr_err_code
ndr_pull_samr_DomInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo1
*r
)
476 if (ndr_flags
& NDR_SCALARS
) {
477 NDR_CHECK(ndr_pull_align(ndr
, 4));
478 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->min_password_length
));
479 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->password_history_length
));
480 NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr
, NDR_SCALARS
, &r
->password_properties
));
481 NDR_CHECK(ndr_pull_dlong(ndr
, NDR_SCALARS
, &r
->max_password_age
));
482 NDR_CHECK(ndr_pull_dlong(ndr
, NDR_SCALARS
, &r
->min_password_age
));
483 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
485 if (ndr_flags
& NDR_BUFFERS
) {
487 return NDR_ERR_SUCCESS
;
490 _PUBLIC_
void ndr_print_samr_DomInfo1(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo1
*r
)
492 ndr_print_struct(ndr
, name
, "samr_DomInfo1");
494 ndr_print_uint16(ndr
, "min_password_length", r
->min_password_length
);
495 ndr_print_uint16(ndr
, "password_history_length", r
->password_history_length
);
496 ndr_print_samr_PasswordProperties(ndr
, "password_properties", r
->password_properties
);
497 ndr_print_dlong(ndr
, "max_password_age", r
->max_password_age
);
498 ndr_print_dlong(ndr
, "min_password_age", r
->min_password_age
);
502 static enum ndr_err_code
ndr_push_samr_DomGeneralInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomGeneralInformation
*r
)
504 if (ndr_flags
& NDR_SCALARS
) {
505 NDR_CHECK(ndr_push_align(ndr
, 5));
506 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->force_logoff_time
));
507 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->oem_information
));
508 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
509 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->primary
));
510 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->sequence_num
));
511 NDR_CHECK(ndr_push_samr_DomainServerState(ndr
, NDR_SCALARS
, r
->domain_server_state
));
512 NDR_CHECK(ndr_push_samr_Role(ndr
, NDR_SCALARS
, r
->role
));
513 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown3
));
514 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_users
));
515 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_groups
));
516 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_aliases
));
517 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
519 if (ndr_flags
& NDR_BUFFERS
) {
520 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->oem_information
));
521 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
522 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary
));
524 return NDR_ERR_SUCCESS
;
527 static enum ndr_err_code
ndr_pull_samr_DomGeneralInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomGeneralInformation
*r
)
529 if (ndr_flags
& NDR_SCALARS
) {
530 NDR_CHECK(ndr_pull_align(ndr
, 5));
531 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->force_logoff_time
));
532 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->oem_information
));
533 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
534 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->primary
));
535 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->sequence_num
));
536 NDR_CHECK(ndr_pull_samr_DomainServerState(ndr
, NDR_SCALARS
, &r
->domain_server_state
));
537 NDR_CHECK(ndr_pull_samr_Role(ndr
, NDR_SCALARS
, &r
->role
));
538 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown3
));
539 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_users
));
540 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_groups
));
541 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_aliases
));
542 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
544 if (ndr_flags
& NDR_BUFFERS
) {
545 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->oem_information
));
546 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
547 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary
));
549 return NDR_ERR_SUCCESS
;
552 _PUBLIC_
void ndr_print_samr_DomGeneralInformation(struct ndr_print
*ndr
, const char *name
, const struct samr_DomGeneralInformation
*r
)
554 ndr_print_struct(ndr
, name
, "samr_DomGeneralInformation");
556 ndr_print_NTTIME(ndr
, "force_logoff_time", r
->force_logoff_time
);
557 ndr_print_lsa_String(ndr
, "oem_information", &r
->oem_information
);
558 ndr_print_lsa_String(ndr
, "domain_name", &r
->domain_name
);
559 ndr_print_lsa_String(ndr
, "primary", &r
->primary
);
560 ndr_print_udlong(ndr
, "sequence_num", r
->sequence_num
);
561 ndr_print_samr_DomainServerState(ndr
, "domain_server_state", r
->domain_server_state
);
562 ndr_print_samr_Role(ndr
, "role", r
->role
);
563 ndr_print_uint32(ndr
, "unknown3", r
->unknown3
);
564 ndr_print_uint32(ndr
, "num_users", r
->num_users
);
565 ndr_print_uint32(ndr
, "num_groups", r
->num_groups
);
566 ndr_print_uint32(ndr
, "num_aliases", r
->num_aliases
);
570 static enum ndr_err_code
ndr_push_samr_DomInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo3
*r
)
572 if (ndr_flags
& NDR_SCALARS
) {
573 NDR_CHECK(ndr_push_align(ndr
, 4));
574 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->force_logoff_time
));
575 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
577 if (ndr_flags
& NDR_BUFFERS
) {
579 return NDR_ERR_SUCCESS
;
582 static enum ndr_err_code
ndr_pull_samr_DomInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo3
*r
)
584 if (ndr_flags
& NDR_SCALARS
) {
585 NDR_CHECK(ndr_pull_align(ndr
, 4));
586 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->force_logoff_time
));
587 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
589 if (ndr_flags
& NDR_BUFFERS
) {
591 return NDR_ERR_SUCCESS
;
594 _PUBLIC_
void ndr_print_samr_DomInfo3(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo3
*r
)
596 ndr_print_struct(ndr
, name
, "samr_DomInfo3");
598 ndr_print_NTTIME(ndr
, "force_logoff_time", r
->force_logoff_time
);
602 static enum ndr_err_code
ndr_push_samr_DomOEMInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomOEMInformation
*r
)
604 if (ndr_flags
& NDR_SCALARS
) {
605 NDR_CHECK(ndr_push_align(ndr
, 5));
606 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->oem_information
));
607 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
609 if (ndr_flags
& NDR_BUFFERS
) {
610 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->oem_information
));
612 return NDR_ERR_SUCCESS
;
615 static enum ndr_err_code
ndr_pull_samr_DomOEMInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomOEMInformation
*r
)
617 if (ndr_flags
& NDR_SCALARS
) {
618 NDR_CHECK(ndr_pull_align(ndr
, 5));
619 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->oem_information
));
620 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
622 if (ndr_flags
& NDR_BUFFERS
) {
623 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->oem_information
));
625 return NDR_ERR_SUCCESS
;
628 _PUBLIC_
void ndr_print_samr_DomOEMInformation(struct ndr_print
*ndr
, const char *name
, const struct samr_DomOEMInformation
*r
)
630 ndr_print_struct(ndr
, name
, "samr_DomOEMInformation");
632 ndr_print_lsa_String(ndr
, "oem_information", &r
->oem_information
);
636 static enum ndr_err_code
ndr_push_samr_DomInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo5
*r
)
638 if (ndr_flags
& NDR_SCALARS
) {
639 NDR_CHECK(ndr_push_align(ndr
, 5));
640 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
641 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
643 if (ndr_flags
& NDR_BUFFERS
) {
644 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
646 return NDR_ERR_SUCCESS
;
649 static enum ndr_err_code
ndr_pull_samr_DomInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo5
*r
)
651 if (ndr_flags
& NDR_SCALARS
) {
652 NDR_CHECK(ndr_pull_align(ndr
, 5));
653 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
654 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
656 if (ndr_flags
& NDR_BUFFERS
) {
657 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
659 return NDR_ERR_SUCCESS
;
662 _PUBLIC_
void ndr_print_samr_DomInfo5(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo5
*r
)
664 ndr_print_struct(ndr
, name
, "samr_DomInfo5");
666 ndr_print_lsa_String(ndr
, "domain_name", &r
->domain_name
);
670 static enum ndr_err_code
ndr_push_samr_DomInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo6
*r
)
672 if (ndr_flags
& NDR_SCALARS
) {
673 NDR_CHECK(ndr_push_align(ndr
, 5));
674 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->primary
));
675 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
677 if (ndr_flags
& NDR_BUFFERS
) {
678 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary
));
680 return NDR_ERR_SUCCESS
;
683 static enum ndr_err_code
ndr_pull_samr_DomInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo6
*r
)
685 if (ndr_flags
& NDR_SCALARS
) {
686 NDR_CHECK(ndr_pull_align(ndr
, 5));
687 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->primary
));
688 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
690 if (ndr_flags
& NDR_BUFFERS
) {
691 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary
));
693 return NDR_ERR_SUCCESS
;
696 _PUBLIC_
void ndr_print_samr_DomInfo6(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo6
*r
)
698 ndr_print_struct(ndr
, name
, "samr_DomInfo6");
700 ndr_print_lsa_String(ndr
, "primary", &r
->primary
);
704 static enum ndr_err_code
ndr_push_samr_DomInfo7(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo7
*r
)
706 if (ndr_flags
& NDR_SCALARS
) {
707 NDR_CHECK(ndr_push_align(ndr
, 4));
708 NDR_CHECK(ndr_push_samr_Role(ndr
, NDR_SCALARS
, r
->role
));
709 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
711 if (ndr_flags
& NDR_BUFFERS
) {
713 return NDR_ERR_SUCCESS
;
716 static enum ndr_err_code
ndr_pull_samr_DomInfo7(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo7
*r
)
718 if (ndr_flags
& NDR_SCALARS
) {
719 NDR_CHECK(ndr_pull_align(ndr
, 4));
720 NDR_CHECK(ndr_pull_samr_Role(ndr
, NDR_SCALARS
, &r
->role
));
721 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
723 if (ndr_flags
& NDR_BUFFERS
) {
725 return NDR_ERR_SUCCESS
;
728 _PUBLIC_
void ndr_print_samr_DomInfo7(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo7
*r
)
730 ndr_print_struct(ndr
, name
, "samr_DomInfo7");
732 ndr_print_samr_Role(ndr
, "role", r
->role
);
736 static enum ndr_err_code
ndr_push_samr_DomInfo8(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo8
*r
)
738 if (ndr_flags
& NDR_SCALARS
) {
739 NDR_CHECK(ndr_push_align(ndr
, 8));
740 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->sequence_num
));
741 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->domain_create_time
));
742 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
744 if (ndr_flags
& NDR_BUFFERS
) {
746 return NDR_ERR_SUCCESS
;
749 static enum ndr_err_code
ndr_pull_samr_DomInfo8(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo8
*r
)
751 if (ndr_flags
& NDR_SCALARS
) {
752 NDR_CHECK(ndr_pull_align(ndr
, 8));
753 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->sequence_num
));
754 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->domain_create_time
));
755 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
757 if (ndr_flags
& NDR_BUFFERS
) {
759 return NDR_ERR_SUCCESS
;
762 _PUBLIC_
void ndr_print_samr_DomInfo8(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo8
*r
)
764 ndr_print_struct(ndr
, name
, "samr_DomInfo8");
766 ndr_print_hyper(ndr
, "sequence_num", r
->sequence_num
);
767 ndr_print_NTTIME(ndr
, "domain_create_time", r
->domain_create_time
);
771 static enum ndr_err_code
ndr_push_samr_DomInfo9(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo9
*r
)
773 if (ndr_flags
& NDR_SCALARS
) {
774 NDR_CHECK(ndr_push_align(ndr
, 4));
775 NDR_CHECK(ndr_push_samr_DomainServerState(ndr
, NDR_SCALARS
, r
->domain_server_state
));
776 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
778 if (ndr_flags
& NDR_BUFFERS
) {
780 return NDR_ERR_SUCCESS
;
783 static enum ndr_err_code
ndr_pull_samr_DomInfo9(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo9
*r
)
785 if (ndr_flags
& NDR_SCALARS
) {
786 NDR_CHECK(ndr_pull_align(ndr
, 4));
787 NDR_CHECK(ndr_pull_samr_DomainServerState(ndr
, NDR_SCALARS
, &r
->domain_server_state
));
788 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
790 if (ndr_flags
& NDR_BUFFERS
) {
792 return NDR_ERR_SUCCESS
;
795 _PUBLIC_
void ndr_print_samr_DomInfo9(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo9
*r
)
797 ndr_print_struct(ndr
, name
, "samr_DomInfo9");
799 ndr_print_samr_DomainServerState(ndr
, "domain_server_state", r
->domain_server_state
);
803 static enum ndr_err_code
ndr_push_samr_DomGeneralInformation2(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomGeneralInformation2
*r
)
805 if (ndr_flags
& NDR_SCALARS
) {
806 NDR_CHECK(ndr_push_align(ndr
, 8));
807 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr
, NDR_SCALARS
, &r
->general
));
808 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->lockout_duration
));
809 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->lockout_window
));
810 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->lockout_threshold
));
811 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
813 if (ndr_flags
& NDR_BUFFERS
) {
814 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr
, NDR_BUFFERS
, &r
->general
));
816 return NDR_ERR_SUCCESS
;
819 static enum ndr_err_code
ndr_pull_samr_DomGeneralInformation2(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomGeneralInformation2
*r
)
821 if (ndr_flags
& NDR_SCALARS
) {
822 NDR_CHECK(ndr_pull_align(ndr
, 8));
823 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr
, NDR_SCALARS
, &r
->general
));
824 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->lockout_duration
));
825 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->lockout_window
));
826 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->lockout_threshold
));
827 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
829 if (ndr_flags
& NDR_BUFFERS
) {
830 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr
, NDR_BUFFERS
, &r
->general
));
832 return NDR_ERR_SUCCESS
;
835 _PUBLIC_
void ndr_print_samr_DomGeneralInformation2(struct ndr_print
*ndr
, const char *name
, const struct samr_DomGeneralInformation2
*r
)
837 ndr_print_struct(ndr
, name
, "samr_DomGeneralInformation2");
839 ndr_print_samr_DomGeneralInformation(ndr
, "general", &r
->general
);
840 ndr_print_hyper(ndr
, "lockout_duration", r
->lockout_duration
);
841 ndr_print_hyper(ndr
, "lockout_window", r
->lockout_window
);
842 ndr_print_uint16(ndr
, "lockout_threshold", r
->lockout_threshold
);
846 static enum ndr_err_code
ndr_push_samr_DomInfo12(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo12
*r
)
848 if (ndr_flags
& NDR_SCALARS
) {
849 NDR_CHECK(ndr_push_align(ndr
, 8));
850 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->lockout_duration
));
851 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->lockout_window
));
852 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->lockout_threshold
));
853 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
855 if (ndr_flags
& NDR_BUFFERS
) {
857 return NDR_ERR_SUCCESS
;
860 static enum ndr_err_code
ndr_pull_samr_DomInfo12(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo12
*r
)
862 if (ndr_flags
& NDR_SCALARS
) {
863 NDR_CHECK(ndr_pull_align(ndr
, 8));
864 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->lockout_duration
));
865 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->lockout_window
));
866 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->lockout_threshold
));
867 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
869 if (ndr_flags
& NDR_BUFFERS
) {
871 return NDR_ERR_SUCCESS
;
874 _PUBLIC_
void ndr_print_samr_DomInfo12(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo12
*r
)
876 ndr_print_struct(ndr
, name
, "samr_DomInfo12");
878 ndr_print_hyper(ndr
, "lockout_duration", r
->lockout_duration
);
879 ndr_print_hyper(ndr
, "lockout_window", r
->lockout_window
);
880 ndr_print_uint16(ndr
, "lockout_threshold", r
->lockout_threshold
);
884 static enum ndr_err_code
ndr_push_samr_DomInfo13(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo13
*r
)
886 if (ndr_flags
& NDR_SCALARS
) {
887 NDR_CHECK(ndr_push_align(ndr
, 8));
888 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->sequence_num
));
889 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->domain_create_time
));
890 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->modified_count_at_last_promotion
));
891 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
893 if (ndr_flags
& NDR_BUFFERS
) {
895 return NDR_ERR_SUCCESS
;
898 static enum ndr_err_code
ndr_pull_samr_DomInfo13(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo13
*r
)
900 if (ndr_flags
& NDR_SCALARS
) {
901 NDR_CHECK(ndr_pull_align(ndr
, 8));
902 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->sequence_num
));
903 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->domain_create_time
));
904 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->modified_count_at_last_promotion
));
905 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
907 if (ndr_flags
& NDR_BUFFERS
) {
909 return NDR_ERR_SUCCESS
;
912 _PUBLIC_
void ndr_print_samr_DomInfo13(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo13
*r
)
914 ndr_print_struct(ndr
, name
, "samr_DomInfo13");
916 ndr_print_hyper(ndr
, "sequence_num", r
->sequence_num
);
917 ndr_print_NTTIME(ndr
, "domain_create_time", r
->domain_create_time
);
918 ndr_print_hyper(ndr
, "modified_count_at_last_promotion", r
->modified_count_at_last_promotion
);
922 static enum ndr_err_code
ndr_push_samr_DomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_DomainInfo
*r
)
924 if (ndr_flags
& NDR_SCALARS
) {
925 int level
= ndr_push_get_switch_value(ndr
, r
);
926 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
927 NDR_CHECK(ndr_push_union_align(ndr
, 8));
930 NDR_CHECK(ndr_push_samr_DomInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
934 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr
, NDR_SCALARS
, &r
->general
));
938 NDR_CHECK(ndr_push_samr_DomInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
942 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr
, NDR_SCALARS
, &r
->oem
));
946 NDR_CHECK(ndr_push_samr_DomInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
950 NDR_CHECK(ndr_push_samr_DomInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
954 NDR_CHECK(ndr_push_samr_DomInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
958 NDR_CHECK(ndr_push_samr_DomInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
962 NDR_CHECK(ndr_push_samr_DomInfo9(ndr
, NDR_SCALARS
, &r
->info9
));
966 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr
, NDR_SCALARS
, &r
->general2
));
970 NDR_CHECK(ndr_push_samr_DomInfo12(ndr
, NDR_SCALARS
, &r
->info12
));
974 NDR_CHECK(ndr_push_samr_DomInfo13(ndr
, NDR_SCALARS
, &r
->info13
));
978 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
981 if (ndr_flags
& NDR_BUFFERS
) {
982 int level
= ndr_push_get_switch_value(ndr
, r
);
988 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr
, NDR_BUFFERS
, &r
->general
));
995 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr
, NDR_BUFFERS
, &r
->oem
));
999 NDR_CHECK(ndr_push_samr_DomInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
1003 NDR_CHECK(ndr_push_samr_DomInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
1016 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr
, NDR_BUFFERS
, &r
->general2
));
1026 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1029 return NDR_ERR_SUCCESS
;
1032 static enum ndr_err_code
ndr_pull_samr_DomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_DomainInfo
*r
)
1036 level
= ndr_pull_get_switch_value(ndr
, r
);
1037 if (ndr_flags
& NDR_SCALARS
) {
1038 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
1039 if (_level
!= level
) {
1040 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1042 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
1045 NDR_CHECK(ndr_pull_samr_DomInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
1049 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr
, NDR_SCALARS
, &r
->general
));
1053 NDR_CHECK(ndr_pull_samr_DomInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
1057 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr
, NDR_SCALARS
, &r
->oem
));
1061 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
1065 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
1069 NDR_CHECK(ndr_pull_samr_DomInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
1073 NDR_CHECK(ndr_pull_samr_DomInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
1077 NDR_CHECK(ndr_pull_samr_DomInfo9(ndr
, NDR_SCALARS
, &r
->info9
));
1081 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr
, NDR_SCALARS
, &r
->general2
));
1085 NDR_CHECK(ndr_pull_samr_DomInfo12(ndr
, NDR_SCALARS
, &r
->info12
));
1089 NDR_CHECK(ndr_pull_samr_DomInfo13(ndr
, NDR_SCALARS
, &r
->info13
));
1093 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1096 if (ndr_flags
& NDR_BUFFERS
) {
1102 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr
, NDR_BUFFERS
, &r
->general
));
1109 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr
, NDR_BUFFERS
, &r
->oem
));
1113 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
1117 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
1130 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr
, NDR_BUFFERS
, &r
->general2
));
1140 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1143 return NDR_ERR_SUCCESS
;
1146 _PUBLIC_
void ndr_print_samr_DomainInfo(struct ndr_print
*ndr
, const char *name
, const union samr_DomainInfo
*r
)
1149 level
= ndr_print_get_switch_value(ndr
, r
);
1150 ndr_print_union(ndr
, name
, level
, "samr_DomainInfo");
1153 ndr_print_samr_DomInfo1(ndr
, "info1", &r
->info1
);
1157 ndr_print_samr_DomGeneralInformation(ndr
, "general", &r
->general
);
1161 ndr_print_samr_DomInfo3(ndr
, "info3", &r
->info3
);
1165 ndr_print_samr_DomOEMInformation(ndr
, "oem", &r
->oem
);
1169 ndr_print_samr_DomInfo5(ndr
, "info5", &r
->info5
);
1173 ndr_print_samr_DomInfo6(ndr
, "info6", &r
->info6
);
1177 ndr_print_samr_DomInfo7(ndr
, "info7", &r
->info7
);
1181 ndr_print_samr_DomInfo8(ndr
, "info8", &r
->info8
);
1185 ndr_print_samr_DomInfo9(ndr
, "info9", &r
->info9
);
1189 ndr_print_samr_DomGeneralInformation2(ndr
, "general2", &r
->general2
);
1193 ndr_print_samr_DomInfo12(ndr
, "info12", &r
->info12
);
1197 ndr_print_samr_DomInfo13(ndr
, "info13", &r
->info13
);
1201 ndr_print_bad_level(ndr
, name
, level
);
1205 static enum ndr_err_code
ndr_push_samr_Ids(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_Ids
*r
)
1207 uint32_t cntr_ids_1
;
1208 if (ndr_flags
& NDR_SCALARS
) {
1209 NDR_CHECK(ndr_push_align(ndr
, 5));
1210 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1211 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ids
));
1212 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1214 if (ndr_flags
& NDR_BUFFERS
) {
1216 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
1217 for (cntr_ids_1
= 0; cntr_ids_1
< r
->count
; cntr_ids_1
++) {
1218 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ids
[cntr_ids_1
]));
1222 return NDR_ERR_SUCCESS
;
1225 static enum ndr_err_code
ndr_pull_samr_Ids(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_Ids
*r
)
1228 uint32_t cntr_ids_1
;
1229 TALLOC_CTX
*_mem_save_ids_0
;
1230 TALLOC_CTX
*_mem_save_ids_1
;
1231 if (ndr_flags
& NDR_SCALARS
) {
1232 NDR_CHECK(ndr_pull_align(ndr
, 5));
1233 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1234 if (r
->count
> 1024) {
1235 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1237 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ids
));
1239 NDR_PULL_ALLOC(ndr
, r
->ids
);
1243 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1245 if (ndr_flags
& NDR_BUFFERS
) {
1247 _mem_save_ids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1248 NDR_PULL_SET_MEM_CTX(ndr
, r
->ids
, 0);
1249 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->ids
));
1250 NDR_PULL_ALLOC_N(ndr
, r
->ids
, ndr_get_array_size(ndr
, &r
->ids
));
1251 _mem_save_ids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1252 NDR_PULL_SET_MEM_CTX(ndr
, r
->ids
, 0);
1253 for (cntr_ids_1
= 0; cntr_ids_1
< r
->count
; cntr_ids_1
++) {
1254 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ids
[cntr_ids_1
]));
1256 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ids_1
, 0);
1257 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ids_0
, 0);
1260 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->ids
, r
->count
));
1263 return NDR_ERR_SUCCESS
;
1266 _PUBLIC_
void ndr_print_samr_Ids(struct ndr_print
*ndr
, const char *name
, const struct samr_Ids
*r
)
1268 uint32_t cntr_ids_1
;
1269 ndr_print_struct(ndr
, name
, "samr_Ids");
1271 ndr_print_uint32(ndr
, "count", r
->count
);
1272 ndr_print_ptr(ndr
, "ids", r
->ids
);
1275 ndr
->print(ndr
, "%s: ARRAY(%d)", "ids", (int)r
->count
);
1277 for (cntr_ids_1
=0;cntr_ids_1
<r
->count
;cntr_ids_1
++) {
1279 if (asprintf(&idx_1
, "[%d]", cntr_ids_1
) != -1) {
1280 ndr_print_uint32(ndr
, "ids", r
->ids
[cntr_ids_1
]);
1290 _PUBLIC_
enum ndr_err_code
ndr_push_samr_GroupAttrs(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
1292 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
1293 return NDR_ERR_SUCCESS
;
1296 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_GroupAttrs(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
1299 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
1301 return NDR_ERR_SUCCESS
;
1304 _PUBLIC_
void ndr_print_samr_GroupAttrs(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
1306 ndr_print_uint32(ndr
, name
, r
);
1308 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_MANDATORY", SE_GROUP_MANDATORY
, r
);
1309 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_ENABLED_BY_DEFAULT", SE_GROUP_ENABLED_BY_DEFAULT
, r
);
1310 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_ENABLED", SE_GROUP_ENABLED
, r
);
1311 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_OWNER", SE_GROUP_OWNER
, r
);
1312 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_USE_FOR_DENY_ONLY", SE_GROUP_USE_FOR_DENY_ONLY
, r
);
1313 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_RESOURCE", SE_GROUP_RESOURCE
, r
);
1314 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_LOGON_ID", SE_GROUP_LOGON_ID
, r
);
1318 static enum ndr_err_code
ndr_push_samr_GroupInfoAll(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_GroupInfoAll
*r
)
1320 if (ndr_flags
& NDR_SCALARS
) {
1321 NDR_CHECK(ndr_push_align(ndr
, 5));
1322 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1323 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->attributes
));
1324 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_members
));
1325 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1326 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1328 if (ndr_flags
& NDR_BUFFERS
) {
1329 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1330 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1332 return NDR_ERR_SUCCESS
;
1335 static enum ndr_err_code
ndr_pull_samr_GroupInfoAll(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_GroupInfoAll
*r
)
1337 if (ndr_flags
& NDR_SCALARS
) {
1338 NDR_CHECK(ndr_pull_align(ndr
, 5));
1339 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1340 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->attributes
));
1341 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_members
));
1342 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1343 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1345 if (ndr_flags
& NDR_BUFFERS
) {
1346 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1347 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1349 return NDR_ERR_SUCCESS
;
1352 _PUBLIC_
void ndr_print_samr_GroupInfoAll(struct ndr_print
*ndr
, const char *name
, const struct samr_GroupInfoAll
*r
)
1354 ndr_print_struct(ndr
, name
, "samr_GroupInfoAll");
1356 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1357 ndr_print_samr_GroupAttrs(ndr
, "attributes", r
->attributes
);
1358 ndr_print_uint32(ndr
, "num_members", r
->num_members
);
1359 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1363 static enum ndr_err_code
ndr_push_samr_GroupInfoAttributes(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_GroupInfoAttributes
*r
)
1365 if (ndr_flags
& NDR_SCALARS
) {
1366 NDR_CHECK(ndr_push_align(ndr
, 4));
1367 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->attributes
));
1368 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1370 if (ndr_flags
& NDR_BUFFERS
) {
1372 return NDR_ERR_SUCCESS
;
1375 static enum ndr_err_code
ndr_pull_samr_GroupInfoAttributes(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_GroupInfoAttributes
*r
)
1377 if (ndr_flags
& NDR_SCALARS
) {
1378 NDR_CHECK(ndr_pull_align(ndr
, 4));
1379 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->attributes
));
1380 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1382 if (ndr_flags
& NDR_BUFFERS
) {
1384 return NDR_ERR_SUCCESS
;
1387 _PUBLIC_
void ndr_print_samr_GroupInfoAttributes(struct ndr_print
*ndr
, const char *name
, const struct samr_GroupInfoAttributes
*r
)
1389 ndr_print_struct(ndr
, name
, "samr_GroupInfoAttributes");
1391 ndr_print_samr_GroupAttrs(ndr
, "attributes", r
->attributes
);
1395 static enum ndr_err_code
ndr_push_samr_GroupInfoEnum(struct ndr_push
*ndr
, int ndr_flags
, enum samr_GroupInfoEnum r
)
1397 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
1398 return NDR_ERR_SUCCESS
;
1401 static enum ndr_err_code
ndr_pull_samr_GroupInfoEnum(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_GroupInfoEnum
*r
)
1404 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
1406 return NDR_ERR_SUCCESS
;
1409 _PUBLIC_
void ndr_print_samr_GroupInfoEnum(struct ndr_print
*ndr
, const char *name
, enum samr_GroupInfoEnum r
)
1411 const char *val
= NULL
;
1414 case GROUPINFOALL
: val
= "GROUPINFOALL"; break;
1415 case GROUPINFONAME
: val
= "GROUPINFONAME"; break;
1416 case GROUPINFOATTRIBUTES
: val
= "GROUPINFOATTRIBUTES"; break;
1417 case GROUPINFODESCRIPTION
: val
= "GROUPINFODESCRIPTION"; break;
1418 case GROUPINFOALL2
: val
= "GROUPINFOALL2"; break;
1420 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1423 static enum ndr_err_code
ndr_push_samr_GroupInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_GroupInfo
*r
)
1425 if (ndr_flags
& NDR_SCALARS
) {
1426 int level
= ndr_push_get_switch_value(ndr
, r
);
1427 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, level
));
1428 NDR_CHECK(ndr_push_union_align(ndr
, 5));
1430 case GROUPINFOALL
: {
1431 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr
, NDR_SCALARS
, &r
->all
));
1434 case GROUPINFONAME
: {
1435 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1438 case GROUPINFOATTRIBUTES
: {
1439 NDR_CHECK(ndr_push_samr_GroupInfoAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
1442 case GROUPINFODESCRIPTION
: {
1443 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1446 case GROUPINFOALL2
: {
1447 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr
, NDR_SCALARS
, &r
->all2
));
1451 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1454 if (ndr_flags
& NDR_BUFFERS
) {
1455 int level
= ndr_push_get_switch_value(ndr
, r
);
1458 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr
, NDR_BUFFERS
, &r
->all
));
1462 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1465 case GROUPINFOATTRIBUTES
:
1468 case GROUPINFODESCRIPTION
:
1469 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1473 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr
, NDR_BUFFERS
, &r
->all2
));
1477 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1480 return NDR_ERR_SUCCESS
;
1483 static enum ndr_err_code
ndr_pull_samr_GroupInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_GroupInfo
*r
)
1487 level
= ndr_pull_get_switch_value(ndr
, r
);
1488 if (ndr_flags
& NDR_SCALARS
) {
1489 NDR_CHECK(ndr_pull_uint1632(ndr
, NDR_SCALARS
, &_level
));
1490 if (_level
!= level
) {
1491 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1493 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
1495 case GROUPINFOALL
: {
1496 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr
, NDR_SCALARS
, &r
->all
));
1499 case GROUPINFONAME
: {
1500 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1503 case GROUPINFOATTRIBUTES
: {
1504 NDR_CHECK(ndr_pull_samr_GroupInfoAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
1507 case GROUPINFODESCRIPTION
: {
1508 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1511 case GROUPINFOALL2
: {
1512 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr
, NDR_SCALARS
, &r
->all2
));
1516 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1519 if (ndr_flags
& NDR_BUFFERS
) {
1522 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr
, NDR_BUFFERS
, &r
->all
));
1526 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1529 case GROUPINFOATTRIBUTES
:
1532 case GROUPINFODESCRIPTION
:
1533 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1537 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr
, NDR_BUFFERS
, &r
->all2
));
1541 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1544 return NDR_ERR_SUCCESS
;
1547 _PUBLIC_
void ndr_print_samr_GroupInfo(struct ndr_print
*ndr
, const char *name
, const union samr_GroupInfo
*r
)
1550 level
= ndr_print_get_switch_value(ndr
, r
);
1551 ndr_print_union(ndr
, name
, level
, "samr_GroupInfo");
1554 ndr_print_samr_GroupInfoAll(ndr
, "all", &r
->all
);
1558 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1561 case GROUPINFOATTRIBUTES
:
1562 ndr_print_samr_GroupInfoAttributes(ndr
, "attributes", &r
->attributes
);
1565 case GROUPINFODESCRIPTION
:
1566 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1570 ndr_print_samr_GroupInfoAll(ndr
, "all2", &r
->all2
);
1574 ndr_print_bad_level(ndr
, name
, level
);
1578 static enum ndr_err_code
ndr_push_samr_RidTypeArray(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_RidTypeArray
*r
)
1580 uint32_t cntr_rids_1
;
1581 uint32_t cntr_types_1
;
1582 if (ndr_flags
& NDR_SCALARS
) {
1583 NDR_CHECK(ndr_push_align(ndr
, 5));
1584 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1585 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->rids
));
1586 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->types
));
1587 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1589 if (ndr_flags
& NDR_BUFFERS
) {
1591 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
1592 for (cntr_rids_1
= 0; cntr_rids_1
< r
->count
; cntr_rids_1
++) {
1593 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rids
[cntr_rids_1
]));
1597 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
1598 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
1599 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->types
[cntr_types_1
]));
1603 return NDR_ERR_SUCCESS
;
1606 static enum ndr_err_code
ndr_pull_samr_RidTypeArray(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_RidTypeArray
*r
)
1609 uint32_t cntr_rids_1
;
1610 TALLOC_CTX
*_mem_save_rids_0
;
1611 TALLOC_CTX
*_mem_save_rids_1
;
1612 uint32_t _ptr_types
;
1613 uint32_t cntr_types_1
;
1614 TALLOC_CTX
*_mem_save_types_0
;
1615 TALLOC_CTX
*_mem_save_types_1
;
1616 if (ndr_flags
& NDR_SCALARS
) {
1617 NDR_CHECK(ndr_pull_align(ndr
, 5));
1618 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1619 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rids
));
1621 NDR_PULL_ALLOC(ndr
, r
->rids
);
1625 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_types
));
1627 NDR_PULL_ALLOC(ndr
, r
->types
);
1631 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1633 if (ndr_flags
& NDR_BUFFERS
) {
1635 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1636 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
1637 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->rids
));
1638 NDR_PULL_ALLOC_N(ndr
, r
->rids
, ndr_get_array_size(ndr
, &r
->rids
));
1639 _mem_save_rids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1640 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
1641 for (cntr_rids_1
= 0; cntr_rids_1
< r
->count
; cntr_rids_1
++) {
1642 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rids
[cntr_rids_1
]));
1644 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_1
, 0);
1645 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, 0);
1648 _mem_save_types_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1649 NDR_PULL_SET_MEM_CTX(ndr
, r
->types
, 0);
1650 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->types
));
1651 NDR_PULL_ALLOC_N(ndr
, r
->types
, ndr_get_array_size(ndr
, &r
->types
));
1652 _mem_save_types_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1653 NDR_PULL_SET_MEM_CTX(ndr
, r
->types
, 0);
1654 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
1655 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->types
[cntr_types_1
]));
1657 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_1
, 0);
1658 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_0
, 0);
1661 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->rids
, r
->count
));
1664 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->types
, r
->count
));
1667 return NDR_ERR_SUCCESS
;
1670 _PUBLIC_
void ndr_print_samr_RidTypeArray(struct ndr_print
*ndr
, const char *name
, const struct samr_RidTypeArray
*r
)
1672 uint32_t cntr_rids_1
;
1673 uint32_t cntr_types_1
;
1674 ndr_print_struct(ndr
, name
, "samr_RidTypeArray");
1676 ndr_print_uint32(ndr
, "count", r
->count
);
1677 ndr_print_ptr(ndr
, "rids", r
->rids
);
1680 ndr
->print(ndr
, "%s: ARRAY(%d)", "rids", (int)r
->count
);
1682 for (cntr_rids_1
=0;cntr_rids_1
<r
->count
;cntr_rids_1
++) {
1684 if (asprintf(&idx_1
, "[%d]", cntr_rids_1
) != -1) {
1685 ndr_print_uint32(ndr
, "rids", r
->rids
[cntr_rids_1
]);
1692 ndr_print_ptr(ndr
, "types", r
->types
);
1695 ndr
->print(ndr
, "%s: ARRAY(%d)", "types", (int)r
->count
);
1697 for (cntr_types_1
=0;cntr_types_1
<r
->count
;cntr_types_1
++) {
1699 if (asprintf(&idx_1
, "[%d]", cntr_types_1
) != -1) {
1700 ndr_print_uint32(ndr
, "types", r
->types
[cntr_types_1
]);
1710 static enum ndr_err_code
ndr_push_samr_AliasInfoAll(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_AliasInfoAll
*r
)
1712 if (ndr_flags
& NDR_SCALARS
) {
1713 NDR_CHECK(ndr_push_align(ndr
, 5));
1714 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1715 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_members
));
1716 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1717 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1719 if (ndr_flags
& NDR_BUFFERS
) {
1720 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1721 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1723 return NDR_ERR_SUCCESS
;
1726 static enum ndr_err_code
ndr_pull_samr_AliasInfoAll(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_AliasInfoAll
*r
)
1728 if (ndr_flags
& NDR_SCALARS
) {
1729 NDR_CHECK(ndr_pull_align(ndr
, 5));
1730 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1731 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_members
));
1732 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1733 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1735 if (ndr_flags
& NDR_BUFFERS
) {
1736 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1737 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1739 return NDR_ERR_SUCCESS
;
1742 _PUBLIC_
void ndr_print_samr_AliasInfoAll(struct ndr_print
*ndr
, const char *name
, const struct samr_AliasInfoAll
*r
)
1744 ndr_print_struct(ndr
, name
, "samr_AliasInfoAll");
1746 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1747 ndr_print_uint32(ndr
, "num_members", r
->num_members
);
1748 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1752 static enum ndr_err_code
ndr_push_samr_AliasInfoEnum(struct ndr_push
*ndr
, int ndr_flags
, enum samr_AliasInfoEnum r
)
1754 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
1755 return NDR_ERR_SUCCESS
;
1758 static enum ndr_err_code
ndr_pull_samr_AliasInfoEnum(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_AliasInfoEnum
*r
)
1761 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
1763 return NDR_ERR_SUCCESS
;
1766 _PUBLIC_
void ndr_print_samr_AliasInfoEnum(struct ndr_print
*ndr
, const char *name
, enum samr_AliasInfoEnum r
)
1768 const char *val
= NULL
;
1771 case ALIASINFOALL
: val
= "ALIASINFOALL"; break;
1772 case ALIASINFONAME
: val
= "ALIASINFONAME"; break;
1773 case ALIASINFODESCRIPTION
: val
= "ALIASINFODESCRIPTION"; break;
1775 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1778 static enum ndr_err_code
ndr_push_samr_AliasInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_AliasInfo
*r
)
1780 if (ndr_flags
& NDR_SCALARS
) {
1781 int level
= ndr_push_get_switch_value(ndr
, r
);
1782 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, level
));
1783 NDR_CHECK(ndr_push_union_align(ndr
, 5));
1785 case ALIASINFOALL
: {
1786 NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr
, NDR_SCALARS
, &r
->all
));
1789 case ALIASINFONAME
: {
1790 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1793 case ALIASINFODESCRIPTION
: {
1794 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1798 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1801 if (ndr_flags
& NDR_BUFFERS
) {
1802 int level
= ndr_push_get_switch_value(ndr
, r
);
1805 NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr
, NDR_BUFFERS
, &r
->all
));
1809 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1812 case ALIASINFODESCRIPTION
:
1813 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1817 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1820 return NDR_ERR_SUCCESS
;
1823 static enum ndr_err_code
ndr_pull_samr_AliasInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_AliasInfo
*r
)
1827 level
= ndr_pull_get_switch_value(ndr
, r
);
1828 if (ndr_flags
& NDR_SCALARS
) {
1829 NDR_CHECK(ndr_pull_uint1632(ndr
, NDR_SCALARS
, &_level
));
1830 if (_level
!= level
) {
1831 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1833 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
1835 case ALIASINFOALL
: {
1836 NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr
, NDR_SCALARS
, &r
->all
));
1839 case ALIASINFONAME
: {
1840 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1843 case ALIASINFODESCRIPTION
: {
1844 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1848 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1851 if (ndr_flags
& NDR_BUFFERS
) {
1854 NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr
, NDR_BUFFERS
, &r
->all
));
1858 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1861 case ALIASINFODESCRIPTION
:
1862 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1866 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1869 return NDR_ERR_SUCCESS
;
1872 _PUBLIC_
void ndr_print_samr_AliasInfo(struct ndr_print
*ndr
, const char *name
, const union samr_AliasInfo
*r
)
1875 level
= ndr_print_get_switch_value(ndr
, r
);
1876 ndr_print_union(ndr
, name
, level
, "samr_AliasInfo");
1879 ndr_print_samr_AliasInfoAll(ndr
, "all", &r
->all
);
1883 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1886 case ALIASINFODESCRIPTION
:
1887 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1891 ndr_print_bad_level(ndr
, name
, level
);
1895 static enum ndr_err_code
ndr_push_samr_UserInfoLevel(struct ndr_push
*ndr
, int ndr_flags
, enum samr_UserInfoLevel r
)
1897 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
1898 return NDR_ERR_SUCCESS
;
1901 static enum ndr_err_code
ndr_pull_samr_UserInfoLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_UserInfoLevel
*r
)
1904 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
1906 return NDR_ERR_SUCCESS
;
1909 _PUBLIC_
void ndr_print_samr_UserInfoLevel(struct ndr_print
*ndr
, const char *name
, enum samr_UserInfoLevel r
)
1911 const char *val
= NULL
;
1914 case UserGeneralInformation
: val
= "UserGeneralInformation"; break;
1915 case UserPreferencesInformation
: val
= "UserPreferencesInformation"; break;
1916 case UserLogonInformation
: val
= "UserLogonInformation"; break;
1917 case UserLogonHoursInformation
: val
= "UserLogonHoursInformation"; break;
1918 case UserAccountInformation
: val
= "UserAccountInformation"; break;
1919 case UserNameInformation
: val
= "UserNameInformation"; break;
1920 case UserAccountNameInformation
: val
= "UserAccountNameInformation"; break;
1921 case UserFullNameInformation
: val
= "UserFullNameInformation"; break;
1922 case UserPrimaryGroupInformation
: val
= "UserPrimaryGroupInformation"; break;
1923 case UserHomeInformation
: val
= "UserHomeInformation"; break;
1924 case UserScriptInformation
: val
= "UserScriptInformation"; break;
1925 case UserProfileInformation
: val
= "UserProfileInformation"; break;
1926 case UserAdminCommentInformation
: val
= "UserAdminCommentInformation"; break;
1927 case UserWorkStationsInformation
: val
= "UserWorkStationsInformation"; break;
1928 case UserControlInformation
: val
= "UserControlInformation"; break;
1929 case UserExpiresInformation
: val
= "UserExpiresInformation"; break;
1930 case UserInternal1Information
: val
= "UserInternal1Information"; break;
1931 case UserParametersInformation
: val
= "UserParametersInformation"; break;
1932 case UserAllInformation
: val
= "UserAllInformation"; break;
1933 case UserInternal4Information
: val
= "UserInternal4Information"; break;
1934 case UserInternal5Information
: val
= "UserInternal5Information"; break;
1935 case UserInternal4InformationNew
: val
= "UserInternal4InformationNew"; break;
1936 case UserInternal5InformationNew
: val
= "UserInternal5InformationNew"; break;
1938 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1941 static enum ndr_err_code
ndr_push_samr_UserInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo1
*r
)
1943 if (ndr_flags
& NDR_SCALARS
) {
1944 NDR_CHECK(ndr_push_align(ndr
, 5));
1945 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
1946 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
1947 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
1948 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1949 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
1950 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1952 if (ndr_flags
& NDR_BUFFERS
) {
1953 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
1954 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
1955 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1956 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
1958 return NDR_ERR_SUCCESS
;
1961 static enum ndr_err_code
ndr_pull_samr_UserInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo1
*r
)
1963 if (ndr_flags
& NDR_SCALARS
) {
1964 NDR_CHECK(ndr_pull_align(ndr
, 5));
1965 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
1966 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
1967 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
1968 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1969 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
1970 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1972 if (ndr_flags
& NDR_BUFFERS
) {
1973 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
1974 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
1975 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1976 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
1978 return NDR_ERR_SUCCESS
;
1981 _PUBLIC_
void ndr_print_samr_UserInfo1(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo1
*r
)
1983 ndr_print_struct(ndr
, name
, "samr_UserInfo1");
1985 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
1986 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
1987 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
1988 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1989 ndr_print_lsa_String(ndr
, "comment", &r
->comment
);
1993 static enum ndr_err_code
ndr_push_samr_UserInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo2
*r
)
1995 if (ndr_flags
& NDR_SCALARS
) {
1996 NDR_CHECK(ndr_push_align(ndr
, 5));
1997 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
1998 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown
));
1999 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->country_code
));
2000 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->code_page
));
2001 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2003 if (ndr_flags
& NDR_BUFFERS
) {
2004 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2005 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown
));
2007 return NDR_ERR_SUCCESS
;
2010 static enum ndr_err_code
ndr_pull_samr_UserInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo2
*r
)
2012 if (ndr_flags
& NDR_SCALARS
) {
2013 NDR_CHECK(ndr_pull_align(ndr
, 5));
2014 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
2015 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown
));
2016 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->country_code
));
2017 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->code_page
));
2018 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2020 if (ndr_flags
& NDR_BUFFERS
) {
2021 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2022 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown
));
2024 return NDR_ERR_SUCCESS
;
2027 _PUBLIC_
void ndr_print_samr_UserInfo2(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo2
*r
)
2029 ndr_print_struct(ndr
, name
, "samr_UserInfo2");
2031 ndr_print_lsa_String(ndr
, "comment", &r
->comment
);
2032 ndr_print_lsa_String(ndr
, "unknown", &r
->unknown
);
2033 ndr_print_uint16(ndr
, "country_code", r
->country_code
);
2034 ndr_print_uint16(ndr
, "code_page", r
->code_page
);
2038 _PUBLIC_
enum ndr_err_code
ndr_push_samr_LogonHours(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_LogonHours
*r
)
2041 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2042 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2043 if (ndr_flags
& NDR_SCALARS
) {
2044 NDR_CHECK(ndr_push_align(ndr
, 5));
2045 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->units_per_week
));
2046 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->bits
));
2047 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2049 if (ndr_flags
& NDR_BUFFERS
) {
2051 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 1260));
2052 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2053 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->units_per_week
/ 8));
2054 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->bits
, r
->units_per_week
/ 8));
2057 ndr
->flags
= _flags_save_STRUCT
;
2059 return NDR_ERR_SUCCESS
;
2062 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_LogonHours(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_LogonHours
*r
)
2065 TALLOC_CTX
*_mem_save_bits_0
;
2067 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2068 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2069 if (ndr_flags
& NDR_SCALARS
) {
2070 NDR_CHECK(ndr_pull_align(ndr
, 5));
2071 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->units_per_week
));
2072 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_bits
));
2074 NDR_PULL_ALLOC(ndr
, r
->bits
);
2078 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2080 if (ndr_flags
& NDR_BUFFERS
) {
2082 _mem_save_bits_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2083 NDR_PULL_SET_MEM_CTX(ndr
, r
->bits
, 0);
2084 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->bits
));
2085 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->bits
));
2086 if (ndr_get_array_length(ndr
, &r
->bits
) > ndr_get_array_size(ndr
, &r
->bits
)) {
2087 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->bits
), ndr_get_array_length(ndr
, &r
->bits
));
2089 NDR_PULL_ALLOC_N(ndr
, r
->bits
, ndr_get_array_size(ndr
, &r
->bits
));
2090 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->bits
, ndr_get_array_length(ndr
, &r
->bits
)));
2091 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bits_0
, 0);
2094 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->bits
, 1260));
2097 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->bits
, r
->units_per_week
/ 8));
2100 ndr
->flags
= _flags_save_STRUCT
;
2102 return NDR_ERR_SUCCESS
;
2105 _PUBLIC_
void ndr_print_samr_LogonHours(struct ndr_print
*ndr
, const char *name
, const struct samr_LogonHours
*r
)
2107 ndr_print_struct(ndr
, name
, "samr_LogonHours");
2109 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2110 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2112 ndr_print_uint16(ndr
, "units_per_week", r
->units_per_week
);
2113 ndr_print_ptr(ndr
, "bits", r
->bits
);
2116 ndr_print_array_uint8(ndr
, "bits", r
->bits
, r
->units_per_week
/ 8);
2120 ndr
->flags
= _flags_save_STRUCT
;
2124 static enum ndr_err_code
ndr_push_samr_UserInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo3
*r
)
2126 if (ndr_flags
& NDR_SCALARS
) {
2127 NDR_CHECK(ndr_push_align(ndr
, 5));
2128 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2129 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2130 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2131 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
2132 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2133 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2134 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2135 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2136 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2137 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logon
));
2138 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logoff
));
2139 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_password_change
));
2140 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->allow_password_change
));
2141 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->force_password_change
));
2142 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2143 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->bad_password_count
));
2144 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logon_count
));
2145 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
2146 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2148 if (ndr_flags
& NDR_BUFFERS
) {
2149 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2150 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2151 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2152 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2153 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2154 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2155 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2156 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2158 return NDR_ERR_SUCCESS
;
2161 static enum ndr_err_code
ndr_pull_samr_UserInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo3
*r
)
2163 if (ndr_flags
& NDR_SCALARS
) {
2164 NDR_CHECK(ndr_pull_align(ndr
, 5));
2165 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2166 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2167 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2168 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
2169 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2170 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2171 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2172 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2173 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2174 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logon
));
2175 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logoff
));
2176 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_password_change
));
2177 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->allow_password_change
));
2178 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->force_password_change
));
2179 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2180 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->bad_password_count
));
2181 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logon_count
));
2182 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
2183 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2185 if (ndr_flags
& NDR_BUFFERS
) {
2186 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2187 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2188 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2189 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2190 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2191 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2192 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2193 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2195 return NDR_ERR_SUCCESS
;
2198 _PUBLIC_
void ndr_print_samr_UserInfo3(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo3
*r
)
2200 ndr_print_struct(ndr
, name
, "samr_UserInfo3");
2202 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
2203 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
2204 ndr_print_uint32(ndr
, "rid", r
->rid
);
2205 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
2206 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
2207 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
2208 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
2209 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
2210 ndr_print_lsa_String(ndr
, "workstations", &r
->workstations
);
2211 ndr_print_NTTIME(ndr
, "last_logon", r
->last_logon
);
2212 ndr_print_NTTIME(ndr
, "last_logoff", r
->last_logoff
);
2213 ndr_print_NTTIME(ndr
, "last_password_change", r
->last_password_change
);
2214 ndr_print_NTTIME(ndr
, "allow_password_change", r
->allow_password_change
);
2215 ndr_print_NTTIME(ndr
, "force_password_change", r
->force_password_change
);
2216 ndr_print_samr_LogonHours(ndr
, "logon_hours", &r
->logon_hours
);
2217 ndr_print_uint16(ndr
, "bad_password_count", r
->bad_password_count
);
2218 ndr_print_uint16(ndr
, "logon_count", r
->logon_count
);
2219 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
2223 static enum ndr_err_code
ndr_push_samr_UserInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo4
*r
)
2225 if (ndr_flags
& NDR_SCALARS
) {
2226 NDR_CHECK(ndr_push_align(ndr
, 5));
2227 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2228 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2230 if (ndr_flags
& NDR_BUFFERS
) {
2231 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2233 return NDR_ERR_SUCCESS
;
2236 static enum ndr_err_code
ndr_pull_samr_UserInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo4
*r
)
2238 if (ndr_flags
& NDR_SCALARS
) {
2239 NDR_CHECK(ndr_pull_align(ndr
, 5));
2240 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2241 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2243 if (ndr_flags
& NDR_BUFFERS
) {
2244 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2246 return NDR_ERR_SUCCESS
;
2249 _PUBLIC_
void ndr_print_samr_UserInfo4(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo4
*r
)
2251 ndr_print_struct(ndr
, name
, "samr_UserInfo4");
2253 ndr_print_samr_LogonHours(ndr
, "logon_hours", &r
->logon_hours
);
2257 static enum ndr_err_code
ndr_push_samr_UserInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo5
*r
)
2259 if (ndr_flags
& NDR_SCALARS
) {
2260 NDR_CHECK(ndr_push_align(ndr
, 5));
2261 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2262 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2263 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2264 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
2265 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2266 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2267 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2268 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2269 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2270 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2271 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logon
));
2272 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logoff
));
2273 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2274 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->bad_password_count
));
2275 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logon_count
));
2276 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_password_change
));
2277 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->acct_expiry
));
2278 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
2279 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2281 if (ndr_flags
& NDR_BUFFERS
) {
2282 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2283 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2284 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2285 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2286 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2287 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2288 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2289 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2290 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2292 return NDR_ERR_SUCCESS
;
2295 static enum ndr_err_code
ndr_pull_samr_UserInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo5
*r
)
2297 if (ndr_flags
& NDR_SCALARS
) {
2298 NDR_CHECK(ndr_pull_align(ndr
, 5));
2299 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2300 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2301 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2302 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
2303 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2304 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2305 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2306 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2307 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2308 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2309 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logon
));
2310 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logoff
));
2311 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2312 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->bad_password_count
));
2313 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logon_count
));
2314 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_password_change
));
2315 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->acct_expiry
));
2316 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
2317 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2319 if (ndr_flags
& NDR_BUFFERS
) {
2320 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2321 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2322 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2323 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2324 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2325 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2326 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2327 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2328 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2330 return NDR_ERR_SUCCESS
;
2333 _PUBLIC_
void ndr_print_samr_UserInfo5(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo5
*r
)
2335 ndr_print_struct(ndr
, name
, "samr_UserInfo5");
2337 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
2338 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
2339 ndr_print_uint32(ndr
, "rid", r
->rid
);
2340 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
2341 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
2342 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
2343 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
2344 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
2345 ndr_print_lsa_String(ndr
, "description", &r
->description
);
2346 ndr_print_lsa_String(ndr
, "workstations", &r
->workstations
);
2347 ndr_print_NTTIME(ndr
, "last_logon", r
->last_logon
);
2348 ndr_print_NTTIME(ndr
, "last_logoff", r
->last_logoff
);
2349 ndr_print_samr_LogonHours(ndr
, "logon_hours", &r
->logon_hours
);
2350 ndr_print_uint16(ndr
, "bad_password_count", r
->bad_password_count
);
2351 ndr_print_uint16(ndr
, "logon_count", r
->logon_count
);
2352 ndr_print_NTTIME(ndr
, "last_password_change", r
->last_password_change
);
2353 ndr_print_NTTIME(ndr
, "acct_expiry", r
->acct_expiry
);
2354 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
2358 static enum ndr_err_code
ndr_push_samr_UserInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo6
*r
)
2360 if (ndr_flags
& NDR_SCALARS
) {
2361 NDR_CHECK(ndr_push_align(ndr
, 5));
2362 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2363 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2364 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2366 if (ndr_flags
& NDR_BUFFERS
) {
2367 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2368 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2370 return NDR_ERR_SUCCESS
;
2373 static enum ndr_err_code
ndr_pull_samr_UserInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo6
*r
)
2375 if (ndr_flags
& NDR_SCALARS
) {
2376 NDR_CHECK(ndr_pull_align(ndr
, 5));
2377 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2378 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2379 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2381 if (ndr_flags
& NDR_BUFFERS
) {
2382 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2383 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2385 return NDR_ERR_SUCCESS
;
2388 _PUBLIC_
void ndr_print_samr_UserInfo6(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo6
*r
)
2390 ndr_print_struct(ndr
, name
, "samr_UserInfo6");
2392 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
2393 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
2397 static enum ndr_err_code
ndr_push_samr_UserInfo7(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo7
*r
)
2399 if (ndr_flags
& NDR_SCALARS
) {
2400 NDR_CHECK(ndr_push_align(ndr
, 5));
2401 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2402 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2404 if (ndr_flags
& NDR_BUFFERS
) {
2405 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2407 return NDR_ERR_SUCCESS
;
2410 static enum ndr_err_code
ndr_pull_samr_UserInfo7(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo7
*r
)
2412 if (ndr_flags
& NDR_SCALARS
) {
2413 NDR_CHECK(ndr_pull_align(ndr
, 5));
2414 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2415 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2417 if (ndr_flags
& NDR_BUFFERS
) {
2418 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2420 return NDR_ERR_SUCCESS
;
2423 _PUBLIC_
void ndr_print_samr_UserInfo7(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo7
*r
)
2425 ndr_print_struct(ndr
, name
, "samr_UserInfo7");
2427 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
2431 static enum ndr_err_code
ndr_push_samr_UserInfo8(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo8
*r
)
2433 if (ndr_flags
& NDR_SCALARS
) {
2434 NDR_CHECK(ndr_push_align(ndr
, 5));
2435 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2436 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2438 if (ndr_flags
& NDR_BUFFERS
) {
2439 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2441 return NDR_ERR_SUCCESS
;
2444 static enum ndr_err_code
ndr_pull_samr_UserInfo8(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo8
*r
)
2446 if (ndr_flags
& NDR_SCALARS
) {
2447 NDR_CHECK(ndr_pull_align(ndr
, 5));
2448 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2449 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2451 if (ndr_flags
& NDR_BUFFERS
) {
2452 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2454 return NDR_ERR_SUCCESS
;
2457 _PUBLIC_
void ndr_print_samr_UserInfo8(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo8
*r
)
2459 ndr_print_struct(ndr
, name
, "samr_UserInfo8");
2461 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
2465 static enum ndr_err_code
ndr_push_samr_UserInfo9(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo9
*r
)
2467 if (ndr_flags
& NDR_SCALARS
) {
2468 NDR_CHECK(ndr_push_align(ndr
, 4));
2469 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
2470 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2472 if (ndr_flags
& NDR_BUFFERS
) {
2474 return NDR_ERR_SUCCESS
;
2477 static enum ndr_err_code
ndr_pull_samr_UserInfo9(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo9
*r
)
2479 if (ndr_flags
& NDR_SCALARS
) {
2480 NDR_CHECK(ndr_pull_align(ndr
, 4));
2481 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
2482 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2484 if (ndr_flags
& NDR_BUFFERS
) {
2486 return NDR_ERR_SUCCESS
;
2489 _PUBLIC_
void ndr_print_samr_UserInfo9(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo9
*r
)
2491 ndr_print_struct(ndr
, name
, "samr_UserInfo9");
2493 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
2497 static enum ndr_err_code
ndr_push_samr_UserInfo10(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo10
*r
)
2499 if (ndr_flags
& NDR_SCALARS
) {
2500 NDR_CHECK(ndr_push_align(ndr
, 5));
2501 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2502 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2503 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2505 if (ndr_flags
& NDR_BUFFERS
) {
2506 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2507 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2509 return NDR_ERR_SUCCESS
;
2512 static enum ndr_err_code
ndr_pull_samr_UserInfo10(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo10
*r
)
2514 if (ndr_flags
& NDR_SCALARS
) {
2515 NDR_CHECK(ndr_pull_align(ndr
, 5));
2516 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2517 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2518 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2520 if (ndr_flags
& NDR_BUFFERS
) {
2521 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2522 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2524 return NDR_ERR_SUCCESS
;
2527 _PUBLIC_
void ndr_print_samr_UserInfo10(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo10
*r
)
2529 ndr_print_struct(ndr
, name
, "samr_UserInfo10");
2531 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
2532 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
2536 static enum ndr_err_code
ndr_push_samr_UserInfo11(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo11
*r
)
2538 if (ndr_flags
& NDR_SCALARS
) {
2539 NDR_CHECK(ndr_push_align(ndr
, 5));
2540 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2541 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2543 if (ndr_flags
& NDR_BUFFERS
) {
2544 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2546 return NDR_ERR_SUCCESS
;
2549 static enum ndr_err_code
ndr_pull_samr_UserInfo11(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo11
*r
)
2551 if (ndr_flags
& NDR_SCALARS
) {
2552 NDR_CHECK(ndr_pull_align(ndr
, 5));
2553 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2554 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2556 if (ndr_flags
& NDR_BUFFERS
) {
2557 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2559 return NDR_ERR_SUCCESS
;
2562 _PUBLIC_
void ndr_print_samr_UserInfo11(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo11
*r
)
2564 ndr_print_struct(ndr
, name
, "samr_UserInfo11");
2566 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
2570 static enum ndr_err_code
ndr_push_samr_UserInfo12(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo12
*r
)
2572 if (ndr_flags
& NDR_SCALARS
) {
2573 NDR_CHECK(ndr_push_align(ndr
, 5));
2574 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2575 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2577 if (ndr_flags
& NDR_BUFFERS
) {
2578 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2580 return NDR_ERR_SUCCESS
;
2583 static enum ndr_err_code
ndr_pull_samr_UserInfo12(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo12
*r
)
2585 if (ndr_flags
& NDR_SCALARS
) {
2586 NDR_CHECK(ndr_pull_align(ndr
, 5));
2587 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2588 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2590 if (ndr_flags
& NDR_BUFFERS
) {
2591 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2593 return NDR_ERR_SUCCESS
;
2596 _PUBLIC_
void ndr_print_samr_UserInfo12(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo12
*r
)
2598 ndr_print_struct(ndr
, name
, "samr_UserInfo12");
2600 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
2604 static enum ndr_err_code
ndr_push_samr_UserInfo13(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo13
*r
)
2606 if (ndr_flags
& NDR_SCALARS
) {
2607 NDR_CHECK(ndr_push_align(ndr
, 5));
2608 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2609 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2611 if (ndr_flags
& NDR_BUFFERS
) {
2612 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2614 return NDR_ERR_SUCCESS
;
2617 static enum ndr_err_code
ndr_pull_samr_UserInfo13(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo13
*r
)
2619 if (ndr_flags
& NDR_SCALARS
) {
2620 NDR_CHECK(ndr_pull_align(ndr
, 5));
2621 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2622 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2624 if (ndr_flags
& NDR_BUFFERS
) {
2625 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2627 return NDR_ERR_SUCCESS
;
2630 _PUBLIC_
void ndr_print_samr_UserInfo13(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo13
*r
)
2632 ndr_print_struct(ndr
, name
, "samr_UserInfo13");
2634 ndr_print_lsa_String(ndr
, "description", &r
->description
);
2638 static enum ndr_err_code
ndr_push_samr_UserInfo14(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo14
*r
)
2640 if (ndr_flags
& NDR_SCALARS
) {
2641 NDR_CHECK(ndr_push_align(ndr
, 5));
2642 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2643 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2645 if (ndr_flags
& NDR_BUFFERS
) {
2646 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2648 return NDR_ERR_SUCCESS
;
2651 static enum ndr_err_code
ndr_pull_samr_UserInfo14(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo14
*r
)
2653 if (ndr_flags
& NDR_SCALARS
) {
2654 NDR_CHECK(ndr_pull_align(ndr
, 5));
2655 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2656 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2658 if (ndr_flags
& NDR_BUFFERS
) {
2659 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2661 return NDR_ERR_SUCCESS
;
2664 _PUBLIC_
void ndr_print_samr_UserInfo14(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo14
*r
)
2666 ndr_print_struct(ndr
, name
, "samr_UserInfo14");
2668 ndr_print_lsa_String(ndr
, "workstations", &r
->workstations
);
2672 static enum ndr_err_code
ndr_push_samr_UserInfo16(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo16
*r
)
2674 if (ndr_flags
& NDR_SCALARS
) {
2675 NDR_CHECK(ndr_push_align(ndr
, 4));
2676 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
2677 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2679 if (ndr_flags
& NDR_BUFFERS
) {
2681 return NDR_ERR_SUCCESS
;
2684 static enum ndr_err_code
ndr_pull_samr_UserInfo16(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo16
*r
)
2686 if (ndr_flags
& NDR_SCALARS
) {
2687 NDR_CHECK(ndr_pull_align(ndr
, 4));
2688 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
2689 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2691 if (ndr_flags
& NDR_BUFFERS
) {
2693 return NDR_ERR_SUCCESS
;
2696 _PUBLIC_
void ndr_print_samr_UserInfo16(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo16
*r
)
2698 ndr_print_struct(ndr
, name
, "samr_UserInfo16");
2700 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
2704 static enum ndr_err_code
ndr_push_samr_UserInfo17(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo17
*r
)
2706 if (ndr_flags
& NDR_SCALARS
) {
2707 NDR_CHECK(ndr_push_align(ndr
, 4));
2708 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->acct_expiry
));
2709 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2711 if (ndr_flags
& NDR_BUFFERS
) {
2713 return NDR_ERR_SUCCESS
;
2716 static enum ndr_err_code
ndr_pull_samr_UserInfo17(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo17
*r
)
2718 if (ndr_flags
& NDR_SCALARS
) {
2719 NDR_CHECK(ndr_pull_align(ndr
, 4));
2720 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->acct_expiry
));
2721 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2723 if (ndr_flags
& NDR_BUFFERS
) {
2725 return NDR_ERR_SUCCESS
;
2728 _PUBLIC_
void ndr_print_samr_UserInfo17(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo17
*r
)
2730 ndr_print_struct(ndr
, name
, "samr_UserInfo17");
2732 ndr_print_NTTIME(ndr
, "acct_expiry", r
->acct_expiry
);
2736 _PUBLIC_
enum ndr_err_code
ndr_push_samr_Password(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_Password
*r
)
2739 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2740 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2741 if (ndr_flags
& NDR_SCALARS
) {
2742 NDR_CHECK(ndr_push_align(ndr
, 1));
2743 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 16));
2744 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
2746 if (ndr_flags
& NDR_BUFFERS
) {
2748 ndr
->flags
= _flags_save_STRUCT
;
2750 return NDR_ERR_SUCCESS
;
2753 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_Password(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_Password
*r
)
2756 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2757 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2758 if (ndr_flags
& NDR_SCALARS
) {
2759 NDR_CHECK(ndr_pull_align(ndr
, 1));
2760 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 16));
2761 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
2763 if (ndr_flags
& NDR_BUFFERS
) {
2765 ndr
->flags
= _flags_save_STRUCT
;
2767 return NDR_ERR_SUCCESS
;
2770 _PUBLIC_
void ndr_print_samr_Password(struct ndr_print
*ndr
, const char *name
, const struct samr_Password
*r
)
2772 ndr_print_struct(ndr
, name
, "samr_Password");
2774 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2775 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2777 ndr_print_array_uint8(ndr
, "hash", r
->hash
, 16);
2779 ndr
->flags
= _flags_save_STRUCT
;
2783 static enum ndr_err_code
ndr_push_samr_UserInfo18(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo18
*r
)
2785 if (ndr_flags
& NDR_SCALARS
) {
2786 NDR_CHECK(ndr_push_align(ndr
, 1));
2787 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->nt_pwd
));
2788 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->lm_pwd
));
2789 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->nt_pwd_active
));
2790 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->lm_pwd_active
));
2791 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_expired
));
2792 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
2794 if (ndr_flags
& NDR_BUFFERS
) {
2796 return NDR_ERR_SUCCESS
;
2799 static enum ndr_err_code
ndr_pull_samr_UserInfo18(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo18
*r
)
2801 if (ndr_flags
& NDR_SCALARS
) {
2802 NDR_CHECK(ndr_pull_align(ndr
, 1));
2803 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->nt_pwd
));
2804 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->lm_pwd
));
2805 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->nt_pwd_active
));
2806 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->lm_pwd_active
));
2807 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_expired
));
2808 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
2810 if (ndr_flags
& NDR_BUFFERS
) {
2812 return NDR_ERR_SUCCESS
;
2815 _PUBLIC_
void ndr_print_samr_UserInfo18(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo18
*r
)
2817 ndr_print_struct(ndr
, name
, "samr_UserInfo18");
2819 ndr_print_samr_Password(ndr
, "nt_pwd", &r
->nt_pwd
);
2820 ndr_print_samr_Password(ndr
, "lm_pwd", &r
->lm_pwd
);
2821 ndr_print_uint8(ndr
, "nt_pwd_active", r
->nt_pwd_active
);
2822 ndr_print_uint8(ndr
, "lm_pwd_active", r
->lm_pwd_active
);
2823 ndr_print_uint8(ndr
, "password_expired", r
->password_expired
);
2827 static enum ndr_err_code
ndr_push_samr_UserInfo20(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo20
*r
)
2829 if (ndr_flags
& NDR_SCALARS
) {
2830 NDR_CHECK(ndr_push_align(ndr
, 5));
2831 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->parameters
));
2832 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2834 if (ndr_flags
& NDR_BUFFERS
) {
2835 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->parameters
));
2837 return NDR_ERR_SUCCESS
;
2840 static enum ndr_err_code
ndr_pull_samr_UserInfo20(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo20
*r
)
2842 if (ndr_flags
& NDR_SCALARS
) {
2843 NDR_CHECK(ndr_pull_align(ndr
, 5));
2844 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->parameters
));
2845 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2847 if (ndr_flags
& NDR_BUFFERS
) {
2848 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->parameters
));
2850 return NDR_ERR_SUCCESS
;
2853 _PUBLIC_
void ndr_print_samr_UserInfo20(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo20
*r
)
2855 ndr_print_struct(ndr
, name
, "samr_UserInfo20");
2857 ndr_print_lsa_BinaryString(ndr
, "parameters", &r
->parameters
);
2861 static enum ndr_err_code
ndr_push_samr_FieldsPresent(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2863 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2864 return NDR_ERR_SUCCESS
;
2867 static enum ndr_err_code
ndr_pull_samr_FieldsPresent(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2870 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2872 return NDR_ERR_SUCCESS
;
2875 _PUBLIC_
void ndr_print_samr_FieldsPresent(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2877 ndr_print_uint32(ndr
, name
, r
);
2879 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_ACCOUNT_NAME", SAMR_FIELD_ACCOUNT_NAME
, r
);
2880 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_FULL_NAME", SAMR_FIELD_FULL_NAME
, r
);
2881 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_RID", SAMR_FIELD_RID
, r
);
2882 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_PRIMARY_GID", SAMR_FIELD_PRIMARY_GID
, r
);
2883 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_DESCRIPTION", SAMR_FIELD_DESCRIPTION
, r
);
2884 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_COMMENT", SAMR_FIELD_COMMENT
, r
);
2885 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_HOME_DIRECTORY", SAMR_FIELD_HOME_DIRECTORY
, r
);
2886 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_HOME_DRIVE", SAMR_FIELD_HOME_DRIVE
, r
);
2887 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LOGON_SCRIPT", SAMR_FIELD_LOGON_SCRIPT
, r
);
2888 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_PROFILE_PATH", SAMR_FIELD_PROFILE_PATH
, r
);
2889 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_WORKSTATIONS", SAMR_FIELD_WORKSTATIONS
, r
);
2890 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGON", SAMR_FIELD_LAST_LOGON
, r
);
2891 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGOFF", SAMR_FIELD_LAST_LOGOFF
, r
);
2892 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LOGON_HOURS", SAMR_FIELD_LOGON_HOURS
, r
);
2893 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_BAD_PWD_COUNT", SAMR_FIELD_BAD_PWD_COUNT
, r
);
2894 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_NUM_LOGONS", SAMR_FIELD_NUM_LOGONS
, r
);
2895 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_ALLOW_PWD_CHANGE", SAMR_FIELD_ALLOW_PWD_CHANGE
, r
);
2896 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_FORCE_PWD_CHANGE", SAMR_FIELD_FORCE_PWD_CHANGE
, r
);
2897 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LAST_PWD_CHANGE", SAMR_FIELD_LAST_PWD_CHANGE
, r
);
2898 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_ACCT_EXPIRY", SAMR_FIELD_ACCT_EXPIRY
, r
);
2899 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_ACCT_FLAGS", SAMR_FIELD_ACCT_FLAGS
, r
);
2900 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_PARAMETERS", SAMR_FIELD_PARAMETERS
, r
);
2901 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_COUNTRY_CODE", SAMR_FIELD_COUNTRY_CODE
, r
);
2902 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_CODE_PAGE", SAMR_FIELD_CODE_PAGE
, r
);
2903 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_NT_PASSWORD_PRESENT", SAMR_FIELD_NT_PASSWORD_PRESENT
, r
);
2904 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LM_PASSWORD_PRESENT", SAMR_FIELD_LM_PASSWORD_PRESENT
, r
);
2905 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_PRIVATE_DATA", SAMR_FIELD_PRIVATE_DATA
, r
);
2906 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_EXPIRED_FLAG", SAMR_FIELD_EXPIRED_FLAG
, r
);
2907 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_SEC_DESC", SAMR_FIELD_SEC_DESC
, r
);
2908 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_OWF_PWD", SAMR_FIELD_OWF_PWD
, r
);
2912 static enum ndr_err_code
ndr_push_samr_UserInfo21(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo21
*r
)
2914 if (ndr_flags
& NDR_SCALARS
) {
2915 NDR_CHECK(ndr_push_align(ndr
, 5));
2916 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logon
));
2917 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logoff
));
2918 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_password_change
));
2919 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->acct_expiry
));
2920 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->allow_password_change
));
2921 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->force_password_change
));
2922 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2923 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2924 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2925 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2926 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2927 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2928 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2929 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2930 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
2931 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->parameters
));
2932 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->lm_owf_password
));
2933 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->nt_owf_password
));
2934 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2935 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_count
));
2936 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->buffer
));
2937 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
2939 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
2940 NDR_CHECK(ndr_push_samr_FieldsPresent(ndr
, NDR_SCALARS
, r
->fields_present
));
2941 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2942 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->bad_password_count
));
2943 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logon_count
));
2944 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->country_code
));
2945 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->code_page
));
2946 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->lm_password_set
));
2947 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->nt_password_set
));
2948 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_expired
));
2949 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->unknown4
));
2950 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2952 if (ndr_flags
& NDR_BUFFERS
) {
2953 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2954 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2955 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2956 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2957 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2958 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2959 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2960 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2961 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2962 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->parameters
));
2963 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->lm_owf_password
));
2964 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->nt_owf_password
));
2965 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2967 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->buf_count
));
2968 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->buffer
, r
->buf_count
));
2970 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2972 return NDR_ERR_SUCCESS
;
2975 static enum ndr_err_code
ndr_pull_samr_UserInfo21(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo21
*r
)
2977 uint32_t _ptr_buffer
;
2978 TALLOC_CTX
*_mem_save_buffer_0
;
2979 if (ndr_flags
& NDR_SCALARS
) {
2980 NDR_CHECK(ndr_pull_align(ndr
, 5));
2981 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logon
));
2982 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logoff
));
2983 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_password_change
));
2984 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->acct_expiry
));
2985 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->allow_password_change
));
2986 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->force_password_change
));
2987 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2988 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2989 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2990 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2991 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2992 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2993 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2994 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2995 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
2996 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->parameters
));
2997 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->lm_owf_password
));
2998 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->nt_owf_password
));
2999 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
3000 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_count
));
3001 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
3003 NDR_PULL_ALLOC(ndr
, r
->buffer
);
3007 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
3008 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
3009 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
3010 NDR_CHECK(ndr_pull_samr_FieldsPresent(ndr
, NDR_SCALARS
, &r
->fields_present
));
3011 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
3012 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->bad_password_count
));
3013 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logon_count
));
3014 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->country_code
));
3015 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->code_page
));
3016 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->lm_password_set
));
3017 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->nt_password_set
));
3018 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_expired
));
3019 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->unknown4
));
3020 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3022 if (ndr_flags
& NDR_BUFFERS
) {
3023 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
3024 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
3025 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
3026 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
3027 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
3028 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
3029 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
3030 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
3031 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
3032 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->parameters
));
3033 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->lm_owf_password
));
3034 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->nt_owf_password
));
3035 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
3037 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3038 NDR_PULL_SET_MEM_CTX(ndr
, r
->buffer
, 0);
3039 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->buffer
));
3040 NDR_PULL_ALLOC_N(ndr
, r
->buffer
, ndr_get_array_size(ndr
, &r
->buffer
));
3041 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->buffer
, ndr_get_array_size(ndr
, &r
->buffer
)));
3042 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
3044 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
3046 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->buffer
, r
->buf_count
));
3049 return NDR_ERR_SUCCESS
;
3052 _PUBLIC_
void ndr_print_samr_UserInfo21(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo21
*r
)
3054 ndr_print_struct(ndr
, name
, "samr_UserInfo21");
3056 ndr_print_NTTIME(ndr
, "last_logon", r
->last_logon
);
3057 ndr_print_NTTIME(ndr
, "last_logoff", r
->last_logoff
);
3058 ndr_print_NTTIME(ndr
, "last_password_change", r
->last_password_change
);
3059 ndr_print_NTTIME(ndr
, "acct_expiry", r
->acct_expiry
);
3060 ndr_print_NTTIME(ndr
, "allow_password_change", r
->allow_password_change
);
3061 ndr_print_NTTIME(ndr
, "force_password_change", r
->force_password_change
);
3062 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
3063 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
3064 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
3065 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
3066 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
3067 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
3068 ndr_print_lsa_String(ndr
, "description", &r
->description
);
3069 ndr_print_lsa_String(ndr
, "workstations", &r
->workstations
);
3070 ndr_print_lsa_String(ndr
, "comment", &r
->comment
);
3071 ndr_print_lsa_BinaryString(ndr
, "parameters", &r
->parameters
);
3072 ndr_print_lsa_BinaryString(ndr
, "lm_owf_password", &r
->lm_owf_password
);
3073 ndr_print_lsa_BinaryString(ndr
, "nt_owf_password", &r
->nt_owf_password
);
3074 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
3075 ndr_print_uint32(ndr
, "buf_count", r
->buf_count
);
3076 ndr_print_ptr(ndr
, "buffer", r
->buffer
);
3079 ndr_print_array_uint8(ndr
, "buffer", r
->buffer
, r
->buf_count
);
3082 ndr_print_uint32(ndr
, "rid", r
->rid
);
3083 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
3084 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
3085 ndr_print_samr_FieldsPresent(ndr
, "fields_present", r
->fields_present
);
3086 ndr_print_samr_LogonHours(ndr
, "logon_hours", &r
->logon_hours
);
3087 ndr_print_uint16(ndr
, "bad_password_count", r
->bad_password_count
);
3088 ndr_print_uint16(ndr
, "logon_count", r
->logon_count
);
3089 ndr_print_uint16(ndr
, "country_code", r
->country_code
);
3090 ndr_print_uint16(ndr
, "code_page", r
->code_page
);
3091 ndr_print_uint8(ndr
, "lm_password_set", r
->lm_password_set
);
3092 ndr_print_uint8(ndr
, "nt_password_set", r
->nt_password_set
);
3093 ndr_print_uint8(ndr
, "password_expired", r
->password_expired
);
3094 ndr_print_uint8(ndr
, "unknown4", r
->unknown4
);
3098 _PUBLIC_
enum ndr_err_code
ndr_push_samr_CryptPassword(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_CryptPassword
*r
)
3101 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3102 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3103 if (ndr_flags
& NDR_SCALARS
) {
3104 NDR_CHECK(ndr_push_align(ndr
, 1));
3105 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 516));
3106 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
3108 if (ndr_flags
& NDR_BUFFERS
) {
3110 ndr
->flags
= _flags_save_STRUCT
;
3112 return NDR_ERR_SUCCESS
;
3115 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_CryptPassword(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_CryptPassword
*r
)
3118 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3119 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3120 if (ndr_flags
& NDR_SCALARS
) {
3121 NDR_CHECK(ndr_pull_align(ndr
, 1));
3122 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 516));
3123 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
3125 if (ndr_flags
& NDR_BUFFERS
) {
3127 ndr
->flags
= _flags_save_STRUCT
;
3129 return NDR_ERR_SUCCESS
;
3132 _PUBLIC_
void ndr_print_samr_CryptPassword(struct ndr_print
*ndr
, const char *name
, const struct samr_CryptPassword
*r
)
3134 ndr_print_struct(ndr
, name
, "samr_CryptPassword");
3136 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3137 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3139 ndr_print_array_uint8(ndr
, "data", r
->data
, 516);
3141 ndr
->flags
= _flags_save_STRUCT
;
3145 static enum ndr_err_code
ndr_push_samr_UserInfo23(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo23
*r
)
3147 if (ndr_flags
& NDR_SCALARS
) {
3148 NDR_CHECK(ndr_push_align(ndr
, 5));
3149 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info
));
3150 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, &r
->password
));
3151 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3153 if (ndr_flags
& NDR_BUFFERS
) {
3154 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info
));
3156 return NDR_ERR_SUCCESS
;
3159 static enum ndr_err_code
ndr_pull_samr_UserInfo23(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo23
*r
)
3161 if (ndr_flags
& NDR_SCALARS
) {
3162 NDR_CHECK(ndr_pull_align(ndr
, 5));
3163 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info
));
3164 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, &r
->password
));
3165 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3167 if (ndr_flags
& NDR_BUFFERS
) {
3168 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info
));
3170 return NDR_ERR_SUCCESS
;
3173 _PUBLIC_
void ndr_print_samr_UserInfo23(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo23
*r
)
3175 ndr_print_struct(ndr
, name
, "samr_UserInfo23");
3177 ndr_print_samr_UserInfo21(ndr
, "info", &r
->info
);
3178 ndr_print_samr_CryptPassword(ndr
, "password", &r
->password
);
3182 static enum ndr_err_code
ndr_push_samr_UserInfo24(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo24
*r
)
3184 if (ndr_flags
& NDR_SCALARS
) {
3185 NDR_CHECK(ndr_push_align(ndr
, 1));
3186 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, &r
->password
));
3187 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_expired
));
3188 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
3190 if (ndr_flags
& NDR_BUFFERS
) {
3192 return NDR_ERR_SUCCESS
;
3195 static enum ndr_err_code
ndr_pull_samr_UserInfo24(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo24
*r
)
3197 if (ndr_flags
& NDR_SCALARS
) {
3198 NDR_CHECK(ndr_pull_align(ndr
, 1));
3199 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, &r
->password
));
3200 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_expired
));
3201 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
3203 if (ndr_flags
& NDR_BUFFERS
) {
3205 return NDR_ERR_SUCCESS
;
3208 _PUBLIC_
void ndr_print_samr_UserInfo24(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo24
*r
)
3210 ndr_print_struct(ndr
, name
, "samr_UserInfo24");
3212 ndr_print_samr_CryptPassword(ndr
, "password", &r
->password
);
3213 ndr_print_uint8(ndr
, "password_expired", r
->password_expired
);
3217 static enum ndr_err_code
ndr_push_samr_CryptPasswordEx(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_CryptPasswordEx
*r
)
3220 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3221 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3222 if (ndr_flags
& NDR_SCALARS
) {
3223 NDR_CHECK(ndr_push_align(ndr
, 1));
3224 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 532));
3225 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
3227 if (ndr_flags
& NDR_BUFFERS
) {
3229 ndr
->flags
= _flags_save_STRUCT
;
3231 return NDR_ERR_SUCCESS
;
3234 static enum ndr_err_code
ndr_pull_samr_CryptPasswordEx(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_CryptPasswordEx
*r
)
3237 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3238 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3239 if (ndr_flags
& NDR_SCALARS
) {
3240 NDR_CHECK(ndr_pull_align(ndr
, 1));
3241 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 532));
3242 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
3244 if (ndr_flags
& NDR_BUFFERS
) {
3246 ndr
->flags
= _flags_save_STRUCT
;
3248 return NDR_ERR_SUCCESS
;
3251 _PUBLIC_
void ndr_print_samr_CryptPasswordEx(struct ndr_print
*ndr
, const char *name
, const struct samr_CryptPasswordEx
*r
)
3253 ndr_print_struct(ndr
, name
, "samr_CryptPasswordEx");
3255 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3256 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3258 ndr_print_array_uint8(ndr
, "data", r
->data
, 532);
3260 ndr
->flags
= _flags_save_STRUCT
;
3264 static enum ndr_err_code
ndr_push_samr_UserInfo25(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo25
*r
)
3266 if (ndr_flags
& NDR_SCALARS
) {
3267 NDR_CHECK(ndr_push_align(ndr
, 5));
3268 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info
));
3269 NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr
, NDR_SCALARS
, &r
->password
));
3270 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3272 if (ndr_flags
& NDR_BUFFERS
) {
3273 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info
));
3275 return NDR_ERR_SUCCESS
;
3278 static enum ndr_err_code
ndr_pull_samr_UserInfo25(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo25
*r
)
3280 if (ndr_flags
& NDR_SCALARS
) {
3281 NDR_CHECK(ndr_pull_align(ndr
, 5));
3282 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info
));
3283 NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr
, NDR_SCALARS
, &r
->password
));
3284 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3286 if (ndr_flags
& NDR_BUFFERS
) {
3287 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info
));
3289 return NDR_ERR_SUCCESS
;
3292 _PUBLIC_
void ndr_print_samr_UserInfo25(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo25
*r
)
3294 ndr_print_struct(ndr
, name
, "samr_UserInfo25");
3296 ndr_print_samr_UserInfo21(ndr
, "info", &r
->info
);
3297 ndr_print_samr_CryptPasswordEx(ndr
, "password", &r
->password
);
3301 static enum ndr_err_code
ndr_push_samr_UserInfo26(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo26
*r
)
3303 if (ndr_flags
& NDR_SCALARS
) {
3304 NDR_CHECK(ndr_push_align(ndr
, 1));
3305 NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr
, NDR_SCALARS
, &r
->password
));
3306 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_expired
));
3307 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
3309 if (ndr_flags
& NDR_BUFFERS
) {
3311 return NDR_ERR_SUCCESS
;
3314 static enum ndr_err_code
ndr_pull_samr_UserInfo26(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo26
*r
)
3316 if (ndr_flags
& NDR_SCALARS
) {
3317 NDR_CHECK(ndr_pull_align(ndr
, 1));
3318 NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr
, NDR_SCALARS
, &r
->password
));
3319 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_expired
));
3320 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
3322 if (ndr_flags
& NDR_BUFFERS
) {
3324 return NDR_ERR_SUCCESS
;
3327 _PUBLIC_
void ndr_print_samr_UserInfo26(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo26
*r
)
3329 ndr_print_struct(ndr
, name
, "samr_UserInfo26");
3331 ndr_print_samr_CryptPasswordEx(ndr
, "password", &r
->password
);
3332 ndr_print_uint8(ndr
, "password_expired", r
->password_expired
);
3336 static enum ndr_err_code
ndr_push_samr_UserInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_UserInfo
*r
)
3338 if (ndr_flags
& NDR_SCALARS
) {
3339 int level
= ndr_push_get_switch_value(ndr
, r
);
3340 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
3341 NDR_CHECK(ndr_push_union_align(ndr
, 5));
3344 NDR_CHECK(ndr_push_samr_UserInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
3348 NDR_CHECK(ndr_push_samr_UserInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
3352 NDR_CHECK(ndr_push_samr_UserInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
3356 NDR_CHECK(ndr_push_samr_UserInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
3360 NDR_CHECK(ndr_push_samr_UserInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
3364 NDR_CHECK(ndr_push_samr_UserInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
3368 NDR_CHECK(ndr_push_samr_UserInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
3372 NDR_CHECK(ndr_push_samr_UserInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
3376 NDR_CHECK(ndr_push_samr_UserInfo9(ndr
, NDR_SCALARS
, &r
->info9
));
3380 NDR_CHECK(ndr_push_samr_UserInfo10(ndr
, NDR_SCALARS
, &r
->info10
));
3384 NDR_CHECK(ndr_push_samr_UserInfo11(ndr
, NDR_SCALARS
, &r
->info11
));
3388 NDR_CHECK(ndr_push_samr_UserInfo12(ndr
, NDR_SCALARS
, &r
->info12
));
3392 NDR_CHECK(ndr_push_samr_UserInfo13(ndr
, NDR_SCALARS
, &r
->info13
));
3396 NDR_CHECK(ndr_push_samr_UserInfo14(ndr
, NDR_SCALARS
, &r
->info14
));
3400 NDR_CHECK(ndr_push_samr_UserInfo16(ndr
, NDR_SCALARS
, &r
->info16
));
3404 NDR_CHECK(ndr_push_samr_UserInfo17(ndr
, NDR_SCALARS
, &r
->info17
));
3408 NDR_CHECK(ndr_push_samr_UserInfo18(ndr
, NDR_SCALARS
, &r
->info18
));
3412 NDR_CHECK(ndr_push_samr_UserInfo20(ndr
, NDR_SCALARS
, &r
->info20
));
3416 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info21
));
3420 NDR_CHECK(ndr_push_samr_UserInfo23(ndr
, NDR_SCALARS
, &r
->info23
));
3424 NDR_CHECK(ndr_push_samr_UserInfo24(ndr
, NDR_SCALARS
, &r
->info24
));
3428 NDR_CHECK(ndr_push_samr_UserInfo25(ndr
, NDR_SCALARS
, &r
->info25
));
3432 NDR_CHECK(ndr_push_samr_UserInfo26(ndr
, NDR_SCALARS
, &r
->info26
));
3436 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3439 if (ndr_flags
& NDR_BUFFERS
) {
3440 int level
= ndr_push_get_switch_value(ndr
, r
);
3443 NDR_CHECK(ndr_push_samr_UserInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
3447 NDR_CHECK(ndr_push_samr_UserInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
3451 NDR_CHECK(ndr_push_samr_UserInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
3455 NDR_CHECK(ndr_push_samr_UserInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
3459 NDR_CHECK(ndr_push_samr_UserInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
3463 NDR_CHECK(ndr_push_samr_UserInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
3467 NDR_CHECK(ndr_push_samr_UserInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
3471 NDR_CHECK(ndr_push_samr_UserInfo8(ndr
, NDR_BUFFERS
, &r
->info8
));
3478 NDR_CHECK(ndr_push_samr_UserInfo10(ndr
, NDR_BUFFERS
, &r
->info10
));
3482 NDR_CHECK(ndr_push_samr_UserInfo11(ndr
, NDR_BUFFERS
, &r
->info11
));
3486 NDR_CHECK(ndr_push_samr_UserInfo12(ndr
, NDR_BUFFERS
, &r
->info12
));
3490 NDR_CHECK(ndr_push_samr_UserInfo13(ndr
, NDR_BUFFERS
, &r
->info13
));
3494 NDR_CHECK(ndr_push_samr_UserInfo14(ndr
, NDR_BUFFERS
, &r
->info14
));
3507 NDR_CHECK(ndr_push_samr_UserInfo20(ndr
, NDR_BUFFERS
, &r
->info20
));
3511 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info21
));
3515 NDR_CHECK(ndr_push_samr_UserInfo23(ndr
, NDR_BUFFERS
, &r
->info23
));
3522 NDR_CHECK(ndr_push_samr_UserInfo25(ndr
, NDR_BUFFERS
, &r
->info25
));
3529 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3532 return NDR_ERR_SUCCESS
;
3535 static enum ndr_err_code
ndr_pull_samr_UserInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_UserInfo
*r
)
3539 level
= ndr_pull_get_switch_value(ndr
, r
);
3540 if (ndr_flags
& NDR_SCALARS
) {
3541 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
3542 if (_level
!= level
) {
3543 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
3545 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
3548 NDR_CHECK(ndr_pull_samr_UserInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
3552 NDR_CHECK(ndr_pull_samr_UserInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
3556 NDR_CHECK(ndr_pull_samr_UserInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
3560 NDR_CHECK(ndr_pull_samr_UserInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
3564 NDR_CHECK(ndr_pull_samr_UserInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
3568 NDR_CHECK(ndr_pull_samr_UserInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
3572 NDR_CHECK(ndr_pull_samr_UserInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
3576 NDR_CHECK(ndr_pull_samr_UserInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
3580 NDR_CHECK(ndr_pull_samr_UserInfo9(ndr
, NDR_SCALARS
, &r
->info9
));
3584 NDR_CHECK(ndr_pull_samr_UserInfo10(ndr
, NDR_SCALARS
, &r
->info10
));
3588 NDR_CHECK(ndr_pull_samr_UserInfo11(ndr
, NDR_SCALARS
, &r
->info11
));
3592 NDR_CHECK(ndr_pull_samr_UserInfo12(ndr
, NDR_SCALARS
, &r
->info12
));
3596 NDR_CHECK(ndr_pull_samr_UserInfo13(ndr
, NDR_SCALARS
, &r
->info13
));
3600 NDR_CHECK(ndr_pull_samr_UserInfo14(ndr
, NDR_SCALARS
, &r
->info14
));
3604 NDR_CHECK(ndr_pull_samr_UserInfo16(ndr
, NDR_SCALARS
, &r
->info16
));
3608 NDR_CHECK(ndr_pull_samr_UserInfo17(ndr
, NDR_SCALARS
, &r
->info17
));
3612 NDR_CHECK(ndr_pull_samr_UserInfo18(ndr
, NDR_SCALARS
, &r
->info18
));
3616 NDR_CHECK(ndr_pull_samr_UserInfo20(ndr
, NDR_SCALARS
, &r
->info20
));
3620 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info21
));
3624 NDR_CHECK(ndr_pull_samr_UserInfo23(ndr
, NDR_SCALARS
, &r
->info23
));
3628 NDR_CHECK(ndr_pull_samr_UserInfo24(ndr
, NDR_SCALARS
, &r
->info24
));
3632 NDR_CHECK(ndr_pull_samr_UserInfo25(ndr
, NDR_SCALARS
, &r
->info25
));
3636 NDR_CHECK(ndr_pull_samr_UserInfo26(ndr
, NDR_SCALARS
, &r
->info26
));
3640 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3643 if (ndr_flags
& NDR_BUFFERS
) {
3646 NDR_CHECK(ndr_pull_samr_UserInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
3650 NDR_CHECK(ndr_pull_samr_UserInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
3654 NDR_CHECK(ndr_pull_samr_UserInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
3658 NDR_CHECK(ndr_pull_samr_UserInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
3662 NDR_CHECK(ndr_pull_samr_UserInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
3666 NDR_CHECK(ndr_pull_samr_UserInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
3670 NDR_CHECK(ndr_pull_samr_UserInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
3674 NDR_CHECK(ndr_pull_samr_UserInfo8(ndr
, NDR_BUFFERS
, &r
->info8
));
3681 NDR_CHECK(ndr_pull_samr_UserInfo10(ndr
, NDR_BUFFERS
, &r
->info10
));
3685 NDR_CHECK(ndr_pull_samr_UserInfo11(ndr
, NDR_BUFFERS
, &r
->info11
));
3689 NDR_CHECK(ndr_pull_samr_UserInfo12(ndr
, NDR_BUFFERS
, &r
->info12
));
3693 NDR_CHECK(ndr_pull_samr_UserInfo13(ndr
, NDR_BUFFERS
, &r
->info13
));
3697 NDR_CHECK(ndr_pull_samr_UserInfo14(ndr
, NDR_BUFFERS
, &r
->info14
));
3710 NDR_CHECK(ndr_pull_samr_UserInfo20(ndr
, NDR_BUFFERS
, &r
->info20
));
3714 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info21
));
3718 NDR_CHECK(ndr_pull_samr_UserInfo23(ndr
, NDR_BUFFERS
, &r
->info23
));
3725 NDR_CHECK(ndr_pull_samr_UserInfo25(ndr
, NDR_BUFFERS
, &r
->info25
));
3732 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3735 return NDR_ERR_SUCCESS
;
3738 _PUBLIC_
void ndr_print_samr_UserInfo(struct ndr_print
*ndr
, const char *name
, const union samr_UserInfo
*r
)
3741 level
= ndr_print_get_switch_value(ndr
, r
);
3742 ndr_print_union(ndr
, name
, level
, "samr_UserInfo");
3745 ndr_print_samr_UserInfo1(ndr
, "info1", &r
->info1
);
3749 ndr_print_samr_UserInfo2(ndr
, "info2", &r
->info2
);
3753 ndr_print_samr_UserInfo3(ndr
, "info3", &r
->info3
);
3757 ndr_print_samr_UserInfo4(ndr
, "info4", &r
->info4
);
3761 ndr_print_samr_UserInfo5(ndr
, "info5", &r
->info5
);
3765 ndr_print_samr_UserInfo6(ndr
, "info6", &r
->info6
);
3769 ndr_print_samr_UserInfo7(ndr
, "info7", &r
->info7
);
3773 ndr_print_samr_UserInfo8(ndr
, "info8", &r
->info8
);
3777 ndr_print_samr_UserInfo9(ndr
, "info9", &r
->info9
);
3781 ndr_print_samr_UserInfo10(ndr
, "info10", &r
->info10
);
3785 ndr_print_samr_UserInfo11(ndr
, "info11", &r
->info11
);
3789 ndr_print_samr_UserInfo12(ndr
, "info12", &r
->info12
);
3793 ndr_print_samr_UserInfo13(ndr
, "info13", &r
->info13
);
3797 ndr_print_samr_UserInfo14(ndr
, "info14", &r
->info14
);
3801 ndr_print_samr_UserInfo16(ndr
, "info16", &r
->info16
);
3805 ndr_print_samr_UserInfo17(ndr
, "info17", &r
->info17
);
3809 ndr_print_samr_UserInfo18(ndr
, "info18", &r
->info18
);
3813 ndr_print_samr_UserInfo20(ndr
, "info20", &r
->info20
);
3817 ndr_print_samr_UserInfo21(ndr
, "info21", &r
->info21
);
3821 ndr_print_samr_UserInfo23(ndr
, "info23", &r
->info23
);
3825 ndr_print_samr_UserInfo24(ndr
, "info24", &r
->info24
);
3829 ndr_print_samr_UserInfo25(ndr
, "info25", &r
->info25
);
3833 ndr_print_samr_UserInfo26(ndr
, "info26", &r
->info26
);
3837 ndr_print_bad_level(ndr
, name
, level
);
3841 _PUBLIC_
enum ndr_err_code
ndr_push_samr_RidWithAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_RidWithAttribute
*r
)
3843 if (ndr_flags
& NDR_SCALARS
) {
3844 NDR_CHECK(ndr_push_align(ndr
, 4));
3845 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
3846 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->attributes
));
3847 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
3849 if (ndr_flags
& NDR_BUFFERS
) {
3851 return NDR_ERR_SUCCESS
;
3854 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_RidWithAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_RidWithAttribute
*r
)
3856 if (ndr_flags
& NDR_SCALARS
) {
3857 NDR_CHECK(ndr_pull_align(ndr
, 4));
3858 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
3859 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->attributes
));
3860 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
3862 if (ndr_flags
& NDR_BUFFERS
) {
3864 return NDR_ERR_SUCCESS
;
3867 _PUBLIC_
void ndr_print_samr_RidWithAttribute(struct ndr_print
*ndr
, const char *name
, const struct samr_RidWithAttribute
*r
)
3869 ndr_print_struct(ndr
, name
, "samr_RidWithAttribute");
3871 ndr_print_uint32(ndr
, "rid", r
->rid
);
3872 ndr_print_samr_GroupAttrs(ndr
, "attributes", r
->attributes
);
3876 _PUBLIC_
enum ndr_err_code
ndr_push_samr_RidWithAttributeArray(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_RidWithAttributeArray
*r
)
3878 uint32_t cntr_rids_1
;
3879 if (ndr_flags
& NDR_SCALARS
) {
3880 NDR_CHECK(ndr_push_align(ndr
, 5));
3881 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3882 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->rids
));
3883 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3885 if (ndr_flags
& NDR_BUFFERS
) {
3887 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
3888 for (cntr_rids_1
= 0; cntr_rids_1
< r
->count
; cntr_rids_1
++) {
3889 NDR_CHECK(ndr_push_samr_RidWithAttribute(ndr
, NDR_SCALARS
, &r
->rids
[cntr_rids_1
]));
3893 return NDR_ERR_SUCCESS
;
3896 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_RidWithAttributeArray(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_RidWithAttributeArray
*r
)
3899 uint32_t cntr_rids_1
;
3900 TALLOC_CTX
*_mem_save_rids_0
;
3901 TALLOC_CTX
*_mem_save_rids_1
;
3902 if (ndr_flags
& NDR_SCALARS
) {
3903 NDR_CHECK(ndr_pull_align(ndr
, 5));
3904 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
3905 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rids
));
3907 NDR_PULL_ALLOC(ndr
, r
->rids
);
3911 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3913 if (ndr_flags
& NDR_BUFFERS
) {
3915 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3916 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
3917 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->rids
));
3918 NDR_PULL_ALLOC_N(ndr
, r
->rids
, ndr_get_array_size(ndr
, &r
->rids
));
3919 _mem_save_rids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3920 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
3921 for (cntr_rids_1
= 0; cntr_rids_1
< r
->count
; cntr_rids_1
++) {
3922 NDR_CHECK(ndr_pull_samr_RidWithAttribute(ndr
, NDR_SCALARS
, &r
->rids
[cntr_rids_1
]));
3924 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_1
, 0);
3925 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, 0);
3928 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->rids
, r
->count
));
3931 return NDR_ERR_SUCCESS
;
3934 _PUBLIC_
void ndr_print_samr_RidWithAttributeArray(struct ndr_print
*ndr
, const char *name
, const struct samr_RidWithAttributeArray
*r
)
3936 uint32_t cntr_rids_1
;
3937 ndr_print_struct(ndr
, name
, "samr_RidWithAttributeArray");
3939 ndr_print_uint32(ndr
, "count", r
->count
);
3940 ndr_print_ptr(ndr
, "rids", r
->rids
);
3943 ndr
->print(ndr
, "%s: ARRAY(%d)", "rids", (int)r
->count
);
3945 for (cntr_rids_1
=0;cntr_rids_1
<r
->count
;cntr_rids_1
++) {
3947 if (asprintf(&idx_1
, "[%d]", cntr_rids_1
) != -1) {
3948 ndr_print_samr_RidWithAttribute(ndr
, "rids", &r
->rids
[cntr_rids_1
]);
3958 static enum ndr_err_code
ndr_push_samr_DispEntryGeneral(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispEntryGeneral
*r
)
3960 if (ndr_flags
& NDR_SCALARS
) {
3961 NDR_CHECK(ndr_push_align(ndr
, 5));
3962 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
3963 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
3964 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
3965 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
3966 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
3967 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
3968 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3970 if (ndr_flags
& NDR_BUFFERS
) {
3971 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
3972 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
3973 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
3975 return NDR_ERR_SUCCESS
;
3978 static enum ndr_err_code
ndr_pull_samr_DispEntryGeneral(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispEntryGeneral
*r
)
3980 if (ndr_flags
& NDR_SCALARS
) {
3981 NDR_CHECK(ndr_pull_align(ndr
, 5));
3982 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
3983 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
3984 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
3985 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
3986 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
3987 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
3988 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3990 if (ndr_flags
& NDR_BUFFERS
) {
3991 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
3992 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
3993 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
3995 return NDR_ERR_SUCCESS
;
3998 _PUBLIC_
void ndr_print_samr_DispEntryGeneral(struct ndr_print
*ndr
, const char *name
, const struct samr_DispEntryGeneral
*r
)
4000 ndr_print_struct(ndr
, name
, "samr_DispEntryGeneral");
4002 ndr_print_uint32(ndr
, "idx", r
->idx
);
4003 ndr_print_uint32(ndr
, "rid", r
->rid
);
4004 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
4005 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
4006 ndr_print_lsa_String(ndr
, "description", &r
->description
);
4007 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
4011 static enum ndr_err_code
ndr_push_samr_DispInfoGeneral(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispInfoGeneral
*r
)
4013 uint32_t cntr_entries_1
;
4014 if (ndr_flags
& NDR_SCALARS
) {
4015 NDR_CHECK(ndr_push_align(ndr
, 5));
4016 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4017 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
4018 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4020 if (ndr_flags
& NDR_BUFFERS
) {
4022 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
4023 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4024 NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4026 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4027 NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4031 return NDR_ERR_SUCCESS
;
4034 static enum ndr_err_code
ndr_pull_samr_DispInfoGeneral(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispInfoGeneral
*r
)
4036 uint32_t _ptr_entries
;
4037 uint32_t cntr_entries_1
;
4038 TALLOC_CTX
*_mem_save_entries_0
;
4039 TALLOC_CTX
*_mem_save_entries_1
;
4040 if (ndr_flags
& NDR_SCALARS
) {
4041 NDR_CHECK(ndr_pull_align(ndr
, 5));
4042 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4043 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
4045 NDR_PULL_ALLOC(ndr
, r
->entries
);
4049 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4051 if (ndr_flags
& NDR_BUFFERS
) {
4053 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4054 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4055 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
4056 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
4057 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4058 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4059 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4060 NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4062 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4063 NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4065 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
4066 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
4069 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
4072 return NDR_ERR_SUCCESS
;
4075 _PUBLIC_
void ndr_print_samr_DispInfoGeneral(struct ndr_print
*ndr
, const char *name
, const struct samr_DispInfoGeneral
*r
)
4077 uint32_t cntr_entries_1
;
4078 ndr_print_struct(ndr
, name
, "samr_DispInfoGeneral");
4080 ndr_print_uint32(ndr
, "count", r
->count
);
4081 ndr_print_ptr(ndr
, "entries", r
->entries
);
4084 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
4086 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
4088 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
4089 ndr_print_samr_DispEntryGeneral(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
4099 static enum ndr_err_code
ndr_push_samr_DispEntryFull(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispEntryFull
*r
)
4101 if (ndr_flags
& NDR_SCALARS
) {
4102 NDR_CHECK(ndr_push_align(ndr
, 5));
4103 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
4104 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4105 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
4106 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
4107 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
4108 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4110 if (ndr_flags
& NDR_BUFFERS
) {
4111 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
4112 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
4114 return NDR_ERR_SUCCESS
;
4117 static enum ndr_err_code
ndr_pull_samr_DispEntryFull(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispEntryFull
*r
)
4119 if (ndr_flags
& NDR_SCALARS
) {
4120 NDR_CHECK(ndr_pull_align(ndr
, 5));
4121 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
4122 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4123 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
4124 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
4125 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
4126 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4128 if (ndr_flags
& NDR_BUFFERS
) {
4129 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
4130 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
4132 return NDR_ERR_SUCCESS
;
4135 _PUBLIC_
void ndr_print_samr_DispEntryFull(struct ndr_print
*ndr
, const char *name
, const struct samr_DispEntryFull
*r
)
4137 ndr_print_struct(ndr
, name
, "samr_DispEntryFull");
4139 ndr_print_uint32(ndr
, "idx", r
->idx
);
4140 ndr_print_uint32(ndr
, "rid", r
->rid
);
4141 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
4142 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
4143 ndr_print_lsa_String(ndr
, "description", &r
->description
);
4147 static enum ndr_err_code
ndr_push_samr_DispInfoFull(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispInfoFull
*r
)
4149 uint32_t cntr_entries_1
;
4150 if (ndr_flags
& NDR_SCALARS
) {
4151 NDR_CHECK(ndr_push_align(ndr
, 5));
4152 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4153 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
4154 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4156 if (ndr_flags
& NDR_BUFFERS
) {
4158 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
4159 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4160 NDR_CHECK(ndr_push_samr_DispEntryFull(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4162 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4163 NDR_CHECK(ndr_push_samr_DispEntryFull(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4167 return NDR_ERR_SUCCESS
;
4170 static enum ndr_err_code
ndr_pull_samr_DispInfoFull(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispInfoFull
*r
)
4172 uint32_t _ptr_entries
;
4173 uint32_t cntr_entries_1
;
4174 TALLOC_CTX
*_mem_save_entries_0
;
4175 TALLOC_CTX
*_mem_save_entries_1
;
4176 if (ndr_flags
& NDR_SCALARS
) {
4177 NDR_CHECK(ndr_pull_align(ndr
, 5));
4178 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4179 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
4181 NDR_PULL_ALLOC(ndr
, r
->entries
);
4185 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4187 if (ndr_flags
& NDR_BUFFERS
) {
4189 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4190 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4191 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
4192 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
4193 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4194 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4195 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4196 NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4198 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4199 NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4201 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
4202 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
4205 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
4208 return NDR_ERR_SUCCESS
;
4211 _PUBLIC_
void ndr_print_samr_DispInfoFull(struct ndr_print
*ndr
, const char *name
, const struct samr_DispInfoFull
*r
)
4213 uint32_t cntr_entries_1
;
4214 ndr_print_struct(ndr
, name
, "samr_DispInfoFull");
4216 ndr_print_uint32(ndr
, "count", r
->count
);
4217 ndr_print_ptr(ndr
, "entries", r
->entries
);
4220 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
4222 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
4224 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
4225 ndr_print_samr_DispEntryFull(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
4235 static enum ndr_err_code
ndr_push_samr_DispEntryFullGroup(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispEntryFullGroup
*r
)
4237 if (ndr_flags
& NDR_SCALARS
) {
4238 NDR_CHECK(ndr_push_align(ndr
, 5));
4239 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
4240 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4241 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->acct_flags
));
4242 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
4243 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
4244 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4246 if (ndr_flags
& NDR_BUFFERS
) {
4247 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
4248 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
4250 return NDR_ERR_SUCCESS
;
4253 static enum ndr_err_code
ndr_pull_samr_DispEntryFullGroup(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispEntryFullGroup
*r
)
4255 if (ndr_flags
& NDR_SCALARS
) {
4256 NDR_CHECK(ndr_pull_align(ndr
, 5));
4257 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
4258 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4259 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->acct_flags
));
4260 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
4261 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
4262 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4264 if (ndr_flags
& NDR_BUFFERS
) {
4265 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
4266 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
4268 return NDR_ERR_SUCCESS
;
4271 _PUBLIC_
void ndr_print_samr_DispEntryFullGroup(struct ndr_print
*ndr
, const char *name
, const struct samr_DispEntryFullGroup
*r
)
4273 ndr_print_struct(ndr
, name
, "samr_DispEntryFullGroup");
4275 ndr_print_uint32(ndr
, "idx", r
->idx
);
4276 ndr_print_uint32(ndr
, "rid", r
->rid
);
4277 ndr_print_samr_GroupAttrs(ndr
, "acct_flags", r
->acct_flags
);
4278 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
4279 ndr_print_lsa_String(ndr
, "description", &r
->description
);
4283 static enum ndr_err_code
ndr_push_samr_DispInfoFullGroups(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispInfoFullGroups
*r
)
4285 uint32_t cntr_entries_1
;
4286 if (ndr_flags
& NDR_SCALARS
) {
4287 NDR_CHECK(ndr_push_align(ndr
, 5));
4288 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4289 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
4290 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4292 if (ndr_flags
& NDR_BUFFERS
) {
4294 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
4295 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4296 NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4298 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4299 NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4303 return NDR_ERR_SUCCESS
;
4306 static enum ndr_err_code
ndr_pull_samr_DispInfoFullGroups(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispInfoFullGroups
*r
)
4308 uint32_t _ptr_entries
;
4309 uint32_t cntr_entries_1
;
4310 TALLOC_CTX
*_mem_save_entries_0
;
4311 TALLOC_CTX
*_mem_save_entries_1
;
4312 if (ndr_flags
& NDR_SCALARS
) {
4313 NDR_CHECK(ndr_pull_align(ndr
, 5));
4314 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4315 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
4317 NDR_PULL_ALLOC(ndr
, r
->entries
);
4321 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4323 if (ndr_flags
& NDR_BUFFERS
) {
4325 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4326 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4327 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
4328 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
4329 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4330 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4331 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4332 NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4334 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4335 NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4337 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
4338 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
4341 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
4344 return NDR_ERR_SUCCESS
;
4347 _PUBLIC_
void ndr_print_samr_DispInfoFullGroups(struct ndr_print
*ndr
, const char *name
, const struct samr_DispInfoFullGroups
*r
)
4349 uint32_t cntr_entries_1
;
4350 ndr_print_struct(ndr
, name
, "samr_DispInfoFullGroups");
4352 ndr_print_uint32(ndr
, "count", r
->count
);
4353 ndr_print_ptr(ndr
, "entries", r
->entries
);
4356 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
4358 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
4360 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
4361 ndr_print_samr_DispEntryFullGroup(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
4371 static enum ndr_err_code
ndr_push_samr_DispEntryAscii(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispEntryAscii
*r
)
4373 if (ndr_flags
& NDR_SCALARS
) {
4374 NDR_CHECK(ndr_push_align(ndr
, 5));
4375 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
4376 NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr
, NDR_SCALARS
, &r
->account_name
));
4377 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4379 if (ndr_flags
& NDR_BUFFERS
) {
4380 NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr
, NDR_BUFFERS
, &r
->account_name
));
4382 return NDR_ERR_SUCCESS
;
4385 static enum ndr_err_code
ndr_pull_samr_DispEntryAscii(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispEntryAscii
*r
)
4387 if (ndr_flags
& NDR_SCALARS
) {
4388 NDR_CHECK(ndr_pull_align(ndr
, 5));
4389 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
4390 NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr
, NDR_SCALARS
, &r
->account_name
));
4391 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4393 if (ndr_flags
& NDR_BUFFERS
) {
4394 NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr
, NDR_BUFFERS
, &r
->account_name
));
4396 return NDR_ERR_SUCCESS
;
4399 _PUBLIC_
void ndr_print_samr_DispEntryAscii(struct ndr_print
*ndr
, const char *name
, const struct samr_DispEntryAscii
*r
)
4401 ndr_print_struct(ndr
, name
, "samr_DispEntryAscii");
4403 ndr_print_uint32(ndr
, "idx", r
->idx
);
4404 ndr_print_lsa_AsciiStringLarge(ndr
, "account_name", &r
->account_name
);
4408 static enum ndr_err_code
ndr_push_samr_DispInfoAscii(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispInfoAscii
*r
)
4410 uint32_t cntr_entries_1
;
4411 if (ndr_flags
& NDR_SCALARS
) {
4412 NDR_CHECK(ndr_push_align(ndr
, 5));
4413 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4414 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
4415 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4417 if (ndr_flags
& NDR_BUFFERS
) {
4419 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
4420 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4421 NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4423 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4424 NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4428 return NDR_ERR_SUCCESS
;
4431 static enum ndr_err_code
ndr_pull_samr_DispInfoAscii(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispInfoAscii
*r
)
4433 uint32_t _ptr_entries
;
4434 uint32_t cntr_entries_1
;
4435 TALLOC_CTX
*_mem_save_entries_0
;
4436 TALLOC_CTX
*_mem_save_entries_1
;
4437 if (ndr_flags
& NDR_SCALARS
) {
4438 NDR_CHECK(ndr_pull_align(ndr
, 5));
4439 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4440 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
4442 NDR_PULL_ALLOC(ndr
, r
->entries
);
4446 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4448 if (ndr_flags
& NDR_BUFFERS
) {
4450 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4451 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4452 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
4453 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
4454 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4455 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4456 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4457 NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4459 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4460 NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4462 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
4463 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
4466 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
4469 return NDR_ERR_SUCCESS
;
4472 _PUBLIC_
void ndr_print_samr_DispInfoAscii(struct ndr_print
*ndr
, const char *name
, const struct samr_DispInfoAscii
*r
)
4474 uint32_t cntr_entries_1
;
4475 ndr_print_struct(ndr
, name
, "samr_DispInfoAscii");
4477 ndr_print_uint32(ndr
, "count", r
->count
);
4478 ndr_print_ptr(ndr
, "entries", r
->entries
);
4481 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
4483 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
4485 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
4486 ndr_print_samr_DispEntryAscii(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
4496 static enum ndr_err_code
ndr_push_samr_DispInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_DispInfo
*r
)
4498 if (ndr_flags
& NDR_SCALARS
) {
4499 int level
= ndr_push_get_switch_value(ndr
, r
);
4500 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
4501 NDR_CHECK(ndr_push_union_align(ndr
, 5));
4504 NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr
, NDR_SCALARS
, &r
->info1
));
4508 NDR_CHECK(ndr_push_samr_DispInfoFull(ndr
, NDR_SCALARS
, &r
->info2
));
4512 NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr
, NDR_SCALARS
, &r
->info3
));
4516 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr
, NDR_SCALARS
, &r
->info4
));
4520 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr
, NDR_SCALARS
, &r
->info5
));
4524 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4527 if (ndr_flags
& NDR_BUFFERS
) {
4528 int level
= ndr_push_get_switch_value(ndr
, r
);
4531 NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr
, NDR_BUFFERS
, &r
->info1
));
4535 NDR_CHECK(ndr_push_samr_DispInfoFull(ndr
, NDR_BUFFERS
, &r
->info2
));
4539 NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr
, NDR_BUFFERS
, &r
->info3
));
4543 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr
, NDR_BUFFERS
, &r
->info4
));
4547 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr
, NDR_BUFFERS
, &r
->info5
));
4551 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4554 return NDR_ERR_SUCCESS
;
4557 static enum ndr_err_code
ndr_pull_samr_DispInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_DispInfo
*r
)
4561 level
= ndr_pull_get_switch_value(ndr
, r
);
4562 if (ndr_flags
& NDR_SCALARS
) {
4563 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
4564 if (_level
!= level
) {
4565 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4567 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
4570 NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr
, NDR_SCALARS
, &r
->info1
));
4574 NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr
, NDR_SCALARS
, &r
->info2
));
4578 NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr
, NDR_SCALARS
, &r
->info3
));
4582 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr
, NDR_SCALARS
, &r
->info4
));
4586 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr
, NDR_SCALARS
, &r
->info5
));
4590 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4593 if (ndr_flags
& NDR_BUFFERS
) {
4596 NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr
, NDR_BUFFERS
, &r
->info1
));
4600 NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr
, NDR_BUFFERS
, &r
->info2
));
4604 NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr
, NDR_BUFFERS
, &r
->info3
));
4608 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr
, NDR_BUFFERS
, &r
->info4
));
4612 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr
, NDR_BUFFERS
, &r
->info5
));
4616 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4619 return NDR_ERR_SUCCESS
;
4622 _PUBLIC_
void ndr_print_samr_DispInfo(struct ndr_print
*ndr
, const char *name
, const union samr_DispInfo
*r
)
4625 level
= ndr_print_get_switch_value(ndr
, r
);
4626 ndr_print_union(ndr
, name
, level
, "samr_DispInfo");
4629 ndr_print_samr_DispInfoGeneral(ndr
, "info1", &r
->info1
);
4633 ndr_print_samr_DispInfoFull(ndr
, "info2", &r
->info2
);
4637 ndr_print_samr_DispInfoFullGroups(ndr
, "info3", &r
->info3
);
4641 ndr_print_samr_DispInfoAscii(ndr
, "info4", &r
->info4
);
4645 ndr_print_samr_DispInfoAscii(ndr
, "info5", &r
->info5
);
4649 ndr_print_bad_level(ndr
, name
, level
);
4653 static enum ndr_err_code
ndr_push_samr_PwInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_PwInfo
*r
)
4655 if (ndr_flags
& NDR_SCALARS
) {
4656 NDR_CHECK(ndr_push_align(ndr
, 4));
4657 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->min_password_length
));
4658 NDR_CHECK(ndr_push_samr_PasswordProperties(ndr
, NDR_SCALARS
, r
->password_properties
));
4659 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
4661 if (ndr_flags
& NDR_BUFFERS
) {
4663 return NDR_ERR_SUCCESS
;
4666 static enum ndr_err_code
ndr_pull_samr_PwInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_PwInfo
*r
)
4668 if (ndr_flags
& NDR_SCALARS
) {
4669 NDR_CHECK(ndr_pull_align(ndr
, 4));
4670 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->min_password_length
));
4671 NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr
, NDR_SCALARS
, &r
->password_properties
));
4672 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
4674 if (ndr_flags
& NDR_BUFFERS
) {
4676 return NDR_ERR_SUCCESS
;
4679 _PUBLIC_
void ndr_print_samr_PwInfo(struct ndr_print
*ndr
, const char *name
, const struct samr_PwInfo
*r
)
4681 ndr_print_struct(ndr
, name
, "samr_PwInfo");
4683 ndr_print_uint16(ndr
, "min_password_length", r
->min_password_length
);
4684 ndr_print_samr_PasswordProperties(ndr
, "password_properties", r
->password_properties
);
4688 static enum ndr_err_code
ndr_push_samr_ConnectVersion(struct ndr_push
*ndr
, int ndr_flags
, enum samr_ConnectVersion r
)
4690 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
4691 return NDR_ERR_SUCCESS
;
4694 static enum ndr_err_code
ndr_pull_samr_ConnectVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_ConnectVersion
*r
)
4697 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
4699 return NDR_ERR_SUCCESS
;
4702 _PUBLIC_
void ndr_print_samr_ConnectVersion(struct ndr_print
*ndr
, const char *name
, enum samr_ConnectVersion r
)
4704 const char *val
= NULL
;
4707 case SAMR_CONNECT_PRE_W2K
: val
= "SAMR_CONNECT_PRE_W2K"; break;
4708 case SAMR_CONNECT_W2K
: val
= "SAMR_CONNECT_W2K"; break;
4709 case SAMR_CONNECT_AFTER_W2K
: val
= "SAMR_CONNECT_AFTER_W2K"; break;
4711 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4714 _PUBLIC_
enum ndr_err_code
ndr_push_samPwdChangeReason(struct ndr_push
*ndr
, int ndr_flags
, enum samPwdChangeReason r
)
4716 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
4717 return NDR_ERR_SUCCESS
;
4720 _PUBLIC_
enum ndr_err_code
ndr_pull_samPwdChangeReason(struct ndr_pull
*ndr
, int ndr_flags
, enum samPwdChangeReason
*r
)
4723 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
4725 return NDR_ERR_SUCCESS
;
4728 _PUBLIC_
void ndr_print_samPwdChangeReason(struct ndr_print
*ndr
, const char *name
, enum samPwdChangeReason r
)
4730 const char *val
= NULL
;
4733 case SAM_PWD_CHANGE_NO_ERROR
: val
= "SAM_PWD_CHANGE_NO_ERROR"; break;
4734 case SAM_PWD_CHANGE_PASSWORD_TOO_SHORT
: val
= "SAM_PWD_CHANGE_PASSWORD_TOO_SHORT"; break;
4735 case SAM_PWD_CHANGE_PWD_IN_HISTORY
: val
= "SAM_PWD_CHANGE_PWD_IN_HISTORY"; break;
4736 case SAM_PWD_CHANGE_USERNAME_IN_PASSWORD
: val
= "SAM_PWD_CHANGE_USERNAME_IN_PASSWORD"; break;
4737 case SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD
: val
= "SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD"; break;
4738 case SAM_PWD_CHANGE_NOT_COMPLEX
: val
= "SAM_PWD_CHANGE_NOT_COMPLEX"; break;
4739 case SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT
: val
= "SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT"; break;
4740 case SAM_PWD_CHANGE_FAILED_BY_FILTER
: val
= "SAM_PWD_CHANGE_FAILED_BY_FILTER"; break;
4741 case SAM_PWD_CHANGE_PASSWORD_TOO_LONG
: val
= "SAM_PWD_CHANGE_PASSWORD_TOO_LONG"; break;
4743 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4746 static enum ndr_err_code
ndr_push_userPwdChangeFailureInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct userPwdChangeFailureInformation
*r
)
4748 if (ndr_flags
& NDR_SCALARS
) {
4749 NDR_CHECK(ndr_push_align(ndr
, 5));
4750 NDR_CHECK(ndr_push_samPwdChangeReason(ndr
, NDR_SCALARS
, r
->extendedFailureReason
));
4751 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->filterModuleName
));
4752 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4754 if (ndr_flags
& NDR_BUFFERS
) {
4755 if (r
->filterModuleName
) {
4756 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->filterModuleName
, CH_UTF16
)));
4757 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4758 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->filterModuleName
, CH_UTF16
)));
4759 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->filterModuleName
, ndr_charset_length(r
->filterModuleName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4762 return NDR_ERR_SUCCESS
;
4765 static enum ndr_err_code
ndr_pull_userPwdChangeFailureInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct userPwdChangeFailureInformation
*r
)
4767 uint32_t _ptr_filterModuleName
;
4768 TALLOC_CTX
*_mem_save_filterModuleName_0
;
4769 if (ndr_flags
& NDR_SCALARS
) {
4770 NDR_CHECK(ndr_pull_align(ndr
, 5));
4771 NDR_CHECK(ndr_pull_samPwdChangeReason(ndr
, NDR_SCALARS
, &r
->extendedFailureReason
));
4772 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_filterModuleName
));
4773 if (_ptr_filterModuleName
) {
4774 NDR_PULL_ALLOC(ndr
, r
->filterModuleName
);
4776 r
->filterModuleName
= NULL
;
4778 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4780 if (ndr_flags
& NDR_BUFFERS
) {
4781 if (r
->filterModuleName
) {
4782 _mem_save_filterModuleName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4783 NDR_PULL_SET_MEM_CTX(ndr
, r
->filterModuleName
, 0);
4784 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->filterModuleName
));
4785 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->filterModuleName
));
4786 if (ndr_get_array_length(ndr
, &r
->filterModuleName
) > ndr_get_array_size(ndr
, &r
->filterModuleName
)) {
4787 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->filterModuleName
), ndr_get_array_length(ndr
, &r
->filterModuleName
));
4789 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->filterModuleName
), sizeof(uint16_t)));
4790 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->filterModuleName
, ndr_get_array_length(ndr
, &r
->filterModuleName
), sizeof(uint16_t), CH_UTF16
));
4791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_filterModuleName_0
, 0);
4794 return NDR_ERR_SUCCESS
;
4797 _PUBLIC_
void ndr_print_userPwdChangeFailureInformation(struct ndr_print
*ndr
, const char *name
, const struct userPwdChangeFailureInformation
*r
)
4799 ndr_print_struct(ndr
, name
, "userPwdChangeFailureInformation");
4801 ndr_print_samPwdChangeReason(ndr
, "extendedFailureReason", r
->extendedFailureReason
);
4802 ndr_print_ptr(ndr
, "filterModuleName", r
->filterModuleName
);
4804 if (r
->filterModuleName
) {
4805 ndr_print_string(ndr
, "filterModuleName", r
->filterModuleName
);
4811 static enum ndr_err_code
ndr_push_samr_ConnectInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ConnectInfo1
*r
)
4813 if (ndr_flags
& NDR_SCALARS
) {
4814 NDR_CHECK(ndr_push_align(ndr
, 4));
4815 NDR_CHECK(ndr_push_samr_ConnectVersion(ndr
, NDR_SCALARS
, r
->client_version
));
4816 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
4817 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
4819 if (ndr_flags
& NDR_BUFFERS
) {
4821 return NDR_ERR_SUCCESS
;
4824 static enum ndr_err_code
ndr_pull_samr_ConnectInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ConnectInfo1
*r
)
4826 if (ndr_flags
& NDR_SCALARS
) {
4827 NDR_CHECK(ndr_pull_align(ndr
, 4));
4828 NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr
, NDR_SCALARS
, &r
->client_version
));
4829 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
4830 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
4832 if (ndr_flags
& NDR_BUFFERS
) {
4834 return NDR_ERR_SUCCESS
;
4837 _PUBLIC_
void ndr_print_samr_ConnectInfo1(struct ndr_print
*ndr
, const char *name
, const struct samr_ConnectInfo1
*r
)
4839 ndr_print_struct(ndr
, name
, "samr_ConnectInfo1");
4841 ndr_print_samr_ConnectVersion(ndr
, "client_version", r
->client_version
);
4842 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
4846 static enum ndr_err_code
ndr_push_samr_ConnectInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_ConnectInfo
*r
)
4848 if (ndr_flags
& NDR_SCALARS
) {
4849 int level
= ndr_push_get_switch_value(ndr
, r
);
4850 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
4851 NDR_CHECK(ndr_push_union_align(ndr
, 4));
4854 NDR_CHECK(ndr_push_samr_ConnectInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
4858 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4861 if (ndr_flags
& NDR_BUFFERS
) {
4862 int level
= ndr_push_get_switch_value(ndr
, r
);
4868 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4871 return NDR_ERR_SUCCESS
;
4874 static enum ndr_err_code
ndr_pull_samr_ConnectInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_ConnectInfo
*r
)
4878 level
= ndr_pull_get_switch_value(ndr
, r
);
4879 if (ndr_flags
& NDR_SCALARS
) {
4880 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
4881 if (_level
!= level
) {
4882 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4884 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
4887 NDR_CHECK(ndr_pull_samr_ConnectInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
4891 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4894 if (ndr_flags
& NDR_BUFFERS
) {
4900 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4903 return NDR_ERR_SUCCESS
;
4906 _PUBLIC_
void ndr_print_samr_ConnectInfo(struct ndr_print
*ndr
, const char *name
, const union samr_ConnectInfo
*r
)
4909 level
= ndr_print_get_switch_value(ndr
, r
);
4910 ndr_print_union(ndr
, name
, level
, "samr_ConnectInfo");
4913 ndr_print_samr_ConnectInfo1(ndr
, "info1", &r
->info1
);
4917 ndr_print_bad_level(ndr
, name
, level
);
4921 static enum ndr_err_code
ndr_push_samr_ValidateFieldsPresent(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
4923 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4924 return NDR_ERR_SUCCESS
;
4927 static enum ndr_err_code
ndr_pull_samr_ValidateFieldsPresent(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
4930 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4932 return NDR_ERR_SUCCESS
;
4935 _PUBLIC_
void ndr_print_samr_ValidateFieldsPresent(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
4937 ndr_print_uint32(ndr
, name
, r
);
4939 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET", SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET
, r
);
4940 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME", SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME
, r
);
4941 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_LOCKOUT_TIME", SAMR_VALIDATE_FIELD_LOCKOUT_TIME
, r
);
4942 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT", SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT
, r
);
4943 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH
, r
);
4944 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY
, r
);
4948 static enum ndr_err_code
ndr_push_samr_ValidatePasswordLevel(struct ndr_push
*ndr
, int ndr_flags
, enum samr_ValidatePasswordLevel r
)
4950 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
4951 return NDR_ERR_SUCCESS
;
4954 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_ValidatePasswordLevel
*r
)
4957 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
4959 return NDR_ERR_SUCCESS
;
4962 _PUBLIC_
void ndr_print_samr_ValidatePasswordLevel(struct ndr_print
*ndr
, const char *name
, enum samr_ValidatePasswordLevel r
)
4964 const char *val
= NULL
;
4967 case NetValidateAuthentication
: val
= "NetValidateAuthentication"; break;
4968 case NetValidatePasswordChange
: val
= "NetValidatePasswordChange"; break;
4969 case NetValidatePasswordReset
: val
= "NetValidatePasswordReset"; break;
4971 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4974 static enum ndr_err_code
ndr_push_samr_ValidationStatus(struct ndr_push
*ndr
, int ndr_flags
, enum samr_ValidationStatus r
)
4976 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
4977 return NDR_ERR_SUCCESS
;
4980 static enum ndr_err_code
ndr_pull_samr_ValidationStatus(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_ValidationStatus
*r
)
4983 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
4985 return NDR_ERR_SUCCESS
;
4988 _PUBLIC_
void ndr_print_samr_ValidationStatus(struct ndr_print
*ndr
, const char *name
, enum samr_ValidationStatus r
)
4990 const char *val
= NULL
;
4993 case SAMR_VALIDATION_STATUS_SUCCESS
: val
= "SAMR_VALIDATION_STATUS_SUCCESS"; break;
4994 case SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE
: val
= "SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE"; break;
4995 case SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT
: val
= "SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT"; break;
4996 case SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED
: val
= "SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED"; break;
4997 case SAMR_VALIDATION_STATUS_BAD_PASSWORD
: val
= "SAMR_VALIDATION_STATUS_BAD_PASSWORD"; break;
4998 case SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT
: val
= "SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT"; break;
4999 case SAMR_VALIDATION_STATUS_PWD_TOO_SHORT
: val
= "SAMR_VALIDATION_STATUS_PWD_TOO_SHORT"; break;
5000 case SAMR_VALIDATION_STATUS_PWD_TOO_LONG
: val
= "SAMR_VALIDATION_STATUS_PWD_TOO_LONG"; break;
5001 case SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH
: val
= "SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH"; break;
5002 case SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT
: val
= "SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT"; break;
5003 case SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR
: val
= "SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR"; break;
5005 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5008 static enum ndr_err_code
ndr_push_samr_ValidationBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidationBlob
*r
)
5010 if (ndr_flags
& NDR_SCALARS
) {
5011 NDR_CHECK(ndr_push_align(ndr
, 5));
5012 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
5013 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
5014 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
5016 if (ndr_flags
& NDR_BUFFERS
) {
5018 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->length
));
5019 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
5022 return NDR_ERR_SUCCESS
;
5025 static enum ndr_err_code
ndr_pull_samr_ValidationBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidationBlob
*r
)
5028 TALLOC_CTX
*_mem_save_data_0
;
5029 if (ndr_flags
& NDR_SCALARS
) {
5030 NDR_CHECK(ndr_pull_align(ndr
, 5));
5031 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
5032 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
5034 NDR_PULL_ALLOC(ndr
, r
->data
);
5038 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5040 if (ndr_flags
& NDR_BUFFERS
) {
5042 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5043 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
5044 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
5045 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
5046 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
5047 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
5050 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
5053 return NDR_ERR_SUCCESS
;
5056 _PUBLIC_
void ndr_print_samr_ValidationBlob(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidationBlob
*r
)
5058 ndr_print_struct(ndr
, name
, "samr_ValidationBlob");
5060 ndr_print_uint32(ndr
, "length", r
->length
);
5061 ndr_print_ptr(ndr
, "data", r
->data
);
5064 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
5070 static enum ndr_err_code
ndr_push_samr_ValidatePasswordInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordInfo
*r
)
5072 uint32_t cntr_pwd_history_1
;
5073 if (ndr_flags
& NDR_SCALARS
) {
5074 NDR_CHECK(ndr_push_align(ndr
, 8));
5075 NDR_CHECK(ndr_push_samr_ValidateFieldsPresent(ndr
, NDR_SCALARS
, r
->fields_present
));
5076 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->last_password_change
));
5077 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->bad_password_time
));
5078 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->lockout_time
));
5079 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->bad_pwd_count
));
5080 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pwd_history_len
));
5081 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->pwd_history
));
5082 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
5084 if (ndr_flags
& NDR_BUFFERS
) {
5085 if (r
->pwd_history
) {
5086 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->pwd_history_len
));
5087 for (cntr_pwd_history_1
= 0; cntr_pwd_history_1
< r
->pwd_history_len
; cntr_pwd_history_1
++) {
5088 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->pwd_history
[cntr_pwd_history_1
]));
5090 for (cntr_pwd_history_1
= 0; cntr_pwd_history_1
< r
->pwd_history_len
; cntr_pwd_history_1
++) {
5091 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->pwd_history
[cntr_pwd_history_1
]));
5095 return NDR_ERR_SUCCESS
;
5098 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordInfo
*r
)
5100 uint32_t _ptr_pwd_history
;
5101 uint32_t cntr_pwd_history_1
;
5102 TALLOC_CTX
*_mem_save_pwd_history_0
;
5103 TALLOC_CTX
*_mem_save_pwd_history_1
;
5104 if (ndr_flags
& NDR_SCALARS
) {
5105 NDR_CHECK(ndr_pull_align(ndr
, 8));
5106 NDR_CHECK(ndr_pull_samr_ValidateFieldsPresent(ndr
, NDR_SCALARS
, &r
->fields_present
));
5107 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->last_password_change
));
5108 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->bad_password_time
));
5109 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->lockout_time
));
5110 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->bad_pwd_count
));
5111 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pwd_history_len
));
5112 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_pwd_history
));
5113 if (_ptr_pwd_history
) {
5114 NDR_PULL_ALLOC(ndr
, r
->pwd_history
);
5116 r
->pwd_history
= NULL
;
5118 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
5120 if (ndr_flags
& NDR_BUFFERS
) {
5121 if (r
->pwd_history
) {
5122 _mem_save_pwd_history_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5123 NDR_PULL_SET_MEM_CTX(ndr
, r
->pwd_history
, 0);
5124 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->pwd_history
));
5125 NDR_PULL_ALLOC_N(ndr
, r
->pwd_history
, ndr_get_array_size(ndr
, &r
->pwd_history
));
5126 _mem_save_pwd_history_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5127 NDR_PULL_SET_MEM_CTX(ndr
, r
->pwd_history
, 0);
5128 for (cntr_pwd_history_1
= 0; cntr_pwd_history_1
< r
->pwd_history_len
; cntr_pwd_history_1
++) {
5129 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->pwd_history
[cntr_pwd_history_1
]));
5131 for (cntr_pwd_history_1
= 0; cntr_pwd_history_1
< r
->pwd_history_len
; cntr_pwd_history_1
++) {
5132 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->pwd_history
[cntr_pwd_history_1
]));
5134 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_pwd_history_1
, 0);
5135 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_pwd_history_0
, 0);
5137 if (r
->pwd_history
) {
5138 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->pwd_history
, r
->pwd_history_len
));
5141 return NDR_ERR_SUCCESS
;
5144 _PUBLIC_
void ndr_print_samr_ValidatePasswordInfo(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordInfo
*r
)
5146 uint32_t cntr_pwd_history_1
;
5147 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordInfo");
5149 ndr_print_samr_ValidateFieldsPresent(ndr
, "fields_present", r
->fields_present
);
5150 ndr_print_NTTIME_hyper(ndr
, "last_password_change", r
->last_password_change
);
5151 ndr_print_NTTIME_hyper(ndr
, "bad_password_time", r
->bad_password_time
);
5152 ndr_print_NTTIME_hyper(ndr
, "lockout_time", r
->lockout_time
);
5153 ndr_print_uint32(ndr
, "bad_pwd_count", r
->bad_pwd_count
);
5154 ndr_print_uint32(ndr
, "pwd_history_len", r
->pwd_history_len
);
5155 ndr_print_ptr(ndr
, "pwd_history", r
->pwd_history
);
5157 if (r
->pwd_history
) {
5158 ndr
->print(ndr
, "%s: ARRAY(%d)", "pwd_history", (int)r
->pwd_history_len
);
5160 for (cntr_pwd_history_1
=0;cntr_pwd_history_1
<r
->pwd_history_len
;cntr_pwd_history_1
++) {
5162 if (asprintf(&idx_1
, "[%d]", cntr_pwd_history_1
) != -1) {
5163 ndr_print_samr_ValidationBlob(ndr
, "pwd_history", &r
->pwd_history
[cntr_pwd_history_1
]);
5173 static enum ndr_err_code
ndr_push_samr_ValidatePasswordRepCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordRepCtr
*r
)
5175 if (ndr_flags
& NDR_SCALARS
) {
5176 NDR_CHECK(ndr_push_align(ndr
, 8));
5177 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5178 NDR_CHECK(ndr_push_samr_ValidationStatus(ndr
, NDR_SCALARS
, r
->status
));
5179 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
5181 if (ndr_flags
& NDR_BUFFERS
) {
5182 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5184 return NDR_ERR_SUCCESS
;
5187 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordRepCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordRepCtr
*r
)
5189 if (ndr_flags
& NDR_SCALARS
) {
5190 NDR_CHECK(ndr_pull_align(ndr
, 8));
5191 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5192 NDR_CHECK(ndr_pull_samr_ValidationStatus(ndr
, NDR_SCALARS
, &r
->status
));
5193 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
5195 if (ndr_flags
& NDR_BUFFERS
) {
5196 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5198 return NDR_ERR_SUCCESS
;
5201 _PUBLIC_
void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordRepCtr
*r
)
5203 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordRepCtr");
5205 ndr_print_samr_ValidatePasswordInfo(ndr
, "info", &r
->info
);
5206 ndr_print_samr_ValidationStatus(ndr
, "status", r
->status
);
5210 static enum ndr_err_code
ndr_push_samr_ValidatePasswordRep(struct ndr_push
*ndr
, int ndr_flags
, const union samr_ValidatePasswordRep
*r
)
5212 if (ndr_flags
& NDR_SCALARS
) {
5213 int level
= ndr_push_get_switch_value(ndr
, r
);
5214 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
5215 NDR_CHECK(ndr_push_union_align(ndr
, 8));
5218 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr1
));
5222 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr2
));
5226 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr3
));
5230 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5233 if (ndr_flags
& NDR_BUFFERS
) {
5234 int level
= ndr_push_get_switch_value(ndr
, r
);
5237 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr1
));
5241 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr2
));
5245 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr3
));
5249 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5252 return NDR_ERR_SUCCESS
;
5255 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordRep(struct ndr_pull
*ndr
, int ndr_flags
, union samr_ValidatePasswordRep
*r
)
5259 level
= ndr_pull_get_switch_value(ndr
, r
);
5260 if (ndr_flags
& NDR_SCALARS
) {
5261 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
5262 if (_level
!= level
) {
5263 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
5265 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
5268 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr1
));
5272 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr2
));
5276 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr3
));
5280 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5283 if (ndr_flags
& NDR_BUFFERS
) {
5286 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr1
));
5290 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr2
));
5294 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr3
));
5298 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5301 return NDR_ERR_SUCCESS
;
5304 _PUBLIC_
void ndr_print_samr_ValidatePasswordRep(struct ndr_print
*ndr
, const char *name
, const union samr_ValidatePasswordRep
*r
)
5307 level
= ndr_print_get_switch_value(ndr
, r
);
5308 ndr_print_union(ndr
, name
, level
, "samr_ValidatePasswordRep");
5311 ndr_print_samr_ValidatePasswordRepCtr(ndr
, "ctr1", &r
->ctr1
);
5315 ndr_print_samr_ValidatePasswordRepCtr(ndr
, "ctr2", &r
->ctr2
);
5319 ndr_print_samr_ValidatePasswordRepCtr(ndr
, "ctr3", &r
->ctr3
);
5323 ndr_print_bad_level(ndr
, name
, level
);
5327 static enum ndr_err_code
ndr_push_samr_ValidatePasswordReq3(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordReq3
*r
)
5329 if (ndr_flags
& NDR_SCALARS
) {
5330 NDR_CHECK(ndr_push_align(ndr
, 8));
5331 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5332 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->password
));
5333 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->account
));
5334 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->hash
));
5335 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->pwd_must_change_at_next_logon
));
5336 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->clear_lockout
));
5337 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
5339 if (ndr_flags
& NDR_BUFFERS
) {
5340 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5341 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->password
));
5342 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->account
));
5343 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->hash
));
5345 return NDR_ERR_SUCCESS
;
5348 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordReq3(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordReq3
*r
)
5350 if (ndr_flags
& NDR_SCALARS
) {
5351 NDR_CHECK(ndr_pull_align(ndr
, 8));
5352 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5353 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->password
));
5354 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->account
));
5355 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->hash
));
5356 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->pwd_must_change_at_next_logon
));
5357 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->clear_lockout
));
5358 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
5360 if (ndr_flags
& NDR_BUFFERS
) {
5361 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5362 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->password
));
5363 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->account
));
5364 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->hash
));
5366 return NDR_ERR_SUCCESS
;
5369 _PUBLIC_
void ndr_print_samr_ValidatePasswordReq3(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordReq3
*r
)
5371 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordReq3");
5373 ndr_print_samr_ValidatePasswordInfo(ndr
, "info", &r
->info
);
5374 ndr_print_lsa_StringLarge(ndr
, "password", &r
->password
);
5375 ndr_print_lsa_StringLarge(ndr
, "account", &r
->account
);
5376 ndr_print_samr_ValidationBlob(ndr
, "hash", &r
->hash
);
5377 ndr_print_uint8(ndr
, "pwd_must_change_at_next_logon", r
->pwd_must_change_at_next_logon
);
5378 ndr_print_uint8(ndr
, "clear_lockout", r
->clear_lockout
);
5382 static enum ndr_err_code
ndr_push_samr_ValidatePasswordReq2(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordReq2
*r
)
5384 if (ndr_flags
& NDR_SCALARS
) {
5385 NDR_CHECK(ndr_push_align(ndr
, 8));
5386 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5387 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->password
));
5388 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->account
));
5389 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->hash
));
5390 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_matched
));
5391 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
5393 if (ndr_flags
& NDR_BUFFERS
) {
5394 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5395 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->password
));
5396 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->account
));
5397 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->hash
));
5399 return NDR_ERR_SUCCESS
;
5402 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordReq2(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordReq2
*r
)
5404 if (ndr_flags
& NDR_SCALARS
) {
5405 NDR_CHECK(ndr_pull_align(ndr
, 8));
5406 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5407 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->password
));
5408 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->account
));
5409 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->hash
));
5410 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_matched
));
5411 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
5413 if (ndr_flags
& NDR_BUFFERS
) {
5414 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5415 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->password
));
5416 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->account
));
5417 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->hash
));
5419 return NDR_ERR_SUCCESS
;
5422 _PUBLIC_
void ndr_print_samr_ValidatePasswordReq2(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordReq2
*r
)
5424 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordReq2");
5426 ndr_print_samr_ValidatePasswordInfo(ndr
, "info", &r
->info
);
5427 ndr_print_lsa_StringLarge(ndr
, "password", &r
->password
);
5428 ndr_print_lsa_StringLarge(ndr
, "account", &r
->account
);
5429 ndr_print_samr_ValidationBlob(ndr
, "hash", &r
->hash
);
5430 ndr_print_uint8(ndr
, "password_matched", r
->password_matched
);
5434 static enum ndr_err_code
ndr_push_samr_ValidatePasswordReq1(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordReq1
*r
)
5436 if (ndr_flags
& NDR_SCALARS
) {
5437 NDR_CHECK(ndr_push_align(ndr
, 8));
5438 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5439 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_matched
));
5440 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
5442 if (ndr_flags
& NDR_BUFFERS
) {
5443 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5445 return NDR_ERR_SUCCESS
;
5448 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordReq1(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordReq1
*r
)
5450 if (ndr_flags
& NDR_SCALARS
) {
5451 NDR_CHECK(ndr_pull_align(ndr
, 8));
5452 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5453 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_matched
));
5454 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
5456 if (ndr_flags
& NDR_BUFFERS
) {
5457 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5459 return NDR_ERR_SUCCESS
;
5462 _PUBLIC_
void ndr_print_samr_ValidatePasswordReq1(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordReq1
*r
)
5464 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordReq1");
5466 ndr_print_samr_ValidatePasswordInfo(ndr
, "info", &r
->info
);
5467 ndr_print_uint8(ndr
, "password_matched", r
->password_matched
);
5471 static enum ndr_err_code
ndr_push_samr_ValidatePasswordReq(struct ndr_push
*ndr
, int ndr_flags
, const union samr_ValidatePasswordReq
*r
)
5473 if (ndr_flags
& NDR_SCALARS
) {
5474 int level
= ndr_push_get_switch_value(ndr
, r
);
5475 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
5476 NDR_CHECK(ndr_push_union_align(ndr
, 8));
5479 NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr
, NDR_SCALARS
, &r
->req1
));
5483 NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr
, NDR_SCALARS
, &r
->req2
));
5487 NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr
, NDR_SCALARS
, &r
->req3
));
5491 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5494 if (ndr_flags
& NDR_BUFFERS
) {
5495 int level
= ndr_push_get_switch_value(ndr
, r
);
5498 NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr
, NDR_BUFFERS
, &r
->req1
));
5502 NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr
, NDR_BUFFERS
, &r
->req2
));
5506 NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr
, NDR_BUFFERS
, &r
->req3
));
5510 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5513 return NDR_ERR_SUCCESS
;
5516 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordReq(struct ndr_pull
*ndr
, int ndr_flags
, union samr_ValidatePasswordReq
*r
)
5520 level
= ndr_pull_get_switch_value(ndr
, r
);
5521 if (ndr_flags
& NDR_SCALARS
) {
5522 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
5523 if (_level
!= level
) {
5524 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
5526 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
5529 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr
, NDR_SCALARS
, &r
->req1
));
5533 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr
, NDR_SCALARS
, &r
->req2
));
5537 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr
, NDR_SCALARS
, &r
->req3
));
5541 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5544 if (ndr_flags
& NDR_BUFFERS
) {
5547 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr
, NDR_BUFFERS
, &r
->req1
));
5551 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr
, NDR_BUFFERS
, &r
->req2
));
5555 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr
, NDR_BUFFERS
, &r
->req3
));
5559 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5562 return NDR_ERR_SUCCESS
;
5565 _PUBLIC_
void ndr_print_samr_ValidatePasswordReq(struct ndr_print
*ndr
, const char *name
, const union samr_ValidatePasswordReq
*r
)
5568 level
= ndr_print_get_switch_value(ndr
, r
);
5569 ndr_print_union(ndr
, name
, level
, "samr_ValidatePasswordReq");
5572 ndr_print_samr_ValidatePasswordReq1(ndr
, "req1", &r
->req1
);
5576 ndr_print_samr_ValidatePasswordReq2(ndr
, "req2", &r
->req2
);
5580 ndr_print_samr_ValidatePasswordReq3(ndr
, "req3", &r
->req3
);
5584 ndr_print_bad_level(ndr
, name
, level
);
5588 static enum ndr_err_code
ndr_push_samr_Connect(struct ndr_push
*ndr
, int flags
, const struct samr_Connect
*r
)
5590 if (flags
& NDR_IN
) {
5591 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
5592 if (r
->in
.system_name
) {
5593 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
5595 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
5597 if (flags
& NDR_OUT
) {
5598 if (r
->out
.connect_handle
== NULL
) {
5599 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5601 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
5602 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5604 return NDR_ERR_SUCCESS
;
5607 static enum ndr_err_code
ndr_pull_samr_Connect(struct ndr_pull
*ndr
, int flags
, struct samr_Connect
*r
)
5609 uint32_t _ptr_system_name
;
5610 TALLOC_CTX
*_mem_save_system_name_0
;
5611 TALLOC_CTX
*_mem_save_connect_handle_0
;
5612 if (flags
& NDR_IN
) {
5613 ZERO_STRUCT(r
->out
);
5615 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
5616 if (_ptr_system_name
) {
5617 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
5619 r
->in
.system_name
= NULL
;
5621 if (r
->in
.system_name
) {
5622 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5623 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
5624 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
5625 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
5627 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
5628 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
5629 ZERO_STRUCTP(r
->out
.connect_handle
);
5631 if (flags
& NDR_OUT
) {
5632 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5633 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
5635 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5636 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
5637 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
5638 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5639 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5641 return NDR_ERR_SUCCESS
;
5644 _PUBLIC_
void ndr_print_samr_Connect(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect
*r
)
5646 ndr_print_struct(ndr
, name
, "samr_Connect");
5648 if (flags
& NDR_SET_VALUES
) {
5649 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5651 if (flags
& NDR_IN
) {
5652 ndr_print_struct(ndr
, "in", "samr_Connect");
5654 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
5656 if (r
->in
.system_name
) {
5657 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
5660 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
5663 if (flags
& NDR_OUT
) {
5664 ndr_print_struct(ndr
, "out", "samr_Connect");
5666 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
5668 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
5670 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5676 _PUBLIC_
enum ndr_err_code
ndr_push_samr_Close(struct ndr_push
*ndr
, int flags
, const struct samr_Close
*r
)
5678 if (flags
& NDR_IN
) {
5679 if (r
->in
.handle
== NULL
) {
5680 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5682 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5684 if (flags
& NDR_OUT
) {
5685 if (r
->out
.handle
== NULL
) {
5686 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5688 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5689 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5691 return NDR_ERR_SUCCESS
;
5694 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_Close(struct ndr_pull
*ndr
, int flags
, struct samr_Close
*r
)
5696 TALLOC_CTX
*_mem_save_handle_0
;
5697 if (flags
& NDR_IN
) {
5698 ZERO_STRUCT(r
->out
);
5700 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5701 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5703 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5704 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5705 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5706 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5707 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5708 *r
->out
.handle
= *r
->in
.handle
;
5710 if (flags
& NDR_OUT
) {
5711 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5712 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5714 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5715 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5716 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5717 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5718 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5720 return NDR_ERR_SUCCESS
;
5723 _PUBLIC_
void ndr_print_samr_Close(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Close
*r
)
5725 ndr_print_struct(ndr
, name
, "samr_Close");
5727 if (flags
& NDR_SET_VALUES
) {
5728 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5730 if (flags
& NDR_IN
) {
5731 ndr_print_struct(ndr
, "in", "samr_Close");
5733 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5735 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5739 if (flags
& NDR_OUT
) {
5740 ndr_print_struct(ndr
, "out", "samr_Close");
5742 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5744 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5746 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5752 static enum ndr_err_code
ndr_push_samr_SetSecurity(struct ndr_push
*ndr
, int flags
, const struct samr_SetSecurity
*r
)
5754 if (flags
& NDR_IN
) {
5755 if (r
->in
.handle
== NULL
) {
5756 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5758 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5759 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5760 if (r
->in
.sdbuf
== NULL
) {
5761 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5763 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5765 if (flags
& NDR_OUT
) {
5766 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5768 return NDR_ERR_SUCCESS
;
5771 static enum ndr_err_code
ndr_pull_samr_SetSecurity(struct ndr_pull
*ndr
, int flags
, struct samr_SetSecurity
*r
)
5773 TALLOC_CTX
*_mem_save_handle_0
;
5774 TALLOC_CTX
*_mem_save_sdbuf_0
;
5775 if (flags
& NDR_IN
) {
5776 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5777 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5779 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5780 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5781 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5782 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5783 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5784 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5785 NDR_PULL_ALLOC(ndr
, r
->in
.sdbuf
);
5787 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5788 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5789 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5790 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5792 if (flags
& NDR_OUT
) {
5793 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5795 return NDR_ERR_SUCCESS
;
5798 _PUBLIC_
void ndr_print_samr_SetSecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetSecurity
*r
)
5800 ndr_print_struct(ndr
, name
, "samr_SetSecurity");
5802 if (flags
& NDR_SET_VALUES
) {
5803 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5805 if (flags
& NDR_IN
) {
5806 ndr_print_struct(ndr
, "in", "samr_SetSecurity");
5808 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5810 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5812 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5813 ndr_print_ptr(ndr
, "sdbuf", r
->in
.sdbuf
);
5815 ndr_print_sec_desc_buf(ndr
, "sdbuf", r
->in
.sdbuf
);
5819 if (flags
& NDR_OUT
) {
5820 ndr_print_struct(ndr
, "out", "samr_SetSecurity");
5822 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5828 static enum ndr_err_code
ndr_push_samr_QuerySecurity(struct ndr_push
*ndr
, int flags
, const struct samr_QuerySecurity
*r
)
5830 if (flags
& NDR_IN
) {
5831 if (r
->in
.handle
== NULL
) {
5832 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5834 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5835 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5837 if (flags
& NDR_OUT
) {
5838 if (r
->out
.sdbuf
== NULL
) {
5839 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5841 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sdbuf
));
5842 if (*r
->out
.sdbuf
) {
5843 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5845 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5847 return NDR_ERR_SUCCESS
;
5850 static enum ndr_err_code
ndr_pull_samr_QuerySecurity(struct ndr_pull
*ndr
, int flags
, struct samr_QuerySecurity
*r
)
5852 uint32_t _ptr_sdbuf
;
5853 TALLOC_CTX
*_mem_save_handle_0
;
5854 TALLOC_CTX
*_mem_save_sdbuf_0
;
5855 TALLOC_CTX
*_mem_save_sdbuf_1
;
5856 if (flags
& NDR_IN
) {
5857 ZERO_STRUCT(r
->out
);
5859 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5860 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5862 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5863 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5864 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5865 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5866 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5867 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5868 ZERO_STRUCTP(r
->out
.sdbuf
);
5870 if (flags
& NDR_OUT
) {
5871 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5872 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5874 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5875 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5876 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sdbuf
));
5878 NDR_PULL_ALLOC(ndr
, *r
->out
.sdbuf
);
5880 *r
->out
.sdbuf
= NULL
;
5882 if (*r
->out
.sdbuf
) {
5883 _mem_save_sdbuf_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5884 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sdbuf
, 0);
5885 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5886 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_1
, 0);
5888 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5889 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5891 return NDR_ERR_SUCCESS
;
5894 _PUBLIC_
void ndr_print_samr_QuerySecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QuerySecurity
*r
)
5896 ndr_print_struct(ndr
, name
, "samr_QuerySecurity");
5898 if (flags
& NDR_SET_VALUES
) {
5899 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5901 if (flags
& NDR_IN
) {
5902 ndr_print_struct(ndr
, "in", "samr_QuerySecurity");
5904 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5906 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5908 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5911 if (flags
& NDR_OUT
) {
5912 ndr_print_struct(ndr
, "out", "samr_QuerySecurity");
5914 ndr_print_ptr(ndr
, "sdbuf", r
->out
.sdbuf
);
5916 ndr_print_ptr(ndr
, "sdbuf", *r
->out
.sdbuf
);
5918 if (*r
->out
.sdbuf
) {
5919 ndr_print_sec_desc_buf(ndr
, "sdbuf", *r
->out
.sdbuf
);
5923 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5929 static enum ndr_err_code
ndr_push_samr_Shutdown(struct ndr_push
*ndr
, int flags
, const struct samr_Shutdown
*r
)
5931 if (flags
& NDR_IN
) {
5932 if (r
->in
.connect_handle
== NULL
) {
5933 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5935 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
5937 if (flags
& NDR_OUT
) {
5938 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5940 return NDR_ERR_SUCCESS
;
5943 static enum ndr_err_code
ndr_pull_samr_Shutdown(struct ndr_pull
*ndr
, int flags
, struct samr_Shutdown
*r
)
5945 TALLOC_CTX
*_mem_save_connect_handle_0
;
5946 if (flags
& NDR_IN
) {
5947 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5948 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
5950 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5951 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
5952 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
5953 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5955 if (flags
& NDR_OUT
) {
5956 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5958 return NDR_ERR_SUCCESS
;
5961 _PUBLIC_
void ndr_print_samr_Shutdown(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Shutdown
*r
)
5963 ndr_print_struct(ndr
, name
, "samr_Shutdown");
5965 if (flags
& NDR_SET_VALUES
) {
5966 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5968 if (flags
& NDR_IN
) {
5969 ndr_print_struct(ndr
, "in", "samr_Shutdown");
5971 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
5973 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
5977 if (flags
& NDR_OUT
) {
5978 ndr_print_struct(ndr
, "out", "samr_Shutdown");
5980 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5986 static enum ndr_err_code
ndr_push_samr_LookupDomain(struct ndr_push
*ndr
, int flags
, const struct samr_LookupDomain
*r
)
5988 if (flags
& NDR_IN
) {
5989 if (r
->in
.connect_handle
== NULL
) {
5990 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5992 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
5993 if (r
->in
.domain_name
== NULL
) {
5994 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5996 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_name
));
5998 if (flags
& NDR_OUT
) {
5999 if (r
->out
.sid
== NULL
) {
6000 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6002 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sid
));
6004 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sid
));
6006 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6008 return NDR_ERR_SUCCESS
;
6011 static enum ndr_err_code
ndr_pull_samr_LookupDomain(struct ndr_pull
*ndr
, int flags
, struct samr_LookupDomain
*r
)
6014 TALLOC_CTX
*_mem_save_connect_handle_0
;
6015 TALLOC_CTX
*_mem_save_domain_name_0
;
6016 TALLOC_CTX
*_mem_save_sid_0
;
6017 TALLOC_CTX
*_mem_save_sid_1
;
6018 if (flags
& NDR_IN
) {
6019 ZERO_STRUCT(r
->out
);
6021 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6022 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
6024 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6025 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
6026 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
6027 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6028 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6029 NDR_PULL_ALLOC(ndr
, r
->in
.domain_name
);
6031 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6032 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_name
, LIBNDR_FLAG_REF_ALLOC
);
6033 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_name
));
6034 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, LIBNDR_FLAG_REF_ALLOC
);
6035 NDR_PULL_ALLOC(ndr
, r
->out
.sid
);
6036 ZERO_STRUCTP(r
->out
.sid
);
6038 if (flags
& NDR_OUT
) {
6039 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6040 NDR_PULL_ALLOC(ndr
, r
->out
.sid
);
6042 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6043 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sid
, LIBNDR_FLAG_REF_ALLOC
);
6044 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
6046 NDR_PULL_ALLOC(ndr
, *r
->out
.sid
);
6051 _mem_save_sid_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6052 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sid
, 0);
6053 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sid
));
6054 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_1
, 0);
6056 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
6057 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6059 return NDR_ERR_SUCCESS
;
6062 _PUBLIC_
void ndr_print_samr_LookupDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_LookupDomain
*r
)
6064 ndr_print_struct(ndr
, name
, "samr_LookupDomain");
6066 if (flags
& NDR_SET_VALUES
) {
6067 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6069 if (flags
& NDR_IN
) {
6070 ndr_print_struct(ndr
, "in", "samr_LookupDomain");
6072 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
6074 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
6076 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
6078 ndr_print_lsa_String(ndr
, "domain_name", r
->in
.domain_name
);
6082 if (flags
& NDR_OUT
) {
6083 ndr_print_struct(ndr
, "out", "samr_LookupDomain");
6085 ndr_print_ptr(ndr
, "sid", r
->out
.sid
);
6087 ndr_print_ptr(ndr
, "sid", *r
->out
.sid
);
6090 ndr_print_dom_sid2(ndr
, "sid", *r
->out
.sid
);
6094 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6100 static enum ndr_err_code
ndr_push_samr_EnumDomains(struct ndr_push
*ndr
, int flags
, const struct samr_EnumDomains
*r
)
6102 if (flags
& NDR_IN
) {
6103 if (r
->in
.connect_handle
== NULL
) {
6104 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6106 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
6107 if (r
->in
.resume_handle
== NULL
) {
6108 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6110 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6111 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
6113 if (flags
& NDR_OUT
) {
6114 if (r
->out
.resume_handle
== NULL
) {
6115 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6118 if (r
->out
.sam
== NULL
) {
6119 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6121 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sam
));
6123 NDR_CHECK(ndr_push_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6125 if (r
->out
.num_entries
== NULL
) {
6126 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6128 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_entries
));
6129 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6131 return NDR_ERR_SUCCESS
;
6134 static enum ndr_err_code
ndr_pull_samr_EnumDomains(struct ndr_pull
*ndr
, int flags
, struct samr_EnumDomains
*r
)
6137 TALLOC_CTX
*_mem_save_connect_handle_0
;
6138 TALLOC_CTX
*_mem_save_resume_handle_0
;
6139 TALLOC_CTX
*_mem_save_sam_0
;
6140 TALLOC_CTX
*_mem_save_sam_1
;
6141 TALLOC_CTX
*_mem_save_num_entries_0
;
6142 if (flags
& NDR_IN
) {
6143 ZERO_STRUCT(r
->out
);
6145 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6146 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
6148 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6149 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
6150 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
6151 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6152 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6153 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6155 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6156 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6157 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6158 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6159 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
6160 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6161 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6162 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6163 ZERO_STRUCTP(r
->out
.sam
);
6164 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6165 ZERO_STRUCTP(r
->out
.num_entries
);
6167 if (flags
& NDR_OUT
) {
6168 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6169 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6171 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6172 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6173 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6174 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6175 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6176 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6178 _mem_save_sam_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6179 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sam
, LIBNDR_FLAG_REF_ALLOC
);
6180 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam
));
6182 NDR_PULL_ALLOC(ndr
, *r
->out
.sam
);
6187 _mem_save_sam_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6188 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sam
, 0);
6189 NDR_CHECK(ndr_pull_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6190 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_1
, 0);
6192 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_0
, LIBNDR_FLAG_REF_ALLOC
);
6193 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6194 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6196 _mem_save_num_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6197 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_entries
, LIBNDR_FLAG_REF_ALLOC
);
6198 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_entries
));
6199 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
6200 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6202 return NDR_ERR_SUCCESS
;
6205 _PUBLIC_
void ndr_print_samr_EnumDomains(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_EnumDomains
*r
)
6207 ndr_print_struct(ndr
, name
, "samr_EnumDomains");
6209 if (flags
& NDR_SET_VALUES
) {
6210 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6212 if (flags
& NDR_IN
) {
6213 ndr_print_struct(ndr
, "in", "samr_EnumDomains");
6215 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
6217 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
6219 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6221 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6223 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
6226 if (flags
& NDR_OUT
) {
6227 ndr_print_struct(ndr
, "out", "samr_EnumDomains");
6229 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6231 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6233 ndr_print_ptr(ndr
, "sam", r
->out
.sam
);
6235 ndr_print_ptr(ndr
, "sam", *r
->out
.sam
);
6238 ndr_print_samr_SamArray(ndr
, "sam", *r
->out
.sam
);
6242 ndr_print_ptr(ndr
, "num_entries", r
->out
.num_entries
);
6244 ndr_print_uint32(ndr
, "num_entries", *r
->out
.num_entries
);
6246 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6252 _PUBLIC_
enum ndr_err_code
ndr_push_samr_OpenDomain(struct ndr_push
*ndr
, int flags
, const struct samr_OpenDomain
*r
)
6254 if (flags
& NDR_IN
) {
6255 if (r
->in
.connect_handle
== NULL
) {
6256 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6258 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
6259 NDR_CHECK(ndr_push_samr_DomainAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6260 if (r
->in
.sid
== NULL
) {
6261 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6263 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6265 if (flags
& NDR_OUT
) {
6266 if (r
->out
.domain_handle
== NULL
) {
6267 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6269 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.domain_handle
));
6270 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6272 return NDR_ERR_SUCCESS
;
6275 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_OpenDomain(struct ndr_pull
*ndr
, int flags
, struct samr_OpenDomain
*r
)
6277 TALLOC_CTX
*_mem_save_connect_handle_0
;
6278 TALLOC_CTX
*_mem_save_sid_0
;
6279 TALLOC_CTX
*_mem_save_domain_handle_0
;
6280 if (flags
& NDR_IN
) {
6281 ZERO_STRUCT(r
->out
);
6283 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6284 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
6286 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6287 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
6288 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
6289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6290 NDR_CHECK(ndr_pull_samr_DomainAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6291 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6292 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
6294 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6295 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
6296 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6297 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
6298 NDR_PULL_ALLOC(ndr
, r
->out
.domain_handle
);
6299 ZERO_STRUCTP(r
->out
.domain_handle
);
6301 if (flags
& NDR_OUT
) {
6302 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6303 NDR_PULL_ALLOC(ndr
, r
->out
.domain_handle
);
6305 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6306 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6307 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.domain_handle
));
6308 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6309 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6311 return NDR_ERR_SUCCESS
;
6314 _PUBLIC_
void ndr_print_samr_OpenDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OpenDomain
*r
)
6316 ndr_print_struct(ndr
, name
, "samr_OpenDomain");
6318 if (flags
& NDR_SET_VALUES
) {
6319 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6321 if (flags
& NDR_IN
) {
6322 ndr_print_struct(ndr
, "in", "samr_OpenDomain");
6324 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
6326 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
6328 ndr_print_samr_DomainAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6329 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
6331 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
6335 if (flags
& NDR_OUT
) {
6336 ndr_print_struct(ndr
, "out", "samr_OpenDomain");
6338 ndr_print_ptr(ndr
, "domain_handle", r
->out
.domain_handle
);
6340 ndr_print_policy_handle(ndr
, "domain_handle", r
->out
.domain_handle
);
6342 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6348 static enum ndr_err_code
ndr_push_samr_QueryDomainInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDomainInfo
*r
)
6350 if (flags
& NDR_IN
) {
6351 if (r
->in
.domain_handle
== NULL
) {
6352 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6354 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6355 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr
, NDR_SCALARS
, r
->in
.level
));
6357 if (flags
& NDR_OUT
) {
6358 if (r
->out
.info
== NULL
) {
6359 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6361 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
6363 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
6364 NDR_CHECK(ndr_push_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
6366 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6368 return NDR_ERR_SUCCESS
;
6371 static enum ndr_err_code
ndr_pull_samr_QueryDomainInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDomainInfo
*r
)
6374 TALLOC_CTX
*_mem_save_domain_handle_0
;
6375 TALLOC_CTX
*_mem_save_info_0
;
6376 TALLOC_CTX
*_mem_save_info_1
;
6377 if (flags
& NDR_IN
) {
6378 ZERO_STRUCT(r
->out
);
6380 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6381 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6383 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6384 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6385 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6386 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6387 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr
, NDR_SCALARS
, &r
->in
.level
));
6388 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
6389 ZERO_STRUCTP(r
->out
.info
);
6391 if (flags
& NDR_OUT
) {
6392 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6393 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
6395 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6396 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
6397 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
6399 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
6401 *r
->out
.info
= NULL
;
6404 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6405 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
6406 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
6407 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
6408 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
6410 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6411 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6413 return NDR_ERR_SUCCESS
;
6416 _PUBLIC_
void ndr_print_samr_QueryDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDomainInfo
*r
)
6418 ndr_print_struct(ndr
, name
, "samr_QueryDomainInfo");
6420 if (flags
& NDR_SET_VALUES
) {
6421 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6423 if (flags
& NDR_IN
) {
6424 ndr_print_struct(ndr
, "in", "samr_QueryDomainInfo");
6426 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6428 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6430 ndr_print_samr_DomainInfoClass(ndr
, "level", r
->in
.level
);
6433 if (flags
& NDR_OUT
) {
6434 ndr_print_struct(ndr
, "out", "samr_QueryDomainInfo");
6436 ndr_print_ptr(ndr
, "info", r
->out
.info
);
6438 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
6441 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
6442 ndr_print_samr_DomainInfo(ndr
, "info", *r
->out
.info
);
6446 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6452 static enum ndr_err_code
ndr_push_samr_SetDomainInfo(struct ndr_push
*ndr
, int flags
, const struct samr_SetDomainInfo
*r
)
6454 if (flags
& NDR_IN
) {
6455 if (r
->in
.domain_handle
== NULL
) {
6456 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6458 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6459 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr
, NDR_SCALARS
, r
->in
.level
));
6460 if (r
->in
.info
== NULL
) {
6461 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6463 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
6464 NDR_CHECK(ndr_push_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6466 if (flags
& NDR_OUT
) {
6467 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6469 return NDR_ERR_SUCCESS
;
6472 static enum ndr_err_code
ndr_pull_samr_SetDomainInfo(struct ndr_pull
*ndr
, int flags
, struct samr_SetDomainInfo
*r
)
6474 TALLOC_CTX
*_mem_save_domain_handle_0
;
6475 TALLOC_CTX
*_mem_save_info_0
;
6476 if (flags
& NDR_IN
) {
6477 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6478 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6480 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6481 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6482 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6483 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6484 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr
, NDR_SCALARS
, &r
->in
.level
));
6485 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6486 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6488 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6489 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
6490 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
6491 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6492 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6494 if (flags
& NDR_OUT
) {
6495 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6497 return NDR_ERR_SUCCESS
;
6500 _PUBLIC_
void ndr_print_samr_SetDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetDomainInfo
*r
)
6502 ndr_print_struct(ndr
, name
, "samr_SetDomainInfo");
6504 if (flags
& NDR_SET_VALUES
) {
6505 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6507 if (flags
& NDR_IN
) {
6508 ndr_print_struct(ndr
, "in", "samr_SetDomainInfo");
6510 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6512 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6514 ndr_print_samr_DomainInfoClass(ndr
, "level", r
->in
.level
);
6515 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6517 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
6518 ndr_print_samr_DomainInfo(ndr
, "info", r
->in
.info
);
6522 if (flags
& NDR_OUT
) {
6523 ndr_print_struct(ndr
, "out", "samr_SetDomainInfo");
6525 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6531 static enum ndr_err_code
ndr_push_samr_CreateDomainGroup(struct ndr_push
*ndr
, int flags
, const struct samr_CreateDomainGroup
*r
)
6533 if (flags
& NDR_IN
) {
6534 if (r
->in
.domain_handle
== NULL
) {
6535 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6537 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6538 if (r
->in
.name
== NULL
) {
6539 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6541 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
6542 NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6544 if (flags
& NDR_OUT
) {
6545 if (r
->out
.group_handle
== NULL
) {
6546 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6548 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
6549 if (r
->out
.rid
== NULL
) {
6550 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6552 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
6553 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6555 return NDR_ERR_SUCCESS
;
6558 static enum ndr_err_code
ndr_pull_samr_CreateDomainGroup(struct ndr_pull
*ndr
, int flags
, struct samr_CreateDomainGroup
*r
)
6560 TALLOC_CTX
*_mem_save_domain_handle_0
;
6561 TALLOC_CTX
*_mem_save_name_0
;
6562 TALLOC_CTX
*_mem_save_group_handle_0
;
6563 TALLOC_CTX
*_mem_save_rid_0
;
6564 if (flags
& NDR_IN
) {
6565 ZERO_STRUCT(r
->out
);
6567 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6568 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6570 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6571 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6572 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6573 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6574 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6575 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
6577 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6578 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
6579 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
6580 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
6581 NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6582 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
6583 ZERO_STRUCTP(r
->out
.group_handle
);
6584 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6585 ZERO_STRUCTP(r
->out
.rid
);
6587 if (flags
& NDR_OUT
) {
6588 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6589 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
6591 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6592 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
6593 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
6594 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6595 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6596 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6598 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6599 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
6600 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
6601 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
6602 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6604 return NDR_ERR_SUCCESS
;
6607 _PUBLIC_
void ndr_print_samr_CreateDomainGroup(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_CreateDomainGroup
*r
)
6609 ndr_print_struct(ndr
, name
, "samr_CreateDomainGroup");
6611 if (flags
& NDR_SET_VALUES
) {
6612 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6614 if (flags
& NDR_IN
) {
6615 ndr_print_struct(ndr
, "in", "samr_CreateDomainGroup");
6617 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6619 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6621 ndr_print_ptr(ndr
, "name", r
->in
.name
);
6623 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
6625 ndr_print_samr_GroupAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6628 if (flags
& NDR_OUT
) {
6629 ndr_print_struct(ndr
, "out", "samr_CreateDomainGroup");
6631 ndr_print_ptr(ndr
, "group_handle", r
->out
.group_handle
);
6633 ndr_print_policy_handle(ndr
, "group_handle", r
->out
.group_handle
);
6635 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
6637 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
6639 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6645 static enum ndr_err_code
ndr_push_samr_EnumDomainGroups(struct ndr_push
*ndr
, int flags
, const struct samr_EnumDomainGroups
*r
)
6647 if (flags
& NDR_IN
) {
6648 if (r
->in
.domain_handle
== NULL
) {
6649 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6651 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6652 if (r
->in
.resume_handle
== NULL
) {
6653 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6655 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6656 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
6658 if (flags
& NDR_OUT
) {
6659 if (r
->out
.resume_handle
== NULL
) {
6660 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6662 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6663 if (r
->out
.sam
== NULL
) {
6664 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6666 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sam
));
6668 NDR_CHECK(ndr_push_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6670 if (r
->out
.num_entries
== NULL
) {
6671 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6673 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_entries
));
6674 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6676 return NDR_ERR_SUCCESS
;
6679 static enum ndr_err_code
ndr_pull_samr_EnumDomainGroups(struct ndr_pull
*ndr
, int flags
, struct samr_EnumDomainGroups
*r
)
6682 TALLOC_CTX
*_mem_save_domain_handle_0
;
6683 TALLOC_CTX
*_mem_save_resume_handle_0
;
6684 TALLOC_CTX
*_mem_save_sam_0
;
6685 TALLOC_CTX
*_mem_save_sam_1
;
6686 TALLOC_CTX
*_mem_save_num_entries_0
;
6687 if (flags
& NDR_IN
) {
6688 ZERO_STRUCT(r
->out
);
6690 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6691 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6693 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6694 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6695 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6696 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6697 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6698 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6700 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6701 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6702 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6703 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6704 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
6705 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6706 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6707 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6708 ZERO_STRUCTP(r
->out
.sam
);
6709 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6710 ZERO_STRUCTP(r
->out
.num_entries
);
6712 if (flags
& NDR_OUT
) {
6713 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6714 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6716 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6717 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6718 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6719 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6720 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6721 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6723 _mem_save_sam_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6724 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sam
, LIBNDR_FLAG_REF_ALLOC
);
6725 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam
));
6727 NDR_PULL_ALLOC(ndr
, *r
->out
.sam
);
6732 _mem_save_sam_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6733 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sam
, 0);
6734 NDR_CHECK(ndr_pull_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6735 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_1
, 0);
6737 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_0
, LIBNDR_FLAG_REF_ALLOC
);
6738 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6739 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6741 _mem_save_num_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6742 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_entries
, LIBNDR_FLAG_REF_ALLOC
);
6743 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_entries
));
6744 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
6745 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6747 return NDR_ERR_SUCCESS
;
6750 _PUBLIC_
void ndr_print_samr_EnumDomainGroups(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_EnumDomainGroups
*r
)
6752 ndr_print_struct(ndr
, name
, "samr_EnumDomainGroups");
6754 if (flags
& NDR_SET_VALUES
) {
6755 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6757 if (flags
& NDR_IN
) {
6758 ndr_print_struct(ndr
, "in", "samr_EnumDomainGroups");
6760 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6762 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6764 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6766 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6768 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
6771 if (flags
& NDR_OUT
) {
6772 ndr_print_struct(ndr
, "out", "samr_EnumDomainGroups");
6774 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6776 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6778 ndr_print_ptr(ndr
, "sam", r
->out
.sam
);
6780 ndr_print_ptr(ndr
, "sam", *r
->out
.sam
);
6783 ndr_print_samr_SamArray(ndr
, "sam", *r
->out
.sam
);
6787 ndr_print_ptr(ndr
, "num_entries", r
->out
.num_entries
);
6789 ndr_print_uint32(ndr
, "num_entries", *r
->out
.num_entries
);
6791 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6797 static enum ndr_err_code
ndr_push_samr_CreateUser(struct ndr_push
*ndr
, int flags
, const struct samr_CreateUser
*r
)
6799 if (flags
& NDR_IN
) {
6800 if (r
->in
.domain_handle
== NULL
) {
6801 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6803 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6804 if (r
->in
.account_name
== NULL
) {
6805 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6807 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account_name
));
6808 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6810 if (flags
& NDR_OUT
) {
6811 if (r
->out
.user_handle
== NULL
) {
6812 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6814 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
6815 if (r
->out
.rid
== NULL
) {
6816 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6818 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
6819 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6821 return NDR_ERR_SUCCESS
;
6824 static enum ndr_err_code
ndr_pull_samr_CreateUser(struct ndr_pull
*ndr
, int flags
, struct samr_CreateUser
*r
)
6826 TALLOC_CTX
*_mem_save_domain_handle_0
;
6827 TALLOC_CTX
*_mem_save_account_name_0
;
6828 TALLOC_CTX
*_mem_save_user_handle_0
;
6829 TALLOC_CTX
*_mem_save_rid_0
;
6830 if (flags
& NDR_IN
) {
6831 ZERO_STRUCT(r
->out
);
6833 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6834 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6836 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6837 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6838 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6839 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6840 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6841 NDR_PULL_ALLOC(ndr
, r
->in
.account_name
);
6843 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6844 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
6845 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account_name
));
6846 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
6847 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6848 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
6849 ZERO_STRUCTP(r
->out
.user_handle
);
6850 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6851 ZERO_STRUCTP(r
->out
.rid
);
6853 if (flags
& NDR_OUT
) {
6854 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6855 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
6857 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6858 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
6859 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
6860 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6861 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6862 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6864 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6865 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
6866 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
6867 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
6868 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6870 return NDR_ERR_SUCCESS
;
6873 _PUBLIC_
void ndr_print_samr_CreateUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_CreateUser
*r
)
6875 ndr_print_struct(ndr
, name
, "samr_CreateUser");
6877 if (flags
& NDR_SET_VALUES
) {
6878 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6880 if (flags
& NDR_IN
) {
6881 ndr_print_struct(ndr
, "in", "samr_CreateUser");
6883 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6885 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6887 ndr_print_ptr(ndr
, "account_name", r
->in
.account_name
);
6889 ndr_print_lsa_String(ndr
, "account_name", r
->in
.account_name
);
6891 ndr_print_samr_UserAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6894 if (flags
& NDR_OUT
) {
6895 ndr_print_struct(ndr
, "out", "samr_CreateUser");
6897 ndr_print_ptr(ndr
, "user_handle", r
->out
.user_handle
);
6899 ndr_print_policy_handle(ndr
, "user_handle", r
->out
.user_handle
);
6901 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
6903 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
6905 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6911 static enum ndr_err_code
ndr_push_samr_EnumDomainUsers(struct ndr_push
*ndr
, int flags
, const struct samr_EnumDomainUsers
*r
)
6913 if (flags
& NDR_IN
) {
6914 if (r
->in
.domain_handle
== NULL
) {
6915 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6917 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6918 if (r
->in
.resume_handle
== NULL
) {
6919 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6921 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6922 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->in
.acct_flags
));
6923 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
6925 if (flags
& NDR_OUT
) {
6926 if (r
->out
.resume_handle
== NULL
) {
6927 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6929 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6930 if (r
->out
.sam
== NULL
) {
6931 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6933 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sam
));
6935 NDR_CHECK(ndr_push_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6937 if (r
->out
.num_entries
== NULL
) {
6938 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6940 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_entries
));
6941 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6943 return NDR_ERR_SUCCESS
;
6946 static enum ndr_err_code
ndr_pull_samr_EnumDomainUsers(struct ndr_pull
*ndr
, int flags
, struct samr_EnumDomainUsers
*r
)
6949 TALLOC_CTX
*_mem_save_domain_handle_0
;
6950 TALLOC_CTX
*_mem_save_resume_handle_0
;
6951 TALLOC_CTX
*_mem_save_sam_0
;
6952 TALLOC_CTX
*_mem_save_sam_1
;
6953 TALLOC_CTX
*_mem_save_num_entries_0
;
6954 if (flags
& NDR_IN
) {
6955 ZERO_STRUCT(r
->out
);
6957 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6958 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6960 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6961 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6962 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6963 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6964 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6965 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6967 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6968 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6969 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6970 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6971 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->in
.acct_flags
));
6972 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
6973 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6974 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6975 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6976 ZERO_STRUCTP(r
->out
.sam
);
6977 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6978 ZERO_STRUCTP(r
->out
.num_entries
);
6980 if (flags
& NDR_OUT
) {
6981 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6982 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6984 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6985 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6986 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6987 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6988 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6989 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6991 _mem_save_sam_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6992 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sam
, LIBNDR_FLAG_REF_ALLOC
);
6993 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam
));
6995 NDR_PULL_ALLOC(ndr
, *r
->out
.sam
);
7000 _mem_save_sam_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7001 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sam
, 0);
7002 NDR_CHECK(ndr_pull_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
7003 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_1
, 0);
7005 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_0
, LIBNDR_FLAG_REF_ALLOC
);
7006 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7007 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
7009 _mem_save_num_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7010 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_entries
, LIBNDR_FLAG_REF_ALLOC
);
7011 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_entries
));
7012 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
7013 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7015 return NDR_ERR_SUCCESS
;
7018 _PUBLIC_
void ndr_print_samr_EnumDomainUsers(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_EnumDomainUsers
*r
)
7020 ndr_print_struct(ndr
, name
, "samr_EnumDomainUsers");
7022 if (flags
& NDR_SET_VALUES
) {
7023 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7025 if (flags
& NDR_IN
) {
7026 ndr_print_struct(ndr
, "in", "samr_EnumDomainUsers");
7028 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7030 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7032 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
7034 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
7036 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->in
.acct_flags
);
7037 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
7040 if (flags
& NDR_OUT
) {
7041 ndr_print_struct(ndr
, "out", "samr_EnumDomainUsers");
7043 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
7045 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
7047 ndr_print_ptr(ndr
, "sam", r
->out
.sam
);
7049 ndr_print_ptr(ndr
, "sam", *r
->out
.sam
);
7052 ndr_print_samr_SamArray(ndr
, "sam", *r
->out
.sam
);
7056 ndr_print_ptr(ndr
, "num_entries", r
->out
.num_entries
);
7058 ndr_print_uint32(ndr
, "num_entries", *r
->out
.num_entries
);
7060 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7066 static enum ndr_err_code
ndr_push_samr_CreateDomAlias(struct ndr_push
*ndr
, int flags
, const struct samr_CreateDomAlias
*r
)
7068 if (flags
& NDR_IN
) {
7069 if (r
->in
.domain_handle
== NULL
) {
7070 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7072 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7073 if (r
->in
.alias_name
== NULL
) {
7074 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7076 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.alias_name
));
7077 NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7079 if (flags
& NDR_OUT
) {
7080 if (r
->out
.alias_handle
== NULL
) {
7081 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7083 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
7084 if (r
->out
.rid
== NULL
) {
7085 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7087 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
7088 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7090 return NDR_ERR_SUCCESS
;
7093 static enum ndr_err_code
ndr_pull_samr_CreateDomAlias(struct ndr_pull
*ndr
, int flags
, struct samr_CreateDomAlias
*r
)
7095 TALLOC_CTX
*_mem_save_domain_handle_0
;
7096 TALLOC_CTX
*_mem_save_alias_name_0
;
7097 TALLOC_CTX
*_mem_save_alias_handle_0
;
7098 TALLOC_CTX
*_mem_save_rid_0
;
7099 if (flags
& NDR_IN
) {
7100 ZERO_STRUCT(r
->out
);
7102 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7103 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7105 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7106 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7107 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7108 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7109 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7110 NDR_PULL_ALLOC(ndr
, r
->in
.alias_name
);
7112 _mem_save_alias_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7113 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_name
, LIBNDR_FLAG_REF_ALLOC
);
7114 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.alias_name
));
7115 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_name_0
, LIBNDR_FLAG_REF_ALLOC
);
7116 NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7117 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
7118 ZERO_STRUCTP(r
->out
.alias_handle
);
7119 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
7120 ZERO_STRUCTP(r
->out
.rid
);
7122 if (flags
& NDR_OUT
) {
7123 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7124 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
7126 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7127 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
7128 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
7129 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7130 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7131 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
7133 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7134 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
7135 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
7136 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
7137 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7139 return NDR_ERR_SUCCESS
;
7142 _PUBLIC_
void ndr_print_samr_CreateDomAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_CreateDomAlias
*r
)
7144 ndr_print_struct(ndr
, name
, "samr_CreateDomAlias");
7146 if (flags
& NDR_SET_VALUES
) {
7147 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7149 if (flags
& NDR_IN
) {
7150 ndr_print_struct(ndr
, "in", "samr_CreateDomAlias");
7152 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7154 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7156 ndr_print_ptr(ndr
, "alias_name", r
->in
.alias_name
);
7158 ndr_print_lsa_String(ndr
, "alias_name", r
->in
.alias_name
);
7160 ndr_print_samr_AliasAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7163 if (flags
& NDR_OUT
) {
7164 ndr_print_struct(ndr
, "out", "samr_CreateDomAlias");
7166 ndr_print_ptr(ndr
, "alias_handle", r
->out
.alias_handle
);
7168 ndr_print_policy_handle(ndr
, "alias_handle", r
->out
.alias_handle
);
7170 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
7172 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
7174 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7180 static enum ndr_err_code
ndr_push_samr_EnumDomainAliases(struct ndr_push
*ndr
, int flags
, const struct samr_EnumDomainAliases
*r
)
7182 if (flags
& NDR_IN
) {
7183 if (r
->in
.domain_handle
== NULL
) {
7184 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7186 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7187 if (r
->in
.resume_handle
== NULL
) {
7188 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7190 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
7191 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
7193 if (flags
& NDR_OUT
) {
7194 if (r
->out
.resume_handle
== NULL
) {
7195 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7197 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
7198 if (r
->out
.sam
== NULL
) {
7199 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7201 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sam
));
7203 NDR_CHECK(ndr_push_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
7205 if (r
->out
.num_entries
== NULL
) {
7206 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7208 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_entries
));
7209 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7211 return NDR_ERR_SUCCESS
;
7214 static enum ndr_err_code
ndr_pull_samr_EnumDomainAliases(struct ndr_pull
*ndr
, int flags
, struct samr_EnumDomainAliases
*r
)
7217 TALLOC_CTX
*_mem_save_domain_handle_0
;
7218 TALLOC_CTX
*_mem_save_resume_handle_0
;
7219 TALLOC_CTX
*_mem_save_sam_0
;
7220 TALLOC_CTX
*_mem_save_sam_1
;
7221 TALLOC_CTX
*_mem_save_num_entries_0
;
7222 if (flags
& NDR_IN
) {
7223 ZERO_STRUCT(r
->out
);
7225 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7226 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7228 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7229 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7230 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7231 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7232 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7233 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
7235 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7236 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
7237 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
7238 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7239 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
7240 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
7241 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
7242 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
7243 ZERO_STRUCTP(r
->out
.sam
);
7244 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
7245 ZERO_STRUCTP(r
->out
.num_entries
);
7247 if (flags
& NDR_OUT
) {
7248 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7249 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
7251 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7252 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
7253 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
7254 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7255 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7256 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
7258 _mem_save_sam_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7259 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sam
, LIBNDR_FLAG_REF_ALLOC
);
7260 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam
));
7262 NDR_PULL_ALLOC(ndr
, *r
->out
.sam
);
7267 _mem_save_sam_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7268 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sam
, 0);
7269 NDR_CHECK(ndr_pull_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
7270 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_1
, 0);
7272 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_0
, LIBNDR_FLAG_REF_ALLOC
);
7273 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7274 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
7276 _mem_save_num_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7277 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_entries
, LIBNDR_FLAG_REF_ALLOC
);
7278 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_entries
));
7279 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
7280 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7282 return NDR_ERR_SUCCESS
;
7285 _PUBLIC_
void ndr_print_samr_EnumDomainAliases(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_EnumDomainAliases
*r
)
7287 ndr_print_struct(ndr
, name
, "samr_EnumDomainAliases");
7289 if (flags
& NDR_SET_VALUES
) {
7290 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7292 if (flags
& NDR_IN
) {
7293 ndr_print_struct(ndr
, "in", "samr_EnumDomainAliases");
7295 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7297 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7299 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
7301 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
7303 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
7306 if (flags
& NDR_OUT
) {
7307 ndr_print_struct(ndr
, "out", "samr_EnumDomainAliases");
7309 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
7311 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
7313 ndr_print_ptr(ndr
, "sam", r
->out
.sam
);
7315 ndr_print_ptr(ndr
, "sam", *r
->out
.sam
);
7318 ndr_print_samr_SamArray(ndr
, "sam", *r
->out
.sam
);
7322 ndr_print_ptr(ndr
, "num_entries", r
->out
.num_entries
);
7324 ndr_print_uint32(ndr
, "num_entries", *r
->out
.num_entries
);
7326 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7332 static enum ndr_err_code
ndr_push_samr_GetAliasMembership(struct ndr_push
*ndr
, int flags
, const struct samr_GetAliasMembership
*r
)
7334 if (flags
& NDR_IN
) {
7335 if (r
->in
.domain_handle
== NULL
) {
7336 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7338 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7339 if (r
->in
.sids
== NULL
) {
7340 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7342 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
7344 if (flags
& NDR_OUT
) {
7345 if (r
->out
.rids
== NULL
) {
7346 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7348 NDR_CHECK(ndr_push_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rids
));
7349 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7351 return NDR_ERR_SUCCESS
;
7354 static enum ndr_err_code
ndr_pull_samr_GetAliasMembership(struct ndr_pull
*ndr
, int flags
, struct samr_GetAliasMembership
*r
)
7356 TALLOC_CTX
*_mem_save_domain_handle_0
;
7357 TALLOC_CTX
*_mem_save_sids_0
;
7358 TALLOC_CTX
*_mem_save_rids_0
;
7359 if (flags
& NDR_IN
) {
7360 ZERO_STRUCT(r
->out
);
7362 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7363 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7365 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7366 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7367 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7368 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7369 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7370 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
7372 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7373 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
7374 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
7375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
7376 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
7377 ZERO_STRUCTP(r
->out
.rids
);
7379 if (flags
& NDR_OUT
) {
7380 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7381 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
7383 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7384 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rids
, LIBNDR_FLAG_REF_ALLOC
);
7385 NDR_CHECK(ndr_pull_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rids
));
7386 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, LIBNDR_FLAG_REF_ALLOC
);
7387 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7389 return NDR_ERR_SUCCESS
;
7392 _PUBLIC_
void ndr_print_samr_GetAliasMembership(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetAliasMembership
*r
)
7394 ndr_print_struct(ndr
, name
, "samr_GetAliasMembership");
7396 if (flags
& NDR_SET_VALUES
) {
7397 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7399 if (flags
& NDR_IN
) {
7400 ndr_print_struct(ndr
, "in", "samr_GetAliasMembership");
7402 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7404 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7406 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
7408 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
7412 if (flags
& NDR_OUT
) {
7413 ndr_print_struct(ndr
, "out", "samr_GetAliasMembership");
7415 ndr_print_ptr(ndr
, "rids", r
->out
.rids
);
7417 ndr_print_samr_Ids(ndr
, "rids", r
->out
.rids
);
7419 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7425 _PUBLIC_
enum ndr_err_code
ndr_push_samr_LookupNames(struct ndr_push
*ndr
, int flags
, const struct samr_LookupNames
*r
)
7427 uint32_t cntr_names_0
;
7428 if (flags
& NDR_IN
) {
7429 if (r
->in
.domain_handle
== NULL
) {
7430 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7432 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7433 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
7434 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 1000));
7435 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7436 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.num_names
));
7437 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
7438 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
7440 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
7441 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
7444 if (flags
& NDR_OUT
) {
7445 if (r
->out
.rids
== NULL
) {
7446 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7448 NDR_CHECK(ndr_push_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rids
));
7449 if (r
->out
.types
== NULL
) {
7450 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7452 NDR_CHECK(ndr_push_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.types
));
7453 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7455 return NDR_ERR_SUCCESS
;
7458 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_LookupNames(struct ndr_pull
*ndr
, int flags
, struct samr_LookupNames
*r
)
7460 uint32_t cntr_names_0
;
7461 TALLOC_CTX
*_mem_save_domain_handle_0
;
7462 TALLOC_CTX
*_mem_save_names_0
;
7463 TALLOC_CTX
*_mem_save_rids_0
;
7464 TALLOC_CTX
*_mem_save_types_0
;
7465 if (flags
& NDR_IN
) {
7466 ZERO_STRUCT(r
->out
);
7468 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7469 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7471 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7472 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7473 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7474 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7475 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
7476 if (r
->in
.num_names
> 1000) {
7477 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7479 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
7480 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.names
));
7481 if (ndr_get_array_length(ndr
, &r
->in
.names
) > ndr_get_array_size(ndr
, &r
->in
.names
)) {
7482 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.names
), ndr_get_array_length(ndr
, &r
->in
.names
));
7484 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
7485 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7486 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
7487 for (cntr_names_0
= 0; cntr_names_0
< ndr_get_array_length(ndr
, &r
->in
.names
); cntr_names_0
++) {
7488 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
7490 for (cntr_names_0
= 0; cntr_names_0
< ndr_get_array_length(ndr
, &r
->in
.names
); cntr_names_0
++) {
7491 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
7493 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
7494 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
7495 ZERO_STRUCTP(r
->out
.rids
);
7496 NDR_PULL_ALLOC(ndr
, r
->out
.types
);
7497 ZERO_STRUCTP(r
->out
.types
);
7499 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, 1000));
7502 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
7505 if (flags
& NDR_OUT
) {
7506 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7507 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
7509 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7510 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rids
, LIBNDR_FLAG_REF_ALLOC
);
7511 NDR_CHECK(ndr_pull_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rids
));
7512 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, LIBNDR_FLAG_REF_ALLOC
);
7513 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7514 NDR_PULL_ALLOC(ndr
, r
->out
.types
);
7516 _mem_save_types_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7517 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.types
, LIBNDR_FLAG_REF_ALLOC
);
7518 NDR_CHECK(ndr_pull_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.types
));
7519 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_0
, LIBNDR_FLAG_REF_ALLOC
);
7520 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7522 return NDR_ERR_SUCCESS
;
7525 _PUBLIC_
void ndr_print_samr_LookupNames(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_LookupNames
*r
)
7527 uint32_t cntr_names_0
;
7528 ndr_print_struct(ndr
, name
, "samr_LookupNames");
7530 if (flags
& NDR_SET_VALUES
) {
7531 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7533 if (flags
& NDR_IN
) {
7534 ndr_print_struct(ndr
, "in", "samr_LookupNames");
7536 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7538 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7540 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
7541 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
7543 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
7545 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
7546 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
7553 if (flags
& NDR_OUT
) {
7554 ndr_print_struct(ndr
, "out", "samr_LookupNames");
7556 ndr_print_ptr(ndr
, "rids", r
->out
.rids
);
7558 ndr_print_samr_Ids(ndr
, "rids", r
->out
.rids
);
7560 ndr_print_ptr(ndr
, "types", r
->out
.types
);
7562 ndr_print_samr_Ids(ndr
, "types", r
->out
.types
);
7564 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7570 static enum ndr_err_code
ndr_push_samr_LookupRids(struct ndr_push
*ndr
, int flags
, const struct samr_LookupRids
*r
)
7572 uint32_t cntr_rids_0
;
7573 if (flags
& NDR_IN
) {
7574 if (r
->in
.domain_handle
== NULL
) {
7575 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7577 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7578 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_rids
));
7579 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 1000));
7580 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7581 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.num_rids
));
7582 for (cntr_rids_0
= 0; cntr_rids_0
< r
->in
.num_rids
; cntr_rids_0
++) {
7583 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rids
[cntr_rids_0
]));
7586 if (flags
& NDR_OUT
) {
7587 if (r
->out
.names
== NULL
) {
7588 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7590 NDR_CHECK(ndr_push_lsa_Strings(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
7591 if (r
->out
.types
== NULL
) {
7592 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7594 NDR_CHECK(ndr_push_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.types
));
7595 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7597 return NDR_ERR_SUCCESS
;
7600 static enum ndr_err_code
ndr_pull_samr_LookupRids(struct ndr_pull
*ndr
, int flags
, struct samr_LookupRids
*r
)
7602 uint32_t cntr_rids_0
;
7603 TALLOC_CTX
*_mem_save_domain_handle_0
;
7604 TALLOC_CTX
*_mem_save_rids_0
;
7605 TALLOC_CTX
*_mem_save_names_0
;
7606 TALLOC_CTX
*_mem_save_types_0
;
7607 if (flags
& NDR_IN
) {
7608 ZERO_STRUCT(r
->out
);
7610 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7611 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7613 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7614 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7615 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7616 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7617 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_rids
));
7618 if (r
->in
.num_rids
> 1000) {
7619 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7621 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rids
));
7622 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rids
));
7623 if (ndr_get_array_length(ndr
, &r
->in
.rids
) > ndr_get_array_size(ndr
, &r
->in
.rids
)) {
7624 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.rids
), ndr_get_array_length(ndr
, &r
->in
.rids
));
7626 NDR_PULL_ALLOC_N(ndr
, r
->in
.rids
, ndr_get_array_size(ndr
, &r
->in
.rids
));
7627 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7628 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rids
, 0);
7629 for (cntr_rids_0
= 0; cntr_rids_0
< ndr_get_array_length(ndr
, &r
->in
.rids
); cntr_rids_0
++) {
7630 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rids
[cntr_rids_0
]));
7632 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, 0);
7633 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
7634 ZERO_STRUCTP(r
->out
.names
);
7635 NDR_PULL_ALLOC(ndr
, r
->out
.types
);
7636 ZERO_STRUCTP(r
->out
.types
);
7638 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.rids
, 1000));
7641 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->in
.rids
, r
->in
.num_rids
));
7644 if (flags
& NDR_OUT
) {
7645 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7646 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
7648 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7649 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
7650 NDR_CHECK(ndr_pull_lsa_Strings(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
7651 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
7652 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7653 NDR_PULL_ALLOC(ndr
, r
->out
.types
);
7655 _mem_save_types_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7656 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.types
, LIBNDR_FLAG_REF_ALLOC
);
7657 NDR_CHECK(ndr_pull_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.types
));
7658 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_0
, LIBNDR_FLAG_REF_ALLOC
);
7659 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7661 return NDR_ERR_SUCCESS
;
7664 _PUBLIC_
void ndr_print_samr_LookupRids(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_LookupRids
*r
)
7666 uint32_t cntr_rids_0
;
7667 ndr_print_struct(ndr
, name
, "samr_LookupRids");
7669 if (flags
& NDR_SET_VALUES
) {
7670 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7672 if (flags
& NDR_IN
) {
7673 ndr_print_struct(ndr
, "in", "samr_LookupRids");
7675 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7677 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7679 ndr_print_uint32(ndr
, "num_rids", r
->in
.num_rids
);
7680 ndr
->print(ndr
, "%s: ARRAY(%d)", "rids", (int)r
->in
.num_rids
);
7682 for (cntr_rids_0
=0;cntr_rids_0
<r
->in
.num_rids
;cntr_rids_0
++) {
7684 if (asprintf(&idx_0
, "[%d]", cntr_rids_0
) != -1) {
7685 ndr_print_uint32(ndr
, "rids", r
->in
.rids
[cntr_rids_0
]);
7692 if (flags
& NDR_OUT
) {
7693 ndr_print_struct(ndr
, "out", "samr_LookupRids");
7695 ndr_print_ptr(ndr
, "names", r
->out
.names
);
7697 ndr_print_lsa_Strings(ndr
, "names", r
->out
.names
);
7699 ndr_print_ptr(ndr
, "types", r
->out
.types
);
7701 ndr_print_samr_Ids(ndr
, "types", r
->out
.types
);
7703 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7709 static enum ndr_err_code
ndr_push_samr_OpenGroup(struct ndr_push
*ndr
, int flags
, const struct samr_OpenGroup
*r
)
7711 if (flags
& NDR_IN
) {
7712 if (r
->in
.domain_handle
== NULL
) {
7713 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7715 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7716 NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
7719 if (flags
& NDR_OUT
) {
7720 if (r
->out
.group_handle
== NULL
) {
7721 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7723 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
7724 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7726 return NDR_ERR_SUCCESS
;
7729 static enum ndr_err_code
ndr_pull_samr_OpenGroup(struct ndr_pull
*ndr
, int flags
, struct samr_OpenGroup
*r
)
7731 TALLOC_CTX
*_mem_save_domain_handle_0
;
7732 TALLOC_CTX
*_mem_save_group_handle_0
;
7733 if (flags
& NDR_IN
) {
7734 ZERO_STRUCT(r
->out
);
7736 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7737 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7739 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7740 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7741 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7742 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7743 NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7744 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
7745 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
7746 ZERO_STRUCTP(r
->out
.group_handle
);
7748 if (flags
& NDR_OUT
) {
7749 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7750 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
7752 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7753 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7754 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
7755 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7756 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7758 return NDR_ERR_SUCCESS
;
7761 _PUBLIC_
void ndr_print_samr_OpenGroup(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OpenGroup
*r
)
7763 ndr_print_struct(ndr
, name
, "samr_OpenGroup");
7765 if (flags
& NDR_SET_VALUES
) {
7766 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7768 if (flags
& NDR_IN
) {
7769 ndr_print_struct(ndr
, "in", "samr_OpenGroup");
7771 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7773 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7775 ndr_print_samr_GroupAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7776 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
7779 if (flags
& NDR_OUT
) {
7780 ndr_print_struct(ndr
, "out", "samr_OpenGroup");
7782 ndr_print_ptr(ndr
, "group_handle", r
->out
.group_handle
);
7784 ndr_print_policy_handle(ndr
, "group_handle", r
->out
.group_handle
);
7786 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7792 static enum ndr_err_code
ndr_push_samr_QueryGroupInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryGroupInfo
*r
)
7794 if (flags
& NDR_IN
) {
7795 if (r
->in
.group_handle
== NULL
) {
7796 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7798 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7799 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7801 if (flags
& NDR_OUT
) {
7802 if (r
->out
.info
== NULL
) {
7803 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7805 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
7807 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7808 NDR_CHECK(ndr_push_samr_GroupInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7810 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7812 return NDR_ERR_SUCCESS
;
7815 static enum ndr_err_code
ndr_pull_samr_QueryGroupInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryGroupInfo
*r
)
7818 TALLOC_CTX
*_mem_save_group_handle_0
;
7819 TALLOC_CTX
*_mem_save_info_0
;
7820 TALLOC_CTX
*_mem_save_info_1
;
7821 if (flags
& NDR_IN
) {
7822 ZERO_STRUCT(r
->out
);
7824 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7825 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
7827 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7828 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7829 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7830 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7831 NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7832 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7833 ZERO_STRUCTP(r
->out
.info
);
7835 if (flags
& NDR_OUT
) {
7836 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7837 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7839 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7840 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
7841 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
7843 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
7845 *r
->out
.info
= NULL
;
7848 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7849 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
7850 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7851 NDR_CHECK(ndr_pull_samr_GroupInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7852 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
7854 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7855 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7857 return NDR_ERR_SUCCESS
;
7860 _PUBLIC_
void ndr_print_samr_QueryGroupInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryGroupInfo
*r
)
7862 ndr_print_struct(ndr
, name
, "samr_QueryGroupInfo");
7864 if (flags
& NDR_SET_VALUES
) {
7865 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7867 if (flags
& NDR_IN
) {
7868 ndr_print_struct(ndr
, "in", "samr_QueryGroupInfo");
7870 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
7872 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
7874 ndr_print_samr_GroupInfoEnum(ndr
, "level", r
->in
.level
);
7877 if (flags
& NDR_OUT
) {
7878 ndr_print_struct(ndr
, "out", "samr_QueryGroupInfo");
7880 ndr_print_ptr(ndr
, "info", r
->out
.info
);
7882 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
7885 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
7886 ndr_print_samr_GroupInfo(ndr
, "info", *r
->out
.info
);
7890 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7896 static enum ndr_err_code
ndr_push_samr_SetGroupInfo(struct ndr_push
*ndr
, int flags
, const struct samr_SetGroupInfo
*r
)
7898 if (flags
& NDR_IN
) {
7899 if (r
->in
.group_handle
== NULL
) {
7900 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7902 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7903 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7904 if (r
->in
.info
== NULL
) {
7905 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7907 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7908 NDR_CHECK(ndr_push_samr_GroupInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7910 if (flags
& NDR_OUT
) {
7911 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7913 return NDR_ERR_SUCCESS
;
7916 static enum ndr_err_code
ndr_pull_samr_SetGroupInfo(struct ndr_pull
*ndr
, int flags
, struct samr_SetGroupInfo
*r
)
7918 TALLOC_CTX
*_mem_save_group_handle_0
;
7919 TALLOC_CTX
*_mem_save_info_0
;
7920 if (flags
& NDR_IN
) {
7921 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7922 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
7924 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7925 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7926 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7927 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7928 NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7929 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7930 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
7932 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7933 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
7934 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7935 NDR_CHECK(ndr_pull_samr_GroupInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7938 if (flags
& NDR_OUT
) {
7939 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7941 return NDR_ERR_SUCCESS
;
7944 _PUBLIC_
void ndr_print_samr_SetGroupInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetGroupInfo
*r
)
7946 ndr_print_struct(ndr
, name
, "samr_SetGroupInfo");
7948 if (flags
& NDR_SET_VALUES
) {
7949 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7951 if (flags
& NDR_IN
) {
7952 ndr_print_struct(ndr
, "in", "samr_SetGroupInfo");
7954 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
7956 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
7958 ndr_print_samr_GroupInfoEnum(ndr
, "level", r
->in
.level
);
7959 ndr_print_ptr(ndr
, "info", r
->in
.info
);
7961 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
7962 ndr_print_samr_GroupInfo(ndr
, "info", r
->in
.info
);
7966 if (flags
& NDR_OUT
) {
7967 ndr_print_struct(ndr
, "out", "samr_SetGroupInfo");
7969 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7975 static enum ndr_err_code
ndr_push_samr_AddGroupMember(struct ndr_push
*ndr
, int flags
, const struct samr_AddGroupMember
*r
)
7977 if (flags
& NDR_IN
) {
7978 if (r
->in
.group_handle
== NULL
) {
7979 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7981 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7982 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
7983 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
7985 if (flags
& NDR_OUT
) {
7986 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7988 return NDR_ERR_SUCCESS
;
7991 static enum ndr_err_code
ndr_pull_samr_AddGroupMember(struct ndr_pull
*ndr
, int flags
, struct samr_AddGroupMember
*r
)
7993 TALLOC_CTX
*_mem_save_group_handle_0
;
7994 if (flags
& NDR_IN
) {
7995 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7996 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
7998 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7999 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
8000 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8001 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8002 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
8003 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
8005 if (flags
& NDR_OUT
) {
8006 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8008 return NDR_ERR_SUCCESS
;
8011 _PUBLIC_
void ndr_print_samr_AddGroupMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_AddGroupMember
*r
)
8013 ndr_print_struct(ndr
, name
, "samr_AddGroupMember");
8015 if (flags
& NDR_SET_VALUES
) {
8016 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8018 if (flags
& NDR_IN
) {
8019 ndr_print_struct(ndr
, "in", "samr_AddGroupMember");
8021 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
8023 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
8025 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
8026 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
8029 if (flags
& NDR_OUT
) {
8030 ndr_print_struct(ndr
, "out", "samr_AddGroupMember");
8032 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8038 static enum ndr_err_code
ndr_push_samr_DeleteDomainGroup(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteDomainGroup
*r
)
8040 if (flags
& NDR_IN
) {
8041 if (r
->in
.group_handle
== NULL
) {
8042 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8044 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8046 if (flags
& NDR_OUT
) {
8047 if (r
->out
.group_handle
== NULL
) {
8048 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8050 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
8051 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8053 return NDR_ERR_SUCCESS
;
8056 static enum ndr_err_code
ndr_pull_samr_DeleteDomainGroup(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteDomainGroup
*r
)
8058 TALLOC_CTX
*_mem_save_group_handle_0
;
8059 if (flags
& NDR_IN
) {
8060 ZERO_STRUCT(r
->out
);
8062 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8063 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
8065 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8066 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
8067 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8068 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8069 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
8070 *r
->out
.group_handle
= *r
->in
.group_handle
;
8072 if (flags
& NDR_OUT
) {
8073 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8074 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
8076 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8077 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
8078 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
8079 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8080 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8082 return NDR_ERR_SUCCESS
;
8085 _PUBLIC_
void ndr_print_samr_DeleteDomainGroup(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteDomainGroup
*r
)
8087 ndr_print_struct(ndr
, name
, "samr_DeleteDomainGroup");
8089 if (flags
& NDR_SET_VALUES
) {
8090 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8092 if (flags
& NDR_IN
) {
8093 ndr_print_struct(ndr
, "in", "samr_DeleteDomainGroup");
8095 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
8097 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
8101 if (flags
& NDR_OUT
) {
8102 ndr_print_struct(ndr
, "out", "samr_DeleteDomainGroup");
8104 ndr_print_ptr(ndr
, "group_handle", r
->out
.group_handle
);
8106 ndr_print_policy_handle(ndr
, "group_handle", r
->out
.group_handle
);
8108 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8114 static enum ndr_err_code
ndr_push_samr_DeleteGroupMember(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteGroupMember
*r
)
8116 if (flags
& NDR_IN
) {
8117 if (r
->in
.group_handle
== NULL
) {
8118 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8120 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8121 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
8123 if (flags
& NDR_OUT
) {
8124 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8126 return NDR_ERR_SUCCESS
;
8129 static enum ndr_err_code
ndr_pull_samr_DeleteGroupMember(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteGroupMember
*r
)
8131 TALLOC_CTX
*_mem_save_group_handle_0
;
8132 if (flags
& NDR_IN
) {
8133 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8134 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
8136 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8137 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
8138 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8139 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8140 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
8142 if (flags
& NDR_OUT
) {
8143 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8145 return NDR_ERR_SUCCESS
;
8148 _PUBLIC_
void ndr_print_samr_DeleteGroupMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteGroupMember
*r
)
8150 ndr_print_struct(ndr
, name
, "samr_DeleteGroupMember");
8152 if (flags
& NDR_SET_VALUES
) {
8153 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8155 if (flags
& NDR_IN
) {
8156 ndr_print_struct(ndr
, "in", "samr_DeleteGroupMember");
8158 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
8160 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
8162 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
8165 if (flags
& NDR_OUT
) {
8166 ndr_print_struct(ndr
, "out", "samr_DeleteGroupMember");
8168 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8174 static enum ndr_err_code
ndr_push_samr_QueryGroupMember(struct ndr_push
*ndr
, int flags
, const struct samr_QueryGroupMember
*r
)
8176 if (flags
& NDR_IN
) {
8177 if (r
->in
.group_handle
== NULL
) {
8178 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8180 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8182 if (flags
& NDR_OUT
) {
8183 if (r
->out
.rids
== NULL
) {
8184 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8186 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.rids
));
8188 NDR_CHECK(ndr_push_samr_RidTypeArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rids
));
8190 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8192 return NDR_ERR_SUCCESS
;
8195 static enum ndr_err_code
ndr_pull_samr_QueryGroupMember(struct ndr_pull
*ndr
, int flags
, struct samr_QueryGroupMember
*r
)
8198 TALLOC_CTX
*_mem_save_group_handle_0
;
8199 TALLOC_CTX
*_mem_save_rids_0
;
8200 TALLOC_CTX
*_mem_save_rids_1
;
8201 if (flags
& NDR_IN
) {
8202 ZERO_STRUCT(r
->out
);
8204 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8205 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
8207 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8208 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
8209 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8210 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8211 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
8212 ZERO_STRUCTP(r
->out
.rids
);
8214 if (flags
& NDR_OUT
) {
8215 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8216 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
8218 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8219 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rids
, LIBNDR_FLAG_REF_ALLOC
);
8220 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rids
));
8222 NDR_PULL_ALLOC(ndr
, *r
->out
.rids
);
8224 *r
->out
.rids
= NULL
;
8227 _mem_save_rids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8228 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.rids
, 0);
8229 NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rids
));
8230 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_1
, 0);
8232 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, LIBNDR_FLAG_REF_ALLOC
);
8233 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8235 return NDR_ERR_SUCCESS
;
8238 _PUBLIC_
void ndr_print_samr_QueryGroupMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryGroupMember
*r
)
8240 ndr_print_struct(ndr
, name
, "samr_QueryGroupMember");
8242 if (flags
& NDR_SET_VALUES
) {
8243 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8245 if (flags
& NDR_IN
) {
8246 ndr_print_struct(ndr
, "in", "samr_QueryGroupMember");
8248 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
8250 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
8254 if (flags
& NDR_OUT
) {
8255 ndr_print_struct(ndr
, "out", "samr_QueryGroupMember");
8257 ndr_print_ptr(ndr
, "rids", r
->out
.rids
);
8259 ndr_print_ptr(ndr
, "rids", *r
->out
.rids
);
8262 ndr_print_samr_RidTypeArray(ndr
, "rids", *r
->out
.rids
);
8266 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8272 static enum ndr_err_code
ndr_push_samr_SetMemberAttributesOfGroup(struct ndr_push
*ndr
, int flags
, const struct samr_SetMemberAttributesOfGroup
*r
)
8274 if (flags
& NDR_IN
) {
8275 if (r
->in
.group_handle
== NULL
) {
8276 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8278 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8279 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
8280 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
8282 if (flags
& NDR_OUT
) {
8283 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8285 return NDR_ERR_SUCCESS
;
8288 static enum ndr_err_code
ndr_pull_samr_SetMemberAttributesOfGroup(struct ndr_pull
*ndr
, int flags
, struct samr_SetMemberAttributesOfGroup
*r
)
8290 TALLOC_CTX
*_mem_save_group_handle_0
;
8291 if (flags
& NDR_IN
) {
8292 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8293 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
8295 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8296 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
8297 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8298 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8299 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
8300 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
8302 if (flags
& NDR_OUT
) {
8303 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8305 return NDR_ERR_SUCCESS
;
8308 _PUBLIC_
void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetMemberAttributesOfGroup
*r
)
8310 ndr_print_struct(ndr
, name
, "samr_SetMemberAttributesOfGroup");
8312 if (flags
& NDR_SET_VALUES
) {
8313 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8315 if (flags
& NDR_IN
) {
8316 ndr_print_struct(ndr
, "in", "samr_SetMemberAttributesOfGroup");
8318 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
8320 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
8322 ndr_print_uint32(ndr
, "unknown1", r
->in
.unknown1
);
8323 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
8326 if (flags
& NDR_OUT
) {
8327 ndr_print_struct(ndr
, "out", "samr_SetMemberAttributesOfGroup");
8329 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8335 static enum ndr_err_code
ndr_push_samr_OpenAlias(struct ndr_push
*ndr
, int flags
, const struct samr_OpenAlias
*r
)
8337 if (flags
& NDR_IN
) {
8338 if (r
->in
.domain_handle
== NULL
) {
8339 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8341 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
8342 NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
8343 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
8345 if (flags
& NDR_OUT
) {
8346 if (r
->out
.alias_handle
== NULL
) {
8347 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8349 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
8350 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8352 return NDR_ERR_SUCCESS
;
8355 static enum ndr_err_code
ndr_pull_samr_OpenAlias(struct ndr_pull
*ndr
, int flags
, struct samr_OpenAlias
*r
)
8357 TALLOC_CTX
*_mem_save_domain_handle_0
;
8358 TALLOC_CTX
*_mem_save_alias_handle_0
;
8359 if (flags
& NDR_IN
) {
8360 ZERO_STRUCT(r
->out
);
8362 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8363 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
8365 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8366 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
8367 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
8368 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8369 NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
8370 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
8371 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
8372 ZERO_STRUCTP(r
->out
.alias_handle
);
8374 if (flags
& NDR_OUT
) {
8375 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8376 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
8378 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8379 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8380 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
8381 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8382 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8384 return NDR_ERR_SUCCESS
;
8387 _PUBLIC_
void ndr_print_samr_OpenAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OpenAlias
*r
)
8389 ndr_print_struct(ndr
, name
, "samr_OpenAlias");
8391 if (flags
& NDR_SET_VALUES
) {
8392 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8394 if (flags
& NDR_IN
) {
8395 ndr_print_struct(ndr
, "in", "samr_OpenAlias");
8397 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
8399 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
8401 ndr_print_samr_AliasAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
8402 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
8405 if (flags
& NDR_OUT
) {
8406 ndr_print_struct(ndr
, "out", "samr_OpenAlias");
8408 ndr_print_ptr(ndr
, "alias_handle", r
->out
.alias_handle
);
8410 ndr_print_policy_handle(ndr
, "alias_handle", r
->out
.alias_handle
);
8412 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8418 static enum ndr_err_code
ndr_push_samr_QueryAliasInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryAliasInfo
*r
)
8420 if (flags
& NDR_IN
) {
8421 if (r
->in
.alias_handle
== NULL
) {
8422 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8424 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8425 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
8427 if (flags
& NDR_OUT
) {
8428 if (r
->out
.info
== NULL
) {
8429 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8431 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
8433 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
8434 NDR_CHECK(ndr_push_samr_AliasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
8436 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8438 return NDR_ERR_SUCCESS
;
8441 static enum ndr_err_code
ndr_pull_samr_QueryAliasInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryAliasInfo
*r
)
8444 TALLOC_CTX
*_mem_save_alias_handle_0
;
8445 TALLOC_CTX
*_mem_save_info_0
;
8446 TALLOC_CTX
*_mem_save_info_1
;
8447 if (flags
& NDR_IN
) {
8448 ZERO_STRUCT(r
->out
);
8450 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8451 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8453 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8454 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8455 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8456 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8457 NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
8458 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8459 ZERO_STRUCTP(r
->out
.info
);
8461 if (flags
& NDR_OUT
) {
8462 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8463 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8465 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8466 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
8467 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
8469 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
8471 *r
->out
.info
= NULL
;
8474 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8475 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
8476 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
8477 NDR_CHECK(ndr_pull_samr_AliasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
8478 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
8480 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
8481 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8483 return NDR_ERR_SUCCESS
;
8486 _PUBLIC_
void ndr_print_samr_QueryAliasInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryAliasInfo
*r
)
8488 ndr_print_struct(ndr
, name
, "samr_QueryAliasInfo");
8490 if (flags
& NDR_SET_VALUES
) {
8491 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8493 if (flags
& NDR_IN
) {
8494 ndr_print_struct(ndr
, "in", "samr_QueryAliasInfo");
8496 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8498 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8500 ndr_print_samr_AliasInfoEnum(ndr
, "level", r
->in
.level
);
8503 if (flags
& NDR_OUT
) {
8504 ndr_print_struct(ndr
, "out", "samr_QueryAliasInfo");
8506 ndr_print_ptr(ndr
, "info", r
->out
.info
);
8508 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
8511 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
8512 ndr_print_samr_AliasInfo(ndr
, "info", *r
->out
.info
);
8516 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8522 static enum ndr_err_code
ndr_push_samr_SetAliasInfo(struct ndr_push
*ndr
, int flags
, const struct samr_SetAliasInfo
*r
)
8524 if (flags
& NDR_IN
) {
8525 if (r
->in
.alias_handle
== NULL
) {
8526 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8528 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8529 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
8530 if (r
->in
.info
== NULL
) {
8531 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8533 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
8534 NDR_CHECK(ndr_push_samr_AliasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
8536 if (flags
& NDR_OUT
) {
8537 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8539 return NDR_ERR_SUCCESS
;
8542 static enum ndr_err_code
ndr_pull_samr_SetAliasInfo(struct ndr_pull
*ndr
, int flags
, struct samr_SetAliasInfo
*r
)
8544 TALLOC_CTX
*_mem_save_alias_handle_0
;
8545 TALLOC_CTX
*_mem_save_info_0
;
8546 if (flags
& NDR_IN
) {
8547 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8548 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8550 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8551 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8552 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8553 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8554 NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
8555 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8556 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
8558 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8559 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
8560 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
8561 NDR_CHECK(ndr_pull_samr_AliasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
8562 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
8564 if (flags
& NDR_OUT
) {
8565 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8567 return NDR_ERR_SUCCESS
;
8570 _PUBLIC_
void ndr_print_samr_SetAliasInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetAliasInfo
*r
)
8572 ndr_print_struct(ndr
, name
, "samr_SetAliasInfo");
8574 if (flags
& NDR_SET_VALUES
) {
8575 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8577 if (flags
& NDR_IN
) {
8578 ndr_print_struct(ndr
, "in", "samr_SetAliasInfo");
8580 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8582 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8584 ndr_print_samr_AliasInfoEnum(ndr
, "level", r
->in
.level
);
8585 ndr_print_ptr(ndr
, "info", r
->in
.info
);
8587 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
8588 ndr_print_samr_AliasInfo(ndr
, "info", r
->in
.info
);
8592 if (flags
& NDR_OUT
) {
8593 ndr_print_struct(ndr
, "out", "samr_SetAliasInfo");
8595 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8601 static enum ndr_err_code
ndr_push_samr_DeleteDomAlias(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteDomAlias
*r
)
8603 if (flags
& NDR_IN
) {
8604 if (r
->in
.alias_handle
== NULL
) {
8605 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8607 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8609 if (flags
& NDR_OUT
) {
8610 if (r
->out
.alias_handle
== NULL
) {
8611 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8613 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
8614 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8616 return NDR_ERR_SUCCESS
;
8619 static enum ndr_err_code
ndr_pull_samr_DeleteDomAlias(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteDomAlias
*r
)
8621 TALLOC_CTX
*_mem_save_alias_handle_0
;
8622 if (flags
& NDR_IN
) {
8623 ZERO_STRUCT(r
->out
);
8625 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8626 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8628 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8629 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8630 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8631 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8632 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
8633 *r
->out
.alias_handle
= *r
->in
.alias_handle
;
8635 if (flags
& NDR_OUT
) {
8636 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8637 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
8639 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8640 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8641 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
8642 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8643 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8645 return NDR_ERR_SUCCESS
;
8648 _PUBLIC_
void ndr_print_samr_DeleteDomAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteDomAlias
*r
)
8650 ndr_print_struct(ndr
, name
, "samr_DeleteDomAlias");
8652 if (flags
& NDR_SET_VALUES
) {
8653 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8655 if (flags
& NDR_IN
) {
8656 ndr_print_struct(ndr
, "in", "samr_DeleteDomAlias");
8658 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8660 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8664 if (flags
& NDR_OUT
) {
8665 ndr_print_struct(ndr
, "out", "samr_DeleteDomAlias");
8667 ndr_print_ptr(ndr
, "alias_handle", r
->out
.alias_handle
);
8669 ndr_print_policy_handle(ndr
, "alias_handle", r
->out
.alias_handle
);
8671 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8677 static enum ndr_err_code
ndr_push_samr_AddAliasMember(struct ndr_push
*ndr
, int flags
, const struct samr_AddAliasMember
*r
)
8679 if (flags
& NDR_IN
) {
8680 if (r
->in
.alias_handle
== NULL
) {
8681 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8683 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8684 if (r
->in
.sid
== NULL
) {
8685 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8687 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8689 if (flags
& NDR_OUT
) {
8690 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8692 return NDR_ERR_SUCCESS
;
8695 static enum ndr_err_code
ndr_pull_samr_AddAliasMember(struct ndr_pull
*ndr
, int flags
, struct samr_AddAliasMember
*r
)
8697 TALLOC_CTX
*_mem_save_alias_handle_0
;
8698 TALLOC_CTX
*_mem_save_sid_0
;
8699 if (flags
& NDR_IN
) {
8700 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8701 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8703 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8704 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8705 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8706 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8707 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8708 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8710 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8711 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8712 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8713 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8715 if (flags
& NDR_OUT
) {
8716 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8718 return NDR_ERR_SUCCESS
;
8721 _PUBLIC_
void ndr_print_samr_AddAliasMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_AddAliasMember
*r
)
8723 ndr_print_struct(ndr
, name
, "samr_AddAliasMember");
8725 if (flags
& NDR_SET_VALUES
) {
8726 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8728 if (flags
& NDR_IN
) {
8729 ndr_print_struct(ndr
, "in", "samr_AddAliasMember");
8731 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8733 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8735 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8737 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8741 if (flags
& NDR_OUT
) {
8742 ndr_print_struct(ndr
, "out", "samr_AddAliasMember");
8744 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8750 static enum ndr_err_code
ndr_push_samr_DeleteAliasMember(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteAliasMember
*r
)
8752 if (flags
& NDR_IN
) {
8753 if (r
->in
.alias_handle
== NULL
) {
8754 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8756 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8757 if (r
->in
.sid
== NULL
) {
8758 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8760 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8762 if (flags
& NDR_OUT
) {
8763 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8765 return NDR_ERR_SUCCESS
;
8768 static enum ndr_err_code
ndr_pull_samr_DeleteAliasMember(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteAliasMember
*r
)
8770 TALLOC_CTX
*_mem_save_alias_handle_0
;
8771 TALLOC_CTX
*_mem_save_sid_0
;
8772 if (flags
& NDR_IN
) {
8773 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8774 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8776 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8777 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8778 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8779 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8780 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8781 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8783 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8784 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8785 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8786 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8788 if (flags
& NDR_OUT
) {
8789 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8791 return NDR_ERR_SUCCESS
;
8794 _PUBLIC_
void ndr_print_samr_DeleteAliasMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteAliasMember
*r
)
8796 ndr_print_struct(ndr
, name
, "samr_DeleteAliasMember");
8798 if (flags
& NDR_SET_VALUES
) {
8799 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8801 if (flags
& NDR_IN
) {
8802 ndr_print_struct(ndr
, "in", "samr_DeleteAliasMember");
8804 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8806 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8808 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8810 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8814 if (flags
& NDR_OUT
) {
8815 ndr_print_struct(ndr
, "out", "samr_DeleteAliasMember");
8817 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8823 static enum ndr_err_code
ndr_push_samr_GetMembersInAlias(struct ndr_push
*ndr
, int flags
, const struct samr_GetMembersInAlias
*r
)
8825 if (flags
& NDR_IN
) {
8826 if (r
->in
.alias_handle
== NULL
) {
8827 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8829 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8831 if (flags
& NDR_OUT
) {
8832 if (r
->out
.sids
== NULL
) {
8833 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8835 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8836 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8838 return NDR_ERR_SUCCESS
;
8841 static enum ndr_err_code
ndr_pull_samr_GetMembersInAlias(struct ndr_pull
*ndr
, int flags
, struct samr_GetMembersInAlias
*r
)
8843 TALLOC_CTX
*_mem_save_alias_handle_0
;
8844 TALLOC_CTX
*_mem_save_sids_0
;
8845 if (flags
& NDR_IN
) {
8846 ZERO_STRUCT(r
->out
);
8848 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8849 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8851 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8852 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8853 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8854 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8855 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8856 ZERO_STRUCTP(r
->out
.sids
);
8858 if (flags
& NDR_OUT
) {
8859 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8860 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8862 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8863 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
8864 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8865 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
8866 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8868 return NDR_ERR_SUCCESS
;
8871 _PUBLIC_
void ndr_print_samr_GetMembersInAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetMembersInAlias
*r
)
8873 ndr_print_struct(ndr
, name
, "samr_GetMembersInAlias");
8875 if (flags
& NDR_SET_VALUES
) {
8876 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8878 if (flags
& NDR_IN
) {
8879 ndr_print_struct(ndr
, "in", "samr_GetMembersInAlias");
8881 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8883 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8887 if (flags
& NDR_OUT
) {
8888 ndr_print_struct(ndr
, "out", "samr_GetMembersInAlias");
8890 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
8892 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
8894 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8900 _PUBLIC_
enum ndr_err_code
ndr_push_samr_OpenUser(struct ndr_push
*ndr
, int flags
, const struct samr_OpenUser
*r
)
8902 if (flags
& NDR_IN
) {
8903 if (r
->in
.domain_handle
== NULL
) {
8904 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8906 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
8907 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
8908 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
8910 if (flags
& NDR_OUT
) {
8911 if (r
->out
.user_handle
== NULL
) {
8912 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8914 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
8915 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8917 return NDR_ERR_SUCCESS
;
8920 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_OpenUser(struct ndr_pull
*ndr
, int flags
, struct samr_OpenUser
*r
)
8922 TALLOC_CTX
*_mem_save_domain_handle_0
;
8923 TALLOC_CTX
*_mem_save_user_handle_0
;
8924 if (flags
& NDR_IN
) {
8925 ZERO_STRUCT(r
->out
);
8927 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8928 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
8930 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8931 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
8932 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
8933 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8934 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
8935 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
8936 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
8937 ZERO_STRUCTP(r
->out
.user_handle
);
8939 if (flags
& NDR_OUT
) {
8940 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8941 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
8943 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8944 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
8945 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
8946 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8947 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8949 return NDR_ERR_SUCCESS
;
8952 _PUBLIC_
void ndr_print_samr_OpenUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OpenUser
*r
)
8954 ndr_print_struct(ndr
, name
, "samr_OpenUser");
8956 if (flags
& NDR_SET_VALUES
) {
8957 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8959 if (flags
& NDR_IN
) {
8960 ndr_print_struct(ndr
, "in", "samr_OpenUser");
8962 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
8964 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
8966 ndr_print_samr_UserAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
8967 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
8970 if (flags
& NDR_OUT
) {
8971 ndr_print_struct(ndr
, "out", "samr_OpenUser");
8973 ndr_print_ptr(ndr
, "user_handle", r
->out
.user_handle
);
8975 ndr_print_policy_handle(ndr
, "user_handle", r
->out
.user_handle
);
8977 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8983 static enum ndr_err_code
ndr_push_samr_DeleteUser(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteUser
*r
)
8985 if (flags
& NDR_IN
) {
8986 if (r
->in
.user_handle
== NULL
) {
8987 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8989 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
8991 if (flags
& NDR_OUT
) {
8992 if (r
->out
.user_handle
== NULL
) {
8993 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8995 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
8996 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8998 return NDR_ERR_SUCCESS
;
9001 static enum ndr_err_code
ndr_pull_samr_DeleteUser(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteUser
*r
)
9003 TALLOC_CTX
*_mem_save_user_handle_0
;
9004 if (flags
& NDR_IN
) {
9005 ZERO_STRUCT(r
->out
);
9007 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9008 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9010 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9011 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9012 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9013 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9014 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
9015 *r
->out
.user_handle
= *r
->in
.user_handle
;
9017 if (flags
& NDR_OUT
) {
9018 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9019 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
9021 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9022 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9023 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
9024 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9025 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9027 return NDR_ERR_SUCCESS
;
9030 _PUBLIC_
void ndr_print_samr_DeleteUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteUser
*r
)
9032 ndr_print_struct(ndr
, name
, "samr_DeleteUser");
9034 if (flags
& NDR_SET_VALUES
) {
9035 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9037 if (flags
& NDR_IN
) {
9038 ndr_print_struct(ndr
, "in", "samr_DeleteUser");
9040 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9042 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9046 if (flags
& NDR_OUT
) {
9047 ndr_print_struct(ndr
, "out", "samr_DeleteUser");
9049 ndr_print_ptr(ndr
, "user_handle", r
->out
.user_handle
);
9051 ndr_print_policy_handle(ndr
, "user_handle", r
->out
.user_handle
);
9053 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9059 _PUBLIC_
enum ndr_err_code
ndr_push_samr_QueryUserInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryUserInfo
*r
)
9061 if (flags
& NDR_IN
) {
9062 if (r
->in
.user_handle
== NULL
) {
9063 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9065 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9066 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
9068 if (flags
& NDR_OUT
) {
9069 if (r
->out
.info
== NULL
) {
9070 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9072 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9074 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9075 NDR_CHECK(ndr_push_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9077 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9079 return NDR_ERR_SUCCESS
;
9082 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_QueryUserInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryUserInfo
*r
)
9085 TALLOC_CTX
*_mem_save_user_handle_0
;
9086 TALLOC_CTX
*_mem_save_info_0
;
9087 TALLOC_CTX
*_mem_save_info_1
;
9088 if (flags
& NDR_IN
) {
9089 ZERO_STRUCT(r
->out
);
9091 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9092 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9094 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9095 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9096 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9097 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9098 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
9099 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9100 ZERO_STRUCTP(r
->out
.info
);
9102 if (flags
& NDR_OUT
) {
9103 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9104 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9106 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9107 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9108 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9110 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9112 *r
->out
.info
= NULL
;
9115 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9116 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9117 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9118 NDR_CHECK(ndr_pull_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9119 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9121 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9122 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9124 return NDR_ERR_SUCCESS
;
9127 _PUBLIC_
void ndr_print_samr_QueryUserInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryUserInfo
*r
)
9129 ndr_print_struct(ndr
, name
, "samr_QueryUserInfo");
9131 if (flags
& NDR_SET_VALUES
) {
9132 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9134 if (flags
& NDR_IN
) {
9135 ndr_print_struct(ndr
, "in", "samr_QueryUserInfo");
9137 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9139 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9141 ndr_print_samr_UserInfoLevel(ndr
, "level", r
->in
.level
);
9144 if (flags
& NDR_OUT
) {
9145 ndr_print_struct(ndr
, "out", "samr_QueryUserInfo");
9147 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9149 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
9152 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
9153 ndr_print_samr_UserInfo(ndr
, "info", *r
->out
.info
);
9157 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9163 _PUBLIC_
enum ndr_err_code
ndr_push_samr_SetUserInfo(struct ndr_push
*ndr
, int flags
, const struct samr_SetUserInfo
*r
)
9165 if (flags
& NDR_IN
) {
9166 if (r
->in
.user_handle
== NULL
) {
9167 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9169 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9170 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
9171 if (r
->in
.info
== NULL
) {
9172 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9174 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9175 NDR_CHECK(ndr_push_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9177 if (flags
& NDR_OUT
) {
9178 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9180 return NDR_ERR_SUCCESS
;
9183 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_SetUserInfo(struct ndr_pull
*ndr
, int flags
, struct samr_SetUserInfo
*r
)
9185 TALLOC_CTX
*_mem_save_user_handle_0
;
9186 TALLOC_CTX
*_mem_save_info_0
;
9187 if (flags
& NDR_IN
) {
9188 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9189 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9191 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9192 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9193 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9194 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9195 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
9196 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9197 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
9199 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9200 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
9201 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9202 NDR_CHECK(ndr_pull_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9203 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9205 if (flags
& NDR_OUT
) {
9206 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9208 return NDR_ERR_SUCCESS
;
9211 _PUBLIC_
void ndr_print_samr_SetUserInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetUserInfo
*r
)
9213 ndr_print_struct(ndr
, name
, "samr_SetUserInfo");
9215 if (flags
& NDR_SET_VALUES
) {
9216 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9218 if (flags
& NDR_IN
) {
9219 ndr_print_struct(ndr
, "in", "samr_SetUserInfo");
9221 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9223 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9225 ndr_print_samr_UserInfoLevel(ndr
, "level", r
->in
.level
);
9226 ndr_print_ptr(ndr
, "info", r
->in
.info
);
9228 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
9229 ndr_print_samr_UserInfo(ndr
, "info", r
->in
.info
);
9233 if (flags
& NDR_OUT
) {
9234 ndr_print_struct(ndr
, "out", "samr_SetUserInfo");
9236 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9242 static enum ndr_err_code
ndr_push_samr_ChangePasswordUser(struct ndr_push
*ndr
, int flags
, const struct samr_ChangePasswordUser
*r
)
9244 if (flags
& NDR_IN
) {
9245 if (r
->in
.user_handle
== NULL
) {
9246 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9248 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9249 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.lm_present
));
9250 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_lm_crypted
));
9251 if (r
->in
.old_lm_crypted
) {
9252 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.old_lm_crypted
));
9254 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_lm_crypted
));
9255 if (r
->in
.new_lm_crypted
) {
9256 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.new_lm_crypted
));
9258 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.nt_present
));
9259 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_nt_crypted
));
9260 if (r
->in
.old_nt_crypted
) {
9261 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.old_nt_crypted
));
9263 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_nt_crypted
));
9264 if (r
->in
.new_nt_crypted
) {
9265 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.new_nt_crypted
));
9267 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.cross1_present
));
9268 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_cross
));
9269 if (r
->in
.nt_cross
) {
9270 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_cross
));
9272 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.cross2_present
));
9273 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_cross
));
9274 if (r
->in
.lm_cross
) {
9275 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_cross
));
9278 if (flags
& NDR_OUT
) {
9279 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9281 return NDR_ERR_SUCCESS
;
9284 static enum ndr_err_code
ndr_pull_samr_ChangePasswordUser(struct ndr_pull
*ndr
, int flags
, struct samr_ChangePasswordUser
*r
)
9286 uint32_t _ptr_old_lm_crypted
;
9287 uint32_t _ptr_new_lm_crypted
;
9288 uint32_t _ptr_old_nt_crypted
;
9289 uint32_t _ptr_new_nt_crypted
;
9290 uint32_t _ptr_nt_cross
;
9291 uint32_t _ptr_lm_cross
;
9292 TALLOC_CTX
*_mem_save_user_handle_0
;
9293 TALLOC_CTX
*_mem_save_old_lm_crypted_0
;
9294 TALLOC_CTX
*_mem_save_new_lm_crypted_0
;
9295 TALLOC_CTX
*_mem_save_old_nt_crypted_0
;
9296 TALLOC_CTX
*_mem_save_new_nt_crypted_0
;
9297 TALLOC_CTX
*_mem_save_nt_cross_0
;
9298 TALLOC_CTX
*_mem_save_lm_cross_0
;
9299 if (flags
& NDR_IN
) {
9300 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9301 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9303 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9304 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9305 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9306 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9307 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.lm_present
));
9308 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_lm_crypted
));
9309 if (_ptr_old_lm_crypted
) {
9310 NDR_PULL_ALLOC(ndr
, r
->in
.old_lm_crypted
);
9312 r
->in
.old_lm_crypted
= NULL
;
9314 if (r
->in
.old_lm_crypted
) {
9315 _mem_save_old_lm_crypted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9316 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_lm_crypted
, 0);
9317 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.old_lm_crypted
));
9318 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_lm_crypted_0
, 0);
9320 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_lm_crypted
));
9321 if (_ptr_new_lm_crypted
) {
9322 NDR_PULL_ALLOC(ndr
, r
->in
.new_lm_crypted
);
9324 r
->in
.new_lm_crypted
= NULL
;
9326 if (r
->in
.new_lm_crypted
) {
9327 _mem_save_new_lm_crypted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9328 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_lm_crypted
, 0);
9329 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.new_lm_crypted
));
9330 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_lm_crypted_0
, 0);
9332 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.nt_present
));
9333 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_nt_crypted
));
9334 if (_ptr_old_nt_crypted
) {
9335 NDR_PULL_ALLOC(ndr
, r
->in
.old_nt_crypted
);
9337 r
->in
.old_nt_crypted
= NULL
;
9339 if (r
->in
.old_nt_crypted
) {
9340 _mem_save_old_nt_crypted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9341 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_nt_crypted
, 0);
9342 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.old_nt_crypted
));
9343 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_nt_crypted_0
, 0);
9345 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_nt_crypted
));
9346 if (_ptr_new_nt_crypted
) {
9347 NDR_PULL_ALLOC(ndr
, r
->in
.new_nt_crypted
);
9349 r
->in
.new_nt_crypted
= NULL
;
9351 if (r
->in
.new_nt_crypted
) {
9352 _mem_save_new_nt_crypted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9353 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_nt_crypted
, 0);
9354 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.new_nt_crypted
));
9355 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_nt_crypted_0
, 0);
9357 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.cross1_present
));
9358 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_cross
));
9359 if (_ptr_nt_cross
) {
9360 NDR_PULL_ALLOC(ndr
, r
->in
.nt_cross
);
9362 r
->in
.nt_cross
= NULL
;
9364 if (r
->in
.nt_cross
) {
9365 _mem_save_nt_cross_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9366 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_cross
, 0);
9367 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_cross
));
9368 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_cross_0
, 0);
9370 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.cross2_present
));
9371 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_cross
));
9372 if (_ptr_lm_cross
) {
9373 NDR_PULL_ALLOC(ndr
, r
->in
.lm_cross
);
9375 r
->in
.lm_cross
= NULL
;
9377 if (r
->in
.lm_cross
) {
9378 _mem_save_lm_cross_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9379 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_cross
, 0);
9380 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_cross
));
9381 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_cross_0
, 0);
9384 if (flags
& NDR_OUT
) {
9385 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9387 return NDR_ERR_SUCCESS
;
9390 _PUBLIC_
void ndr_print_samr_ChangePasswordUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_ChangePasswordUser
*r
)
9392 ndr_print_struct(ndr
, name
, "samr_ChangePasswordUser");
9394 if (flags
& NDR_SET_VALUES
) {
9395 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9397 if (flags
& NDR_IN
) {
9398 ndr_print_struct(ndr
, "in", "samr_ChangePasswordUser");
9400 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9402 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9404 ndr_print_uint8(ndr
, "lm_present", r
->in
.lm_present
);
9405 ndr_print_ptr(ndr
, "old_lm_crypted", r
->in
.old_lm_crypted
);
9407 if (r
->in
.old_lm_crypted
) {
9408 ndr_print_samr_Password(ndr
, "old_lm_crypted", r
->in
.old_lm_crypted
);
9411 ndr_print_ptr(ndr
, "new_lm_crypted", r
->in
.new_lm_crypted
);
9413 if (r
->in
.new_lm_crypted
) {
9414 ndr_print_samr_Password(ndr
, "new_lm_crypted", r
->in
.new_lm_crypted
);
9417 ndr_print_uint8(ndr
, "nt_present", r
->in
.nt_present
);
9418 ndr_print_ptr(ndr
, "old_nt_crypted", r
->in
.old_nt_crypted
);
9420 if (r
->in
.old_nt_crypted
) {
9421 ndr_print_samr_Password(ndr
, "old_nt_crypted", r
->in
.old_nt_crypted
);
9424 ndr_print_ptr(ndr
, "new_nt_crypted", r
->in
.new_nt_crypted
);
9426 if (r
->in
.new_nt_crypted
) {
9427 ndr_print_samr_Password(ndr
, "new_nt_crypted", r
->in
.new_nt_crypted
);
9430 ndr_print_uint8(ndr
, "cross1_present", r
->in
.cross1_present
);
9431 ndr_print_ptr(ndr
, "nt_cross", r
->in
.nt_cross
);
9433 if (r
->in
.nt_cross
) {
9434 ndr_print_samr_Password(ndr
, "nt_cross", r
->in
.nt_cross
);
9437 ndr_print_uint8(ndr
, "cross2_present", r
->in
.cross2_present
);
9438 ndr_print_ptr(ndr
, "lm_cross", r
->in
.lm_cross
);
9440 if (r
->in
.lm_cross
) {
9441 ndr_print_samr_Password(ndr
, "lm_cross", r
->in
.lm_cross
);
9446 if (flags
& NDR_OUT
) {
9447 ndr_print_struct(ndr
, "out", "samr_ChangePasswordUser");
9449 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9455 static enum ndr_err_code
ndr_push_samr_GetGroupsForUser(struct ndr_push
*ndr
, int flags
, const struct samr_GetGroupsForUser
*r
)
9457 if (flags
& NDR_IN
) {
9458 if (r
->in
.user_handle
== NULL
) {
9459 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9461 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9463 if (flags
& NDR_OUT
) {
9464 if (r
->out
.rids
== NULL
) {
9465 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9467 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.rids
));
9469 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rids
));
9471 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9473 return NDR_ERR_SUCCESS
;
9476 static enum ndr_err_code
ndr_pull_samr_GetGroupsForUser(struct ndr_pull
*ndr
, int flags
, struct samr_GetGroupsForUser
*r
)
9479 TALLOC_CTX
*_mem_save_user_handle_0
;
9480 TALLOC_CTX
*_mem_save_rids_0
;
9481 TALLOC_CTX
*_mem_save_rids_1
;
9482 if (flags
& NDR_IN
) {
9483 ZERO_STRUCT(r
->out
);
9485 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9486 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9488 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9489 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9490 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9491 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9492 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
9493 ZERO_STRUCTP(r
->out
.rids
);
9495 if (flags
& NDR_OUT
) {
9496 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9497 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
9499 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9500 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rids
, LIBNDR_FLAG_REF_ALLOC
);
9501 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rids
));
9503 NDR_PULL_ALLOC(ndr
, *r
->out
.rids
);
9505 *r
->out
.rids
= NULL
;
9508 _mem_save_rids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9509 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.rids
, 0);
9510 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rids
));
9511 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_1
, 0);
9513 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, LIBNDR_FLAG_REF_ALLOC
);
9514 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9516 return NDR_ERR_SUCCESS
;
9519 _PUBLIC_
void ndr_print_samr_GetGroupsForUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetGroupsForUser
*r
)
9521 ndr_print_struct(ndr
, name
, "samr_GetGroupsForUser");
9523 if (flags
& NDR_SET_VALUES
) {
9524 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9526 if (flags
& NDR_IN
) {
9527 ndr_print_struct(ndr
, "in", "samr_GetGroupsForUser");
9529 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9531 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9535 if (flags
& NDR_OUT
) {
9536 ndr_print_struct(ndr
, "out", "samr_GetGroupsForUser");
9538 ndr_print_ptr(ndr
, "rids", r
->out
.rids
);
9540 ndr_print_ptr(ndr
, "rids", *r
->out
.rids
);
9543 ndr_print_samr_RidWithAttributeArray(ndr
, "rids", *r
->out
.rids
);
9547 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9553 static enum ndr_err_code
ndr_push_samr_QueryDisplayInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDisplayInfo
*r
)
9555 if (flags
& NDR_IN
) {
9556 if (r
->in
.domain_handle
== NULL
) {
9557 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9559 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9560 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
9561 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.start_idx
));
9562 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_entries
));
9563 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
9565 if (flags
& NDR_OUT
) {
9566 if (r
->out
.total_size
== NULL
) {
9567 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total_size
));
9570 if (r
->out
.returned_size
== NULL
) {
9571 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9573 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.returned_size
));
9574 if (r
->out
.info
== NULL
) {
9575 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9577 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
9578 NDR_CHECK(ndr_push_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
9579 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9581 return NDR_ERR_SUCCESS
;
9584 static enum ndr_err_code
ndr_pull_samr_QueryDisplayInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDisplayInfo
*r
)
9586 TALLOC_CTX
*_mem_save_domain_handle_0
;
9587 TALLOC_CTX
*_mem_save_total_size_0
;
9588 TALLOC_CTX
*_mem_save_returned_size_0
;
9589 TALLOC_CTX
*_mem_save_info_0
;
9590 if (flags
& NDR_IN
) {
9591 ZERO_STRUCT(r
->out
);
9593 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9594 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
9596 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9597 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
9598 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9599 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9600 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
9601 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.start_idx
));
9602 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_entries
));
9603 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
9604 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
9605 ZERO_STRUCTP(r
->out
.total_size
);
9606 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
9607 ZERO_STRUCTP(r
->out
.returned_size
);
9608 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9609 ZERO_STRUCTP(r
->out
.info
);
9611 if (flags
& NDR_OUT
) {
9612 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9613 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
9615 _mem_save_total_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9616 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total_size
, LIBNDR_FLAG_REF_ALLOC
);
9617 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total_size
));
9618 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_size_0
, LIBNDR_FLAG_REF_ALLOC
);
9619 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9620 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
9622 _mem_save_returned_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9623 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_size
, LIBNDR_FLAG_REF_ALLOC
);
9624 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.returned_size
));
9625 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_size_0
, LIBNDR_FLAG_REF_ALLOC
);
9626 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9627 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9629 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9630 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9631 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
9632 NDR_CHECK(ndr_pull_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
9633 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9634 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9636 return NDR_ERR_SUCCESS
;
9639 _PUBLIC_
void ndr_print_samr_QueryDisplayInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDisplayInfo
*r
)
9641 ndr_print_struct(ndr
, name
, "samr_QueryDisplayInfo");
9643 if (flags
& NDR_SET_VALUES
) {
9644 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9646 if (flags
& NDR_IN
) {
9647 ndr_print_struct(ndr
, "in", "samr_QueryDisplayInfo");
9649 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
9651 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
9653 ndr_print_uint16(ndr
, "level", r
->in
.level
);
9654 ndr_print_uint32(ndr
, "start_idx", r
->in
.start_idx
);
9655 ndr_print_uint32(ndr
, "max_entries", r
->in
.max_entries
);
9656 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
9659 if (flags
& NDR_OUT
) {
9660 ndr_print_struct(ndr
, "out", "samr_QueryDisplayInfo");
9662 ndr_print_ptr(ndr
, "total_size", r
->out
.total_size
);
9664 ndr_print_uint32(ndr
, "total_size", *r
->out
.total_size
);
9666 ndr_print_ptr(ndr
, "returned_size", r
->out
.returned_size
);
9668 ndr_print_uint32(ndr
, "returned_size", *r
->out
.returned_size
);
9670 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9672 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
9673 ndr_print_samr_DispInfo(ndr
, "info", r
->out
.info
);
9675 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9681 static enum ndr_err_code
ndr_push_samr_GetDisplayEnumerationIndex(struct ndr_push
*ndr
, int flags
, const struct samr_GetDisplayEnumerationIndex
*r
)
9683 if (flags
& NDR_IN
) {
9684 if (r
->in
.domain_handle
== NULL
) {
9685 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9687 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9688 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
9689 if (r
->in
.name
== NULL
) {
9690 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9692 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9694 if (flags
& NDR_OUT
) {
9695 if (r
->out
.idx
== NULL
) {
9696 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9698 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.idx
));
9699 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9701 return NDR_ERR_SUCCESS
;
9704 static enum ndr_err_code
ndr_pull_samr_GetDisplayEnumerationIndex(struct ndr_pull
*ndr
, int flags
, struct samr_GetDisplayEnumerationIndex
*r
)
9706 TALLOC_CTX
*_mem_save_domain_handle_0
;
9707 TALLOC_CTX
*_mem_save_name_0
;
9708 TALLOC_CTX
*_mem_save_idx_0
;
9709 if (flags
& NDR_IN
) {
9710 ZERO_STRUCT(r
->out
);
9712 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9713 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
9715 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9716 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
9717 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9718 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9719 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
9720 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9721 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
9723 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9724 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
9725 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9726 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9727 NDR_PULL_ALLOC(ndr
, r
->out
.idx
);
9728 ZERO_STRUCTP(r
->out
.idx
);
9730 if (flags
& NDR_OUT
) {
9731 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9732 NDR_PULL_ALLOC(ndr
, r
->out
.idx
);
9734 _mem_save_idx_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9735 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.idx
, LIBNDR_FLAG_REF_ALLOC
);
9736 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.idx
));
9737 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_idx_0
, LIBNDR_FLAG_REF_ALLOC
);
9738 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9740 return NDR_ERR_SUCCESS
;
9743 _PUBLIC_
void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetDisplayEnumerationIndex
*r
)
9745 ndr_print_struct(ndr
, name
, "samr_GetDisplayEnumerationIndex");
9747 if (flags
& NDR_SET_VALUES
) {
9748 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9750 if (flags
& NDR_IN
) {
9751 ndr_print_struct(ndr
, "in", "samr_GetDisplayEnumerationIndex");
9753 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
9755 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
9757 ndr_print_uint16(ndr
, "level", r
->in
.level
);
9758 ndr_print_ptr(ndr
, "name", r
->in
.name
);
9760 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
9764 if (flags
& NDR_OUT
) {
9765 ndr_print_struct(ndr
, "out", "samr_GetDisplayEnumerationIndex");
9767 ndr_print_ptr(ndr
, "idx", r
->out
.idx
);
9769 ndr_print_uint32(ndr
, "idx", *r
->out
.idx
);
9771 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9777 static enum ndr_err_code
ndr_push_samr_TestPrivateFunctionsDomain(struct ndr_push
*ndr
, int flags
, const struct samr_TestPrivateFunctionsDomain
*r
)
9779 if (flags
& NDR_IN
) {
9780 if (r
->in
.domain_handle
== NULL
) {
9781 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9783 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9785 if (flags
& NDR_OUT
) {
9786 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9788 return NDR_ERR_SUCCESS
;
9791 static enum ndr_err_code
ndr_pull_samr_TestPrivateFunctionsDomain(struct ndr_pull
*ndr
, int flags
, struct samr_TestPrivateFunctionsDomain
*r
)
9793 TALLOC_CTX
*_mem_save_domain_handle_0
;
9794 if (flags
& NDR_IN
) {
9795 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9796 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
9798 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9799 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
9800 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9801 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9803 if (flags
& NDR_OUT
) {
9804 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9806 return NDR_ERR_SUCCESS
;
9809 _PUBLIC_
void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_TestPrivateFunctionsDomain
*r
)
9811 ndr_print_struct(ndr
, name
, "samr_TestPrivateFunctionsDomain");
9813 if (flags
& NDR_SET_VALUES
) {
9814 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9816 if (flags
& NDR_IN
) {
9817 ndr_print_struct(ndr
, "in", "samr_TestPrivateFunctionsDomain");
9819 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
9821 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
9825 if (flags
& NDR_OUT
) {
9826 ndr_print_struct(ndr
, "out", "samr_TestPrivateFunctionsDomain");
9828 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9834 static enum ndr_err_code
ndr_push_samr_TestPrivateFunctionsUser(struct ndr_push
*ndr
, int flags
, const struct samr_TestPrivateFunctionsUser
*r
)
9836 if (flags
& NDR_IN
) {
9837 if (r
->in
.user_handle
== NULL
) {
9838 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9840 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9842 if (flags
& NDR_OUT
) {
9843 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9845 return NDR_ERR_SUCCESS
;
9848 static enum ndr_err_code
ndr_pull_samr_TestPrivateFunctionsUser(struct ndr_pull
*ndr
, int flags
, struct samr_TestPrivateFunctionsUser
*r
)
9850 TALLOC_CTX
*_mem_save_user_handle_0
;
9851 if (flags
& NDR_IN
) {
9852 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9853 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9855 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9856 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9857 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9858 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9860 if (flags
& NDR_OUT
) {
9861 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9863 return NDR_ERR_SUCCESS
;
9866 _PUBLIC_
void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_TestPrivateFunctionsUser
*r
)
9868 ndr_print_struct(ndr
, name
, "samr_TestPrivateFunctionsUser");
9870 if (flags
& NDR_SET_VALUES
) {
9871 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9873 if (flags
& NDR_IN
) {
9874 ndr_print_struct(ndr
, "in", "samr_TestPrivateFunctionsUser");
9876 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9878 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9882 if (flags
& NDR_OUT
) {
9883 ndr_print_struct(ndr
, "out", "samr_TestPrivateFunctionsUser");
9885 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9891 _PUBLIC_
enum ndr_err_code
ndr_push_samr_GetUserPwInfo(struct ndr_push
*ndr
, int flags
, const struct samr_GetUserPwInfo
*r
)
9893 if (flags
& NDR_IN
) {
9894 if (r
->in
.user_handle
== NULL
) {
9895 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9897 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9899 if (flags
& NDR_OUT
) {
9900 if (r
->out
.info
== NULL
) {
9901 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9903 NDR_CHECK(ndr_push_samr_PwInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
9904 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9906 return NDR_ERR_SUCCESS
;
9909 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_GetUserPwInfo(struct ndr_pull
*ndr
, int flags
, struct samr_GetUserPwInfo
*r
)
9911 TALLOC_CTX
*_mem_save_user_handle_0
;
9912 TALLOC_CTX
*_mem_save_info_0
;
9913 if (flags
& NDR_IN
) {
9914 ZERO_STRUCT(r
->out
);
9916 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9917 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9919 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9920 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9921 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9922 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9923 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9924 ZERO_STRUCTP(r
->out
.info
);
9926 if (flags
& NDR_OUT
) {
9927 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9928 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9930 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9931 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9932 NDR_CHECK(ndr_pull_samr_PwInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
9933 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9934 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9936 return NDR_ERR_SUCCESS
;
9939 _PUBLIC_
void ndr_print_samr_GetUserPwInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetUserPwInfo
*r
)
9941 ndr_print_struct(ndr
, name
, "samr_GetUserPwInfo");
9943 if (flags
& NDR_SET_VALUES
) {
9944 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9946 if (flags
& NDR_IN
) {
9947 ndr_print_struct(ndr
, "in", "samr_GetUserPwInfo");
9949 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9951 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9955 if (flags
& NDR_OUT
) {
9956 ndr_print_struct(ndr
, "out", "samr_GetUserPwInfo");
9958 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9960 ndr_print_samr_PwInfo(ndr
, "info", r
->out
.info
);
9962 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9968 static enum ndr_err_code
ndr_push_samr_RemoveMemberFromForeignDomain(struct ndr_push
*ndr
, int flags
, const struct samr_RemoveMemberFromForeignDomain
*r
)
9970 if (flags
& NDR_IN
) {
9971 if (r
->in
.domain_handle
== NULL
) {
9972 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9974 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9975 if (r
->in
.sid
== NULL
) {
9976 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9978 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
9980 if (flags
& NDR_OUT
) {
9981 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9983 return NDR_ERR_SUCCESS
;
9986 static enum ndr_err_code
ndr_pull_samr_RemoveMemberFromForeignDomain(struct ndr_pull
*ndr
, int flags
, struct samr_RemoveMemberFromForeignDomain
*r
)
9988 TALLOC_CTX
*_mem_save_domain_handle_0
;
9989 TALLOC_CTX
*_mem_save_sid_0
;
9990 if (flags
& NDR_IN
) {
9991 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9992 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
9994 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9995 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
9996 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9997 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9998 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9999 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
10001 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10002 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
10003 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
10004 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
10006 if (flags
& NDR_OUT
) {
10007 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10009 return NDR_ERR_SUCCESS
;
10012 _PUBLIC_
void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_RemoveMemberFromForeignDomain
*r
)
10014 ndr_print_struct(ndr
, name
, "samr_RemoveMemberFromForeignDomain");
10016 if (flags
& NDR_SET_VALUES
) {
10017 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10019 if (flags
& NDR_IN
) {
10020 ndr_print_struct(ndr
, "in", "samr_RemoveMemberFromForeignDomain");
10022 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10024 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10026 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
10028 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
10032 if (flags
& NDR_OUT
) {
10033 ndr_print_struct(ndr
, "out", "samr_RemoveMemberFromForeignDomain");
10035 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10041 static enum ndr_err_code
ndr_push_samr_QueryDomainInfo2(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDomainInfo2
*r
)
10043 if (flags
& NDR_IN
) {
10044 if (r
->in
.domain_handle
== NULL
) {
10045 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10047 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10048 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr
, NDR_SCALARS
, r
->in
.level
));
10050 if (flags
& NDR_OUT
) {
10051 if (r
->out
.info
== NULL
) {
10052 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10054 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
10055 if (*r
->out
.info
) {
10056 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10057 NDR_CHECK(ndr_push_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10059 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10061 return NDR_ERR_SUCCESS
;
10064 static enum ndr_err_code
ndr_pull_samr_QueryDomainInfo2(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDomainInfo2
*r
)
10066 uint32_t _ptr_info
;
10067 TALLOC_CTX
*_mem_save_domain_handle_0
;
10068 TALLOC_CTX
*_mem_save_info_0
;
10069 TALLOC_CTX
*_mem_save_info_1
;
10070 if (flags
& NDR_IN
) {
10071 ZERO_STRUCT(r
->out
);
10073 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10074 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
10076 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10077 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
10078 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10079 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10080 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr
, NDR_SCALARS
, &r
->in
.level
));
10081 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10082 ZERO_STRUCTP(r
->out
.info
);
10084 if (flags
& NDR_OUT
) {
10085 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10086 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10088 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10089 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10090 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10092 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10094 *r
->out
.info
= NULL
;
10096 if (*r
->out
.info
) {
10097 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10098 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10099 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10100 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10101 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10103 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10104 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10106 return NDR_ERR_SUCCESS
;
10109 _PUBLIC_
void ndr_print_samr_QueryDomainInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDomainInfo2
*r
)
10111 ndr_print_struct(ndr
, name
, "samr_QueryDomainInfo2");
10113 if (flags
& NDR_SET_VALUES
) {
10114 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10116 if (flags
& NDR_IN
) {
10117 ndr_print_struct(ndr
, "in", "samr_QueryDomainInfo2");
10119 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10121 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10123 ndr_print_samr_DomainInfoClass(ndr
, "level", r
->in
.level
);
10126 if (flags
& NDR_OUT
) {
10127 ndr_print_struct(ndr
, "out", "samr_QueryDomainInfo2");
10129 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10131 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10133 if (*r
->out
.info
) {
10134 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10135 ndr_print_samr_DomainInfo(ndr
, "info", *r
->out
.info
);
10139 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10145 static enum ndr_err_code
ndr_push_samr_QueryUserInfo2(struct ndr_push
*ndr
, int flags
, const struct samr_QueryUserInfo2
*r
)
10147 if (flags
& NDR_IN
) {
10148 if (r
->in
.user_handle
== NULL
) {
10149 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10151 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
10152 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
10154 if (flags
& NDR_OUT
) {
10155 if (r
->out
.info
== NULL
) {
10156 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10158 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
10159 if (*r
->out
.info
) {
10160 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10161 NDR_CHECK(ndr_push_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10163 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10165 return NDR_ERR_SUCCESS
;
10168 static enum ndr_err_code
ndr_pull_samr_QueryUserInfo2(struct ndr_pull
*ndr
, int flags
, struct samr_QueryUserInfo2
*r
)
10170 uint32_t _ptr_info
;
10171 TALLOC_CTX
*_mem_save_user_handle_0
;
10172 TALLOC_CTX
*_mem_save_info_0
;
10173 TALLOC_CTX
*_mem_save_info_1
;
10174 if (flags
& NDR_IN
) {
10175 ZERO_STRUCT(r
->out
);
10177 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10178 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
10180 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10181 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
10182 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
10183 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10184 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
10185 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10186 ZERO_STRUCTP(r
->out
.info
);
10188 if (flags
& NDR_OUT
) {
10189 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10190 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10192 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10193 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10194 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10196 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10198 *r
->out
.info
= NULL
;
10200 if (*r
->out
.info
) {
10201 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10202 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10203 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10204 NDR_CHECK(ndr_pull_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10205 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10207 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10208 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10210 return NDR_ERR_SUCCESS
;
10213 _PUBLIC_
void ndr_print_samr_QueryUserInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryUserInfo2
*r
)
10215 ndr_print_struct(ndr
, name
, "samr_QueryUserInfo2");
10217 if (flags
& NDR_SET_VALUES
) {
10218 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10220 if (flags
& NDR_IN
) {
10221 ndr_print_struct(ndr
, "in", "samr_QueryUserInfo2");
10223 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
10225 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
10227 ndr_print_samr_UserInfoLevel(ndr
, "level", r
->in
.level
);
10230 if (flags
& NDR_OUT
) {
10231 ndr_print_struct(ndr
, "out", "samr_QueryUserInfo2");
10233 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10235 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10237 if (*r
->out
.info
) {
10238 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10239 ndr_print_samr_UserInfo(ndr
, "info", *r
->out
.info
);
10243 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10249 static enum ndr_err_code
ndr_push_samr_QueryDisplayInfo2(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDisplayInfo2
*r
)
10251 if (flags
& NDR_IN
) {
10252 if (r
->in
.domain_handle
== NULL
) {
10253 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10255 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10256 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10257 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.start_idx
));
10258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_entries
));
10259 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
10261 if (flags
& NDR_OUT
) {
10262 if (r
->out
.total_size
== NULL
) {
10263 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10265 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total_size
));
10266 if (r
->out
.returned_size
== NULL
) {
10267 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10269 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.returned_size
));
10270 if (r
->out
.info
== NULL
) {
10271 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10273 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10274 NDR_CHECK(ndr_push_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10275 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10277 return NDR_ERR_SUCCESS
;
10280 static enum ndr_err_code
ndr_pull_samr_QueryDisplayInfo2(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDisplayInfo2
*r
)
10282 TALLOC_CTX
*_mem_save_domain_handle_0
;
10283 TALLOC_CTX
*_mem_save_total_size_0
;
10284 TALLOC_CTX
*_mem_save_returned_size_0
;
10285 TALLOC_CTX
*_mem_save_info_0
;
10286 if (flags
& NDR_IN
) {
10287 ZERO_STRUCT(r
->out
);
10289 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10290 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
10292 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10293 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
10294 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10295 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10296 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10297 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.start_idx
));
10298 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_entries
));
10299 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
10300 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
10301 ZERO_STRUCTP(r
->out
.total_size
);
10302 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
10303 ZERO_STRUCTP(r
->out
.returned_size
);
10304 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10305 ZERO_STRUCTP(r
->out
.info
);
10307 if (flags
& NDR_OUT
) {
10308 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10309 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
10311 _mem_save_total_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10312 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total_size
, LIBNDR_FLAG_REF_ALLOC
);
10313 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total_size
));
10314 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_size_0
, LIBNDR_FLAG_REF_ALLOC
);
10315 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10316 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
10318 _mem_save_returned_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10319 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_size
, LIBNDR_FLAG_REF_ALLOC
);
10320 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.returned_size
));
10321 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_size_0
, LIBNDR_FLAG_REF_ALLOC
);
10322 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10323 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10325 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10326 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10327 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10328 NDR_CHECK(ndr_pull_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10329 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10330 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10332 return NDR_ERR_SUCCESS
;
10335 _PUBLIC_
void ndr_print_samr_QueryDisplayInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDisplayInfo2
*r
)
10337 ndr_print_struct(ndr
, name
, "samr_QueryDisplayInfo2");
10339 if (flags
& NDR_SET_VALUES
) {
10340 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10342 if (flags
& NDR_IN
) {
10343 ndr_print_struct(ndr
, "in", "samr_QueryDisplayInfo2");
10345 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10347 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10349 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10350 ndr_print_uint32(ndr
, "start_idx", r
->in
.start_idx
);
10351 ndr_print_uint32(ndr
, "max_entries", r
->in
.max_entries
);
10352 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
10355 if (flags
& NDR_OUT
) {
10356 ndr_print_struct(ndr
, "out", "samr_QueryDisplayInfo2");
10358 ndr_print_ptr(ndr
, "total_size", r
->out
.total_size
);
10360 ndr_print_uint32(ndr
, "total_size", *r
->out
.total_size
);
10362 ndr_print_ptr(ndr
, "returned_size", r
->out
.returned_size
);
10364 ndr_print_uint32(ndr
, "returned_size", *r
->out
.returned_size
);
10366 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10368 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
10369 ndr_print_samr_DispInfo(ndr
, "info", r
->out
.info
);
10371 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10377 static enum ndr_err_code
ndr_push_samr_GetDisplayEnumerationIndex2(struct ndr_push
*ndr
, int flags
, const struct samr_GetDisplayEnumerationIndex2
*r
)
10379 if (flags
& NDR_IN
) {
10380 if (r
->in
.domain_handle
== NULL
) {
10381 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10383 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10384 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10385 if (r
->in
.name
== NULL
) {
10386 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10388 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
10390 if (flags
& NDR_OUT
) {
10391 if (r
->out
.idx
== NULL
) {
10392 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10394 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.idx
));
10395 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10397 return NDR_ERR_SUCCESS
;
10400 static enum ndr_err_code
ndr_pull_samr_GetDisplayEnumerationIndex2(struct ndr_pull
*ndr
, int flags
, struct samr_GetDisplayEnumerationIndex2
*r
)
10402 TALLOC_CTX
*_mem_save_domain_handle_0
;
10403 TALLOC_CTX
*_mem_save_name_0
;
10404 TALLOC_CTX
*_mem_save_idx_0
;
10405 if (flags
& NDR_IN
) {
10406 ZERO_STRUCT(r
->out
);
10408 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10409 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
10411 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10412 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
10413 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10414 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10415 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10416 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10417 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
10419 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10420 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
10421 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
10422 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
10423 NDR_PULL_ALLOC(ndr
, r
->out
.idx
);
10424 ZERO_STRUCTP(r
->out
.idx
);
10426 if (flags
& NDR_OUT
) {
10427 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10428 NDR_PULL_ALLOC(ndr
, r
->out
.idx
);
10430 _mem_save_idx_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10431 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.idx
, LIBNDR_FLAG_REF_ALLOC
);
10432 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.idx
));
10433 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_idx_0
, LIBNDR_FLAG_REF_ALLOC
);
10434 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10436 return NDR_ERR_SUCCESS
;
10439 _PUBLIC_
void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetDisplayEnumerationIndex2
*r
)
10441 ndr_print_struct(ndr
, name
, "samr_GetDisplayEnumerationIndex2");
10443 if (flags
& NDR_SET_VALUES
) {
10444 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10446 if (flags
& NDR_IN
) {
10447 ndr_print_struct(ndr
, "in", "samr_GetDisplayEnumerationIndex2");
10449 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10451 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10453 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10454 ndr_print_ptr(ndr
, "name", r
->in
.name
);
10456 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
10460 if (flags
& NDR_OUT
) {
10461 ndr_print_struct(ndr
, "out", "samr_GetDisplayEnumerationIndex2");
10463 ndr_print_ptr(ndr
, "idx", r
->out
.idx
);
10465 ndr_print_uint32(ndr
, "idx", *r
->out
.idx
);
10467 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10473 static enum ndr_err_code
ndr_push_samr_CreateUser2(struct ndr_push
*ndr
, int flags
, const struct samr_CreateUser2
*r
)
10475 if (flags
& NDR_IN
) {
10476 if (r
->in
.domain_handle
== NULL
) {
10477 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10479 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10480 if (r
->in
.account_name
== NULL
) {
10481 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10483 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account_name
));
10484 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->in
.acct_flags
));
10485 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10487 if (flags
& NDR_OUT
) {
10488 if (r
->out
.user_handle
== NULL
) {
10489 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10491 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
10492 if (r
->out
.access_granted
== NULL
) {
10493 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10495 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.access_granted
));
10496 if (r
->out
.rid
== NULL
) {
10497 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10499 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
10500 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10502 return NDR_ERR_SUCCESS
;
10505 static enum ndr_err_code
ndr_pull_samr_CreateUser2(struct ndr_pull
*ndr
, int flags
, struct samr_CreateUser2
*r
)
10507 TALLOC_CTX
*_mem_save_domain_handle_0
;
10508 TALLOC_CTX
*_mem_save_account_name_0
;
10509 TALLOC_CTX
*_mem_save_user_handle_0
;
10510 TALLOC_CTX
*_mem_save_access_granted_0
;
10511 TALLOC_CTX
*_mem_save_rid_0
;
10512 if (flags
& NDR_IN
) {
10513 ZERO_STRUCT(r
->out
);
10515 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10516 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
10518 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10519 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
10520 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10521 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10522 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10523 NDR_PULL_ALLOC(ndr
, r
->in
.account_name
);
10525 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10526 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
10527 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account_name
));
10528 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
10529 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->in
.acct_flags
));
10530 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10531 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
10532 ZERO_STRUCTP(r
->out
.user_handle
);
10533 NDR_PULL_ALLOC(ndr
, r
->out
.access_granted
);
10534 ZERO_STRUCTP(r
->out
.access_granted
);
10535 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
10536 ZERO_STRUCTP(r
->out
.rid
);
10538 if (flags
& NDR_OUT
) {
10539 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10540 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
10542 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10543 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
10544 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
10545 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10546 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10547 NDR_PULL_ALLOC(ndr
, r
->out
.access_granted
);
10549 _mem_save_access_granted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10550 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.access_granted
, LIBNDR_FLAG_REF_ALLOC
);
10551 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.access_granted
));
10552 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_access_granted_0
, LIBNDR_FLAG_REF_ALLOC
);
10553 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10554 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
10556 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10557 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
10558 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
10559 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
10560 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10562 return NDR_ERR_SUCCESS
;
10565 _PUBLIC_
void ndr_print_samr_CreateUser2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_CreateUser2
*r
)
10567 ndr_print_struct(ndr
, name
, "samr_CreateUser2");
10569 if (flags
& NDR_SET_VALUES
) {
10570 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10572 if (flags
& NDR_IN
) {
10573 ndr_print_struct(ndr
, "in", "samr_CreateUser2");
10575 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10577 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10579 ndr_print_ptr(ndr
, "account_name", r
->in
.account_name
);
10581 ndr_print_lsa_String(ndr
, "account_name", r
->in
.account_name
);
10583 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->in
.acct_flags
);
10584 ndr_print_samr_UserAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
10587 if (flags
& NDR_OUT
) {
10588 ndr_print_struct(ndr
, "out", "samr_CreateUser2");
10590 ndr_print_ptr(ndr
, "user_handle", r
->out
.user_handle
);
10592 ndr_print_policy_handle(ndr
, "user_handle", r
->out
.user_handle
);
10594 ndr_print_ptr(ndr
, "access_granted", r
->out
.access_granted
);
10596 ndr_print_uint32(ndr
, "access_granted", *r
->out
.access_granted
);
10598 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
10600 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
10602 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10608 static enum ndr_err_code
ndr_push_samr_QueryDisplayInfo3(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDisplayInfo3
*r
)
10610 if (flags
& NDR_IN
) {
10611 if (r
->in
.domain_handle
== NULL
) {
10612 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10614 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10615 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10616 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.start_idx
));
10617 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_entries
));
10618 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
10620 if (flags
& NDR_OUT
) {
10621 if (r
->out
.total_size
== NULL
) {
10622 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10624 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total_size
));
10625 if (r
->out
.returned_size
== NULL
) {
10626 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10628 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.returned_size
));
10629 if (r
->out
.info
== NULL
) {
10630 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10632 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10633 NDR_CHECK(ndr_push_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10634 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10636 return NDR_ERR_SUCCESS
;
10639 static enum ndr_err_code
ndr_pull_samr_QueryDisplayInfo3(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDisplayInfo3
*r
)
10641 TALLOC_CTX
*_mem_save_domain_handle_0
;
10642 TALLOC_CTX
*_mem_save_total_size_0
;
10643 TALLOC_CTX
*_mem_save_returned_size_0
;
10644 TALLOC_CTX
*_mem_save_info_0
;
10645 if (flags
& NDR_IN
) {
10646 ZERO_STRUCT(r
->out
);
10648 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10649 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
10651 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10652 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
10653 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10654 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10655 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10656 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.start_idx
));
10657 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_entries
));
10658 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
10659 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
10660 ZERO_STRUCTP(r
->out
.total_size
);
10661 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
10662 ZERO_STRUCTP(r
->out
.returned_size
);
10663 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10664 ZERO_STRUCTP(r
->out
.info
);
10666 if (flags
& NDR_OUT
) {
10667 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10668 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
10670 _mem_save_total_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10671 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total_size
, LIBNDR_FLAG_REF_ALLOC
);
10672 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total_size
));
10673 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_size_0
, LIBNDR_FLAG_REF_ALLOC
);
10674 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10675 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
10677 _mem_save_returned_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10678 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_size
, LIBNDR_FLAG_REF_ALLOC
);
10679 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.returned_size
));
10680 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_size_0
, LIBNDR_FLAG_REF_ALLOC
);
10681 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10682 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10684 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10685 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10686 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10687 NDR_CHECK(ndr_pull_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10688 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10689 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10691 return NDR_ERR_SUCCESS
;
10694 _PUBLIC_
void ndr_print_samr_QueryDisplayInfo3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDisplayInfo3
*r
)
10696 ndr_print_struct(ndr
, name
, "samr_QueryDisplayInfo3");
10698 if (flags
& NDR_SET_VALUES
) {
10699 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10701 if (flags
& NDR_IN
) {
10702 ndr_print_struct(ndr
, "in", "samr_QueryDisplayInfo3");
10704 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10706 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10708 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10709 ndr_print_uint32(ndr
, "start_idx", r
->in
.start_idx
);
10710 ndr_print_uint32(ndr
, "max_entries", r
->in
.max_entries
);
10711 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
10714 if (flags
& NDR_OUT
) {
10715 ndr_print_struct(ndr
, "out", "samr_QueryDisplayInfo3");
10717 ndr_print_ptr(ndr
, "total_size", r
->out
.total_size
);
10719 ndr_print_uint32(ndr
, "total_size", *r
->out
.total_size
);
10721 ndr_print_ptr(ndr
, "returned_size", r
->out
.returned_size
);
10723 ndr_print_uint32(ndr
, "returned_size", *r
->out
.returned_size
);
10725 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10727 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
10728 ndr_print_samr_DispInfo(ndr
, "info", r
->out
.info
);
10730 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10736 static enum ndr_err_code
ndr_push_samr_AddMultipleMembersToAlias(struct ndr_push
*ndr
, int flags
, const struct samr_AddMultipleMembersToAlias
*r
)
10738 if (flags
& NDR_IN
) {
10739 if (r
->in
.alias_handle
== NULL
) {
10740 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10742 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
10743 if (r
->in
.sids
== NULL
) {
10744 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10746 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10748 if (flags
& NDR_OUT
) {
10749 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10751 return NDR_ERR_SUCCESS
;
10754 static enum ndr_err_code
ndr_pull_samr_AddMultipleMembersToAlias(struct ndr_pull
*ndr
, int flags
, struct samr_AddMultipleMembersToAlias
*r
)
10756 TALLOC_CTX
*_mem_save_alias_handle_0
;
10757 TALLOC_CTX
*_mem_save_sids_0
;
10758 if (flags
& NDR_IN
) {
10759 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10760 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
10762 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10763 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
10764 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
10765 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10766 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10767 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
10769 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10770 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
10771 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10772 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
10774 if (flags
& NDR_OUT
) {
10775 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10777 return NDR_ERR_SUCCESS
;
10780 _PUBLIC_
void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_AddMultipleMembersToAlias
*r
)
10782 ndr_print_struct(ndr
, name
, "samr_AddMultipleMembersToAlias");
10784 if (flags
& NDR_SET_VALUES
) {
10785 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10787 if (flags
& NDR_IN
) {
10788 ndr_print_struct(ndr
, "in", "samr_AddMultipleMembersToAlias");
10790 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
10792 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
10794 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
10796 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
10800 if (flags
& NDR_OUT
) {
10801 ndr_print_struct(ndr
, "out", "samr_AddMultipleMembersToAlias");
10803 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10809 static enum ndr_err_code
ndr_push_samr_RemoveMultipleMembersFromAlias(struct ndr_push
*ndr
, int flags
, const struct samr_RemoveMultipleMembersFromAlias
*r
)
10811 if (flags
& NDR_IN
) {
10812 if (r
->in
.alias_handle
== NULL
) {
10813 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10815 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
10816 if (r
->in
.sids
== NULL
) {
10817 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10819 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10821 if (flags
& NDR_OUT
) {
10822 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10824 return NDR_ERR_SUCCESS
;
10827 static enum ndr_err_code
ndr_pull_samr_RemoveMultipleMembersFromAlias(struct ndr_pull
*ndr
, int flags
, struct samr_RemoveMultipleMembersFromAlias
*r
)
10829 TALLOC_CTX
*_mem_save_alias_handle_0
;
10830 TALLOC_CTX
*_mem_save_sids_0
;
10831 if (flags
& NDR_IN
) {
10832 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10833 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
10835 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10836 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
10837 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
10838 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10839 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10840 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
10842 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10843 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
10844 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10845 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
10847 if (flags
& NDR_OUT
) {
10848 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10850 return NDR_ERR_SUCCESS
;
10853 _PUBLIC_
void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_RemoveMultipleMembersFromAlias
*r
)
10855 ndr_print_struct(ndr
, name
, "samr_RemoveMultipleMembersFromAlias");
10857 if (flags
& NDR_SET_VALUES
) {
10858 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10860 if (flags
& NDR_IN
) {
10861 ndr_print_struct(ndr
, "in", "samr_RemoveMultipleMembersFromAlias");
10863 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
10865 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
10867 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
10869 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
10873 if (flags
& NDR_OUT
) {
10874 ndr_print_struct(ndr
, "out", "samr_RemoveMultipleMembersFromAlias");
10876 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10882 static enum ndr_err_code
ndr_push_samr_OemChangePasswordUser2(struct ndr_push
*ndr
, int flags
, const struct samr_OemChangePasswordUser2
*r
)
10884 if (flags
& NDR_IN
) {
10885 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
10886 if (r
->in
.server
) {
10887 NDR_CHECK(ndr_push_lsa_AsciiString(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
10889 if (r
->in
.account
== NULL
) {
10890 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10892 NDR_CHECK(ndr_push_lsa_AsciiString(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
10893 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password
));
10894 if (r
->in
.password
) {
10895 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.password
));
10897 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.hash
));
10899 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.hash
));
10902 if (flags
& NDR_OUT
) {
10903 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10905 return NDR_ERR_SUCCESS
;
10908 static enum ndr_err_code
ndr_pull_samr_OemChangePasswordUser2(struct ndr_pull
*ndr
, int flags
, struct samr_OemChangePasswordUser2
*r
)
10910 uint32_t _ptr_server
;
10911 uint32_t _ptr_password
;
10912 uint32_t _ptr_hash
;
10913 TALLOC_CTX
*_mem_save_server_0
;
10914 TALLOC_CTX
*_mem_save_account_0
;
10915 TALLOC_CTX
*_mem_save_password_0
;
10916 TALLOC_CTX
*_mem_save_hash_0
;
10917 if (flags
& NDR_IN
) {
10918 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
10920 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
10922 r
->in
.server
= NULL
;
10924 if (r
->in
.server
) {
10925 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10926 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
10927 NDR_CHECK(ndr_pull_lsa_AsciiString(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
10928 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
10930 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10931 NDR_PULL_ALLOC(ndr
, r
->in
.account
);
10933 _mem_save_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10934 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account
, LIBNDR_FLAG_REF_ALLOC
);
10935 NDR_CHECK(ndr_pull_lsa_AsciiString(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
10936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_0
, LIBNDR_FLAG_REF_ALLOC
);
10937 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
10938 if (_ptr_password
) {
10939 NDR_PULL_ALLOC(ndr
, r
->in
.password
);
10941 r
->in
.password
= NULL
;
10943 if (r
->in
.password
) {
10944 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10945 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password
, 0);
10946 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.password
));
10947 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
10949 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hash
));
10951 NDR_PULL_ALLOC(ndr
, r
->in
.hash
);
10956 _mem_save_hash_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10957 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.hash
, 0);
10958 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.hash
));
10959 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hash_0
, 0);
10962 if (flags
& NDR_OUT
) {
10963 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10965 return NDR_ERR_SUCCESS
;
10968 _PUBLIC_
void ndr_print_samr_OemChangePasswordUser2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OemChangePasswordUser2
*r
)
10970 ndr_print_struct(ndr
, name
, "samr_OemChangePasswordUser2");
10972 if (flags
& NDR_SET_VALUES
) {
10973 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10975 if (flags
& NDR_IN
) {
10976 ndr_print_struct(ndr
, "in", "samr_OemChangePasswordUser2");
10978 ndr_print_ptr(ndr
, "server", r
->in
.server
);
10980 if (r
->in
.server
) {
10981 ndr_print_lsa_AsciiString(ndr
, "server", r
->in
.server
);
10984 ndr_print_ptr(ndr
, "account", r
->in
.account
);
10986 ndr_print_lsa_AsciiString(ndr
, "account", r
->in
.account
);
10988 ndr_print_ptr(ndr
, "password", r
->in
.password
);
10990 if (r
->in
.password
) {
10991 ndr_print_samr_CryptPassword(ndr
, "password", r
->in
.password
);
10994 ndr_print_ptr(ndr
, "hash", r
->in
.hash
);
10997 ndr_print_samr_Password(ndr
, "hash", r
->in
.hash
);
11002 if (flags
& NDR_OUT
) {
11003 ndr_print_struct(ndr
, "out", "samr_OemChangePasswordUser2");
11005 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11011 static enum ndr_err_code
ndr_push_samr_ChangePasswordUser2(struct ndr_push
*ndr
, int flags
, const struct samr_ChangePasswordUser2
*r
)
11013 if (flags
& NDR_IN
) {
11014 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
11015 if (r
->in
.server
) {
11016 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
11018 if (r
->in
.account
== NULL
) {
11019 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11021 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
11022 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_password
));
11023 if (r
->in
.nt_password
) {
11024 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.nt_password
));
11026 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_verifier
));
11027 if (r
->in
.nt_verifier
) {
11028 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_verifier
));
11030 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.lm_change
));
11031 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_password
));
11032 if (r
->in
.lm_password
) {
11033 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.lm_password
));
11035 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_verifier
));
11036 if (r
->in
.lm_verifier
) {
11037 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_verifier
));
11040 if (flags
& NDR_OUT
) {
11041 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11043 return NDR_ERR_SUCCESS
;
11046 static enum ndr_err_code
ndr_pull_samr_ChangePasswordUser2(struct ndr_pull
*ndr
, int flags
, struct samr_ChangePasswordUser2
*r
)
11048 uint32_t _ptr_server
;
11049 uint32_t _ptr_nt_password
;
11050 uint32_t _ptr_nt_verifier
;
11051 uint32_t _ptr_lm_password
;
11052 uint32_t _ptr_lm_verifier
;
11053 TALLOC_CTX
*_mem_save_server_0
;
11054 TALLOC_CTX
*_mem_save_account_0
;
11055 TALLOC_CTX
*_mem_save_nt_password_0
;
11056 TALLOC_CTX
*_mem_save_nt_verifier_0
;
11057 TALLOC_CTX
*_mem_save_lm_password_0
;
11058 TALLOC_CTX
*_mem_save_lm_verifier_0
;
11059 if (flags
& NDR_IN
) {
11060 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
11062 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
11064 r
->in
.server
= NULL
;
11066 if (r
->in
.server
) {
11067 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11068 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
11069 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
11070 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
11072 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11073 NDR_PULL_ALLOC(ndr
, r
->in
.account
);
11075 _mem_save_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11076 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account
, LIBNDR_FLAG_REF_ALLOC
);
11077 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
11078 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_0
, LIBNDR_FLAG_REF_ALLOC
);
11079 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_password
));
11080 if (_ptr_nt_password
) {
11081 NDR_PULL_ALLOC(ndr
, r
->in
.nt_password
);
11083 r
->in
.nt_password
= NULL
;
11085 if (r
->in
.nt_password
) {
11086 _mem_save_nt_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11087 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_password
, 0);
11088 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.nt_password
));
11089 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_password_0
, 0);
11091 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_verifier
));
11092 if (_ptr_nt_verifier
) {
11093 NDR_PULL_ALLOC(ndr
, r
->in
.nt_verifier
);
11095 r
->in
.nt_verifier
= NULL
;
11097 if (r
->in
.nt_verifier
) {
11098 _mem_save_nt_verifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11099 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_verifier
, 0);
11100 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_verifier
));
11101 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_verifier_0
, 0);
11103 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.lm_change
));
11104 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_password
));
11105 if (_ptr_lm_password
) {
11106 NDR_PULL_ALLOC(ndr
, r
->in
.lm_password
);
11108 r
->in
.lm_password
= NULL
;
11110 if (r
->in
.lm_password
) {
11111 _mem_save_lm_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11112 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_password
, 0);
11113 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.lm_password
));
11114 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_password_0
, 0);
11116 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_verifier
));
11117 if (_ptr_lm_verifier
) {
11118 NDR_PULL_ALLOC(ndr
, r
->in
.lm_verifier
);
11120 r
->in
.lm_verifier
= NULL
;
11122 if (r
->in
.lm_verifier
) {
11123 _mem_save_lm_verifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11124 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_verifier
, 0);
11125 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_verifier
));
11126 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_verifier_0
, 0);
11129 if (flags
& NDR_OUT
) {
11130 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11132 return NDR_ERR_SUCCESS
;
11135 _PUBLIC_
void ndr_print_samr_ChangePasswordUser2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_ChangePasswordUser2
*r
)
11137 ndr_print_struct(ndr
, name
, "samr_ChangePasswordUser2");
11139 if (flags
& NDR_SET_VALUES
) {
11140 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11142 if (flags
& NDR_IN
) {
11143 ndr_print_struct(ndr
, "in", "samr_ChangePasswordUser2");
11145 ndr_print_ptr(ndr
, "server", r
->in
.server
);
11147 if (r
->in
.server
) {
11148 ndr_print_lsa_String(ndr
, "server", r
->in
.server
);
11151 ndr_print_ptr(ndr
, "account", r
->in
.account
);
11153 ndr_print_lsa_String(ndr
, "account", r
->in
.account
);
11155 ndr_print_ptr(ndr
, "nt_password", r
->in
.nt_password
);
11157 if (r
->in
.nt_password
) {
11158 ndr_print_samr_CryptPassword(ndr
, "nt_password", r
->in
.nt_password
);
11161 ndr_print_ptr(ndr
, "nt_verifier", r
->in
.nt_verifier
);
11163 if (r
->in
.nt_verifier
) {
11164 ndr_print_samr_Password(ndr
, "nt_verifier", r
->in
.nt_verifier
);
11167 ndr_print_uint8(ndr
, "lm_change", r
->in
.lm_change
);
11168 ndr_print_ptr(ndr
, "lm_password", r
->in
.lm_password
);
11170 if (r
->in
.lm_password
) {
11171 ndr_print_samr_CryptPassword(ndr
, "lm_password", r
->in
.lm_password
);
11174 ndr_print_ptr(ndr
, "lm_verifier", r
->in
.lm_verifier
);
11176 if (r
->in
.lm_verifier
) {
11177 ndr_print_samr_Password(ndr
, "lm_verifier", r
->in
.lm_verifier
);
11182 if (flags
& NDR_OUT
) {
11183 ndr_print_struct(ndr
, "out", "samr_ChangePasswordUser2");
11185 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11191 static enum ndr_err_code
ndr_push_samr_GetDomPwInfo(struct ndr_push
*ndr
, int flags
, const struct samr_GetDomPwInfo
*r
)
11193 if (flags
& NDR_IN
) {
11194 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_name
));
11195 if (r
->in
.domain_name
) {
11196 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_name
));
11199 if (flags
& NDR_OUT
) {
11200 if (r
->out
.info
== NULL
) {
11201 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11203 NDR_CHECK(ndr_push_samr_PwInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
11204 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11206 return NDR_ERR_SUCCESS
;
11209 static enum ndr_err_code
ndr_pull_samr_GetDomPwInfo(struct ndr_pull
*ndr
, int flags
, struct samr_GetDomPwInfo
*r
)
11211 uint32_t _ptr_domain_name
;
11212 TALLOC_CTX
*_mem_save_domain_name_0
;
11213 TALLOC_CTX
*_mem_save_info_0
;
11214 if (flags
& NDR_IN
) {
11215 ZERO_STRUCT(r
->out
);
11217 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
11218 if (_ptr_domain_name
) {
11219 NDR_PULL_ALLOC(ndr
, r
->in
.domain_name
);
11221 r
->in
.domain_name
= NULL
;
11223 if (r
->in
.domain_name
) {
11224 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11225 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_name
, 0);
11226 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_name
));
11227 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
11229 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
11230 ZERO_STRUCTP(r
->out
.info
);
11232 if (flags
& NDR_OUT
) {
11233 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11234 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
11236 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11237 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
11238 NDR_CHECK(ndr_pull_samr_PwInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
11239 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11240 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11242 return NDR_ERR_SUCCESS
;
11245 _PUBLIC_
void ndr_print_samr_GetDomPwInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetDomPwInfo
*r
)
11247 ndr_print_struct(ndr
, name
, "samr_GetDomPwInfo");
11249 if (flags
& NDR_SET_VALUES
) {
11250 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11252 if (flags
& NDR_IN
) {
11253 ndr_print_struct(ndr
, "in", "samr_GetDomPwInfo");
11255 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
11257 if (r
->in
.domain_name
) {
11258 ndr_print_lsa_String(ndr
, "domain_name", r
->in
.domain_name
);
11263 if (flags
& NDR_OUT
) {
11264 ndr_print_struct(ndr
, "out", "samr_GetDomPwInfo");
11266 ndr_print_ptr(ndr
, "info", r
->out
.info
);
11268 ndr_print_samr_PwInfo(ndr
, "info", r
->out
.info
);
11270 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11276 static enum ndr_err_code
ndr_push_samr_Connect2(struct ndr_push
*ndr
, int flags
, const struct samr_Connect2
*r
)
11278 if (flags
& NDR_IN
) {
11279 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
11280 if (r
->in
.system_name
) {
11281 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11282 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11283 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11284 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
11286 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11288 if (flags
& NDR_OUT
) {
11289 if (r
->out
.connect_handle
== NULL
) {
11290 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11292 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11293 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11295 return NDR_ERR_SUCCESS
;
11298 static enum ndr_err_code
ndr_pull_samr_Connect2(struct ndr_pull
*ndr
, int flags
, struct samr_Connect2
*r
)
11300 uint32_t _ptr_system_name
;
11301 TALLOC_CTX
*_mem_save_system_name_0
;
11302 TALLOC_CTX
*_mem_save_connect_handle_0
;
11303 if (flags
& NDR_IN
) {
11304 ZERO_STRUCT(r
->out
);
11306 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
11307 if (_ptr_system_name
) {
11308 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
11310 r
->in
.system_name
= NULL
;
11312 if (r
->in
.system_name
) {
11313 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11314 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
11315 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
11316 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
11317 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
11318 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.system_name
), ndr_get_array_length(ndr
, &r
->in
.system_name
));
11320 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
11321 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t), CH_UTF16
));
11322 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
11324 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11325 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11326 ZERO_STRUCTP(r
->out
.connect_handle
);
11328 if (flags
& NDR_OUT
) {
11329 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11330 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11332 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11333 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
11334 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11336 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11338 return NDR_ERR_SUCCESS
;
11341 _PUBLIC_
void ndr_print_samr_Connect2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect2
*r
)
11343 ndr_print_struct(ndr
, name
, "samr_Connect2");
11345 if (flags
& NDR_SET_VALUES
) {
11346 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11348 if (flags
& NDR_IN
) {
11349 ndr_print_struct(ndr
, "in", "samr_Connect2");
11351 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
11353 if (r
->in
.system_name
) {
11354 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
11357 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
11360 if (flags
& NDR_OUT
) {
11361 ndr_print_struct(ndr
, "out", "samr_Connect2");
11363 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
11365 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
11367 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11373 _PUBLIC_
enum ndr_err_code
ndr_push_samr_SetUserInfo2(struct ndr_push
*ndr
, int flags
, const struct samr_SetUserInfo2
*r
)
11375 if (flags
& NDR_IN
) {
11376 if (r
->in
.user_handle
== NULL
) {
11377 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11379 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
11380 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
11381 if (r
->in
.info
== NULL
) {
11382 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11384 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
11385 NDR_CHECK(ndr_push_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11387 if (flags
& NDR_OUT
) {
11388 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11390 return NDR_ERR_SUCCESS
;
11393 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_SetUserInfo2(struct ndr_pull
*ndr
, int flags
, struct samr_SetUserInfo2
*r
)
11395 TALLOC_CTX
*_mem_save_user_handle_0
;
11396 TALLOC_CTX
*_mem_save_info_0
;
11397 if (flags
& NDR_IN
) {
11398 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11399 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
11401 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11402 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
11403 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
11404 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11405 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11406 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11407 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
11409 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11410 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
11411 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
11412 NDR_CHECK(ndr_pull_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11413 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11415 if (flags
& NDR_OUT
) {
11416 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11418 return NDR_ERR_SUCCESS
;
11421 _PUBLIC_
void ndr_print_samr_SetUserInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetUserInfo2
*r
)
11423 ndr_print_struct(ndr
, name
, "samr_SetUserInfo2");
11425 if (flags
& NDR_SET_VALUES
) {
11426 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11428 if (flags
& NDR_IN
) {
11429 ndr_print_struct(ndr
, "in", "samr_SetUserInfo2");
11431 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
11433 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
11435 ndr_print_samr_UserInfoLevel(ndr
, "level", r
->in
.level
);
11436 ndr_print_ptr(ndr
, "info", r
->in
.info
);
11438 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
11439 ndr_print_samr_UserInfo(ndr
, "info", r
->in
.info
);
11443 if (flags
& NDR_OUT
) {
11444 ndr_print_struct(ndr
, "out", "samr_SetUserInfo2");
11446 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11452 static enum ndr_err_code
ndr_push_samr_SetBootKeyInformation(struct ndr_push
*ndr
, int flags
, const struct samr_SetBootKeyInformation
*r
)
11454 if (flags
& NDR_IN
) {
11455 if (r
->in
.connect_handle
== NULL
) {
11456 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11458 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
11459 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
11460 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
11461 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown3
));
11463 if (flags
& NDR_OUT
) {
11464 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11466 return NDR_ERR_SUCCESS
;
11469 static enum ndr_err_code
ndr_pull_samr_SetBootKeyInformation(struct ndr_pull
*ndr
, int flags
, struct samr_SetBootKeyInformation
*r
)
11471 TALLOC_CTX
*_mem_save_connect_handle_0
;
11472 if (flags
& NDR_IN
) {
11473 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11474 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
11476 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11477 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
11478 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
11479 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11480 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
11481 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
11482 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown3
));
11484 if (flags
& NDR_OUT
) {
11485 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11487 return NDR_ERR_SUCCESS
;
11490 _PUBLIC_
void ndr_print_samr_SetBootKeyInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetBootKeyInformation
*r
)
11492 ndr_print_struct(ndr
, name
, "samr_SetBootKeyInformation");
11494 if (flags
& NDR_SET_VALUES
) {
11495 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11497 if (flags
& NDR_IN
) {
11498 ndr_print_struct(ndr
, "in", "samr_SetBootKeyInformation");
11500 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
11502 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
11504 ndr_print_uint32(ndr
, "unknown1", r
->in
.unknown1
);
11505 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
11506 ndr_print_uint32(ndr
, "unknown3", r
->in
.unknown3
);
11509 if (flags
& NDR_OUT
) {
11510 ndr_print_struct(ndr
, "out", "samr_SetBootKeyInformation");
11512 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11518 static enum ndr_err_code
ndr_push_samr_GetBootKeyInformation(struct ndr_push
*ndr
, int flags
, const struct samr_GetBootKeyInformation
*r
)
11520 if (flags
& NDR_IN
) {
11521 if (r
->in
.domain_handle
== NULL
) {
11522 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11524 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
11526 if (flags
& NDR_OUT
) {
11527 if (r
->out
.unknown
== NULL
) {
11528 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11530 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.unknown
));
11531 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11533 return NDR_ERR_SUCCESS
;
11536 static enum ndr_err_code
ndr_pull_samr_GetBootKeyInformation(struct ndr_pull
*ndr
, int flags
, struct samr_GetBootKeyInformation
*r
)
11538 TALLOC_CTX
*_mem_save_domain_handle_0
;
11539 TALLOC_CTX
*_mem_save_unknown_0
;
11540 if (flags
& NDR_IN
) {
11541 ZERO_STRUCT(r
->out
);
11543 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11544 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
11546 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11547 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
11548 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
11549 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11550 NDR_PULL_ALLOC(ndr
, r
->out
.unknown
);
11551 ZERO_STRUCTP(r
->out
.unknown
);
11553 if (flags
& NDR_OUT
) {
11554 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11555 NDR_PULL_ALLOC(ndr
, r
->out
.unknown
);
11557 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11558 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.unknown
, LIBNDR_FLAG_REF_ALLOC
);
11559 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.unknown
));
11560 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, LIBNDR_FLAG_REF_ALLOC
);
11561 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11563 return NDR_ERR_SUCCESS
;
11566 _PUBLIC_
void ndr_print_samr_GetBootKeyInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetBootKeyInformation
*r
)
11568 ndr_print_struct(ndr
, name
, "samr_GetBootKeyInformation");
11570 if (flags
& NDR_SET_VALUES
) {
11571 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11573 if (flags
& NDR_IN
) {
11574 ndr_print_struct(ndr
, "in", "samr_GetBootKeyInformation");
11576 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
11578 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
11582 if (flags
& NDR_OUT
) {
11583 ndr_print_struct(ndr
, "out", "samr_GetBootKeyInformation");
11585 ndr_print_ptr(ndr
, "unknown", r
->out
.unknown
);
11587 ndr_print_uint32(ndr
, "unknown", *r
->out
.unknown
);
11589 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11595 static enum ndr_err_code
ndr_push_samr_Connect3(struct ndr_push
*ndr
, int flags
, const struct samr_Connect3
*r
)
11597 if (flags
& NDR_IN
) {
11598 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
11599 if (r
->in
.system_name
) {
11600 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11601 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11602 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11603 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
11605 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown
));
11606 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11608 if (flags
& NDR_OUT
) {
11609 if (r
->out
.connect_handle
== NULL
) {
11610 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11612 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11613 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11615 return NDR_ERR_SUCCESS
;
11618 static enum ndr_err_code
ndr_pull_samr_Connect3(struct ndr_pull
*ndr
, int flags
, struct samr_Connect3
*r
)
11620 uint32_t _ptr_system_name
;
11621 TALLOC_CTX
*_mem_save_system_name_0
;
11622 TALLOC_CTX
*_mem_save_connect_handle_0
;
11623 if (flags
& NDR_IN
) {
11624 ZERO_STRUCT(r
->out
);
11626 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
11627 if (_ptr_system_name
) {
11628 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
11630 r
->in
.system_name
= NULL
;
11632 if (r
->in
.system_name
) {
11633 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11634 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
11635 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
11636 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
11637 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
11638 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.system_name
), ndr_get_array_length(ndr
, &r
->in
.system_name
));
11640 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
11641 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t), CH_UTF16
));
11642 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
11644 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
11645 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11646 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11647 ZERO_STRUCTP(r
->out
.connect_handle
);
11649 if (flags
& NDR_OUT
) {
11650 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11651 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11653 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11654 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
11655 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11656 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11657 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11659 return NDR_ERR_SUCCESS
;
11662 _PUBLIC_
void ndr_print_samr_Connect3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect3
*r
)
11664 ndr_print_struct(ndr
, name
, "samr_Connect3");
11666 if (flags
& NDR_SET_VALUES
) {
11667 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11669 if (flags
& NDR_IN
) {
11670 ndr_print_struct(ndr
, "in", "samr_Connect3");
11672 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
11674 if (r
->in
.system_name
) {
11675 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
11678 ndr_print_uint32(ndr
, "unknown", r
->in
.unknown
);
11679 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
11682 if (flags
& NDR_OUT
) {
11683 ndr_print_struct(ndr
, "out", "samr_Connect3");
11685 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
11687 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
11689 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11695 static enum ndr_err_code
ndr_push_samr_Connect4(struct ndr_push
*ndr
, int flags
, const struct samr_Connect4
*r
)
11697 if (flags
& NDR_IN
) {
11698 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
11699 if (r
->in
.system_name
) {
11700 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11701 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
11702 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11703 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
11705 NDR_CHECK(ndr_push_samr_ConnectVersion(ndr
, NDR_SCALARS
, r
->in
.client_version
));
11706 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11708 if (flags
& NDR_OUT
) {
11709 if (r
->out
.connect_handle
== NULL
) {
11710 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11712 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11713 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11715 return NDR_ERR_SUCCESS
;
11718 static enum ndr_err_code
ndr_pull_samr_Connect4(struct ndr_pull
*ndr
, int flags
, struct samr_Connect4
*r
)
11720 uint32_t _ptr_system_name
;
11721 TALLOC_CTX
*_mem_save_system_name_0
;
11722 TALLOC_CTX
*_mem_save_connect_handle_0
;
11723 if (flags
& NDR_IN
) {
11724 ZERO_STRUCT(r
->out
);
11726 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
11727 if (_ptr_system_name
) {
11728 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
11730 r
->in
.system_name
= NULL
;
11732 if (r
->in
.system_name
) {
11733 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11734 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
11735 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
11736 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
11737 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
11738 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.system_name
), ndr_get_array_length(ndr
, &r
->in
.system_name
));
11740 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
11741 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t), CH_UTF16
));
11742 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
11744 NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr
, NDR_SCALARS
, &r
->in
.client_version
));
11745 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11746 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11747 ZERO_STRUCTP(r
->out
.connect_handle
);
11749 if (flags
& NDR_OUT
) {
11750 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11751 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11753 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11754 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
11755 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11756 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11757 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11759 return NDR_ERR_SUCCESS
;
11762 _PUBLIC_
void ndr_print_samr_Connect4(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect4
*r
)
11764 ndr_print_struct(ndr
, name
, "samr_Connect4");
11766 if (flags
& NDR_SET_VALUES
) {
11767 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11769 if (flags
& NDR_IN
) {
11770 ndr_print_struct(ndr
, "in", "samr_Connect4");
11772 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
11774 if (r
->in
.system_name
) {
11775 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
11778 ndr_print_samr_ConnectVersion(ndr
, "client_version", r
->in
.client_version
);
11779 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
11782 if (flags
& NDR_OUT
) {
11783 ndr_print_struct(ndr
, "out", "samr_Connect4");
11785 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
11787 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
11789 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11795 static enum ndr_err_code
ndr_push_samr_ChangePasswordUser3(struct ndr_push
*ndr
, int flags
, const struct samr_ChangePasswordUser3
*r
)
11797 if (flags
& NDR_IN
) {
11798 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
11799 if (r
->in
.server
) {
11800 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
11802 if (r
->in
.account
== NULL
) {
11803 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11805 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
11806 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_password
));
11807 if (r
->in
.nt_password
) {
11808 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.nt_password
));
11810 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_verifier
));
11811 if (r
->in
.nt_verifier
) {
11812 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_verifier
));
11814 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.lm_change
));
11815 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_password
));
11816 if (r
->in
.lm_password
) {
11817 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.lm_password
));
11819 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_verifier
));
11820 if (r
->in
.lm_verifier
) {
11821 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_verifier
));
11823 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password3
));
11824 if (r
->in
.password3
) {
11825 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.password3
));
11828 if (flags
& NDR_OUT
) {
11829 if (r
->out
.dominfo
== NULL
) {
11830 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11832 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.dominfo
));
11833 if (*r
->out
.dominfo
) {
11834 NDR_CHECK(ndr_push_samr_DomInfo1(ndr
, NDR_SCALARS
, *r
->out
.dominfo
));
11836 if (r
->out
.reject
== NULL
) {
11837 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11839 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.reject
));
11840 if (*r
->out
.reject
) {
11841 NDR_CHECK(ndr_push_userPwdChangeFailureInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.reject
));
11843 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11845 return NDR_ERR_SUCCESS
;
11848 static enum ndr_err_code
ndr_pull_samr_ChangePasswordUser3(struct ndr_pull
*ndr
, int flags
, struct samr_ChangePasswordUser3
*r
)
11850 uint32_t _ptr_server
;
11851 uint32_t _ptr_nt_password
;
11852 uint32_t _ptr_nt_verifier
;
11853 uint32_t _ptr_lm_password
;
11854 uint32_t _ptr_lm_verifier
;
11855 uint32_t _ptr_password3
;
11856 uint32_t _ptr_dominfo
;
11857 uint32_t _ptr_reject
;
11858 TALLOC_CTX
*_mem_save_server_0
;
11859 TALLOC_CTX
*_mem_save_account_0
;
11860 TALLOC_CTX
*_mem_save_nt_password_0
;
11861 TALLOC_CTX
*_mem_save_nt_verifier_0
;
11862 TALLOC_CTX
*_mem_save_lm_password_0
;
11863 TALLOC_CTX
*_mem_save_lm_verifier_0
;
11864 TALLOC_CTX
*_mem_save_password3_0
;
11865 TALLOC_CTX
*_mem_save_dominfo_0
;
11866 TALLOC_CTX
*_mem_save_dominfo_1
;
11867 TALLOC_CTX
*_mem_save_reject_0
;
11868 TALLOC_CTX
*_mem_save_reject_1
;
11869 if (flags
& NDR_IN
) {
11870 ZERO_STRUCT(r
->out
);
11872 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
11874 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
11876 r
->in
.server
= NULL
;
11878 if (r
->in
.server
) {
11879 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11880 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
11881 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
11882 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
11884 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11885 NDR_PULL_ALLOC(ndr
, r
->in
.account
);
11887 _mem_save_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11888 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account
, LIBNDR_FLAG_REF_ALLOC
);
11889 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
11890 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_0
, LIBNDR_FLAG_REF_ALLOC
);
11891 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_password
));
11892 if (_ptr_nt_password
) {
11893 NDR_PULL_ALLOC(ndr
, r
->in
.nt_password
);
11895 r
->in
.nt_password
= NULL
;
11897 if (r
->in
.nt_password
) {
11898 _mem_save_nt_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11899 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_password
, 0);
11900 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.nt_password
));
11901 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_password_0
, 0);
11903 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_verifier
));
11904 if (_ptr_nt_verifier
) {
11905 NDR_PULL_ALLOC(ndr
, r
->in
.nt_verifier
);
11907 r
->in
.nt_verifier
= NULL
;
11909 if (r
->in
.nt_verifier
) {
11910 _mem_save_nt_verifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11911 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_verifier
, 0);
11912 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_verifier
));
11913 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_verifier_0
, 0);
11915 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.lm_change
));
11916 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_password
));
11917 if (_ptr_lm_password
) {
11918 NDR_PULL_ALLOC(ndr
, r
->in
.lm_password
);
11920 r
->in
.lm_password
= NULL
;
11922 if (r
->in
.lm_password
) {
11923 _mem_save_lm_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11924 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_password
, 0);
11925 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.lm_password
));
11926 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_password_0
, 0);
11928 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_verifier
));
11929 if (_ptr_lm_verifier
) {
11930 NDR_PULL_ALLOC(ndr
, r
->in
.lm_verifier
);
11932 r
->in
.lm_verifier
= NULL
;
11934 if (r
->in
.lm_verifier
) {
11935 _mem_save_lm_verifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11936 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_verifier
, 0);
11937 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_verifier
));
11938 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_verifier_0
, 0);
11940 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password3
));
11941 if (_ptr_password3
) {
11942 NDR_PULL_ALLOC(ndr
, r
->in
.password3
);
11944 r
->in
.password3
= NULL
;
11946 if (r
->in
.password3
) {
11947 _mem_save_password3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11948 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password3
, 0);
11949 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.password3
));
11950 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password3_0
, 0);
11952 NDR_PULL_ALLOC(ndr
, r
->out
.dominfo
);
11953 ZERO_STRUCTP(r
->out
.dominfo
);
11954 NDR_PULL_ALLOC(ndr
, r
->out
.reject
);
11955 ZERO_STRUCTP(r
->out
.reject
);
11957 if (flags
& NDR_OUT
) {
11958 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11959 NDR_PULL_ALLOC(ndr
, r
->out
.dominfo
);
11961 _mem_save_dominfo_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11962 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.dominfo
, LIBNDR_FLAG_REF_ALLOC
);
11963 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dominfo
));
11964 if (_ptr_dominfo
) {
11965 NDR_PULL_ALLOC(ndr
, *r
->out
.dominfo
);
11967 *r
->out
.dominfo
= NULL
;
11969 if (*r
->out
.dominfo
) {
11970 _mem_save_dominfo_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11971 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.dominfo
, 0);
11972 NDR_CHECK(ndr_pull_samr_DomInfo1(ndr
, NDR_SCALARS
, *r
->out
.dominfo
));
11973 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dominfo_1
, 0);
11975 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dominfo_0
, LIBNDR_FLAG_REF_ALLOC
);
11976 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11977 NDR_PULL_ALLOC(ndr
, r
->out
.reject
);
11979 _mem_save_reject_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11980 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.reject
, LIBNDR_FLAG_REF_ALLOC
);
11981 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_reject
));
11983 NDR_PULL_ALLOC(ndr
, *r
->out
.reject
);
11985 *r
->out
.reject
= NULL
;
11987 if (*r
->out
.reject
) {
11988 _mem_save_reject_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11989 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.reject
, 0);
11990 NDR_CHECK(ndr_pull_userPwdChangeFailureInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.reject
));
11991 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_reject_1
, 0);
11993 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_reject_0
, LIBNDR_FLAG_REF_ALLOC
);
11994 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11996 return NDR_ERR_SUCCESS
;
11999 _PUBLIC_
void ndr_print_samr_ChangePasswordUser3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_ChangePasswordUser3
*r
)
12001 ndr_print_struct(ndr
, name
, "samr_ChangePasswordUser3");
12003 if (flags
& NDR_SET_VALUES
) {
12004 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12006 if (flags
& NDR_IN
) {
12007 ndr_print_struct(ndr
, "in", "samr_ChangePasswordUser3");
12009 ndr_print_ptr(ndr
, "server", r
->in
.server
);
12011 if (r
->in
.server
) {
12012 ndr_print_lsa_String(ndr
, "server", r
->in
.server
);
12015 ndr_print_ptr(ndr
, "account", r
->in
.account
);
12017 ndr_print_lsa_String(ndr
, "account", r
->in
.account
);
12019 ndr_print_ptr(ndr
, "nt_password", r
->in
.nt_password
);
12021 if (r
->in
.nt_password
) {
12022 ndr_print_samr_CryptPassword(ndr
, "nt_password", r
->in
.nt_password
);
12025 ndr_print_ptr(ndr
, "nt_verifier", r
->in
.nt_verifier
);
12027 if (r
->in
.nt_verifier
) {
12028 ndr_print_samr_Password(ndr
, "nt_verifier", r
->in
.nt_verifier
);
12031 ndr_print_uint8(ndr
, "lm_change", r
->in
.lm_change
);
12032 ndr_print_ptr(ndr
, "lm_password", r
->in
.lm_password
);
12034 if (r
->in
.lm_password
) {
12035 ndr_print_samr_CryptPassword(ndr
, "lm_password", r
->in
.lm_password
);
12038 ndr_print_ptr(ndr
, "lm_verifier", r
->in
.lm_verifier
);
12040 if (r
->in
.lm_verifier
) {
12041 ndr_print_samr_Password(ndr
, "lm_verifier", r
->in
.lm_verifier
);
12044 ndr_print_ptr(ndr
, "password3", r
->in
.password3
);
12046 if (r
->in
.password3
) {
12047 ndr_print_samr_CryptPassword(ndr
, "password3", r
->in
.password3
);
12052 if (flags
& NDR_OUT
) {
12053 ndr_print_struct(ndr
, "out", "samr_ChangePasswordUser3");
12055 ndr_print_ptr(ndr
, "dominfo", r
->out
.dominfo
);
12057 ndr_print_ptr(ndr
, "dominfo", *r
->out
.dominfo
);
12059 if (*r
->out
.dominfo
) {
12060 ndr_print_samr_DomInfo1(ndr
, "dominfo", *r
->out
.dominfo
);
12064 ndr_print_ptr(ndr
, "reject", r
->out
.reject
);
12066 ndr_print_ptr(ndr
, "reject", *r
->out
.reject
);
12068 if (*r
->out
.reject
) {
12069 ndr_print_userPwdChangeFailureInformation(ndr
, "reject", *r
->out
.reject
);
12073 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12079 _PUBLIC_
enum ndr_err_code
ndr_push_samr_Connect5(struct ndr_push
*ndr
, int flags
, const struct samr_Connect5
*r
)
12081 if (flags
& NDR_IN
) {
12082 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
12083 if (r
->in
.system_name
) {
12084 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
12085 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
12086 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
12087 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
12089 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
12090 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level_in
));
12091 if (r
->in
.info_in
== NULL
) {
12092 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12094 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info_in
, r
->in
.level_in
));
12095 NDR_CHECK(ndr_push_samr_ConnectInfo(ndr
, NDR_SCALARS
, r
->in
.info_in
));
12097 if (flags
& NDR_OUT
) {
12098 if (r
->out
.level_out
== NULL
) {
12099 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12101 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
12102 if (r
->out
.info_out
== NULL
) {
12103 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12105 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info_out
, *r
->out
.level_out
));
12106 NDR_CHECK(ndr_push_samr_ConnectInfo(ndr
, NDR_SCALARS
, r
->out
.info_out
));
12107 if (r
->out
.connect_handle
== NULL
) {
12108 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12110 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
12111 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12113 return NDR_ERR_SUCCESS
;
12116 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_Connect5(struct ndr_pull
*ndr
, int flags
, struct samr_Connect5
*r
)
12118 uint32_t _ptr_system_name
;
12119 TALLOC_CTX
*_mem_save_system_name_0
;
12120 TALLOC_CTX
*_mem_save_info_in_0
;
12121 TALLOC_CTX
*_mem_save_level_out_0
;
12122 TALLOC_CTX
*_mem_save_info_out_0
;
12123 TALLOC_CTX
*_mem_save_connect_handle_0
;
12124 if (flags
& NDR_IN
) {
12125 ZERO_STRUCT(r
->out
);
12127 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
12128 if (_ptr_system_name
) {
12129 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
12131 r
->in
.system_name
= NULL
;
12133 if (r
->in
.system_name
) {
12134 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12135 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
12136 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
12137 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
12138 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
12139 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.system_name
), ndr_get_array_length(ndr
, &r
->in
.system_name
));
12141 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
12142 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t), CH_UTF16
));
12143 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
12145 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
12146 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level_in
));
12147 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12148 NDR_PULL_ALLOC(ndr
, r
->in
.info_in
);
12150 _mem_save_info_in_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12151 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_in
, LIBNDR_FLAG_REF_ALLOC
);
12152 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info_in
, r
->in
.level_in
));
12153 NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr
, NDR_SCALARS
, r
->in
.info_in
));
12154 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_in_0
, LIBNDR_FLAG_REF_ALLOC
);
12155 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
12156 ZERO_STRUCTP(r
->out
.level_out
);
12157 NDR_PULL_ALLOC(ndr
, r
->out
.info_out
);
12158 ZERO_STRUCTP(r
->out
.info_out
);
12159 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
12160 ZERO_STRUCTP(r
->out
.connect_handle
);
12162 if (flags
& NDR_OUT
) {
12163 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12164 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
12166 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12167 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
12168 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
12169 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
12170 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12171 NDR_PULL_ALLOC(ndr
, r
->out
.info_out
);
12173 _mem_save_info_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12174 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info_out
, LIBNDR_FLAG_REF_ALLOC
);
12175 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info_out
, *r
->out
.level_out
));
12176 NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr
, NDR_SCALARS
, r
->out
.info_out
));
12177 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_out_0
, LIBNDR_FLAG_REF_ALLOC
);
12178 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12179 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
12181 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12182 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
12183 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
12184 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12185 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12187 return NDR_ERR_SUCCESS
;
12190 _PUBLIC_
void ndr_print_samr_Connect5(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect5
*r
)
12192 ndr_print_struct(ndr
, name
, "samr_Connect5");
12194 if (flags
& NDR_SET_VALUES
) {
12195 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12197 if (flags
& NDR_IN
) {
12198 ndr_print_struct(ndr
, "in", "samr_Connect5");
12200 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
12202 if (r
->in
.system_name
) {
12203 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
12206 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
12207 ndr_print_uint32(ndr
, "level_in", r
->in
.level_in
);
12208 ndr_print_ptr(ndr
, "info_in", r
->in
.info_in
);
12210 ndr_print_set_switch_value(ndr
, r
->in
.info_in
, r
->in
.level_in
);
12211 ndr_print_samr_ConnectInfo(ndr
, "info_in", r
->in
.info_in
);
12215 if (flags
& NDR_OUT
) {
12216 ndr_print_struct(ndr
, "out", "samr_Connect5");
12218 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
12220 ndr_print_uint32(ndr
, "level_out", *r
->out
.level_out
);
12222 ndr_print_ptr(ndr
, "info_out", r
->out
.info_out
);
12224 ndr_print_set_switch_value(ndr
, r
->out
.info_out
, *r
->out
.level_out
);
12225 ndr_print_samr_ConnectInfo(ndr
, "info_out", r
->out
.info_out
);
12227 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
12229 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
12231 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12237 static enum ndr_err_code
ndr_push_samr_RidToSid(struct ndr_push
*ndr
, int flags
, const struct samr_RidToSid
*r
)
12239 if (flags
& NDR_IN
) {
12240 if (r
->in
.domain_handle
== NULL
) {
12241 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12243 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
12244 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
12246 if (flags
& NDR_OUT
) {
12247 if (r
->out
.sid
== NULL
) {
12248 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12250 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sid
));
12252 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sid
));
12254 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12256 return NDR_ERR_SUCCESS
;
12259 static enum ndr_err_code
ndr_pull_samr_RidToSid(struct ndr_pull
*ndr
, int flags
, struct samr_RidToSid
*r
)
12262 TALLOC_CTX
*_mem_save_domain_handle_0
;
12263 TALLOC_CTX
*_mem_save_sid_0
;
12264 TALLOC_CTX
*_mem_save_sid_1
;
12265 if (flags
& NDR_IN
) {
12266 ZERO_STRUCT(r
->out
);
12268 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12269 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
12271 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12272 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
12273 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
12274 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12275 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
12276 NDR_PULL_ALLOC(ndr
, r
->out
.sid
);
12277 ZERO_STRUCTP(r
->out
.sid
);
12279 if (flags
& NDR_OUT
) {
12280 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12281 NDR_PULL_ALLOC(ndr
, r
->out
.sid
);
12283 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12284 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sid
, LIBNDR_FLAG_REF_ALLOC
);
12285 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
12287 NDR_PULL_ALLOC(ndr
, *r
->out
.sid
);
12289 *r
->out
.sid
= NULL
;
12292 _mem_save_sid_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12293 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sid
, 0);
12294 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sid
));
12295 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_1
, 0);
12297 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
12298 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12300 return NDR_ERR_SUCCESS
;
12303 _PUBLIC_
void ndr_print_samr_RidToSid(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_RidToSid
*r
)
12305 ndr_print_struct(ndr
, name
, "samr_RidToSid");
12307 if (flags
& NDR_SET_VALUES
) {
12308 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12310 if (flags
& NDR_IN
) {
12311 ndr_print_struct(ndr
, "in", "samr_RidToSid");
12313 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
12315 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
12317 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
12320 if (flags
& NDR_OUT
) {
12321 ndr_print_struct(ndr
, "out", "samr_RidToSid");
12323 ndr_print_ptr(ndr
, "sid", r
->out
.sid
);
12325 ndr_print_ptr(ndr
, "sid", *r
->out
.sid
);
12328 ndr_print_dom_sid2(ndr
, "sid", *r
->out
.sid
);
12332 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12338 static enum ndr_err_code
ndr_push_samr_SetDsrmPassword(struct ndr_push
*ndr
, int flags
, const struct samr_SetDsrmPassword
*r
)
12340 if (flags
& NDR_IN
) {
12341 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.name
));
12343 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
12345 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown
));
12346 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.hash
));
12348 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.hash
));
12351 if (flags
& NDR_OUT
) {
12352 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12354 return NDR_ERR_SUCCESS
;
12357 static enum ndr_err_code
ndr_pull_samr_SetDsrmPassword(struct ndr_pull
*ndr
, int flags
, struct samr_SetDsrmPassword
*r
)
12359 uint32_t _ptr_name
;
12360 uint32_t _ptr_hash
;
12361 TALLOC_CTX
*_mem_save_name_0
;
12362 TALLOC_CTX
*_mem_save_hash_0
;
12363 if (flags
& NDR_IN
) {
12364 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
12366 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
12371 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12372 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, 0);
12373 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
12374 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
12376 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
12377 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hash
));
12379 NDR_PULL_ALLOC(ndr
, r
->in
.hash
);
12384 _mem_save_hash_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12385 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.hash
, 0);
12386 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.hash
));
12387 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hash_0
, 0);
12390 if (flags
& NDR_OUT
) {
12391 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12393 return NDR_ERR_SUCCESS
;
12396 _PUBLIC_
void ndr_print_samr_SetDsrmPassword(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetDsrmPassword
*r
)
12398 ndr_print_struct(ndr
, name
, "samr_SetDsrmPassword");
12400 if (flags
& NDR_SET_VALUES
) {
12401 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12403 if (flags
& NDR_IN
) {
12404 ndr_print_struct(ndr
, "in", "samr_SetDsrmPassword");
12406 ndr_print_ptr(ndr
, "name", r
->in
.name
);
12409 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
12412 ndr_print_uint32(ndr
, "unknown", r
->in
.unknown
);
12413 ndr_print_ptr(ndr
, "hash", r
->in
.hash
);
12416 ndr_print_samr_Password(ndr
, "hash", r
->in
.hash
);
12421 if (flags
& NDR_OUT
) {
12422 ndr_print_struct(ndr
, "out", "samr_SetDsrmPassword");
12424 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12430 static enum ndr_err_code
ndr_push_samr_ValidatePassword(struct ndr_push
*ndr
, int flags
, const struct samr_ValidatePassword
*r
)
12432 if (flags
& NDR_IN
) {
12433 NDR_CHECK(ndr_push_samr_ValidatePasswordLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
12434 if (r
->in
.req
== NULL
) {
12435 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12437 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
12438 NDR_CHECK(ndr_push_samr_ValidatePasswordReq(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
12440 if (flags
& NDR_OUT
) {
12441 if (r
->out
.rep
== NULL
) {
12442 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12444 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.rep
));
12446 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.rep
, r
->in
.level
));
12447 NDR_CHECK(ndr_push_samr_ValidatePasswordRep(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rep
));
12449 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12451 return NDR_ERR_SUCCESS
;
12454 static enum ndr_err_code
ndr_pull_samr_ValidatePassword(struct ndr_pull
*ndr
, int flags
, struct samr_ValidatePassword
*r
)
12457 TALLOC_CTX
*_mem_save_req_0
;
12458 TALLOC_CTX
*_mem_save_rep_0
;
12459 TALLOC_CTX
*_mem_save_rep_1
;
12460 if (flags
& NDR_IN
) {
12461 ZERO_STRUCT(r
->out
);
12463 NDR_CHECK(ndr_pull_samr_ValidatePasswordLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
12464 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12465 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
12467 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12468 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
12469 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
12470 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
12471 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
12472 NDR_PULL_ALLOC(ndr
, r
->out
.rep
);
12473 ZERO_STRUCTP(r
->out
.rep
);
12475 if (flags
& NDR_OUT
) {
12476 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12477 NDR_PULL_ALLOC(ndr
, r
->out
.rep
);
12479 _mem_save_rep_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12480 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rep
, LIBNDR_FLAG_REF_ALLOC
);
12481 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rep
));
12483 NDR_PULL_ALLOC(ndr
, *r
->out
.rep
);
12485 *r
->out
.rep
= NULL
;
12488 _mem_save_rep_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12489 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.rep
, 0);
12490 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.rep
, r
->in
.level
));
12491 NDR_CHECK(ndr_pull_samr_ValidatePasswordRep(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rep
));
12492 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rep_1
, 0);
12494 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rep_0
, LIBNDR_FLAG_REF_ALLOC
);
12495 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12497 return NDR_ERR_SUCCESS
;
12500 _PUBLIC_
void ndr_print_samr_ValidatePassword(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_ValidatePassword
*r
)
12502 ndr_print_struct(ndr
, name
, "samr_ValidatePassword");
12504 if (flags
& NDR_SET_VALUES
) {
12505 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12507 if (flags
& NDR_IN
) {
12508 ndr_print_struct(ndr
, "in", "samr_ValidatePassword");
12510 ndr_print_samr_ValidatePasswordLevel(ndr
, "level", r
->in
.level
);
12511 ndr_print_ptr(ndr
, "req", r
->in
.req
);
12513 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
12514 ndr_print_samr_ValidatePasswordReq(ndr
, "req", r
->in
.req
);
12518 if (flags
& NDR_OUT
) {
12519 ndr_print_struct(ndr
, "out", "samr_ValidatePassword");
12521 ndr_print_ptr(ndr
, "rep", r
->out
.rep
);
12523 ndr_print_ptr(ndr
, "rep", *r
->out
.rep
);
12526 ndr_print_set_switch_value(ndr
, *r
->out
.rep
, r
->in
.level
);
12527 ndr_print_samr_ValidatePasswordRep(ndr
, "rep", *r
->out
.rep
);
12531 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12537 static const struct ndr_interface_call samr_calls
[] = {
12540 sizeof(struct samr_Connect
),
12541 (ndr_push_flags_fn_t
) ndr_push_samr_Connect
,
12542 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect
,
12543 (ndr_print_function_t
) ndr_print_samr_Connect
,
12548 sizeof(struct samr_Close
),
12549 (ndr_push_flags_fn_t
) ndr_push_samr_Close
,
12550 (ndr_pull_flags_fn_t
) ndr_pull_samr_Close
,
12551 (ndr_print_function_t
) ndr_print_samr_Close
,
12555 "samr_SetSecurity",
12556 sizeof(struct samr_SetSecurity
),
12557 (ndr_push_flags_fn_t
) ndr_push_samr_SetSecurity
,
12558 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetSecurity
,
12559 (ndr_print_function_t
) ndr_print_samr_SetSecurity
,
12563 "samr_QuerySecurity",
12564 sizeof(struct samr_QuerySecurity
),
12565 (ndr_push_flags_fn_t
) ndr_push_samr_QuerySecurity
,
12566 (ndr_pull_flags_fn_t
) ndr_pull_samr_QuerySecurity
,
12567 (ndr_print_function_t
) ndr_print_samr_QuerySecurity
,
12572 sizeof(struct samr_Shutdown
),
12573 (ndr_push_flags_fn_t
) ndr_push_samr_Shutdown
,
12574 (ndr_pull_flags_fn_t
) ndr_pull_samr_Shutdown
,
12575 (ndr_print_function_t
) ndr_print_samr_Shutdown
,
12579 "samr_LookupDomain",
12580 sizeof(struct samr_LookupDomain
),
12581 (ndr_push_flags_fn_t
) ndr_push_samr_LookupDomain
,
12582 (ndr_pull_flags_fn_t
) ndr_pull_samr_LookupDomain
,
12583 (ndr_print_function_t
) ndr_print_samr_LookupDomain
,
12587 "samr_EnumDomains",
12588 sizeof(struct samr_EnumDomains
),
12589 (ndr_push_flags_fn_t
) ndr_push_samr_EnumDomains
,
12590 (ndr_pull_flags_fn_t
) ndr_pull_samr_EnumDomains
,
12591 (ndr_print_function_t
) ndr_print_samr_EnumDomains
,
12596 sizeof(struct samr_OpenDomain
),
12597 (ndr_push_flags_fn_t
) ndr_push_samr_OpenDomain
,
12598 (ndr_pull_flags_fn_t
) ndr_pull_samr_OpenDomain
,
12599 (ndr_print_function_t
) ndr_print_samr_OpenDomain
,
12603 "samr_QueryDomainInfo",
12604 sizeof(struct samr_QueryDomainInfo
),
12605 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDomainInfo
,
12606 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDomainInfo
,
12607 (ndr_print_function_t
) ndr_print_samr_QueryDomainInfo
,
12611 "samr_SetDomainInfo",
12612 sizeof(struct samr_SetDomainInfo
),
12613 (ndr_push_flags_fn_t
) ndr_push_samr_SetDomainInfo
,
12614 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetDomainInfo
,
12615 (ndr_print_function_t
) ndr_print_samr_SetDomainInfo
,
12619 "samr_CreateDomainGroup",
12620 sizeof(struct samr_CreateDomainGroup
),
12621 (ndr_push_flags_fn_t
) ndr_push_samr_CreateDomainGroup
,
12622 (ndr_pull_flags_fn_t
) ndr_pull_samr_CreateDomainGroup
,
12623 (ndr_print_function_t
) ndr_print_samr_CreateDomainGroup
,
12627 "samr_EnumDomainGroups",
12628 sizeof(struct samr_EnumDomainGroups
),
12629 (ndr_push_flags_fn_t
) ndr_push_samr_EnumDomainGroups
,
12630 (ndr_pull_flags_fn_t
) ndr_pull_samr_EnumDomainGroups
,
12631 (ndr_print_function_t
) ndr_print_samr_EnumDomainGroups
,
12636 sizeof(struct samr_CreateUser
),
12637 (ndr_push_flags_fn_t
) ndr_push_samr_CreateUser
,
12638 (ndr_pull_flags_fn_t
) ndr_pull_samr_CreateUser
,
12639 (ndr_print_function_t
) ndr_print_samr_CreateUser
,
12643 "samr_EnumDomainUsers",
12644 sizeof(struct samr_EnumDomainUsers
),
12645 (ndr_push_flags_fn_t
) ndr_push_samr_EnumDomainUsers
,
12646 (ndr_pull_flags_fn_t
) ndr_pull_samr_EnumDomainUsers
,
12647 (ndr_print_function_t
) ndr_print_samr_EnumDomainUsers
,
12651 "samr_CreateDomAlias",
12652 sizeof(struct samr_CreateDomAlias
),
12653 (ndr_push_flags_fn_t
) ndr_push_samr_CreateDomAlias
,
12654 (ndr_pull_flags_fn_t
) ndr_pull_samr_CreateDomAlias
,
12655 (ndr_print_function_t
) ndr_print_samr_CreateDomAlias
,
12659 "samr_EnumDomainAliases",
12660 sizeof(struct samr_EnumDomainAliases
),
12661 (ndr_push_flags_fn_t
) ndr_push_samr_EnumDomainAliases
,
12662 (ndr_pull_flags_fn_t
) ndr_pull_samr_EnumDomainAliases
,
12663 (ndr_print_function_t
) ndr_print_samr_EnumDomainAliases
,
12667 "samr_GetAliasMembership",
12668 sizeof(struct samr_GetAliasMembership
),
12669 (ndr_push_flags_fn_t
) ndr_push_samr_GetAliasMembership
,
12670 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetAliasMembership
,
12671 (ndr_print_function_t
) ndr_print_samr_GetAliasMembership
,
12675 "samr_LookupNames",
12676 sizeof(struct samr_LookupNames
),
12677 (ndr_push_flags_fn_t
) ndr_push_samr_LookupNames
,
12678 (ndr_pull_flags_fn_t
) ndr_pull_samr_LookupNames
,
12679 (ndr_print_function_t
) ndr_print_samr_LookupNames
,
12684 sizeof(struct samr_LookupRids
),
12685 (ndr_push_flags_fn_t
) ndr_push_samr_LookupRids
,
12686 (ndr_pull_flags_fn_t
) ndr_pull_samr_LookupRids
,
12687 (ndr_print_function_t
) ndr_print_samr_LookupRids
,
12692 sizeof(struct samr_OpenGroup
),
12693 (ndr_push_flags_fn_t
) ndr_push_samr_OpenGroup
,
12694 (ndr_pull_flags_fn_t
) ndr_pull_samr_OpenGroup
,
12695 (ndr_print_function_t
) ndr_print_samr_OpenGroup
,
12699 "samr_QueryGroupInfo",
12700 sizeof(struct samr_QueryGroupInfo
),
12701 (ndr_push_flags_fn_t
) ndr_push_samr_QueryGroupInfo
,
12702 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryGroupInfo
,
12703 (ndr_print_function_t
) ndr_print_samr_QueryGroupInfo
,
12707 "samr_SetGroupInfo",
12708 sizeof(struct samr_SetGroupInfo
),
12709 (ndr_push_flags_fn_t
) ndr_push_samr_SetGroupInfo
,
12710 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetGroupInfo
,
12711 (ndr_print_function_t
) ndr_print_samr_SetGroupInfo
,
12715 "samr_AddGroupMember",
12716 sizeof(struct samr_AddGroupMember
),
12717 (ndr_push_flags_fn_t
) ndr_push_samr_AddGroupMember
,
12718 (ndr_pull_flags_fn_t
) ndr_pull_samr_AddGroupMember
,
12719 (ndr_print_function_t
) ndr_print_samr_AddGroupMember
,
12723 "samr_DeleteDomainGroup",
12724 sizeof(struct samr_DeleteDomainGroup
),
12725 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteDomainGroup
,
12726 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteDomainGroup
,
12727 (ndr_print_function_t
) ndr_print_samr_DeleteDomainGroup
,
12731 "samr_DeleteGroupMember",
12732 sizeof(struct samr_DeleteGroupMember
),
12733 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteGroupMember
,
12734 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteGroupMember
,
12735 (ndr_print_function_t
) ndr_print_samr_DeleteGroupMember
,
12739 "samr_QueryGroupMember",
12740 sizeof(struct samr_QueryGroupMember
),
12741 (ndr_push_flags_fn_t
) ndr_push_samr_QueryGroupMember
,
12742 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryGroupMember
,
12743 (ndr_print_function_t
) ndr_print_samr_QueryGroupMember
,
12747 "samr_SetMemberAttributesOfGroup",
12748 sizeof(struct samr_SetMemberAttributesOfGroup
),
12749 (ndr_push_flags_fn_t
) ndr_push_samr_SetMemberAttributesOfGroup
,
12750 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetMemberAttributesOfGroup
,
12751 (ndr_print_function_t
) ndr_print_samr_SetMemberAttributesOfGroup
,
12756 sizeof(struct samr_OpenAlias
),
12757 (ndr_push_flags_fn_t
) ndr_push_samr_OpenAlias
,
12758 (ndr_pull_flags_fn_t
) ndr_pull_samr_OpenAlias
,
12759 (ndr_print_function_t
) ndr_print_samr_OpenAlias
,
12763 "samr_QueryAliasInfo",
12764 sizeof(struct samr_QueryAliasInfo
),
12765 (ndr_push_flags_fn_t
) ndr_push_samr_QueryAliasInfo
,
12766 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryAliasInfo
,
12767 (ndr_print_function_t
) ndr_print_samr_QueryAliasInfo
,
12771 "samr_SetAliasInfo",
12772 sizeof(struct samr_SetAliasInfo
),
12773 (ndr_push_flags_fn_t
) ndr_push_samr_SetAliasInfo
,
12774 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetAliasInfo
,
12775 (ndr_print_function_t
) ndr_print_samr_SetAliasInfo
,
12779 "samr_DeleteDomAlias",
12780 sizeof(struct samr_DeleteDomAlias
),
12781 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteDomAlias
,
12782 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteDomAlias
,
12783 (ndr_print_function_t
) ndr_print_samr_DeleteDomAlias
,
12787 "samr_AddAliasMember",
12788 sizeof(struct samr_AddAliasMember
),
12789 (ndr_push_flags_fn_t
) ndr_push_samr_AddAliasMember
,
12790 (ndr_pull_flags_fn_t
) ndr_pull_samr_AddAliasMember
,
12791 (ndr_print_function_t
) ndr_print_samr_AddAliasMember
,
12795 "samr_DeleteAliasMember",
12796 sizeof(struct samr_DeleteAliasMember
),
12797 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteAliasMember
,
12798 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteAliasMember
,
12799 (ndr_print_function_t
) ndr_print_samr_DeleteAliasMember
,
12803 "samr_GetMembersInAlias",
12804 sizeof(struct samr_GetMembersInAlias
),
12805 (ndr_push_flags_fn_t
) ndr_push_samr_GetMembersInAlias
,
12806 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetMembersInAlias
,
12807 (ndr_print_function_t
) ndr_print_samr_GetMembersInAlias
,
12812 sizeof(struct samr_OpenUser
),
12813 (ndr_push_flags_fn_t
) ndr_push_samr_OpenUser
,
12814 (ndr_pull_flags_fn_t
) ndr_pull_samr_OpenUser
,
12815 (ndr_print_function_t
) ndr_print_samr_OpenUser
,
12820 sizeof(struct samr_DeleteUser
),
12821 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteUser
,
12822 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteUser
,
12823 (ndr_print_function_t
) ndr_print_samr_DeleteUser
,
12827 "samr_QueryUserInfo",
12828 sizeof(struct samr_QueryUserInfo
),
12829 (ndr_push_flags_fn_t
) ndr_push_samr_QueryUserInfo
,
12830 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryUserInfo
,
12831 (ndr_print_function_t
) ndr_print_samr_QueryUserInfo
,
12835 "samr_SetUserInfo",
12836 sizeof(struct samr_SetUserInfo
),
12837 (ndr_push_flags_fn_t
) ndr_push_samr_SetUserInfo
,
12838 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetUserInfo
,
12839 (ndr_print_function_t
) ndr_print_samr_SetUserInfo
,
12843 "samr_ChangePasswordUser",
12844 sizeof(struct samr_ChangePasswordUser
),
12845 (ndr_push_flags_fn_t
) ndr_push_samr_ChangePasswordUser
,
12846 (ndr_pull_flags_fn_t
) ndr_pull_samr_ChangePasswordUser
,
12847 (ndr_print_function_t
) ndr_print_samr_ChangePasswordUser
,
12851 "samr_GetGroupsForUser",
12852 sizeof(struct samr_GetGroupsForUser
),
12853 (ndr_push_flags_fn_t
) ndr_push_samr_GetGroupsForUser
,
12854 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetGroupsForUser
,
12855 (ndr_print_function_t
) ndr_print_samr_GetGroupsForUser
,
12859 "samr_QueryDisplayInfo",
12860 sizeof(struct samr_QueryDisplayInfo
),
12861 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDisplayInfo
,
12862 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDisplayInfo
,
12863 (ndr_print_function_t
) ndr_print_samr_QueryDisplayInfo
,
12867 "samr_GetDisplayEnumerationIndex",
12868 sizeof(struct samr_GetDisplayEnumerationIndex
),
12869 (ndr_push_flags_fn_t
) ndr_push_samr_GetDisplayEnumerationIndex
,
12870 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetDisplayEnumerationIndex
,
12871 (ndr_print_function_t
) ndr_print_samr_GetDisplayEnumerationIndex
,
12875 "samr_TestPrivateFunctionsDomain",
12876 sizeof(struct samr_TestPrivateFunctionsDomain
),
12877 (ndr_push_flags_fn_t
) ndr_push_samr_TestPrivateFunctionsDomain
,
12878 (ndr_pull_flags_fn_t
) ndr_pull_samr_TestPrivateFunctionsDomain
,
12879 (ndr_print_function_t
) ndr_print_samr_TestPrivateFunctionsDomain
,
12883 "samr_TestPrivateFunctionsUser",
12884 sizeof(struct samr_TestPrivateFunctionsUser
),
12885 (ndr_push_flags_fn_t
) ndr_push_samr_TestPrivateFunctionsUser
,
12886 (ndr_pull_flags_fn_t
) ndr_pull_samr_TestPrivateFunctionsUser
,
12887 (ndr_print_function_t
) ndr_print_samr_TestPrivateFunctionsUser
,
12891 "samr_GetUserPwInfo",
12892 sizeof(struct samr_GetUserPwInfo
),
12893 (ndr_push_flags_fn_t
) ndr_push_samr_GetUserPwInfo
,
12894 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetUserPwInfo
,
12895 (ndr_print_function_t
) ndr_print_samr_GetUserPwInfo
,
12899 "samr_RemoveMemberFromForeignDomain",
12900 sizeof(struct samr_RemoveMemberFromForeignDomain
),
12901 (ndr_push_flags_fn_t
) ndr_push_samr_RemoveMemberFromForeignDomain
,
12902 (ndr_pull_flags_fn_t
) ndr_pull_samr_RemoveMemberFromForeignDomain
,
12903 (ndr_print_function_t
) ndr_print_samr_RemoveMemberFromForeignDomain
,
12907 "samr_QueryDomainInfo2",
12908 sizeof(struct samr_QueryDomainInfo2
),
12909 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDomainInfo2
,
12910 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDomainInfo2
,
12911 (ndr_print_function_t
) ndr_print_samr_QueryDomainInfo2
,
12915 "samr_QueryUserInfo2",
12916 sizeof(struct samr_QueryUserInfo2
),
12917 (ndr_push_flags_fn_t
) ndr_push_samr_QueryUserInfo2
,
12918 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryUserInfo2
,
12919 (ndr_print_function_t
) ndr_print_samr_QueryUserInfo2
,
12923 "samr_QueryDisplayInfo2",
12924 sizeof(struct samr_QueryDisplayInfo2
),
12925 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDisplayInfo2
,
12926 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDisplayInfo2
,
12927 (ndr_print_function_t
) ndr_print_samr_QueryDisplayInfo2
,
12931 "samr_GetDisplayEnumerationIndex2",
12932 sizeof(struct samr_GetDisplayEnumerationIndex2
),
12933 (ndr_push_flags_fn_t
) ndr_push_samr_GetDisplayEnumerationIndex2
,
12934 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetDisplayEnumerationIndex2
,
12935 (ndr_print_function_t
) ndr_print_samr_GetDisplayEnumerationIndex2
,
12939 "samr_CreateUser2",
12940 sizeof(struct samr_CreateUser2
),
12941 (ndr_push_flags_fn_t
) ndr_push_samr_CreateUser2
,
12942 (ndr_pull_flags_fn_t
) ndr_pull_samr_CreateUser2
,
12943 (ndr_print_function_t
) ndr_print_samr_CreateUser2
,
12947 "samr_QueryDisplayInfo3",
12948 sizeof(struct samr_QueryDisplayInfo3
),
12949 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDisplayInfo3
,
12950 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDisplayInfo3
,
12951 (ndr_print_function_t
) ndr_print_samr_QueryDisplayInfo3
,
12955 "samr_AddMultipleMembersToAlias",
12956 sizeof(struct samr_AddMultipleMembersToAlias
),
12957 (ndr_push_flags_fn_t
) ndr_push_samr_AddMultipleMembersToAlias
,
12958 (ndr_pull_flags_fn_t
) ndr_pull_samr_AddMultipleMembersToAlias
,
12959 (ndr_print_function_t
) ndr_print_samr_AddMultipleMembersToAlias
,
12963 "samr_RemoveMultipleMembersFromAlias",
12964 sizeof(struct samr_RemoveMultipleMembersFromAlias
),
12965 (ndr_push_flags_fn_t
) ndr_push_samr_RemoveMultipleMembersFromAlias
,
12966 (ndr_pull_flags_fn_t
) ndr_pull_samr_RemoveMultipleMembersFromAlias
,
12967 (ndr_print_function_t
) ndr_print_samr_RemoveMultipleMembersFromAlias
,
12971 "samr_OemChangePasswordUser2",
12972 sizeof(struct samr_OemChangePasswordUser2
),
12973 (ndr_push_flags_fn_t
) ndr_push_samr_OemChangePasswordUser2
,
12974 (ndr_pull_flags_fn_t
) ndr_pull_samr_OemChangePasswordUser2
,
12975 (ndr_print_function_t
) ndr_print_samr_OemChangePasswordUser2
,
12979 "samr_ChangePasswordUser2",
12980 sizeof(struct samr_ChangePasswordUser2
),
12981 (ndr_push_flags_fn_t
) ndr_push_samr_ChangePasswordUser2
,
12982 (ndr_pull_flags_fn_t
) ndr_pull_samr_ChangePasswordUser2
,
12983 (ndr_print_function_t
) ndr_print_samr_ChangePasswordUser2
,
12987 "samr_GetDomPwInfo",
12988 sizeof(struct samr_GetDomPwInfo
),
12989 (ndr_push_flags_fn_t
) ndr_push_samr_GetDomPwInfo
,
12990 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetDomPwInfo
,
12991 (ndr_print_function_t
) ndr_print_samr_GetDomPwInfo
,
12996 sizeof(struct samr_Connect2
),
12997 (ndr_push_flags_fn_t
) ndr_push_samr_Connect2
,
12998 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect2
,
12999 (ndr_print_function_t
) ndr_print_samr_Connect2
,
13003 "samr_SetUserInfo2",
13004 sizeof(struct samr_SetUserInfo2
),
13005 (ndr_push_flags_fn_t
) ndr_push_samr_SetUserInfo2
,
13006 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetUserInfo2
,
13007 (ndr_print_function_t
) ndr_print_samr_SetUserInfo2
,
13011 "samr_SetBootKeyInformation",
13012 sizeof(struct samr_SetBootKeyInformation
),
13013 (ndr_push_flags_fn_t
) ndr_push_samr_SetBootKeyInformation
,
13014 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetBootKeyInformation
,
13015 (ndr_print_function_t
) ndr_print_samr_SetBootKeyInformation
,
13019 "samr_GetBootKeyInformation",
13020 sizeof(struct samr_GetBootKeyInformation
),
13021 (ndr_push_flags_fn_t
) ndr_push_samr_GetBootKeyInformation
,
13022 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetBootKeyInformation
,
13023 (ndr_print_function_t
) ndr_print_samr_GetBootKeyInformation
,
13028 sizeof(struct samr_Connect3
),
13029 (ndr_push_flags_fn_t
) ndr_push_samr_Connect3
,
13030 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect3
,
13031 (ndr_print_function_t
) ndr_print_samr_Connect3
,
13036 sizeof(struct samr_Connect4
),
13037 (ndr_push_flags_fn_t
) ndr_push_samr_Connect4
,
13038 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect4
,
13039 (ndr_print_function_t
) ndr_print_samr_Connect4
,
13043 "samr_ChangePasswordUser3",
13044 sizeof(struct samr_ChangePasswordUser3
),
13045 (ndr_push_flags_fn_t
) ndr_push_samr_ChangePasswordUser3
,
13046 (ndr_pull_flags_fn_t
) ndr_pull_samr_ChangePasswordUser3
,
13047 (ndr_print_function_t
) ndr_print_samr_ChangePasswordUser3
,
13052 sizeof(struct samr_Connect5
),
13053 (ndr_push_flags_fn_t
) ndr_push_samr_Connect5
,
13054 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect5
,
13055 (ndr_print_function_t
) ndr_print_samr_Connect5
,
13060 sizeof(struct samr_RidToSid
),
13061 (ndr_push_flags_fn_t
) ndr_push_samr_RidToSid
,
13062 (ndr_pull_flags_fn_t
) ndr_pull_samr_RidToSid
,
13063 (ndr_print_function_t
) ndr_print_samr_RidToSid
,
13067 "samr_SetDsrmPassword",
13068 sizeof(struct samr_SetDsrmPassword
),
13069 (ndr_push_flags_fn_t
) ndr_push_samr_SetDsrmPassword
,
13070 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetDsrmPassword
,
13071 (ndr_print_function_t
) ndr_print_samr_SetDsrmPassword
,
13075 "samr_ValidatePassword",
13076 sizeof(struct samr_ValidatePassword
),
13077 (ndr_push_flags_fn_t
) ndr_push_samr_ValidatePassword
,
13078 (ndr_pull_flags_fn_t
) ndr_pull_samr_ValidatePassword
,
13079 (ndr_print_function_t
) ndr_print_samr_ValidatePassword
,
13082 { NULL
, 0, NULL
, NULL
, NULL
, false }
13085 static const char * const samr_endpoint_strings
[] = {
13086 "ncacn_np:[\\pipe\\samr]",
13091 static const struct ndr_interface_string_array samr_endpoints
= {
13093 .names
= samr_endpoint_strings
13096 static const char * const samr_authservice_strings
[] = {
13100 static const struct ndr_interface_string_array samr_authservices
= {
13102 .names
= samr_authservice_strings
13106 const struct ndr_interface_table ndr_table_samr
= {
13109 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xac}},
13112 .helpstring
= NDR_SAMR_HELPSTRING
,
13114 .calls
= samr_calls
,
13115 .endpoints
= &samr_endpoints
,
13116 .authservices
= &samr_authservices