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_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_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_RejectReason(struct ndr_push
*ndr
, int ndr_flags
, enum samr_RejectReason 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_RejectReason(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_RejectReason
*r
)
44 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
46 return NDR_ERR_SUCCESS
;
49 _PUBLIC_
void ndr_print_samr_RejectReason(struct ndr_print
*ndr
, const char *name
, enum samr_RejectReason r
)
51 const char *val
= NULL
;
54 case SAMR_REJECT_OTHER
: val
= "SAMR_REJECT_OTHER"; break;
55 case SAMR_REJECT_TOO_SHORT
: val
= "SAMR_REJECT_TOO_SHORT"; break;
56 case SAMR_REJECT_IN_HISTORY
: val
= "SAMR_REJECT_IN_HISTORY"; break;
57 case SAMR_REJECT_COMPLEXITY
: val
= "SAMR_REJECT_COMPLEXITY"; break;
59 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
62 _PUBLIC_
enum ndr_err_code
ndr_push_samr_AcctFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
64 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
65 return NDR_ERR_SUCCESS
;
68 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_AcctFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
71 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
73 return NDR_ERR_SUCCESS
;
76 _PUBLIC_
void ndr_print_samr_AcctFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
78 ndr_print_uint32(ndr
, name
, r
);
80 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_DISABLED", ACB_DISABLED
, r
);
81 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_HOMDIRREQ", ACB_HOMDIRREQ
, r
);
82 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_PWNOTREQ", ACB_PWNOTREQ
, r
);
83 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_TEMPDUP", ACB_TEMPDUP
, r
);
84 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_NORMAL", ACB_NORMAL
, r
);
85 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_MNS", ACB_MNS
, r
);
86 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_DOMTRUST", ACB_DOMTRUST
, r
);
87 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_WSTRUST", ACB_WSTRUST
, r
);
88 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_SVRTRUST", ACB_SVRTRUST
, r
);
89 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_PWNOEXP", ACB_PWNOEXP
, r
);
90 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_AUTOLOCK", ACB_AUTOLOCK
, r
);
91 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_ENC_TXT_PWD_ALLOWED", ACB_ENC_TXT_PWD_ALLOWED
, r
);
92 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_SMARTCARD_REQUIRED", ACB_SMARTCARD_REQUIRED
, r
);
93 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_TRUSTED_FOR_DELEGATION", ACB_TRUSTED_FOR_DELEGATION
, r
);
94 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_NOT_DELEGATED", ACB_NOT_DELEGATED
, r
);
95 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_USE_DES_KEY_ONLY", ACB_USE_DES_KEY_ONLY
, r
);
96 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_DONT_REQUIRE_PREAUTH", ACB_DONT_REQUIRE_PREAUTH
, r
);
97 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_PW_EXPIRED", ACB_PW_EXPIRED
, r
);
98 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "ACB_NO_AUTH_DATA_REQD", ACB_NO_AUTH_DATA_REQD
, r
);
102 static enum ndr_err_code
ndr_push_samr_ConnectAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
104 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
105 return NDR_ERR_SUCCESS
;
108 static enum ndr_err_code
ndr_pull_samr_ConnectAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
111 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
113 return NDR_ERR_SUCCESS
;
116 _PUBLIC_
void ndr_print_samr_ConnectAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
118 ndr_print_uint32(ndr
, name
, r
);
120 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_CONNECT_TO_SERVER", SAMR_ACCESS_CONNECT_TO_SERVER
, r
);
121 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_SHUTDOWN_SERVER", SAMR_ACCESS_SHUTDOWN_SERVER
, r
);
122 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_INITIALIZE_SERVER", SAMR_ACCESS_INITIALIZE_SERVER
, r
);
123 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_CREATE_DOMAIN", SAMR_ACCESS_CREATE_DOMAIN
, r
);
124 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_ENUM_DOMAINS", SAMR_ACCESS_ENUM_DOMAINS
, r
);
125 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ACCESS_LOOKUP_DOMAIN", SAMR_ACCESS_LOOKUP_DOMAIN
, r
);
129 static enum ndr_err_code
ndr_push_samr_UserAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
131 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
132 return NDR_ERR_SUCCESS
;
135 static enum ndr_err_code
ndr_pull_samr_UserAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
138 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
140 return NDR_ERR_SUCCESS
;
143 _PUBLIC_
void ndr_print_samr_UserAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
145 ndr_print_uint32(ndr
, name
, r
);
147 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_NAME_ETC", SAMR_USER_ACCESS_GET_NAME_ETC
, r
);
148 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOCALE", SAMR_USER_ACCESS_GET_LOCALE
, r
);
149 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_LOC_COM", SAMR_USER_ACCESS_SET_LOC_COM
, r
);
150 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOGONINFO", SAMR_USER_ACCESS_GET_LOGONINFO
, r
);
151 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_ATTRIBUTES", SAMR_USER_ACCESS_GET_ATTRIBUTES
, r
);
152 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_ATTRIBUTES", SAMR_USER_ACCESS_SET_ATTRIBUTES
, r
);
153 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_PASSWORD", SAMR_USER_ACCESS_CHANGE_PASSWORD
, r
);
154 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_PASSWORD", SAMR_USER_ACCESS_SET_PASSWORD
, r
);
155 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUPS", SAMR_USER_ACCESS_GET_GROUPS
, r
);
156 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP
, r
);
157 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP
, r
);
161 static enum ndr_err_code
ndr_push_samr_DomainAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
163 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
164 return NDR_ERR_SUCCESS
;
167 static enum ndr_err_code
ndr_pull_samr_DomainAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
170 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
172 return NDR_ERR_SUCCESS
;
175 _PUBLIC_
void ndr_print_samr_DomainAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
177 ndr_print_uint32(ndr
, name
, r
);
179 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1
, r
);
180 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_1", SAMR_DOMAIN_ACCESS_SET_INFO_1
, r
);
181 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2
, r
);
182 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_2", SAMR_DOMAIN_ACCESS_SET_INFO_2
, r
);
183 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_USER", SAMR_DOMAIN_ACCESS_CREATE_USER
, r
);
184 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_GROUP", SAMR_DOMAIN_ACCESS_CREATE_GROUP
, r
);
185 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_ALIAS", SAMR_DOMAIN_ACCESS_CREATE_ALIAS
, r
);
186 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS", SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS
, r
);
187 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS", SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS
, r
);
188 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT", SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT
, r
);
189 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_3", SAMR_DOMAIN_ACCESS_SET_INFO_3
, r
);
193 static enum ndr_err_code
ndr_push_samr_GroupAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
195 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
196 return NDR_ERR_SUCCESS
;
199 static enum ndr_err_code
ndr_pull_samr_GroupAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
202 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
204 return NDR_ERR_SUCCESS
;
207 _PUBLIC_
void ndr_print_samr_GroupAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
209 ndr_print_uint32(ndr
, name
, r
);
211 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_LOOKUP_INFO", SAMR_GROUP_ACCESS_LOOKUP_INFO
, r
);
212 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_SET_INFO", SAMR_GROUP_ACCESS_SET_INFO
, r
);
213 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_ADD_MEMBER", SAMR_GROUP_ACCESS_ADD_MEMBER
, r
);
214 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_REMOVE_MEMBER", SAMR_GROUP_ACCESS_REMOVE_MEMBER
, r
);
215 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_GROUP_ACCESS_GET_MEMBERS", SAMR_GROUP_ACCESS_GET_MEMBERS
, r
);
219 static enum ndr_err_code
ndr_push_samr_AliasAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
221 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
222 return NDR_ERR_SUCCESS
;
225 static enum ndr_err_code
ndr_pull_samr_AliasAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
228 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
230 return NDR_ERR_SUCCESS
;
233 _PUBLIC_
void ndr_print_samr_AliasAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
235 ndr_print_uint32(ndr
, name
, r
);
237 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_ADD_MEMBER", SAMR_ALIAS_ACCESS_ADD_MEMBER
, r
);
238 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_REMOVE_MEMBER", SAMR_ALIAS_ACCESS_REMOVE_MEMBER
, r
);
239 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_GET_MEMBERS", SAMR_ALIAS_ACCESS_GET_MEMBERS
, r
);
240 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_LOOKUP_INFO", SAMR_ALIAS_ACCESS_LOOKUP_INFO
, r
);
241 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_SET_INFO", SAMR_ALIAS_ACCESS_SET_INFO
, r
);
245 static enum ndr_err_code
ndr_push_samr_SamEntry(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_SamEntry
*r
)
247 if (ndr_flags
& NDR_SCALARS
) {
248 NDR_CHECK(ndr_push_align(ndr
, 4));
249 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
250 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
252 if (ndr_flags
& NDR_BUFFERS
) {
253 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
255 return NDR_ERR_SUCCESS
;
258 static enum ndr_err_code
ndr_pull_samr_SamEntry(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_SamEntry
*r
)
260 if (ndr_flags
& NDR_SCALARS
) {
261 NDR_CHECK(ndr_pull_align(ndr
, 4));
262 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
263 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
265 if (ndr_flags
& NDR_BUFFERS
) {
266 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
268 return NDR_ERR_SUCCESS
;
271 _PUBLIC_
void ndr_print_samr_SamEntry(struct ndr_print
*ndr
, const char *name
, const struct samr_SamEntry
*r
)
273 ndr_print_struct(ndr
, name
, "samr_SamEntry");
275 ndr_print_uint32(ndr
, "idx", r
->idx
);
276 ndr_print_lsa_String(ndr
, "name", &r
->name
);
280 static enum ndr_err_code
ndr_push_samr_SamArray(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_SamArray
*r
)
282 uint32_t cntr_entries_1
;
283 if (ndr_flags
& NDR_SCALARS
) {
284 NDR_CHECK(ndr_push_align(ndr
, 4));
285 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
286 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
288 if (ndr_flags
& NDR_BUFFERS
) {
290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
291 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
292 NDR_CHECK(ndr_push_samr_SamEntry(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
294 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
295 NDR_CHECK(ndr_push_samr_SamEntry(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
299 return NDR_ERR_SUCCESS
;
302 static enum ndr_err_code
ndr_pull_samr_SamArray(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_SamArray
*r
)
304 uint32_t _ptr_entries
;
305 uint32_t cntr_entries_1
;
306 TALLOC_CTX
*_mem_save_entries_0
;
307 TALLOC_CTX
*_mem_save_entries_1
;
308 if (ndr_flags
& NDR_SCALARS
) {
309 NDR_CHECK(ndr_pull_align(ndr
, 4));
310 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
311 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
313 NDR_PULL_ALLOC(ndr
, r
->entries
);
318 if (ndr_flags
& NDR_BUFFERS
) {
320 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
321 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
322 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
323 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
324 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
325 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
326 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
327 NDR_CHECK(ndr_pull_samr_SamEntry(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
329 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
330 NDR_CHECK(ndr_pull_samr_SamEntry(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
332 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
333 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
336 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
339 return NDR_ERR_SUCCESS
;
342 _PUBLIC_
void ndr_print_samr_SamArray(struct ndr_print
*ndr
, const char *name
, const struct samr_SamArray
*r
)
344 uint32_t cntr_entries_1
;
345 ndr_print_struct(ndr
, name
, "samr_SamArray");
347 ndr_print_uint32(ndr
, "count", r
->count
);
348 ndr_print_ptr(ndr
, "entries", r
->entries
);
351 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
353 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
355 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
356 ndr_print_samr_SamEntry(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
366 static enum ndr_err_code
ndr_push_samr_DomainInfoClass(struct ndr_push
*ndr
, int ndr_flags
, enum samr_DomainInfoClass r
)
368 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
369 return NDR_ERR_SUCCESS
;
372 static enum ndr_err_code
ndr_pull_samr_DomainInfoClass(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_DomainInfoClass
*r
)
375 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
377 return NDR_ERR_SUCCESS
;
380 _PUBLIC_
void ndr_print_samr_DomainInfoClass(struct ndr_print
*ndr
, const char *name
, enum samr_DomainInfoClass r
)
382 const char *val
= NULL
;
385 case DomainPasswordInformation
: val
= "DomainPasswordInformation"; break;
386 case DomainGeneralInformation
: val
= "DomainGeneralInformation"; break;
387 case DomainLogoffInformation
: val
= "DomainLogoffInformation"; break;
388 case DomainOemInformation
: val
= "DomainOemInformation"; break;
389 case DomainNameInformation
: val
= "DomainNameInformation"; break;
390 case DomainReplicationInformation
: val
= "DomainReplicationInformation"; break;
391 case DomainServerRoleInformation
: val
= "DomainServerRoleInformation"; break;
392 case DomainModifiedInformation
: val
= "DomainModifiedInformation"; break;
393 case DomainStateInformation
: val
= "DomainStateInformation"; break;
394 case DomainUasInformation
: val
= "DomainUasInformation"; break;
395 case DomainGeneralInformation2
: val
= "DomainGeneralInformation2"; break;
396 case DomainLockoutInformation
: val
= "DomainLockoutInformation"; break;
397 case DomainModifiedInformation2
: val
= "DomainModifiedInformation2"; break;
399 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
402 static enum ndr_err_code
ndr_push_samr_Role(struct ndr_push
*ndr
, int ndr_flags
, enum samr_Role r
)
404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
405 return NDR_ERR_SUCCESS
;
408 static enum ndr_err_code
ndr_pull_samr_Role(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_Role
*r
)
411 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
413 return NDR_ERR_SUCCESS
;
416 _PUBLIC_
void ndr_print_samr_Role(struct ndr_print
*ndr
, const char *name
, enum samr_Role r
)
418 const char *val
= NULL
;
421 case SAMR_ROLE_STANDALONE
: val
= "SAMR_ROLE_STANDALONE"; break;
422 case SAMR_ROLE_DOMAIN_MEMBER
: val
= "SAMR_ROLE_DOMAIN_MEMBER"; break;
423 case SAMR_ROLE_DOMAIN_BDC
: val
= "SAMR_ROLE_DOMAIN_BDC"; break;
424 case SAMR_ROLE_DOMAIN_PDC
: val
= "SAMR_ROLE_DOMAIN_PDC"; break;
426 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
429 _PUBLIC_
enum ndr_err_code
ndr_push_samr_PasswordProperties(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
431 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
432 return NDR_ERR_SUCCESS
;
435 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_PasswordProperties(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
438 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
440 return NDR_ERR_SUCCESS
;
443 _PUBLIC_
void ndr_print_samr_PasswordProperties(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
445 ndr_print_uint32(ndr
, name
, r
);
447 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_COMPLEX", DOMAIN_PASSWORD_COMPLEX
, r
);
448 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_ANON_CHANGE", DOMAIN_PASSWORD_NO_ANON_CHANGE
, r
);
449 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_CLEAR_CHANGE", DOMAIN_PASSWORD_NO_CLEAR_CHANGE
, r
);
450 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_LOCKOUT_ADMINS", DOMAIN_PASSWORD_LOCKOUT_ADMINS
, r
);
451 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_PASSWORD_STORE_CLEARTEXT", DOMAIN_PASSWORD_STORE_CLEARTEXT
, r
);
452 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DOMAIN_REFUSE_PASSWORD_CHANGE", DOMAIN_REFUSE_PASSWORD_CHANGE
, r
);
456 static enum ndr_err_code
ndr_push_samr_DomainServerState(struct ndr_push
*ndr
, int ndr_flags
, enum samr_DomainServerState r
)
458 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
459 return NDR_ERR_SUCCESS
;
462 static enum ndr_err_code
ndr_pull_samr_DomainServerState(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_DomainServerState
*r
)
465 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
467 return NDR_ERR_SUCCESS
;
470 _PUBLIC_
void ndr_print_samr_DomainServerState(struct ndr_print
*ndr
, const char *name
, enum samr_DomainServerState r
)
472 const char *val
= NULL
;
475 case DOMAIN_SERVER_ENABLED
: val
= "DOMAIN_SERVER_ENABLED"; break;
476 case DOMAIN_SERVER_DISABLED
: val
= "DOMAIN_SERVER_DISABLED"; break;
478 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
481 static enum ndr_err_code
ndr_push_samr_DomInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo1
*r
)
483 if (ndr_flags
& NDR_SCALARS
) {
484 NDR_CHECK(ndr_push_align(ndr
, 4));
485 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->min_password_length
));
486 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->password_history_length
));
487 NDR_CHECK(ndr_push_samr_PasswordProperties(ndr
, NDR_SCALARS
, r
->password_properties
));
488 NDR_CHECK(ndr_push_dlong(ndr
, NDR_SCALARS
, r
->max_password_age
));
489 NDR_CHECK(ndr_push_dlong(ndr
, NDR_SCALARS
, r
->min_password_age
));
491 if (ndr_flags
& NDR_BUFFERS
) {
493 return NDR_ERR_SUCCESS
;
496 static enum ndr_err_code
ndr_pull_samr_DomInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo1
*r
)
498 if (ndr_flags
& NDR_SCALARS
) {
499 NDR_CHECK(ndr_pull_align(ndr
, 4));
500 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->min_password_length
));
501 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->password_history_length
));
502 NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr
, NDR_SCALARS
, &r
->password_properties
));
503 NDR_CHECK(ndr_pull_dlong(ndr
, NDR_SCALARS
, &r
->max_password_age
));
504 NDR_CHECK(ndr_pull_dlong(ndr
, NDR_SCALARS
, &r
->min_password_age
));
506 if (ndr_flags
& NDR_BUFFERS
) {
508 return NDR_ERR_SUCCESS
;
511 _PUBLIC_
void ndr_print_samr_DomInfo1(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo1
*r
)
513 ndr_print_struct(ndr
, name
, "samr_DomInfo1");
515 ndr_print_uint16(ndr
, "min_password_length", r
->min_password_length
);
516 ndr_print_uint16(ndr
, "password_history_length", r
->password_history_length
);
517 ndr_print_samr_PasswordProperties(ndr
, "password_properties", r
->password_properties
);
518 ndr_print_dlong(ndr
, "max_password_age", r
->max_password_age
);
519 ndr_print_dlong(ndr
, "min_password_age", r
->min_password_age
);
523 static enum ndr_err_code
ndr_push_samr_DomGeneralInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomGeneralInformation
*r
)
525 if (ndr_flags
& NDR_SCALARS
) {
526 NDR_CHECK(ndr_push_align(ndr
, 4));
527 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->force_logoff_time
));
528 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->oem_information
));
529 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
530 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->primary
));
531 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->sequence_num
));
532 NDR_CHECK(ndr_push_samr_DomainServerState(ndr
, NDR_SCALARS
, r
->domain_server_state
));
533 NDR_CHECK(ndr_push_samr_Role(ndr
, NDR_SCALARS
, r
->role
));
534 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown3
));
535 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_users
));
536 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_groups
));
537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_aliases
));
539 if (ndr_flags
& NDR_BUFFERS
) {
540 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->oem_information
));
541 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
542 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary
));
544 return NDR_ERR_SUCCESS
;
547 static enum ndr_err_code
ndr_pull_samr_DomGeneralInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomGeneralInformation
*r
)
549 if (ndr_flags
& NDR_SCALARS
) {
550 NDR_CHECK(ndr_pull_align(ndr
, 4));
551 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->force_logoff_time
));
552 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->oem_information
));
553 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
554 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->primary
));
555 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->sequence_num
));
556 NDR_CHECK(ndr_pull_samr_DomainServerState(ndr
, NDR_SCALARS
, &r
->domain_server_state
));
557 NDR_CHECK(ndr_pull_samr_Role(ndr
, NDR_SCALARS
, &r
->role
));
558 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown3
));
559 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_users
));
560 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_groups
));
561 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_aliases
));
563 if (ndr_flags
& NDR_BUFFERS
) {
564 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->oem_information
));
565 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
566 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary
));
568 return NDR_ERR_SUCCESS
;
571 _PUBLIC_
void ndr_print_samr_DomGeneralInformation(struct ndr_print
*ndr
, const char *name
, const struct samr_DomGeneralInformation
*r
)
573 ndr_print_struct(ndr
, name
, "samr_DomGeneralInformation");
575 ndr_print_NTTIME(ndr
, "force_logoff_time", r
->force_logoff_time
);
576 ndr_print_lsa_String(ndr
, "oem_information", &r
->oem_information
);
577 ndr_print_lsa_String(ndr
, "domain_name", &r
->domain_name
);
578 ndr_print_lsa_String(ndr
, "primary", &r
->primary
);
579 ndr_print_udlong(ndr
, "sequence_num", r
->sequence_num
);
580 ndr_print_samr_DomainServerState(ndr
, "domain_server_state", r
->domain_server_state
);
581 ndr_print_samr_Role(ndr
, "role", r
->role
);
582 ndr_print_uint32(ndr
, "unknown3", r
->unknown3
);
583 ndr_print_uint32(ndr
, "num_users", r
->num_users
);
584 ndr_print_uint32(ndr
, "num_groups", r
->num_groups
);
585 ndr_print_uint32(ndr
, "num_aliases", r
->num_aliases
);
589 static enum ndr_err_code
ndr_push_samr_DomInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo3
*r
)
591 if (ndr_flags
& NDR_SCALARS
) {
592 NDR_CHECK(ndr_push_align(ndr
, 4));
593 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->force_logoff_time
));
595 if (ndr_flags
& NDR_BUFFERS
) {
597 return NDR_ERR_SUCCESS
;
600 static enum ndr_err_code
ndr_pull_samr_DomInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo3
*r
)
602 if (ndr_flags
& NDR_SCALARS
) {
603 NDR_CHECK(ndr_pull_align(ndr
, 4));
604 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->force_logoff_time
));
606 if (ndr_flags
& NDR_BUFFERS
) {
608 return NDR_ERR_SUCCESS
;
611 _PUBLIC_
void ndr_print_samr_DomInfo3(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo3
*r
)
613 ndr_print_struct(ndr
, name
, "samr_DomInfo3");
615 ndr_print_NTTIME(ndr
, "force_logoff_time", r
->force_logoff_time
);
619 static enum ndr_err_code
ndr_push_samr_DomOEMInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomOEMInformation
*r
)
621 if (ndr_flags
& NDR_SCALARS
) {
622 NDR_CHECK(ndr_push_align(ndr
, 4));
623 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->oem_information
));
625 if (ndr_flags
& NDR_BUFFERS
) {
626 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->oem_information
));
628 return NDR_ERR_SUCCESS
;
631 static enum ndr_err_code
ndr_pull_samr_DomOEMInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomOEMInformation
*r
)
633 if (ndr_flags
& NDR_SCALARS
) {
634 NDR_CHECK(ndr_pull_align(ndr
, 4));
635 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->oem_information
));
637 if (ndr_flags
& NDR_BUFFERS
) {
638 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->oem_information
));
640 return NDR_ERR_SUCCESS
;
643 _PUBLIC_
void ndr_print_samr_DomOEMInformation(struct ndr_print
*ndr
, const char *name
, const struct samr_DomOEMInformation
*r
)
645 ndr_print_struct(ndr
, name
, "samr_DomOEMInformation");
647 ndr_print_lsa_String(ndr
, "oem_information", &r
->oem_information
);
651 static enum ndr_err_code
ndr_push_samr_DomInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo5
*r
)
653 if (ndr_flags
& NDR_SCALARS
) {
654 NDR_CHECK(ndr_push_align(ndr
, 4));
655 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
657 if (ndr_flags
& NDR_BUFFERS
) {
658 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
660 return NDR_ERR_SUCCESS
;
663 static enum ndr_err_code
ndr_pull_samr_DomInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo5
*r
)
665 if (ndr_flags
& NDR_SCALARS
) {
666 NDR_CHECK(ndr_pull_align(ndr
, 4));
667 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
669 if (ndr_flags
& NDR_BUFFERS
) {
670 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
672 return NDR_ERR_SUCCESS
;
675 _PUBLIC_
void ndr_print_samr_DomInfo5(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo5
*r
)
677 ndr_print_struct(ndr
, name
, "samr_DomInfo5");
679 ndr_print_lsa_String(ndr
, "domain_name", &r
->domain_name
);
683 static enum ndr_err_code
ndr_push_samr_DomInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo6
*r
)
685 if (ndr_flags
& NDR_SCALARS
) {
686 NDR_CHECK(ndr_push_align(ndr
, 4));
687 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->primary
));
689 if (ndr_flags
& NDR_BUFFERS
) {
690 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary
));
692 return NDR_ERR_SUCCESS
;
695 static enum ndr_err_code
ndr_pull_samr_DomInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo6
*r
)
697 if (ndr_flags
& NDR_SCALARS
) {
698 NDR_CHECK(ndr_pull_align(ndr
, 4));
699 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->primary
));
701 if (ndr_flags
& NDR_BUFFERS
) {
702 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary
));
704 return NDR_ERR_SUCCESS
;
707 _PUBLIC_
void ndr_print_samr_DomInfo6(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo6
*r
)
709 ndr_print_struct(ndr
, name
, "samr_DomInfo6");
711 ndr_print_lsa_String(ndr
, "primary", &r
->primary
);
715 static enum ndr_err_code
ndr_push_samr_DomInfo7(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo7
*r
)
717 if (ndr_flags
& NDR_SCALARS
) {
718 NDR_CHECK(ndr_push_align(ndr
, 4));
719 NDR_CHECK(ndr_push_samr_Role(ndr
, NDR_SCALARS
, r
->role
));
721 if (ndr_flags
& NDR_BUFFERS
) {
723 return NDR_ERR_SUCCESS
;
726 static enum ndr_err_code
ndr_pull_samr_DomInfo7(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo7
*r
)
728 if (ndr_flags
& NDR_SCALARS
) {
729 NDR_CHECK(ndr_pull_align(ndr
, 4));
730 NDR_CHECK(ndr_pull_samr_Role(ndr
, NDR_SCALARS
, &r
->role
));
732 if (ndr_flags
& NDR_BUFFERS
) {
734 return NDR_ERR_SUCCESS
;
737 _PUBLIC_
void ndr_print_samr_DomInfo7(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo7
*r
)
739 ndr_print_struct(ndr
, name
, "samr_DomInfo7");
741 ndr_print_samr_Role(ndr
, "role", r
->role
);
745 static enum ndr_err_code
ndr_push_samr_DomInfo8(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo8
*r
)
747 if (ndr_flags
& NDR_SCALARS
) {
748 NDR_CHECK(ndr_push_align(ndr
, 8));
749 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->sequence_num
));
750 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->domain_create_time
));
752 if (ndr_flags
& NDR_BUFFERS
) {
754 return NDR_ERR_SUCCESS
;
757 static enum ndr_err_code
ndr_pull_samr_DomInfo8(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo8
*r
)
759 if (ndr_flags
& NDR_SCALARS
) {
760 NDR_CHECK(ndr_pull_align(ndr
, 8));
761 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->sequence_num
));
762 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->domain_create_time
));
764 if (ndr_flags
& NDR_BUFFERS
) {
766 return NDR_ERR_SUCCESS
;
769 _PUBLIC_
void ndr_print_samr_DomInfo8(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo8
*r
)
771 ndr_print_struct(ndr
, name
, "samr_DomInfo8");
773 ndr_print_hyper(ndr
, "sequence_num", r
->sequence_num
);
774 ndr_print_NTTIME(ndr
, "domain_create_time", r
->domain_create_time
);
778 static enum ndr_err_code
ndr_push_samr_DomInfo9(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo9
*r
)
780 if (ndr_flags
& NDR_SCALARS
) {
781 NDR_CHECK(ndr_push_align(ndr
, 4));
782 NDR_CHECK(ndr_push_samr_DomainServerState(ndr
, NDR_SCALARS
, r
->domain_server_state
));
784 if (ndr_flags
& NDR_BUFFERS
) {
786 return NDR_ERR_SUCCESS
;
789 static enum ndr_err_code
ndr_pull_samr_DomInfo9(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo9
*r
)
791 if (ndr_flags
& NDR_SCALARS
) {
792 NDR_CHECK(ndr_pull_align(ndr
, 4));
793 NDR_CHECK(ndr_pull_samr_DomainServerState(ndr
, NDR_SCALARS
, &r
->domain_server_state
));
795 if (ndr_flags
& NDR_BUFFERS
) {
797 return NDR_ERR_SUCCESS
;
800 _PUBLIC_
void ndr_print_samr_DomInfo9(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo9
*r
)
802 ndr_print_struct(ndr
, name
, "samr_DomInfo9");
804 ndr_print_samr_DomainServerState(ndr
, "domain_server_state", r
->domain_server_state
);
808 static enum ndr_err_code
ndr_push_samr_DomGeneralInformation2(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomGeneralInformation2
*r
)
810 if (ndr_flags
& NDR_SCALARS
) {
811 NDR_CHECK(ndr_push_align(ndr
, 8));
812 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr
, NDR_SCALARS
, &r
->general
));
813 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->lockout_duration
));
814 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->lockout_window
));
815 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->lockout_threshold
));
817 if (ndr_flags
& NDR_BUFFERS
) {
818 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr
, NDR_BUFFERS
, &r
->general
));
820 return NDR_ERR_SUCCESS
;
823 static enum ndr_err_code
ndr_pull_samr_DomGeneralInformation2(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomGeneralInformation2
*r
)
825 if (ndr_flags
& NDR_SCALARS
) {
826 NDR_CHECK(ndr_pull_align(ndr
, 8));
827 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr
, NDR_SCALARS
, &r
->general
));
828 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->lockout_duration
));
829 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->lockout_window
));
830 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->lockout_threshold
));
832 if (ndr_flags
& NDR_BUFFERS
) {
833 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr
, NDR_BUFFERS
, &r
->general
));
835 return NDR_ERR_SUCCESS
;
838 _PUBLIC_
void ndr_print_samr_DomGeneralInformation2(struct ndr_print
*ndr
, const char *name
, const struct samr_DomGeneralInformation2
*r
)
840 ndr_print_struct(ndr
, name
, "samr_DomGeneralInformation2");
842 ndr_print_samr_DomGeneralInformation(ndr
, "general", &r
->general
);
843 ndr_print_hyper(ndr
, "lockout_duration", r
->lockout_duration
);
844 ndr_print_hyper(ndr
, "lockout_window", r
->lockout_window
);
845 ndr_print_uint16(ndr
, "lockout_threshold", r
->lockout_threshold
);
849 static enum ndr_err_code
ndr_push_samr_DomInfo12(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo12
*r
)
851 if (ndr_flags
& NDR_SCALARS
) {
852 NDR_CHECK(ndr_push_align(ndr
, 8));
853 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->lockout_duration
));
854 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->lockout_window
));
855 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->lockout_threshold
));
857 if (ndr_flags
& NDR_BUFFERS
) {
859 return NDR_ERR_SUCCESS
;
862 static enum ndr_err_code
ndr_pull_samr_DomInfo12(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DomInfo12
*r
)
864 if (ndr_flags
& NDR_SCALARS
) {
865 NDR_CHECK(ndr_pull_align(ndr
, 8));
866 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->lockout_duration
));
867 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->lockout_window
));
868 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->lockout_threshold
));
870 if (ndr_flags
& NDR_BUFFERS
) {
872 return NDR_ERR_SUCCESS
;
875 _PUBLIC_
void ndr_print_samr_DomInfo12(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo12
*r
)
877 ndr_print_struct(ndr
, name
, "samr_DomInfo12");
879 ndr_print_hyper(ndr
, "lockout_duration", r
->lockout_duration
);
880 ndr_print_hyper(ndr
, "lockout_window", r
->lockout_window
);
881 ndr_print_uint16(ndr
, "lockout_threshold", r
->lockout_threshold
);
885 static enum ndr_err_code
ndr_push_samr_DomInfo13(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DomInfo13
*r
)
887 if (ndr_flags
& NDR_SCALARS
) {
888 NDR_CHECK(ndr_push_align(ndr
, 8));
889 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->sequence_num
));
890 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->domain_create_time
));
891 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->modified_count_at_last_promotion
));
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
));
906 if (ndr_flags
& NDR_BUFFERS
) {
908 return NDR_ERR_SUCCESS
;
911 _PUBLIC_
void ndr_print_samr_DomInfo13(struct ndr_print
*ndr
, const char *name
, const struct samr_DomInfo13
*r
)
913 ndr_print_struct(ndr
, name
, "samr_DomInfo13");
915 ndr_print_hyper(ndr
, "sequence_num", r
->sequence_num
);
916 ndr_print_NTTIME(ndr
, "domain_create_time", r
->domain_create_time
);
917 ndr_print_hyper(ndr
, "modified_count_at_last_promotion", r
->modified_count_at_last_promotion
);
921 static enum ndr_err_code
ndr_push_samr_DomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_DomainInfo
*r
)
923 if (ndr_flags
& NDR_SCALARS
) {
924 int level
= ndr_push_get_switch_value(ndr
, r
);
925 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
928 NDR_CHECK(ndr_push_samr_DomInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
932 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr
, NDR_SCALARS
, &r
->general
));
936 NDR_CHECK(ndr_push_samr_DomInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
940 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr
, NDR_SCALARS
, &r
->oem
));
944 NDR_CHECK(ndr_push_samr_DomInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
948 NDR_CHECK(ndr_push_samr_DomInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
952 NDR_CHECK(ndr_push_samr_DomInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
956 NDR_CHECK(ndr_push_samr_DomInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
960 NDR_CHECK(ndr_push_samr_DomInfo9(ndr
, NDR_SCALARS
, &r
->info9
));
964 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr
, NDR_SCALARS
, &r
->general2
));
968 NDR_CHECK(ndr_push_samr_DomInfo12(ndr
, NDR_SCALARS
, &r
->info12
));
972 NDR_CHECK(ndr_push_samr_DomInfo13(ndr
, NDR_SCALARS
, &r
->info13
));
976 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
979 if (ndr_flags
& NDR_BUFFERS
) {
980 int level
= ndr_push_get_switch_value(ndr
, r
);
986 NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr
, NDR_BUFFERS
, &r
->general
));
993 NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr
, NDR_BUFFERS
, &r
->oem
));
997 NDR_CHECK(ndr_push_samr_DomInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
1001 NDR_CHECK(ndr_push_samr_DomInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
1014 NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr
, NDR_BUFFERS
, &r
->general2
));
1024 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1027 return NDR_ERR_SUCCESS
;
1030 static enum ndr_err_code
ndr_pull_samr_DomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_DomainInfo
*r
)
1034 level
= ndr_pull_get_switch_value(ndr
, r
);
1035 if (ndr_flags
& NDR_SCALARS
) {
1036 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
1037 if (_level
!= level
) {
1038 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1042 NDR_CHECK(ndr_pull_samr_DomInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
1046 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr
, NDR_SCALARS
, &r
->general
));
1050 NDR_CHECK(ndr_pull_samr_DomInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
1054 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr
, NDR_SCALARS
, &r
->oem
));
1058 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
1062 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
1066 NDR_CHECK(ndr_pull_samr_DomInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
1070 NDR_CHECK(ndr_pull_samr_DomInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
1074 NDR_CHECK(ndr_pull_samr_DomInfo9(ndr
, NDR_SCALARS
, &r
->info9
));
1078 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr
, NDR_SCALARS
, &r
->general2
));
1082 NDR_CHECK(ndr_pull_samr_DomInfo12(ndr
, NDR_SCALARS
, &r
->info12
));
1086 NDR_CHECK(ndr_pull_samr_DomInfo13(ndr
, NDR_SCALARS
, &r
->info13
));
1090 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1093 if (ndr_flags
& NDR_BUFFERS
) {
1099 NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr
, NDR_BUFFERS
, &r
->general
));
1106 NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr
, NDR_BUFFERS
, &r
->oem
));
1110 NDR_CHECK(ndr_pull_samr_DomInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
1114 NDR_CHECK(ndr_pull_samr_DomInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
1127 NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr
, NDR_BUFFERS
, &r
->general2
));
1137 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1140 return NDR_ERR_SUCCESS
;
1143 _PUBLIC_
void ndr_print_samr_DomainInfo(struct ndr_print
*ndr
, const char *name
, const union samr_DomainInfo
*r
)
1146 level
= ndr_print_get_switch_value(ndr
, r
);
1147 ndr_print_union(ndr
, name
, level
, "samr_DomainInfo");
1150 ndr_print_samr_DomInfo1(ndr
, "info1", &r
->info1
);
1154 ndr_print_samr_DomGeneralInformation(ndr
, "general", &r
->general
);
1158 ndr_print_samr_DomInfo3(ndr
, "info3", &r
->info3
);
1162 ndr_print_samr_DomOEMInformation(ndr
, "oem", &r
->oem
);
1166 ndr_print_samr_DomInfo5(ndr
, "info5", &r
->info5
);
1170 ndr_print_samr_DomInfo6(ndr
, "info6", &r
->info6
);
1174 ndr_print_samr_DomInfo7(ndr
, "info7", &r
->info7
);
1178 ndr_print_samr_DomInfo8(ndr
, "info8", &r
->info8
);
1182 ndr_print_samr_DomInfo9(ndr
, "info9", &r
->info9
);
1186 ndr_print_samr_DomGeneralInformation2(ndr
, "general2", &r
->general2
);
1190 ndr_print_samr_DomInfo12(ndr
, "info12", &r
->info12
);
1194 ndr_print_samr_DomInfo13(ndr
, "info13", &r
->info13
);
1198 ndr_print_bad_level(ndr
, name
, level
);
1202 static enum ndr_err_code
ndr_push_samr_Ids(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_Ids
*r
)
1204 uint32_t cntr_ids_1
;
1205 if (ndr_flags
& NDR_SCALARS
) {
1206 NDR_CHECK(ndr_push_align(ndr
, 4));
1207 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1208 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ids
));
1210 if (ndr_flags
& NDR_BUFFERS
) {
1212 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1213 for (cntr_ids_1
= 0; cntr_ids_1
< r
->count
; cntr_ids_1
++) {
1214 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ids
[cntr_ids_1
]));
1218 return NDR_ERR_SUCCESS
;
1221 static enum ndr_err_code
ndr_pull_samr_Ids(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_Ids
*r
)
1224 uint32_t cntr_ids_1
;
1225 TALLOC_CTX
*_mem_save_ids_0
;
1226 TALLOC_CTX
*_mem_save_ids_1
;
1227 if (ndr_flags
& NDR_SCALARS
) {
1228 NDR_CHECK(ndr_pull_align(ndr
, 4));
1229 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1230 if (r
->count
> 1024) {
1231 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1233 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ids
));
1235 NDR_PULL_ALLOC(ndr
, r
->ids
);
1240 if (ndr_flags
& NDR_BUFFERS
) {
1242 _mem_save_ids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1243 NDR_PULL_SET_MEM_CTX(ndr
, r
->ids
, 0);
1244 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->ids
));
1245 NDR_PULL_ALLOC_N(ndr
, r
->ids
, ndr_get_array_size(ndr
, &r
->ids
));
1246 _mem_save_ids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1247 NDR_PULL_SET_MEM_CTX(ndr
, r
->ids
, 0);
1248 for (cntr_ids_1
= 0; cntr_ids_1
< r
->count
; cntr_ids_1
++) {
1249 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ids
[cntr_ids_1
]));
1251 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ids_1
, 0);
1252 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ids_0
, 0);
1255 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->ids
, r
->count
));
1258 return NDR_ERR_SUCCESS
;
1261 _PUBLIC_
void ndr_print_samr_Ids(struct ndr_print
*ndr
, const char *name
, const struct samr_Ids
*r
)
1263 uint32_t cntr_ids_1
;
1264 ndr_print_struct(ndr
, name
, "samr_Ids");
1266 ndr_print_uint32(ndr
, "count", r
->count
);
1267 ndr_print_ptr(ndr
, "ids", r
->ids
);
1270 ndr
->print(ndr
, "%s: ARRAY(%d)", "ids", (int)r
->count
);
1272 for (cntr_ids_1
=0;cntr_ids_1
<r
->count
;cntr_ids_1
++) {
1274 if (asprintf(&idx_1
, "[%d]", cntr_ids_1
) != -1) {
1275 ndr_print_uint32(ndr
, "ids", r
->ids
[cntr_ids_1
]);
1285 _PUBLIC_
enum ndr_err_code
ndr_push_samr_GroupAttrs(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
1287 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
1288 return NDR_ERR_SUCCESS
;
1291 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_GroupAttrs(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
1294 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
1296 return NDR_ERR_SUCCESS
;
1299 _PUBLIC_
void ndr_print_samr_GroupAttrs(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
1301 ndr_print_uint32(ndr
, name
, r
);
1303 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_MANDATORY", SE_GROUP_MANDATORY
, r
);
1304 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_ENABLED_BY_DEFAULT", SE_GROUP_ENABLED_BY_DEFAULT
, r
);
1305 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_ENABLED", SE_GROUP_ENABLED
, r
);
1306 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_OWNER", SE_GROUP_OWNER
, r
);
1307 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_USE_FOR_DENY_ONLY", SE_GROUP_USE_FOR_DENY_ONLY
, r
);
1308 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_RESOURCE", SE_GROUP_RESOURCE
, r
);
1309 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SE_GROUP_LOGON_ID", SE_GROUP_LOGON_ID
, r
);
1313 static enum ndr_err_code
ndr_push_samr_GroupInfoAll(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_GroupInfoAll
*r
)
1315 if (ndr_flags
& NDR_SCALARS
) {
1316 NDR_CHECK(ndr_push_align(ndr
, 4));
1317 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1318 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->attributes
));
1319 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_members
));
1320 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1322 if (ndr_flags
& NDR_BUFFERS
) {
1323 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1324 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1326 return NDR_ERR_SUCCESS
;
1329 static enum ndr_err_code
ndr_pull_samr_GroupInfoAll(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_GroupInfoAll
*r
)
1331 if (ndr_flags
& NDR_SCALARS
) {
1332 NDR_CHECK(ndr_pull_align(ndr
, 4));
1333 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1334 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->attributes
));
1335 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_members
));
1336 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1338 if (ndr_flags
& NDR_BUFFERS
) {
1339 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1340 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1342 return NDR_ERR_SUCCESS
;
1345 _PUBLIC_
void ndr_print_samr_GroupInfoAll(struct ndr_print
*ndr
, const char *name
, const struct samr_GroupInfoAll
*r
)
1347 ndr_print_struct(ndr
, name
, "samr_GroupInfoAll");
1349 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1350 ndr_print_samr_GroupAttrs(ndr
, "attributes", r
->attributes
);
1351 ndr_print_uint32(ndr
, "num_members", r
->num_members
);
1352 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1356 static enum ndr_err_code
ndr_push_samr_GroupInfoAttributes(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_GroupInfoAttributes
*r
)
1358 if (ndr_flags
& NDR_SCALARS
) {
1359 NDR_CHECK(ndr_push_align(ndr
, 4));
1360 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->attributes
));
1362 if (ndr_flags
& NDR_BUFFERS
) {
1364 return NDR_ERR_SUCCESS
;
1367 static enum ndr_err_code
ndr_pull_samr_GroupInfoAttributes(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_GroupInfoAttributes
*r
)
1369 if (ndr_flags
& NDR_SCALARS
) {
1370 NDR_CHECK(ndr_pull_align(ndr
, 4));
1371 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->attributes
));
1373 if (ndr_flags
& NDR_BUFFERS
) {
1375 return NDR_ERR_SUCCESS
;
1378 _PUBLIC_
void ndr_print_samr_GroupInfoAttributes(struct ndr_print
*ndr
, const char *name
, const struct samr_GroupInfoAttributes
*r
)
1380 ndr_print_struct(ndr
, name
, "samr_GroupInfoAttributes");
1382 ndr_print_samr_GroupAttrs(ndr
, "attributes", r
->attributes
);
1386 static enum ndr_err_code
ndr_push_samr_GroupInfoEnum(struct ndr_push
*ndr
, int ndr_flags
, enum samr_GroupInfoEnum r
)
1388 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1389 return NDR_ERR_SUCCESS
;
1392 static enum ndr_err_code
ndr_pull_samr_GroupInfoEnum(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_GroupInfoEnum
*r
)
1395 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1397 return NDR_ERR_SUCCESS
;
1400 _PUBLIC_
void ndr_print_samr_GroupInfoEnum(struct ndr_print
*ndr
, const char *name
, enum samr_GroupInfoEnum r
)
1402 const char *val
= NULL
;
1405 case GROUPINFOALL
: val
= "GROUPINFOALL"; break;
1406 case GROUPINFONAME
: val
= "GROUPINFONAME"; break;
1407 case GROUPINFOATTRIBUTES
: val
= "GROUPINFOATTRIBUTES"; break;
1408 case GROUPINFODESCRIPTION
: val
= "GROUPINFODESCRIPTION"; break;
1409 case GROUPINFOALL2
: val
= "GROUPINFOALL2"; break;
1411 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1414 static enum ndr_err_code
ndr_push_samr_GroupInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_GroupInfo
*r
)
1416 if (ndr_flags
& NDR_SCALARS
) {
1417 int level
= ndr_push_get_switch_value(ndr
, r
);
1418 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, level
));
1420 case GROUPINFOALL
: {
1421 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr
, NDR_SCALARS
, &r
->all
));
1424 case GROUPINFONAME
: {
1425 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1428 case GROUPINFOATTRIBUTES
: {
1429 NDR_CHECK(ndr_push_samr_GroupInfoAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
1432 case GROUPINFODESCRIPTION
: {
1433 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1436 case GROUPINFOALL2
: {
1437 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr
, NDR_SCALARS
, &r
->all2
));
1441 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1444 if (ndr_flags
& NDR_BUFFERS
) {
1445 int level
= ndr_push_get_switch_value(ndr
, r
);
1448 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr
, NDR_BUFFERS
, &r
->all
));
1452 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1455 case GROUPINFOATTRIBUTES
:
1458 case GROUPINFODESCRIPTION
:
1459 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1463 NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr
, NDR_BUFFERS
, &r
->all2
));
1467 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1470 return NDR_ERR_SUCCESS
;
1473 static enum ndr_err_code
ndr_pull_samr_GroupInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_GroupInfo
*r
)
1477 level
= ndr_pull_get_switch_value(ndr
, r
);
1478 if (ndr_flags
& NDR_SCALARS
) {
1479 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
1480 if (_level
!= level
) {
1481 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1484 case GROUPINFOALL
: {
1485 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr
, NDR_SCALARS
, &r
->all
));
1488 case GROUPINFONAME
: {
1489 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1492 case GROUPINFOATTRIBUTES
: {
1493 NDR_CHECK(ndr_pull_samr_GroupInfoAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
1496 case GROUPINFODESCRIPTION
: {
1497 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1500 case GROUPINFOALL2
: {
1501 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr
, NDR_SCALARS
, &r
->all2
));
1505 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1508 if (ndr_flags
& NDR_BUFFERS
) {
1511 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr
, NDR_BUFFERS
, &r
->all
));
1515 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1518 case GROUPINFOATTRIBUTES
:
1521 case GROUPINFODESCRIPTION
:
1522 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1526 NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr
, NDR_BUFFERS
, &r
->all2
));
1530 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1533 return NDR_ERR_SUCCESS
;
1536 _PUBLIC_
void ndr_print_samr_GroupInfo(struct ndr_print
*ndr
, const char *name
, const union samr_GroupInfo
*r
)
1539 level
= ndr_print_get_switch_value(ndr
, r
);
1540 ndr_print_union(ndr
, name
, level
, "samr_GroupInfo");
1543 ndr_print_samr_GroupInfoAll(ndr
, "all", &r
->all
);
1547 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1550 case GROUPINFOATTRIBUTES
:
1551 ndr_print_samr_GroupInfoAttributes(ndr
, "attributes", &r
->attributes
);
1554 case GROUPINFODESCRIPTION
:
1555 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1559 ndr_print_samr_GroupInfoAll(ndr
, "all2", &r
->all2
);
1563 ndr_print_bad_level(ndr
, name
, level
);
1567 static enum ndr_err_code
ndr_push_samr_RidTypeArray(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_RidTypeArray
*r
)
1569 uint32_t cntr_rids_1
;
1570 uint32_t cntr_types_1
;
1571 if (ndr_flags
& NDR_SCALARS
) {
1572 NDR_CHECK(ndr_push_align(ndr
, 4));
1573 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1574 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->rids
));
1575 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->types
));
1577 if (ndr_flags
& NDR_BUFFERS
) {
1579 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1580 for (cntr_rids_1
= 0; cntr_rids_1
< r
->count
; cntr_rids_1
++) {
1581 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rids
[cntr_rids_1
]));
1585 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1586 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
1587 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->types
[cntr_types_1
]));
1591 return NDR_ERR_SUCCESS
;
1594 static enum ndr_err_code
ndr_pull_samr_RidTypeArray(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_RidTypeArray
*r
)
1597 uint32_t cntr_rids_1
;
1598 TALLOC_CTX
*_mem_save_rids_0
;
1599 TALLOC_CTX
*_mem_save_rids_1
;
1600 uint32_t _ptr_types
;
1601 uint32_t cntr_types_1
;
1602 TALLOC_CTX
*_mem_save_types_0
;
1603 TALLOC_CTX
*_mem_save_types_1
;
1604 if (ndr_flags
& NDR_SCALARS
) {
1605 NDR_CHECK(ndr_pull_align(ndr
, 4));
1606 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1607 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rids
));
1609 NDR_PULL_ALLOC(ndr
, r
->rids
);
1613 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_types
));
1615 NDR_PULL_ALLOC(ndr
, r
->types
);
1620 if (ndr_flags
& NDR_BUFFERS
) {
1622 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1623 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
1624 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->rids
));
1625 NDR_PULL_ALLOC_N(ndr
, r
->rids
, ndr_get_array_size(ndr
, &r
->rids
));
1626 _mem_save_rids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1627 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
1628 for (cntr_rids_1
= 0; cntr_rids_1
< r
->count
; cntr_rids_1
++) {
1629 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rids
[cntr_rids_1
]));
1631 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_1
, 0);
1632 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, 0);
1635 _mem_save_types_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1636 NDR_PULL_SET_MEM_CTX(ndr
, r
->types
, 0);
1637 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->types
));
1638 NDR_PULL_ALLOC_N(ndr
, r
->types
, ndr_get_array_size(ndr
, &r
->types
));
1639 _mem_save_types_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1640 NDR_PULL_SET_MEM_CTX(ndr
, r
->types
, 0);
1641 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
1642 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->types
[cntr_types_1
]));
1644 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_1
, 0);
1645 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_0
, 0);
1648 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->rids
, r
->count
));
1651 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->types
, r
->count
));
1654 return NDR_ERR_SUCCESS
;
1657 _PUBLIC_
void ndr_print_samr_RidTypeArray(struct ndr_print
*ndr
, const char *name
, const struct samr_RidTypeArray
*r
)
1659 uint32_t cntr_rids_1
;
1660 uint32_t cntr_types_1
;
1661 ndr_print_struct(ndr
, name
, "samr_RidTypeArray");
1663 ndr_print_uint32(ndr
, "count", r
->count
);
1664 ndr_print_ptr(ndr
, "rids", r
->rids
);
1667 ndr
->print(ndr
, "%s: ARRAY(%d)", "rids", (int)r
->count
);
1669 for (cntr_rids_1
=0;cntr_rids_1
<r
->count
;cntr_rids_1
++) {
1671 if (asprintf(&idx_1
, "[%d]", cntr_rids_1
) != -1) {
1672 ndr_print_uint32(ndr
, "rids", r
->rids
[cntr_rids_1
]);
1679 ndr_print_ptr(ndr
, "types", r
->types
);
1682 ndr
->print(ndr
, "%s: ARRAY(%d)", "types", (int)r
->count
);
1684 for (cntr_types_1
=0;cntr_types_1
<r
->count
;cntr_types_1
++) {
1686 if (asprintf(&idx_1
, "[%d]", cntr_types_1
) != -1) {
1687 ndr_print_uint32(ndr
, "types", r
->types
[cntr_types_1
]);
1697 static enum ndr_err_code
ndr_push_samr_AliasInfoAll(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_AliasInfoAll
*r
)
1699 if (ndr_flags
& NDR_SCALARS
) {
1700 NDR_CHECK(ndr_push_align(ndr
, 4));
1701 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1702 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_members
));
1703 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1705 if (ndr_flags
& NDR_BUFFERS
) {
1706 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1707 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1709 return NDR_ERR_SUCCESS
;
1712 static enum ndr_err_code
ndr_pull_samr_AliasInfoAll(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_AliasInfoAll
*r
)
1714 if (ndr_flags
& NDR_SCALARS
) {
1715 NDR_CHECK(ndr_pull_align(ndr
, 4));
1716 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1717 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_members
));
1718 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1720 if (ndr_flags
& NDR_BUFFERS
) {
1721 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1722 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1724 return NDR_ERR_SUCCESS
;
1727 _PUBLIC_
void ndr_print_samr_AliasInfoAll(struct ndr_print
*ndr
, const char *name
, const struct samr_AliasInfoAll
*r
)
1729 ndr_print_struct(ndr
, name
, "samr_AliasInfoAll");
1731 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1732 ndr_print_uint32(ndr
, "num_members", r
->num_members
);
1733 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1737 static enum ndr_err_code
ndr_push_samr_AliasInfoEnum(struct ndr_push
*ndr
, int ndr_flags
, enum samr_AliasInfoEnum r
)
1739 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1740 return NDR_ERR_SUCCESS
;
1743 static enum ndr_err_code
ndr_pull_samr_AliasInfoEnum(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_AliasInfoEnum
*r
)
1746 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1748 return NDR_ERR_SUCCESS
;
1751 _PUBLIC_
void ndr_print_samr_AliasInfoEnum(struct ndr_print
*ndr
, const char *name
, enum samr_AliasInfoEnum r
)
1753 const char *val
= NULL
;
1756 case ALIASINFOALL
: val
= "ALIASINFOALL"; break;
1757 case ALIASINFONAME
: val
= "ALIASINFONAME"; break;
1758 case ALIASINFODESCRIPTION
: val
= "ALIASINFODESCRIPTION"; break;
1760 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1763 static enum ndr_err_code
ndr_push_samr_AliasInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_AliasInfo
*r
)
1765 if (ndr_flags
& NDR_SCALARS
) {
1766 int level
= ndr_push_get_switch_value(ndr
, r
);
1767 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, level
));
1769 case ALIASINFOALL
: {
1770 NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr
, NDR_SCALARS
, &r
->all
));
1773 case ALIASINFONAME
: {
1774 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1777 case ALIASINFODESCRIPTION
: {
1778 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1782 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1785 if (ndr_flags
& NDR_BUFFERS
) {
1786 int level
= ndr_push_get_switch_value(ndr
, r
);
1789 NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr
, NDR_BUFFERS
, &r
->all
));
1793 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1796 case ALIASINFODESCRIPTION
:
1797 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1801 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1804 return NDR_ERR_SUCCESS
;
1807 static enum ndr_err_code
ndr_pull_samr_AliasInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_AliasInfo
*r
)
1811 level
= ndr_pull_get_switch_value(ndr
, r
);
1812 if (ndr_flags
& NDR_SCALARS
) {
1813 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
1814 if (_level
!= level
) {
1815 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1818 case ALIASINFOALL
: {
1819 NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr
, NDR_SCALARS
, &r
->all
));
1822 case ALIASINFONAME
: {
1823 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1826 case ALIASINFODESCRIPTION
: {
1827 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1831 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1834 if (ndr_flags
& NDR_BUFFERS
) {
1837 NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr
, NDR_BUFFERS
, &r
->all
));
1841 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1844 case ALIASINFODESCRIPTION
:
1845 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1849 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1852 return NDR_ERR_SUCCESS
;
1855 _PUBLIC_
void ndr_print_samr_AliasInfo(struct ndr_print
*ndr
, const char *name
, const union samr_AliasInfo
*r
)
1858 level
= ndr_print_get_switch_value(ndr
, r
);
1859 ndr_print_union(ndr
, name
, level
, "samr_AliasInfo");
1862 ndr_print_samr_AliasInfoAll(ndr
, "all", &r
->all
);
1866 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1869 case ALIASINFODESCRIPTION
:
1870 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1874 ndr_print_bad_level(ndr
, name
, level
);
1878 static enum ndr_err_code
ndr_push_samr_UserInfoLevel(struct ndr_push
*ndr
, int ndr_flags
, enum samr_UserInfoLevel r
)
1880 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1881 return NDR_ERR_SUCCESS
;
1884 static enum ndr_err_code
ndr_pull_samr_UserInfoLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_UserInfoLevel
*r
)
1887 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1889 return NDR_ERR_SUCCESS
;
1892 _PUBLIC_
void ndr_print_samr_UserInfoLevel(struct ndr_print
*ndr
, const char *name
, enum samr_UserInfoLevel r
)
1894 const char *val
= NULL
;
1897 case UserGeneralInformation
: val
= "UserGeneralInformation"; break;
1898 case UserPreferencesInformation
: val
= "UserPreferencesInformation"; break;
1899 case UserLogonInformation
: val
= "UserLogonInformation"; break;
1900 case UserLogonHoursInformation
: val
= "UserLogonHoursInformation"; break;
1901 case UserAccountInformation
: val
= "UserAccountInformation"; break;
1902 case UserNameInformation
: val
= "UserNameInformation"; break;
1903 case UserAccountNameInformation
: val
= "UserAccountNameInformation"; break;
1904 case UserFullNameInformation
: val
= "UserFullNameInformation"; break;
1905 case UserPrimaryGroupInformation
: val
= "UserPrimaryGroupInformation"; break;
1906 case UserHomeInformation
: val
= "UserHomeInformation"; break;
1907 case UserScriptInformation
: val
= "UserScriptInformation"; break;
1908 case UserProfileInformation
: val
= "UserProfileInformation"; break;
1909 case UserAdminCommentInformation
: val
= "UserAdminCommentInformation"; break;
1910 case UserWorkStationsInformation
: val
= "UserWorkStationsInformation"; break;
1911 case UserControlInformation
: val
= "UserControlInformation"; break;
1912 case UserExpiresInformation
: val
= "UserExpiresInformation"; break;
1913 case UserInternal1Information
: val
= "UserInternal1Information"; break;
1914 case UserParametersInformation
: val
= "UserParametersInformation"; break;
1915 case UserAllInformation
: val
= "UserAllInformation"; break;
1916 case UserInternal4Information
: val
= "UserInternal4Information"; break;
1917 case UserInternal5Information
: val
= "UserInternal5Information"; break;
1918 case UserInternal4InformationNew
: val
= "UserInternal4InformationNew"; break;
1919 case UserInternal5InformationNew
: val
= "UserInternal5InformationNew"; break;
1921 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1924 static enum ndr_err_code
ndr_push_samr_UserInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo1
*r
)
1926 if (ndr_flags
& NDR_SCALARS
) {
1927 NDR_CHECK(ndr_push_align(ndr
, 4));
1928 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
1929 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
1930 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
1931 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1932 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
1934 if (ndr_flags
& NDR_BUFFERS
) {
1935 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
1936 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
1937 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1938 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
1940 return NDR_ERR_SUCCESS
;
1943 static enum ndr_err_code
ndr_pull_samr_UserInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo1
*r
)
1945 if (ndr_flags
& NDR_SCALARS
) {
1946 NDR_CHECK(ndr_pull_align(ndr
, 4));
1947 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
1948 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
1949 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
1950 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
1951 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
1953 if (ndr_flags
& NDR_BUFFERS
) {
1954 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
1955 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
1956 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
1957 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
1959 return NDR_ERR_SUCCESS
;
1962 _PUBLIC_
void ndr_print_samr_UserInfo1(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo1
*r
)
1964 ndr_print_struct(ndr
, name
, "samr_UserInfo1");
1966 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
1967 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
1968 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
1969 ndr_print_lsa_String(ndr
, "description", &r
->description
);
1970 ndr_print_lsa_String(ndr
, "comment", &r
->comment
);
1974 static enum ndr_err_code
ndr_push_samr_UserInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo2
*r
)
1976 if (ndr_flags
& NDR_SCALARS
) {
1977 NDR_CHECK(ndr_push_align(ndr
, 4));
1978 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
1979 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown
));
1980 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->country_code
));
1981 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->code_page
));
1983 if (ndr_flags
& NDR_BUFFERS
) {
1984 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
1985 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown
));
1987 return NDR_ERR_SUCCESS
;
1990 static enum ndr_err_code
ndr_pull_samr_UserInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo2
*r
)
1992 if (ndr_flags
& NDR_SCALARS
) {
1993 NDR_CHECK(ndr_pull_align(ndr
, 4));
1994 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
1995 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown
));
1996 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->country_code
));
1997 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->code_page
));
1999 if (ndr_flags
& NDR_BUFFERS
) {
2000 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2001 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown
));
2003 return NDR_ERR_SUCCESS
;
2006 _PUBLIC_
void ndr_print_samr_UserInfo2(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo2
*r
)
2008 ndr_print_struct(ndr
, name
, "samr_UserInfo2");
2010 ndr_print_lsa_String(ndr
, "comment", &r
->comment
);
2011 ndr_print_lsa_String(ndr
, "unknown", &r
->unknown
);
2012 ndr_print_uint16(ndr
, "country_code", r
->country_code
);
2013 ndr_print_uint16(ndr
, "code_page", r
->code_page
);
2017 _PUBLIC_
enum ndr_err_code
ndr_push_samr_LogonHours(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_LogonHours
*r
)
2020 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2021 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2022 if (ndr_flags
& NDR_SCALARS
) {
2023 NDR_CHECK(ndr_push_align(ndr
, 4));
2024 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->units_per_week
));
2025 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->bits
));
2027 if (ndr_flags
& NDR_BUFFERS
) {
2029 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1260));
2030 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2031 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->units_per_week
/ 8));
2032 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->bits
, r
->units_per_week
/ 8));
2035 ndr
->flags
= _flags_save_STRUCT
;
2037 return NDR_ERR_SUCCESS
;
2040 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_LogonHours(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_LogonHours
*r
)
2043 TALLOC_CTX
*_mem_save_bits_0
;
2045 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2046 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2047 if (ndr_flags
& NDR_SCALARS
) {
2048 NDR_CHECK(ndr_pull_align(ndr
, 4));
2049 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->units_per_week
));
2050 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_bits
));
2052 NDR_PULL_ALLOC(ndr
, r
->bits
);
2057 if (ndr_flags
& NDR_BUFFERS
) {
2059 _mem_save_bits_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2060 NDR_PULL_SET_MEM_CTX(ndr
, r
->bits
, 0);
2061 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->bits
));
2062 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->bits
));
2063 if (ndr_get_array_length(ndr
, &r
->bits
) > ndr_get_array_size(ndr
, &r
->bits
)) {
2064 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
));
2066 NDR_PULL_ALLOC_N(ndr
, r
->bits
, ndr_get_array_size(ndr
, &r
->bits
));
2067 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->bits
, ndr_get_array_length(ndr
, &r
->bits
)));
2068 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bits_0
, 0);
2071 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->bits
, 1260));
2074 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->bits
, r
->units_per_week
/ 8));
2077 ndr
->flags
= _flags_save_STRUCT
;
2079 return NDR_ERR_SUCCESS
;
2082 _PUBLIC_
void ndr_print_samr_LogonHours(struct ndr_print
*ndr
, const char *name
, const struct samr_LogonHours
*r
)
2084 ndr_print_struct(ndr
, name
, "samr_LogonHours");
2086 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2087 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2089 ndr_print_uint16(ndr
, "units_per_week", r
->units_per_week
);
2090 ndr_print_ptr(ndr
, "bits", r
->bits
);
2093 ndr_print_array_uint8(ndr
, "bits", r
->bits
, r
->units_per_week
/ 8);
2097 ndr
->flags
= _flags_save_STRUCT
;
2101 static enum ndr_err_code
ndr_push_samr_UserInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo3
*r
)
2103 if (ndr_flags
& NDR_SCALARS
) {
2104 NDR_CHECK(ndr_push_align(ndr
, 4));
2105 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2106 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2108 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
2109 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2110 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2111 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2112 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2113 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2114 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logon
));
2115 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logoff
));
2116 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_password_change
));
2117 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->allow_password_change
));
2118 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->force_password_change
));
2119 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2120 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->bad_password_count
));
2121 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logon_count
));
2122 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
2124 if (ndr_flags
& NDR_BUFFERS
) {
2125 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2126 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2127 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2128 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2129 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2130 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2131 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2132 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2134 return NDR_ERR_SUCCESS
;
2137 static enum ndr_err_code
ndr_pull_samr_UserInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo3
*r
)
2139 if (ndr_flags
& NDR_SCALARS
) {
2140 NDR_CHECK(ndr_pull_align(ndr
, 4));
2141 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2142 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2143 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2144 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
2145 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2146 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2147 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2148 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2149 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2150 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logon
));
2151 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logoff
));
2152 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_password_change
));
2153 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->allow_password_change
));
2154 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->force_password_change
));
2155 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2156 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->bad_password_count
));
2157 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logon_count
));
2158 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
2160 if (ndr_flags
& NDR_BUFFERS
) {
2161 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2162 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2163 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2164 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2165 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2166 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2167 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2168 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2170 return NDR_ERR_SUCCESS
;
2173 _PUBLIC_
void ndr_print_samr_UserInfo3(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo3
*r
)
2175 ndr_print_struct(ndr
, name
, "samr_UserInfo3");
2177 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
2178 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
2179 ndr_print_uint32(ndr
, "rid", r
->rid
);
2180 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
2181 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
2182 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
2183 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
2184 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
2185 ndr_print_lsa_String(ndr
, "workstations", &r
->workstations
);
2186 ndr_print_NTTIME(ndr
, "last_logon", r
->last_logon
);
2187 ndr_print_NTTIME(ndr
, "last_logoff", r
->last_logoff
);
2188 ndr_print_NTTIME(ndr
, "last_password_change", r
->last_password_change
);
2189 ndr_print_NTTIME(ndr
, "allow_password_change", r
->allow_password_change
);
2190 ndr_print_NTTIME(ndr
, "force_password_change", r
->force_password_change
);
2191 ndr_print_samr_LogonHours(ndr
, "logon_hours", &r
->logon_hours
);
2192 ndr_print_uint16(ndr
, "bad_password_count", r
->bad_password_count
);
2193 ndr_print_uint16(ndr
, "logon_count", r
->logon_count
);
2194 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
2198 static enum ndr_err_code
ndr_push_samr_UserInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo4
*r
)
2200 if (ndr_flags
& NDR_SCALARS
) {
2201 NDR_CHECK(ndr_push_align(ndr
, 4));
2202 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2204 if (ndr_flags
& NDR_BUFFERS
) {
2205 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2207 return NDR_ERR_SUCCESS
;
2210 static enum ndr_err_code
ndr_pull_samr_UserInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo4
*r
)
2212 if (ndr_flags
& NDR_SCALARS
) {
2213 NDR_CHECK(ndr_pull_align(ndr
, 4));
2214 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2216 if (ndr_flags
& NDR_BUFFERS
) {
2217 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2219 return NDR_ERR_SUCCESS
;
2222 _PUBLIC_
void ndr_print_samr_UserInfo4(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo4
*r
)
2224 ndr_print_struct(ndr
, name
, "samr_UserInfo4");
2226 ndr_print_samr_LogonHours(ndr
, "logon_hours", &r
->logon_hours
);
2230 static enum ndr_err_code
ndr_push_samr_UserInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo5
*r
)
2232 if (ndr_flags
& NDR_SCALARS
) {
2233 NDR_CHECK(ndr_push_align(ndr
, 4));
2234 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2235 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2236 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2237 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
2238 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2239 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2240 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2241 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2242 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2243 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2244 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logon
));
2245 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logoff
));
2246 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2247 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->bad_password_count
));
2248 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logon_count
));
2249 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_password_change
));
2250 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->acct_expiry
));
2251 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
2253 if (ndr_flags
& NDR_BUFFERS
) {
2254 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2255 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2256 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2257 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2258 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2259 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2260 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2261 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2262 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2264 return NDR_ERR_SUCCESS
;
2267 static enum ndr_err_code
ndr_pull_samr_UserInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo5
*r
)
2269 if (ndr_flags
& NDR_SCALARS
) {
2270 NDR_CHECK(ndr_pull_align(ndr
, 4));
2271 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2272 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2273 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2274 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
2275 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2276 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2277 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2278 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2279 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2280 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2281 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logon
));
2282 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logoff
));
2283 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2284 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->bad_password_count
));
2285 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logon_count
));
2286 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_password_change
));
2287 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->acct_expiry
));
2288 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
2290 if (ndr_flags
& NDR_BUFFERS
) {
2291 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2292 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2293 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2294 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2295 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2296 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2297 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2298 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2299 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2301 return NDR_ERR_SUCCESS
;
2304 _PUBLIC_
void ndr_print_samr_UserInfo5(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo5
*r
)
2306 ndr_print_struct(ndr
, name
, "samr_UserInfo5");
2308 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
2309 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
2310 ndr_print_uint32(ndr
, "rid", r
->rid
);
2311 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
2312 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
2313 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
2314 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
2315 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
2316 ndr_print_lsa_String(ndr
, "description", &r
->description
);
2317 ndr_print_lsa_String(ndr
, "workstations", &r
->workstations
);
2318 ndr_print_NTTIME(ndr
, "last_logon", r
->last_logon
);
2319 ndr_print_NTTIME(ndr
, "last_logoff", r
->last_logoff
);
2320 ndr_print_samr_LogonHours(ndr
, "logon_hours", &r
->logon_hours
);
2321 ndr_print_uint16(ndr
, "bad_password_count", r
->bad_password_count
);
2322 ndr_print_uint16(ndr
, "logon_count", r
->logon_count
);
2323 ndr_print_NTTIME(ndr
, "last_password_change", r
->last_password_change
);
2324 ndr_print_NTTIME(ndr
, "acct_expiry", r
->acct_expiry
);
2325 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
2329 static enum ndr_err_code
ndr_push_samr_UserInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo6
*r
)
2331 if (ndr_flags
& NDR_SCALARS
) {
2332 NDR_CHECK(ndr_push_align(ndr
, 4));
2333 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2334 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2336 if (ndr_flags
& NDR_BUFFERS
) {
2337 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2338 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2340 return NDR_ERR_SUCCESS
;
2343 static enum ndr_err_code
ndr_pull_samr_UserInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo6
*r
)
2345 if (ndr_flags
& NDR_SCALARS
) {
2346 NDR_CHECK(ndr_pull_align(ndr
, 4));
2347 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2348 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2350 if (ndr_flags
& NDR_BUFFERS
) {
2351 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2352 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2354 return NDR_ERR_SUCCESS
;
2357 _PUBLIC_
void ndr_print_samr_UserInfo6(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo6
*r
)
2359 ndr_print_struct(ndr
, name
, "samr_UserInfo6");
2361 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
2362 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
2366 static enum ndr_err_code
ndr_push_samr_UserInfo7(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo7
*r
)
2368 if (ndr_flags
& NDR_SCALARS
) {
2369 NDR_CHECK(ndr_push_align(ndr
, 4));
2370 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2372 if (ndr_flags
& NDR_BUFFERS
) {
2373 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2375 return NDR_ERR_SUCCESS
;
2378 static enum ndr_err_code
ndr_pull_samr_UserInfo7(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo7
*r
)
2380 if (ndr_flags
& NDR_SCALARS
) {
2381 NDR_CHECK(ndr_pull_align(ndr
, 4));
2382 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2384 if (ndr_flags
& NDR_BUFFERS
) {
2385 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2387 return NDR_ERR_SUCCESS
;
2390 _PUBLIC_
void ndr_print_samr_UserInfo7(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo7
*r
)
2392 ndr_print_struct(ndr
, name
, "samr_UserInfo7");
2394 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
2398 static enum ndr_err_code
ndr_push_samr_UserInfo8(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo8
*r
)
2400 if (ndr_flags
& NDR_SCALARS
) {
2401 NDR_CHECK(ndr_push_align(ndr
, 4));
2402 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2404 if (ndr_flags
& NDR_BUFFERS
) {
2405 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2407 return NDR_ERR_SUCCESS
;
2410 static enum ndr_err_code
ndr_pull_samr_UserInfo8(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo8
*r
)
2412 if (ndr_flags
& NDR_SCALARS
) {
2413 NDR_CHECK(ndr_pull_align(ndr
, 4));
2414 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2416 if (ndr_flags
& NDR_BUFFERS
) {
2417 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2419 return NDR_ERR_SUCCESS
;
2422 _PUBLIC_
void ndr_print_samr_UserInfo8(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo8
*r
)
2424 ndr_print_struct(ndr
, name
, "samr_UserInfo8");
2426 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
2430 static enum ndr_err_code
ndr_push_samr_UserInfo9(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo9
*r
)
2432 if (ndr_flags
& NDR_SCALARS
) {
2433 NDR_CHECK(ndr_push_align(ndr
, 4));
2434 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
2436 if (ndr_flags
& NDR_BUFFERS
) {
2438 return NDR_ERR_SUCCESS
;
2441 static enum ndr_err_code
ndr_pull_samr_UserInfo9(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo9
*r
)
2443 if (ndr_flags
& NDR_SCALARS
) {
2444 NDR_CHECK(ndr_pull_align(ndr
, 4));
2445 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
2447 if (ndr_flags
& NDR_BUFFERS
) {
2449 return NDR_ERR_SUCCESS
;
2452 _PUBLIC_
void ndr_print_samr_UserInfo9(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo9
*r
)
2454 ndr_print_struct(ndr
, name
, "samr_UserInfo9");
2456 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
2460 static enum ndr_err_code
ndr_push_samr_UserInfo10(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo10
*r
)
2462 if (ndr_flags
& NDR_SCALARS
) {
2463 NDR_CHECK(ndr_push_align(ndr
, 4));
2464 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2465 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2467 if (ndr_flags
& NDR_BUFFERS
) {
2468 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2469 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2471 return NDR_ERR_SUCCESS
;
2474 static enum ndr_err_code
ndr_pull_samr_UserInfo10(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo10
*r
)
2476 if (ndr_flags
& NDR_SCALARS
) {
2477 NDR_CHECK(ndr_pull_align(ndr
, 4));
2478 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2479 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2481 if (ndr_flags
& NDR_BUFFERS
) {
2482 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2483 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2485 return NDR_ERR_SUCCESS
;
2488 _PUBLIC_
void ndr_print_samr_UserInfo10(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo10
*r
)
2490 ndr_print_struct(ndr
, name
, "samr_UserInfo10");
2492 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
2493 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
2497 static enum ndr_err_code
ndr_push_samr_UserInfo11(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo11
*r
)
2499 if (ndr_flags
& NDR_SCALARS
) {
2500 NDR_CHECK(ndr_push_align(ndr
, 4));
2501 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2503 if (ndr_flags
& NDR_BUFFERS
) {
2504 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2506 return NDR_ERR_SUCCESS
;
2509 static enum ndr_err_code
ndr_pull_samr_UserInfo11(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo11
*r
)
2511 if (ndr_flags
& NDR_SCALARS
) {
2512 NDR_CHECK(ndr_pull_align(ndr
, 4));
2513 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2515 if (ndr_flags
& NDR_BUFFERS
) {
2516 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2518 return NDR_ERR_SUCCESS
;
2521 _PUBLIC_
void ndr_print_samr_UserInfo11(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo11
*r
)
2523 ndr_print_struct(ndr
, name
, "samr_UserInfo11");
2525 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
2529 static enum ndr_err_code
ndr_push_samr_UserInfo12(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo12
*r
)
2531 if (ndr_flags
& NDR_SCALARS
) {
2532 NDR_CHECK(ndr_push_align(ndr
, 4));
2533 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2535 if (ndr_flags
& NDR_BUFFERS
) {
2536 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2538 return NDR_ERR_SUCCESS
;
2541 static enum ndr_err_code
ndr_pull_samr_UserInfo12(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo12
*r
)
2543 if (ndr_flags
& NDR_SCALARS
) {
2544 NDR_CHECK(ndr_pull_align(ndr
, 4));
2545 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2547 if (ndr_flags
& NDR_BUFFERS
) {
2548 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2550 return NDR_ERR_SUCCESS
;
2553 _PUBLIC_
void ndr_print_samr_UserInfo12(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo12
*r
)
2555 ndr_print_struct(ndr
, name
, "samr_UserInfo12");
2557 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
2561 static enum ndr_err_code
ndr_push_samr_UserInfo13(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo13
*r
)
2563 if (ndr_flags
& NDR_SCALARS
) {
2564 NDR_CHECK(ndr_push_align(ndr
, 4));
2565 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2567 if (ndr_flags
& NDR_BUFFERS
) {
2568 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2570 return NDR_ERR_SUCCESS
;
2573 static enum ndr_err_code
ndr_pull_samr_UserInfo13(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo13
*r
)
2575 if (ndr_flags
& NDR_SCALARS
) {
2576 NDR_CHECK(ndr_pull_align(ndr
, 4));
2577 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2579 if (ndr_flags
& NDR_BUFFERS
) {
2580 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2582 return NDR_ERR_SUCCESS
;
2585 _PUBLIC_
void ndr_print_samr_UserInfo13(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo13
*r
)
2587 ndr_print_struct(ndr
, name
, "samr_UserInfo13");
2589 ndr_print_lsa_String(ndr
, "description", &r
->description
);
2593 static enum ndr_err_code
ndr_push_samr_UserInfo14(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo14
*r
)
2595 if (ndr_flags
& NDR_SCALARS
) {
2596 NDR_CHECK(ndr_push_align(ndr
, 4));
2597 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2599 if (ndr_flags
& NDR_BUFFERS
) {
2600 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2602 return NDR_ERR_SUCCESS
;
2605 static enum ndr_err_code
ndr_pull_samr_UserInfo14(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo14
*r
)
2607 if (ndr_flags
& NDR_SCALARS
) {
2608 NDR_CHECK(ndr_pull_align(ndr
, 4));
2609 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2611 if (ndr_flags
& NDR_BUFFERS
) {
2612 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2614 return NDR_ERR_SUCCESS
;
2617 _PUBLIC_
void ndr_print_samr_UserInfo14(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo14
*r
)
2619 ndr_print_struct(ndr
, name
, "samr_UserInfo14");
2621 ndr_print_lsa_String(ndr
, "workstations", &r
->workstations
);
2625 static enum ndr_err_code
ndr_push_samr_UserInfo16(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo16
*r
)
2627 if (ndr_flags
& NDR_SCALARS
) {
2628 NDR_CHECK(ndr_push_align(ndr
, 4));
2629 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
2631 if (ndr_flags
& NDR_BUFFERS
) {
2633 return NDR_ERR_SUCCESS
;
2636 static enum ndr_err_code
ndr_pull_samr_UserInfo16(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo16
*r
)
2638 if (ndr_flags
& NDR_SCALARS
) {
2639 NDR_CHECK(ndr_pull_align(ndr
, 4));
2640 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
2642 if (ndr_flags
& NDR_BUFFERS
) {
2644 return NDR_ERR_SUCCESS
;
2647 _PUBLIC_
void ndr_print_samr_UserInfo16(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo16
*r
)
2649 ndr_print_struct(ndr
, name
, "samr_UserInfo16");
2651 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
2655 static enum ndr_err_code
ndr_push_samr_UserInfo17(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo17
*r
)
2657 if (ndr_flags
& NDR_SCALARS
) {
2658 NDR_CHECK(ndr_push_align(ndr
, 4));
2659 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->acct_expiry
));
2661 if (ndr_flags
& NDR_BUFFERS
) {
2663 return NDR_ERR_SUCCESS
;
2666 static enum ndr_err_code
ndr_pull_samr_UserInfo17(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo17
*r
)
2668 if (ndr_flags
& NDR_SCALARS
) {
2669 NDR_CHECK(ndr_pull_align(ndr
, 4));
2670 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->acct_expiry
));
2672 if (ndr_flags
& NDR_BUFFERS
) {
2674 return NDR_ERR_SUCCESS
;
2677 _PUBLIC_
void ndr_print_samr_UserInfo17(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo17
*r
)
2679 ndr_print_struct(ndr
, name
, "samr_UserInfo17");
2681 ndr_print_NTTIME(ndr
, "acct_expiry", r
->acct_expiry
);
2685 _PUBLIC_
enum ndr_err_code
ndr_push_samr_Password(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_Password
*r
)
2688 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2689 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2690 if (ndr_flags
& NDR_SCALARS
) {
2691 NDR_CHECK(ndr_push_align(ndr
, 1));
2692 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 16));
2694 if (ndr_flags
& NDR_BUFFERS
) {
2696 ndr
->flags
= _flags_save_STRUCT
;
2698 return NDR_ERR_SUCCESS
;
2701 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_Password(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_Password
*r
)
2704 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2705 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2706 if (ndr_flags
& NDR_SCALARS
) {
2707 NDR_CHECK(ndr_pull_align(ndr
, 1));
2708 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 16));
2710 if (ndr_flags
& NDR_BUFFERS
) {
2712 ndr
->flags
= _flags_save_STRUCT
;
2714 return NDR_ERR_SUCCESS
;
2717 _PUBLIC_
void ndr_print_samr_Password(struct ndr_print
*ndr
, const char *name
, const struct samr_Password
*r
)
2719 ndr_print_struct(ndr
, name
, "samr_Password");
2721 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2722 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2724 ndr_print_array_uint8(ndr
, "hash", r
->hash
, 16);
2726 ndr
->flags
= _flags_save_STRUCT
;
2730 static enum ndr_err_code
ndr_push_samr_UserInfo18(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo18
*r
)
2732 if (ndr_flags
& NDR_SCALARS
) {
2733 NDR_CHECK(ndr_push_align(ndr
, 1));
2734 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->nt_pwd
));
2735 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->lm_pwd
));
2736 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->nt_pwd_active
));
2737 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->lm_pwd_active
));
2738 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_expired
));
2740 if (ndr_flags
& NDR_BUFFERS
) {
2742 return NDR_ERR_SUCCESS
;
2745 static enum ndr_err_code
ndr_pull_samr_UserInfo18(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo18
*r
)
2747 if (ndr_flags
& NDR_SCALARS
) {
2748 NDR_CHECK(ndr_pull_align(ndr
, 1));
2749 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->nt_pwd
));
2750 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->lm_pwd
));
2751 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->nt_pwd_active
));
2752 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->lm_pwd_active
));
2753 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_expired
));
2755 if (ndr_flags
& NDR_BUFFERS
) {
2757 return NDR_ERR_SUCCESS
;
2760 _PUBLIC_
void ndr_print_samr_UserInfo18(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo18
*r
)
2762 ndr_print_struct(ndr
, name
, "samr_UserInfo18");
2764 ndr_print_samr_Password(ndr
, "nt_pwd", &r
->nt_pwd
);
2765 ndr_print_samr_Password(ndr
, "lm_pwd", &r
->lm_pwd
);
2766 ndr_print_uint8(ndr
, "nt_pwd_active", r
->nt_pwd_active
);
2767 ndr_print_uint8(ndr
, "lm_pwd_active", r
->lm_pwd_active
);
2768 ndr_print_uint8(ndr
, "password_expired", r
->password_expired
);
2772 static enum ndr_err_code
ndr_push_samr_UserInfo20(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo20
*r
)
2774 if (ndr_flags
& NDR_SCALARS
) {
2775 NDR_CHECK(ndr_push_align(ndr
, 4));
2776 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->parameters
));
2778 if (ndr_flags
& NDR_BUFFERS
) {
2779 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->parameters
));
2781 return NDR_ERR_SUCCESS
;
2784 static enum ndr_err_code
ndr_pull_samr_UserInfo20(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo20
*r
)
2786 if (ndr_flags
& NDR_SCALARS
) {
2787 NDR_CHECK(ndr_pull_align(ndr
, 4));
2788 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->parameters
));
2790 if (ndr_flags
& NDR_BUFFERS
) {
2791 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->parameters
));
2793 return NDR_ERR_SUCCESS
;
2796 _PUBLIC_
void ndr_print_samr_UserInfo20(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo20
*r
)
2798 ndr_print_struct(ndr
, name
, "samr_UserInfo20");
2800 ndr_print_lsa_BinaryString(ndr
, "parameters", &r
->parameters
);
2804 static enum ndr_err_code
ndr_push_samr_FieldsPresent(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2806 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2807 return NDR_ERR_SUCCESS
;
2810 static enum ndr_err_code
ndr_pull_samr_FieldsPresent(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2813 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2815 return NDR_ERR_SUCCESS
;
2818 _PUBLIC_
void ndr_print_samr_FieldsPresent(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2820 ndr_print_uint32(ndr
, name
, r
);
2822 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_ACCOUNT_NAME", SAMR_FIELD_ACCOUNT_NAME
, r
);
2823 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_FULL_NAME", SAMR_FIELD_FULL_NAME
, r
);
2824 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_RID", SAMR_FIELD_RID
, r
);
2825 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_PRIMARY_GID", SAMR_FIELD_PRIMARY_GID
, r
);
2826 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_DESCRIPTION", SAMR_FIELD_DESCRIPTION
, r
);
2827 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_COMMENT", SAMR_FIELD_COMMENT
, r
);
2828 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_HOME_DIRECTORY", SAMR_FIELD_HOME_DIRECTORY
, r
);
2829 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_HOME_DRIVE", SAMR_FIELD_HOME_DRIVE
, r
);
2830 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LOGON_SCRIPT", SAMR_FIELD_LOGON_SCRIPT
, r
);
2831 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_PROFILE_PATH", SAMR_FIELD_PROFILE_PATH
, r
);
2832 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_WORKSTATIONS", SAMR_FIELD_WORKSTATIONS
, r
);
2833 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGON", SAMR_FIELD_LAST_LOGON
, r
);
2834 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGOFF", SAMR_FIELD_LAST_LOGOFF
, r
);
2835 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LOGON_HOURS", SAMR_FIELD_LOGON_HOURS
, r
);
2836 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_BAD_PWD_COUNT", SAMR_FIELD_BAD_PWD_COUNT
, r
);
2837 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_NUM_LOGONS", SAMR_FIELD_NUM_LOGONS
, r
);
2838 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_ALLOW_PWD_CHANGE", SAMR_FIELD_ALLOW_PWD_CHANGE
, r
);
2839 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_FORCE_PWD_CHANGE", SAMR_FIELD_FORCE_PWD_CHANGE
, r
);
2840 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LAST_PWD_CHANGE", SAMR_FIELD_LAST_PWD_CHANGE
, r
);
2841 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_ACCT_EXPIRY", SAMR_FIELD_ACCT_EXPIRY
, r
);
2842 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_ACCT_FLAGS", SAMR_FIELD_ACCT_FLAGS
, r
);
2843 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_PARAMETERS", SAMR_FIELD_PARAMETERS
, r
);
2844 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_COUNTRY_CODE", SAMR_FIELD_COUNTRY_CODE
, r
);
2845 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_CODE_PAGE", SAMR_FIELD_CODE_PAGE
, r
);
2846 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_NT_PASSWORD_PRESENT", SAMR_FIELD_NT_PASSWORD_PRESENT
, r
);
2847 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_LM_PASSWORD_PRESENT", SAMR_FIELD_LM_PASSWORD_PRESENT
, r
);
2848 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_PRIVATE_DATA", SAMR_FIELD_PRIVATE_DATA
, r
);
2849 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_EXPIRED_FLAG", SAMR_FIELD_EXPIRED_FLAG
, r
);
2850 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_SEC_DESC", SAMR_FIELD_SEC_DESC
, r
);
2851 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_FIELD_OWF_PWD", SAMR_FIELD_OWF_PWD
, r
);
2855 static enum ndr_err_code
ndr_push_samr_UserInfo21(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo21
*r
)
2857 if (ndr_flags
& NDR_SCALARS
) {
2858 NDR_CHECK(ndr_push_align(ndr
, 4));
2859 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logon
));
2860 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logoff
));
2861 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_password_change
));
2862 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->acct_expiry
));
2863 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->allow_password_change
));
2864 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->force_password_change
));
2865 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2866 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2867 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2868 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2869 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2870 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2871 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2872 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2873 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
2874 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->parameters
));
2875 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->lm_owf_password
));
2876 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->nt_owf_password
));
2877 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2878 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_count
));
2879 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->buffer
));
2880 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2881 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
2882 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
2883 NDR_CHECK(ndr_push_samr_FieldsPresent(ndr
, NDR_SCALARS
, r
->fields_present
));
2884 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2885 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->bad_password_count
));
2886 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logon_count
));
2887 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->country_code
));
2888 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->code_page
));
2889 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->lm_password_set
));
2890 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->nt_password_set
));
2891 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_expired
));
2892 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->unknown4
));
2894 if (ndr_flags
& NDR_BUFFERS
) {
2895 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2896 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2897 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2898 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2899 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2900 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2901 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2902 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2903 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2904 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->parameters
));
2905 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->lm_owf_password
));
2906 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->nt_owf_password
));
2907 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2909 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_count
));
2910 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->buffer
, r
->buf_count
));
2912 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2914 return NDR_ERR_SUCCESS
;
2917 static enum ndr_err_code
ndr_pull_samr_UserInfo21(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo21
*r
)
2919 uint32_t _ptr_buffer
;
2920 TALLOC_CTX
*_mem_save_buffer_0
;
2921 if (ndr_flags
& NDR_SCALARS
) {
2922 NDR_CHECK(ndr_pull_align(ndr
, 4));
2923 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logon
));
2924 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logoff
));
2925 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_password_change
));
2926 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->acct_expiry
));
2927 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->allow_password_change
));
2928 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->force_password_change
));
2929 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2930 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2931 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2932 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2933 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2934 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2935 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2936 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2937 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
2938 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->parameters
));
2939 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->lm_owf_password
));
2940 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->nt_owf_password
));
2941 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2942 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_count
));
2943 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
2945 NDR_PULL_ALLOC(ndr
, r
->buffer
);
2949 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2950 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
2951 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
2952 NDR_CHECK(ndr_pull_samr_FieldsPresent(ndr
, NDR_SCALARS
, &r
->fields_present
));
2953 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2954 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->bad_password_count
));
2955 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logon_count
));
2956 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->country_code
));
2957 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->code_page
));
2958 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->lm_password_set
));
2959 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->nt_password_set
));
2960 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_expired
));
2961 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->unknown4
));
2963 if (ndr_flags
& NDR_BUFFERS
) {
2964 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2965 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2966 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2967 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2968 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2969 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2970 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2971 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2972 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2973 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->parameters
));
2974 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->lm_owf_password
));
2975 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->nt_owf_password
));
2976 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2978 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2979 NDR_PULL_SET_MEM_CTX(ndr
, r
->buffer
, 0);
2980 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->buffer
));
2981 NDR_PULL_ALLOC_N(ndr
, r
->buffer
, ndr_get_array_size(ndr
, &r
->buffer
));
2982 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->buffer
, ndr_get_array_size(ndr
, &r
->buffer
)));
2983 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
2985 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2987 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->buffer
, r
->buf_count
));
2990 return NDR_ERR_SUCCESS
;
2993 _PUBLIC_
void ndr_print_samr_UserInfo21(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo21
*r
)
2995 ndr_print_struct(ndr
, name
, "samr_UserInfo21");
2997 ndr_print_NTTIME(ndr
, "last_logon", r
->last_logon
);
2998 ndr_print_NTTIME(ndr
, "last_logoff", r
->last_logoff
);
2999 ndr_print_NTTIME(ndr
, "last_password_change", r
->last_password_change
);
3000 ndr_print_NTTIME(ndr
, "acct_expiry", r
->acct_expiry
);
3001 ndr_print_NTTIME(ndr
, "allow_password_change", r
->allow_password_change
);
3002 ndr_print_NTTIME(ndr
, "force_password_change", r
->force_password_change
);
3003 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
3004 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
3005 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
3006 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
3007 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
3008 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
3009 ndr_print_lsa_String(ndr
, "description", &r
->description
);
3010 ndr_print_lsa_String(ndr
, "workstations", &r
->workstations
);
3011 ndr_print_lsa_String(ndr
, "comment", &r
->comment
);
3012 ndr_print_lsa_BinaryString(ndr
, "parameters", &r
->parameters
);
3013 ndr_print_lsa_BinaryString(ndr
, "lm_owf_password", &r
->lm_owf_password
);
3014 ndr_print_lsa_BinaryString(ndr
, "nt_owf_password", &r
->nt_owf_password
);
3015 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
3016 ndr_print_uint32(ndr
, "buf_count", r
->buf_count
);
3017 ndr_print_ptr(ndr
, "buffer", r
->buffer
);
3020 ndr_print_array_uint8(ndr
, "buffer", r
->buffer
, r
->buf_count
);
3023 ndr_print_uint32(ndr
, "rid", r
->rid
);
3024 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
3025 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
3026 ndr_print_samr_FieldsPresent(ndr
, "fields_present", r
->fields_present
);
3027 ndr_print_samr_LogonHours(ndr
, "logon_hours", &r
->logon_hours
);
3028 ndr_print_uint16(ndr
, "bad_password_count", r
->bad_password_count
);
3029 ndr_print_uint16(ndr
, "logon_count", r
->logon_count
);
3030 ndr_print_uint16(ndr
, "country_code", r
->country_code
);
3031 ndr_print_uint16(ndr
, "code_page", r
->code_page
);
3032 ndr_print_uint8(ndr
, "lm_password_set", r
->lm_password_set
);
3033 ndr_print_uint8(ndr
, "nt_password_set", r
->nt_password_set
);
3034 ndr_print_uint8(ndr
, "password_expired", r
->password_expired
);
3035 ndr_print_uint8(ndr
, "unknown4", r
->unknown4
);
3039 _PUBLIC_
enum ndr_err_code
ndr_push_samr_CryptPassword(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_CryptPassword
*r
)
3042 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3043 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3044 if (ndr_flags
& NDR_SCALARS
) {
3045 NDR_CHECK(ndr_push_align(ndr
, 1));
3046 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 516));
3048 if (ndr_flags
& NDR_BUFFERS
) {
3050 ndr
->flags
= _flags_save_STRUCT
;
3052 return NDR_ERR_SUCCESS
;
3055 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_CryptPassword(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_CryptPassword
*r
)
3058 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3059 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3060 if (ndr_flags
& NDR_SCALARS
) {
3061 NDR_CHECK(ndr_pull_align(ndr
, 1));
3062 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 516));
3064 if (ndr_flags
& NDR_BUFFERS
) {
3066 ndr
->flags
= _flags_save_STRUCT
;
3068 return NDR_ERR_SUCCESS
;
3071 _PUBLIC_
void ndr_print_samr_CryptPassword(struct ndr_print
*ndr
, const char *name
, const struct samr_CryptPassword
*r
)
3073 ndr_print_struct(ndr
, name
, "samr_CryptPassword");
3075 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3076 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3078 ndr_print_array_uint8(ndr
, "data", r
->data
, 516);
3080 ndr
->flags
= _flags_save_STRUCT
;
3084 static enum ndr_err_code
ndr_push_samr_UserInfo23(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo23
*r
)
3086 if (ndr_flags
& NDR_SCALARS
) {
3087 NDR_CHECK(ndr_push_align(ndr
, 4));
3088 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info
));
3089 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, &r
->password
));
3091 if (ndr_flags
& NDR_BUFFERS
) {
3092 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info
));
3094 return NDR_ERR_SUCCESS
;
3097 static enum ndr_err_code
ndr_pull_samr_UserInfo23(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo23
*r
)
3099 if (ndr_flags
& NDR_SCALARS
) {
3100 NDR_CHECK(ndr_pull_align(ndr
, 4));
3101 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info
));
3102 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, &r
->password
));
3104 if (ndr_flags
& NDR_BUFFERS
) {
3105 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info
));
3107 return NDR_ERR_SUCCESS
;
3110 _PUBLIC_
void ndr_print_samr_UserInfo23(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo23
*r
)
3112 ndr_print_struct(ndr
, name
, "samr_UserInfo23");
3114 ndr_print_samr_UserInfo21(ndr
, "info", &r
->info
);
3115 ndr_print_samr_CryptPassword(ndr
, "password", &r
->password
);
3119 static enum ndr_err_code
ndr_push_samr_UserInfo24(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo24
*r
)
3121 if (ndr_flags
& NDR_SCALARS
) {
3122 NDR_CHECK(ndr_push_align(ndr
, 1));
3123 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, &r
->password
));
3124 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_expired
));
3126 if (ndr_flags
& NDR_BUFFERS
) {
3128 return NDR_ERR_SUCCESS
;
3131 static enum ndr_err_code
ndr_pull_samr_UserInfo24(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo24
*r
)
3133 if (ndr_flags
& NDR_SCALARS
) {
3134 NDR_CHECK(ndr_pull_align(ndr
, 1));
3135 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, &r
->password
));
3136 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_expired
));
3138 if (ndr_flags
& NDR_BUFFERS
) {
3140 return NDR_ERR_SUCCESS
;
3143 _PUBLIC_
void ndr_print_samr_UserInfo24(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo24
*r
)
3145 ndr_print_struct(ndr
, name
, "samr_UserInfo24");
3147 ndr_print_samr_CryptPassword(ndr
, "password", &r
->password
);
3148 ndr_print_uint8(ndr
, "password_expired", r
->password_expired
);
3152 static enum ndr_err_code
ndr_push_samr_CryptPasswordEx(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_CryptPasswordEx
*r
)
3155 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3156 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3157 if (ndr_flags
& NDR_SCALARS
) {
3158 NDR_CHECK(ndr_push_align(ndr
, 1));
3159 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 532));
3161 if (ndr_flags
& NDR_BUFFERS
) {
3163 ndr
->flags
= _flags_save_STRUCT
;
3165 return NDR_ERR_SUCCESS
;
3168 static enum ndr_err_code
ndr_pull_samr_CryptPasswordEx(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_CryptPasswordEx
*r
)
3171 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3172 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3173 if (ndr_flags
& NDR_SCALARS
) {
3174 NDR_CHECK(ndr_pull_align(ndr
, 1));
3175 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 532));
3177 if (ndr_flags
& NDR_BUFFERS
) {
3179 ndr
->flags
= _flags_save_STRUCT
;
3181 return NDR_ERR_SUCCESS
;
3184 _PUBLIC_
void ndr_print_samr_CryptPasswordEx(struct ndr_print
*ndr
, const char *name
, const struct samr_CryptPasswordEx
*r
)
3186 ndr_print_struct(ndr
, name
, "samr_CryptPasswordEx");
3188 uint32_t _flags_save_STRUCT
= ndr
->flags
;
3189 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
3191 ndr_print_array_uint8(ndr
, "data", r
->data
, 532);
3193 ndr
->flags
= _flags_save_STRUCT
;
3197 static enum ndr_err_code
ndr_push_samr_UserInfo25(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo25
*r
)
3199 if (ndr_flags
& NDR_SCALARS
) {
3200 NDR_CHECK(ndr_push_align(ndr
, 4));
3201 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info
));
3202 NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr
, NDR_SCALARS
, &r
->password
));
3204 if (ndr_flags
& NDR_BUFFERS
) {
3205 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info
));
3207 return NDR_ERR_SUCCESS
;
3210 static enum ndr_err_code
ndr_pull_samr_UserInfo25(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo25
*r
)
3212 if (ndr_flags
& NDR_SCALARS
) {
3213 NDR_CHECK(ndr_pull_align(ndr
, 4));
3214 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info
));
3215 NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr
, NDR_SCALARS
, &r
->password
));
3217 if (ndr_flags
& NDR_BUFFERS
) {
3218 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info
));
3220 return NDR_ERR_SUCCESS
;
3223 _PUBLIC_
void ndr_print_samr_UserInfo25(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo25
*r
)
3225 ndr_print_struct(ndr
, name
, "samr_UserInfo25");
3227 ndr_print_samr_UserInfo21(ndr
, "info", &r
->info
);
3228 ndr_print_samr_CryptPasswordEx(ndr
, "password", &r
->password
);
3232 static enum ndr_err_code
ndr_push_samr_UserInfo26(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_UserInfo26
*r
)
3234 if (ndr_flags
& NDR_SCALARS
) {
3235 NDR_CHECK(ndr_push_align(ndr
, 1));
3236 NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr
, NDR_SCALARS
, &r
->password
));
3237 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_expired
));
3239 if (ndr_flags
& NDR_BUFFERS
) {
3241 return NDR_ERR_SUCCESS
;
3244 static enum ndr_err_code
ndr_pull_samr_UserInfo26(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_UserInfo26
*r
)
3246 if (ndr_flags
& NDR_SCALARS
) {
3247 NDR_CHECK(ndr_pull_align(ndr
, 1));
3248 NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr
, NDR_SCALARS
, &r
->password
));
3249 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_expired
));
3251 if (ndr_flags
& NDR_BUFFERS
) {
3253 return NDR_ERR_SUCCESS
;
3256 _PUBLIC_
void ndr_print_samr_UserInfo26(struct ndr_print
*ndr
, const char *name
, const struct samr_UserInfo26
*r
)
3258 ndr_print_struct(ndr
, name
, "samr_UserInfo26");
3260 ndr_print_samr_CryptPasswordEx(ndr
, "password", &r
->password
);
3261 ndr_print_uint8(ndr
, "password_expired", r
->password_expired
);
3265 static enum ndr_err_code
ndr_push_samr_UserInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_UserInfo
*r
)
3267 if (ndr_flags
& NDR_SCALARS
) {
3268 int level
= ndr_push_get_switch_value(ndr
, r
);
3269 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
3272 NDR_CHECK(ndr_push_samr_UserInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
3276 NDR_CHECK(ndr_push_samr_UserInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
3280 NDR_CHECK(ndr_push_samr_UserInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
3284 NDR_CHECK(ndr_push_samr_UserInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
3288 NDR_CHECK(ndr_push_samr_UserInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
3292 NDR_CHECK(ndr_push_samr_UserInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
3296 NDR_CHECK(ndr_push_samr_UserInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
3300 NDR_CHECK(ndr_push_samr_UserInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
3304 NDR_CHECK(ndr_push_samr_UserInfo9(ndr
, NDR_SCALARS
, &r
->info9
));
3308 NDR_CHECK(ndr_push_samr_UserInfo10(ndr
, NDR_SCALARS
, &r
->info10
));
3312 NDR_CHECK(ndr_push_samr_UserInfo11(ndr
, NDR_SCALARS
, &r
->info11
));
3316 NDR_CHECK(ndr_push_samr_UserInfo12(ndr
, NDR_SCALARS
, &r
->info12
));
3320 NDR_CHECK(ndr_push_samr_UserInfo13(ndr
, NDR_SCALARS
, &r
->info13
));
3324 NDR_CHECK(ndr_push_samr_UserInfo14(ndr
, NDR_SCALARS
, &r
->info14
));
3328 NDR_CHECK(ndr_push_samr_UserInfo16(ndr
, NDR_SCALARS
, &r
->info16
));
3332 NDR_CHECK(ndr_push_samr_UserInfo17(ndr
, NDR_SCALARS
, &r
->info17
));
3336 NDR_CHECK(ndr_push_samr_UserInfo18(ndr
, NDR_SCALARS
, &r
->info18
));
3340 NDR_CHECK(ndr_push_samr_UserInfo20(ndr
, NDR_SCALARS
, &r
->info20
));
3344 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info21
));
3348 NDR_CHECK(ndr_push_samr_UserInfo23(ndr
, NDR_SCALARS
, &r
->info23
));
3352 NDR_CHECK(ndr_push_samr_UserInfo24(ndr
, NDR_SCALARS
, &r
->info24
));
3356 NDR_CHECK(ndr_push_samr_UserInfo25(ndr
, NDR_SCALARS
, &r
->info25
));
3360 NDR_CHECK(ndr_push_samr_UserInfo26(ndr
, NDR_SCALARS
, &r
->info26
));
3364 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3367 if (ndr_flags
& NDR_BUFFERS
) {
3368 int level
= ndr_push_get_switch_value(ndr
, r
);
3371 NDR_CHECK(ndr_push_samr_UserInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
3375 NDR_CHECK(ndr_push_samr_UserInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
3379 NDR_CHECK(ndr_push_samr_UserInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
3383 NDR_CHECK(ndr_push_samr_UserInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
3387 NDR_CHECK(ndr_push_samr_UserInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
3391 NDR_CHECK(ndr_push_samr_UserInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
3395 NDR_CHECK(ndr_push_samr_UserInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
3399 NDR_CHECK(ndr_push_samr_UserInfo8(ndr
, NDR_BUFFERS
, &r
->info8
));
3406 NDR_CHECK(ndr_push_samr_UserInfo10(ndr
, NDR_BUFFERS
, &r
->info10
));
3410 NDR_CHECK(ndr_push_samr_UserInfo11(ndr
, NDR_BUFFERS
, &r
->info11
));
3414 NDR_CHECK(ndr_push_samr_UserInfo12(ndr
, NDR_BUFFERS
, &r
->info12
));
3418 NDR_CHECK(ndr_push_samr_UserInfo13(ndr
, NDR_BUFFERS
, &r
->info13
));
3422 NDR_CHECK(ndr_push_samr_UserInfo14(ndr
, NDR_BUFFERS
, &r
->info14
));
3435 NDR_CHECK(ndr_push_samr_UserInfo20(ndr
, NDR_BUFFERS
, &r
->info20
));
3439 NDR_CHECK(ndr_push_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info21
));
3443 NDR_CHECK(ndr_push_samr_UserInfo23(ndr
, NDR_BUFFERS
, &r
->info23
));
3450 NDR_CHECK(ndr_push_samr_UserInfo25(ndr
, NDR_BUFFERS
, &r
->info25
));
3457 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3460 return NDR_ERR_SUCCESS
;
3463 static enum ndr_err_code
ndr_pull_samr_UserInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_UserInfo
*r
)
3467 level
= ndr_pull_get_switch_value(ndr
, r
);
3468 if (ndr_flags
& NDR_SCALARS
) {
3469 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
3470 if (_level
!= level
) {
3471 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
3475 NDR_CHECK(ndr_pull_samr_UserInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
3479 NDR_CHECK(ndr_pull_samr_UserInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
3483 NDR_CHECK(ndr_pull_samr_UserInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
3487 NDR_CHECK(ndr_pull_samr_UserInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
3491 NDR_CHECK(ndr_pull_samr_UserInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
3495 NDR_CHECK(ndr_pull_samr_UserInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
3499 NDR_CHECK(ndr_pull_samr_UserInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
3503 NDR_CHECK(ndr_pull_samr_UserInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
3507 NDR_CHECK(ndr_pull_samr_UserInfo9(ndr
, NDR_SCALARS
, &r
->info9
));
3511 NDR_CHECK(ndr_pull_samr_UserInfo10(ndr
, NDR_SCALARS
, &r
->info10
));
3515 NDR_CHECK(ndr_pull_samr_UserInfo11(ndr
, NDR_SCALARS
, &r
->info11
));
3519 NDR_CHECK(ndr_pull_samr_UserInfo12(ndr
, NDR_SCALARS
, &r
->info12
));
3523 NDR_CHECK(ndr_pull_samr_UserInfo13(ndr
, NDR_SCALARS
, &r
->info13
));
3527 NDR_CHECK(ndr_pull_samr_UserInfo14(ndr
, NDR_SCALARS
, &r
->info14
));
3531 NDR_CHECK(ndr_pull_samr_UserInfo16(ndr
, NDR_SCALARS
, &r
->info16
));
3535 NDR_CHECK(ndr_pull_samr_UserInfo17(ndr
, NDR_SCALARS
, &r
->info17
));
3539 NDR_CHECK(ndr_pull_samr_UserInfo18(ndr
, NDR_SCALARS
, &r
->info18
));
3543 NDR_CHECK(ndr_pull_samr_UserInfo20(ndr
, NDR_SCALARS
, &r
->info20
));
3547 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_SCALARS
, &r
->info21
));
3551 NDR_CHECK(ndr_pull_samr_UserInfo23(ndr
, NDR_SCALARS
, &r
->info23
));
3555 NDR_CHECK(ndr_pull_samr_UserInfo24(ndr
, NDR_SCALARS
, &r
->info24
));
3559 NDR_CHECK(ndr_pull_samr_UserInfo25(ndr
, NDR_SCALARS
, &r
->info25
));
3563 NDR_CHECK(ndr_pull_samr_UserInfo26(ndr
, NDR_SCALARS
, &r
->info26
));
3567 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3570 if (ndr_flags
& NDR_BUFFERS
) {
3573 NDR_CHECK(ndr_pull_samr_UserInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
3577 NDR_CHECK(ndr_pull_samr_UserInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
3581 NDR_CHECK(ndr_pull_samr_UserInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
3585 NDR_CHECK(ndr_pull_samr_UserInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
3589 NDR_CHECK(ndr_pull_samr_UserInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
3593 NDR_CHECK(ndr_pull_samr_UserInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
3597 NDR_CHECK(ndr_pull_samr_UserInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
3601 NDR_CHECK(ndr_pull_samr_UserInfo8(ndr
, NDR_BUFFERS
, &r
->info8
));
3608 NDR_CHECK(ndr_pull_samr_UserInfo10(ndr
, NDR_BUFFERS
, &r
->info10
));
3612 NDR_CHECK(ndr_pull_samr_UserInfo11(ndr
, NDR_BUFFERS
, &r
->info11
));
3616 NDR_CHECK(ndr_pull_samr_UserInfo12(ndr
, NDR_BUFFERS
, &r
->info12
));
3620 NDR_CHECK(ndr_pull_samr_UserInfo13(ndr
, NDR_BUFFERS
, &r
->info13
));
3624 NDR_CHECK(ndr_pull_samr_UserInfo14(ndr
, NDR_BUFFERS
, &r
->info14
));
3637 NDR_CHECK(ndr_pull_samr_UserInfo20(ndr
, NDR_BUFFERS
, &r
->info20
));
3641 NDR_CHECK(ndr_pull_samr_UserInfo21(ndr
, NDR_BUFFERS
, &r
->info21
));
3645 NDR_CHECK(ndr_pull_samr_UserInfo23(ndr
, NDR_BUFFERS
, &r
->info23
));
3652 NDR_CHECK(ndr_pull_samr_UserInfo25(ndr
, NDR_BUFFERS
, &r
->info25
));
3659 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3662 return NDR_ERR_SUCCESS
;
3665 _PUBLIC_
void ndr_print_samr_UserInfo(struct ndr_print
*ndr
, const char *name
, const union samr_UserInfo
*r
)
3668 level
= ndr_print_get_switch_value(ndr
, r
);
3669 ndr_print_union(ndr
, name
, level
, "samr_UserInfo");
3672 ndr_print_samr_UserInfo1(ndr
, "info1", &r
->info1
);
3676 ndr_print_samr_UserInfo2(ndr
, "info2", &r
->info2
);
3680 ndr_print_samr_UserInfo3(ndr
, "info3", &r
->info3
);
3684 ndr_print_samr_UserInfo4(ndr
, "info4", &r
->info4
);
3688 ndr_print_samr_UserInfo5(ndr
, "info5", &r
->info5
);
3692 ndr_print_samr_UserInfo6(ndr
, "info6", &r
->info6
);
3696 ndr_print_samr_UserInfo7(ndr
, "info7", &r
->info7
);
3700 ndr_print_samr_UserInfo8(ndr
, "info8", &r
->info8
);
3704 ndr_print_samr_UserInfo9(ndr
, "info9", &r
->info9
);
3708 ndr_print_samr_UserInfo10(ndr
, "info10", &r
->info10
);
3712 ndr_print_samr_UserInfo11(ndr
, "info11", &r
->info11
);
3716 ndr_print_samr_UserInfo12(ndr
, "info12", &r
->info12
);
3720 ndr_print_samr_UserInfo13(ndr
, "info13", &r
->info13
);
3724 ndr_print_samr_UserInfo14(ndr
, "info14", &r
->info14
);
3728 ndr_print_samr_UserInfo16(ndr
, "info16", &r
->info16
);
3732 ndr_print_samr_UserInfo17(ndr
, "info17", &r
->info17
);
3736 ndr_print_samr_UserInfo18(ndr
, "info18", &r
->info18
);
3740 ndr_print_samr_UserInfo20(ndr
, "info20", &r
->info20
);
3744 ndr_print_samr_UserInfo21(ndr
, "info21", &r
->info21
);
3748 ndr_print_samr_UserInfo23(ndr
, "info23", &r
->info23
);
3752 ndr_print_samr_UserInfo24(ndr
, "info24", &r
->info24
);
3756 ndr_print_samr_UserInfo25(ndr
, "info25", &r
->info25
);
3760 ndr_print_samr_UserInfo26(ndr
, "info26", &r
->info26
);
3764 ndr_print_bad_level(ndr
, name
, level
);
3768 _PUBLIC_
enum ndr_err_code
ndr_push_samr_RidWithAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_RidWithAttribute
*r
)
3770 if (ndr_flags
& NDR_SCALARS
) {
3771 NDR_CHECK(ndr_push_align(ndr
, 4));
3772 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
3773 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->attributes
));
3775 if (ndr_flags
& NDR_BUFFERS
) {
3777 return NDR_ERR_SUCCESS
;
3780 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_RidWithAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_RidWithAttribute
*r
)
3782 if (ndr_flags
& NDR_SCALARS
) {
3783 NDR_CHECK(ndr_pull_align(ndr
, 4));
3784 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
3785 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->attributes
));
3787 if (ndr_flags
& NDR_BUFFERS
) {
3789 return NDR_ERR_SUCCESS
;
3792 _PUBLIC_
void ndr_print_samr_RidWithAttribute(struct ndr_print
*ndr
, const char *name
, const struct samr_RidWithAttribute
*r
)
3794 ndr_print_struct(ndr
, name
, "samr_RidWithAttribute");
3796 ndr_print_uint32(ndr
, "rid", r
->rid
);
3797 ndr_print_samr_GroupAttrs(ndr
, "attributes", r
->attributes
);
3801 _PUBLIC_
enum ndr_err_code
ndr_push_samr_RidWithAttributeArray(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_RidWithAttributeArray
*r
)
3803 uint32_t cntr_rids_1
;
3804 if (ndr_flags
& NDR_SCALARS
) {
3805 NDR_CHECK(ndr_push_align(ndr
, 4));
3806 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3807 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->rids
));
3809 if (ndr_flags
& NDR_BUFFERS
) {
3811 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3812 for (cntr_rids_1
= 0; cntr_rids_1
< r
->count
; cntr_rids_1
++) {
3813 NDR_CHECK(ndr_push_samr_RidWithAttribute(ndr
, NDR_SCALARS
, &r
->rids
[cntr_rids_1
]));
3817 return NDR_ERR_SUCCESS
;
3820 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_RidWithAttributeArray(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_RidWithAttributeArray
*r
)
3823 uint32_t cntr_rids_1
;
3824 TALLOC_CTX
*_mem_save_rids_0
;
3825 TALLOC_CTX
*_mem_save_rids_1
;
3826 if (ndr_flags
& NDR_SCALARS
) {
3827 NDR_CHECK(ndr_pull_align(ndr
, 4));
3828 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
3829 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rids
));
3831 NDR_PULL_ALLOC(ndr
, r
->rids
);
3836 if (ndr_flags
& NDR_BUFFERS
) {
3838 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3839 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
3840 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->rids
));
3841 NDR_PULL_ALLOC_N(ndr
, r
->rids
, ndr_get_array_size(ndr
, &r
->rids
));
3842 _mem_save_rids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3843 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
3844 for (cntr_rids_1
= 0; cntr_rids_1
< r
->count
; cntr_rids_1
++) {
3845 NDR_CHECK(ndr_pull_samr_RidWithAttribute(ndr
, NDR_SCALARS
, &r
->rids
[cntr_rids_1
]));
3847 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_1
, 0);
3848 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, 0);
3851 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->rids
, r
->count
));
3854 return NDR_ERR_SUCCESS
;
3857 _PUBLIC_
void ndr_print_samr_RidWithAttributeArray(struct ndr_print
*ndr
, const char *name
, const struct samr_RidWithAttributeArray
*r
)
3859 uint32_t cntr_rids_1
;
3860 ndr_print_struct(ndr
, name
, "samr_RidWithAttributeArray");
3862 ndr_print_uint32(ndr
, "count", r
->count
);
3863 ndr_print_ptr(ndr
, "rids", r
->rids
);
3866 ndr
->print(ndr
, "%s: ARRAY(%d)", "rids", (int)r
->count
);
3868 for (cntr_rids_1
=0;cntr_rids_1
<r
->count
;cntr_rids_1
++) {
3870 if (asprintf(&idx_1
, "[%d]", cntr_rids_1
) != -1) {
3871 ndr_print_samr_RidWithAttribute(ndr
, "rids", &r
->rids
[cntr_rids_1
]);
3881 static enum ndr_err_code
ndr_push_samr_DispEntryGeneral(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispEntryGeneral
*r
)
3883 if (ndr_flags
& NDR_SCALARS
) {
3884 NDR_CHECK(ndr_push_align(ndr
, 4));
3885 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
3886 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
3887 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
3888 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
3889 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
3890 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
3892 if (ndr_flags
& NDR_BUFFERS
) {
3893 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
3894 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
3895 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
3897 return NDR_ERR_SUCCESS
;
3900 static enum ndr_err_code
ndr_pull_samr_DispEntryGeneral(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispEntryGeneral
*r
)
3902 if (ndr_flags
& NDR_SCALARS
) {
3903 NDR_CHECK(ndr_pull_align(ndr
, 4));
3904 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
3905 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
3906 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
3907 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
3908 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
3909 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
3911 if (ndr_flags
& NDR_BUFFERS
) {
3912 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
3913 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
3914 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
3916 return NDR_ERR_SUCCESS
;
3919 _PUBLIC_
void ndr_print_samr_DispEntryGeneral(struct ndr_print
*ndr
, const char *name
, const struct samr_DispEntryGeneral
*r
)
3921 ndr_print_struct(ndr
, name
, "samr_DispEntryGeneral");
3923 ndr_print_uint32(ndr
, "idx", r
->idx
);
3924 ndr_print_uint32(ndr
, "rid", r
->rid
);
3925 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
3926 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
3927 ndr_print_lsa_String(ndr
, "description", &r
->description
);
3928 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
3932 static enum ndr_err_code
ndr_push_samr_DispInfoGeneral(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispInfoGeneral
*r
)
3934 uint32_t cntr_entries_1
;
3935 if (ndr_flags
& NDR_SCALARS
) {
3936 NDR_CHECK(ndr_push_align(ndr
, 4));
3937 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3938 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
3940 if (ndr_flags
& NDR_BUFFERS
) {
3942 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3943 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
3944 NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
3946 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
3947 NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
3951 return NDR_ERR_SUCCESS
;
3954 static enum ndr_err_code
ndr_pull_samr_DispInfoGeneral(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispInfoGeneral
*r
)
3956 uint32_t _ptr_entries
;
3957 uint32_t cntr_entries_1
;
3958 TALLOC_CTX
*_mem_save_entries_0
;
3959 TALLOC_CTX
*_mem_save_entries_1
;
3960 if (ndr_flags
& NDR_SCALARS
) {
3961 NDR_CHECK(ndr_pull_align(ndr
, 4));
3962 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
3963 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
3965 NDR_PULL_ALLOC(ndr
, r
->entries
);
3970 if (ndr_flags
& NDR_BUFFERS
) {
3972 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3973 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
3974 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
3975 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
3976 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3977 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
3978 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
3979 NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
3981 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
3982 NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
3984 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
3985 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
3988 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
3991 return NDR_ERR_SUCCESS
;
3994 _PUBLIC_
void ndr_print_samr_DispInfoGeneral(struct ndr_print
*ndr
, const char *name
, const struct samr_DispInfoGeneral
*r
)
3996 uint32_t cntr_entries_1
;
3997 ndr_print_struct(ndr
, name
, "samr_DispInfoGeneral");
3999 ndr_print_uint32(ndr
, "count", r
->count
);
4000 ndr_print_ptr(ndr
, "entries", r
->entries
);
4003 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
4005 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
4007 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
4008 ndr_print_samr_DispEntryGeneral(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
4018 static enum ndr_err_code
ndr_push_samr_DispEntryFull(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispEntryFull
*r
)
4020 if (ndr_flags
& NDR_SCALARS
) {
4021 NDR_CHECK(ndr_push_align(ndr
, 4));
4022 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
4023 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4024 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
4025 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
4026 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
4028 if (ndr_flags
& NDR_BUFFERS
) {
4029 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
4030 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
4032 return NDR_ERR_SUCCESS
;
4035 static enum ndr_err_code
ndr_pull_samr_DispEntryFull(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispEntryFull
*r
)
4037 if (ndr_flags
& NDR_SCALARS
) {
4038 NDR_CHECK(ndr_pull_align(ndr
, 4));
4039 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
4040 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4041 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
4042 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
4043 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
4045 if (ndr_flags
& NDR_BUFFERS
) {
4046 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
4047 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
4049 return NDR_ERR_SUCCESS
;
4052 _PUBLIC_
void ndr_print_samr_DispEntryFull(struct ndr_print
*ndr
, const char *name
, const struct samr_DispEntryFull
*r
)
4054 ndr_print_struct(ndr
, name
, "samr_DispEntryFull");
4056 ndr_print_uint32(ndr
, "idx", r
->idx
);
4057 ndr_print_uint32(ndr
, "rid", r
->rid
);
4058 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
4059 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
4060 ndr_print_lsa_String(ndr
, "description", &r
->description
);
4064 static enum ndr_err_code
ndr_push_samr_DispInfoFull(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispInfoFull
*r
)
4066 uint32_t cntr_entries_1
;
4067 if (ndr_flags
& NDR_SCALARS
) {
4068 NDR_CHECK(ndr_push_align(ndr
, 4));
4069 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4070 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
4072 if (ndr_flags
& NDR_BUFFERS
) {
4074 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4075 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4076 NDR_CHECK(ndr_push_samr_DispEntryFull(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4078 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4079 NDR_CHECK(ndr_push_samr_DispEntryFull(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4083 return NDR_ERR_SUCCESS
;
4086 static enum ndr_err_code
ndr_pull_samr_DispInfoFull(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispInfoFull
*r
)
4088 uint32_t _ptr_entries
;
4089 uint32_t cntr_entries_1
;
4090 TALLOC_CTX
*_mem_save_entries_0
;
4091 TALLOC_CTX
*_mem_save_entries_1
;
4092 if (ndr_flags
& NDR_SCALARS
) {
4093 NDR_CHECK(ndr_pull_align(ndr
, 4));
4094 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4095 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
4097 NDR_PULL_ALLOC(ndr
, r
->entries
);
4102 if (ndr_flags
& NDR_BUFFERS
) {
4104 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4105 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4106 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
4107 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
4108 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4109 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4110 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4111 NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4113 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4114 NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4116 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
4117 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
4120 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
4123 return NDR_ERR_SUCCESS
;
4126 _PUBLIC_
void ndr_print_samr_DispInfoFull(struct ndr_print
*ndr
, const char *name
, const struct samr_DispInfoFull
*r
)
4128 uint32_t cntr_entries_1
;
4129 ndr_print_struct(ndr
, name
, "samr_DispInfoFull");
4131 ndr_print_uint32(ndr
, "count", r
->count
);
4132 ndr_print_ptr(ndr
, "entries", r
->entries
);
4135 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
4137 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
4139 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
4140 ndr_print_samr_DispEntryFull(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
4150 static enum ndr_err_code
ndr_push_samr_DispEntryFullGroup(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispEntryFullGroup
*r
)
4152 if (ndr_flags
& NDR_SCALARS
) {
4153 NDR_CHECK(ndr_push_align(ndr
, 4));
4154 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
4155 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4156 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->acct_flags
));
4157 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
4158 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
4160 if (ndr_flags
& NDR_BUFFERS
) {
4161 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
4162 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
4164 return NDR_ERR_SUCCESS
;
4167 static enum ndr_err_code
ndr_pull_samr_DispEntryFullGroup(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispEntryFullGroup
*r
)
4169 if (ndr_flags
& NDR_SCALARS
) {
4170 NDR_CHECK(ndr_pull_align(ndr
, 4));
4171 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
4172 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4173 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->acct_flags
));
4174 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
4175 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
4177 if (ndr_flags
& NDR_BUFFERS
) {
4178 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
4179 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
4181 return NDR_ERR_SUCCESS
;
4184 _PUBLIC_
void ndr_print_samr_DispEntryFullGroup(struct ndr_print
*ndr
, const char *name
, const struct samr_DispEntryFullGroup
*r
)
4186 ndr_print_struct(ndr
, name
, "samr_DispEntryFullGroup");
4188 ndr_print_uint32(ndr
, "idx", r
->idx
);
4189 ndr_print_uint32(ndr
, "rid", r
->rid
);
4190 ndr_print_samr_GroupAttrs(ndr
, "acct_flags", r
->acct_flags
);
4191 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
4192 ndr_print_lsa_String(ndr
, "description", &r
->description
);
4196 static enum ndr_err_code
ndr_push_samr_DispInfoFullGroups(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispInfoFullGroups
*r
)
4198 uint32_t cntr_entries_1
;
4199 if (ndr_flags
& NDR_SCALARS
) {
4200 NDR_CHECK(ndr_push_align(ndr
, 4));
4201 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4202 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
4204 if (ndr_flags
& NDR_BUFFERS
) {
4206 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4207 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4208 NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4210 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4211 NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4215 return NDR_ERR_SUCCESS
;
4218 static enum ndr_err_code
ndr_pull_samr_DispInfoFullGroups(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispInfoFullGroups
*r
)
4220 uint32_t _ptr_entries
;
4221 uint32_t cntr_entries_1
;
4222 TALLOC_CTX
*_mem_save_entries_0
;
4223 TALLOC_CTX
*_mem_save_entries_1
;
4224 if (ndr_flags
& NDR_SCALARS
) {
4225 NDR_CHECK(ndr_pull_align(ndr
, 4));
4226 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4227 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
4229 NDR_PULL_ALLOC(ndr
, r
->entries
);
4234 if (ndr_flags
& NDR_BUFFERS
) {
4236 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4237 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4238 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
4239 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
4240 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4241 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4242 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4243 NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4245 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4246 NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4248 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
4249 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
4252 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
4255 return NDR_ERR_SUCCESS
;
4258 _PUBLIC_
void ndr_print_samr_DispInfoFullGroups(struct ndr_print
*ndr
, const char *name
, const struct samr_DispInfoFullGroups
*r
)
4260 uint32_t cntr_entries_1
;
4261 ndr_print_struct(ndr
, name
, "samr_DispInfoFullGroups");
4263 ndr_print_uint32(ndr
, "count", r
->count
);
4264 ndr_print_ptr(ndr
, "entries", r
->entries
);
4267 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
4269 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
4271 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
4272 ndr_print_samr_DispEntryFullGroup(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
4282 static enum ndr_err_code
ndr_push_samr_DispEntryAscii(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispEntryAscii
*r
)
4284 if (ndr_flags
& NDR_SCALARS
) {
4285 NDR_CHECK(ndr_push_align(ndr
, 4));
4286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->idx
));
4287 NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr
, NDR_SCALARS
, &r
->account_name
));
4289 if (ndr_flags
& NDR_BUFFERS
) {
4290 NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr
, NDR_BUFFERS
, &r
->account_name
));
4292 return NDR_ERR_SUCCESS
;
4295 static enum ndr_err_code
ndr_pull_samr_DispEntryAscii(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispEntryAscii
*r
)
4297 if (ndr_flags
& NDR_SCALARS
) {
4298 NDR_CHECK(ndr_pull_align(ndr
, 4));
4299 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->idx
));
4300 NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr
, NDR_SCALARS
, &r
->account_name
));
4302 if (ndr_flags
& NDR_BUFFERS
) {
4303 NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr
, NDR_BUFFERS
, &r
->account_name
));
4305 return NDR_ERR_SUCCESS
;
4308 _PUBLIC_
void ndr_print_samr_DispEntryAscii(struct ndr_print
*ndr
, const char *name
, const struct samr_DispEntryAscii
*r
)
4310 ndr_print_struct(ndr
, name
, "samr_DispEntryAscii");
4312 ndr_print_uint32(ndr
, "idx", r
->idx
);
4313 ndr_print_lsa_AsciiStringLarge(ndr
, "account_name", &r
->account_name
);
4317 static enum ndr_err_code
ndr_push_samr_DispInfoAscii(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_DispInfoAscii
*r
)
4319 uint32_t cntr_entries_1
;
4320 if (ndr_flags
& NDR_SCALARS
) {
4321 NDR_CHECK(ndr_push_align(ndr
, 4));
4322 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4323 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
4325 if (ndr_flags
& NDR_BUFFERS
) {
4327 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4328 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4329 NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4331 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4332 NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4336 return NDR_ERR_SUCCESS
;
4339 static enum ndr_err_code
ndr_pull_samr_DispInfoAscii(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_DispInfoAscii
*r
)
4341 uint32_t _ptr_entries
;
4342 uint32_t cntr_entries_1
;
4343 TALLOC_CTX
*_mem_save_entries_0
;
4344 TALLOC_CTX
*_mem_save_entries_1
;
4345 if (ndr_flags
& NDR_SCALARS
) {
4346 NDR_CHECK(ndr_pull_align(ndr
, 4));
4347 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4348 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
4350 NDR_PULL_ALLOC(ndr
, r
->entries
);
4355 if (ndr_flags
& NDR_BUFFERS
) {
4357 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4358 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4359 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
4360 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
4361 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4362 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
4363 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4364 NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr
, NDR_SCALARS
, &r
->entries
[cntr_entries_1
]));
4366 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
4367 NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr
, NDR_BUFFERS
, &r
->entries
[cntr_entries_1
]));
4369 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
4370 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
4373 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
4376 return NDR_ERR_SUCCESS
;
4379 _PUBLIC_
void ndr_print_samr_DispInfoAscii(struct ndr_print
*ndr
, const char *name
, const struct samr_DispInfoAscii
*r
)
4381 uint32_t cntr_entries_1
;
4382 ndr_print_struct(ndr
, name
, "samr_DispInfoAscii");
4384 ndr_print_uint32(ndr
, "count", r
->count
);
4385 ndr_print_ptr(ndr
, "entries", r
->entries
);
4388 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
4390 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
4392 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
4393 ndr_print_samr_DispEntryAscii(ndr
, "entries", &r
->entries
[cntr_entries_1
]);
4403 static enum ndr_err_code
ndr_push_samr_DispInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_DispInfo
*r
)
4405 if (ndr_flags
& NDR_SCALARS
) {
4406 int level
= ndr_push_get_switch_value(ndr
, r
);
4407 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
4410 NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr
, NDR_SCALARS
, &r
->info1
));
4414 NDR_CHECK(ndr_push_samr_DispInfoFull(ndr
, NDR_SCALARS
, &r
->info2
));
4418 NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr
, NDR_SCALARS
, &r
->info3
));
4422 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr
, NDR_SCALARS
, &r
->info4
));
4426 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr
, NDR_SCALARS
, &r
->info5
));
4430 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4433 if (ndr_flags
& NDR_BUFFERS
) {
4434 int level
= ndr_push_get_switch_value(ndr
, r
);
4437 NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr
, NDR_BUFFERS
, &r
->info1
));
4441 NDR_CHECK(ndr_push_samr_DispInfoFull(ndr
, NDR_BUFFERS
, &r
->info2
));
4445 NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr
, NDR_BUFFERS
, &r
->info3
));
4449 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr
, NDR_BUFFERS
, &r
->info4
));
4453 NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr
, NDR_BUFFERS
, &r
->info5
));
4457 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4460 return NDR_ERR_SUCCESS
;
4463 static enum ndr_err_code
ndr_pull_samr_DispInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_DispInfo
*r
)
4467 level
= ndr_pull_get_switch_value(ndr
, r
);
4468 if (ndr_flags
& NDR_SCALARS
) {
4469 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
4470 if (_level
!= level
) {
4471 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4475 NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr
, NDR_SCALARS
, &r
->info1
));
4479 NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr
, NDR_SCALARS
, &r
->info2
));
4483 NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr
, NDR_SCALARS
, &r
->info3
));
4487 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr
, NDR_SCALARS
, &r
->info4
));
4491 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr
, NDR_SCALARS
, &r
->info5
));
4495 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4498 if (ndr_flags
& NDR_BUFFERS
) {
4501 NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr
, NDR_BUFFERS
, &r
->info1
));
4505 NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr
, NDR_BUFFERS
, &r
->info2
));
4509 NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr
, NDR_BUFFERS
, &r
->info3
));
4513 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr
, NDR_BUFFERS
, &r
->info4
));
4517 NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr
, NDR_BUFFERS
, &r
->info5
));
4521 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4524 return NDR_ERR_SUCCESS
;
4527 _PUBLIC_
void ndr_print_samr_DispInfo(struct ndr_print
*ndr
, const char *name
, const union samr_DispInfo
*r
)
4530 level
= ndr_print_get_switch_value(ndr
, r
);
4531 ndr_print_union(ndr
, name
, level
, "samr_DispInfo");
4534 ndr_print_samr_DispInfoGeneral(ndr
, "info1", &r
->info1
);
4538 ndr_print_samr_DispInfoFull(ndr
, "info2", &r
->info2
);
4542 ndr_print_samr_DispInfoFullGroups(ndr
, "info3", &r
->info3
);
4546 ndr_print_samr_DispInfoAscii(ndr
, "info4", &r
->info4
);
4550 ndr_print_samr_DispInfoAscii(ndr
, "info5", &r
->info5
);
4554 ndr_print_bad_level(ndr
, name
, level
);
4558 static enum ndr_err_code
ndr_push_samr_PwInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_PwInfo
*r
)
4560 if (ndr_flags
& NDR_SCALARS
) {
4561 NDR_CHECK(ndr_push_align(ndr
, 4));
4562 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->min_password_length
));
4563 NDR_CHECK(ndr_push_samr_PasswordProperties(ndr
, NDR_SCALARS
, r
->password_properties
));
4565 if (ndr_flags
& NDR_BUFFERS
) {
4567 return NDR_ERR_SUCCESS
;
4570 static enum ndr_err_code
ndr_pull_samr_PwInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_PwInfo
*r
)
4572 if (ndr_flags
& NDR_SCALARS
) {
4573 NDR_CHECK(ndr_pull_align(ndr
, 4));
4574 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->min_password_length
));
4575 NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr
, NDR_SCALARS
, &r
->password_properties
));
4577 if (ndr_flags
& NDR_BUFFERS
) {
4579 return NDR_ERR_SUCCESS
;
4582 _PUBLIC_
void ndr_print_samr_PwInfo(struct ndr_print
*ndr
, const char *name
, const struct samr_PwInfo
*r
)
4584 ndr_print_struct(ndr
, name
, "samr_PwInfo");
4586 ndr_print_uint16(ndr
, "min_password_length", r
->min_password_length
);
4587 ndr_print_samr_PasswordProperties(ndr
, "password_properties", r
->password_properties
);
4591 static enum ndr_err_code
ndr_push_samr_ConnectVersion(struct ndr_push
*ndr
, int ndr_flags
, enum samr_ConnectVersion r
)
4593 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4594 return NDR_ERR_SUCCESS
;
4597 static enum ndr_err_code
ndr_pull_samr_ConnectVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_ConnectVersion
*r
)
4600 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4602 return NDR_ERR_SUCCESS
;
4605 _PUBLIC_
void ndr_print_samr_ConnectVersion(struct ndr_print
*ndr
, const char *name
, enum samr_ConnectVersion r
)
4607 const char *val
= NULL
;
4610 case SAMR_CONNECT_PRE_W2K
: val
= "SAMR_CONNECT_PRE_W2K"; break;
4611 case SAMR_CONNECT_W2K
: val
= "SAMR_CONNECT_W2K"; break;
4612 case SAMR_CONNECT_AFTER_W2K
: val
= "SAMR_CONNECT_AFTER_W2K"; break;
4614 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4617 static enum ndr_err_code
ndr_push_samr_ChangeReject(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ChangeReject
*r
)
4619 if (ndr_flags
& NDR_SCALARS
) {
4620 NDR_CHECK(ndr_push_align(ndr
, 4));
4621 NDR_CHECK(ndr_push_samr_RejectReason(ndr
, NDR_SCALARS
, r
->reason
));
4622 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
4623 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
4625 if (ndr_flags
& NDR_BUFFERS
) {
4627 return NDR_ERR_SUCCESS
;
4630 static enum ndr_err_code
ndr_pull_samr_ChangeReject(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ChangeReject
*r
)
4632 if (ndr_flags
& NDR_SCALARS
) {
4633 NDR_CHECK(ndr_pull_align(ndr
, 4));
4634 NDR_CHECK(ndr_pull_samr_RejectReason(ndr
, NDR_SCALARS
, &r
->reason
));
4635 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
4636 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
4638 if (ndr_flags
& NDR_BUFFERS
) {
4640 return NDR_ERR_SUCCESS
;
4643 _PUBLIC_
void ndr_print_samr_ChangeReject(struct ndr_print
*ndr
, const char *name
, const struct samr_ChangeReject
*r
)
4645 ndr_print_struct(ndr
, name
, "samr_ChangeReject");
4647 ndr_print_samr_RejectReason(ndr
, "reason", r
->reason
);
4648 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
4649 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
4653 static enum ndr_err_code
ndr_push_samr_ConnectInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ConnectInfo1
*r
)
4655 if (ndr_flags
& NDR_SCALARS
) {
4656 NDR_CHECK(ndr_push_align(ndr
, 4));
4657 NDR_CHECK(ndr_push_samr_ConnectVersion(ndr
, NDR_SCALARS
, r
->client_version
));
4658 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
4660 if (ndr_flags
& NDR_BUFFERS
) {
4662 return NDR_ERR_SUCCESS
;
4665 static enum ndr_err_code
ndr_pull_samr_ConnectInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ConnectInfo1
*r
)
4667 if (ndr_flags
& NDR_SCALARS
) {
4668 NDR_CHECK(ndr_pull_align(ndr
, 4));
4669 NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr
, NDR_SCALARS
, &r
->client_version
));
4670 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
4672 if (ndr_flags
& NDR_BUFFERS
) {
4674 return NDR_ERR_SUCCESS
;
4677 _PUBLIC_
void ndr_print_samr_ConnectInfo1(struct ndr_print
*ndr
, const char *name
, const struct samr_ConnectInfo1
*r
)
4679 ndr_print_struct(ndr
, name
, "samr_ConnectInfo1");
4681 ndr_print_samr_ConnectVersion(ndr
, "client_version", r
->client_version
);
4682 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
4686 static enum ndr_err_code
ndr_push_samr_ConnectInfo(struct ndr_push
*ndr
, int ndr_flags
, const union samr_ConnectInfo
*r
)
4688 if (ndr_flags
& NDR_SCALARS
) {
4689 int level
= ndr_push_get_switch_value(ndr
, r
);
4690 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
4693 NDR_CHECK(ndr_push_samr_ConnectInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
4697 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4700 if (ndr_flags
& NDR_BUFFERS
) {
4701 int level
= ndr_push_get_switch_value(ndr
, r
);
4707 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4710 return NDR_ERR_SUCCESS
;
4713 static enum ndr_err_code
ndr_pull_samr_ConnectInfo(struct ndr_pull
*ndr
, int ndr_flags
, union samr_ConnectInfo
*r
)
4717 level
= ndr_pull_get_switch_value(ndr
, r
);
4718 if (ndr_flags
& NDR_SCALARS
) {
4719 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
4720 if (_level
!= level
) {
4721 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4725 NDR_CHECK(ndr_pull_samr_ConnectInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
4729 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4732 if (ndr_flags
& NDR_BUFFERS
) {
4738 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4741 return NDR_ERR_SUCCESS
;
4744 _PUBLIC_
void ndr_print_samr_ConnectInfo(struct ndr_print
*ndr
, const char *name
, const union samr_ConnectInfo
*r
)
4747 level
= ndr_print_get_switch_value(ndr
, r
);
4748 ndr_print_union(ndr
, name
, level
, "samr_ConnectInfo");
4751 ndr_print_samr_ConnectInfo1(ndr
, "info1", &r
->info1
);
4755 ndr_print_bad_level(ndr
, name
, level
);
4759 static enum ndr_err_code
ndr_push_samr_ValidateFieldsPresent(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
4761 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
4762 return NDR_ERR_SUCCESS
;
4765 static enum ndr_err_code
ndr_pull_samr_ValidateFieldsPresent(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
4768 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
4770 return NDR_ERR_SUCCESS
;
4773 _PUBLIC_
void ndr_print_samr_ValidateFieldsPresent(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
4775 ndr_print_uint32(ndr
, name
, r
);
4777 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET", SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET
, r
);
4778 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME", SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME
, r
);
4779 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_LOCKOUT_TIME", SAMR_VALIDATE_FIELD_LOCKOUT_TIME
, r
);
4780 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT", SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT
, r
);
4781 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH
, r
);
4782 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY
, r
);
4786 static enum ndr_err_code
ndr_push_samr_ValidatePasswordLevel(struct ndr_push
*ndr
, int ndr_flags
, enum samr_ValidatePasswordLevel r
)
4788 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
4789 return NDR_ERR_SUCCESS
;
4792 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_ValidatePasswordLevel
*r
)
4795 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
4797 return NDR_ERR_SUCCESS
;
4800 _PUBLIC_
void ndr_print_samr_ValidatePasswordLevel(struct ndr_print
*ndr
, const char *name
, enum samr_ValidatePasswordLevel r
)
4802 const char *val
= NULL
;
4805 case NetValidateAuthentication
: val
= "NetValidateAuthentication"; break;
4806 case NetValidatePasswordChange
: val
= "NetValidatePasswordChange"; break;
4807 case NetValidatePasswordReset
: val
= "NetValidatePasswordReset"; break;
4809 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4812 static enum ndr_err_code
ndr_push_samr_ValidationStatus(struct ndr_push
*ndr
, int ndr_flags
, enum samr_ValidationStatus r
)
4814 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
4815 return NDR_ERR_SUCCESS
;
4818 static enum ndr_err_code
ndr_pull_samr_ValidationStatus(struct ndr_pull
*ndr
, int ndr_flags
, enum samr_ValidationStatus
*r
)
4821 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
4823 return NDR_ERR_SUCCESS
;
4826 _PUBLIC_
void ndr_print_samr_ValidationStatus(struct ndr_print
*ndr
, const char *name
, enum samr_ValidationStatus r
)
4828 const char *val
= NULL
;
4831 case SAMR_VALIDATION_STATUS_SUCCESS
: val
= "SAMR_VALIDATION_STATUS_SUCCESS"; break;
4832 case SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE
: val
= "SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE"; break;
4833 case SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT
: val
= "SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT"; break;
4834 case SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED
: val
= "SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED"; break;
4835 case SAMR_VALIDATION_STATUS_BAD_PASSWORD
: val
= "SAMR_VALIDATION_STATUS_BAD_PASSWORD"; break;
4836 case SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT
: val
= "SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT"; break;
4837 case SAMR_VALIDATION_STATUS_PWD_TOO_SHORT
: val
= "SAMR_VALIDATION_STATUS_PWD_TOO_SHORT"; break;
4838 case SAMR_VALIDATION_STATUS_PWD_TOO_LONG
: val
= "SAMR_VALIDATION_STATUS_PWD_TOO_LONG"; break;
4839 case SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH
: val
= "SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH"; break;
4840 case SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT
: val
= "SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT"; break;
4841 case SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR
: val
= "SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR"; break;
4843 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4846 static enum ndr_err_code
ndr_push_samr_ValidationBlob(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidationBlob
*r
)
4848 if (ndr_flags
& NDR_SCALARS
) {
4849 NDR_CHECK(ndr_push_align(ndr
, 4));
4850 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4851 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
4853 if (ndr_flags
& NDR_BUFFERS
) {
4855 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4856 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
4859 return NDR_ERR_SUCCESS
;
4862 static enum ndr_err_code
ndr_pull_samr_ValidationBlob(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidationBlob
*r
)
4865 TALLOC_CTX
*_mem_save_data_0
;
4866 if (ndr_flags
& NDR_SCALARS
) {
4867 NDR_CHECK(ndr_pull_align(ndr
, 4));
4868 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
4869 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
4871 NDR_PULL_ALLOC(ndr
, r
->data
);
4876 if (ndr_flags
& NDR_BUFFERS
) {
4878 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4879 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
4880 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
4881 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
4882 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
4883 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
4886 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
4889 return NDR_ERR_SUCCESS
;
4892 _PUBLIC_
void ndr_print_samr_ValidationBlob(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidationBlob
*r
)
4894 ndr_print_struct(ndr
, name
, "samr_ValidationBlob");
4896 ndr_print_uint32(ndr
, "length", r
->length
);
4897 ndr_print_ptr(ndr
, "data", r
->data
);
4900 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
4906 static enum ndr_err_code
ndr_push_samr_ValidatePasswordInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordInfo
*r
)
4908 uint32_t cntr_pwd_history_1
;
4909 if (ndr_flags
& NDR_SCALARS
) {
4910 NDR_CHECK(ndr_push_align(ndr
, 8));
4911 NDR_CHECK(ndr_push_samr_ValidateFieldsPresent(ndr
, NDR_SCALARS
, r
->fields_present
));
4912 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->last_password_change
));
4913 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->bad_password_time
));
4914 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->lockout_time
));
4915 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->bad_pwd_count
));
4916 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pwd_history_len
));
4917 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->pwd_history
));
4919 if (ndr_flags
& NDR_BUFFERS
) {
4920 if (r
->pwd_history
) {
4921 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pwd_history_len
));
4922 for (cntr_pwd_history_1
= 0; cntr_pwd_history_1
< r
->pwd_history_len
; cntr_pwd_history_1
++) {
4923 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->pwd_history
[cntr_pwd_history_1
]));
4925 for (cntr_pwd_history_1
= 0; cntr_pwd_history_1
< r
->pwd_history_len
; cntr_pwd_history_1
++) {
4926 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->pwd_history
[cntr_pwd_history_1
]));
4930 return NDR_ERR_SUCCESS
;
4933 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordInfo
*r
)
4935 uint32_t _ptr_pwd_history
;
4936 uint32_t cntr_pwd_history_1
;
4937 TALLOC_CTX
*_mem_save_pwd_history_0
;
4938 TALLOC_CTX
*_mem_save_pwd_history_1
;
4939 if (ndr_flags
& NDR_SCALARS
) {
4940 NDR_CHECK(ndr_pull_align(ndr
, 8));
4941 NDR_CHECK(ndr_pull_samr_ValidateFieldsPresent(ndr
, NDR_SCALARS
, &r
->fields_present
));
4942 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->last_password_change
));
4943 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->bad_password_time
));
4944 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->lockout_time
));
4945 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->bad_pwd_count
));
4946 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pwd_history_len
));
4947 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_pwd_history
));
4948 if (_ptr_pwd_history
) {
4949 NDR_PULL_ALLOC(ndr
, r
->pwd_history
);
4951 r
->pwd_history
= NULL
;
4954 if (ndr_flags
& NDR_BUFFERS
) {
4955 if (r
->pwd_history
) {
4956 _mem_save_pwd_history_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4957 NDR_PULL_SET_MEM_CTX(ndr
, r
->pwd_history
, 0);
4958 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->pwd_history
));
4959 NDR_PULL_ALLOC_N(ndr
, r
->pwd_history
, ndr_get_array_size(ndr
, &r
->pwd_history
));
4960 _mem_save_pwd_history_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4961 NDR_PULL_SET_MEM_CTX(ndr
, r
->pwd_history
, 0);
4962 for (cntr_pwd_history_1
= 0; cntr_pwd_history_1
< r
->pwd_history_len
; cntr_pwd_history_1
++) {
4963 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->pwd_history
[cntr_pwd_history_1
]));
4965 for (cntr_pwd_history_1
= 0; cntr_pwd_history_1
< r
->pwd_history_len
; cntr_pwd_history_1
++) {
4966 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->pwd_history
[cntr_pwd_history_1
]));
4968 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_pwd_history_1
, 0);
4969 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_pwd_history_0
, 0);
4971 if (r
->pwd_history
) {
4972 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->pwd_history
, r
->pwd_history_len
));
4975 return NDR_ERR_SUCCESS
;
4978 _PUBLIC_
void ndr_print_samr_ValidatePasswordInfo(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordInfo
*r
)
4980 uint32_t cntr_pwd_history_1
;
4981 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordInfo");
4983 ndr_print_samr_ValidateFieldsPresent(ndr
, "fields_present", r
->fields_present
);
4984 ndr_print_NTTIME_hyper(ndr
, "last_password_change", r
->last_password_change
);
4985 ndr_print_NTTIME_hyper(ndr
, "bad_password_time", r
->bad_password_time
);
4986 ndr_print_NTTIME_hyper(ndr
, "lockout_time", r
->lockout_time
);
4987 ndr_print_uint32(ndr
, "bad_pwd_count", r
->bad_pwd_count
);
4988 ndr_print_uint32(ndr
, "pwd_history_len", r
->pwd_history_len
);
4989 ndr_print_ptr(ndr
, "pwd_history", r
->pwd_history
);
4991 if (r
->pwd_history
) {
4992 ndr
->print(ndr
, "%s: ARRAY(%d)", "pwd_history", (int)r
->pwd_history_len
);
4994 for (cntr_pwd_history_1
=0;cntr_pwd_history_1
<r
->pwd_history_len
;cntr_pwd_history_1
++) {
4996 if (asprintf(&idx_1
, "[%d]", cntr_pwd_history_1
) != -1) {
4997 ndr_print_samr_ValidationBlob(ndr
, "pwd_history", &r
->pwd_history
[cntr_pwd_history_1
]);
5007 static enum ndr_err_code
ndr_push_samr_ValidatePasswordRepCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordRepCtr
*r
)
5009 if (ndr_flags
& NDR_SCALARS
) {
5010 NDR_CHECK(ndr_push_align(ndr
, 8));
5011 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5012 NDR_CHECK(ndr_push_samr_ValidationStatus(ndr
, NDR_SCALARS
, r
->status
));
5014 if (ndr_flags
& NDR_BUFFERS
) {
5015 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5017 return NDR_ERR_SUCCESS
;
5020 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordRepCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordRepCtr
*r
)
5022 if (ndr_flags
& NDR_SCALARS
) {
5023 NDR_CHECK(ndr_pull_align(ndr
, 8));
5024 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5025 NDR_CHECK(ndr_pull_samr_ValidationStatus(ndr
, NDR_SCALARS
, &r
->status
));
5027 if (ndr_flags
& NDR_BUFFERS
) {
5028 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5030 return NDR_ERR_SUCCESS
;
5033 _PUBLIC_
void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordRepCtr
*r
)
5035 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordRepCtr");
5037 ndr_print_samr_ValidatePasswordInfo(ndr
, "info", &r
->info
);
5038 ndr_print_samr_ValidationStatus(ndr
, "status", r
->status
);
5042 static enum ndr_err_code
ndr_push_samr_ValidatePasswordRep(struct ndr_push
*ndr
, int ndr_flags
, const union samr_ValidatePasswordRep
*r
)
5044 if (ndr_flags
& NDR_SCALARS
) {
5045 int level
= ndr_push_get_switch_value(ndr
, r
);
5046 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
5049 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr1
));
5053 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr2
));
5057 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr3
));
5061 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5064 if (ndr_flags
& NDR_BUFFERS
) {
5065 int level
= ndr_push_get_switch_value(ndr
, r
);
5068 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr1
));
5072 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr2
));
5076 NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr3
));
5080 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5083 return NDR_ERR_SUCCESS
;
5086 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordRep(struct ndr_pull
*ndr
, int ndr_flags
, union samr_ValidatePasswordRep
*r
)
5090 level
= ndr_pull_get_switch_value(ndr
, r
);
5091 if (ndr_flags
& NDR_SCALARS
) {
5092 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
5093 if (_level
!= level
) {
5094 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
5098 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr1
));
5102 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr2
));
5106 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_SCALARS
, &r
->ctr3
));
5110 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5113 if (ndr_flags
& NDR_BUFFERS
) {
5116 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr1
));
5120 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr2
));
5124 NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr
, NDR_BUFFERS
, &r
->ctr3
));
5128 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5131 return NDR_ERR_SUCCESS
;
5134 _PUBLIC_
void ndr_print_samr_ValidatePasswordRep(struct ndr_print
*ndr
, const char *name
, const union samr_ValidatePasswordRep
*r
)
5137 level
= ndr_print_get_switch_value(ndr
, r
);
5138 ndr_print_union(ndr
, name
, level
, "samr_ValidatePasswordRep");
5141 ndr_print_samr_ValidatePasswordRepCtr(ndr
, "ctr1", &r
->ctr1
);
5145 ndr_print_samr_ValidatePasswordRepCtr(ndr
, "ctr2", &r
->ctr2
);
5149 ndr_print_samr_ValidatePasswordRepCtr(ndr
, "ctr3", &r
->ctr3
);
5153 ndr_print_bad_level(ndr
, name
, level
);
5157 static enum ndr_err_code
ndr_push_samr_ValidatePasswordReq3(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordReq3
*r
)
5159 if (ndr_flags
& NDR_SCALARS
) {
5160 NDR_CHECK(ndr_push_align(ndr
, 8));
5161 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5162 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->password
));
5163 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->account
));
5164 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->hash
));
5165 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->pwd_must_change_at_next_logon
));
5166 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->clear_lockout
));
5168 if (ndr_flags
& NDR_BUFFERS
) {
5169 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5170 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->password
));
5171 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->account
));
5172 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->hash
));
5174 return NDR_ERR_SUCCESS
;
5177 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordReq3(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordReq3
*r
)
5179 if (ndr_flags
& NDR_SCALARS
) {
5180 NDR_CHECK(ndr_pull_align(ndr
, 8));
5181 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5182 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->password
));
5183 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->account
));
5184 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->hash
));
5185 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->pwd_must_change_at_next_logon
));
5186 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->clear_lockout
));
5188 if (ndr_flags
& NDR_BUFFERS
) {
5189 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5190 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->password
));
5191 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->account
));
5192 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->hash
));
5194 return NDR_ERR_SUCCESS
;
5197 _PUBLIC_
void ndr_print_samr_ValidatePasswordReq3(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordReq3
*r
)
5199 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordReq3");
5201 ndr_print_samr_ValidatePasswordInfo(ndr
, "info", &r
->info
);
5202 ndr_print_lsa_StringLarge(ndr
, "password", &r
->password
);
5203 ndr_print_lsa_StringLarge(ndr
, "account", &r
->account
);
5204 ndr_print_samr_ValidationBlob(ndr
, "hash", &r
->hash
);
5205 ndr_print_uint8(ndr
, "pwd_must_change_at_next_logon", r
->pwd_must_change_at_next_logon
);
5206 ndr_print_uint8(ndr
, "clear_lockout", r
->clear_lockout
);
5210 static enum ndr_err_code
ndr_push_samr_ValidatePasswordReq2(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordReq2
*r
)
5212 if (ndr_flags
& NDR_SCALARS
) {
5213 NDR_CHECK(ndr_push_align(ndr
, 8));
5214 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5215 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->password
));
5216 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->account
));
5217 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->hash
));
5218 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_matched
));
5220 if (ndr_flags
& NDR_BUFFERS
) {
5221 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5222 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->password
));
5223 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->account
));
5224 NDR_CHECK(ndr_push_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->hash
));
5226 return NDR_ERR_SUCCESS
;
5229 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordReq2(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordReq2
*r
)
5231 if (ndr_flags
& NDR_SCALARS
) {
5232 NDR_CHECK(ndr_pull_align(ndr
, 8));
5233 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5234 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->password
));
5235 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->account
));
5236 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_SCALARS
, &r
->hash
));
5237 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_matched
));
5239 if (ndr_flags
& NDR_BUFFERS
) {
5240 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5241 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->password
));
5242 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->account
));
5243 NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr
, NDR_BUFFERS
, &r
->hash
));
5245 return NDR_ERR_SUCCESS
;
5248 _PUBLIC_
void ndr_print_samr_ValidatePasswordReq2(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordReq2
*r
)
5250 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordReq2");
5252 ndr_print_samr_ValidatePasswordInfo(ndr
, "info", &r
->info
);
5253 ndr_print_lsa_StringLarge(ndr
, "password", &r
->password
);
5254 ndr_print_lsa_StringLarge(ndr
, "account", &r
->account
);
5255 ndr_print_samr_ValidationBlob(ndr
, "hash", &r
->hash
);
5256 ndr_print_uint8(ndr
, "password_matched", r
->password_matched
);
5260 static enum ndr_err_code
ndr_push_samr_ValidatePasswordReq1(struct ndr_push
*ndr
, int ndr_flags
, const struct samr_ValidatePasswordReq1
*r
)
5262 if (ndr_flags
& NDR_SCALARS
) {
5263 NDR_CHECK(ndr_push_align(ndr
, 8));
5264 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5265 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_matched
));
5267 if (ndr_flags
& NDR_BUFFERS
) {
5268 NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5270 return NDR_ERR_SUCCESS
;
5273 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordReq1(struct ndr_pull
*ndr
, int ndr_flags
, struct samr_ValidatePasswordReq1
*r
)
5275 if (ndr_flags
& NDR_SCALARS
) {
5276 NDR_CHECK(ndr_pull_align(ndr
, 8));
5277 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_SCALARS
, &r
->info
));
5278 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_matched
));
5280 if (ndr_flags
& NDR_BUFFERS
) {
5281 NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5283 return NDR_ERR_SUCCESS
;
5286 _PUBLIC_
void ndr_print_samr_ValidatePasswordReq1(struct ndr_print
*ndr
, const char *name
, const struct samr_ValidatePasswordReq1
*r
)
5288 ndr_print_struct(ndr
, name
, "samr_ValidatePasswordReq1");
5290 ndr_print_samr_ValidatePasswordInfo(ndr
, "info", &r
->info
);
5291 ndr_print_uint8(ndr
, "password_matched", r
->password_matched
);
5295 static enum ndr_err_code
ndr_push_samr_ValidatePasswordReq(struct ndr_push
*ndr
, int ndr_flags
, const union samr_ValidatePasswordReq
*r
)
5297 if (ndr_flags
& NDR_SCALARS
) {
5298 int level
= ndr_push_get_switch_value(ndr
, r
);
5299 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
5302 NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr
, NDR_SCALARS
, &r
->req1
));
5306 NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr
, NDR_SCALARS
, &r
->req2
));
5310 NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr
, NDR_SCALARS
, &r
->req3
));
5314 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5317 if (ndr_flags
& NDR_BUFFERS
) {
5318 int level
= ndr_push_get_switch_value(ndr
, r
);
5321 NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr
, NDR_BUFFERS
, &r
->req1
));
5325 NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr
, NDR_BUFFERS
, &r
->req2
));
5329 NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr
, NDR_BUFFERS
, &r
->req3
));
5333 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5336 return NDR_ERR_SUCCESS
;
5339 static enum ndr_err_code
ndr_pull_samr_ValidatePasswordReq(struct ndr_pull
*ndr
, int ndr_flags
, union samr_ValidatePasswordReq
*r
)
5343 level
= ndr_pull_get_switch_value(ndr
, r
);
5344 if (ndr_flags
& NDR_SCALARS
) {
5345 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
5346 if (_level
!= level
) {
5347 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
5351 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr
, NDR_SCALARS
, &r
->req1
));
5355 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr
, NDR_SCALARS
, &r
->req2
));
5359 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr
, NDR_SCALARS
, &r
->req3
));
5363 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5366 if (ndr_flags
& NDR_BUFFERS
) {
5369 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr
, NDR_BUFFERS
, &r
->req1
));
5373 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr
, NDR_BUFFERS
, &r
->req2
));
5377 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr
, NDR_BUFFERS
, &r
->req3
));
5381 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
5384 return NDR_ERR_SUCCESS
;
5387 _PUBLIC_
void ndr_print_samr_ValidatePasswordReq(struct ndr_print
*ndr
, const char *name
, const union samr_ValidatePasswordReq
*r
)
5390 level
= ndr_print_get_switch_value(ndr
, r
);
5391 ndr_print_union(ndr
, name
, level
, "samr_ValidatePasswordReq");
5394 ndr_print_samr_ValidatePasswordReq1(ndr
, "req1", &r
->req1
);
5398 ndr_print_samr_ValidatePasswordReq2(ndr
, "req2", &r
->req2
);
5402 ndr_print_samr_ValidatePasswordReq3(ndr
, "req3", &r
->req3
);
5406 ndr_print_bad_level(ndr
, name
, level
);
5410 static enum ndr_err_code
ndr_push_samr_Connect(struct ndr_push
*ndr
, int flags
, const struct samr_Connect
*r
)
5412 if (flags
& NDR_IN
) {
5413 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
5414 if (r
->in
.system_name
) {
5415 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
5417 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
5419 if (flags
& NDR_OUT
) {
5420 if (r
->out
.connect_handle
== NULL
) {
5421 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5423 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
5424 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5426 return NDR_ERR_SUCCESS
;
5429 static enum ndr_err_code
ndr_pull_samr_Connect(struct ndr_pull
*ndr
, int flags
, struct samr_Connect
*r
)
5431 uint32_t _ptr_system_name
;
5432 TALLOC_CTX
*_mem_save_system_name_0
;
5433 TALLOC_CTX
*_mem_save_connect_handle_0
;
5434 if (flags
& NDR_IN
) {
5435 ZERO_STRUCT(r
->out
);
5437 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
5438 if (_ptr_system_name
) {
5439 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
5441 r
->in
.system_name
= NULL
;
5443 if (r
->in
.system_name
) {
5444 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5445 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
5446 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
5447 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
5449 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
5450 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
5451 ZERO_STRUCTP(r
->out
.connect_handle
);
5453 if (flags
& NDR_OUT
) {
5454 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5455 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
5457 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5458 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
5459 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
5460 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5461 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5463 return NDR_ERR_SUCCESS
;
5466 _PUBLIC_
void ndr_print_samr_Connect(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect
*r
)
5468 ndr_print_struct(ndr
, name
, "samr_Connect");
5470 if (flags
& NDR_SET_VALUES
) {
5471 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5473 if (flags
& NDR_IN
) {
5474 ndr_print_struct(ndr
, "in", "samr_Connect");
5476 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
5478 if (r
->in
.system_name
) {
5479 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
5482 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
5485 if (flags
& NDR_OUT
) {
5486 ndr_print_struct(ndr
, "out", "samr_Connect");
5488 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
5490 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
5492 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5498 _PUBLIC_
enum ndr_err_code
ndr_push_samr_Close(struct ndr_push
*ndr
, int flags
, const struct samr_Close
*r
)
5500 if (flags
& NDR_IN
) {
5501 if (r
->in
.handle
== NULL
) {
5502 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5504 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5506 if (flags
& NDR_OUT
) {
5507 if (r
->out
.handle
== NULL
) {
5508 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5510 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5511 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5513 return NDR_ERR_SUCCESS
;
5516 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_Close(struct ndr_pull
*ndr
, int flags
, struct samr_Close
*r
)
5518 TALLOC_CTX
*_mem_save_handle_0
;
5519 if (flags
& NDR_IN
) {
5520 ZERO_STRUCT(r
->out
);
5522 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5523 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5525 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5526 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5527 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5528 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5529 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5530 *r
->out
.handle
= *r
->in
.handle
;
5532 if (flags
& NDR_OUT
) {
5533 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5534 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5536 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5537 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5538 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5539 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5540 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5542 return NDR_ERR_SUCCESS
;
5545 _PUBLIC_
void ndr_print_samr_Close(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Close
*r
)
5547 ndr_print_struct(ndr
, name
, "samr_Close");
5549 if (flags
& NDR_SET_VALUES
) {
5550 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5552 if (flags
& NDR_IN
) {
5553 ndr_print_struct(ndr
, "in", "samr_Close");
5555 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5557 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5561 if (flags
& NDR_OUT
) {
5562 ndr_print_struct(ndr
, "out", "samr_Close");
5564 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5566 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5568 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5574 static enum ndr_err_code
ndr_push_samr_SetSecurity(struct ndr_push
*ndr
, int flags
, const struct samr_SetSecurity
*r
)
5576 if (flags
& NDR_IN
) {
5577 if (r
->in
.handle
== NULL
) {
5578 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5580 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5581 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5582 if (r
->in
.sdbuf
== NULL
) {
5583 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5585 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5587 if (flags
& NDR_OUT
) {
5588 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5590 return NDR_ERR_SUCCESS
;
5593 static enum ndr_err_code
ndr_pull_samr_SetSecurity(struct ndr_pull
*ndr
, int flags
, struct samr_SetSecurity
*r
)
5595 TALLOC_CTX
*_mem_save_handle_0
;
5596 TALLOC_CTX
*_mem_save_sdbuf_0
;
5597 if (flags
& NDR_IN
) {
5598 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5599 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5601 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5602 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5603 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5604 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5605 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5606 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5607 NDR_PULL_ALLOC(ndr
, r
->in
.sdbuf
);
5609 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5610 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5611 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5612 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5614 if (flags
& NDR_OUT
) {
5615 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5617 return NDR_ERR_SUCCESS
;
5620 _PUBLIC_
void ndr_print_samr_SetSecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetSecurity
*r
)
5622 ndr_print_struct(ndr
, name
, "samr_SetSecurity");
5624 if (flags
& NDR_SET_VALUES
) {
5625 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5627 if (flags
& NDR_IN
) {
5628 ndr_print_struct(ndr
, "in", "samr_SetSecurity");
5630 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5632 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5634 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5635 ndr_print_ptr(ndr
, "sdbuf", r
->in
.sdbuf
);
5637 ndr_print_sec_desc_buf(ndr
, "sdbuf", r
->in
.sdbuf
);
5641 if (flags
& NDR_OUT
) {
5642 ndr_print_struct(ndr
, "out", "samr_SetSecurity");
5644 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5650 static enum ndr_err_code
ndr_push_samr_QuerySecurity(struct ndr_push
*ndr
, int flags
, const struct samr_QuerySecurity
*r
)
5652 if (flags
& NDR_IN
) {
5653 if (r
->in
.handle
== NULL
) {
5654 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5656 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5657 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5659 if (flags
& NDR_OUT
) {
5660 if (r
->out
.sdbuf
== NULL
) {
5661 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5663 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sdbuf
));
5664 if (*r
->out
.sdbuf
) {
5665 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5667 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5669 return NDR_ERR_SUCCESS
;
5672 static enum ndr_err_code
ndr_pull_samr_QuerySecurity(struct ndr_pull
*ndr
, int flags
, struct samr_QuerySecurity
*r
)
5674 uint32_t _ptr_sdbuf
;
5675 TALLOC_CTX
*_mem_save_handle_0
;
5676 TALLOC_CTX
*_mem_save_sdbuf_0
;
5677 TALLOC_CTX
*_mem_save_sdbuf_1
;
5678 if (flags
& NDR_IN
) {
5679 ZERO_STRUCT(r
->out
);
5681 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5682 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5684 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5685 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5686 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5687 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5688 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5689 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5690 ZERO_STRUCTP(r
->out
.sdbuf
);
5692 if (flags
& NDR_OUT
) {
5693 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5694 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5696 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5697 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5698 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sdbuf
));
5700 NDR_PULL_ALLOC(ndr
, *r
->out
.sdbuf
);
5702 *r
->out
.sdbuf
= NULL
;
5704 if (*r
->out
.sdbuf
) {
5705 _mem_save_sdbuf_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5706 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sdbuf
, 0);
5707 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5708 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_1
, 0);
5710 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5711 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5713 return NDR_ERR_SUCCESS
;
5716 _PUBLIC_
void ndr_print_samr_QuerySecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QuerySecurity
*r
)
5718 ndr_print_struct(ndr
, name
, "samr_QuerySecurity");
5720 if (flags
& NDR_SET_VALUES
) {
5721 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5723 if (flags
& NDR_IN
) {
5724 ndr_print_struct(ndr
, "in", "samr_QuerySecurity");
5726 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5728 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5730 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5733 if (flags
& NDR_OUT
) {
5734 ndr_print_struct(ndr
, "out", "samr_QuerySecurity");
5736 ndr_print_ptr(ndr
, "sdbuf", r
->out
.sdbuf
);
5738 ndr_print_ptr(ndr
, "sdbuf", *r
->out
.sdbuf
);
5740 if (*r
->out
.sdbuf
) {
5741 ndr_print_sec_desc_buf(ndr
, "sdbuf", *r
->out
.sdbuf
);
5745 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5751 static enum ndr_err_code
ndr_push_samr_Shutdown(struct ndr_push
*ndr
, int flags
, const struct samr_Shutdown
*r
)
5753 if (flags
& NDR_IN
) {
5754 if (r
->in
.connect_handle
== NULL
) {
5755 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5757 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
5759 if (flags
& NDR_OUT
) {
5760 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5762 return NDR_ERR_SUCCESS
;
5765 static enum ndr_err_code
ndr_pull_samr_Shutdown(struct ndr_pull
*ndr
, int flags
, struct samr_Shutdown
*r
)
5767 TALLOC_CTX
*_mem_save_connect_handle_0
;
5768 if (flags
& NDR_IN
) {
5769 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5770 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
5772 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5773 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
5774 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
5775 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5777 if (flags
& NDR_OUT
) {
5778 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5780 return NDR_ERR_SUCCESS
;
5783 _PUBLIC_
void ndr_print_samr_Shutdown(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Shutdown
*r
)
5785 ndr_print_struct(ndr
, name
, "samr_Shutdown");
5787 if (flags
& NDR_SET_VALUES
) {
5788 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5790 if (flags
& NDR_IN
) {
5791 ndr_print_struct(ndr
, "in", "samr_Shutdown");
5793 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
5795 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
5799 if (flags
& NDR_OUT
) {
5800 ndr_print_struct(ndr
, "out", "samr_Shutdown");
5802 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5808 static enum ndr_err_code
ndr_push_samr_LookupDomain(struct ndr_push
*ndr
, int flags
, const struct samr_LookupDomain
*r
)
5810 if (flags
& NDR_IN
) {
5811 if (r
->in
.connect_handle
== NULL
) {
5812 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5814 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
5815 if (r
->in
.domain_name
== NULL
) {
5816 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5818 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_name
));
5820 if (flags
& NDR_OUT
) {
5821 if (r
->out
.sid
== NULL
) {
5822 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5824 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sid
));
5826 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sid
));
5828 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5830 return NDR_ERR_SUCCESS
;
5833 static enum ndr_err_code
ndr_pull_samr_LookupDomain(struct ndr_pull
*ndr
, int flags
, struct samr_LookupDomain
*r
)
5836 TALLOC_CTX
*_mem_save_connect_handle_0
;
5837 TALLOC_CTX
*_mem_save_domain_name_0
;
5838 TALLOC_CTX
*_mem_save_sid_0
;
5839 TALLOC_CTX
*_mem_save_sid_1
;
5840 if (flags
& NDR_IN
) {
5841 ZERO_STRUCT(r
->out
);
5843 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5844 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
5846 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5847 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
5848 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
5849 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5850 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5851 NDR_PULL_ALLOC(ndr
, r
->in
.domain_name
);
5853 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5854 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_name
, LIBNDR_FLAG_REF_ALLOC
);
5855 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_name
));
5856 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, LIBNDR_FLAG_REF_ALLOC
);
5857 NDR_PULL_ALLOC(ndr
, r
->out
.sid
);
5858 ZERO_STRUCTP(r
->out
.sid
);
5860 if (flags
& NDR_OUT
) {
5861 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5862 NDR_PULL_ALLOC(ndr
, r
->out
.sid
);
5864 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5865 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sid
, LIBNDR_FLAG_REF_ALLOC
);
5866 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
5868 NDR_PULL_ALLOC(ndr
, *r
->out
.sid
);
5873 _mem_save_sid_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5874 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sid
, 0);
5875 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sid
));
5876 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_1
, 0);
5878 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
5879 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5881 return NDR_ERR_SUCCESS
;
5884 _PUBLIC_
void ndr_print_samr_LookupDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_LookupDomain
*r
)
5886 ndr_print_struct(ndr
, name
, "samr_LookupDomain");
5888 if (flags
& NDR_SET_VALUES
) {
5889 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5891 if (flags
& NDR_IN
) {
5892 ndr_print_struct(ndr
, "in", "samr_LookupDomain");
5894 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
5896 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
5898 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
5900 ndr_print_lsa_String(ndr
, "domain_name", r
->in
.domain_name
);
5904 if (flags
& NDR_OUT
) {
5905 ndr_print_struct(ndr
, "out", "samr_LookupDomain");
5907 ndr_print_ptr(ndr
, "sid", r
->out
.sid
);
5909 ndr_print_ptr(ndr
, "sid", *r
->out
.sid
);
5912 ndr_print_dom_sid2(ndr
, "sid", *r
->out
.sid
);
5916 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5922 static enum ndr_err_code
ndr_push_samr_EnumDomains(struct ndr_push
*ndr
, int flags
, const struct samr_EnumDomains
*r
)
5924 if (flags
& NDR_IN
) {
5925 if (r
->in
.connect_handle
== NULL
) {
5926 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5928 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
5929 if (r
->in
.resume_handle
== NULL
) {
5930 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5932 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
5933 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
5935 if (flags
& NDR_OUT
) {
5936 if (r
->out
.resume_handle
== NULL
) {
5937 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5939 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
5940 if (r
->out
.sam
== NULL
) {
5941 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5943 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sam
));
5945 NDR_CHECK(ndr_push_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
5947 if (r
->out
.num_entries
== NULL
) {
5948 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5950 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_entries
));
5951 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5953 return NDR_ERR_SUCCESS
;
5956 static enum ndr_err_code
ndr_pull_samr_EnumDomains(struct ndr_pull
*ndr
, int flags
, struct samr_EnumDomains
*r
)
5959 TALLOC_CTX
*_mem_save_connect_handle_0
;
5960 TALLOC_CTX
*_mem_save_resume_handle_0
;
5961 TALLOC_CTX
*_mem_save_sam_0
;
5962 TALLOC_CTX
*_mem_save_sam_1
;
5963 TALLOC_CTX
*_mem_save_num_entries_0
;
5964 if (flags
& NDR_IN
) {
5965 ZERO_STRUCT(r
->out
);
5967 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5968 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
5970 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5971 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
5972 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
5973 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5974 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5975 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
5977 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5978 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5979 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
5980 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5981 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
5982 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5983 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
5984 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
5985 ZERO_STRUCTP(r
->out
.sam
);
5986 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
5987 ZERO_STRUCTP(r
->out
.num_entries
);
5989 if (flags
& NDR_OUT
) {
5990 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5991 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5993 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5994 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5995 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
5996 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5997 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5998 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6000 _mem_save_sam_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6001 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sam
, LIBNDR_FLAG_REF_ALLOC
);
6002 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam
));
6004 NDR_PULL_ALLOC(ndr
, *r
->out
.sam
);
6009 _mem_save_sam_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6010 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sam
, 0);
6011 NDR_CHECK(ndr_pull_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6012 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_1
, 0);
6014 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_0
, LIBNDR_FLAG_REF_ALLOC
);
6015 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6016 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6018 _mem_save_num_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6019 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_entries
, LIBNDR_FLAG_REF_ALLOC
);
6020 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_entries
));
6021 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
6022 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6024 return NDR_ERR_SUCCESS
;
6027 _PUBLIC_
void ndr_print_samr_EnumDomains(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_EnumDomains
*r
)
6029 ndr_print_struct(ndr
, name
, "samr_EnumDomains");
6031 if (flags
& NDR_SET_VALUES
) {
6032 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6034 if (flags
& NDR_IN
) {
6035 ndr_print_struct(ndr
, "in", "samr_EnumDomains");
6037 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
6039 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
6041 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6043 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6045 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
6048 if (flags
& NDR_OUT
) {
6049 ndr_print_struct(ndr
, "out", "samr_EnumDomains");
6051 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6053 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6055 ndr_print_ptr(ndr
, "sam", r
->out
.sam
);
6057 ndr_print_ptr(ndr
, "sam", *r
->out
.sam
);
6060 ndr_print_samr_SamArray(ndr
, "sam", *r
->out
.sam
);
6064 ndr_print_ptr(ndr
, "num_entries", r
->out
.num_entries
);
6066 ndr_print_uint32(ndr
, "num_entries", *r
->out
.num_entries
);
6068 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6074 _PUBLIC_
enum ndr_err_code
ndr_push_samr_OpenDomain(struct ndr_push
*ndr
, int flags
, const struct samr_OpenDomain
*r
)
6076 if (flags
& NDR_IN
) {
6077 if (r
->in
.connect_handle
== NULL
) {
6078 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6080 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
6081 NDR_CHECK(ndr_push_samr_DomainAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6082 if (r
->in
.sid
== NULL
) {
6083 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6085 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6087 if (flags
& NDR_OUT
) {
6088 if (r
->out
.domain_handle
== NULL
) {
6089 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6091 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.domain_handle
));
6092 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6094 return NDR_ERR_SUCCESS
;
6097 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_OpenDomain(struct ndr_pull
*ndr
, int flags
, struct samr_OpenDomain
*r
)
6099 TALLOC_CTX
*_mem_save_connect_handle_0
;
6100 TALLOC_CTX
*_mem_save_sid_0
;
6101 TALLOC_CTX
*_mem_save_domain_handle_0
;
6102 if (flags
& NDR_IN
) {
6103 ZERO_STRUCT(r
->out
);
6105 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6106 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
6108 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6109 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
6110 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
6111 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6112 NDR_CHECK(ndr_pull_samr_DomainAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6113 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6114 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
6116 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6117 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
6118 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6119 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
6120 NDR_PULL_ALLOC(ndr
, r
->out
.domain_handle
);
6121 ZERO_STRUCTP(r
->out
.domain_handle
);
6123 if (flags
& NDR_OUT
) {
6124 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6125 NDR_PULL_ALLOC(ndr
, r
->out
.domain_handle
);
6127 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6128 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6129 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.domain_handle
));
6130 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6131 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6133 return NDR_ERR_SUCCESS
;
6136 _PUBLIC_
void ndr_print_samr_OpenDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OpenDomain
*r
)
6138 ndr_print_struct(ndr
, name
, "samr_OpenDomain");
6140 if (flags
& NDR_SET_VALUES
) {
6141 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6143 if (flags
& NDR_IN
) {
6144 ndr_print_struct(ndr
, "in", "samr_OpenDomain");
6146 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
6148 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
6150 ndr_print_samr_DomainAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6151 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
6153 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
6157 if (flags
& NDR_OUT
) {
6158 ndr_print_struct(ndr
, "out", "samr_OpenDomain");
6160 ndr_print_ptr(ndr
, "domain_handle", r
->out
.domain_handle
);
6162 ndr_print_policy_handle(ndr
, "domain_handle", r
->out
.domain_handle
);
6164 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6170 static enum ndr_err_code
ndr_push_samr_QueryDomainInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDomainInfo
*r
)
6172 if (flags
& NDR_IN
) {
6173 if (r
->in
.domain_handle
== NULL
) {
6174 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6176 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6177 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr
, NDR_SCALARS
, r
->in
.level
));
6179 if (flags
& NDR_OUT
) {
6180 if (r
->out
.info
== NULL
) {
6181 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6183 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
6185 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
6186 NDR_CHECK(ndr_push_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
6188 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6190 return NDR_ERR_SUCCESS
;
6193 static enum ndr_err_code
ndr_pull_samr_QueryDomainInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDomainInfo
*r
)
6196 TALLOC_CTX
*_mem_save_domain_handle_0
;
6197 TALLOC_CTX
*_mem_save_info_0
;
6198 TALLOC_CTX
*_mem_save_info_1
;
6199 if (flags
& NDR_IN
) {
6200 ZERO_STRUCT(r
->out
);
6202 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6203 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6205 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6206 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6207 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6208 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6209 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr
, NDR_SCALARS
, &r
->in
.level
));
6210 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
6211 ZERO_STRUCTP(r
->out
.info
);
6213 if (flags
& NDR_OUT
) {
6214 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6215 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
6217 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6218 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
6219 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
6221 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
6223 *r
->out
.info
= NULL
;
6226 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6227 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
6228 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
6229 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
6230 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
6232 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6233 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6235 return NDR_ERR_SUCCESS
;
6238 _PUBLIC_
void ndr_print_samr_QueryDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDomainInfo
*r
)
6240 ndr_print_struct(ndr
, name
, "samr_QueryDomainInfo");
6242 if (flags
& NDR_SET_VALUES
) {
6243 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6245 if (flags
& NDR_IN
) {
6246 ndr_print_struct(ndr
, "in", "samr_QueryDomainInfo");
6248 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6250 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6252 ndr_print_samr_DomainInfoClass(ndr
, "level", r
->in
.level
);
6255 if (flags
& NDR_OUT
) {
6256 ndr_print_struct(ndr
, "out", "samr_QueryDomainInfo");
6258 ndr_print_ptr(ndr
, "info", r
->out
.info
);
6260 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
6263 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
6264 ndr_print_samr_DomainInfo(ndr
, "info", *r
->out
.info
);
6268 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6274 static enum ndr_err_code
ndr_push_samr_SetDomainInfo(struct ndr_push
*ndr
, int flags
, const struct samr_SetDomainInfo
*r
)
6276 if (flags
& NDR_IN
) {
6277 if (r
->in
.domain_handle
== NULL
) {
6278 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6280 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6281 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr
, NDR_SCALARS
, r
->in
.level
));
6282 if (r
->in
.info
== NULL
) {
6283 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6285 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
6286 NDR_CHECK(ndr_push_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6288 if (flags
& NDR_OUT
) {
6289 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6291 return NDR_ERR_SUCCESS
;
6294 static enum ndr_err_code
ndr_pull_samr_SetDomainInfo(struct ndr_pull
*ndr
, int flags
, struct samr_SetDomainInfo
*r
)
6296 TALLOC_CTX
*_mem_save_domain_handle_0
;
6297 TALLOC_CTX
*_mem_save_info_0
;
6298 if (flags
& NDR_IN
) {
6299 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6300 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6302 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6303 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6304 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6305 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6306 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr
, NDR_SCALARS
, &r
->in
.level
));
6307 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6308 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6310 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6311 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
6312 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
6313 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6314 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6316 if (flags
& NDR_OUT
) {
6317 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6319 return NDR_ERR_SUCCESS
;
6322 _PUBLIC_
void ndr_print_samr_SetDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetDomainInfo
*r
)
6324 ndr_print_struct(ndr
, name
, "samr_SetDomainInfo");
6326 if (flags
& NDR_SET_VALUES
) {
6327 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6329 if (flags
& NDR_IN
) {
6330 ndr_print_struct(ndr
, "in", "samr_SetDomainInfo");
6332 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6334 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6336 ndr_print_samr_DomainInfoClass(ndr
, "level", r
->in
.level
);
6337 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6339 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
6340 ndr_print_samr_DomainInfo(ndr
, "info", r
->in
.info
);
6344 if (flags
& NDR_OUT
) {
6345 ndr_print_struct(ndr
, "out", "samr_SetDomainInfo");
6347 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6353 static enum ndr_err_code
ndr_push_samr_CreateDomainGroup(struct ndr_push
*ndr
, int flags
, const struct samr_CreateDomainGroup
*r
)
6355 if (flags
& NDR_IN
) {
6356 if (r
->in
.domain_handle
== NULL
) {
6357 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6359 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6360 if (r
->in
.name
== NULL
) {
6361 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6363 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
6364 NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6366 if (flags
& NDR_OUT
) {
6367 if (r
->out
.group_handle
== NULL
) {
6368 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6370 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
6371 if (r
->out
.rid
== NULL
) {
6372 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6374 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
6375 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6377 return NDR_ERR_SUCCESS
;
6380 static enum ndr_err_code
ndr_pull_samr_CreateDomainGroup(struct ndr_pull
*ndr
, int flags
, struct samr_CreateDomainGroup
*r
)
6382 TALLOC_CTX
*_mem_save_domain_handle_0
;
6383 TALLOC_CTX
*_mem_save_name_0
;
6384 TALLOC_CTX
*_mem_save_group_handle_0
;
6385 TALLOC_CTX
*_mem_save_rid_0
;
6386 if (flags
& NDR_IN
) {
6387 ZERO_STRUCT(r
->out
);
6389 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6390 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6392 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6393 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6394 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6395 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6396 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6397 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
6399 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6400 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
6401 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
6402 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
6403 NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6404 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
6405 ZERO_STRUCTP(r
->out
.group_handle
);
6406 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6407 ZERO_STRUCTP(r
->out
.rid
);
6409 if (flags
& NDR_OUT
) {
6410 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6411 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
6413 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6414 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
6415 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
6416 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6417 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6418 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6420 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6421 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
6422 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
6423 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
6424 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6426 return NDR_ERR_SUCCESS
;
6429 _PUBLIC_
void ndr_print_samr_CreateDomainGroup(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_CreateDomainGroup
*r
)
6431 ndr_print_struct(ndr
, name
, "samr_CreateDomainGroup");
6433 if (flags
& NDR_SET_VALUES
) {
6434 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6436 if (flags
& NDR_IN
) {
6437 ndr_print_struct(ndr
, "in", "samr_CreateDomainGroup");
6439 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6441 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6443 ndr_print_ptr(ndr
, "name", r
->in
.name
);
6445 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
6447 ndr_print_samr_GroupAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6450 if (flags
& NDR_OUT
) {
6451 ndr_print_struct(ndr
, "out", "samr_CreateDomainGroup");
6453 ndr_print_ptr(ndr
, "group_handle", r
->out
.group_handle
);
6455 ndr_print_policy_handle(ndr
, "group_handle", r
->out
.group_handle
);
6457 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
6459 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
6461 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6467 static enum ndr_err_code
ndr_push_samr_EnumDomainGroups(struct ndr_push
*ndr
, int flags
, const struct samr_EnumDomainGroups
*r
)
6469 if (flags
& NDR_IN
) {
6470 if (r
->in
.domain_handle
== NULL
) {
6471 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6473 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6474 if (r
->in
.resume_handle
== NULL
) {
6475 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6477 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6478 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
6480 if (flags
& NDR_OUT
) {
6481 if (r
->out
.resume_handle
== NULL
) {
6482 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6485 if (r
->out
.sam
== NULL
) {
6486 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6488 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sam
));
6490 NDR_CHECK(ndr_push_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6492 if (r
->out
.num_entries
== NULL
) {
6493 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6495 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_entries
));
6496 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6498 return NDR_ERR_SUCCESS
;
6501 static enum ndr_err_code
ndr_pull_samr_EnumDomainGroups(struct ndr_pull
*ndr
, int flags
, struct samr_EnumDomainGroups
*r
)
6504 TALLOC_CTX
*_mem_save_domain_handle_0
;
6505 TALLOC_CTX
*_mem_save_resume_handle_0
;
6506 TALLOC_CTX
*_mem_save_sam_0
;
6507 TALLOC_CTX
*_mem_save_sam_1
;
6508 TALLOC_CTX
*_mem_save_num_entries_0
;
6509 if (flags
& NDR_IN
) {
6510 ZERO_STRUCT(r
->out
);
6512 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6513 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6515 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6516 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6517 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6518 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6519 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6520 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6522 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6523 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6524 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6525 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6526 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
6527 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6528 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6529 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6530 ZERO_STRUCTP(r
->out
.sam
);
6531 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6532 ZERO_STRUCTP(r
->out
.num_entries
);
6534 if (flags
& NDR_OUT
) {
6535 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6536 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6538 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6539 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6540 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6541 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6542 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6543 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6545 _mem_save_sam_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6546 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sam
, LIBNDR_FLAG_REF_ALLOC
);
6547 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam
));
6549 NDR_PULL_ALLOC(ndr
, *r
->out
.sam
);
6554 _mem_save_sam_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6555 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sam
, 0);
6556 NDR_CHECK(ndr_pull_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6557 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_1
, 0);
6559 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_0
, LIBNDR_FLAG_REF_ALLOC
);
6560 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6561 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6563 _mem_save_num_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6564 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_entries
, LIBNDR_FLAG_REF_ALLOC
);
6565 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_entries
));
6566 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
6567 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6569 return NDR_ERR_SUCCESS
;
6572 _PUBLIC_
void ndr_print_samr_EnumDomainGroups(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_EnumDomainGroups
*r
)
6574 ndr_print_struct(ndr
, name
, "samr_EnumDomainGroups");
6576 if (flags
& NDR_SET_VALUES
) {
6577 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6579 if (flags
& NDR_IN
) {
6580 ndr_print_struct(ndr
, "in", "samr_EnumDomainGroups");
6582 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6584 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6586 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6588 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6590 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
6593 if (flags
& NDR_OUT
) {
6594 ndr_print_struct(ndr
, "out", "samr_EnumDomainGroups");
6596 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6598 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6600 ndr_print_ptr(ndr
, "sam", r
->out
.sam
);
6602 ndr_print_ptr(ndr
, "sam", *r
->out
.sam
);
6605 ndr_print_samr_SamArray(ndr
, "sam", *r
->out
.sam
);
6609 ndr_print_ptr(ndr
, "num_entries", r
->out
.num_entries
);
6611 ndr_print_uint32(ndr
, "num_entries", *r
->out
.num_entries
);
6613 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6619 static enum ndr_err_code
ndr_push_samr_CreateUser(struct ndr_push
*ndr
, int flags
, const struct samr_CreateUser
*r
)
6621 if (flags
& NDR_IN
) {
6622 if (r
->in
.domain_handle
== NULL
) {
6623 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6625 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6626 if (r
->in
.account_name
== NULL
) {
6627 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6629 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account_name
));
6630 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6632 if (flags
& NDR_OUT
) {
6633 if (r
->out
.user_handle
== NULL
) {
6634 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6636 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
6637 if (r
->out
.rid
== NULL
) {
6638 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6640 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
6641 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6643 return NDR_ERR_SUCCESS
;
6646 static enum ndr_err_code
ndr_pull_samr_CreateUser(struct ndr_pull
*ndr
, int flags
, struct samr_CreateUser
*r
)
6648 TALLOC_CTX
*_mem_save_domain_handle_0
;
6649 TALLOC_CTX
*_mem_save_account_name_0
;
6650 TALLOC_CTX
*_mem_save_user_handle_0
;
6651 TALLOC_CTX
*_mem_save_rid_0
;
6652 if (flags
& NDR_IN
) {
6653 ZERO_STRUCT(r
->out
);
6655 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6656 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6658 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6659 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6660 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6661 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6662 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6663 NDR_PULL_ALLOC(ndr
, r
->in
.account_name
);
6665 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6666 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
6667 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account_name
));
6668 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
6669 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6670 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
6671 ZERO_STRUCTP(r
->out
.user_handle
);
6672 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6673 ZERO_STRUCTP(r
->out
.rid
);
6675 if (flags
& NDR_OUT
) {
6676 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6677 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
6679 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6680 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
6681 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
6682 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6683 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6684 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6686 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6687 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
6688 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
6689 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
6690 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6692 return NDR_ERR_SUCCESS
;
6695 _PUBLIC_
void ndr_print_samr_CreateUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_CreateUser
*r
)
6697 ndr_print_struct(ndr
, name
, "samr_CreateUser");
6699 if (flags
& NDR_SET_VALUES
) {
6700 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6702 if (flags
& NDR_IN
) {
6703 ndr_print_struct(ndr
, "in", "samr_CreateUser");
6705 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6707 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6709 ndr_print_ptr(ndr
, "account_name", r
->in
.account_name
);
6711 ndr_print_lsa_String(ndr
, "account_name", r
->in
.account_name
);
6713 ndr_print_samr_UserAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6716 if (flags
& NDR_OUT
) {
6717 ndr_print_struct(ndr
, "out", "samr_CreateUser");
6719 ndr_print_ptr(ndr
, "user_handle", r
->out
.user_handle
);
6721 ndr_print_policy_handle(ndr
, "user_handle", r
->out
.user_handle
);
6723 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
6725 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
6727 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6733 static enum ndr_err_code
ndr_push_samr_EnumDomainUsers(struct ndr_push
*ndr
, int flags
, const struct samr_EnumDomainUsers
*r
)
6735 if (flags
& NDR_IN
) {
6736 if (r
->in
.domain_handle
== NULL
) {
6737 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6739 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6740 if (r
->in
.resume_handle
== NULL
) {
6741 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6743 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6744 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->in
.acct_flags
));
6745 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
6747 if (flags
& NDR_OUT
) {
6748 if (r
->out
.resume_handle
== NULL
) {
6749 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6751 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6752 if (r
->out
.sam
== NULL
) {
6753 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6755 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sam
));
6757 NDR_CHECK(ndr_push_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6759 if (r
->out
.num_entries
== NULL
) {
6760 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6762 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_entries
));
6763 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6765 return NDR_ERR_SUCCESS
;
6768 static enum ndr_err_code
ndr_pull_samr_EnumDomainUsers(struct ndr_pull
*ndr
, int flags
, struct samr_EnumDomainUsers
*r
)
6771 TALLOC_CTX
*_mem_save_domain_handle_0
;
6772 TALLOC_CTX
*_mem_save_resume_handle_0
;
6773 TALLOC_CTX
*_mem_save_sam_0
;
6774 TALLOC_CTX
*_mem_save_sam_1
;
6775 TALLOC_CTX
*_mem_save_num_entries_0
;
6776 if (flags
& NDR_IN
) {
6777 ZERO_STRUCT(r
->out
);
6779 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6780 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6782 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6783 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6784 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6785 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6786 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6787 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6789 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6790 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6791 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6792 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6793 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->in
.acct_flags
));
6794 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
6795 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6796 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6797 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6798 ZERO_STRUCTP(r
->out
.sam
);
6799 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6800 ZERO_STRUCTP(r
->out
.num_entries
);
6802 if (flags
& NDR_OUT
) {
6803 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6804 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6806 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6807 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6808 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6809 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6810 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6811 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
6813 _mem_save_sam_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6814 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sam
, LIBNDR_FLAG_REF_ALLOC
);
6815 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam
));
6817 NDR_PULL_ALLOC(ndr
, *r
->out
.sam
);
6822 _mem_save_sam_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6823 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sam
, 0);
6824 NDR_CHECK(ndr_pull_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
6825 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_1
, 0);
6827 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_0
, LIBNDR_FLAG_REF_ALLOC
);
6828 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6829 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
6831 _mem_save_num_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6832 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_entries
, LIBNDR_FLAG_REF_ALLOC
);
6833 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_entries
));
6834 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
6835 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6837 return NDR_ERR_SUCCESS
;
6840 _PUBLIC_
void ndr_print_samr_EnumDomainUsers(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_EnumDomainUsers
*r
)
6842 ndr_print_struct(ndr
, name
, "samr_EnumDomainUsers");
6844 if (flags
& NDR_SET_VALUES
) {
6845 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6847 if (flags
& NDR_IN
) {
6848 ndr_print_struct(ndr
, "in", "samr_EnumDomainUsers");
6850 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6852 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6854 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6856 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6858 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->in
.acct_flags
);
6859 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
6862 if (flags
& NDR_OUT
) {
6863 ndr_print_struct(ndr
, "out", "samr_EnumDomainUsers");
6865 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6867 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6869 ndr_print_ptr(ndr
, "sam", r
->out
.sam
);
6871 ndr_print_ptr(ndr
, "sam", *r
->out
.sam
);
6874 ndr_print_samr_SamArray(ndr
, "sam", *r
->out
.sam
);
6878 ndr_print_ptr(ndr
, "num_entries", r
->out
.num_entries
);
6880 ndr_print_uint32(ndr
, "num_entries", *r
->out
.num_entries
);
6882 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6888 static enum ndr_err_code
ndr_push_samr_CreateDomAlias(struct ndr_push
*ndr
, int flags
, const struct samr_CreateDomAlias
*r
)
6890 if (flags
& NDR_IN
) {
6891 if (r
->in
.domain_handle
== NULL
) {
6892 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6894 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6895 if (r
->in
.alias_name
== NULL
) {
6896 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6898 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.alias_name
));
6899 NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6901 if (flags
& NDR_OUT
) {
6902 if (r
->out
.alias_handle
== NULL
) {
6903 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6905 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
6906 if (r
->out
.rid
== NULL
) {
6907 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6909 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
6910 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6912 return NDR_ERR_SUCCESS
;
6915 static enum ndr_err_code
ndr_pull_samr_CreateDomAlias(struct ndr_pull
*ndr
, int flags
, struct samr_CreateDomAlias
*r
)
6917 TALLOC_CTX
*_mem_save_domain_handle_0
;
6918 TALLOC_CTX
*_mem_save_alias_name_0
;
6919 TALLOC_CTX
*_mem_save_alias_handle_0
;
6920 TALLOC_CTX
*_mem_save_rid_0
;
6921 if (flags
& NDR_IN
) {
6922 ZERO_STRUCT(r
->out
);
6924 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6925 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
6927 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6928 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
6929 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
6930 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6931 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6932 NDR_PULL_ALLOC(ndr
, r
->in
.alias_name
);
6934 _mem_save_alias_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6935 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_name
, LIBNDR_FLAG_REF_ALLOC
);
6936 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.alias_name
));
6937 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_name_0
, LIBNDR_FLAG_REF_ALLOC
);
6938 NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6939 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
6940 ZERO_STRUCTP(r
->out
.alias_handle
);
6941 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6942 ZERO_STRUCTP(r
->out
.rid
);
6944 if (flags
& NDR_OUT
) {
6945 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6946 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
6948 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6949 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
6950 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
6951 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6952 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6953 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
6955 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6956 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
6957 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
6958 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
6959 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6961 return NDR_ERR_SUCCESS
;
6964 _PUBLIC_
void ndr_print_samr_CreateDomAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_CreateDomAlias
*r
)
6966 ndr_print_struct(ndr
, name
, "samr_CreateDomAlias");
6968 if (flags
& NDR_SET_VALUES
) {
6969 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6971 if (flags
& NDR_IN
) {
6972 ndr_print_struct(ndr
, "in", "samr_CreateDomAlias");
6974 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
6976 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
6978 ndr_print_ptr(ndr
, "alias_name", r
->in
.alias_name
);
6980 ndr_print_lsa_String(ndr
, "alias_name", r
->in
.alias_name
);
6982 ndr_print_samr_AliasAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6985 if (flags
& NDR_OUT
) {
6986 ndr_print_struct(ndr
, "out", "samr_CreateDomAlias");
6988 ndr_print_ptr(ndr
, "alias_handle", r
->out
.alias_handle
);
6990 ndr_print_policy_handle(ndr
, "alias_handle", r
->out
.alias_handle
);
6992 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
6994 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
6996 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7002 static enum ndr_err_code
ndr_push_samr_EnumDomainAliases(struct ndr_push
*ndr
, int flags
, const struct samr_EnumDomainAliases
*r
)
7004 if (flags
& NDR_IN
) {
7005 if (r
->in
.domain_handle
== NULL
) {
7006 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7008 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7009 if (r
->in
.resume_handle
== NULL
) {
7010 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7012 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
7013 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
7015 if (flags
& NDR_OUT
) {
7016 if (r
->out
.resume_handle
== NULL
) {
7017 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7019 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
7020 if (r
->out
.sam
== NULL
) {
7021 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7023 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sam
));
7025 NDR_CHECK(ndr_push_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
7027 if (r
->out
.num_entries
== NULL
) {
7028 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7030 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_entries
));
7031 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7033 return NDR_ERR_SUCCESS
;
7036 static enum ndr_err_code
ndr_pull_samr_EnumDomainAliases(struct ndr_pull
*ndr
, int flags
, struct samr_EnumDomainAliases
*r
)
7039 TALLOC_CTX
*_mem_save_domain_handle_0
;
7040 TALLOC_CTX
*_mem_save_resume_handle_0
;
7041 TALLOC_CTX
*_mem_save_sam_0
;
7042 TALLOC_CTX
*_mem_save_sam_1
;
7043 TALLOC_CTX
*_mem_save_num_entries_0
;
7044 if (flags
& NDR_IN
) {
7045 ZERO_STRUCT(r
->out
);
7047 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7048 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7050 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7051 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7052 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7053 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7054 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7055 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
7057 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7058 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
7059 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
7060 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7061 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
7062 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
7063 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
7064 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
7065 ZERO_STRUCTP(r
->out
.sam
);
7066 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
7067 ZERO_STRUCTP(r
->out
.num_entries
);
7069 if (flags
& NDR_OUT
) {
7070 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7071 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
7073 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7074 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
7075 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
7076 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7077 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7078 NDR_PULL_ALLOC(ndr
, r
->out
.sam
);
7080 _mem_save_sam_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7081 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sam
, LIBNDR_FLAG_REF_ALLOC
);
7082 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam
));
7084 NDR_PULL_ALLOC(ndr
, *r
->out
.sam
);
7089 _mem_save_sam_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7090 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sam
, 0);
7091 NDR_CHECK(ndr_pull_samr_SamArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sam
));
7092 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_1
, 0);
7094 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam_0
, LIBNDR_FLAG_REF_ALLOC
);
7095 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7096 NDR_PULL_ALLOC(ndr
, r
->out
.num_entries
);
7098 _mem_save_num_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7099 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_entries
, LIBNDR_FLAG_REF_ALLOC
);
7100 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_entries
));
7101 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
7102 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7104 return NDR_ERR_SUCCESS
;
7107 _PUBLIC_
void ndr_print_samr_EnumDomainAliases(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_EnumDomainAliases
*r
)
7109 ndr_print_struct(ndr
, name
, "samr_EnumDomainAliases");
7111 if (flags
& NDR_SET_VALUES
) {
7112 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7114 if (flags
& NDR_IN
) {
7115 ndr_print_struct(ndr
, "in", "samr_EnumDomainAliases");
7117 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7119 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7121 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
7123 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
7125 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
7128 if (flags
& NDR_OUT
) {
7129 ndr_print_struct(ndr
, "out", "samr_EnumDomainAliases");
7131 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
7133 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
7135 ndr_print_ptr(ndr
, "sam", r
->out
.sam
);
7137 ndr_print_ptr(ndr
, "sam", *r
->out
.sam
);
7140 ndr_print_samr_SamArray(ndr
, "sam", *r
->out
.sam
);
7144 ndr_print_ptr(ndr
, "num_entries", r
->out
.num_entries
);
7146 ndr_print_uint32(ndr
, "num_entries", *r
->out
.num_entries
);
7148 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7154 static enum ndr_err_code
ndr_push_samr_GetAliasMembership(struct ndr_push
*ndr
, int flags
, const struct samr_GetAliasMembership
*r
)
7156 if (flags
& NDR_IN
) {
7157 if (r
->in
.domain_handle
== NULL
) {
7158 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7160 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7161 if (r
->in
.sids
== NULL
) {
7162 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7164 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
7166 if (flags
& NDR_OUT
) {
7167 if (r
->out
.rids
== NULL
) {
7168 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7170 NDR_CHECK(ndr_push_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rids
));
7171 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7173 return NDR_ERR_SUCCESS
;
7176 static enum ndr_err_code
ndr_pull_samr_GetAliasMembership(struct ndr_pull
*ndr
, int flags
, struct samr_GetAliasMembership
*r
)
7178 TALLOC_CTX
*_mem_save_domain_handle_0
;
7179 TALLOC_CTX
*_mem_save_sids_0
;
7180 TALLOC_CTX
*_mem_save_rids_0
;
7181 if (flags
& NDR_IN
) {
7182 ZERO_STRUCT(r
->out
);
7184 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7185 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7187 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7188 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7189 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7190 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7191 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7192 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
7194 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7195 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
7196 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
7197 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
7198 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
7199 ZERO_STRUCTP(r
->out
.rids
);
7201 if (flags
& NDR_OUT
) {
7202 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7203 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
7205 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7206 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rids
, LIBNDR_FLAG_REF_ALLOC
);
7207 NDR_CHECK(ndr_pull_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rids
));
7208 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, LIBNDR_FLAG_REF_ALLOC
);
7209 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7211 return NDR_ERR_SUCCESS
;
7214 _PUBLIC_
void ndr_print_samr_GetAliasMembership(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetAliasMembership
*r
)
7216 ndr_print_struct(ndr
, name
, "samr_GetAliasMembership");
7218 if (flags
& NDR_SET_VALUES
) {
7219 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7221 if (flags
& NDR_IN
) {
7222 ndr_print_struct(ndr
, "in", "samr_GetAliasMembership");
7224 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7226 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7228 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
7230 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
7234 if (flags
& NDR_OUT
) {
7235 ndr_print_struct(ndr
, "out", "samr_GetAliasMembership");
7237 ndr_print_ptr(ndr
, "rids", r
->out
.rids
);
7239 ndr_print_samr_Ids(ndr
, "rids", r
->out
.rids
);
7241 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7247 _PUBLIC_
enum ndr_err_code
ndr_push_samr_LookupNames(struct ndr_push
*ndr
, int flags
, const struct samr_LookupNames
*r
)
7249 uint32_t cntr_names_0
;
7250 if (flags
& NDR_IN
) {
7251 if (r
->in
.domain_handle
== NULL
) {
7252 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7254 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7255 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
7256 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1000));
7257 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
7259 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
7260 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
7262 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
7263 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
7266 if (flags
& NDR_OUT
) {
7267 if (r
->out
.rids
== NULL
) {
7268 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7270 NDR_CHECK(ndr_push_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rids
));
7271 if (r
->out
.types
== NULL
) {
7272 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7274 NDR_CHECK(ndr_push_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.types
));
7275 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7277 return NDR_ERR_SUCCESS
;
7280 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_LookupNames(struct ndr_pull
*ndr
, int flags
, struct samr_LookupNames
*r
)
7282 uint32_t cntr_names_0
;
7283 TALLOC_CTX
*_mem_save_domain_handle_0
;
7284 TALLOC_CTX
*_mem_save_names_0
;
7285 TALLOC_CTX
*_mem_save_rids_0
;
7286 TALLOC_CTX
*_mem_save_types_0
;
7287 if (flags
& NDR_IN
) {
7288 ZERO_STRUCT(r
->out
);
7290 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7291 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7293 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7294 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7295 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7296 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7297 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
7298 if (r
->in
.num_names
> 1000) {
7299 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7301 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
7302 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.names
));
7303 if (ndr_get_array_length(ndr
, &r
->in
.names
) > ndr_get_array_size(ndr
, &r
->in
.names
)) {
7304 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
));
7306 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
7307 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7308 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
7309 for (cntr_names_0
= 0; cntr_names_0
< ndr_get_array_length(ndr
, &r
->in
.names
); cntr_names_0
++) {
7310 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
7312 for (cntr_names_0
= 0; cntr_names_0
< ndr_get_array_length(ndr
, &r
->in
.names
); cntr_names_0
++) {
7313 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
7315 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
7316 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
7317 ZERO_STRUCTP(r
->out
.rids
);
7318 NDR_PULL_ALLOC(ndr
, r
->out
.types
);
7319 ZERO_STRUCTP(r
->out
.types
);
7321 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, 1000));
7324 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
7327 if (flags
& NDR_OUT
) {
7328 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7329 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
7331 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7332 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rids
, LIBNDR_FLAG_REF_ALLOC
);
7333 NDR_CHECK(ndr_pull_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rids
));
7334 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, LIBNDR_FLAG_REF_ALLOC
);
7335 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7336 NDR_PULL_ALLOC(ndr
, r
->out
.types
);
7338 _mem_save_types_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7339 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.types
, LIBNDR_FLAG_REF_ALLOC
);
7340 NDR_CHECK(ndr_pull_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.types
));
7341 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_0
, LIBNDR_FLAG_REF_ALLOC
);
7342 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7344 return NDR_ERR_SUCCESS
;
7347 _PUBLIC_
void ndr_print_samr_LookupNames(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_LookupNames
*r
)
7349 uint32_t cntr_names_0
;
7350 ndr_print_struct(ndr
, name
, "samr_LookupNames");
7352 if (flags
& NDR_SET_VALUES
) {
7353 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7355 if (flags
& NDR_IN
) {
7356 ndr_print_struct(ndr
, "in", "samr_LookupNames");
7358 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7360 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7362 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
7363 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
7365 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
7367 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
7368 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
7375 if (flags
& NDR_OUT
) {
7376 ndr_print_struct(ndr
, "out", "samr_LookupNames");
7378 ndr_print_ptr(ndr
, "rids", r
->out
.rids
);
7380 ndr_print_samr_Ids(ndr
, "rids", r
->out
.rids
);
7382 ndr_print_ptr(ndr
, "types", r
->out
.types
);
7384 ndr_print_samr_Ids(ndr
, "types", r
->out
.types
);
7386 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7392 static enum ndr_err_code
ndr_push_samr_LookupRids(struct ndr_push
*ndr
, int flags
, const struct samr_LookupRids
*r
)
7394 uint32_t cntr_rids_0
;
7395 if (flags
& NDR_IN
) {
7396 if (r
->in
.domain_handle
== NULL
) {
7397 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7399 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7400 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_rids
));
7401 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1000));
7402 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_rids
));
7404 for (cntr_rids_0
= 0; cntr_rids_0
< r
->in
.num_rids
; cntr_rids_0
++) {
7405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rids
[cntr_rids_0
]));
7408 if (flags
& NDR_OUT
) {
7409 if (r
->out
.names
== NULL
) {
7410 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7412 NDR_CHECK(ndr_push_lsa_Strings(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
7413 if (r
->out
.types
== NULL
) {
7414 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7416 NDR_CHECK(ndr_push_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.types
));
7417 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7419 return NDR_ERR_SUCCESS
;
7422 static enum ndr_err_code
ndr_pull_samr_LookupRids(struct ndr_pull
*ndr
, int flags
, struct samr_LookupRids
*r
)
7424 uint32_t cntr_rids_0
;
7425 TALLOC_CTX
*_mem_save_domain_handle_0
;
7426 TALLOC_CTX
*_mem_save_rids_0
;
7427 TALLOC_CTX
*_mem_save_names_0
;
7428 TALLOC_CTX
*_mem_save_types_0
;
7429 if (flags
& NDR_IN
) {
7430 ZERO_STRUCT(r
->out
);
7432 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7433 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7435 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7436 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7437 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7438 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7439 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_rids
));
7440 if (r
->in
.num_rids
> 1000) {
7441 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7443 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rids
));
7444 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rids
));
7445 if (ndr_get_array_length(ndr
, &r
->in
.rids
) > ndr_get_array_size(ndr
, &r
->in
.rids
)) {
7446 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
));
7448 NDR_PULL_ALLOC_N(ndr
, r
->in
.rids
, ndr_get_array_size(ndr
, &r
->in
.rids
));
7449 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7450 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rids
, 0);
7451 for (cntr_rids_0
= 0; cntr_rids_0
< ndr_get_array_length(ndr
, &r
->in
.rids
); cntr_rids_0
++) {
7452 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rids
[cntr_rids_0
]));
7454 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, 0);
7455 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
7456 ZERO_STRUCTP(r
->out
.names
);
7457 NDR_PULL_ALLOC(ndr
, r
->out
.types
);
7458 ZERO_STRUCTP(r
->out
.types
);
7460 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.rids
, 1000));
7463 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->in
.rids
, r
->in
.num_rids
));
7466 if (flags
& NDR_OUT
) {
7467 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7468 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
7470 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7471 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
7472 NDR_CHECK(ndr_pull_lsa_Strings(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
7473 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
7474 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7475 NDR_PULL_ALLOC(ndr
, r
->out
.types
);
7477 _mem_save_types_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7478 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.types
, LIBNDR_FLAG_REF_ALLOC
);
7479 NDR_CHECK(ndr_pull_samr_Ids(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.types
));
7480 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_0
, LIBNDR_FLAG_REF_ALLOC
);
7481 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7483 return NDR_ERR_SUCCESS
;
7486 _PUBLIC_
void ndr_print_samr_LookupRids(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_LookupRids
*r
)
7488 uint32_t cntr_rids_0
;
7489 ndr_print_struct(ndr
, name
, "samr_LookupRids");
7491 if (flags
& NDR_SET_VALUES
) {
7492 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7494 if (flags
& NDR_IN
) {
7495 ndr_print_struct(ndr
, "in", "samr_LookupRids");
7497 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7499 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7501 ndr_print_uint32(ndr
, "num_rids", r
->in
.num_rids
);
7502 ndr
->print(ndr
, "%s: ARRAY(%d)", "rids", (int)r
->in
.num_rids
);
7504 for (cntr_rids_0
=0;cntr_rids_0
<r
->in
.num_rids
;cntr_rids_0
++) {
7506 if (asprintf(&idx_0
, "[%d]", cntr_rids_0
) != -1) {
7507 ndr_print_uint32(ndr
, "rids", r
->in
.rids
[cntr_rids_0
]);
7514 if (flags
& NDR_OUT
) {
7515 ndr_print_struct(ndr
, "out", "samr_LookupRids");
7517 ndr_print_ptr(ndr
, "names", r
->out
.names
);
7519 ndr_print_lsa_Strings(ndr
, "names", r
->out
.names
);
7521 ndr_print_ptr(ndr
, "types", r
->out
.types
);
7523 ndr_print_samr_Ids(ndr
, "types", r
->out
.types
);
7525 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7531 static enum ndr_err_code
ndr_push_samr_OpenGroup(struct ndr_push
*ndr
, int flags
, const struct samr_OpenGroup
*r
)
7533 if (flags
& NDR_IN
) {
7534 if (r
->in
.domain_handle
== NULL
) {
7535 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7537 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7538 NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7539 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
7541 if (flags
& NDR_OUT
) {
7542 if (r
->out
.group_handle
== NULL
) {
7543 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7545 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
7546 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7548 return NDR_ERR_SUCCESS
;
7551 static enum ndr_err_code
ndr_pull_samr_OpenGroup(struct ndr_pull
*ndr
, int flags
, struct samr_OpenGroup
*r
)
7553 TALLOC_CTX
*_mem_save_domain_handle_0
;
7554 TALLOC_CTX
*_mem_save_group_handle_0
;
7555 if (flags
& NDR_IN
) {
7556 ZERO_STRUCT(r
->out
);
7558 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7559 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
7561 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7562 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
7563 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
7564 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7565 NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7566 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
7567 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
7568 ZERO_STRUCTP(r
->out
.group_handle
);
7570 if (flags
& NDR_OUT
) {
7571 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7572 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
7574 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7575 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7576 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
7577 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7578 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7580 return NDR_ERR_SUCCESS
;
7583 _PUBLIC_
void ndr_print_samr_OpenGroup(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OpenGroup
*r
)
7585 ndr_print_struct(ndr
, name
, "samr_OpenGroup");
7587 if (flags
& NDR_SET_VALUES
) {
7588 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7590 if (flags
& NDR_IN
) {
7591 ndr_print_struct(ndr
, "in", "samr_OpenGroup");
7593 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
7595 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
7597 ndr_print_samr_GroupAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7598 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
7601 if (flags
& NDR_OUT
) {
7602 ndr_print_struct(ndr
, "out", "samr_OpenGroup");
7604 ndr_print_ptr(ndr
, "group_handle", r
->out
.group_handle
);
7606 ndr_print_policy_handle(ndr
, "group_handle", r
->out
.group_handle
);
7608 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7614 static enum ndr_err_code
ndr_push_samr_QueryGroupInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryGroupInfo
*r
)
7616 if (flags
& NDR_IN
) {
7617 if (r
->in
.group_handle
== NULL
) {
7618 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7620 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7621 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7623 if (flags
& NDR_OUT
) {
7624 if (r
->out
.info
== NULL
) {
7625 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7627 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
7629 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7630 NDR_CHECK(ndr_push_samr_GroupInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7632 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7634 return NDR_ERR_SUCCESS
;
7637 static enum ndr_err_code
ndr_pull_samr_QueryGroupInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryGroupInfo
*r
)
7640 TALLOC_CTX
*_mem_save_group_handle_0
;
7641 TALLOC_CTX
*_mem_save_info_0
;
7642 TALLOC_CTX
*_mem_save_info_1
;
7643 if (flags
& NDR_IN
) {
7644 ZERO_STRUCT(r
->out
);
7646 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7647 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
7649 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7650 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7651 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7652 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7653 NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7654 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7655 ZERO_STRUCTP(r
->out
.info
);
7657 if (flags
& NDR_OUT
) {
7658 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7659 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7661 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7662 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
7663 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
7665 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
7667 *r
->out
.info
= NULL
;
7670 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7671 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
7672 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7673 NDR_CHECK(ndr_pull_samr_GroupInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7674 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
7676 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7677 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7679 return NDR_ERR_SUCCESS
;
7682 _PUBLIC_
void ndr_print_samr_QueryGroupInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryGroupInfo
*r
)
7684 ndr_print_struct(ndr
, name
, "samr_QueryGroupInfo");
7686 if (flags
& NDR_SET_VALUES
) {
7687 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7689 if (flags
& NDR_IN
) {
7690 ndr_print_struct(ndr
, "in", "samr_QueryGroupInfo");
7692 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
7694 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
7696 ndr_print_samr_GroupInfoEnum(ndr
, "level", r
->in
.level
);
7699 if (flags
& NDR_OUT
) {
7700 ndr_print_struct(ndr
, "out", "samr_QueryGroupInfo");
7702 ndr_print_ptr(ndr
, "info", r
->out
.info
);
7704 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
7707 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
7708 ndr_print_samr_GroupInfo(ndr
, "info", *r
->out
.info
);
7712 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7718 static enum ndr_err_code
ndr_push_samr_SetGroupInfo(struct ndr_push
*ndr
, int flags
, const struct samr_SetGroupInfo
*r
)
7720 if (flags
& NDR_IN
) {
7721 if (r
->in
.group_handle
== NULL
) {
7722 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7724 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7725 NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7726 if (r
->in
.info
== NULL
) {
7727 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7729 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7730 NDR_CHECK(ndr_push_samr_GroupInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7732 if (flags
& NDR_OUT
) {
7733 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7735 return NDR_ERR_SUCCESS
;
7738 static enum ndr_err_code
ndr_pull_samr_SetGroupInfo(struct ndr_pull
*ndr
, int flags
, struct samr_SetGroupInfo
*r
)
7740 TALLOC_CTX
*_mem_save_group_handle_0
;
7741 TALLOC_CTX
*_mem_save_info_0
;
7742 if (flags
& NDR_IN
) {
7743 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7744 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
7746 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7747 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7748 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7749 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7750 NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7751 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7752 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
7754 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7755 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
7756 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7757 NDR_CHECK(ndr_pull_samr_GroupInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7758 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7760 if (flags
& NDR_OUT
) {
7761 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7763 return NDR_ERR_SUCCESS
;
7766 _PUBLIC_
void ndr_print_samr_SetGroupInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetGroupInfo
*r
)
7768 ndr_print_struct(ndr
, name
, "samr_SetGroupInfo");
7770 if (flags
& NDR_SET_VALUES
) {
7771 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7773 if (flags
& NDR_IN
) {
7774 ndr_print_struct(ndr
, "in", "samr_SetGroupInfo");
7776 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
7778 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
7780 ndr_print_samr_GroupInfoEnum(ndr
, "level", r
->in
.level
);
7781 ndr_print_ptr(ndr
, "info", r
->in
.info
);
7783 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
7784 ndr_print_samr_GroupInfo(ndr
, "info", r
->in
.info
);
7788 if (flags
& NDR_OUT
) {
7789 ndr_print_struct(ndr
, "out", "samr_SetGroupInfo");
7791 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7797 static enum ndr_err_code
ndr_push_samr_AddGroupMember(struct ndr_push
*ndr
, int flags
, const struct samr_AddGroupMember
*r
)
7799 if (flags
& NDR_IN
) {
7800 if (r
->in
.group_handle
== NULL
) {
7801 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7803 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7804 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
7805 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
7807 if (flags
& NDR_OUT
) {
7808 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7810 return NDR_ERR_SUCCESS
;
7813 static enum ndr_err_code
ndr_pull_samr_AddGroupMember(struct ndr_pull
*ndr
, int flags
, struct samr_AddGroupMember
*r
)
7815 TALLOC_CTX
*_mem_save_group_handle_0
;
7816 if (flags
& NDR_IN
) {
7817 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7818 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
7820 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7821 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7822 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7823 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7824 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
7825 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
7827 if (flags
& NDR_OUT
) {
7828 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7830 return NDR_ERR_SUCCESS
;
7833 _PUBLIC_
void ndr_print_samr_AddGroupMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_AddGroupMember
*r
)
7835 ndr_print_struct(ndr
, name
, "samr_AddGroupMember");
7837 if (flags
& NDR_SET_VALUES
) {
7838 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7840 if (flags
& NDR_IN
) {
7841 ndr_print_struct(ndr
, "in", "samr_AddGroupMember");
7843 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
7845 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
7847 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
7848 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
7851 if (flags
& NDR_OUT
) {
7852 ndr_print_struct(ndr
, "out", "samr_AddGroupMember");
7854 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7860 static enum ndr_err_code
ndr_push_samr_DeleteDomainGroup(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteDomainGroup
*r
)
7862 if (flags
& NDR_IN
) {
7863 if (r
->in
.group_handle
== NULL
) {
7864 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7866 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7868 if (flags
& NDR_OUT
) {
7869 if (r
->out
.group_handle
== NULL
) {
7870 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7872 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
7873 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7875 return NDR_ERR_SUCCESS
;
7878 static enum ndr_err_code
ndr_pull_samr_DeleteDomainGroup(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteDomainGroup
*r
)
7880 TALLOC_CTX
*_mem_save_group_handle_0
;
7881 if (flags
& NDR_IN
) {
7882 ZERO_STRUCT(r
->out
);
7884 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7885 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
7887 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7888 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7889 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7890 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7891 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
7892 *r
->out
.group_handle
= *r
->in
.group_handle
;
7894 if (flags
& NDR_OUT
) {
7895 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7896 NDR_PULL_ALLOC(ndr
, r
->out
.group_handle
);
7898 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7899 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7900 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.group_handle
));
7901 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7902 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7904 return NDR_ERR_SUCCESS
;
7907 _PUBLIC_
void ndr_print_samr_DeleteDomainGroup(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteDomainGroup
*r
)
7909 ndr_print_struct(ndr
, name
, "samr_DeleteDomainGroup");
7911 if (flags
& NDR_SET_VALUES
) {
7912 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7914 if (flags
& NDR_IN
) {
7915 ndr_print_struct(ndr
, "in", "samr_DeleteDomainGroup");
7917 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
7919 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
7923 if (flags
& NDR_OUT
) {
7924 ndr_print_struct(ndr
, "out", "samr_DeleteDomainGroup");
7926 ndr_print_ptr(ndr
, "group_handle", r
->out
.group_handle
);
7928 ndr_print_policy_handle(ndr
, "group_handle", r
->out
.group_handle
);
7930 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7936 static enum ndr_err_code
ndr_push_samr_DeleteGroupMember(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteGroupMember
*r
)
7938 if (flags
& NDR_IN
) {
7939 if (r
->in
.group_handle
== NULL
) {
7940 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7942 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7943 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
7945 if (flags
& NDR_OUT
) {
7946 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7948 return NDR_ERR_SUCCESS
;
7951 static enum ndr_err_code
ndr_pull_samr_DeleteGroupMember(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteGroupMember
*r
)
7953 TALLOC_CTX
*_mem_save_group_handle_0
;
7954 if (flags
& NDR_IN
) {
7955 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7956 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
7958 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7959 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
7960 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
7961 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7962 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
7964 if (flags
& NDR_OUT
) {
7965 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7967 return NDR_ERR_SUCCESS
;
7970 _PUBLIC_
void ndr_print_samr_DeleteGroupMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteGroupMember
*r
)
7972 ndr_print_struct(ndr
, name
, "samr_DeleteGroupMember");
7974 if (flags
& NDR_SET_VALUES
) {
7975 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7977 if (flags
& NDR_IN
) {
7978 ndr_print_struct(ndr
, "in", "samr_DeleteGroupMember");
7980 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
7982 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
7984 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
7987 if (flags
& NDR_OUT
) {
7988 ndr_print_struct(ndr
, "out", "samr_DeleteGroupMember");
7990 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7996 static enum ndr_err_code
ndr_push_samr_QueryGroupMember(struct ndr_push
*ndr
, int flags
, const struct samr_QueryGroupMember
*r
)
7998 if (flags
& NDR_IN
) {
7999 if (r
->in
.group_handle
== NULL
) {
8000 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8002 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8004 if (flags
& NDR_OUT
) {
8005 if (r
->out
.rids
== NULL
) {
8006 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8008 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.rids
));
8010 NDR_CHECK(ndr_push_samr_RidTypeArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rids
));
8012 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8014 return NDR_ERR_SUCCESS
;
8017 static enum ndr_err_code
ndr_pull_samr_QueryGroupMember(struct ndr_pull
*ndr
, int flags
, struct samr_QueryGroupMember
*r
)
8020 TALLOC_CTX
*_mem_save_group_handle_0
;
8021 TALLOC_CTX
*_mem_save_rids_0
;
8022 TALLOC_CTX
*_mem_save_rids_1
;
8023 if (flags
& NDR_IN
) {
8024 ZERO_STRUCT(r
->out
);
8026 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8027 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
8029 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8030 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
8031 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8032 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8033 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
8034 ZERO_STRUCTP(r
->out
.rids
);
8036 if (flags
& NDR_OUT
) {
8037 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8038 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
8040 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8041 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rids
, LIBNDR_FLAG_REF_ALLOC
);
8042 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rids
));
8044 NDR_PULL_ALLOC(ndr
, *r
->out
.rids
);
8046 *r
->out
.rids
= NULL
;
8049 _mem_save_rids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8050 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.rids
, 0);
8051 NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rids
));
8052 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_1
, 0);
8054 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, LIBNDR_FLAG_REF_ALLOC
);
8055 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8057 return NDR_ERR_SUCCESS
;
8060 _PUBLIC_
void ndr_print_samr_QueryGroupMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryGroupMember
*r
)
8062 ndr_print_struct(ndr
, name
, "samr_QueryGroupMember");
8064 if (flags
& NDR_SET_VALUES
) {
8065 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8067 if (flags
& NDR_IN
) {
8068 ndr_print_struct(ndr
, "in", "samr_QueryGroupMember");
8070 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
8072 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
8076 if (flags
& NDR_OUT
) {
8077 ndr_print_struct(ndr
, "out", "samr_QueryGroupMember");
8079 ndr_print_ptr(ndr
, "rids", r
->out
.rids
);
8081 ndr_print_ptr(ndr
, "rids", *r
->out
.rids
);
8084 ndr_print_samr_RidTypeArray(ndr
, "rids", *r
->out
.rids
);
8088 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8094 static enum ndr_err_code
ndr_push_samr_SetMemberAttributesOfGroup(struct ndr_push
*ndr
, int flags
, const struct samr_SetMemberAttributesOfGroup
*r
)
8096 if (flags
& NDR_IN
) {
8097 if (r
->in
.group_handle
== NULL
) {
8098 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8100 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8101 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
8102 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
8104 if (flags
& NDR_OUT
) {
8105 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8107 return NDR_ERR_SUCCESS
;
8110 static enum ndr_err_code
ndr_pull_samr_SetMemberAttributesOfGroup(struct ndr_pull
*ndr
, int flags
, struct samr_SetMemberAttributesOfGroup
*r
)
8112 TALLOC_CTX
*_mem_save_group_handle_0
;
8113 if (flags
& NDR_IN
) {
8114 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8115 NDR_PULL_ALLOC(ndr
, r
->in
.group_handle
);
8117 _mem_save_group_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8118 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_handle
, LIBNDR_FLAG_REF_ALLOC
);
8119 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.group_handle
));
8120 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8121 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
8122 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
8124 if (flags
& NDR_OUT
) {
8125 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8127 return NDR_ERR_SUCCESS
;
8130 _PUBLIC_
void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetMemberAttributesOfGroup
*r
)
8132 ndr_print_struct(ndr
, name
, "samr_SetMemberAttributesOfGroup");
8134 if (flags
& NDR_SET_VALUES
) {
8135 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8137 if (flags
& NDR_IN
) {
8138 ndr_print_struct(ndr
, "in", "samr_SetMemberAttributesOfGroup");
8140 ndr_print_ptr(ndr
, "group_handle", r
->in
.group_handle
);
8142 ndr_print_policy_handle(ndr
, "group_handle", r
->in
.group_handle
);
8144 ndr_print_uint32(ndr
, "unknown1", r
->in
.unknown1
);
8145 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
8148 if (flags
& NDR_OUT
) {
8149 ndr_print_struct(ndr
, "out", "samr_SetMemberAttributesOfGroup");
8151 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8157 static enum ndr_err_code
ndr_push_samr_OpenAlias(struct ndr_push
*ndr
, int flags
, const struct samr_OpenAlias
*r
)
8159 if (flags
& NDR_IN
) {
8160 if (r
->in
.domain_handle
== NULL
) {
8161 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8163 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
8164 NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
8165 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
8167 if (flags
& NDR_OUT
) {
8168 if (r
->out
.alias_handle
== NULL
) {
8169 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8171 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
8172 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8174 return NDR_ERR_SUCCESS
;
8177 static enum ndr_err_code
ndr_pull_samr_OpenAlias(struct ndr_pull
*ndr
, int flags
, struct samr_OpenAlias
*r
)
8179 TALLOC_CTX
*_mem_save_domain_handle_0
;
8180 TALLOC_CTX
*_mem_save_alias_handle_0
;
8181 if (flags
& NDR_IN
) {
8182 ZERO_STRUCT(r
->out
);
8184 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8185 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
8187 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8188 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
8189 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
8190 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8191 NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
8192 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
8193 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
8194 ZERO_STRUCTP(r
->out
.alias_handle
);
8196 if (flags
& NDR_OUT
) {
8197 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8198 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
8200 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8201 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8202 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
8203 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8204 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8206 return NDR_ERR_SUCCESS
;
8209 _PUBLIC_
void ndr_print_samr_OpenAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OpenAlias
*r
)
8211 ndr_print_struct(ndr
, name
, "samr_OpenAlias");
8213 if (flags
& NDR_SET_VALUES
) {
8214 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8216 if (flags
& NDR_IN
) {
8217 ndr_print_struct(ndr
, "in", "samr_OpenAlias");
8219 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
8221 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
8223 ndr_print_samr_AliasAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
8224 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
8227 if (flags
& NDR_OUT
) {
8228 ndr_print_struct(ndr
, "out", "samr_OpenAlias");
8230 ndr_print_ptr(ndr
, "alias_handle", r
->out
.alias_handle
);
8232 ndr_print_policy_handle(ndr
, "alias_handle", r
->out
.alias_handle
);
8234 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8240 static enum ndr_err_code
ndr_push_samr_QueryAliasInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryAliasInfo
*r
)
8242 if (flags
& NDR_IN
) {
8243 if (r
->in
.alias_handle
== NULL
) {
8244 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8246 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8247 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
8249 if (flags
& NDR_OUT
) {
8250 if (r
->out
.info
== NULL
) {
8251 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8253 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
8255 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
8256 NDR_CHECK(ndr_push_samr_AliasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
8258 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8260 return NDR_ERR_SUCCESS
;
8263 static enum ndr_err_code
ndr_pull_samr_QueryAliasInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryAliasInfo
*r
)
8266 TALLOC_CTX
*_mem_save_alias_handle_0
;
8267 TALLOC_CTX
*_mem_save_info_0
;
8268 TALLOC_CTX
*_mem_save_info_1
;
8269 if (flags
& NDR_IN
) {
8270 ZERO_STRUCT(r
->out
);
8272 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8273 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8275 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8276 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8277 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8278 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8279 NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
8280 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8281 ZERO_STRUCTP(r
->out
.info
);
8283 if (flags
& NDR_OUT
) {
8284 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8285 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8287 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8288 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
8289 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
8291 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
8293 *r
->out
.info
= NULL
;
8296 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8297 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
8298 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
8299 NDR_CHECK(ndr_pull_samr_AliasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
8300 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
8302 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
8303 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8305 return NDR_ERR_SUCCESS
;
8308 _PUBLIC_
void ndr_print_samr_QueryAliasInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryAliasInfo
*r
)
8310 ndr_print_struct(ndr
, name
, "samr_QueryAliasInfo");
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_QueryAliasInfo");
8318 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8320 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8322 ndr_print_samr_AliasInfoEnum(ndr
, "level", r
->in
.level
);
8325 if (flags
& NDR_OUT
) {
8326 ndr_print_struct(ndr
, "out", "samr_QueryAliasInfo");
8328 ndr_print_ptr(ndr
, "info", r
->out
.info
);
8330 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
8333 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
8334 ndr_print_samr_AliasInfo(ndr
, "info", *r
->out
.info
);
8338 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8344 static enum ndr_err_code
ndr_push_samr_SetAliasInfo(struct ndr_push
*ndr
, int flags
, const struct samr_SetAliasInfo
*r
)
8346 if (flags
& NDR_IN
) {
8347 if (r
->in
.alias_handle
== NULL
) {
8348 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8350 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8351 NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
8352 if (r
->in
.info
== NULL
) {
8353 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8355 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
8356 NDR_CHECK(ndr_push_samr_AliasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
8358 if (flags
& NDR_OUT
) {
8359 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8361 return NDR_ERR_SUCCESS
;
8364 static enum ndr_err_code
ndr_pull_samr_SetAliasInfo(struct ndr_pull
*ndr
, int flags
, struct samr_SetAliasInfo
*r
)
8366 TALLOC_CTX
*_mem_save_alias_handle_0
;
8367 TALLOC_CTX
*_mem_save_info_0
;
8368 if (flags
& NDR_IN
) {
8369 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8370 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8372 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8373 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8374 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8376 NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
8377 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8378 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
8380 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8381 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
8382 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
8383 NDR_CHECK(ndr_pull_samr_AliasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
8384 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
8386 if (flags
& NDR_OUT
) {
8387 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8389 return NDR_ERR_SUCCESS
;
8392 _PUBLIC_
void ndr_print_samr_SetAliasInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetAliasInfo
*r
)
8394 ndr_print_struct(ndr
, name
, "samr_SetAliasInfo");
8396 if (flags
& NDR_SET_VALUES
) {
8397 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8399 if (flags
& NDR_IN
) {
8400 ndr_print_struct(ndr
, "in", "samr_SetAliasInfo");
8402 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8404 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8406 ndr_print_samr_AliasInfoEnum(ndr
, "level", r
->in
.level
);
8407 ndr_print_ptr(ndr
, "info", r
->in
.info
);
8409 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
8410 ndr_print_samr_AliasInfo(ndr
, "info", r
->in
.info
);
8414 if (flags
& NDR_OUT
) {
8415 ndr_print_struct(ndr
, "out", "samr_SetAliasInfo");
8417 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8423 static enum ndr_err_code
ndr_push_samr_DeleteDomAlias(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteDomAlias
*r
)
8425 if (flags
& NDR_IN
) {
8426 if (r
->in
.alias_handle
== NULL
) {
8427 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8429 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8431 if (flags
& NDR_OUT
) {
8432 if (r
->out
.alias_handle
== NULL
) {
8433 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8435 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
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_DeleteDomAlias(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteDomAlias
*r
)
8443 TALLOC_CTX
*_mem_save_alias_handle_0
;
8444 if (flags
& NDR_IN
) {
8445 ZERO_STRUCT(r
->out
);
8447 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8448 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8450 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8451 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8452 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8453 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8454 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
8455 *r
->out
.alias_handle
= *r
->in
.alias_handle
;
8457 if (flags
& NDR_OUT
) {
8458 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8459 NDR_PULL_ALLOC(ndr
, r
->out
.alias_handle
);
8461 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8462 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8463 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.alias_handle
));
8464 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8465 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8467 return NDR_ERR_SUCCESS
;
8470 _PUBLIC_
void ndr_print_samr_DeleteDomAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteDomAlias
*r
)
8472 ndr_print_struct(ndr
, name
, "samr_DeleteDomAlias");
8474 if (flags
& NDR_SET_VALUES
) {
8475 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8477 if (flags
& NDR_IN
) {
8478 ndr_print_struct(ndr
, "in", "samr_DeleteDomAlias");
8480 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8482 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8486 if (flags
& NDR_OUT
) {
8487 ndr_print_struct(ndr
, "out", "samr_DeleteDomAlias");
8489 ndr_print_ptr(ndr
, "alias_handle", r
->out
.alias_handle
);
8491 ndr_print_policy_handle(ndr
, "alias_handle", r
->out
.alias_handle
);
8493 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8499 static enum ndr_err_code
ndr_push_samr_AddAliasMember(struct ndr_push
*ndr
, int flags
, const struct samr_AddAliasMember
*r
)
8501 if (flags
& NDR_IN
) {
8502 if (r
->in
.alias_handle
== NULL
) {
8503 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8505 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8506 if (r
->in
.sid
== NULL
) {
8507 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8509 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8511 if (flags
& NDR_OUT
) {
8512 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8514 return NDR_ERR_SUCCESS
;
8517 static enum ndr_err_code
ndr_pull_samr_AddAliasMember(struct ndr_pull
*ndr
, int flags
, struct samr_AddAliasMember
*r
)
8519 TALLOC_CTX
*_mem_save_alias_handle_0
;
8520 TALLOC_CTX
*_mem_save_sid_0
;
8521 if (flags
& NDR_IN
) {
8522 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8523 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8525 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8526 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8527 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8528 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8529 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8530 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8532 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8533 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8534 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8535 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8537 if (flags
& NDR_OUT
) {
8538 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8540 return NDR_ERR_SUCCESS
;
8543 _PUBLIC_
void ndr_print_samr_AddAliasMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_AddAliasMember
*r
)
8545 ndr_print_struct(ndr
, name
, "samr_AddAliasMember");
8547 if (flags
& NDR_SET_VALUES
) {
8548 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8550 if (flags
& NDR_IN
) {
8551 ndr_print_struct(ndr
, "in", "samr_AddAliasMember");
8553 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8555 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8557 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8559 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8563 if (flags
& NDR_OUT
) {
8564 ndr_print_struct(ndr
, "out", "samr_AddAliasMember");
8566 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8572 static enum ndr_err_code
ndr_push_samr_DeleteAliasMember(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteAliasMember
*r
)
8574 if (flags
& NDR_IN
) {
8575 if (r
->in
.alias_handle
== NULL
) {
8576 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8578 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8579 if (r
->in
.sid
== NULL
) {
8580 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8582 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8584 if (flags
& NDR_OUT
) {
8585 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8587 return NDR_ERR_SUCCESS
;
8590 static enum ndr_err_code
ndr_pull_samr_DeleteAliasMember(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteAliasMember
*r
)
8592 TALLOC_CTX
*_mem_save_alias_handle_0
;
8593 TALLOC_CTX
*_mem_save_sid_0
;
8594 if (flags
& NDR_IN
) {
8595 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8596 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8598 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8599 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8600 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8601 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8602 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8603 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8605 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8606 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8607 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8608 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8610 if (flags
& NDR_OUT
) {
8611 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8613 return NDR_ERR_SUCCESS
;
8616 _PUBLIC_
void ndr_print_samr_DeleteAliasMember(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteAliasMember
*r
)
8618 ndr_print_struct(ndr
, name
, "samr_DeleteAliasMember");
8620 if (flags
& NDR_SET_VALUES
) {
8621 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8623 if (flags
& NDR_IN
) {
8624 ndr_print_struct(ndr
, "in", "samr_DeleteAliasMember");
8626 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8628 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8630 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8632 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8636 if (flags
& NDR_OUT
) {
8637 ndr_print_struct(ndr
, "out", "samr_DeleteAliasMember");
8639 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8645 static enum ndr_err_code
ndr_push_samr_GetMembersInAlias(struct ndr_push
*ndr
, int flags
, const struct samr_GetMembersInAlias
*r
)
8647 if (flags
& NDR_IN
) {
8648 if (r
->in
.alias_handle
== NULL
) {
8649 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8651 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8653 if (flags
& NDR_OUT
) {
8654 if (r
->out
.sids
== NULL
) {
8655 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8657 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8658 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8660 return NDR_ERR_SUCCESS
;
8663 static enum ndr_err_code
ndr_pull_samr_GetMembersInAlias(struct ndr_pull
*ndr
, int flags
, struct samr_GetMembersInAlias
*r
)
8665 TALLOC_CTX
*_mem_save_alias_handle_0
;
8666 TALLOC_CTX
*_mem_save_sids_0
;
8667 if (flags
& NDR_IN
) {
8668 ZERO_STRUCT(r
->out
);
8670 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8671 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
8673 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8674 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
8675 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
8676 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8677 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8678 ZERO_STRUCTP(r
->out
.sids
);
8680 if (flags
& NDR_OUT
) {
8681 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8682 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8684 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8685 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
8686 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8687 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
8688 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8690 return NDR_ERR_SUCCESS
;
8693 _PUBLIC_
void ndr_print_samr_GetMembersInAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetMembersInAlias
*r
)
8695 ndr_print_struct(ndr
, name
, "samr_GetMembersInAlias");
8697 if (flags
& NDR_SET_VALUES
) {
8698 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8700 if (flags
& NDR_IN
) {
8701 ndr_print_struct(ndr
, "in", "samr_GetMembersInAlias");
8703 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
8705 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
8709 if (flags
& NDR_OUT
) {
8710 ndr_print_struct(ndr
, "out", "samr_GetMembersInAlias");
8712 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
8714 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
8716 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8722 _PUBLIC_
enum ndr_err_code
ndr_push_samr_OpenUser(struct ndr_push
*ndr
, int flags
, const struct samr_OpenUser
*r
)
8724 if (flags
& NDR_IN
) {
8725 if (r
->in
.domain_handle
== NULL
) {
8726 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8728 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
8729 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
8730 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
8732 if (flags
& NDR_OUT
) {
8733 if (r
->out
.user_handle
== NULL
) {
8734 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8736 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
8737 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8739 return NDR_ERR_SUCCESS
;
8742 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_OpenUser(struct ndr_pull
*ndr
, int flags
, struct samr_OpenUser
*r
)
8744 TALLOC_CTX
*_mem_save_domain_handle_0
;
8745 TALLOC_CTX
*_mem_save_user_handle_0
;
8746 if (flags
& NDR_IN
) {
8747 ZERO_STRUCT(r
->out
);
8749 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8750 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
8752 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8753 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
8754 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
8755 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8756 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
8757 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
8758 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
8759 ZERO_STRUCTP(r
->out
.user_handle
);
8761 if (flags
& NDR_OUT
) {
8762 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8763 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
8765 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8766 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
8767 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
8768 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8769 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8771 return NDR_ERR_SUCCESS
;
8774 _PUBLIC_
void ndr_print_samr_OpenUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OpenUser
*r
)
8776 ndr_print_struct(ndr
, name
, "samr_OpenUser");
8778 if (flags
& NDR_SET_VALUES
) {
8779 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8781 if (flags
& NDR_IN
) {
8782 ndr_print_struct(ndr
, "in", "samr_OpenUser");
8784 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
8786 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
8788 ndr_print_samr_UserAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
8789 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
8792 if (flags
& NDR_OUT
) {
8793 ndr_print_struct(ndr
, "out", "samr_OpenUser");
8795 ndr_print_ptr(ndr
, "user_handle", r
->out
.user_handle
);
8797 ndr_print_policy_handle(ndr
, "user_handle", r
->out
.user_handle
);
8799 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8805 static enum ndr_err_code
ndr_push_samr_DeleteUser(struct ndr_push
*ndr
, int flags
, const struct samr_DeleteUser
*r
)
8807 if (flags
& NDR_IN
) {
8808 if (r
->in
.user_handle
== NULL
) {
8809 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8811 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
8813 if (flags
& NDR_OUT
) {
8814 if (r
->out
.user_handle
== NULL
) {
8815 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8817 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
8818 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8820 return NDR_ERR_SUCCESS
;
8823 static enum ndr_err_code
ndr_pull_samr_DeleteUser(struct ndr_pull
*ndr
, int flags
, struct samr_DeleteUser
*r
)
8825 TALLOC_CTX
*_mem_save_user_handle_0
;
8826 if (flags
& NDR_IN
) {
8827 ZERO_STRUCT(r
->out
);
8829 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8830 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
8832 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8833 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
8834 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
8835 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8836 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
8837 *r
->out
.user_handle
= *r
->in
.user_handle
;
8839 if (flags
& NDR_OUT
) {
8840 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8841 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
8843 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8844 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
8845 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
8846 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8847 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8849 return NDR_ERR_SUCCESS
;
8852 _PUBLIC_
void ndr_print_samr_DeleteUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_DeleteUser
*r
)
8854 ndr_print_struct(ndr
, name
, "samr_DeleteUser");
8856 if (flags
& NDR_SET_VALUES
) {
8857 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8859 if (flags
& NDR_IN
) {
8860 ndr_print_struct(ndr
, "in", "samr_DeleteUser");
8862 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
8864 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
8868 if (flags
& NDR_OUT
) {
8869 ndr_print_struct(ndr
, "out", "samr_DeleteUser");
8871 ndr_print_ptr(ndr
, "user_handle", r
->out
.user_handle
);
8873 ndr_print_policy_handle(ndr
, "user_handle", r
->out
.user_handle
);
8875 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8881 _PUBLIC_
enum ndr_err_code
ndr_push_samr_QueryUserInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryUserInfo
*r
)
8883 if (flags
& NDR_IN
) {
8884 if (r
->in
.user_handle
== NULL
) {
8885 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8887 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
8888 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
8890 if (flags
& NDR_OUT
) {
8891 if (r
->out
.info
== NULL
) {
8892 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8894 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
8896 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
8897 NDR_CHECK(ndr_push_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
8899 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8901 return NDR_ERR_SUCCESS
;
8904 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_QueryUserInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryUserInfo
*r
)
8907 TALLOC_CTX
*_mem_save_user_handle_0
;
8908 TALLOC_CTX
*_mem_save_info_0
;
8909 TALLOC_CTX
*_mem_save_info_1
;
8910 if (flags
& NDR_IN
) {
8911 ZERO_STRUCT(r
->out
);
8913 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8914 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
8916 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8917 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
8918 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
8919 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8920 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
8921 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8922 ZERO_STRUCTP(r
->out
.info
);
8924 if (flags
& NDR_OUT
) {
8925 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8926 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8928 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8929 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
8930 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
8932 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
8934 *r
->out
.info
= NULL
;
8937 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8938 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
8939 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
8940 NDR_CHECK(ndr_pull_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
8941 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
8943 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
8944 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8946 return NDR_ERR_SUCCESS
;
8949 _PUBLIC_
void ndr_print_samr_QueryUserInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryUserInfo
*r
)
8951 ndr_print_struct(ndr
, name
, "samr_QueryUserInfo");
8953 if (flags
& NDR_SET_VALUES
) {
8954 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8956 if (flags
& NDR_IN
) {
8957 ndr_print_struct(ndr
, "in", "samr_QueryUserInfo");
8959 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
8961 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
8963 ndr_print_samr_UserInfoLevel(ndr
, "level", r
->in
.level
);
8966 if (flags
& NDR_OUT
) {
8967 ndr_print_struct(ndr
, "out", "samr_QueryUserInfo");
8969 ndr_print_ptr(ndr
, "info", r
->out
.info
);
8971 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
8974 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
8975 ndr_print_samr_UserInfo(ndr
, "info", *r
->out
.info
);
8979 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8985 _PUBLIC_
enum ndr_err_code
ndr_push_samr_SetUserInfo(struct ndr_push
*ndr
, int flags
, const struct samr_SetUserInfo
*r
)
8987 if (flags
& NDR_IN
) {
8988 if (r
->in
.user_handle
== NULL
) {
8989 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8991 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
8992 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
8993 if (r
->in
.info
== NULL
) {
8994 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8996 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
8997 NDR_CHECK(ndr_push_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
8999 if (flags
& NDR_OUT
) {
9000 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9002 return NDR_ERR_SUCCESS
;
9005 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_SetUserInfo(struct ndr_pull
*ndr
, int flags
, struct samr_SetUserInfo
*r
)
9007 TALLOC_CTX
*_mem_save_user_handle_0
;
9008 TALLOC_CTX
*_mem_save_info_0
;
9009 if (flags
& NDR_IN
) {
9010 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9011 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9013 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9014 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9015 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9016 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9017 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
9018 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9019 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
9021 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9022 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
9023 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9024 NDR_CHECK(ndr_pull_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9025 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9027 if (flags
& NDR_OUT
) {
9028 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9030 return NDR_ERR_SUCCESS
;
9033 _PUBLIC_
void ndr_print_samr_SetUserInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetUserInfo
*r
)
9035 ndr_print_struct(ndr
, name
, "samr_SetUserInfo");
9037 if (flags
& NDR_SET_VALUES
) {
9038 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9040 if (flags
& NDR_IN
) {
9041 ndr_print_struct(ndr
, "in", "samr_SetUserInfo");
9043 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9045 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9047 ndr_print_samr_UserInfoLevel(ndr
, "level", r
->in
.level
);
9048 ndr_print_ptr(ndr
, "info", r
->in
.info
);
9050 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
9051 ndr_print_samr_UserInfo(ndr
, "info", r
->in
.info
);
9055 if (flags
& NDR_OUT
) {
9056 ndr_print_struct(ndr
, "out", "samr_SetUserInfo");
9058 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9064 static enum ndr_err_code
ndr_push_samr_ChangePasswordUser(struct ndr_push
*ndr
, int flags
, const struct samr_ChangePasswordUser
*r
)
9066 if (flags
& NDR_IN
) {
9067 if (r
->in
.user_handle
== NULL
) {
9068 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9070 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9071 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.lm_present
));
9072 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_lm_crypted
));
9073 if (r
->in
.old_lm_crypted
) {
9074 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.old_lm_crypted
));
9076 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_lm_crypted
));
9077 if (r
->in
.new_lm_crypted
) {
9078 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.new_lm_crypted
));
9080 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.nt_present
));
9081 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_nt_crypted
));
9082 if (r
->in
.old_nt_crypted
) {
9083 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.old_nt_crypted
));
9085 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_nt_crypted
));
9086 if (r
->in
.new_nt_crypted
) {
9087 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.new_nt_crypted
));
9089 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.cross1_present
));
9090 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_cross
));
9091 if (r
->in
.nt_cross
) {
9092 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_cross
));
9094 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.cross2_present
));
9095 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_cross
));
9096 if (r
->in
.lm_cross
) {
9097 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_cross
));
9100 if (flags
& NDR_OUT
) {
9101 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9103 return NDR_ERR_SUCCESS
;
9106 static enum ndr_err_code
ndr_pull_samr_ChangePasswordUser(struct ndr_pull
*ndr
, int flags
, struct samr_ChangePasswordUser
*r
)
9108 uint32_t _ptr_old_lm_crypted
;
9109 uint32_t _ptr_new_lm_crypted
;
9110 uint32_t _ptr_old_nt_crypted
;
9111 uint32_t _ptr_new_nt_crypted
;
9112 uint32_t _ptr_nt_cross
;
9113 uint32_t _ptr_lm_cross
;
9114 TALLOC_CTX
*_mem_save_user_handle_0
;
9115 TALLOC_CTX
*_mem_save_old_lm_crypted_0
;
9116 TALLOC_CTX
*_mem_save_new_lm_crypted_0
;
9117 TALLOC_CTX
*_mem_save_old_nt_crypted_0
;
9118 TALLOC_CTX
*_mem_save_new_nt_crypted_0
;
9119 TALLOC_CTX
*_mem_save_nt_cross_0
;
9120 TALLOC_CTX
*_mem_save_lm_cross_0
;
9121 if (flags
& NDR_IN
) {
9122 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9123 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9125 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9126 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9127 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9128 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9129 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.lm_present
));
9130 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_lm_crypted
));
9131 if (_ptr_old_lm_crypted
) {
9132 NDR_PULL_ALLOC(ndr
, r
->in
.old_lm_crypted
);
9134 r
->in
.old_lm_crypted
= NULL
;
9136 if (r
->in
.old_lm_crypted
) {
9137 _mem_save_old_lm_crypted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9138 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_lm_crypted
, 0);
9139 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.old_lm_crypted
));
9140 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_lm_crypted_0
, 0);
9142 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_lm_crypted
));
9143 if (_ptr_new_lm_crypted
) {
9144 NDR_PULL_ALLOC(ndr
, r
->in
.new_lm_crypted
);
9146 r
->in
.new_lm_crypted
= NULL
;
9148 if (r
->in
.new_lm_crypted
) {
9149 _mem_save_new_lm_crypted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9150 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_lm_crypted
, 0);
9151 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.new_lm_crypted
));
9152 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_lm_crypted_0
, 0);
9154 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.nt_present
));
9155 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_nt_crypted
));
9156 if (_ptr_old_nt_crypted
) {
9157 NDR_PULL_ALLOC(ndr
, r
->in
.old_nt_crypted
);
9159 r
->in
.old_nt_crypted
= NULL
;
9161 if (r
->in
.old_nt_crypted
) {
9162 _mem_save_old_nt_crypted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9163 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_nt_crypted
, 0);
9164 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.old_nt_crypted
));
9165 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_nt_crypted_0
, 0);
9167 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_nt_crypted
));
9168 if (_ptr_new_nt_crypted
) {
9169 NDR_PULL_ALLOC(ndr
, r
->in
.new_nt_crypted
);
9171 r
->in
.new_nt_crypted
= NULL
;
9173 if (r
->in
.new_nt_crypted
) {
9174 _mem_save_new_nt_crypted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9175 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_nt_crypted
, 0);
9176 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.new_nt_crypted
));
9177 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_nt_crypted_0
, 0);
9179 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.cross1_present
));
9180 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_cross
));
9181 if (_ptr_nt_cross
) {
9182 NDR_PULL_ALLOC(ndr
, r
->in
.nt_cross
);
9184 r
->in
.nt_cross
= NULL
;
9186 if (r
->in
.nt_cross
) {
9187 _mem_save_nt_cross_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9188 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_cross
, 0);
9189 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_cross
));
9190 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_cross_0
, 0);
9192 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.cross2_present
));
9193 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_cross
));
9194 if (_ptr_lm_cross
) {
9195 NDR_PULL_ALLOC(ndr
, r
->in
.lm_cross
);
9197 r
->in
.lm_cross
= NULL
;
9199 if (r
->in
.lm_cross
) {
9200 _mem_save_lm_cross_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9201 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_cross
, 0);
9202 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_cross
));
9203 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_cross_0
, 0);
9206 if (flags
& NDR_OUT
) {
9207 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9209 return NDR_ERR_SUCCESS
;
9212 _PUBLIC_
void ndr_print_samr_ChangePasswordUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_ChangePasswordUser
*r
)
9214 ndr_print_struct(ndr
, name
, "samr_ChangePasswordUser");
9216 if (flags
& NDR_SET_VALUES
) {
9217 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9219 if (flags
& NDR_IN
) {
9220 ndr_print_struct(ndr
, "in", "samr_ChangePasswordUser");
9222 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9224 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9226 ndr_print_uint8(ndr
, "lm_present", r
->in
.lm_present
);
9227 ndr_print_ptr(ndr
, "old_lm_crypted", r
->in
.old_lm_crypted
);
9229 if (r
->in
.old_lm_crypted
) {
9230 ndr_print_samr_Password(ndr
, "old_lm_crypted", r
->in
.old_lm_crypted
);
9233 ndr_print_ptr(ndr
, "new_lm_crypted", r
->in
.new_lm_crypted
);
9235 if (r
->in
.new_lm_crypted
) {
9236 ndr_print_samr_Password(ndr
, "new_lm_crypted", r
->in
.new_lm_crypted
);
9239 ndr_print_uint8(ndr
, "nt_present", r
->in
.nt_present
);
9240 ndr_print_ptr(ndr
, "old_nt_crypted", r
->in
.old_nt_crypted
);
9242 if (r
->in
.old_nt_crypted
) {
9243 ndr_print_samr_Password(ndr
, "old_nt_crypted", r
->in
.old_nt_crypted
);
9246 ndr_print_ptr(ndr
, "new_nt_crypted", r
->in
.new_nt_crypted
);
9248 if (r
->in
.new_nt_crypted
) {
9249 ndr_print_samr_Password(ndr
, "new_nt_crypted", r
->in
.new_nt_crypted
);
9252 ndr_print_uint8(ndr
, "cross1_present", r
->in
.cross1_present
);
9253 ndr_print_ptr(ndr
, "nt_cross", r
->in
.nt_cross
);
9255 if (r
->in
.nt_cross
) {
9256 ndr_print_samr_Password(ndr
, "nt_cross", r
->in
.nt_cross
);
9259 ndr_print_uint8(ndr
, "cross2_present", r
->in
.cross2_present
);
9260 ndr_print_ptr(ndr
, "lm_cross", r
->in
.lm_cross
);
9262 if (r
->in
.lm_cross
) {
9263 ndr_print_samr_Password(ndr
, "lm_cross", r
->in
.lm_cross
);
9268 if (flags
& NDR_OUT
) {
9269 ndr_print_struct(ndr
, "out", "samr_ChangePasswordUser");
9271 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9277 static enum ndr_err_code
ndr_push_samr_GetGroupsForUser(struct ndr_push
*ndr
, int flags
, const struct samr_GetGroupsForUser
*r
)
9279 if (flags
& NDR_IN
) {
9280 if (r
->in
.user_handle
== NULL
) {
9281 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9283 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9285 if (flags
& NDR_OUT
) {
9286 if (r
->out
.rids
== NULL
) {
9287 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9289 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.rids
));
9291 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rids
));
9293 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9295 return NDR_ERR_SUCCESS
;
9298 static enum ndr_err_code
ndr_pull_samr_GetGroupsForUser(struct ndr_pull
*ndr
, int flags
, struct samr_GetGroupsForUser
*r
)
9301 TALLOC_CTX
*_mem_save_user_handle_0
;
9302 TALLOC_CTX
*_mem_save_rids_0
;
9303 TALLOC_CTX
*_mem_save_rids_1
;
9304 if (flags
& NDR_IN
) {
9305 ZERO_STRUCT(r
->out
);
9307 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9308 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9310 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9311 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9312 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9313 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9314 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
9315 ZERO_STRUCTP(r
->out
.rids
);
9317 if (flags
& NDR_OUT
) {
9318 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9319 NDR_PULL_ALLOC(ndr
, r
->out
.rids
);
9321 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9322 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rids
, LIBNDR_FLAG_REF_ALLOC
);
9323 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rids
));
9325 NDR_PULL_ALLOC(ndr
, *r
->out
.rids
);
9327 *r
->out
.rids
= NULL
;
9330 _mem_save_rids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9331 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.rids
, 0);
9332 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rids
));
9333 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_1
, 0);
9335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, LIBNDR_FLAG_REF_ALLOC
);
9336 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9338 return NDR_ERR_SUCCESS
;
9341 _PUBLIC_
void ndr_print_samr_GetGroupsForUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetGroupsForUser
*r
)
9343 ndr_print_struct(ndr
, name
, "samr_GetGroupsForUser");
9345 if (flags
& NDR_SET_VALUES
) {
9346 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9348 if (flags
& NDR_IN
) {
9349 ndr_print_struct(ndr
, "in", "samr_GetGroupsForUser");
9351 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9353 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9357 if (flags
& NDR_OUT
) {
9358 ndr_print_struct(ndr
, "out", "samr_GetGroupsForUser");
9360 ndr_print_ptr(ndr
, "rids", r
->out
.rids
);
9362 ndr_print_ptr(ndr
, "rids", *r
->out
.rids
);
9365 ndr_print_samr_RidWithAttributeArray(ndr
, "rids", *r
->out
.rids
);
9369 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9375 static enum ndr_err_code
ndr_push_samr_QueryDisplayInfo(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDisplayInfo
*r
)
9377 if (flags
& NDR_IN
) {
9378 if (r
->in
.domain_handle
== NULL
) {
9379 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9381 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9382 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
9383 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.start_idx
));
9384 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_entries
));
9385 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
9387 if (flags
& NDR_OUT
) {
9388 if (r
->out
.total_size
== NULL
) {
9389 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total_size
));
9392 if (r
->out
.returned_size
== NULL
) {
9393 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9395 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.returned_size
));
9396 if (r
->out
.info
== NULL
) {
9397 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9399 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
9400 NDR_CHECK(ndr_push_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
9401 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9403 return NDR_ERR_SUCCESS
;
9406 static enum ndr_err_code
ndr_pull_samr_QueryDisplayInfo(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDisplayInfo
*r
)
9408 TALLOC_CTX
*_mem_save_domain_handle_0
;
9409 TALLOC_CTX
*_mem_save_total_size_0
;
9410 TALLOC_CTX
*_mem_save_returned_size_0
;
9411 TALLOC_CTX
*_mem_save_info_0
;
9412 if (flags
& NDR_IN
) {
9413 ZERO_STRUCT(r
->out
);
9415 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9416 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
9418 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9419 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
9420 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9421 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9422 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
9423 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.start_idx
));
9424 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_entries
));
9425 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
9426 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
9427 ZERO_STRUCTP(r
->out
.total_size
);
9428 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
9429 ZERO_STRUCTP(r
->out
.returned_size
);
9430 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9431 ZERO_STRUCTP(r
->out
.info
);
9433 if (flags
& NDR_OUT
) {
9434 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9435 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
9437 _mem_save_total_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9438 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total_size
, LIBNDR_FLAG_REF_ALLOC
);
9439 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total_size
));
9440 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_size_0
, LIBNDR_FLAG_REF_ALLOC
);
9441 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9442 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
9444 _mem_save_returned_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9445 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_size
, LIBNDR_FLAG_REF_ALLOC
);
9446 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.returned_size
));
9447 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_size_0
, LIBNDR_FLAG_REF_ALLOC
);
9448 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9449 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9451 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9452 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9453 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
9454 NDR_CHECK(ndr_pull_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
9455 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9456 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9458 return NDR_ERR_SUCCESS
;
9461 _PUBLIC_
void ndr_print_samr_QueryDisplayInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDisplayInfo
*r
)
9463 ndr_print_struct(ndr
, name
, "samr_QueryDisplayInfo");
9465 if (flags
& NDR_SET_VALUES
) {
9466 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9468 if (flags
& NDR_IN
) {
9469 ndr_print_struct(ndr
, "in", "samr_QueryDisplayInfo");
9471 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
9473 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
9475 ndr_print_uint16(ndr
, "level", r
->in
.level
);
9476 ndr_print_uint32(ndr
, "start_idx", r
->in
.start_idx
);
9477 ndr_print_uint32(ndr
, "max_entries", r
->in
.max_entries
);
9478 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
9481 if (flags
& NDR_OUT
) {
9482 ndr_print_struct(ndr
, "out", "samr_QueryDisplayInfo");
9484 ndr_print_ptr(ndr
, "total_size", r
->out
.total_size
);
9486 ndr_print_uint32(ndr
, "total_size", *r
->out
.total_size
);
9488 ndr_print_ptr(ndr
, "returned_size", r
->out
.returned_size
);
9490 ndr_print_uint32(ndr
, "returned_size", *r
->out
.returned_size
);
9492 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9494 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
9495 ndr_print_samr_DispInfo(ndr
, "info", r
->out
.info
);
9497 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9503 static enum ndr_err_code
ndr_push_samr_GetDisplayEnumerationIndex(struct ndr_push
*ndr
, int flags
, const struct samr_GetDisplayEnumerationIndex
*r
)
9505 if (flags
& NDR_IN
) {
9506 if (r
->in
.domain_handle
== NULL
) {
9507 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9509 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9510 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
9511 if (r
->in
.name
== NULL
) {
9512 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9514 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9516 if (flags
& NDR_OUT
) {
9517 if (r
->out
.idx
== NULL
) {
9518 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9520 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.idx
));
9521 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9523 return NDR_ERR_SUCCESS
;
9526 static enum ndr_err_code
ndr_pull_samr_GetDisplayEnumerationIndex(struct ndr_pull
*ndr
, int flags
, struct samr_GetDisplayEnumerationIndex
*r
)
9528 TALLOC_CTX
*_mem_save_domain_handle_0
;
9529 TALLOC_CTX
*_mem_save_name_0
;
9530 TALLOC_CTX
*_mem_save_idx_0
;
9531 if (flags
& NDR_IN
) {
9532 ZERO_STRUCT(r
->out
);
9534 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9535 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
9537 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9538 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
9539 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9540 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9541 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
9542 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9543 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
9545 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9546 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
9547 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9548 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9549 NDR_PULL_ALLOC(ndr
, r
->out
.idx
);
9550 ZERO_STRUCTP(r
->out
.idx
);
9552 if (flags
& NDR_OUT
) {
9553 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9554 NDR_PULL_ALLOC(ndr
, r
->out
.idx
);
9556 _mem_save_idx_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9557 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.idx
, LIBNDR_FLAG_REF_ALLOC
);
9558 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.idx
));
9559 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_idx_0
, LIBNDR_FLAG_REF_ALLOC
);
9560 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9562 return NDR_ERR_SUCCESS
;
9565 _PUBLIC_
void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetDisplayEnumerationIndex
*r
)
9567 ndr_print_struct(ndr
, name
, "samr_GetDisplayEnumerationIndex");
9569 if (flags
& NDR_SET_VALUES
) {
9570 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9572 if (flags
& NDR_IN
) {
9573 ndr_print_struct(ndr
, "in", "samr_GetDisplayEnumerationIndex");
9575 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
9577 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
9579 ndr_print_uint16(ndr
, "level", r
->in
.level
);
9580 ndr_print_ptr(ndr
, "name", r
->in
.name
);
9582 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
9586 if (flags
& NDR_OUT
) {
9587 ndr_print_struct(ndr
, "out", "samr_GetDisplayEnumerationIndex");
9589 ndr_print_ptr(ndr
, "idx", r
->out
.idx
);
9591 ndr_print_uint32(ndr
, "idx", *r
->out
.idx
);
9593 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9599 static enum ndr_err_code
ndr_push_samr_TestPrivateFunctionsDomain(struct ndr_push
*ndr
, int flags
, const struct samr_TestPrivateFunctionsDomain
*r
)
9601 if (flags
& NDR_IN
) {
9602 if (r
->in
.domain_handle
== NULL
) {
9603 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9605 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9607 if (flags
& NDR_OUT
) {
9608 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9610 return NDR_ERR_SUCCESS
;
9613 static enum ndr_err_code
ndr_pull_samr_TestPrivateFunctionsDomain(struct ndr_pull
*ndr
, int flags
, struct samr_TestPrivateFunctionsDomain
*r
)
9615 TALLOC_CTX
*_mem_save_domain_handle_0
;
9616 if (flags
& NDR_IN
) {
9617 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9618 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
9620 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9621 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
9622 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9623 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9625 if (flags
& NDR_OUT
) {
9626 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9628 return NDR_ERR_SUCCESS
;
9631 _PUBLIC_
void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_TestPrivateFunctionsDomain
*r
)
9633 ndr_print_struct(ndr
, name
, "samr_TestPrivateFunctionsDomain");
9635 if (flags
& NDR_SET_VALUES
) {
9636 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9638 if (flags
& NDR_IN
) {
9639 ndr_print_struct(ndr
, "in", "samr_TestPrivateFunctionsDomain");
9641 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
9643 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
9647 if (flags
& NDR_OUT
) {
9648 ndr_print_struct(ndr
, "out", "samr_TestPrivateFunctionsDomain");
9650 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9656 static enum ndr_err_code
ndr_push_samr_TestPrivateFunctionsUser(struct ndr_push
*ndr
, int flags
, const struct samr_TestPrivateFunctionsUser
*r
)
9658 if (flags
& NDR_IN
) {
9659 if (r
->in
.user_handle
== NULL
) {
9660 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9662 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9664 if (flags
& NDR_OUT
) {
9665 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9667 return NDR_ERR_SUCCESS
;
9670 static enum ndr_err_code
ndr_pull_samr_TestPrivateFunctionsUser(struct ndr_pull
*ndr
, int flags
, struct samr_TestPrivateFunctionsUser
*r
)
9672 TALLOC_CTX
*_mem_save_user_handle_0
;
9673 if (flags
& NDR_IN
) {
9674 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9675 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9677 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9678 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9679 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9680 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9682 if (flags
& NDR_OUT
) {
9683 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9685 return NDR_ERR_SUCCESS
;
9688 _PUBLIC_
void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_TestPrivateFunctionsUser
*r
)
9690 ndr_print_struct(ndr
, name
, "samr_TestPrivateFunctionsUser");
9692 if (flags
& NDR_SET_VALUES
) {
9693 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9695 if (flags
& NDR_IN
) {
9696 ndr_print_struct(ndr
, "in", "samr_TestPrivateFunctionsUser");
9698 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9700 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9704 if (flags
& NDR_OUT
) {
9705 ndr_print_struct(ndr
, "out", "samr_TestPrivateFunctionsUser");
9707 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9713 _PUBLIC_
enum ndr_err_code
ndr_push_samr_GetUserPwInfo(struct ndr_push
*ndr
, int flags
, const struct samr_GetUserPwInfo
*r
)
9715 if (flags
& NDR_IN
) {
9716 if (r
->in
.user_handle
== NULL
) {
9717 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9719 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9721 if (flags
& NDR_OUT
) {
9722 if (r
->out
.info
== NULL
) {
9723 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9725 NDR_CHECK(ndr_push_samr_PwInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
9726 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9728 return NDR_ERR_SUCCESS
;
9731 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_GetUserPwInfo(struct ndr_pull
*ndr
, int flags
, struct samr_GetUserPwInfo
*r
)
9733 TALLOC_CTX
*_mem_save_user_handle_0
;
9734 TALLOC_CTX
*_mem_save_info_0
;
9735 if (flags
& NDR_IN
) {
9736 ZERO_STRUCT(r
->out
);
9738 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9739 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
9741 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9742 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
9743 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9744 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9745 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9746 ZERO_STRUCTP(r
->out
.info
);
9748 if (flags
& NDR_OUT
) {
9749 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9750 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9752 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9753 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9754 NDR_CHECK(ndr_pull_samr_PwInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
9755 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9756 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9758 return NDR_ERR_SUCCESS
;
9761 _PUBLIC_
void ndr_print_samr_GetUserPwInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetUserPwInfo
*r
)
9763 ndr_print_struct(ndr
, name
, "samr_GetUserPwInfo");
9765 if (flags
& NDR_SET_VALUES
) {
9766 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9768 if (flags
& NDR_IN
) {
9769 ndr_print_struct(ndr
, "in", "samr_GetUserPwInfo");
9771 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
9773 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
9777 if (flags
& NDR_OUT
) {
9778 ndr_print_struct(ndr
, "out", "samr_GetUserPwInfo");
9780 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9782 ndr_print_samr_PwInfo(ndr
, "info", r
->out
.info
);
9784 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9790 static enum ndr_err_code
ndr_push_samr_RemoveMemberFromForeignDomain(struct ndr_push
*ndr
, int flags
, const struct samr_RemoveMemberFromForeignDomain
*r
)
9792 if (flags
& NDR_IN
) {
9793 if (r
->in
.domain_handle
== NULL
) {
9794 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9796 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9797 if (r
->in
.sid
== NULL
) {
9798 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9800 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
9802 if (flags
& NDR_OUT
) {
9803 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9805 return NDR_ERR_SUCCESS
;
9808 static enum ndr_err_code
ndr_pull_samr_RemoveMemberFromForeignDomain(struct ndr_pull
*ndr
, int flags
, struct samr_RemoveMemberFromForeignDomain
*r
)
9810 TALLOC_CTX
*_mem_save_domain_handle_0
;
9811 TALLOC_CTX
*_mem_save_sid_0
;
9812 if (flags
& NDR_IN
) {
9813 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9814 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
9816 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9817 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
9818 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9819 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9820 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9821 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
9823 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9824 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
9825 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
9826 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9828 if (flags
& NDR_OUT
) {
9829 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9831 return NDR_ERR_SUCCESS
;
9834 _PUBLIC_
void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_RemoveMemberFromForeignDomain
*r
)
9836 ndr_print_struct(ndr
, name
, "samr_RemoveMemberFromForeignDomain");
9838 if (flags
& NDR_SET_VALUES
) {
9839 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9841 if (flags
& NDR_IN
) {
9842 ndr_print_struct(ndr
, "in", "samr_RemoveMemberFromForeignDomain");
9844 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
9846 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
9848 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
9850 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
9854 if (flags
& NDR_OUT
) {
9855 ndr_print_struct(ndr
, "out", "samr_RemoveMemberFromForeignDomain");
9857 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9863 static enum ndr_err_code
ndr_push_samr_QueryDomainInfo2(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDomainInfo2
*r
)
9865 if (flags
& NDR_IN
) {
9866 if (r
->in
.domain_handle
== NULL
) {
9867 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9869 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9870 NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr
, NDR_SCALARS
, r
->in
.level
));
9872 if (flags
& NDR_OUT
) {
9873 if (r
->out
.info
== NULL
) {
9874 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9876 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9878 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9879 NDR_CHECK(ndr_push_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9881 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9883 return NDR_ERR_SUCCESS
;
9886 static enum ndr_err_code
ndr_pull_samr_QueryDomainInfo2(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDomainInfo2
*r
)
9889 TALLOC_CTX
*_mem_save_domain_handle_0
;
9890 TALLOC_CTX
*_mem_save_info_0
;
9891 TALLOC_CTX
*_mem_save_info_1
;
9892 if (flags
& NDR_IN
) {
9893 ZERO_STRUCT(r
->out
);
9895 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9896 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
9898 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9899 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
9900 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
9901 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9902 NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr
, NDR_SCALARS
, &r
->in
.level
));
9903 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9904 ZERO_STRUCTP(r
->out
.info
);
9906 if (flags
& NDR_OUT
) {
9907 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9908 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9910 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9911 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9912 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9914 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9916 *r
->out
.info
= NULL
;
9919 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9920 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9921 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9922 NDR_CHECK(ndr_pull_samr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9923 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9925 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9926 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9928 return NDR_ERR_SUCCESS
;
9931 _PUBLIC_
void ndr_print_samr_QueryDomainInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDomainInfo2
*r
)
9933 ndr_print_struct(ndr
, name
, "samr_QueryDomainInfo2");
9935 if (flags
& NDR_SET_VALUES
) {
9936 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9938 if (flags
& NDR_IN
) {
9939 ndr_print_struct(ndr
, "in", "samr_QueryDomainInfo2");
9941 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
9943 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
9945 ndr_print_samr_DomainInfoClass(ndr
, "level", r
->in
.level
);
9948 if (flags
& NDR_OUT
) {
9949 ndr_print_struct(ndr
, "out", "samr_QueryDomainInfo2");
9951 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9953 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
9956 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
9957 ndr_print_samr_DomainInfo(ndr
, "info", *r
->out
.info
);
9961 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9967 static enum ndr_err_code
ndr_push_samr_QueryUserInfo2(struct ndr_push
*ndr
, int flags
, const struct samr_QueryUserInfo2
*r
)
9969 if (flags
& NDR_IN
) {
9970 if (r
->in
.user_handle
== NULL
) {
9971 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9973 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
9974 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
9976 if (flags
& NDR_OUT
) {
9977 if (r
->out
.info
== NULL
) {
9978 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9980 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9982 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9983 NDR_CHECK(ndr_push_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9985 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9987 return NDR_ERR_SUCCESS
;
9990 static enum ndr_err_code
ndr_pull_samr_QueryUserInfo2(struct ndr_pull
*ndr
, int flags
, struct samr_QueryUserInfo2
*r
)
9993 TALLOC_CTX
*_mem_save_user_handle_0
;
9994 TALLOC_CTX
*_mem_save_info_0
;
9995 TALLOC_CTX
*_mem_save_info_1
;
9996 if (flags
& NDR_IN
) {
9997 ZERO_STRUCT(r
->out
);
9999 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10000 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
10002 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10003 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
10004 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
10005 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10006 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
10007 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10008 ZERO_STRUCTP(r
->out
.info
);
10010 if (flags
& NDR_OUT
) {
10011 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10012 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10014 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10015 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10016 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10018 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10020 *r
->out
.info
= NULL
;
10022 if (*r
->out
.info
) {
10023 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10024 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10025 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10026 NDR_CHECK(ndr_pull_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10027 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10029 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10030 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10032 return NDR_ERR_SUCCESS
;
10035 _PUBLIC_
void ndr_print_samr_QueryUserInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryUserInfo2
*r
)
10037 ndr_print_struct(ndr
, name
, "samr_QueryUserInfo2");
10039 if (flags
& NDR_SET_VALUES
) {
10040 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10042 if (flags
& NDR_IN
) {
10043 ndr_print_struct(ndr
, "in", "samr_QueryUserInfo2");
10045 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
10047 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
10049 ndr_print_samr_UserInfoLevel(ndr
, "level", r
->in
.level
);
10052 if (flags
& NDR_OUT
) {
10053 ndr_print_struct(ndr
, "out", "samr_QueryUserInfo2");
10055 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10057 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10059 if (*r
->out
.info
) {
10060 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10061 ndr_print_samr_UserInfo(ndr
, "info", *r
->out
.info
);
10065 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10071 static enum ndr_err_code
ndr_push_samr_QueryDisplayInfo2(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDisplayInfo2
*r
)
10073 if (flags
& NDR_IN
) {
10074 if (r
->in
.domain_handle
== NULL
) {
10075 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10077 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10078 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10079 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.start_idx
));
10080 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_entries
));
10081 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
10083 if (flags
& NDR_OUT
) {
10084 if (r
->out
.total_size
== NULL
) {
10085 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10087 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total_size
));
10088 if (r
->out
.returned_size
== NULL
) {
10089 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10091 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.returned_size
));
10092 if (r
->out
.info
== NULL
) {
10093 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10095 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10096 NDR_CHECK(ndr_push_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10097 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10099 return NDR_ERR_SUCCESS
;
10102 static enum ndr_err_code
ndr_pull_samr_QueryDisplayInfo2(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDisplayInfo2
*r
)
10104 TALLOC_CTX
*_mem_save_domain_handle_0
;
10105 TALLOC_CTX
*_mem_save_total_size_0
;
10106 TALLOC_CTX
*_mem_save_returned_size_0
;
10107 TALLOC_CTX
*_mem_save_info_0
;
10108 if (flags
& NDR_IN
) {
10109 ZERO_STRUCT(r
->out
);
10111 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10112 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
10114 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10115 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
10116 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10117 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10118 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10119 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.start_idx
));
10120 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_entries
));
10121 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
10122 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
10123 ZERO_STRUCTP(r
->out
.total_size
);
10124 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
10125 ZERO_STRUCTP(r
->out
.returned_size
);
10126 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10127 ZERO_STRUCTP(r
->out
.info
);
10129 if (flags
& NDR_OUT
) {
10130 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10131 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
10133 _mem_save_total_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10134 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total_size
, LIBNDR_FLAG_REF_ALLOC
);
10135 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total_size
));
10136 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_size_0
, LIBNDR_FLAG_REF_ALLOC
);
10137 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10138 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
10140 _mem_save_returned_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10141 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_size
, LIBNDR_FLAG_REF_ALLOC
);
10142 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.returned_size
));
10143 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_size_0
, LIBNDR_FLAG_REF_ALLOC
);
10144 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10145 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10147 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10148 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10149 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10150 NDR_CHECK(ndr_pull_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10151 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10152 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10154 return NDR_ERR_SUCCESS
;
10157 _PUBLIC_
void ndr_print_samr_QueryDisplayInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDisplayInfo2
*r
)
10159 ndr_print_struct(ndr
, name
, "samr_QueryDisplayInfo2");
10161 if (flags
& NDR_SET_VALUES
) {
10162 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10164 if (flags
& NDR_IN
) {
10165 ndr_print_struct(ndr
, "in", "samr_QueryDisplayInfo2");
10167 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10169 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10171 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10172 ndr_print_uint32(ndr
, "start_idx", r
->in
.start_idx
);
10173 ndr_print_uint32(ndr
, "max_entries", r
->in
.max_entries
);
10174 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
10177 if (flags
& NDR_OUT
) {
10178 ndr_print_struct(ndr
, "out", "samr_QueryDisplayInfo2");
10180 ndr_print_ptr(ndr
, "total_size", r
->out
.total_size
);
10182 ndr_print_uint32(ndr
, "total_size", *r
->out
.total_size
);
10184 ndr_print_ptr(ndr
, "returned_size", r
->out
.returned_size
);
10186 ndr_print_uint32(ndr
, "returned_size", *r
->out
.returned_size
);
10188 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10190 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
10191 ndr_print_samr_DispInfo(ndr
, "info", r
->out
.info
);
10193 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10199 static enum ndr_err_code
ndr_push_samr_GetDisplayEnumerationIndex2(struct ndr_push
*ndr
, int flags
, const struct samr_GetDisplayEnumerationIndex2
*r
)
10201 if (flags
& NDR_IN
) {
10202 if (r
->in
.domain_handle
== NULL
) {
10203 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10205 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10206 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10207 if (r
->in
.name
== NULL
) {
10208 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10210 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
10212 if (flags
& NDR_OUT
) {
10213 if (r
->out
.idx
== NULL
) {
10214 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10216 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.idx
));
10217 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10219 return NDR_ERR_SUCCESS
;
10222 static enum ndr_err_code
ndr_pull_samr_GetDisplayEnumerationIndex2(struct ndr_pull
*ndr
, int flags
, struct samr_GetDisplayEnumerationIndex2
*r
)
10224 TALLOC_CTX
*_mem_save_domain_handle_0
;
10225 TALLOC_CTX
*_mem_save_name_0
;
10226 TALLOC_CTX
*_mem_save_idx_0
;
10227 if (flags
& NDR_IN
) {
10228 ZERO_STRUCT(r
->out
);
10230 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10231 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
10233 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10234 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
10235 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10236 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10237 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10238 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10239 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
10241 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10242 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
10243 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
10244 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
10245 NDR_PULL_ALLOC(ndr
, r
->out
.idx
);
10246 ZERO_STRUCTP(r
->out
.idx
);
10248 if (flags
& NDR_OUT
) {
10249 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10250 NDR_PULL_ALLOC(ndr
, r
->out
.idx
);
10252 _mem_save_idx_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10253 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.idx
, LIBNDR_FLAG_REF_ALLOC
);
10254 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.idx
));
10255 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_idx_0
, LIBNDR_FLAG_REF_ALLOC
);
10256 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10258 return NDR_ERR_SUCCESS
;
10261 _PUBLIC_
void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetDisplayEnumerationIndex2
*r
)
10263 ndr_print_struct(ndr
, name
, "samr_GetDisplayEnumerationIndex2");
10265 if (flags
& NDR_SET_VALUES
) {
10266 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10268 if (flags
& NDR_IN
) {
10269 ndr_print_struct(ndr
, "in", "samr_GetDisplayEnumerationIndex2");
10271 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10273 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10275 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10276 ndr_print_ptr(ndr
, "name", r
->in
.name
);
10278 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
10282 if (flags
& NDR_OUT
) {
10283 ndr_print_struct(ndr
, "out", "samr_GetDisplayEnumerationIndex2");
10285 ndr_print_ptr(ndr
, "idx", r
->out
.idx
);
10287 ndr_print_uint32(ndr
, "idx", *r
->out
.idx
);
10289 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10295 static enum ndr_err_code
ndr_push_samr_CreateUser2(struct ndr_push
*ndr
, int flags
, const struct samr_CreateUser2
*r
)
10297 if (flags
& NDR_IN
) {
10298 if (r
->in
.domain_handle
== NULL
) {
10299 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10301 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10302 if (r
->in
.account_name
== NULL
) {
10303 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10305 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account_name
));
10306 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->in
.acct_flags
));
10307 NDR_CHECK(ndr_push_samr_UserAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10309 if (flags
& NDR_OUT
) {
10310 if (r
->out
.user_handle
== NULL
) {
10311 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10313 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
10314 if (r
->out
.access_granted
== NULL
) {
10315 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10317 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.access_granted
));
10318 if (r
->out
.rid
== NULL
) {
10319 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10321 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
10322 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10324 return NDR_ERR_SUCCESS
;
10327 static enum ndr_err_code
ndr_pull_samr_CreateUser2(struct ndr_pull
*ndr
, int flags
, struct samr_CreateUser2
*r
)
10329 TALLOC_CTX
*_mem_save_domain_handle_0
;
10330 TALLOC_CTX
*_mem_save_account_name_0
;
10331 TALLOC_CTX
*_mem_save_user_handle_0
;
10332 TALLOC_CTX
*_mem_save_access_granted_0
;
10333 TALLOC_CTX
*_mem_save_rid_0
;
10334 if (flags
& NDR_IN
) {
10335 ZERO_STRUCT(r
->out
);
10337 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10338 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
10340 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10341 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
10342 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10343 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10344 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10345 NDR_PULL_ALLOC(ndr
, r
->in
.account_name
);
10347 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10348 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
10349 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account_name
));
10350 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
10351 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->in
.acct_flags
));
10352 NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10353 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
10354 ZERO_STRUCTP(r
->out
.user_handle
);
10355 NDR_PULL_ALLOC(ndr
, r
->out
.access_granted
);
10356 ZERO_STRUCTP(r
->out
.access_granted
);
10357 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
10358 ZERO_STRUCTP(r
->out
.rid
);
10360 if (flags
& NDR_OUT
) {
10361 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10362 NDR_PULL_ALLOC(ndr
, r
->out
.user_handle
);
10364 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10365 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
10366 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.user_handle
));
10367 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10368 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10369 NDR_PULL_ALLOC(ndr
, r
->out
.access_granted
);
10371 _mem_save_access_granted_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10372 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.access_granted
, LIBNDR_FLAG_REF_ALLOC
);
10373 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.access_granted
));
10374 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_access_granted_0
, LIBNDR_FLAG_REF_ALLOC
);
10375 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10376 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
10378 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10379 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
10380 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
10381 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
10382 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10384 return NDR_ERR_SUCCESS
;
10387 _PUBLIC_
void ndr_print_samr_CreateUser2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_CreateUser2
*r
)
10389 ndr_print_struct(ndr
, name
, "samr_CreateUser2");
10391 if (flags
& NDR_SET_VALUES
) {
10392 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10394 if (flags
& NDR_IN
) {
10395 ndr_print_struct(ndr
, "in", "samr_CreateUser2");
10397 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10399 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10401 ndr_print_ptr(ndr
, "account_name", r
->in
.account_name
);
10403 ndr_print_lsa_String(ndr
, "account_name", r
->in
.account_name
);
10405 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->in
.acct_flags
);
10406 ndr_print_samr_UserAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
10409 if (flags
& NDR_OUT
) {
10410 ndr_print_struct(ndr
, "out", "samr_CreateUser2");
10412 ndr_print_ptr(ndr
, "user_handle", r
->out
.user_handle
);
10414 ndr_print_policy_handle(ndr
, "user_handle", r
->out
.user_handle
);
10416 ndr_print_ptr(ndr
, "access_granted", r
->out
.access_granted
);
10418 ndr_print_uint32(ndr
, "access_granted", *r
->out
.access_granted
);
10420 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
10422 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
10424 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10430 static enum ndr_err_code
ndr_push_samr_QueryDisplayInfo3(struct ndr_push
*ndr
, int flags
, const struct samr_QueryDisplayInfo3
*r
)
10432 if (flags
& NDR_IN
) {
10433 if (r
->in
.domain_handle
== NULL
) {
10434 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10436 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10437 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10438 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.start_idx
));
10439 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_entries
));
10440 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
10442 if (flags
& NDR_OUT
) {
10443 if (r
->out
.total_size
== NULL
) {
10444 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10446 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total_size
));
10447 if (r
->out
.returned_size
== NULL
) {
10448 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10450 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.returned_size
));
10451 if (r
->out
.info
== NULL
) {
10452 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10454 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10455 NDR_CHECK(ndr_push_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10456 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10458 return NDR_ERR_SUCCESS
;
10461 static enum ndr_err_code
ndr_pull_samr_QueryDisplayInfo3(struct ndr_pull
*ndr
, int flags
, struct samr_QueryDisplayInfo3
*r
)
10463 TALLOC_CTX
*_mem_save_domain_handle_0
;
10464 TALLOC_CTX
*_mem_save_total_size_0
;
10465 TALLOC_CTX
*_mem_save_returned_size_0
;
10466 TALLOC_CTX
*_mem_save_info_0
;
10467 if (flags
& NDR_IN
) {
10468 ZERO_STRUCT(r
->out
);
10470 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10471 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
10473 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10474 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
10475 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
10476 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10477 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10478 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.start_idx
));
10479 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_entries
));
10480 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
10481 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
10482 ZERO_STRUCTP(r
->out
.total_size
);
10483 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
10484 ZERO_STRUCTP(r
->out
.returned_size
);
10485 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10486 ZERO_STRUCTP(r
->out
.info
);
10488 if (flags
& NDR_OUT
) {
10489 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10490 NDR_PULL_ALLOC(ndr
, r
->out
.total_size
);
10492 _mem_save_total_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10493 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total_size
, LIBNDR_FLAG_REF_ALLOC
);
10494 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total_size
));
10495 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_size_0
, LIBNDR_FLAG_REF_ALLOC
);
10496 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10497 NDR_PULL_ALLOC(ndr
, r
->out
.returned_size
);
10499 _mem_save_returned_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10500 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_size
, LIBNDR_FLAG_REF_ALLOC
);
10501 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.returned_size
));
10502 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_size_0
, LIBNDR_FLAG_REF_ALLOC
);
10503 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10504 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10506 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10507 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10508 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10509 NDR_CHECK(ndr_pull_samr_DispInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10510 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10511 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10513 return NDR_ERR_SUCCESS
;
10516 _PUBLIC_
void ndr_print_samr_QueryDisplayInfo3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_QueryDisplayInfo3
*r
)
10518 ndr_print_struct(ndr
, name
, "samr_QueryDisplayInfo3");
10520 if (flags
& NDR_SET_VALUES
) {
10521 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10523 if (flags
& NDR_IN
) {
10524 ndr_print_struct(ndr
, "in", "samr_QueryDisplayInfo3");
10526 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
10528 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
10530 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10531 ndr_print_uint32(ndr
, "start_idx", r
->in
.start_idx
);
10532 ndr_print_uint32(ndr
, "max_entries", r
->in
.max_entries
);
10533 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
10536 if (flags
& NDR_OUT
) {
10537 ndr_print_struct(ndr
, "out", "samr_QueryDisplayInfo3");
10539 ndr_print_ptr(ndr
, "total_size", r
->out
.total_size
);
10541 ndr_print_uint32(ndr
, "total_size", *r
->out
.total_size
);
10543 ndr_print_ptr(ndr
, "returned_size", r
->out
.returned_size
);
10545 ndr_print_uint32(ndr
, "returned_size", *r
->out
.returned_size
);
10547 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10549 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
10550 ndr_print_samr_DispInfo(ndr
, "info", r
->out
.info
);
10552 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10558 static enum ndr_err_code
ndr_push_samr_AddMultipleMembersToAlias(struct ndr_push
*ndr
, int flags
, const struct samr_AddMultipleMembersToAlias
*r
)
10560 if (flags
& NDR_IN
) {
10561 if (r
->in
.alias_handle
== NULL
) {
10562 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10564 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
10565 if (r
->in
.sids
== NULL
) {
10566 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10568 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10570 if (flags
& NDR_OUT
) {
10571 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10573 return NDR_ERR_SUCCESS
;
10576 static enum ndr_err_code
ndr_pull_samr_AddMultipleMembersToAlias(struct ndr_pull
*ndr
, int flags
, struct samr_AddMultipleMembersToAlias
*r
)
10578 TALLOC_CTX
*_mem_save_alias_handle_0
;
10579 TALLOC_CTX
*_mem_save_sids_0
;
10580 if (flags
& NDR_IN
) {
10581 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10582 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
10584 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10585 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
10586 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
10587 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10588 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10589 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
10591 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10592 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
10593 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10594 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
10596 if (flags
& NDR_OUT
) {
10597 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10599 return NDR_ERR_SUCCESS
;
10602 _PUBLIC_
void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_AddMultipleMembersToAlias
*r
)
10604 ndr_print_struct(ndr
, name
, "samr_AddMultipleMembersToAlias");
10606 if (flags
& NDR_SET_VALUES
) {
10607 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10609 if (flags
& NDR_IN
) {
10610 ndr_print_struct(ndr
, "in", "samr_AddMultipleMembersToAlias");
10612 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
10614 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
10616 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
10618 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
10622 if (flags
& NDR_OUT
) {
10623 ndr_print_struct(ndr
, "out", "samr_AddMultipleMembersToAlias");
10625 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10631 static enum ndr_err_code
ndr_push_samr_RemoveMultipleMembersFromAlias(struct ndr_push
*ndr
, int flags
, const struct samr_RemoveMultipleMembersFromAlias
*r
)
10633 if (flags
& NDR_IN
) {
10634 if (r
->in
.alias_handle
== NULL
) {
10635 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10637 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
10638 if (r
->in
.sids
== NULL
) {
10639 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10641 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10643 if (flags
& NDR_OUT
) {
10644 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10646 return NDR_ERR_SUCCESS
;
10649 static enum ndr_err_code
ndr_pull_samr_RemoveMultipleMembersFromAlias(struct ndr_pull
*ndr
, int flags
, struct samr_RemoveMultipleMembersFromAlias
*r
)
10651 TALLOC_CTX
*_mem_save_alias_handle_0
;
10652 TALLOC_CTX
*_mem_save_sids_0
;
10653 if (flags
& NDR_IN
) {
10654 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10655 NDR_PULL_ALLOC(ndr
, r
->in
.alias_handle
);
10657 _mem_save_alias_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10658 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.alias_handle
, LIBNDR_FLAG_REF_ALLOC
);
10659 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.alias_handle
));
10660 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10661 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10662 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
10664 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10665 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
10666 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10667 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
10669 if (flags
& NDR_OUT
) {
10670 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10672 return NDR_ERR_SUCCESS
;
10675 _PUBLIC_
void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_RemoveMultipleMembersFromAlias
*r
)
10677 ndr_print_struct(ndr
, name
, "samr_RemoveMultipleMembersFromAlias");
10679 if (flags
& NDR_SET_VALUES
) {
10680 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10682 if (flags
& NDR_IN
) {
10683 ndr_print_struct(ndr
, "in", "samr_RemoveMultipleMembersFromAlias");
10685 ndr_print_ptr(ndr
, "alias_handle", r
->in
.alias_handle
);
10687 ndr_print_policy_handle(ndr
, "alias_handle", r
->in
.alias_handle
);
10689 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
10691 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
10695 if (flags
& NDR_OUT
) {
10696 ndr_print_struct(ndr
, "out", "samr_RemoveMultipleMembersFromAlias");
10698 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10704 static enum ndr_err_code
ndr_push_samr_OemChangePasswordUser2(struct ndr_push
*ndr
, int flags
, const struct samr_OemChangePasswordUser2
*r
)
10706 if (flags
& NDR_IN
) {
10707 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
10708 if (r
->in
.server
) {
10709 NDR_CHECK(ndr_push_lsa_AsciiString(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
10711 if (r
->in
.account
== NULL
) {
10712 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10714 NDR_CHECK(ndr_push_lsa_AsciiString(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
10715 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password
));
10716 if (r
->in
.password
) {
10717 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.password
));
10719 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.hash
));
10721 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.hash
));
10724 if (flags
& NDR_OUT
) {
10725 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10727 return NDR_ERR_SUCCESS
;
10730 static enum ndr_err_code
ndr_pull_samr_OemChangePasswordUser2(struct ndr_pull
*ndr
, int flags
, struct samr_OemChangePasswordUser2
*r
)
10732 uint32_t _ptr_server
;
10733 uint32_t _ptr_password
;
10734 uint32_t _ptr_hash
;
10735 TALLOC_CTX
*_mem_save_server_0
;
10736 TALLOC_CTX
*_mem_save_account_0
;
10737 TALLOC_CTX
*_mem_save_password_0
;
10738 TALLOC_CTX
*_mem_save_hash_0
;
10739 if (flags
& NDR_IN
) {
10740 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
10742 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
10744 r
->in
.server
= NULL
;
10746 if (r
->in
.server
) {
10747 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10748 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
10749 NDR_CHECK(ndr_pull_lsa_AsciiString(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
10750 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
10752 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10753 NDR_PULL_ALLOC(ndr
, r
->in
.account
);
10755 _mem_save_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10756 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account
, LIBNDR_FLAG_REF_ALLOC
);
10757 NDR_CHECK(ndr_pull_lsa_AsciiString(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
10758 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_0
, LIBNDR_FLAG_REF_ALLOC
);
10759 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
10760 if (_ptr_password
) {
10761 NDR_PULL_ALLOC(ndr
, r
->in
.password
);
10763 r
->in
.password
= NULL
;
10765 if (r
->in
.password
) {
10766 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10767 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password
, 0);
10768 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.password
));
10769 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
10771 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hash
));
10773 NDR_PULL_ALLOC(ndr
, r
->in
.hash
);
10778 _mem_save_hash_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10779 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.hash
, 0);
10780 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.hash
));
10781 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hash_0
, 0);
10784 if (flags
& NDR_OUT
) {
10785 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10787 return NDR_ERR_SUCCESS
;
10790 _PUBLIC_
void ndr_print_samr_OemChangePasswordUser2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_OemChangePasswordUser2
*r
)
10792 ndr_print_struct(ndr
, name
, "samr_OemChangePasswordUser2");
10794 if (flags
& NDR_SET_VALUES
) {
10795 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10797 if (flags
& NDR_IN
) {
10798 ndr_print_struct(ndr
, "in", "samr_OemChangePasswordUser2");
10800 ndr_print_ptr(ndr
, "server", r
->in
.server
);
10802 if (r
->in
.server
) {
10803 ndr_print_lsa_AsciiString(ndr
, "server", r
->in
.server
);
10806 ndr_print_ptr(ndr
, "account", r
->in
.account
);
10808 ndr_print_lsa_AsciiString(ndr
, "account", r
->in
.account
);
10810 ndr_print_ptr(ndr
, "password", r
->in
.password
);
10812 if (r
->in
.password
) {
10813 ndr_print_samr_CryptPassword(ndr
, "password", r
->in
.password
);
10816 ndr_print_ptr(ndr
, "hash", r
->in
.hash
);
10819 ndr_print_samr_Password(ndr
, "hash", r
->in
.hash
);
10824 if (flags
& NDR_OUT
) {
10825 ndr_print_struct(ndr
, "out", "samr_OemChangePasswordUser2");
10827 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10833 static enum ndr_err_code
ndr_push_samr_ChangePasswordUser2(struct ndr_push
*ndr
, int flags
, const struct samr_ChangePasswordUser2
*r
)
10835 if (flags
& NDR_IN
) {
10836 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
10837 if (r
->in
.server
) {
10838 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
10840 if (r
->in
.account
== NULL
) {
10841 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10843 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
10844 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_password
));
10845 if (r
->in
.nt_password
) {
10846 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.nt_password
));
10848 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_verifier
));
10849 if (r
->in
.nt_verifier
) {
10850 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_verifier
));
10852 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.lm_change
));
10853 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_password
));
10854 if (r
->in
.lm_password
) {
10855 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.lm_password
));
10857 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_verifier
));
10858 if (r
->in
.lm_verifier
) {
10859 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_verifier
));
10862 if (flags
& NDR_OUT
) {
10863 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10865 return NDR_ERR_SUCCESS
;
10868 static enum ndr_err_code
ndr_pull_samr_ChangePasswordUser2(struct ndr_pull
*ndr
, int flags
, struct samr_ChangePasswordUser2
*r
)
10870 uint32_t _ptr_server
;
10871 uint32_t _ptr_nt_password
;
10872 uint32_t _ptr_nt_verifier
;
10873 uint32_t _ptr_lm_password
;
10874 uint32_t _ptr_lm_verifier
;
10875 TALLOC_CTX
*_mem_save_server_0
;
10876 TALLOC_CTX
*_mem_save_account_0
;
10877 TALLOC_CTX
*_mem_save_nt_password_0
;
10878 TALLOC_CTX
*_mem_save_nt_verifier_0
;
10879 TALLOC_CTX
*_mem_save_lm_password_0
;
10880 TALLOC_CTX
*_mem_save_lm_verifier_0
;
10881 if (flags
& NDR_IN
) {
10882 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
10884 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
10886 r
->in
.server
= NULL
;
10888 if (r
->in
.server
) {
10889 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10890 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
10891 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
10892 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
10894 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10895 NDR_PULL_ALLOC(ndr
, r
->in
.account
);
10897 _mem_save_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10898 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account
, LIBNDR_FLAG_REF_ALLOC
);
10899 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
10900 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_0
, LIBNDR_FLAG_REF_ALLOC
);
10901 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_password
));
10902 if (_ptr_nt_password
) {
10903 NDR_PULL_ALLOC(ndr
, r
->in
.nt_password
);
10905 r
->in
.nt_password
= NULL
;
10907 if (r
->in
.nt_password
) {
10908 _mem_save_nt_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10909 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_password
, 0);
10910 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.nt_password
));
10911 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_password_0
, 0);
10913 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_verifier
));
10914 if (_ptr_nt_verifier
) {
10915 NDR_PULL_ALLOC(ndr
, r
->in
.nt_verifier
);
10917 r
->in
.nt_verifier
= NULL
;
10919 if (r
->in
.nt_verifier
) {
10920 _mem_save_nt_verifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10921 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_verifier
, 0);
10922 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_verifier
));
10923 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_verifier_0
, 0);
10925 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.lm_change
));
10926 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_password
));
10927 if (_ptr_lm_password
) {
10928 NDR_PULL_ALLOC(ndr
, r
->in
.lm_password
);
10930 r
->in
.lm_password
= NULL
;
10932 if (r
->in
.lm_password
) {
10933 _mem_save_lm_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10934 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_password
, 0);
10935 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.lm_password
));
10936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_password_0
, 0);
10938 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_verifier
));
10939 if (_ptr_lm_verifier
) {
10940 NDR_PULL_ALLOC(ndr
, r
->in
.lm_verifier
);
10942 r
->in
.lm_verifier
= NULL
;
10944 if (r
->in
.lm_verifier
) {
10945 _mem_save_lm_verifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10946 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_verifier
, 0);
10947 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_verifier
));
10948 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_verifier_0
, 0);
10951 if (flags
& NDR_OUT
) {
10952 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10954 return NDR_ERR_SUCCESS
;
10957 _PUBLIC_
void ndr_print_samr_ChangePasswordUser2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_ChangePasswordUser2
*r
)
10959 ndr_print_struct(ndr
, name
, "samr_ChangePasswordUser2");
10961 if (flags
& NDR_SET_VALUES
) {
10962 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10964 if (flags
& NDR_IN
) {
10965 ndr_print_struct(ndr
, "in", "samr_ChangePasswordUser2");
10967 ndr_print_ptr(ndr
, "server", r
->in
.server
);
10969 if (r
->in
.server
) {
10970 ndr_print_lsa_String(ndr
, "server", r
->in
.server
);
10973 ndr_print_ptr(ndr
, "account", r
->in
.account
);
10975 ndr_print_lsa_String(ndr
, "account", r
->in
.account
);
10977 ndr_print_ptr(ndr
, "nt_password", r
->in
.nt_password
);
10979 if (r
->in
.nt_password
) {
10980 ndr_print_samr_CryptPassword(ndr
, "nt_password", r
->in
.nt_password
);
10983 ndr_print_ptr(ndr
, "nt_verifier", r
->in
.nt_verifier
);
10985 if (r
->in
.nt_verifier
) {
10986 ndr_print_samr_Password(ndr
, "nt_verifier", r
->in
.nt_verifier
);
10989 ndr_print_uint8(ndr
, "lm_change", r
->in
.lm_change
);
10990 ndr_print_ptr(ndr
, "lm_password", r
->in
.lm_password
);
10992 if (r
->in
.lm_password
) {
10993 ndr_print_samr_CryptPassword(ndr
, "lm_password", r
->in
.lm_password
);
10996 ndr_print_ptr(ndr
, "lm_verifier", r
->in
.lm_verifier
);
10998 if (r
->in
.lm_verifier
) {
10999 ndr_print_samr_Password(ndr
, "lm_verifier", r
->in
.lm_verifier
);
11004 if (flags
& NDR_OUT
) {
11005 ndr_print_struct(ndr
, "out", "samr_ChangePasswordUser2");
11007 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11013 static enum ndr_err_code
ndr_push_samr_GetDomPwInfo(struct ndr_push
*ndr
, int flags
, const struct samr_GetDomPwInfo
*r
)
11015 if (flags
& NDR_IN
) {
11016 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_name
));
11017 if (r
->in
.domain_name
) {
11018 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_name
));
11021 if (flags
& NDR_OUT
) {
11022 if (r
->out
.info
== NULL
) {
11023 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11025 NDR_CHECK(ndr_push_samr_PwInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
11026 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11028 return NDR_ERR_SUCCESS
;
11031 static enum ndr_err_code
ndr_pull_samr_GetDomPwInfo(struct ndr_pull
*ndr
, int flags
, struct samr_GetDomPwInfo
*r
)
11033 uint32_t _ptr_domain_name
;
11034 TALLOC_CTX
*_mem_save_domain_name_0
;
11035 TALLOC_CTX
*_mem_save_info_0
;
11036 if (flags
& NDR_IN
) {
11037 ZERO_STRUCT(r
->out
);
11039 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
11040 if (_ptr_domain_name
) {
11041 NDR_PULL_ALLOC(ndr
, r
->in
.domain_name
);
11043 r
->in
.domain_name
= NULL
;
11045 if (r
->in
.domain_name
) {
11046 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11047 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_name
, 0);
11048 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_name
));
11049 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
11051 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
11052 ZERO_STRUCTP(r
->out
.info
);
11054 if (flags
& NDR_OUT
) {
11055 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11056 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
11058 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11059 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
11060 NDR_CHECK(ndr_pull_samr_PwInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
11061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11062 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11064 return NDR_ERR_SUCCESS
;
11067 _PUBLIC_
void ndr_print_samr_GetDomPwInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetDomPwInfo
*r
)
11069 ndr_print_struct(ndr
, name
, "samr_GetDomPwInfo");
11071 if (flags
& NDR_SET_VALUES
) {
11072 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11074 if (flags
& NDR_IN
) {
11075 ndr_print_struct(ndr
, "in", "samr_GetDomPwInfo");
11077 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
11079 if (r
->in
.domain_name
) {
11080 ndr_print_lsa_String(ndr
, "domain_name", r
->in
.domain_name
);
11085 if (flags
& NDR_OUT
) {
11086 ndr_print_struct(ndr
, "out", "samr_GetDomPwInfo");
11088 ndr_print_ptr(ndr
, "info", r
->out
.info
);
11090 ndr_print_samr_PwInfo(ndr
, "info", r
->out
.info
);
11092 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11098 static enum ndr_err_code
ndr_push_samr_Connect2(struct ndr_push
*ndr
, int flags
, const struct samr_Connect2
*r
)
11100 if (flags
& NDR_IN
) {
11101 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
11102 if (r
->in
.system_name
) {
11103 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11104 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11106 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
));
11108 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11110 if (flags
& NDR_OUT
) {
11111 if (r
->out
.connect_handle
== NULL
) {
11112 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11114 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11115 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11117 return NDR_ERR_SUCCESS
;
11120 static enum ndr_err_code
ndr_pull_samr_Connect2(struct ndr_pull
*ndr
, int flags
, struct samr_Connect2
*r
)
11122 uint32_t _ptr_system_name
;
11123 TALLOC_CTX
*_mem_save_system_name_0
;
11124 TALLOC_CTX
*_mem_save_connect_handle_0
;
11125 if (flags
& NDR_IN
) {
11126 ZERO_STRUCT(r
->out
);
11128 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
11129 if (_ptr_system_name
) {
11130 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
11132 r
->in
.system_name
= NULL
;
11134 if (r
->in
.system_name
) {
11135 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11136 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
11137 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
11138 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
11139 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
11140 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
));
11142 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
11143 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
));
11144 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
11146 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11147 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11148 ZERO_STRUCTP(r
->out
.connect_handle
);
11150 if (flags
& NDR_OUT
) {
11151 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11152 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11154 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11155 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
11156 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11157 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11158 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11160 return NDR_ERR_SUCCESS
;
11163 _PUBLIC_
void ndr_print_samr_Connect2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect2
*r
)
11165 ndr_print_struct(ndr
, name
, "samr_Connect2");
11167 if (flags
& NDR_SET_VALUES
) {
11168 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11170 if (flags
& NDR_IN
) {
11171 ndr_print_struct(ndr
, "in", "samr_Connect2");
11173 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
11175 if (r
->in
.system_name
) {
11176 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
11179 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
11182 if (flags
& NDR_OUT
) {
11183 ndr_print_struct(ndr
, "out", "samr_Connect2");
11185 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
11187 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
11189 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11195 _PUBLIC_
enum ndr_err_code
ndr_push_samr_SetUserInfo2(struct ndr_push
*ndr
, int flags
, const struct samr_SetUserInfo2
*r
)
11197 if (flags
& NDR_IN
) {
11198 if (r
->in
.user_handle
== NULL
) {
11199 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11201 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
11202 NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
11203 if (r
->in
.info
== NULL
) {
11204 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11206 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
11207 NDR_CHECK(ndr_push_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11209 if (flags
& NDR_OUT
) {
11210 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11212 return NDR_ERR_SUCCESS
;
11215 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_SetUserInfo2(struct ndr_pull
*ndr
, int flags
, struct samr_SetUserInfo2
*r
)
11217 TALLOC_CTX
*_mem_save_user_handle_0
;
11218 TALLOC_CTX
*_mem_save_info_0
;
11219 if (flags
& NDR_IN
) {
11220 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11221 NDR_PULL_ALLOC(ndr
, r
->in
.user_handle
);
11223 _mem_save_user_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11224 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_handle
, LIBNDR_FLAG_REF_ALLOC
);
11225 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.user_handle
));
11226 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11227 NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11228 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11229 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
11231 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11232 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
11233 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
11234 NDR_CHECK(ndr_pull_samr_UserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11235 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11237 if (flags
& NDR_OUT
) {
11238 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11240 return NDR_ERR_SUCCESS
;
11243 _PUBLIC_
void ndr_print_samr_SetUserInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetUserInfo2
*r
)
11245 ndr_print_struct(ndr
, name
, "samr_SetUserInfo2");
11247 if (flags
& NDR_SET_VALUES
) {
11248 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11250 if (flags
& NDR_IN
) {
11251 ndr_print_struct(ndr
, "in", "samr_SetUserInfo2");
11253 ndr_print_ptr(ndr
, "user_handle", r
->in
.user_handle
);
11255 ndr_print_policy_handle(ndr
, "user_handle", r
->in
.user_handle
);
11257 ndr_print_samr_UserInfoLevel(ndr
, "level", r
->in
.level
);
11258 ndr_print_ptr(ndr
, "info", r
->in
.info
);
11260 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
11261 ndr_print_samr_UserInfo(ndr
, "info", r
->in
.info
);
11265 if (flags
& NDR_OUT
) {
11266 ndr_print_struct(ndr
, "out", "samr_SetUserInfo2");
11268 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11274 static enum ndr_err_code
ndr_push_samr_SetBootKeyInformation(struct ndr_push
*ndr
, int flags
, const struct samr_SetBootKeyInformation
*r
)
11276 if (flags
& NDR_IN
) {
11277 if (r
->in
.connect_handle
== NULL
) {
11278 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11280 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
11281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
11282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
11283 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown3
));
11285 if (flags
& NDR_OUT
) {
11286 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11288 return NDR_ERR_SUCCESS
;
11291 static enum ndr_err_code
ndr_pull_samr_SetBootKeyInformation(struct ndr_pull
*ndr
, int flags
, struct samr_SetBootKeyInformation
*r
)
11293 TALLOC_CTX
*_mem_save_connect_handle_0
;
11294 if (flags
& NDR_IN
) {
11295 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11296 NDR_PULL_ALLOC(ndr
, r
->in
.connect_handle
);
11298 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11299 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
11300 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.connect_handle
));
11301 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11302 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
11303 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
11304 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown3
));
11306 if (flags
& NDR_OUT
) {
11307 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11309 return NDR_ERR_SUCCESS
;
11312 _PUBLIC_
void ndr_print_samr_SetBootKeyInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetBootKeyInformation
*r
)
11314 ndr_print_struct(ndr
, name
, "samr_SetBootKeyInformation");
11316 if (flags
& NDR_SET_VALUES
) {
11317 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11319 if (flags
& NDR_IN
) {
11320 ndr_print_struct(ndr
, "in", "samr_SetBootKeyInformation");
11322 ndr_print_ptr(ndr
, "connect_handle", r
->in
.connect_handle
);
11324 ndr_print_policy_handle(ndr
, "connect_handle", r
->in
.connect_handle
);
11326 ndr_print_uint32(ndr
, "unknown1", r
->in
.unknown1
);
11327 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
11328 ndr_print_uint32(ndr
, "unknown3", r
->in
.unknown3
);
11331 if (flags
& NDR_OUT
) {
11332 ndr_print_struct(ndr
, "out", "samr_SetBootKeyInformation");
11334 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11340 static enum ndr_err_code
ndr_push_samr_GetBootKeyInformation(struct ndr_push
*ndr
, int flags
, const struct samr_GetBootKeyInformation
*r
)
11342 if (flags
& NDR_IN
) {
11343 if (r
->in
.domain_handle
== NULL
) {
11344 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11346 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
11348 if (flags
& NDR_OUT
) {
11349 if (r
->out
.unknown
== NULL
) {
11350 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11352 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.unknown
));
11353 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11355 return NDR_ERR_SUCCESS
;
11358 static enum ndr_err_code
ndr_pull_samr_GetBootKeyInformation(struct ndr_pull
*ndr
, int flags
, struct samr_GetBootKeyInformation
*r
)
11360 TALLOC_CTX
*_mem_save_domain_handle_0
;
11361 TALLOC_CTX
*_mem_save_unknown_0
;
11362 if (flags
& NDR_IN
) {
11363 ZERO_STRUCT(r
->out
);
11365 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11366 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
11368 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11369 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
11370 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
11371 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11372 NDR_PULL_ALLOC(ndr
, r
->out
.unknown
);
11373 ZERO_STRUCTP(r
->out
.unknown
);
11375 if (flags
& NDR_OUT
) {
11376 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11377 NDR_PULL_ALLOC(ndr
, r
->out
.unknown
);
11379 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11380 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.unknown
, LIBNDR_FLAG_REF_ALLOC
);
11381 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.unknown
));
11382 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, LIBNDR_FLAG_REF_ALLOC
);
11383 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11385 return NDR_ERR_SUCCESS
;
11388 _PUBLIC_
void ndr_print_samr_GetBootKeyInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_GetBootKeyInformation
*r
)
11390 ndr_print_struct(ndr
, name
, "samr_GetBootKeyInformation");
11392 if (flags
& NDR_SET_VALUES
) {
11393 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11395 if (flags
& NDR_IN
) {
11396 ndr_print_struct(ndr
, "in", "samr_GetBootKeyInformation");
11398 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
11400 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
11404 if (flags
& NDR_OUT
) {
11405 ndr_print_struct(ndr
, "out", "samr_GetBootKeyInformation");
11407 ndr_print_ptr(ndr
, "unknown", r
->out
.unknown
);
11409 ndr_print_uint32(ndr
, "unknown", *r
->out
.unknown
);
11411 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11417 static enum ndr_err_code
ndr_push_samr_Connect3(struct ndr_push
*ndr
, int flags
, const struct samr_Connect3
*r
)
11419 if (flags
& NDR_IN
) {
11420 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
11421 if (r
->in
.system_name
) {
11422 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11423 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11424 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11425 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
));
11427 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown
));
11428 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11430 if (flags
& NDR_OUT
) {
11431 if (r
->out
.connect_handle
== NULL
) {
11432 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11434 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11435 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11437 return NDR_ERR_SUCCESS
;
11440 static enum ndr_err_code
ndr_pull_samr_Connect3(struct ndr_pull
*ndr
, int flags
, struct samr_Connect3
*r
)
11442 uint32_t _ptr_system_name
;
11443 TALLOC_CTX
*_mem_save_system_name_0
;
11444 TALLOC_CTX
*_mem_save_connect_handle_0
;
11445 if (flags
& NDR_IN
) {
11446 ZERO_STRUCT(r
->out
);
11448 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
11449 if (_ptr_system_name
) {
11450 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
11452 r
->in
.system_name
= NULL
;
11454 if (r
->in
.system_name
) {
11455 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11456 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
11457 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
11458 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
11459 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
11460 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
));
11462 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
11463 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
));
11464 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
11466 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
11467 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11468 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11469 ZERO_STRUCTP(r
->out
.connect_handle
);
11471 if (flags
& NDR_OUT
) {
11472 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11473 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11475 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11476 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
11477 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11478 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11479 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11481 return NDR_ERR_SUCCESS
;
11484 _PUBLIC_
void ndr_print_samr_Connect3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect3
*r
)
11486 ndr_print_struct(ndr
, name
, "samr_Connect3");
11488 if (flags
& NDR_SET_VALUES
) {
11489 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11491 if (flags
& NDR_IN
) {
11492 ndr_print_struct(ndr
, "in", "samr_Connect3");
11494 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
11496 if (r
->in
.system_name
) {
11497 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
11500 ndr_print_uint32(ndr
, "unknown", r
->in
.unknown
);
11501 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
11504 if (flags
& NDR_OUT
) {
11505 ndr_print_struct(ndr
, "out", "samr_Connect3");
11507 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
11509 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
11511 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11517 static enum ndr_err_code
ndr_push_samr_Connect4(struct ndr_push
*ndr
, int flags
, const struct samr_Connect4
*r
)
11519 if (flags
& NDR_IN
) {
11520 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
11521 if (r
->in
.system_name
) {
11522 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11523 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11524 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11525 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
));
11527 NDR_CHECK(ndr_push_samr_ConnectVersion(ndr
, NDR_SCALARS
, r
->in
.client_version
));
11528 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11530 if (flags
& NDR_OUT
) {
11531 if (r
->out
.connect_handle
== NULL
) {
11532 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11534 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11535 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11537 return NDR_ERR_SUCCESS
;
11540 static enum ndr_err_code
ndr_pull_samr_Connect4(struct ndr_pull
*ndr
, int flags
, struct samr_Connect4
*r
)
11542 uint32_t _ptr_system_name
;
11543 TALLOC_CTX
*_mem_save_system_name_0
;
11544 TALLOC_CTX
*_mem_save_connect_handle_0
;
11545 if (flags
& NDR_IN
) {
11546 ZERO_STRUCT(r
->out
);
11548 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
11549 if (_ptr_system_name
) {
11550 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
11552 r
->in
.system_name
= NULL
;
11554 if (r
->in
.system_name
) {
11555 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11556 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
11557 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
11558 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
11559 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
11560 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
));
11562 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
11563 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
));
11564 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
11566 NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr
, NDR_SCALARS
, &r
->in
.client_version
));
11567 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11568 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11569 ZERO_STRUCTP(r
->out
.connect_handle
);
11571 if (flags
& NDR_OUT
) {
11572 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11573 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11575 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11576 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
11577 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11578 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11579 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11581 return NDR_ERR_SUCCESS
;
11584 _PUBLIC_
void ndr_print_samr_Connect4(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect4
*r
)
11586 ndr_print_struct(ndr
, name
, "samr_Connect4");
11588 if (flags
& NDR_SET_VALUES
) {
11589 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11591 if (flags
& NDR_IN
) {
11592 ndr_print_struct(ndr
, "in", "samr_Connect4");
11594 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
11596 if (r
->in
.system_name
) {
11597 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
11600 ndr_print_samr_ConnectVersion(ndr
, "client_version", r
->in
.client_version
);
11601 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
11604 if (flags
& NDR_OUT
) {
11605 ndr_print_struct(ndr
, "out", "samr_Connect4");
11607 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
11609 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
11611 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11617 static enum ndr_err_code
ndr_push_samr_ChangePasswordUser3(struct ndr_push
*ndr
, int flags
, const struct samr_ChangePasswordUser3
*r
)
11619 if (flags
& NDR_IN
) {
11620 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
11621 if (r
->in
.server
) {
11622 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
11624 if (r
->in
.account
== NULL
) {
11625 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11627 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
11628 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_password
));
11629 if (r
->in
.nt_password
) {
11630 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.nt_password
));
11632 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.nt_verifier
));
11633 if (r
->in
.nt_verifier
) {
11634 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_verifier
));
11636 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.lm_change
));
11637 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_password
));
11638 if (r
->in
.lm_password
) {
11639 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.lm_password
));
11641 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.lm_verifier
));
11642 if (r
->in
.lm_verifier
) {
11643 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_verifier
));
11645 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password3
));
11646 if (r
->in
.password3
) {
11647 NDR_CHECK(ndr_push_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.password3
));
11650 if (flags
& NDR_OUT
) {
11651 if (r
->out
.dominfo
== NULL
) {
11652 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11654 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.dominfo
));
11655 if (*r
->out
.dominfo
) {
11656 NDR_CHECK(ndr_push_samr_DomInfo1(ndr
, NDR_SCALARS
, *r
->out
.dominfo
));
11658 if (r
->out
.reject
== NULL
) {
11659 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11661 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.reject
));
11662 if (*r
->out
.reject
) {
11663 NDR_CHECK(ndr_push_samr_ChangeReject(ndr
, NDR_SCALARS
, *r
->out
.reject
));
11665 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11667 return NDR_ERR_SUCCESS
;
11670 static enum ndr_err_code
ndr_pull_samr_ChangePasswordUser3(struct ndr_pull
*ndr
, int flags
, struct samr_ChangePasswordUser3
*r
)
11672 uint32_t _ptr_server
;
11673 uint32_t _ptr_nt_password
;
11674 uint32_t _ptr_nt_verifier
;
11675 uint32_t _ptr_lm_password
;
11676 uint32_t _ptr_lm_verifier
;
11677 uint32_t _ptr_password3
;
11678 uint32_t _ptr_dominfo
;
11679 uint32_t _ptr_reject
;
11680 TALLOC_CTX
*_mem_save_server_0
;
11681 TALLOC_CTX
*_mem_save_account_0
;
11682 TALLOC_CTX
*_mem_save_nt_password_0
;
11683 TALLOC_CTX
*_mem_save_nt_verifier_0
;
11684 TALLOC_CTX
*_mem_save_lm_password_0
;
11685 TALLOC_CTX
*_mem_save_lm_verifier_0
;
11686 TALLOC_CTX
*_mem_save_password3_0
;
11687 TALLOC_CTX
*_mem_save_dominfo_0
;
11688 TALLOC_CTX
*_mem_save_dominfo_1
;
11689 TALLOC_CTX
*_mem_save_reject_0
;
11690 TALLOC_CTX
*_mem_save_reject_1
;
11691 if (flags
& NDR_IN
) {
11692 ZERO_STRUCT(r
->out
);
11694 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
11696 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
11698 r
->in
.server
= NULL
;
11700 if (r
->in
.server
) {
11701 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11702 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
11703 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.server
));
11704 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
11706 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11707 NDR_PULL_ALLOC(ndr
, r
->in
.account
);
11709 _mem_save_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11710 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account
, LIBNDR_FLAG_REF_ALLOC
);
11711 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.account
));
11712 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_0
, LIBNDR_FLAG_REF_ALLOC
);
11713 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_password
));
11714 if (_ptr_nt_password
) {
11715 NDR_PULL_ALLOC(ndr
, r
->in
.nt_password
);
11717 r
->in
.nt_password
= NULL
;
11719 if (r
->in
.nt_password
) {
11720 _mem_save_nt_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11721 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_password
, 0);
11722 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.nt_password
));
11723 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_password_0
, 0);
11725 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_nt_verifier
));
11726 if (_ptr_nt_verifier
) {
11727 NDR_PULL_ALLOC(ndr
, r
->in
.nt_verifier
);
11729 r
->in
.nt_verifier
= NULL
;
11731 if (r
->in
.nt_verifier
) {
11732 _mem_save_nt_verifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11733 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.nt_verifier
, 0);
11734 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.nt_verifier
));
11735 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_nt_verifier_0
, 0);
11737 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.lm_change
));
11738 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_password
));
11739 if (_ptr_lm_password
) {
11740 NDR_PULL_ALLOC(ndr
, r
->in
.lm_password
);
11742 r
->in
.lm_password
= NULL
;
11744 if (r
->in
.lm_password
) {
11745 _mem_save_lm_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11746 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_password
, 0);
11747 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.lm_password
));
11748 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_password_0
, 0);
11750 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lm_verifier
));
11751 if (_ptr_lm_verifier
) {
11752 NDR_PULL_ALLOC(ndr
, r
->in
.lm_verifier
);
11754 r
->in
.lm_verifier
= NULL
;
11756 if (r
->in
.lm_verifier
) {
11757 _mem_save_lm_verifier_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11758 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lm_verifier
, 0);
11759 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.lm_verifier
));
11760 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lm_verifier_0
, 0);
11762 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password3
));
11763 if (_ptr_password3
) {
11764 NDR_PULL_ALLOC(ndr
, r
->in
.password3
);
11766 r
->in
.password3
= NULL
;
11768 if (r
->in
.password3
) {
11769 _mem_save_password3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11770 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password3
, 0);
11771 NDR_CHECK(ndr_pull_samr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.password3
));
11772 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password3_0
, 0);
11774 NDR_PULL_ALLOC(ndr
, r
->out
.dominfo
);
11775 ZERO_STRUCTP(r
->out
.dominfo
);
11776 NDR_PULL_ALLOC(ndr
, r
->out
.reject
);
11777 ZERO_STRUCTP(r
->out
.reject
);
11779 if (flags
& NDR_OUT
) {
11780 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11781 NDR_PULL_ALLOC(ndr
, r
->out
.dominfo
);
11783 _mem_save_dominfo_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11784 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.dominfo
, LIBNDR_FLAG_REF_ALLOC
);
11785 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dominfo
));
11786 if (_ptr_dominfo
) {
11787 NDR_PULL_ALLOC(ndr
, *r
->out
.dominfo
);
11789 *r
->out
.dominfo
= NULL
;
11791 if (*r
->out
.dominfo
) {
11792 _mem_save_dominfo_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11793 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.dominfo
, 0);
11794 NDR_CHECK(ndr_pull_samr_DomInfo1(ndr
, NDR_SCALARS
, *r
->out
.dominfo
));
11795 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dominfo_1
, 0);
11797 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dominfo_0
, LIBNDR_FLAG_REF_ALLOC
);
11798 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11799 NDR_PULL_ALLOC(ndr
, r
->out
.reject
);
11801 _mem_save_reject_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11802 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.reject
, LIBNDR_FLAG_REF_ALLOC
);
11803 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_reject
));
11805 NDR_PULL_ALLOC(ndr
, *r
->out
.reject
);
11807 *r
->out
.reject
= NULL
;
11809 if (*r
->out
.reject
) {
11810 _mem_save_reject_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11811 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.reject
, 0);
11812 NDR_CHECK(ndr_pull_samr_ChangeReject(ndr
, NDR_SCALARS
, *r
->out
.reject
));
11813 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_reject_1
, 0);
11815 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_reject_0
, LIBNDR_FLAG_REF_ALLOC
);
11816 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11818 return NDR_ERR_SUCCESS
;
11821 _PUBLIC_
void ndr_print_samr_ChangePasswordUser3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_ChangePasswordUser3
*r
)
11823 ndr_print_struct(ndr
, name
, "samr_ChangePasswordUser3");
11825 if (flags
& NDR_SET_VALUES
) {
11826 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11828 if (flags
& NDR_IN
) {
11829 ndr_print_struct(ndr
, "in", "samr_ChangePasswordUser3");
11831 ndr_print_ptr(ndr
, "server", r
->in
.server
);
11833 if (r
->in
.server
) {
11834 ndr_print_lsa_String(ndr
, "server", r
->in
.server
);
11837 ndr_print_ptr(ndr
, "account", r
->in
.account
);
11839 ndr_print_lsa_String(ndr
, "account", r
->in
.account
);
11841 ndr_print_ptr(ndr
, "nt_password", r
->in
.nt_password
);
11843 if (r
->in
.nt_password
) {
11844 ndr_print_samr_CryptPassword(ndr
, "nt_password", r
->in
.nt_password
);
11847 ndr_print_ptr(ndr
, "nt_verifier", r
->in
.nt_verifier
);
11849 if (r
->in
.nt_verifier
) {
11850 ndr_print_samr_Password(ndr
, "nt_verifier", r
->in
.nt_verifier
);
11853 ndr_print_uint8(ndr
, "lm_change", r
->in
.lm_change
);
11854 ndr_print_ptr(ndr
, "lm_password", r
->in
.lm_password
);
11856 if (r
->in
.lm_password
) {
11857 ndr_print_samr_CryptPassword(ndr
, "lm_password", r
->in
.lm_password
);
11860 ndr_print_ptr(ndr
, "lm_verifier", r
->in
.lm_verifier
);
11862 if (r
->in
.lm_verifier
) {
11863 ndr_print_samr_Password(ndr
, "lm_verifier", r
->in
.lm_verifier
);
11866 ndr_print_ptr(ndr
, "password3", r
->in
.password3
);
11868 if (r
->in
.password3
) {
11869 ndr_print_samr_CryptPassword(ndr
, "password3", r
->in
.password3
);
11874 if (flags
& NDR_OUT
) {
11875 ndr_print_struct(ndr
, "out", "samr_ChangePasswordUser3");
11877 ndr_print_ptr(ndr
, "dominfo", r
->out
.dominfo
);
11879 ndr_print_ptr(ndr
, "dominfo", *r
->out
.dominfo
);
11881 if (*r
->out
.dominfo
) {
11882 ndr_print_samr_DomInfo1(ndr
, "dominfo", *r
->out
.dominfo
);
11886 ndr_print_ptr(ndr
, "reject", r
->out
.reject
);
11888 ndr_print_ptr(ndr
, "reject", *r
->out
.reject
);
11890 if (*r
->out
.reject
) {
11891 ndr_print_samr_ChangeReject(ndr
, "reject", *r
->out
.reject
);
11895 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11901 _PUBLIC_
enum ndr_err_code
ndr_push_samr_Connect5(struct ndr_push
*ndr
, int flags
, const struct samr_Connect5
*r
)
11903 if (flags
& NDR_IN
) {
11904 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
11905 if (r
->in
.system_name
) {
11906 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11907 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11908 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
11909 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
));
11911 NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11912 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level_in
));
11913 if (r
->in
.info_in
== NULL
) {
11914 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11916 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info_in
, r
->in
.level_in
));
11917 NDR_CHECK(ndr_push_samr_ConnectInfo(ndr
, NDR_SCALARS
, r
->in
.info_in
));
11919 if (flags
& NDR_OUT
) {
11920 if (r
->out
.level_out
== NULL
) {
11921 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11923 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.level_out
));
11924 if (r
->out
.info_out
== NULL
) {
11925 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11927 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info_out
, *r
->out
.level_out
));
11928 NDR_CHECK(ndr_push_samr_ConnectInfo(ndr
, NDR_SCALARS
, r
->out
.info_out
));
11929 if (r
->out
.connect_handle
== NULL
) {
11930 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11932 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
11933 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11935 return NDR_ERR_SUCCESS
;
11938 _PUBLIC_
enum ndr_err_code
ndr_pull_samr_Connect5(struct ndr_pull
*ndr
, int flags
, struct samr_Connect5
*r
)
11940 uint32_t _ptr_system_name
;
11941 TALLOC_CTX
*_mem_save_system_name_0
;
11942 TALLOC_CTX
*_mem_save_info_in_0
;
11943 TALLOC_CTX
*_mem_save_level_out_0
;
11944 TALLOC_CTX
*_mem_save_info_out_0
;
11945 TALLOC_CTX
*_mem_save_connect_handle_0
;
11946 if (flags
& NDR_IN
) {
11947 ZERO_STRUCT(r
->out
);
11949 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
11950 if (_ptr_system_name
) {
11951 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
11953 r
->in
.system_name
= NULL
;
11955 if (r
->in
.system_name
) {
11956 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11957 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
11958 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
11959 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
11960 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
11961 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
));
11963 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
11964 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
));
11965 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
11967 NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11968 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level_in
));
11969 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11970 NDR_PULL_ALLOC(ndr
, r
->in
.info_in
);
11972 _mem_save_info_in_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11973 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_in
, LIBNDR_FLAG_REF_ALLOC
);
11974 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info_in
, r
->in
.level_in
));
11975 NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr
, NDR_SCALARS
, r
->in
.info_in
));
11976 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_in_0
, LIBNDR_FLAG_REF_ALLOC
);
11977 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
11978 ZERO_STRUCTP(r
->out
.level_out
);
11979 NDR_PULL_ALLOC(ndr
, r
->out
.info_out
);
11980 ZERO_STRUCTP(r
->out
.info_out
);
11981 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
11982 ZERO_STRUCTP(r
->out
.connect_handle
);
11984 if (flags
& NDR_OUT
) {
11985 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11986 NDR_PULL_ALLOC(ndr
, r
->out
.level_out
);
11988 _mem_save_level_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11989 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level_out
, LIBNDR_FLAG_REF_ALLOC
);
11990 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.level_out
));
11991 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_out_0
, LIBNDR_FLAG_REF_ALLOC
);
11992 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11993 NDR_PULL_ALLOC(ndr
, r
->out
.info_out
);
11995 _mem_save_info_out_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11996 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info_out
, LIBNDR_FLAG_REF_ALLOC
);
11997 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info_out
, *r
->out
.level_out
));
11998 NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr
, NDR_SCALARS
, r
->out
.info_out
));
11999 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_out_0
, LIBNDR_FLAG_REF_ALLOC
);
12000 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12001 NDR_PULL_ALLOC(ndr
, r
->out
.connect_handle
);
12003 _mem_save_connect_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12004 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.connect_handle
, LIBNDR_FLAG_REF_ALLOC
);
12005 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.connect_handle
));
12006 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_connect_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12007 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12009 return NDR_ERR_SUCCESS
;
12012 _PUBLIC_
void ndr_print_samr_Connect5(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_Connect5
*r
)
12014 ndr_print_struct(ndr
, name
, "samr_Connect5");
12016 if (flags
& NDR_SET_VALUES
) {
12017 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12019 if (flags
& NDR_IN
) {
12020 ndr_print_struct(ndr
, "in", "samr_Connect5");
12022 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
12024 if (r
->in
.system_name
) {
12025 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
12028 ndr_print_samr_ConnectAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
12029 ndr_print_uint32(ndr
, "level_in", r
->in
.level_in
);
12030 ndr_print_ptr(ndr
, "info_in", r
->in
.info_in
);
12032 ndr_print_set_switch_value(ndr
, r
->in
.info_in
, r
->in
.level_in
);
12033 ndr_print_samr_ConnectInfo(ndr
, "info_in", r
->in
.info_in
);
12037 if (flags
& NDR_OUT
) {
12038 ndr_print_struct(ndr
, "out", "samr_Connect5");
12040 ndr_print_ptr(ndr
, "level_out", r
->out
.level_out
);
12042 ndr_print_uint32(ndr
, "level_out", *r
->out
.level_out
);
12044 ndr_print_ptr(ndr
, "info_out", r
->out
.info_out
);
12046 ndr_print_set_switch_value(ndr
, r
->out
.info_out
, *r
->out
.level_out
);
12047 ndr_print_samr_ConnectInfo(ndr
, "info_out", r
->out
.info_out
);
12049 ndr_print_ptr(ndr
, "connect_handle", r
->out
.connect_handle
);
12051 ndr_print_policy_handle(ndr
, "connect_handle", r
->out
.connect_handle
);
12053 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12059 static enum ndr_err_code
ndr_push_samr_RidToSid(struct ndr_push
*ndr
, int flags
, const struct samr_RidToSid
*r
)
12061 if (flags
& NDR_IN
) {
12062 if (r
->in
.domain_handle
== NULL
) {
12063 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12065 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
12066 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.rid
));
12068 if (flags
& NDR_OUT
) {
12069 if (r
->out
.sid
== NULL
) {
12070 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12072 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sid
));
12074 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sid
));
12076 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12078 return NDR_ERR_SUCCESS
;
12081 static enum ndr_err_code
ndr_pull_samr_RidToSid(struct ndr_pull
*ndr
, int flags
, struct samr_RidToSid
*r
)
12084 TALLOC_CTX
*_mem_save_domain_handle_0
;
12085 TALLOC_CTX
*_mem_save_sid_0
;
12086 TALLOC_CTX
*_mem_save_sid_1
;
12087 if (flags
& NDR_IN
) {
12088 ZERO_STRUCT(r
->out
);
12090 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12091 NDR_PULL_ALLOC(ndr
, r
->in
.domain_handle
);
12093 _mem_save_domain_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12094 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_handle
, LIBNDR_FLAG_REF_ALLOC
);
12095 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.domain_handle
));
12096 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12097 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.rid
));
12098 NDR_PULL_ALLOC(ndr
, r
->out
.sid
);
12099 ZERO_STRUCTP(r
->out
.sid
);
12101 if (flags
& NDR_OUT
) {
12102 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12103 NDR_PULL_ALLOC(ndr
, r
->out
.sid
);
12105 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12106 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sid
, LIBNDR_FLAG_REF_ALLOC
);
12107 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
12109 NDR_PULL_ALLOC(ndr
, *r
->out
.sid
);
12111 *r
->out
.sid
= NULL
;
12114 _mem_save_sid_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12115 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sid
, 0);
12116 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sid
));
12117 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_1
, 0);
12119 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
12120 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12122 return NDR_ERR_SUCCESS
;
12125 _PUBLIC_
void ndr_print_samr_RidToSid(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_RidToSid
*r
)
12127 ndr_print_struct(ndr
, name
, "samr_RidToSid");
12129 if (flags
& NDR_SET_VALUES
) {
12130 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12132 if (flags
& NDR_IN
) {
12133 ndr_print_struct(ndr
, "in", "samr_RidToSid");
12135 ndr_print_ptr(ndr
, "domain_handle", r
->in
.domain_handle
);
12137 ndr_print_policy_handle(ndr
, "domain_handle", r
->in
.domain_handle
);
12139 ndr_print_uint32(ndr
, "rid", r
->in
.rid
);
12142 if (flags
& NDR_OUT
) {
12143 ndr_print_struct(ndr
, "out", "samr_RidToSid");
12145 ndr_print_ptr(ndr
, "sid", r
->out
.sid
);
12147 ndr_print_ptr(ndr
, "sid", *r
->out
.sid
);
12150 ndr_print_dom_sid2(ndr
, "sid", *r
->out
.sid
);
12154 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12160 static enum ndr_err_code
ndr_push_samr_SetDsrmPassword(struct ndr_push
*ndr
, int flags
, const struct samr_SetDsrmPassword
*r
)
12162 if (flags
& NDR_IN
) {
12163 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.name
));
12165 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
12167 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown
));
12168 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.hash
));
12170 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, r
->in
.hash
));
12173 if (flags
& NDR_OUT
) {
12174 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12176 return NDR_ERR_SUCCESS
;
12179 static enum ndr_err_code
ndr_pull_samr_SetDsrmPassword(struct ndr_pull
*ndr
, int flags
, struct samr_SetDsrmPassword
*r
)
12181 uint32_t _ptr_name
;
12182 uint32_t _ptr_hash
;
12183 TALLOC_CTX
*_mem_save_name_0
;
12184 TALLOC_CTX
*_mem_save_hash_0
;
12185 if (flags
& NDR_IN
) {
12186 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
12188 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
12193 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12194 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, 0);
12195 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
12196 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
12198 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
12199 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hash
));
12201 NDR_PULL_ALLOC(ndr
, r
->in
.hash
);
12206 _mem_save_hash_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12207 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.hash
, 0);
12208 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, r
->in
.hash
));
12209 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hash_0
, 0);
12212 if (flags
& NDR_OUT
) {
12213 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12215 return NDR_ERR_SUCCESS
;
12218 _PUBLIC_
void ndr_print_samr_SetDsrmPassword(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_SetDsrmPassword
*r
)
12220 ndr_print_struct(ndr
, name
, "samr_SetDsrmPassword");
12222 if (flags
& NDR_SET_VALUES
) {
12223 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12225 if (flags
& NDR_IN
) {
12226 ndr_print_struct(ndr
, "in", "samr_SetDsrmPassword");
12228 ndr_print_ptr(ndr
, "name", r
->in
.name
);
12231 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
12234 ndr_print_uint32(ndr
, "unknown", r
->in
.unknown
);
12235 ndr_print_ptr(ndr
, "hash", r
->in
.hash
);
12238 ndr_print_samr_Password(ndr
, "hash", r
->in
.hash
);
12243 if (flags
& NDR_OUT
) {
12244 ndr_print_struct(ndr
, "out", "samr_SetDsrmPassword");
12246 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12252 static enum ndr_err_code
ndr_push_samr_ValidatePassword(struct ndr_push
*ndr
, int flags
, const struct samr_ValidatePassword
*r
)
12254 if (flags
& NDR_IN
) {
12255 NDR_CHECK(ndr_push_samr_ValidatePasswordLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
12256 if (r
->in
.req
== NULL
) {
12257 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12259 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
12260 NDR_CHECK(ndr_push_samr_ValidatePasswordReq(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
12262 if (flags
& NDR_OUT
) {
12263 if (r
->out
.rep
== NULL
) {
12264 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12266 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.rep
));
12268 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.rep
, r
->in
.level
));
12269 NDR_CHECK(ndr_push_samr_ValidatePasswordRep(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rep
));
12271 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12273 return NDR_ERR_SUCCESS
;
12276 static enum ndr_err_code
ndr_pull_samr_ValidatePassword(struct ndr_pull
*ndr
, int flags
, struct samr_ValidatePassword
*r
)
12279 TALLOC_CTX
*_mem_save_req_0
;
12280 TALLOC_CTX
*_mem_save_rep_0
;
12281 TALLOC_CTX
*_mem_save_rep_1
;
12282 if (flags
& NDR_IN
) {
12283 ZERO_STRUCT(r
->out
);
12285 NDR_CHECK(ndr_pull_samr_ValidatePasswordLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
12286 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12287 NDR_PULL_ALLOC(ndr
, r
->in
.req
);
12289 _mem_save_req_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12290 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.req
, LIBNDR_FLAG_REF_ALLOC
);
12291 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
));
12292 NDR_CHECK(ndr_pull_samr_ValidatePasswordReq(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.req
));
12293 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_req_0
, LIBNDR_FLAG_REF_ALLOC
);
12294 NDR_PULL_ALLOC(ndr
, r
->out
.rep
);
12295 ZERO_STRUCTP(r
->out
.rep
);
12297 if (flags
& NDR_OUT
) {
12298 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12299 NDR_PULL_ALLOC(ndr
, r
->out
.rep
);
12301 _mem_save_rep_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12302 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rep
, LIBNDR_FLAG_REF_ALLOC
);
12303 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rep
));
12305 NDR_PULL_ALLOC(ndr
, *r
->out
.rep
);
12307 *r
->out
.rep
= NULL
;
12310 _mem_save_rep_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12311 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.rep
, 0);
12312 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.rep
, r
->in
.level
));
12313 NDR_CHECK(ndr_pull_samr_ValidatePasswordRep(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.rep
));
12314 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rep_1
, 0);
12316 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rep_0
, LIBNDR_FLAG_REF_ALLOC
);
12317 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12319 return NDR_ERR_SUCCESS
;
12322 _PUBLIC_
void ndr_print_samr_ValidatePassword(struct ndr_print
*ndr
, const char *name
, int flags
, const struct samr_ValidatePassword
*r
)
12324 ndr_print_struct(ndr
, name
, "samr_ValidatePassword");
12326 if (flags
& NDR_SET_VALUES
) {
12327 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12329 if (flags
& NDR_IN
) {
12330 ndr_print_struct(ndr
, "in", "samr_ValidatePassword");
12332 ndr_print_samr_ValidatePasswordLevel(ndr
, "level", r
->in
.level
);
12333 ndr_print_ptr(ndr
, "req", r
->in
.req
);
12335 ndr_print_set_switch_value(ndr
, r
->in
.req
, r
->in
.level
);
12336 ndr_print_samr_ValidatePasswordReq(ndr
, "req", r
->in
.req
);
12340 if (flags
& NDR_OUT
) {
12341 ndr_print_struct(ndr
, "out", "samr_ValidatePassword");
12343 ndr_print_ptr(ndr
, "rep", r
->out
.rep
);
12345 ndr_print_ptr(ndr
, "rep", *r
->out
.rep
);
12348 ndr_print_set_switch_value(ndr
, *r
->out
.rep
, r
->in
.level
);
12349 ndr_print_samr_ValidatePasswordRep(ndr
, "rep", *r
->out
.rep
);
12353 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12359 static const struct ndr_interface_call samr_calls
[] = {
12362 sizeof(struct samr_Connect
),
12363 (ndr_push_flags_fn_t
) ndr_push_samr_Connect
,
12364 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect
,
12365 (ndr_print_function_t
) ndr_print_samr_Connect
,
12370 sizeof(struct samr_Close
),
12371 (ndr_push_flags_fn_t
) ndr_push_samr_Close
,
12372 (ndr_pull_flags_fn_t
) ndr_pull_samr_Close
,
12373 (ndr_print_function_t
) ndr_print_samr_Close
,
12377 "samr_SetSecurity",
12378 sizeof(struct samr_SetSecurity
),
12379 (ndr_push_flags_fn_t
) ndr_push_samr_SetSecurity
,
12380 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetSecurity
,
12381 (ndr_print_function_t
) ndr_print_samr_SetSecurity
,
12385 "samr_QuerySecurity",
12386 sizeof(struct samr_QuerySecurity
),
12387 (ndr_push_flags_fn_t
) ndr_push_samr_QuerySecurity
,
12388 (ndr_pull_flags_fn_t
) ndr_pull_samr_QuerySecurity
,
12389 (ndr_print_function_t
) ndr_print_samr_QuerySecurity
,
12394 sizeof(struct samr_Shutdown
),
12395 (ndr_push_flags_fn_t
) ndr_push_samr_Shutdown
,
12396 (ndr_pull_flags_fn_t
) ndr_pull_samr_Shutdown
,
12397 (ndr_print_function_t
) ndr_print_samr_Shutdown
,
12401 "samr_LookupDomain",
12402 sizeof(struct samr_LookupDomain
),
12403 (ndr_push_flags_fn_t
) ndr_push_samr_LookupDomain
,
12404 (ndr_pull_flags_fn_t
) ndr_pull_samr_LookupDomain
,
12405 (ndr_print_function_t
) ndr_print_samr_LookupDomain
,
12409 "samr_EnumDomains",
12410 sizeof(struct samr_EnumDomains
),
12411 (ndr_push_flags_fn_t
) ndr_push_samr_EnumDomains
,
12412 (ndr_pull_flags_fn_t
) ndr_pull_samr_EnumDomains
,
12413 (ndr_print_function_t
) ndr_print_samr_EnumDomains
,
12418 sizeof(struct samr_OpenDomain
),
12419 (ndr_push_flags_fn_t
) ndr_push_samr_OpenDomain
,
12420 (ndr_pull_flags_fn_t
) ndr_pull_samr_OpenDomain
,
12421 (ndr_print_function_t
) ndr_print_samr_OpenDomain
,
12425 "samr_QueryDomainInfo",
12426 sizeof(struct samr_QueryDomainInfo
),
12427 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDomainInfo
,
12428 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDomainInfo
,
12429 (ndr_print_function_t
) ndr_print_samr_QueryDomainInfo
,
12433 "samr_SetDomainInfo",
12434 sizeof(struct samr_SetDomainInfo
),
12435 (ndr_push_flags_fn_t
) ndr_push_samr_SetDomainInfo
,
12436 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetDomainInfo
,
12437 (ndr_print_function_t
) ndr_print_samr_SetDomainInfo
,
12441 "samr_CreateDomainGroup",
12442 sizeof(struct samr_CreateDomainGroup
),
12443 (ndr_push_flags_fn_t
) ndr_push_samr_CreateDomainGroup
,
12444 (ndr_pull_flags_fn_t
) ndr_pull_samr_CreateDomainGroup
,
12445 (ndr_print_function_t
) ndr_print_samr_CreateDomainGroup
,
12449 "samr_EnumDomainGroups",
12450 sizeof(struct samr_EnumDomainGroups
),
12451 (ndr_push_flags_fn_t
) ndr_push_samr_EnumDomainGroups
,
12452 (ndr_pull_flags_fn_t
) ndr_pull_samr_EnumDomainGroups
,
12453 (ndr_print_function_t
) ndr_print_samr_EnumDomainGroups
,
12458 sizeof(struct samr_CreateUser
),
12459 (ndr_push_flags_fn_t
) ndr_push_samr_CreateUser
,
12460 (ndr_pull_flags_fn_t
) ndr_pull_samr_CreateUser
,
12461 (ndr_print_function_t
) ndr_print_samr_CreateUser
,
12465 "samr_EnumDomainUsers",
12466 sizeof(struct samr_EnumDomainUsers
),
12467 (ndr_push_flags_fn_t
) ndr_push_samr_EnumDomainUsers
,
12468 (ndr_pull_flags_fn_t
) ndr_pull_samr_EnumDomainUsers
,
12469 (ndr_print_function_t
) ndr_print_samr_EnumDomainUsers
,
12473 "samr_CreateDomAlias",
12474 sizeof(struct samr_CreateDomAlias
),
12475 (ndr_push_flags_fn_t
) ndr_push_samr_CreateDomAlias
,
12476 (ndr_pull_flags_fn_t
) ndr_pull_samr_CreateDomAlias
,
12477 (ndr_print_function_t
) ndr_print_samr_CreateDomAlias
,
12481 "samr_EnumDomainAliases",
12482 sizeof(struct samr_EnumDomainAliases
),
12483 (ndr_push_flags_fn_t
) ndr_push_samr_EnumDomainAliases
,
12484 (ndr_pull_flags_fn_t
) ndr_pull_samr_EnumDomainAliases
,
12485 (ndr_print_function_t
) ndr_print_samr_EnumDomainAliases
,
12489 "samr_GetAliasMembership",
12490 sizeof(struct samr_GetAliasMembership
),
12491 (ndr_push_flags_fn_t
) ndr_push_samr_GetAliasMembership
,
12492 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetAliasMembership
,
12493 (ndr_print_function_t
) ndr_print_samr_GetAliasMembership
,
12497 "samr_LookupNames",
12498 sizeof(struct samr_LookupNames
),
12499 (ndr_push_flags_fn_t
) ndr_push_samr_LookupNames
,
12500 (ndr_pull_flags_fn_t
) ndr_pull_samr_LookupNames
,
12501 (ndr_print_function_t
) ndr_print_samr_LookupNames
,
12506 sizeof(struct samr_LookupRids
),
12507 (ndr_push_flags_fn_t
) ndr_push_samr_LookupRids
,
12508 (ndr_pull_flags_fn_t
) ndr_pull_samr_LookupRids
,
12509 (ndr_print_function_t
) ndr_print_samr_LookupRids
,
12514 sizeof(struct samr_OpenGroup
),
12515 (ndr_push_flags_fn_t
) ndr_push_samr_OpenGroup
,
12516 (ndr_pull_flags_fn_t
) ndr_pull_samr_OpenGroup
,
12517 (ndr_print_function_t
) ndr_print_samr_OpenGroup
,
12521 "samr_QueryGroupInfo",
12522 sizeof(struct samr_QueryGroupInfo
),
12523 (ndr_push_flags_fn_t
) ndr_push_samr_QueryGroupInfo
,
12524 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryGroupInfo
,
12525 (ndr_print_function_t
) ndr_print_samr_QueryGroupInfo
,
12529 "samr_SetGroupInfo",
12530 sizeof(struct samr_SetGroupInfo
),
12531 (ndr_push_flags_fn_t
) ndr_push_samr_SetGroupInfo
,
12532 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetGroupInfo
,
12533 (ndr_print_function_t
) ndr_print_samr_SetGroupInfo
,
12537 "samr_AddGroupMember",
12538 sizeof(struct samr_AddGroupMember
),
12539 (ndr_push_flags_fn_t
) ndr_push_samr_AddGroupMember
,
12540 (ndr_pull_flags_fn_t
) ndr_pull_samr_AddGroupMember
,
12541 (ndr_print_function_t
) ndr_print_samr_AddGroupMember
,
12545 "samr_DeleteDomainGroup",
12546 sizeof(struct samr_DeleteDomainGroup
),
12547 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteDomainGroup
,
12548 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteDomainGroup
,
12549 (ndr_print_function_t
) ndr_print_samr_DeleteDomainGroup
,
12553 "samr_DeleteGroupMember",
12554 sizeof(struct samr_DeleteGroupMember
),
12555 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteGroupMember
,
12556 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteGroupMember
,
12557 (ndr_print_function_t
) ndr_print_samr_DeleteGroupMember
,
12561 "samr_QueryGroupMember",
12562 sizeof(struct samr_QueryGroupMember
),
12563 (ndr_push_flags_fn_t
) ndr_push_samr_QueryGroupMember
,
12564 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryGroupMember
,
12565 (ndr_print_function_t
) ndr_print_samr_QueryGroupMember
,
12569 "samr_SetMemberAttributesOfGroup",
12570 sizeof(struct samr_SetMemberAttributesOfGroup
),
12571 (ndr_push_flags_fn_t
) ndr_push_samr_SetMemberAttributesOfGroup
,
12572 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetMemberAttributesOfGroup
,
12573 (ndr_print_function_t
) ndr_print_samr_SetMemberAttributesOfGroup
,
12578 sizeof(struct samr_OpenAlias
),
12579 (ndr_push_flags_fn_t
) ndr_push_samr_OpenAlias
,
12580 (ndr_pull_flags_fn_t
) ndr_pull_samr_OpenAlias
,
12581 (ndr_print_function_t
) ndr_print_samr_OpenAlias
,
12585 "samr_QueryAliasInfo",
12586 sizeof(struct samr_QueryAliasInfo
),
12587 (ndr_push_flags_fn_t
) ndr_push_samr_QueryAliasInfo
,
12588 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryAliasInfo
,
12589 (ndr_print_function_t
) ndr_print_samr_QueryAliasInfo
,
12593 "samr_SetAliasInfo",
12594 sizeof(struct samr_SetAliasInfo
),
12595 (ndr_push_flags_fn_t
) ndr_push_samr_SetAliasInfo
,
12596 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetAliasInfo
,
12597 (ndr_print_function_t
) ndr_print_samr_SetAliasInfo
,
12601 "samr_DeleteDomAlias",
12602 sizeof(struct samr_DeleteDomAlias
),
12603 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteDomAlias
,
12604 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteDomAlias
,
12605 (ndr_print_function_t
) ndr_print_samr_DeleteDomAlias
,
12609 "samr_AddAliasMember",
12610 sizeof(struct samr_AddAliasMember
),
12611 (ndr_push_flags_fn_t
) ndr_push_samr_AddAliasMember
,
12612 (ndr_pull_flags_fn_t
) ndr_pull_samr_AddAliasMember
,
12613 (ndr_print_function_t
) ndr_print_samr_AddAliasMember
,
12617 "samr_DeleteAliasMember",
12618 sizeof(struct samr_DeleteAliasMember
),
12619 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteAliasMember
,
12620 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteAliasMember
,
12621 (ndr_print_function_t
) ndr_print_samr_DeleteAliasMember
,
12625 "samr_GetMembersInAlias",
12626 sizeof(struct samr_GetMembersInAlias
),
12627 (ndr_push_flags_fn_t
) ndr_push_samr_GetMembersInAlias
,
12628 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetMembersInAlias
,
12629 (ndr_print_function_t
) ndr_print_samr_GetMembersInAlias
,
12634 sizeof(struct samr_OpenUser
),
12635 (ndr_push_flags_fn_t
) ndr_push_samr_OpenUser
,
12636 (ndr_pull_flags_fn_t
) ndr_pull_samr_OpenUser
,
12637 (ndr_print_function_t
) ndr_print_samr_OpenUser
,
12642 sizeof(struct samr_DeleteUser
),
12643 (ndr_push_flags_fn_t
) ndr_push_samr_DeleteUser
,
12644 (ndr_pull_flags_fn_t
) ndr_pull_samr_DeleteUser
,
12645 (ndr_print_function_t
) ndr_print_samr_DeleteUser
,
12649 "samr_QueryUserInfo",
12650 sizeof(struct samr_QueryUserInfo
),
12651 (ndr_push_flags_fn_t
) ndr_push_samr_QueryUserInfo
,
12652 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryUserInfo
,
12653 (ndr_print_function_t
) ndr_print_samr_QueryUserInfo
,
12657 "samr_SetUserInfo",
12658 sizeof(struct samr_SetUserInfo
),
12659 (ndr_push_flags_fn_t
) ndr_push_samr_SetUserInfo
,
12660 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetUserInfo
,
12661 (ndr_print_function_t
) ndr_print_samr_SetUserInfo
,
12665 "samr_ChangePasswordUser",
12666 sizeof(struct samr_ChangePasswordUser
),
12667 (ndr_push_flags_fn_t
) ndr_push_samr_ChangePasswordUser
,
12668 (ndr_pull_flags_fn_t
) ndr_pull_samr_ChangePasswordUser
,
12669 (ndr_print_function_t
) ndr_print_samr_ChangePasswordUser
,
12673 "samr_GetGroupsForUser",
12674 sizeof(struct samr_GetGroupsForUser
),
12675 (ndr_push_flags_fn_t
) ndr_push_samr_GetGroupsForUser
,
12676 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetGroupsForUser
,
12677 (ndr_print_function_t
) ndr_print_samr_GetGroupsForUser
,
12681 "samr_QueryDisplayInfo",
12682 sizeof(struct samr_QueryDisplayInfo
),
12683 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDisplayInfo
,
12684 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDisplayInfo
,
12685 (ndr_print_function_t
) ndr_print_samr_QueryDisplayInfo
,
12689 "samr_GetDisplayEnumerationIndex",
12690 sizeof(struct samr_GetDisplayEnumerationIndex
),
12691 (ndr_push_flags_fn_t
) ndr_push_samr_GetDisplayEnumerationIndex
,
12692 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetDisplayEnumerationIndex
,
12693 (ndr_print_function_t
) ndr_print_samr_GetDisplayEnumerationIndex
,
12697 "samr_TestPrivateFunctionsDomain",
12698 sizeof(struct samr_TestPrivateFunctionsDomain
),
12699 (ndr_push_flags_fn_t
) ndr_push_samr_TestPrivateFunctionsDomain
,
12700 (ndr_pull_flags_fn_t
) ndr_pull_samr_TestPrivateFunctionsDomain
,
12701 (ndr_print_function_t
) ndr_print_samr_TestPrivateFunctionsDomain
,
12705 "samr_TestPrivateFunctionsUser",
12706 sizeof(struct samr_TestPrivateFunctionsUser
),
12707 (ndr_push_flags_fn_t
) ndr_push_samr_TestPrivateFunctionsUser
,
12708 (ndr_pull_flags_fn_t
) ndr_pull_samr_TestPrivateFunctionsUser
,
12709 (ndr_print_function_t
) ndr_print_samr_TestPrivateFunctionsUser
,
12713 "samr_GetUserPwInfo",
12714 sizeof(struct samr_GetUserPwInfo
),
12715 (ndr_push_flags_fn_t
) ndr_push_samr_GetUserPwInfo
,
12716 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetUserPwInfo
,
12717 (ndr_print_function_t
) ndr_print_samr_GetUserPwInfo
,
12721 "samr_RemoveMemberFromForeignDomain",
12722 sizeof(struct samr_RemoveMemberFromForeignDomain
),
12723 (ndr_push_flags_fn_t
) ndr_push_samr_RemoveMemberFromForeignDomain
,
12724 (ndr_pull_flags_fn_t
) ndr_pull_samr_RemoveMemberFromForeignDomain
,
12725 (ndr_print_function_t
) ndr_print_samr_RemoveMemberFromForeignDomain
,
12729 "samr_QueryDomainInfo2",
12730 sizeof(struct samr_QueryDomainInfo2
),
12731 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDomainInfo2
,
12732 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDomainInfo2
,
12733 (ndr_print_function_t
) ndr_print_samr_QueryDomainInfo2
,
12737 "samr_QueryUserInfo2",
12738 sizeof(struct samr_QueryUserInfo2
),
12739 (ndr_push_flags_fn_t
) ndr_push_samr_QueryUserInfo2
,
12740 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryUserInfo2
,
12741 (ndr_print_function_t
) ndr_print_samr_QueryUserInfo2
,
12745 "samr_QueryDisplayInfo2",
12746 sizeof(struct samr_QueryDisplayInfo2
),
12747 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDisplayInfo2
,
12748 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDisplayInfo2
,
12749 (ndr_print_function_t
) ndr_print_samr_QueryDisplayInfo2
,
12753 "samr_GetDisplayEnumerationIndex2",
12754 sizeof(struct samr_GetDisplayEnumerationIndex2
),
12755 (ndr_push_flags_fn_t
) ndr_push_samr_GetDisplayEnumerationIndex2
,
12756 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetDisplayEnumerationIndex2
,
12757 (ndr_print_function_t
) ndr_print_samr_GetDisplayEnumerationIndex2
,
12761 "samr_CreateUser2",
12762 sizeof(struct samr_CreateUser2
),
12763 (ndr_push_flags_fn_t
) ndr_push_samr_CreateUser2
,
12764 (ndr_pull_flags_fn_t
) ndr_pull_samr_CreateUser2
,
12765 (ndr_print_function_t
) ndr_print_samr_CreateUser2
,
12769 "samr_QueryDisplayInfo3",
12770 sizeof(struct samr_QueryDisplayInfo3
),
12771 (ndr_push_flags_fn_t
) ndr_push_samr_QueryDisplayInfo3
,
12772 (ndr_pull_flags_fn_t
) ndr_pull_samr_QueryDisplayInfo3
,
12773 (ndr_print_function_t
) ndr_print_samr_QueryDisplayInfo3
,
12777 "samr_AddMultipleMembersToAlias",
12778 sizeof(struct samr_AddMultipleMembersToAlias
),
12779 (ndr_push_flags_fn_t
) ndr_push_samr_AddMultipleMembersToAlias
,
12780 (ndr_pull_flags_fn_t
) ndr_pull_samr_AddMultipleMembersToAlias
,
12781 (ndr_print_function_t
) ndr_print_samr_AddMultipleMembersToAlias
,
12785 "samr_RemoveMultipleMembersFromAlias",
12786 sizeof(struct samr_RemoveMultipleMembersFromAlias
),
12787 (ndr_push_flags_fn_t
) ndr_push_samr_RemoveMultipleMembersFromAlias
,
12788 (ndr_pull_flags_fn_t
) ndr_pull_samr_RemoveMultipleMembersFromAlias
,
12789 (ndr_print_function_t
) ndr_print_samr_RemoveMultipleMembersFromAlias
,
12793 "samr_OemChangePasswordUser2",
12794 sizeof(struct samr_OemChangePasswordUser2
),
12795 (ndr_push_flags_fn_t
) ndr_push_samr_OemChangePasswordUser2
,
12796 (ndr_pull_flags_fn_t
) ndr_pull_samr_OemChangePasswordUser2
,
12797 (ndr_print_function_t
) ndr_print_samr_OemChangePasswordUser2
,
12801 "samr_ChangePasswordUser2",
12802 sizeof(struct samr_ChangePasswordUser2
),
12803 (ndr_push_flags_fn_t
) ndr_push_samr_ChangePasswordUser2
,
12804 (ndr_pull_flags_fn_t
) ndr_pull_samr_ChangePasswordUser2
,
12805 (ndr_print_function_t
) ndr_print_samr_ChangePasswordUser2
,
12809 "samr_GetDomPwInfo",
12810 sizeof(struct samr_GetDomPwInfo
),
12811 (ndr_push_flags_fn_t
) ndr_push_samr_GetDomPwInfo
,
12812 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetDomPwInfo
,
12813 (ndr_print_function_t
) ndr_print_samr_GetDomPwInfo
,
12818 sizeof(struct samr_Connect2
),
12819 (ndr_push_flags_fn_t
) ndr_push_samr_Connect2
,
12820 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect2
,
12821 (ndr_print_function_t
) ndr_print_samr_Connect2
,
12825 "samr_SetUserInfo2",
12826 sizeof(struct samr_SetUserInfo2
),
12827 (ndr_push_flags_fn_t
) ndr_push_samr_SetUserInfo2
,
12828 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetUserInfo2
,
12829 (ndr_print_function_t
) ndr_print_samr_SetUserInfo2
,
12833 "samr_SetBootKeyInformation",
12834 sizeof(struct samr_SetBootKeyInformation
),
12835 (ndr_push_flags_fn_t
) ndr_push_samr_SetBootKeyInformation
,
12836 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetBootKeyInformation
,
12837 (ndr_print_function_t
) ndr_print_samr_SetBootKeyInformation
,
12841 "samr_GetBootKeyInformation",
12842 sizeof(struct samr_GetBootKeyInformation
),
12843 (ndr_push_flags_fn_t
) ndr_push_samr_GetBootKeyInformation
,
12844 (ndr_pull_flags_fn_t
) ndr_pull_samr_GetBootKeyInformation
,
12845 (ndr_print_function_t
) ndr_print_samr_GetBootKeyInformation
,
12850 sizeof(struct samr_Connect3
),
12851 (ndr_push_flags_fn_t
) ndr_push_samr_Connect3
,
12852 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect3
,
12853 (ndr_print_function_t
) ndr_print_samr_Connect3
,
12858 sizeof(struct samr_Connect4
),
12859 (ndr_push_flags_fn_t
) ndr_push_samr_Connect4
,
12860 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect4
,
12861 (ndr_print_function_t
) ndr_print_samr_Connect4
,
12865 "samr_ChangePasswordUser3",
12866 sizeof(struct samr_ChangePasswordUser3
),
12867 (ndr_push_flags_fn_t
) ndr_push_samr_ChangePasswordUser3
,
12868 (ndr_pull_flags_fn_t
) ndr_pull_samr_ChangePasswordUser3
,
12869 (ndr_print_function_t
) ndr_print_samr_ChangePasswordUser3
,
12874 sizeof(struct samr_Connect5
),
12875 (ndr_push_flags_fn_t
) ndr_push_samr_Connect5
,
12876 (ndr_pull_flags_fn_t
) ndr_pull_samr_Connect5
,
12877 (ndr_print_function_t
) ndr_print_samr_Connect5
,
12882 sizeof(struct samr_RidToSid
),
12883 (ndr_push_flags_fn_t
) ndr_push_samr_RidToSid
,
12884 (ndr_pull_flags_fn_t
) ndr_pull_samr_RidToSid
,
12885 (ndr_print_function_t
) ndr_print_samr_RidToSid
,
12889 "samr_SetDsrmPassword",
12890 sizeof(struct samr_SetDsrmPassword
),
12891 (ndr_push_flags_fn_t
) ndr_push_samr_SetDsrmPassword
,
12892 (ndr_pull_flags_fn_t
) ndr_pull_samr_SetDsrmPassword
,
12893 (ndr_print_function_t
) ndr_print_samr_SetDsrmPassword
,
12897 "samr_ValidatePassword",
12898 sizeof(struct samr_ValidatePassword
),
12899 (ndr_push_flags_fn_t
) ndr_push_samr_ValidatePassword
,
12900 (ndr_pull_flags_fn_t
) ndr_pull_samr_ValidatePassword
,
12901 (ndr_print_function_t
) ndr_print_samr_ValidatePassword
,
12904 { NULL
, 0, NULL
, NULL
, NULL
, false }
12907 static const char * const samr_endpoint_strings
[] = {
12908 "ncacn_np:[\\pipe\\samr]",
12913 static const struct ndr_interface_string_array samr_endpoints
= {
12915 .names
= samr_endpoint_strings
12918 static const char * const samr_authservice_strings
[] = {
12922 static const struct ndr_interface_string_array samr_authservices
= {
12924 .names
= samr_authservice_strings
12928 const struct ndr_interface_table ndr_table_samr
= {
12931 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xac}},
12934 .helpstring
= NDR_SAMR_HELPSTRING
,
12936 .calls
= samr_calls
,
12937 .endpoints
= &samr_endpoints
,
12938 .authservices
= &samr_authservices