Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_samr.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_lsa.h"
8 : #include "librpc/gen_ndr/ndr_security.h"
9 77355 : _PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
10 : {
11 77355 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
12 77355 : return NDR_ERR_SUCCESS;
13 : }
14 :
15 89829 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
16 : {
17 : uint32_t v;
18 89829 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
19 89829 : *r = v;
20 89829 : return NDR_ERR_SUCCESS;
21 : }
22 :
23 2218 : _PUBLIC_ void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r)
24 : {
25 2218 : ndr_print_uint32(ndr, name, r);
26 2218 : ndr->depth++;
27 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DISABLED", ACB_DISABLED, r);
28 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_HOMDIRREQ", ACB_HOMDIRREQ, r);
29 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PWNOTREQ", ACB_PWNOTREQ, r);
30 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_TEMPDUP", ACB_TEMPDUP, r);
31 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NORMAL", ACB_NORMAL, r);
32 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_MNS", ACB_MNS, r);
33 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DOMTRUST", ACB_DOMTRUST, r);
34 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_WSTRUST", ACB_WSTRUST, r);
35 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_SVRTRUST", ACB_SVRTRUST, r);
36 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PWNOEXP", ACB_PWNOEXP, r);
37 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_AUTOLOCK", ACB_AUTOLOCK, r);
38 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_ENC_TXT_PWD_ALLOWED", ACB_ENC_TXT_PWD_ALLOWED, r);
39 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_SMARTCARD_REQUIRED", ACB_SMARTCARD_REQUIRED, r);
40 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_TRUSTED_FOR_DELEGATION", ACB_TRUSTED_FOR_DELEGATION, r);
41 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NOT_DELEGATED", ACB_NOT_DELEGATED, r);
42 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_USE_DES_KEY_ONLY", ACB_USE_DES_KEY_ONLY, r);
43 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DONT_REQUIRE_PREAUTH", ACB_DONT_REQUIRE_PREAUTH, r);
44 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PW_EXPIRED", ACB_PW_EXPIRED, r);
45 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION", ACB_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION, r);
46 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NO_AUTH_DATA_REQD", ACB_NO_AUTH_DATA_REQD, r);
47 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PARTIAL_SECRETS_ACCOUNT", ACB_PARTIAL_SECRETS_ACCOUNT, r);
48 2218 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_USE_AES_KEYS", ACB_USE_AES_KEYS, r);
49 2218 : ndr->depth--;
50 2218 : }
51 :
52 1903 : static enum ndr_err_code ndr_push_samr_ConnectAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
53 : {
54 1903 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
55 1903 : return NDR_ERR_SUCCESS;
56 : }
57 :
58 2113 : static enum ndr_err_code ndr_pull_samr_ConnectAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
59 : {
60 : uint32_t v;
61 2113 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
62 2113 : *r = v;
63 2113 : return NDR_ERR_SUCCESS;
64 : }
65 :
66 0 : _PUBLIC_ void ndr_print_samr_ConnectAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
67 : {
68 0 : ndr_print_uint32(ndr, name, r);
69 0 : ndr->depth++;
70 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_CONNECT_TO_SERVER", SAMR_ACCESS_CONNECT_TO_SERVER, r);
71 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_SHUTDOWN_SERVER", SAMR_ACCESS_SHUTDOWN_SERVER, r);
72 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_INITIALIZE_SERVER", SAMR_ACCESS_INITIALIZE_SERVER, r);
73 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_CREATE_DOMAIN", SAMR_ACCESS_CREATE_DOMAIN, r);
74 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_ENUM_DOMAINS", SAMR_ACCESS_ENUM_DOMAINS, r);
75 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_LOOKUP_DOMAIN", SAMR_ACCESS_LOOKUP_DOMAIN, r);
76 0 : ndr->depth--;
77 0 : }
78 :
79 3259 : static enum ndr_err_code ndr_push_samr_UserAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
80 : {
81 3259 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
82 3259 : return NDR_ERR_SUCCESS;
83 : }
84 :
85 3280 : static enum ndr_err_code ndr_pull_samr_UserAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
86 : {
87 : uint32_t v;
88 3280 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
89 3280 : *r = v;
90 3280 : return NDR_ERR_SUCCESS;
91 : }
92 :
93 0 : _PUBLIC_ void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
94 : {
95 0 : ndr_print_uint32(ndr, name, r);
96 0 : ndr->depth++;
97 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_NAME_ETC", SAMR_USER_ACCESS_GET_NAME_ETC, r);
98 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOCALE", SAMR_USER_ACCESS_GET_LOCALE, r);
99 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_LOC_COM", SAMR_USER_ACCESS_SET_LOC_COM, r);
100 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOGONINFO", SAMR_USER_ACCESS_GET_LOGONINFO, r);
101 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_ATTRIBUTES", SAMR_USER_ACCESS_GET_ATTRIBUTES, r);
102 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_ATTRIBUTES", SAMR_USER_ACCESS_SET_ATTRIBUTES, r);
103 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_PASSWORD", SAMR_USER_ACCESS_CHANGE_PASSWORD, r);
104 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_PASSWORD", SAMR_USER_ACCESS_SET_PASSWORD, r);
105 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUPS", SAMR_USER_ACCESS_GET_GROUPS, r);
106 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP, r);
107 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP, r);
108 0 : ndr->depth--;
109 0 : }
110 :
111 1621 : static enum ndr_err_code ndr_push_samr_DomainAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
112 : {
113 1621 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
114 1621 : return NDR_ERR_SUCCESS;
115 : }
116 :
117 1828 : static enum ndr_err_code ndr_pull_samr_DomainAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
118 : {
119 : uint32_t v;
120 1828 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
121 1828 : *r = v;
122 1828 : return NDR_ERR_SUCCESS;
123 : }
124 :
125 0 : _PUBLIC_ void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
126 : {
127 0 : ndr_print_uint32(ndr, name, r);
128 0 : ndr->depth++;
129 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1, r);
130 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_1", SAMR_DOMAIN_ACCESS_SET_INFO_1, r);
131 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2, r);
132 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_2", SAMR_DOMAIN_ACCESS_SET_INFO_2, r);
133 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_USER", SAMR_DOMAIN_ACCESS_CREATE_USER, r);
134 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_GROUP", SAMR_DOMAIN_ACCESS_CREATE_GROUP, r);
135 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_ALIAS", SAMR_DOMAIN_ACCESS_CREATE_ALIAS, r);
136 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS", SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS, r);
137 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS", SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS, r);
138 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT", SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT, r);
139 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_3", SAMR_DOMAIN_ACCESS_SET_INFO_3, r);
140 0 : ndr->depth--;
141 0 : }
142 :
143 1259 : static enum ndr_err_code ndr_push_samr_GroupAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
144 : {
145 1259 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
146 1259 : return NDR_ERR_SUCCESS;
147 : }
148 :
149 1259 : static enum ndr_err_code ndr_pull_samr_GroupAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
150 : {
151 : uint32_t v;
152 1259 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
153 1259 : *r = v;
154 1259 : return NDR_ERR_SUCCESS;
155 : }
156 :
157 0 : _PUBLIC_ void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
158 : {
159 0 : ndr_print_uint32(ndr, name, r);
160 0 : ndr->depth++;
161 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_LOOKUP_INFO", SAMR_GROUP_ACCESS_LOOKUP_INFO, r);
162 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_SET_INFO", SAMR_GROUP_ACCESS_SET_INFO, r);
163 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_ADD_MEMBER", SAMR_GROUP_ACCESS_ADD_MEMBER, r);
164 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_REMOVE_MEMBER", SAMR_GROUP_ACCESS_REMOVE_MEMBER, r);
165 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_GET_MEMBERS", SAMR_GROUP_ACCESS_GET_MEMBERS, r);
166 0 : ndr->depth--;
167 0 : }
168 :
169 985 : static enum ndr_err_code ndr_push_samr_AliasAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
170 : {
171 985 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
172 985 : return NDR_ERR_SUCCESS;
173 : }
174 :
175 985 : static enum ndr_err_code ndr_pull_samr_AliasAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
176 : {
177 : uint32_t v;
178 985 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
179 985 : *r = v;
180 985 : return NDR_ERR_SUCCESS;
181 : }
182 :
183 0 : _PUBLIC_ void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
184 : {
185 0 : ndr_print_uint32(ndr, name, r);
186 0 : ndr->depth++;
187 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_ADD_MEMBER", SAMR_ALIAS_ACCESS_ADD_MEMBER, r);
188 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_REMOVE_MEMBER", SAMR_ALIAS_ACCESS_REMOVE_MEMBER, r);
189 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_GET_MEMBERS", SAMR_ALIAS_ACCESS_GET_MEMBERS, r);
190 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_LOOKUP_INFO", SAMR_ALIAS_ACCESS_LOOKUP_INFO, r);
191 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_SET_INFO", SAMR_ALIAS_ACCESS_SET_INFO, r);
192 0 : ndr->depth--;
193 0 : }
194 :
195 5132 : static enum ndr_err_code ndr_push_samr_SamEntry(struct ndr_push *ndr, int ndr_flags, const struct samr_SamEntry *r)
196 : {
197 5132 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
198 5132 : if (ndr_flags & NDR_SCALARS) {
199 2566 : NDR_CHECK(ndr_push_align(ndr, 5));
200 2566 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
201 2566 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
202 2566 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
203 : }
204 5132 : if (ndr_flags & NDR_BUFFERS) {
205 2566 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
206 : }
207 5132 : return NDR_ERR_SUCCESS;
208 : }
209 :
210 4734 : static enum ndr_err_code ndr_pull_samr_SamEntry(struct ndr_pull *ndr, int ndr_flags, struct samr_SamEntry *r)
211 : {
212 4734 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
213 4734 : if (ndr_flags & NDR_SCALARS) {
214 2367 : NDR_CHECK(ndr_pull_align(ndr, 5));
215 2367 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
216 2367 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
217 2367 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
218 : }
219 4734 : if (ndr_flags & NDR_BUFFERS) {
220 2367 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
221 : }
222 4734 : return NDR_ERR_SUCCESS;
223 : }
224 :
225 36 : _PUBLIC_ void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r)
226 : {
227 36 : ndr_print_struct(ndr, name, "samr_SamEntry");
228 36 : if (r == NULL) { ndr_print_null(ndr); return; }
229 36 : ndr->depth++;
230 36 : ndr_print_uint32(ndr, "idx", r->idx);
231 36 : ndr_print_lsa_String(ndr, "name", &r->name);
232 36 : ndr->depth--;
233 : }
234 :
235 353 : static enum ndr_err_code ndr_push_samr_SamArray(struct ndr_push *ndr, int ndr_flags, const struct samr_SamArray *r)
236 : {
237 : uint32_t cntr_entries_1;
238 353 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
239 353 : if (ndr_flags & NDR_SCALARS) {
240 353 : NDR_CHECK(ndr_push_align(ndr, 5));
241 353 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
242 353 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
243 353 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
244 : }
245 353 : if (ndr_flags & NDR_BUFFERS) {
246 353 : if (r->entries) {
247 342 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
248 2908 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
249 2566 : NDR_CHECK(ndr_push_samr_SamEntry(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
250 : }
251 2908 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
252 2566 : NDR_CHECK(ndr_push_samr_SamEntry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
253 : }
254 : }
255 : }
256 353 : return NDR_ERR_SUCCESS;
257 : }
258 :
259 335 : static enum ndr_err_code ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r)
260 : {
261 : uint32_t _ptr_entries;
262 335 : uint32_t size_entries_1 = 0;
263 : uint32_t cntr_entries_1;
264 335 : TALLOC_CTX *_mem_save_entries_0 = NULL;
265 335 : TALLOC_CTX *_mem_save_entries_1 = NULL;
266 335 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
267 335 : if (ndr_flags & NDR_SCALARS) {
268 335 : NDR_CHECK(ndr_pull_align(ndr, 5));
269 335 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
270 335 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
271 335 : if (_ptr_entries) {
272 324 : NDR_PULL_ALLOC(ndr, r->entries);
273 : } else {
274 11 : r->entries = NULL;
275 : }
276 335 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
277 : }
278 335 : if (ndr_flags & NDR_BUFFERS) {
279 335 : if (r->entries) {
280 324 : _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
281 324 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
282 324 : NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
283 324 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
284 324 : NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
285 324 : _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
286 324 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
287 2691 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
288 2367 : NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
289 : }
290 2691 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
291 2367 : NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
292 : }
293 324 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
294 324 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
295 : }
296 335 : if (r->entries) {
297 324 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
298 : }
299 479 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
300 : }
301 : }
302 335 : return NDR_ERR_SUCCESS;
303 : }
304 :
305 4 : _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r)
306 : {
307 : uint32_t cntr_entries_1;
308 4 : ndr_print_struct(ndr, name, "samr_SamArray");
309 4 : if (r == NULL) { ndr_print_null(ndr); return; }
310 4 : ndr->depth++;
311 4 : ndr_print_uint32(ndr, "count", r->count);
312 4 : ndr_print_ptr(ndr, "entries", r->entries);
313 4 : ndr->depth++;
314 4 : if (r->entries) {
315 4 : ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
316 4 : ndr->depth++;
317 40 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
318 36 : ndr_print_samr_SamEntry(ndr, "entries", &r->entries[cntr_entries_1]);
319 : }
320 4 : ndr->depth--;
321 : }
322 4 : ndr->depth--;
323 4 : ndr->depth--;
324 : }
325 :
326 564 : static enum ndr_err_code ndr_push_samr_DomainInfoClass(struct ndr_push *ndr, int ndr_flags, enum samr_DomainInfoClass r)
327 : {
328 564 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
329 564 : return NDR_ERR_SUCCESS;
330 : }
331 :
332 568 : static enum ndr_err_code ndr_pull_samr_DomainInfoClass(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainInfoClass *r)
333 : {
334 : uint16_t v;
335 568 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
336 568 : *r = v;
337 568 : return NDR_ERR_SUCCESS;
338 : }
339 :
340 0 : _PUBLIC_ void ndr_print_samr_DomainInfoClass(struct ndr_print *ndr, const char *name, enum samr_DomainInfoClass r)
341 : {
342 0 : const char *val = NULL;
343 :
344 0 : switch (r) {
345 0 : case DomainPasswordInformation: val = "DomainPasswordInformation"; break;
346 0 : case DomainGeneralInformation: val = "DomainGeneralInformation"; break;
347 0 : case DomainLogoffInformation: val = "DomainLogoffInformation"; break;
348 0 : case DomainOemInformation: val = "DomainOemInformation"; break;
349 0 : case DomainNameInformation: val = "DomainNameInformation"; break;
350 0 : case DomainReplicationInformation: val = "DomainReplicationInformation"; break;
351 0 : case DomainServerRoleInformation: val = "DomainServerRoleInformation"; break;
352 0 : case DomainModifiedInformation: val = "DomainModifiedInformation"; break;
353 0 : case DomainStateInformation: val = "DomainStateInformation"; break;
354 0 : case DomainUasInformation: val = "DomainUasInformation"; break;
355 0 : case DomainGeneralInformation2: val = "DomainGeneralInformation2"; break;
356 0 : case DomainLockoutInformation: val = "DomainLockoutInformation"; break;
357 0 : case DomainModifiedInformation2: val = "DomainModifiedInformation2"; break;
358 : }
359 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
360 0 : }
361 :
362 133 : static enum ndr_err_code ndr_push_samr_Role(struct ndr_push *ndr, int ndr_flags, enum samr_Role r)
363 : {
364 133 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
365 133 : return NDR_ERR_SUCCESS;
366 : }
367 :
368 132 : static enum ndr_err_code ndr_pull_samr_Role(struct ndr_pull *ndr, int ndr_flags, enum samr_Role *r)
369 : {
370 : uint32_t v;
371 132 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
372 132 : *r = v;
373 132 : return NDR_ERR_SUCCESS;
374 : }
375 :
376 2 : _PUBLIC_ void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r)
377 : {
378 2 : const char *val = NULL;
379 :
380 2 : switch (r) {
381 0 : case SAMR_ROLE_STANDALONE: val = "SAMR_ROLE_STANDALONE"; break;
382 0 : case SAMR_ROLE_DOMAIN_MEMBER: val = "SAMR_ROLE_DOMAIN_MEMBER"; break;
383 0 : case SAMR_ROLE_DOMAIN_BDC: val = "SAMR_ROLE_DOMAIN_BDC"; break;
384 2 : case SAMR_ROLE_DOMAIN_PDC: val = "SAMR_ROLE_DOMAIN_PDC"; break;
385 : }
386 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
387 2 : }
388 :
389 3519 : _PUBLIC_ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r)
390 : {
391 3519 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
392 3519 : return NDR_ERR_SUCCESS;
393 : }
394 :
395 3091 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
396 : {
397 : uint32_t v;
398 3091 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
399 3091 : *r = v;
400 3091 : return NDR_ERR_SUCCESS;
401 : }
402 :
403 858 : _PUBLIC_ void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r)
404 : {
405 858 : ndr_print_uint32(ndr, name, r);
406 858 : ndr->depth++;
407 858 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_COMPLEX", DOMAIN_PASSWORD_COMPLEX, r);
408 858 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_ANON_CHANGE", DOMAIN_PASSWORD_NO_ANON_CHANGE, r);
409 858 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_CLEAR_CHANGE", DOMAIN_PASSWORD_NO_CLEAR_CHANGE, r);
410 858 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_LOCKOUT_ADMINS", DOMAIN_PASSWORD_LOCKOUT_ADMINS, r);
411 858 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_STORE_CLEARTEXT", DOMAIN_PASSWORD_STORE_CLEARTEXT, r);
412 858 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_REFUSE_PASSWORD_CHANGE", DOMAIN_REFUSE_PASSWORD_CHANGE, r);
413 858 : ndr->depth--;
414 858 : }
415 :
416 132 : static enum ndr_err_code ndr_push_samr_DomainServerState(struct ndr_push *ndr, int ndr_flags, enum samr_DomainServerState r)
417 : {
418 132 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
419 132 : return NDR_ERR_SUCCESS;
420 : }
421 :
422 131 : static enum ndr_err_code ndr_pull_samr_DomainServerState(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainServerState *r)
423 : {
424 : uint32_t v;
425 131 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
426 131 : *r = v;
427 131 : return NDR_ERR_SUCCESS;
428 : }
429 :
430 2 : _PUBLIC_ void ndr_print_samr_DomainServerState(struct ndr_print *ndr, const char *name, enum samr_DomainServerState r)
431 : {
432 2 : const char *val = NULL;
433 :
434 2 : switch (r) {
435 0 : case DOMAIN_SERVER_ENABLED: val = "DOMAIN_SERVER_ENABLED"; break;
436 0 : case DOMAIN_SERVER_DISABLED: val = "DOMAIN_SERVER_DISABLED"; break;
437 : }
438 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
439 2 : }
440 :
441 296 : _PUBLIC_ enum ndr_err_code ndr_push_samr_DomInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo1 *r)
442 : {
443 296 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
444 296 : if (ndr_flags & NDR_SCALARS) {
445 296 : NDR_CHECK(ndr_push_align(ndr, 4));
446 296 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
447 296 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length));
448 296 : NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties));
449 296 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age));
450 296 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age));
451 296 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
452 : }
453 296 : if (ndr_flags & NDR_BUFFERS) {
454 : }
455 296 : return NDR_ERR_SUCCESS;
456 : }
457 :
458 295 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo1 *r)
459 : {
460 295 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
461 295 : if (ndr_flags & NDR_SCALARS) {
462 295 : NDR_CHECK(ndr_pull_align(ndr, 4));
463 295 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
464 295 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length));
465 295 : NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties));
466 295 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age));
467 295 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age));
468 295 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
469 : }
470 295 : if (ndr_flags & NDR_BUFFERS) {
471 : }
472 295 : return NDR_ERR_SUCCESS;
473 : }
474 :
475 0 : static void ndr_print_flags_samr_DomInfo1(struct ndr_print *ndr, const char *name, int unused, const struct samr_DomInfo1 *r)
476 : {
477 0 : ndr_print_samr_DomInfo1(ndr, name, r);
478 0 : }
479 :
480 2 : _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r)
481 : {
482 2 : ndr_print_struct(ndr, name, "samr_DomInfo1");
483 2 : if (r == NULL) { ndr_print_null(ndr); return; }
484 2 : ndr->depth++;
485 2 : ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
486 2 : ndr_print_uint16(ndr, "password_history_length", r->password_history_length);
487 2 : ndr_print_samr_PasswordProperties(ndr, "password_properties", r->password_properties);
488 2 : ndr_print_dlong(ndr, "max_password_age", r->max_password_age);
489 2 : ndr_print_dlong(ndr, "min_password_age", r->min_password_age);
490 2 : ndr->depth--;
491 : }
492 :
493 216 : static enum ndr_err_code ndr_push_samr_DomGeneralInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation *r)
494 : {
495 216 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
496 216 : if (ndr_flags & NDR_SCALARS) {
497 108 : NDR_CHECK(ndr_push_align(ndr, 5));
498 108 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time));
499 108 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
500 108 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
501 108 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary));
502 108 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
503 108 : NDR_CHECK(ndr_push_samr_DomainServerState(ndr, NDR_SCALARS, r->domain_server_state));
504 108 : NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role));
505 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
506 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
507 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_groups));
508 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aliases));
509 108 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
510 : }
511 216 : if (ndr_flags & NDR_BUFFERS) {
512 108 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
513 108 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
514 108 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary));
515 : }
516 216 : return NDR_ERR_SUCCESS;
517 : }
518 :
519 214 : static enum ndr_err_code ndr_pull_samr_DomGeneralInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation *r)
520 : {
521 214 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
522 214 : if (ndr_flags & NDR_SCALARS) {
523 107 : NDR_CHECK(ndr_pull_align(ndr, 5));
524 107 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time));
525 107 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
526 107 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
527 107 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary));
528 107 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
529 107 : NDR_CHECK(ndr_pull_samr_DomainServerState(ndr, NDR_SCALARS, &r->domain_server_state));
530 107 : NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role));
531 107 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
532 107 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
533 107 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_groups));
534 107 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aliases));
535 107 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
536 : }
537 214 : if (ndr_flags & NDR_BUFFERS) {
538 107 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
539 107 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
540 107 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary));
541 : }
542 214 : return NDR_ERR_SUCCESS;
543 : }
544 :
545 2 : _PUBLIC_ void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r)
546 : {
547 2 : ndr_print_struct(ndr, name, "samr_DomGeneralInformation");
548 2 : if (r == NULL) { ndr_print_null(ndr); return; }
549 2 : ndr->depth++;
550 2 : ndr_print_NTTIME(ndr, "force_logoff_time", r->force_logoff_time);
551 2 : ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
552 2 : ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
553 2 : ndr_print_lsa_String(ndr, "primary", &r->primary);
554 2 : ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
555 2 : ndr_print_samr_DomainServerState(ndr, "domain_server_state", r->domain_server_state);
556 2 : ndr_print_samr_Role(ndr, "role", r->role);
557 2 : ndr_print_uint32(ndr, "unknown3", r->unknown3);
558 2 : ndr_print_uint32(ndr, "num_users", r->num_users);
559 2 : ndr_print_uint32(ndr, "num_groups", r->num_groups);
560 2 : ndr_print_uint32(ndr, "num_aliases", r->num_aliases);
561 2 : ndr->depth--;
562 : }
563 :
564 29 : static enum ndr_err_code ndr_push_samr_DomInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo3 *r)
565 : {
566 29 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
567 29 : if (ndr_flags & NDR_SCALARS) {
568 29 : NDR_CHECK(ndr_push_align(ndr, 4));
569 29 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time));
570 29 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
571 : }
572 29 : if (ndr_flags & NDR_BUFFERS) {
573 : }
574 29 : return NDR_ERR_SUCCESS;
575 : }
576 :
577 29 : static enum ndr_err_code ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo3 *r)
578 : {
579 29 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
580 29 : if (ndr_flags & NDR_SCALARS) {
581 29 : NDR_CHECK(ndr_pull_align(ndr, 4));
582 29 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time));
583 29 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
584 : }
585 29 : if (ndr_flags & NDR_BUFFERS) {
586 : }
587 29 : return NDR_ERR_SUCCESS;
588 : }
589 :
590 0 : _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r)
591 : {
592 0 : ndr_print_struct(ndr, name, "samr_DomInfo3");
593 0 : if (r == NULL) { ndr_print_null(ndr); return; }
594 0 : ndr->depth++;
595 0 : ndr_print_NTTIME(ndr, "force_logoff_time", r->force_logoff_time);
596 0 : ndr->depth--;
597 : }
598 :
599 60 : static enum ndr_err_code ndr_push_samr_DomOEMInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomOEMInformation *r)
600 : {
601 60 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
602 60 : if (ndr_flags & NDR_SCALARS) {
603 30 : NDR_CHECK(ndr_push_align(ndr, 5));
604 30 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
605 30 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
606 : }
607 60 : if (ndr_flags & NDR_BUFFERS) {
608 30 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
609 : }
610 60 : return NDR_ERR_SUCCESS;
611 : }
612 :
613 60 : static enum ndr_err_code ndr_pull_samr_DomOEMInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomOEMInformation *r)
614 : {
615 60 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
616 60 : if (ndr_flags & NDR_SCALARS) {
617 30 : NDR_CHECK(ndr_pull_align(ndr, 5));
618 30 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
619 30 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
620 : }
621 60 : if (ndr_flags & NDR_BUFFERS) {
622 30 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
623 : }
624 60 : return NDR_ERR_SUCCESS;
625 : }
626 :
627 0 : _PUBLIC_ void ndr_print_samr_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *r)
628 : {
629 0 : ndr_print_struct(ndr, name, "samr_DomOEMInformation");
630 0 : if (r == NULL) { ndr_print_null(ndr); return; }
631 0 : ndr->depth++;
632 0 : ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
633 0 : ndr->depth--;
634 : }
635 :
636 50 : static enum ndr_err_code ndr_push_samr_DomInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo5 *r)
637 : {
638 50 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
639 50 : if (ndr_flags & NDR_SCALARS) {
640 25 : NDR_CHECK(ndr_push_align(ndr, 5));
641 25 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
642 25 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
643 : }
644 50 : if (ndr_flags & NDR_BUFFERS) {
645 25 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
646 : }
647 50 : return NDR_ERR_SUCCESS;
648 : }
649 :
650 50 : static enum ndr_err_code ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo5 *r)
651 : {
652 50 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
653 50 : if (ndr_flags & NDR_SCALARS) {
654 25 : NDR_CHECK(ndr_pull_align(ndr, 5));
655 25 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
656 25 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
657 : }
658 50 : if (ndr_flags & NDR_BUFFERS) {
659 25 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
660 : }
661 50 : return NDR_ERR_SUCCESS;
662 : }
663 :
664 0 : _PUBLIC_ void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r)
665 : {
666 0 : ndr_print_struct(ndr, name, "samr_DomInfo5");
667 0 : if (r == NULL) { ndr_print_null(ndr); return; }
668 0 : ndr->depth++;
669 0 : ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
670 0 : ndr->depth--;
671 : }
672 :
673 50 : static enum ndr_err_code ndr_push_samr_DomInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo6 *r)
674 : {
675 50 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
676 50 : if (ndr_flags & NDR_SCALARS) {
677 25 : NDR_CHECK(ndr_push_align(ndr, 5));
678 25 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary));
679 25 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
680 : }
681 50 : if (ndr_flags & NDR_BUFFERS) {
682 25 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary));
683 : }
684 50 : return NDR_ERR_SUCCESS;
685 : }
686 :
687 50 : static enum ndr_err_code ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo6 *r)
688 : {
689 50 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
690 50 : if (ndr_flags & NDR_SCALARS) {
691 25 : NDR_CHECK(ndr_pull_align(ndr, 5));
692 25 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary));
693 25 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
694 : }
695 50 : if (ndr_flags & NDR_BUFFERS) {
696 25 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary));
697 : }
698 50 : return NDR_ERR_SUCCESS;
699 : }
700 :
701 0 : _PUBLIC_ void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r)
702 : {
703 0 : ndr_print_struct(ndr, name, "samr_DomInfo6");
704 0 : if (r == NULL) { ndr_print_null(ndr); return; }
705 0 : ndr->depth++;
706 0 : ndr_print_lsa_String(ndr, "primary", &r->primary);
707 0 : ndr->depth--;
708 : }
709 :
710 25 : static enum ndr_err_code ndr_push_samr_DomInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo7 *r)
711 : {
712 25 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
713 25 : if (ndr_flags & NDR_SCALARS) {
714 25 : NDR_CHECK(ndr_push_align(ndr, 4));
715 25 : NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role));
716 25 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
717 : }
718 25 : if (ndr_flags & NDR_BUFFERS) {
719 : }
720 25 : return NDR_ERR_SUCCESS;
721 : }
722 :
723 25 : static enum ndr_err_code ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo7 *r)
724 : {
725 25 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
726 25 : if (ndr_flags & NDR_SCALARS) {
727 25 : NDR_CHECK(ndr_pull_align(ndr, 4));
728 25 : NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role));
729 25 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
730 : }
731 25 : if (ndr_flags & NDR_BUFFERS) {
732 : }
733 25 : return NDR_ERR_SUCCESS;
734 : }
735 :
736 0 : _PUBLIC_ void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r)
737 : {
738 0 : ndr_print_struct(ndr, name, "samr_DomInfo7");
739 0 : if (r == NULL) { ndr_print_null(ndr); return; }
740 0 : ndr->depth++;
741 0 : ndr_print_samr_Role(ndr, "role", r->role);
742 0 : ndr->depth--;
743 : }
744 :
745 30 : static enum ndr_err_code ndr_push_samr_DomInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo8 *r)
746 : {
747 30 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
748 30 : if (ndr_flags & NDR_SCALARS) {
749 30 : NDR_CHECK(ndr_push_align(ndr, 8));
750 30 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num));
751 30 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
752 30 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
753 : }
754 30 : if (ndr_flags & NDR_BUFFERS) {
755 : }
756 30 : return NDR_ERR_SUCCESS;
757 : }
758 :
759 29 : static enum ndr_err_code ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo8 *r)
760 : {
761 29 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
762 29 : if (ndr_flags & NDR_SCALARS) {
763 29 : NDR_CHECK(ndr_pull_align(ndr, 8));
764 29 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num));
765 29 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
766 29 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
767 : }
768 29 : if (ndr_flags & NDR_BUFFERS) {
769 : }
770 29 : return NDR_ERR_SUCCESS;
771 : }
772 :
773 2 : _PUBLIC_ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r)
774 : {
775 2 : ndr_print_struct(ndr, name, "samr_DomInfo8");
776 2 : if (r == NULL) { ndr_print_null(ndr); return; }
777 2 : ndr->depth++;
778 2 : ndr_print_hyper(ndr, "sequence_num", r->sequence_num);
779 2 : ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
780 2 : ndr->depth--;
781 : }
782 :
783 24 : static enum ndr_err_code ndr_push_samr_DomInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo9 *r)
784 : {
785 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
786 24 : if (ndr_flags & NDR_SCALARS) {
787 24 : NDR_CHECK(ndr_push_align(ndr, 4));
788 24 : NDR_CHECK(ndr_push_samr_DomainServerState(ndr, NDR_SCALARS, r->domain_server_state));
789 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
790 : }
791 24 : if (ndr_flags & NDR_BUFFERS) {
792 : }
793 24 : return NDR_ERR_SUCCESS;
794 : }
795 :
796 24 : static enum ndr_err_code ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo9 *r)
797 : {
798 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
799 24 : if (ndr_flags & NDR_SCALARS) {
800 24 : NDR_CHECK(ndr_pull_align(ndr, 4));
801 24 : NDR_CHECK(ndr_pull_samr_DomainServerState(ndr, NDR_SCALARS, &r->domain_server_state));
802 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
803 : }
804 24 : if (ndr_flags & NDR_BUFFERS) {
805 : }
806 24 : return NDR_ERR_SUCCESS;
807 : }
808 :
809 0 : _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r)
810 : {
811 0 : ndr_print_struct(ndr, name, "samr_DomInfo9");
812 0 : if (r == NULL) { ndr_print_null(ndr); return; }
813 0 : ndr->depth++;
814 0 : ndr_print_samr_DomainServerState(ndr, "domain_server_state", r->domain_server_state);
815 0 : ndr->depth--;
816 : }
817 :
818 48 : static enum ndr_err_code ndr_push_samr_DomGeneralInformation2(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation2 *r)
819 : {
820 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
821 48 : if (ndr_flags & NDR_SCALARS) {
822 24 : NDR_CHECK(ndr_push_align(ndr, 8));
823 24 : NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
824 24 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration));
825 24 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window));
826 24 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold));
827 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
828 : }
829 48 : if (ndr_flags & NDR_BUFFERS) {
830 24 : NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
831 : }
832 48 : return NDR_ERR_SUCCESS;
833 : }
834 :
835 48 : static enum ndr_err_code ndr_pull_samr_DomGeneralInformation2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation2 *r)
836 : {
837 48 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
838 48 : if (ndr_flags & NDR_SCALARS) {
839 24 : NDR_CHECK(ndr_pull_align(ndr, 8));
840 24 : NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
841 24 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration));
842 24 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window));
843 24 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold));
844 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
845 : }
846 48 : if (ndr_flags & NDR_BUFFERS) {
847 24 : NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
848 : }
849 48 : return NDR_ERR_SUCCESS;
850 : }
851 :
852 0 : _PUBLIC_ void ndr_print_samr_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *r)
853 : {
854 0 : ndr_print_struct(ndr, name, "samr_DomGeneralInformation2");
855 0 : if (r == NULL) { ndr_print_null(ndr); return; }
856 0 : ndr->depth++;
857 0 : ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general);
858 0 : ndr_print_hyper(ndr, "lockout_duration", r->lockout_duration);
859 0 : ndr_print_hyper(ndr, "lockout_window", r->lockout_window);
860 0 : ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold);
861 0 : ndr->depth--;
862 : }
863 :
864 106 : static enum ndr_err_code ndr_push_samr_DomInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo12 *r)
865 : {
866 106 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
867 106 : if (ndr_flags & NDR_SCALARS) {
868 106 : NDR_CHECK(ndr_push_align(ndr, 8));
869 106 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration));
870 106 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window));
871 106 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold));
872 106 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
873 : }
874 106 : if (ndr_flags & NDR_BUFFERS) {
875 : }
876 106 : return NDR_ERR_SUCCESS;
877 : }
878 :
879 101 : static enum ndr_err_code ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo12 *r)
880 : {
881 101 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
882 101 : if (ndr_flags & NDR_SCALARS) {
883 101 : NDR_CHECK(ndr_pull_align(ndr, 8));
884 101 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration));
885 101 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window));
886 101 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold));
887 101 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
888 : }
889 101 : if (ndr_flags & NDR_BUFFERS) {
890 : }
891 101 : return NDR_ERR_SUCCESS;
892 : }
893 :
894 2 : _PUBLIC_ void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r)
895 : {
896 2 : ndr_print_struct(ndr, name, "samr_DomInfo12");
897 2 : if (r == NULL) { ndr_print_null(ndr); return; }
898 2 : ndr->depth++;
899 2 : ndr_print_hyper(ndr, "lockout_duration", r->lockout_duration);
900 2 : ndr_print_hyper(ndr, "lockout_window", r->lockout_window);
901 2 : ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold);
902 2 : ndr->depth--;
903 : }
904 :
905 24 : static enum ndr_err_code ndr_push_samr_DomInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo13 *r)
906 : {
907 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
908 24 : if (ndr_flags & NDR_SCALARS) {
909 24 : NDR_CHECK(ndr_push_align(ndr, 8));
910 24 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num));
911 24 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
912 24 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_count_at_last_promotion));
913 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
914 : }
915 24 : if (ndr_flags & NDR_BUFFERS) {
916 : }
917 24 : return NDR_ERR_SUCCESS;
918 : }
919 :
920 24 : static enum ndr_err_code ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo13 *r)
921 : {
922 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
923 24 : if (ndr_flags & NDR_SCALARS) {
924 24 : NDR_CHECK(ndr_pull_align(ndr, 8));
925 24 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num));
926 24 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
927 24 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_count_at_last_promotion));
928 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
929 : }
930 24 : if (ndr_flags & NDR_BUFFERS) {
931 : }
932 24 : return NDR_ERR_SUCCESS;
933 : }
934 :
935 0 : _PUBLIC_ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r)
936 : {
937 0 : ndr_print_struct(ndr, name, "samr_DomInfo13");
938 0 : if (r == NULL) { ndr_print_null(ndr); return; }
939 0 : ndr->depth++;
940 0 : ndr_print_hyper(ndr, "sequence_num", r->sequence_num);
941 0 : ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
942 0 : ndr_print_hyper(ndr, "modified_count_at_last_promotion", r->modified_count_at_last_promotion);
943 0 : ndr->depth--;
944 : }
945 :
946 572 : static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const union samr_DomainInfo *r)
947 : {
948 : uint32_t level;
949 572 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
950 572 : if (ndr_flags & NDR_SCALARS) {
951 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
952 572 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
953 572 : NDR_CHECK(ndr_push_union_align(ndr, 8));
954 572 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
955 572 : NDR_CHECK(ndr_push_union_align(ndr, 8));
956 572 : switch (level) {
957 146 : case 1: {
958 146 : NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1));
959 146 : break; }
960 :
961 84 : case 2: {
962 84 : NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
963 84 : break; }
964 :
965 29 : case 3: {
966 29 : NDR_CHECK(ndr_push_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3));
967 29 : break; }
968 :
969 30 : case 4: {
970 30 : NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
971 30 : break; }
972 :
973 25 : case 5: {
974 25 : NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5));
975 25 : break; }
976 :
977 25 : case 6: {
978 25 : NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6));
979 25 : break; }
980 :
981 25 : case 7: {
982 25 : NDR_CHECK(ndr_push_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7));
983 25 : break; }
984 :
985 30 : case 8: {
986 30 : NDR_CHECK(ndr_push_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8));
987 30 : break; }
988 :
989 24 : case 9: {
990 24 : NDR_CHECK(ndr_push_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9));
991 24 : break; }
992 :
993 24 : case 11: {
994 24 : NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
995 24 : break; }
996 :
997 106 : case 12: {
998 106 : NDR_CHECK(ndr_push_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12));
999 106 : break; }
1000 :
1001 24 : case 13: {
1002 24 : NDR_CHECK(ndr_push_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13));
1003 24 : break; }
1004 :
1005 0 : default:
1006 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1007 : }
1008 0 : }
1009 572 : if (ndr_flags & NDR_BUFFERS) {
1010 572 : if (!(ndr_flags & NDR_SCALARS)) {
1011 : /* We didn't get it above, and the token is not needed after this. */
1012 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1013 : }
1014 572 : switch (level) {
1015 146 : case 1:
1016 146 : break;
1017 :
1018 84 : case 2:
1019 84 : NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
1020 84 : break;
1021 :
1022 29 : case 3:
1023 29 : break;
1024 :
1025 30 : case 4:
1026 30 : NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
1027 30 : break;
1028 :
1029 25 : case 5:
1030 25 : NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5));
1031 25 : break;
1032 :
1033 25 : case 6:
1034 25 : NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6));
1035 25 : break;
1036 :
1037 25 : case 7:
1038 25 : break;
1039 :
1040 30 : case 8:
1041 30 : break;
1042 :
1043 24 : case 9:
1044 24 : break;
1045 :
1046 24 : case 11:
1047 24 : NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
1048 24 : break;
1049 :
1050 106 : case 12:
1051 106 : break;
1052 :
1053 24 : case 13:
1054 24 : break;
1055 :
1056 0 : default:
1057 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1058 : }
1059 0 : }
1060 572 : return NDR_ERR_SUCCESS;
1061 : }
1062 :
1063 564 : static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, union samr_DomainInfo *r)
1064 : {
1065 : uint32_t level;
1066 : uint16_t _level;
1067 564 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1068 564 : if (ndr_flags & NDR_SCALARS) {
1069 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1070 564 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1071 564 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
1072 564 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
1073 564 : if (_level != level) {
1074 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1075 : }
1076 564 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
1077 564 : switch (level) {
1078 145 : case 1: {
1079 145 : NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1));
1080 145 : break; }
1081 :
1082 83 : case 2: {
1083 83 : NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
1084 83 : break; }
1085 :
1086 29 : case 3: {
1087 29 : NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3));
1088 29 : break; }
1089 :
1090 30 : case 4: {
1091 30 : NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
1092 30 : break; }
1093 :
1094 25 : case 5: {
1095 25 : NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5));
1096 25 : break; }
1097 :
1098 25 : case 6: {
1099 25 : NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6));
1100 25 : break; }
1101 :
1102 25 : case 7: {
1103 25 : NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7));
1104 25 : break; }
1105 :
1106 29 : case 8: {
1107 29 : NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8));
1108 29 : break; }
1109 :
1110 24 : case 9: {
1111 24 : NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9));
1112 24 : break; }
1113 :
1114 24 : case 11: {
1115 24 : NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
1116 24 : break; }
1117 :
1118 101 : case 12: {
1119 101 : NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12));
1120 101 : break; }
1121 :
1122 24 : case 13: {
1123 24 : NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13));
1124 24 : break; }
1125 :
1126 0 : default:
1127 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1128 : }
1129 0 : }
1130 564 : if (ndr_flags & NDR_BUFFERS) {
1131 564 : if (!(ndr_flags & NDR_SCALARS)) {
1132 : /* We didn't get it above, and the token is not needed after this. */
1133 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1134 : }
1135 564 : switch (level) {
1136 145 : case 1:
1137 145 : break;
1138 :
1139 83 : case 2:
1140 83 : NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
1141 83 : break;
1142 :
1143 29 : case 3:
1144 29 : break;
1145 :
1146 30 : case 4:
1147 30 : NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
1148 30 : break;
1149 :
1150 25 : case 5:
1151 25 : NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5));
1152 25 : break;
1153 :
1154 25 : case 6:
1155 25 : NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6));
1156 25 : break;
1157 :
1158 25 : case 7:
1159 25 : break;
1160 :
1161 29 : case 8:
1162 29 : break;
1163 :
1164 24 : case 9:
1165 24 : break;
1166 :
1167 24 : case 11:
1168 24 : NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
1169 24 : break;
1170 :
1171 101 : case 12:
1172 101 : break;
1173 :
1174 24 : case 13:
1175 24 : break;
1176 :
1177 0 : default:
1178 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1179 : }
1180 0 : }
1181 564 : return NDR_ERR_SUCCESS;
1182 : }
1183 :
1184 8 : _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r)
1185 : {
1186 : uint32_t level;
1187 8 : level = ndr_print_steal_switch_value(ndr, r);
1188 8 : ndr_print_union(ndr, name, level, "samr_DomainInfo");
1189 8 : switch (level) {
1190 2 : case 1:
1191 2 : ndr_print_samr_DomInfo1(ndr, "info1", &r->info1);
1192 2 : break;
1193 :
1194 2 : case 2:
1195 2 : ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general);
1196 2 : break;
1197 :
1198 0 : case 3:
1199 0 : ndr_print_samr_DomInfo3(ndr, "info3", &r->info3);
1200 0 : break;
1201 :
1202 0 : case 4:
1203 0 : ndr_print_samr_DomOEMInformation(ndr, "oem", &r->oem);
1204 0 : break;
1205 :
1206 0 : case 5:
1207 0 : ndr_print_samr_DomInfo5(ndr, "info5", &r->info5);
1208 0 : break;
1209 :
1210 0 : case 6:
1211 0 : ndr_print_samr_DomInfo6(ndr, "info6", &r->info6);
1212 0 : break;
1213 :
1214 0 : case 7:
1215 0 : ndr_print_samr_DomInfo7(ndr, "info7", &r->info7);
1216 0 : break;
1217 :
1218 2 : case 8:
1219 2 : ndr_print_samr_DomInfo8(ndr, "info8", &r->info8);
1220 2 : break;
1221 :
1222 0 : case 9:
1223 0 : ndr_print_samr_DomInfo9(ndr, "info9", &r->info9);
1224 0 : break;
1225 :
1226 0 : case 11:
1227 0 : ndr_print_samr_DomGeneralInformation2(ndr, "general2", &r->general2);
1228 0 : break;
1229 :
1230 2 : case 12:
1231 2 : ndr_print_samr_DomInfo12(ndr, "info12", &r->info12);
1232 2 : break;
1233 :
1234 0 : case 13:
1235 0 : ndr_print_samr_DomInfo13(ndr, "info13", &r->info13);
1236 0 : break;
1237 :
1238 0 : default:
1239 0 : ndr_print_bad_level(ndr, name, level);
1240 : }
1241 8 : }
1242 :
1243 7324 : static enum ndr_err_code ndr_push_samr_Ids(struct ndr_push *ndr, int ndr_flags, const struct samr_Ids *r)
1244 : {
1245 : uint32_t cntr_ids_1;
1246 7324 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1247 7324 : if (ndr_flags & NDR_SCALARS) {
1248 7324 : NDR_CHECK(ndr_push_align(ndr, 5));
1249 7324 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1250 7324 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ids));
1251 7324 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1252 : }
1253 7324 : if (ndr_flags & NDR_BUFFERS) {
1254 7324 : if (r->ids) {
1255 6676 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1256 14559 : for (cntr_ids_1 = 0; cntr_ids_1 < (r->count); cntr_ids_1++) {
1257 7883 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ids[cntr_ids_1]));
1258 : }
1259 : }
1260 : }
1261 7324 : return NDR_ERR_SUCCESS;
1262 : }
1263 :
1264 4577 : static enum ndr_err_code ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags, struct samr_Ids *r)
1265 : {
1266 : uint32_t _ptr_ids;
1267 4577 : uint32_t size_ids_1 = 0;
1268 : uint32_t cntr_ids_1;
1269 4577 : TALLOC_CTX *_mem_save_ids_0 = NULL;
1270 4577 : TALLOC_CTX *_mem_save_ids_1 = NULL;
1271 4577 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1272 4577 : if (ndr_flags & NDR_SCALARS) {
1273 4577 : NDR_CHECK(ndr_pull_align(ndr, 5));
1274 4577 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1275 4577 : if (r->count > 1024) {
1276 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1277 : }
1278 4577 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ids));
1279 4577 : if (_ptr_ids) {
1280 3929 : NDR_PULL_ALLOC(ndr, r->ids);
1281 : } else {
1282 648 : r->ids = NULL;
1283 : }
1284 4577 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1285 : }
1286 4577 : if (ndr_flags & NDR_BUFFERS) {
1287 4577 : if (r->ids) {
1288 3929 : _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1289 3929 : NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
1290 3929 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ids));
1291 3929 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ids, &size_ids_1));
1292 3929 : NDR_PULL_ALLOC_N(ndr, r->ids, size_ids_1);
1293 3929 : _mem_save_ids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1294 3929 : NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
1295 9119 : for (cntr_ids_1 = 0; cntr_ids_1 < (size_ids_1); cntr_ids_1++) {
1296 5190 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ids[cntr_ids_1]));
1297 : }
1298 3929 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_1, 0);
1299 3929 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, 0);
1300 : }
1301 4577 : if (r->ids) {
1302 3929 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->ids, r->count));
1303 : }
1304 : }
1305 4577 : return NDR_ERR_SUCCESS;
1306 : }
1307 :
1308 462 : _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r)
1309 : {
1310 : uint32_t cntr_ids_1;
1311 462 : ndr_print_struct(ndr, name, "samr_Ids");
1312 462 : if (r == NULL) { ndr_print_null(ndr); return; }
1313 462 : ndr->depth++;
1314 462 : ndr_print_uint32(ndr, "count", r->count);
1315 462 : ndr_print_ptr(ndr, "ids", r->ids);
1316 462 : ndr->depth++;
1317 462 : if (r->ids) {
1318 462 : ndr->print(ndr, "%s: ARRAY(%d)", "ids", (int)r->count);
1319 462 : ndr->depth++;
1320 914 : for (cntr_ids_1 = 0; cntr_ids_1 < (r->count); cntr_ids_1++) {
1321 452 : ndr_print_uint32(ndr, "ids", r->ids[cntr_ids_1]);
1322 : }
1323 462 : ndr->depth--;
1324 : }
1325 462 : ndr->depth--;
1326 462 : ndr->depth--;
1327 : }
1328 :
1329 206 : static enum ndr_err_code ndr_push_samr_GroupInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAll *r)
1330 : {
1331 206 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1332 206 : if (ndr_flags & NDR_SCALARS) {
1333 103 : NDR_CHECK(ndr_push_align(ndr, 5));
1334 103 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1335 103 : NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
1336 103 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members));
1337 103 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1338 103 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1339 : }
1340 206 : if (ndr_flags & NDR_BUFFERS) {
1341 103 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1342 103 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1343 : }
1344 206 : return NDR_ERR_SUCCESS;
1345 : }
1346 :
1347 200 : static enum ndr_err_code ndr_pull_samr_GroupInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAll *r)
1348 : {
1349 200 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1350 200 : if (ndr_flags & NDR_SCALARS) {
1351 100 : NDR_CHECK(ndr_pull_align(ndr, 5));
1352 100 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1353 100 : NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
1354 100 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members));
1355 100 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1356 100 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1357 : }
1358 200 : if (ndr_flags & NDR_BUFFERS) {
1359 100 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1360 100 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1361 : }
1362 200 : return NDR_ERR_SUCCESS;
1363 : }
1364 :
1365 6 : _PUBLIC_ void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r)
1366 : {
1367 6 : ndr_print_struct(ndr, name, "samr_GroupInfoAll");
1368 6 : if (r == NULL) { ndr_print_null(ndr); return; }
1369 6 : ndr->depth++;
1370 6 : ndr_print_lsa_String(ndr, "name", &r->name);
1371 6 : ndr_print_security_GroupAttrs(ndr, "attributes", r->attributes);
1372 6 : ndr_print_uint32(ndr, "num_members", r->num_members);
1373 6 : ndr_print_lsa_String(ndr, "description", &r->description);
1374 6 : ndr->depth--;
1375 : }
1376 :
1377 48 : static enum ndr_err_code ndr_push_samr_GroupInfoAttributes(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAttributes *r)
1378 : {
1379 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1380 48 : if (ndr_flags & NDR_SCALARS) {
1381 48 : NDR_CHECK(ndr_push_align(ndr, 4));
1382 48 : NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
1383 48 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1384 : }
1385 48 : if (ndr_flags & NDR_BUFFERS) {
1386 : }
1387 48 : return NDR_ERR_SUCCESS;
1388 : }
1389 :
1390 48 : static enum ndr_err_code ndr_pull_samr_GroupInfoAttributes(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAttributes *r)
1391 : {
1392 48 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1393 48 : if (ndr_flags & NDR_SCALARS) {
1394 48 : NDR_CHECK(ndr_pull_align(ndr, 4));
1395 48 : NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
1396 48 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1397 : }
1398 48 : if (ndr_flags & NDR_BUFFERS) {
1399 : }
1400 48 : return NDR_ERR_SUCCESS;
1401 : }
1402 :
1403 0 : _PUBLIC_ void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r)
1404 : {
1405 0 : ndr_print_struct(ndr, name, "samr_GroupInfoAttributes");
1406 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1407 0 : ndr->depth++;
1408 0 : ndr_print_security_GroupAttrs(ndr, "attributes", r->attributes);
1409 0 : ndr->depth--;
1410 : }
1411 :
1412 485 : static enum ndr_err_code ndr_push_samr_GroupInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_GroupInfoEnum r)
1413 : {
1414 485 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1415 485 : return NDR_ERR_SUCCESS;
1416 : }
1417 :
1418 241 : static enum ndr_err_code ndr_pull_samr_GroupInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_GroupInfoEnum *r)
1419 : {
1420 : uint16_t v;
1421 241 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1422 241 : *r = v;
1423 241 : return NDR_ERR_SUCCESS;
1424 : }
1425 :
1426 0 : _PUBLIC_ void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r)
1427 : {
1428 0 : const char *val = NULL;
1429 :
1430 0 : switch (r) {
1431 0 : case GROUPINFOALL: val = "GROUPINFOALL"; break;
1432 0 : case GROUPINFONAME: val = "GROUPINFONAME"; break;
1433 0 : case GROUPINFOATTRIBUTES: val = "GROUPINFOATTRIBUTES"; break;
1434 0 : case GROUPINFODESCRIPTION: val = "GROUPINFODESCRIPTION"; break;
1435 0 : case GROUPINFOALL2: val = "GROUPINFOALL2"; break;
1436 : }
1437 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1438 0 : }
1439 :
1440 244 : static enum ndr_err_code ndr_push_samr_GroupInfo(struct ndr_push *ndr, int ndr_flags, const union samr_GroupInfo *r)
1441 : {
1442 : uint32_t level;
1443 244 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1444 244 : if (ndr_flags & NDR_SCALARS) {
1445 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1446 244 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1447 244 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1448 244 : NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, level));
1449 244 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1450 244 : switch (level) {
1451 49 : case GROUPINFOALL: {
1452 49 : NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all));
1453 49 : break; }
1454 :
1455 47 : case GROUPINFONAME: {
1456 47 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1457 47 : break; }
1458 :
1459 48 : case GROUPINFOATTRIBUTES: {
1460 48 : NDR_CHECK(ndr_push_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes));
1461 48 : break; }
1462 :
1463 46 : case GROUPINFODESCRIPTION: {
1464 46 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1465 46 : break; }
1466 :
1467 54 : case GROUPINFOALL2: {
1468 54 : NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2));
1469 54 : break; }
1470 :
1471 0 : default:
1472 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1473 : }
1474 0 : }
1475 244 : if (ndr_flags & NDR_BUFFERS) {
1476 244 : if (!(ndr_flags & NDR_SCALARS)) {
1477 : /* We didn't get it above, and the token is not needed after this. */
1478 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1479 : }
1480 244 : switch (level) {
1481 49 : case GROUPINFOALL:
1482 49 : NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all));
1483 49 : break;
1484 :
1485 47 : case GROUPINFONAME:
1486 47 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1487 47 : break;
1488 :
1489 48 : case GROUPINFOATTRIBUTES:
1490 48 : break;
1491 :
1492 46 : case GROUPINFODESCRIPTION:
1493 46 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1494 46 : break;
1495 :
1496 54 : case GROUPINFOALL2:
1497 54 : NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2));
1498 54 : break;
1499 :
1500 0 : default:
1501 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1502 : }
1503 0 : }
1504 244 : return NDR_ERR_SUCCESS;
1505 : }
1506 :
1507 241 : static enum ndr_err_code ndr_pull_samr_GroupInfo(struct ndr_pull *ndr, int ndr_flags, union samr_GroupInfo *r)
1508 : {
1509 : uint32_t level;
1510 : uint16_t _level;
1511 241 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1512 241 : if (ndr_flags & NDR_SCALARS) {
1513 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1514 241 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1515 241 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1516 241 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
1517 241 : if (_level != level) {
1518 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1519 : }
1520 241 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1521 241 : switch (level) {
1522 48 : case GROUPINFOALL: {
1523 48 : NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all));
1524 48 : break; }
1525 :
1526 47 : case GROUPINFONAME: {
1527 47 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1528 47 : break; }
1529 :
1530 48 : case GROUPINFOATTRIBUTES: {
1531 48 : NDR_CHECK(ndr_pull_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes));
1532 48 : break; }
1533 :
1534 46 : case GROUPINFODESCRIPTION: {
1535 46 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1536 46 : break; }
1537 :
1538 52 : case GROUPINFOALL2: {
1539 52 : NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2));
1540 52 : break; }
1541 :
1542 0 : default:
1543 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1544 : }
1545 0 : }
1546 241 : if (ndr_flags & NDR_BUFFERS) {
1547 241 : if (!(ndr_flags & NDR_SCALARS)) {
1548 : /* We didn't get it above, and the token is not needed after this. */
1549 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1550 : }
1551 241 : switch (level) {
1552 48 : case GROUPINFOALL:
1553 48 : NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all));
1554 48 : break;
1555 :
1556 47 : case GROUPINFONAME:
1557 47 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1558 47 : break;
1559 :
1560 48 : case GROUPINFOATTRIBUTES:
1561 48 : break;
1562 :
1563 46 : case GROUPINFODESCRIPTION:
1564 46 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1565 46 : break;
1566 :
1567 52 : case GROUPINFOALL2:
1568 52 : NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2));
1569 52 : break;
1570 :
1571 0 : default:
1572 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1573 : }
1574 0 : }
1575 241 : return NDR_ERR_SUCCESS;
1576 : }
1577 :
1578 6 : _PUBLIC_ void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r)
1579 : {
1580 : uint32_t level;
1581 6 : level = ndr_print_steal_switch_value(ndr, r);
1582 6 : ndr_print_union(ndr, name, level, "samr_GroupInfo");
1583 6 : switch (level) {
1584 2 : case GROUPINFOALL:
1585 2 : ndr_print_samr_GroupInfoAll(ndr, "all", &r->all);
1586 2 : break;
1587 :
1588 0 : case GROUPINFONAME:
1589 0 : ndr_print_lsa_String(ndr, "name", &r->name);
1590 0 : break;
1591 :
1592 0 : case GROUPINFOATTRIBUTES:
1593 0 : ndr_print_samr_GroupInfoAttributes(ndr, "attributes", &r->attributes);
1594 0 : break;
1595 :
1596 0 : case GROUPINFODESCRIPTION:
1597 0 : ndr_print_lsa_String(ndr, "description", &r->description);
1598 0 : break;
1599 :
1600 4 : case GROUPINFOALL2:
1601 4 : ndr_print_samr_GroupInfoAll(ndr, "all2", &r->all2);
1602 4 : break;
1603 :
1604 0 : default:
1605 0 : ndr_print_bad_level(ndr, name, level);
1606 : }
1607 6 : }
1608 :
1609 184 : static enum ndr_err_code ndr_push_samr_RidAttrArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidAttrArray *r)
1610 : {
1611 : uint32_t cntr_rids_1;
1612 : uint32_t cntr_attributes_1;
1613 184 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1614 184 : if (ndr_flags & NDR_SCALARS) {
1615 184 : NDR_CHECK(ndr_push_align(ndr, 5));
1616 184 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1617 184 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
1618 184 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attributes));
1619 184 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1620 : }
1621 184 : if (ndr_flags & NDR_BUFFERS) {
1622 184 : if (r->rids) {
1623 113 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1624 226 : for (cntr_rids_1 = 0; cntr_rids_1 < (r->count); cntr_rids_1++) {
1625 113 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_1]));
1626 : }
1627 : }
1628 184 : if (r->attributes) {
1629 113 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1630 226 : for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->count); cntr_attributes_1++) {
1631 113 : NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->attributes[cntr_attributes_1]));
1632 : }
1633 : }
1634 : }
1635 184 : return NDR_ERR_SUCCESS;
1636 : }
1637 :
1638 171 : static enum ndr_err_code ndr_pull_samr_RidAttrArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidAttrArray *r)
1639 : {
1640 : uint32_t _ptr_rids;
1641 171 : uint32_t size_rids_1 = 0;
1642 : uint32_t cntr_rids_1;
1643 171 : TALLOC_CTX *_mem_save_rids_0 = NULL;
1644 171 : TALLOC_CTX *_mem_save_rids_1 = NULL;
1645 : uint32_t _ptr_attributes;
1646 171 : uint32_t size_attributes_1 = 0;
1647 : uint32_t cntr_attributes_1;
1648 171 : TALLOC_CTX *_mem_save_attributes_0 = NULL;
1649 171 : TALLOC_CTX *_mem_save_attributes_1 = NULL;
1650 171 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1651 171 : if (ndr_flags & NDR_SCALARS) {
1652 171 : NDR_CHECK(ndr_pull_align(ndr, 5));
1653 171 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1654 171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
1655 171 : if (_ptr_rids) {
1656 108 : NDR_PULL_ALLOC(ndr, r->rids);
1657 : } else {
1658 63 : r->rids = NULL;
1659 : }
1660 171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attributes));
1661 171 : if (_ptr_attributes) {
1662 108 : NDR_PULL_ALLOC(ndr, r->attributes);
1663 : } else {
1664 63 : r->attributes = NULL;
1665 : }
1666 171 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1667 : }
1668 171 : if (ndr_flags & NDR_BUFFERS) {
1669 171 : if (r->rids) {
1670 108 : _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1671 108 : NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
1672 108 : NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
1673 108 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->rids, &size_rids_1));
1674 108 : NDR_PULL_ALLOC_N(ndr, r->rids, size_rids_1);
1675 108 : _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1676 108 : NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
1677 216 : for (cntr_rids_1 = 0; cntr_rids_1 < (size_rids_1); cntr_rids_1++) {
1678 108 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
1679 : }
1680 108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
1681 108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
1682 : }
1683 171 : if (r->attributes) {
1684 108 : _mem_save_attributes_0 = NDR_PULL_GET_MEM_CTX(ndr);
1685 108 : NDR_PULL_SET_MEM_CTX(ndr, r->attributes, 0);
1686 108 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attributes));
1687 108 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attributes, &size_attributes_1));
1688 108 : NDR_PULL_ALLOC_N(ndr, r->attributes, size_attributes_1);
1689 108 : _mem_save_attributes_1 = NDR_PULL_GET_MEM_CTX(ndr);
1690 108 : NDR_PULL_SET_MEM_CTX(ndr, r->attributes, 0);
1691 216 : for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
1692 108 : NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->attributes[cntr_attributes_1]));
1693 : }
1694 108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attributes_1, 0);
1695 108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attributes_0, 0);
1696 : }
1697 171 : if (r->rids) {
1698 108 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->rids, r->count));
1699 : }
1700 171 : if (r->attributes) {
1701 108 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->attributes, r->count));
1702 : }
1703 : }
1704 171 : return NDR_ERR_SUCCESS;
1705 : }
1706 :
1707 26 : _PUBLIC_ void ndr_print_samr_RidAttrArray(struct ndr_print *ndr, const char *name, const struct samr_RidAttrArray *r)
1708 : {
1709 : uint32_t cntr_rids_1;
1710 : uint32_t cntr_attributes_1;
1711 26 : ndr_print_struct(ndr, name, "samr_RidAttrArray");
1712 26 : if (r == NULL) { ndr_print_null(ndr); return; }
1713 26 : ndr->depth++;
1714 26 : ndr_print_uint32(ndr, "count", r->count);
1715 26 : ndr_print_ptr(ndr, "rids", r->rids);
1716 26 : ndr->depth++;
1717 26 : if (r->rids) {
1718 10 : ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->count);
1719 10 : ndr->depth++;
1720 20 : for (cntr_rids_1 = 0; cntr_rids_1 < (r->count); cntr_rids_1++) {
1721 10 : ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
1722 : }
1723 10 : ndr->depth--;
1724 : }
1725 26 : ndr->depth--;
1726 26 : ndr_print_ptr(ndr, "attributes", r->attributes);
1727 26 : ndr->depth++;
1728 26 : if (r->attributes) {
1729 10 : ndr->print(ndr, "%s: ARRAY(%d)", "attributes", (int)r->count);
1730 10 : ndr->depth++;
1731 20 : for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->count); cntr_attributes_1++) {
1732 10 : ndr_print_security_GroupAttrs(ndr, "attributes", r->attributes[cntr_attributes_1]);
1733 : }
1734 10 : ndr->depth--;
1735 : }
1736 26 : ndr->depth--;
1737 26 : ndr->depth--;
1738 : }
1739 :
1740 164 : static enum ndr_err_code ndr_push_samr_AliasInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_AliasInfoAll *r)
1741 : {
1742 164 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1743 164 : if (ndr_flags & NDR_SCALARS) {
1744 82 : NDR_CHECK(ndr_push_align(ndr, 5));
1745 82 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1746 82 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members));
1747 82 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1748 82 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1749 : }
1750 164 : if (ndr_flags & NDR_BUFFERS) {
1751 82 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1752 82 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1753 : }
1754 164 : return NDR_ERR_SUCCESS;
1755 : }
1756 :
1757 164 : static enum ndr_err_code ndr_pull_samr_AliasInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoAll *r)
1758 : {
1759 164 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1760 164 : if (ndr_flags & NDR_SCALARS) {
1761 82 : NDR_CHECK(ndr_pull_align(ndr, 5));
1762 82 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1763 82 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members));
1764 82 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1765 82 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1766 : }
1767 164 : if (ndr_flags & NDR_BUFFERS) {
1768 82 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1769 82 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1770 : }
1771 164 : return NDR_ERR_SUCCESS;
1772 : }
1773 :
1774 0 : _PUBLIC_ void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r)
1775 : {
1776 0 : ndr_print_struct(ndr, name, "samr_AliasInfoAll");
1777 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1778 0 : ndr->depth++;
1779 0 : ndr_print_lsa_String(ndr, "name", &r->name);
1780 0 : ndr_print_uint32(ndr, "num_members", r->num_members);
1781 0 : ndr_print_lsa_String(ndr, "description", &r->description);
1782 0 : ndr->depth--;
1783 : }
1784 :
1785 516 : static enum ndr_err_code ndr_push_samr_AliasInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_AliasInfoEnum r)
1786 : {
1787 516 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1788 516 : return NDR_ERR_SUCCESS;
1789 : }
1790 :
1791 258 : static enum ndr_err_code ndr_pull_samr_AliasInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_AliasInfoEnum *r)
1792 : {
1793 : uint16_t v;
1794 258 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1795 258 : *r = v;
1796 258 : return NDR_ERR_SUCCESS;
1797 : }
1798 :
1799 0 : _PUBLIC_ void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r)
1800 : {
1801 0 : const char *val = NULL;
1802 :
1803 0 : switch (r) {
1804 0 : case ALIASINFOALL: val = "ALIASINFOALL"; break;
1805 0 : case ALIASINFONAME: val = "ALIASINFONAME"; break;
1806 0 : case ALIASINFODESCRIPTION: val = "ALIASINFODESCRIPTION"; break;
1807 : }
1808 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1809 0 : }
1810 :
1811 258 : static enum ndr_err_code ndr_push_samr_AliasInfo(struct ndr_push *ndr, int ndr_flags, const union samr_AliasInfo *r)
1812 : {
1813 : uint32_t level;
1814 258 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1815 258 : if (ndr_flags & NDR_SCALARS) {
1816 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1817 258 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1818 258 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1819 258 : NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, level));
1820 258 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1821 258 : switch (level) {
1822 82 : case ALIASINFOALL: {
1823 82 : NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all));
1824 82 : break; }
1825 :
1826 88 : case ALIASINFONAME: {
1827 88 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1828 88 : break; }
1829 :
1830 88 : case ALIASINFODESCRIPTION: {
1831 88 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1832 88 : break; }
1833 :
1834 0 : default:
1835 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1836 : }
1837 0 : }
1838 258 : if (ndr_flags & NDR_BUFFERS) {
1839 258 : if (!(ndr_flags & NDR_SCALARS)) {
1840 : /* We didn't get it above, and the token is not needed after this. */
1841 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1842 : }
1843 258 : switch (level) {
1844 82 : case ALIASINFOALL:
1845 82 : NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all));
1846 82 : break;
1847 :
1848 88 : case ALIASINFONAME:
1849 88 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1850 88 : break;
1851 :
1852 88 : case ALIASINFODESCRIPTION:
1853 88 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
1854 88 : break;
1855 :
1856 0 : default:
1857 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1858 : }
1859 0 : }
1860 258 : return NDR_ERR_SUCCESS;
1861 : }
1862 :
1863 258 : static enum ndr_err_code ndr_pull_samr_AliasInfo(struct ndr_pull *ndr, int ndr_flags, union samr_AliasInfo *r)
1864 : {
1865 : uint32_t level;
1866 : uint16_t _level;
1867 258 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1868 258 : if (ndr_flags & NDR_SCALARS) {
1869 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1870 258 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1871 258 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1872 258 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
1873 258 : if (_level != level) {
1874 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1875 : }
1876 258 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1877 258 : switch (level) {
1878 82 : case ALIASINFOALL: {
1879 82 : NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all));
1880 82 : break; }
1881 :
1882 88 : case ALIASINFONAME: {
1883 88 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1884 88 : break; }
1885 :
1886 88 : case ALIASINFODESCRIPTION: {
1887 88 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
1888 88 : break; }
1889 :
1890 0 : default:
1891 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1892 : }
1893 0 : }
1894 258 : if (ndr_flags & NDR_BUFFERS) {
1895 258 : if (!(ndr_flags & NDR_SCALARS)) {
1896 : /* We didn't get it above, and the token is not needed after this. */
1897 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1898 : }
1899 258 : switch (level) {
1900 82 : case ALIASINFOALL:
1901 82 : NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all));
1902 82 : break;
1903 :
1904 88 : case ALIASINFONAME:
1905 88 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1906 88 : break;
1907 :
1908 88 : case ALIASINFODESCRIPTION:
1909 88 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
1910 88 : break;
1911 :
1912 0 : default:
1913 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1914 : }
1915 0 : }
1916 258 : return NDR_ERR_SUCCESS;
1917 : }
1918 :
1919 0 : _PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r)
1920 : {
1921 : uint32_t level;
1922 0 : level = ndr_print_steal_switch_value(ndr, r);
1923 0 : ndr_print_union(ndr, name, level, "samr_AliasInfo");
1924 0 : switch (level) {
1925 0 : case ALIASINFOALL:
1926 0 : ndr_print_samr_AliasInfoAll(ndr, "all", &r->all);
1927 0 : break;
1928 :
1929 0 : case ALIASINFONAME:
1930 0 : ndr_print_lsa_String(ndr, "name", &r->name);
1931 0 : break;
1932 :
1933 0 : case ALIASINFODESCRIPTION:
1934 0 : ndr_print_lsa_String(ndr, "description", &r->description);
1935 0 : break;
1936 :
1937 0 : default:
1938 0 : ndr_print_bad_level(ndr, name, level);
1939 : }
1940 0 : }
1941 :
1942 13135 : static enum ndr_err_code ndr_push_samr_UserInfoLevel(struct ndr_push *ndr, int ndr_flags, enum samr_UserInfoLevel r)
1943 : {
1944 13135 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1945 13135 : return NDR_ERR_SUCCESS;
1946 : }
1947 :
1948 13131 : static enum ndr_err_code ndr_pull_samr_UserInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_UserInfoLevel *r)
1949 : {
1950 : uint16_t v;
1951 13131 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1952 13131 : *r = v;
1953 13131 : return NDR_ERR_SUCCESS;
1954 : }
1955 :
1956 0 : _PUBLIC_ void ndr_print_samr_UserInfoLevel(struct ndr_print *ndr, const char *name, enum samr_UserInfoLevel r)
1957 : {
1958 0 : const char *val = NULL;
1959 :
1960 0 : switch (r) {
1961 0 : case UserGeneralInformation: val = "UserGeneralInformation"; break;
1962 0 : case UserPreferencesInformation: val = "UserPreferencesInformation"; break;
1963 0 : case UserLogonInformation: val = "UserLogonInformation"; break;
1964 0 : case UserLogonHoursInformation: val = "UserLogonHoursInformation"; break;
1965 0 : case UserAccountInformation: val = "UserAccountInformation"; break;
1966 0 : case UserNameInformation: val = "UserNameInformation"; break;
1967 0 : case UserAccountNameInformation: val = "UserAccountNameInformation"; break;
1968 0 : case UserFullNameInformation: val = "UserFullNameInformation"; break;
1969 0 : case UserPrimaryGroupInformation: val = "UserPrimaryGroupInformation"; break;
1970 0 : case UserHomeInformation: val = "UserHomeInformation"; break;
1971 0 : case UserScriptInformation: val = "UserScriptInformation"; break;
1972 0 : case UserProfileInformation: val = "UserProfileInformation"; break;
1973 0 : case UserAdminCommentInformation: val = "UserAdminCommentInformation"; break;
1974 0 : case UserWorkStationsInformation: val = "UserWorkStationsInformation"; break;
1975 0 : case UserControlInformation: val = "UserControlInformation"; break;
1976 0 : case UserExpiresInformation: val = "UserExpiresInformation"; break;
1977 0 : case UserInternal1Information: val = "UserInternal1Information"; break;
1978 0 : case UserParametersInformation: val = "UserParametersInformation"; break;
1979 0 : case UserAllInformation: val = "UserAllInformation"; break;
1980 0 : case UserInternal4Information: val = "UserInternal4Information"; break;
1981 0 : case UserInternal5Information: val = "UserInternal5Information"; break;
1982 0 : case UserInternal4InformationNew: val = "UserInternal4InformationNew"; break;
1983 0 : case UserInternal5InformationNew: val = "UserInternal5InformationNew"; break;
1984 0 : case UserInternal7InformationNew: val = "UserInternal7InformationNew"; break;
1985 0 : case UserInternal8InformationNew: val = "UserInternal8InformationNew"; break;
1986 : }
1987 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1988 0 : }
1989 :
1990 378 : static enum ndr_err_code ndr_push_samr_UserInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo1 *r)
1991 : {
1992 378 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1993 378 : if (ndr_flags & NDR_SCALARS) {
1994 189 : NDR_CHECK(ndr_push_align(ndr, 5));
1995 189 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
1996 189 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
1997 189 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
1998 189 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
1999 189 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
2000 189 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2001 : }
2002 378 : if (ndr_flags & NDR_BUFFERS) {
2003 189 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2004 189 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2005 189 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2006 189 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2007 : }
2008 378 : return NDR_ERR_SUCCESS;
2009 : }
2010 :
2011 338 : static enum ndr_err_code ndr_pull_samr_UserInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo1 *r)
2012 : {
2013 338 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2014 338 : if (ndr_flags & NDR_SCALARS) {
2015 169 : NDR_CHECK(ndr_pull_align(ndr, 5));
2016 169 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2017 169 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2018 169 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2019 169 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2020 169 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
2021 169 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2022 : }
2023 338 : if (ndr_flags & NDR_BUFFERS) {
2024 169 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2025 169 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2026 169 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2027 169 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2028 : }
2029 338 : return NDR_ERR_SUCCESS;
2030 : }
2031 :
2032 40 : _PUBLIC_ void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r)
2033 : {
2034 40 : ndr_print_struct(ndr, name, "samr_UserInfo1");
2035 40 : if (r == NULL) { ndr_print_null(ndr); return; }
2036 40 : ndr->depth++;
2037 40 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2038 40 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2039 40 : ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2040 40 : ndr_print_lsa_String(ndr, "description", &r->description);
2041 40 : ndr_print_lsa_String(ndr, "comment", &r->comment);
2042 40 : ndr->depth--;
2043 : }
2044 :
2045 670 : static enum ndr_err_code ndr_push_samr_UserInfo2(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo2 *r)
2046 : {
2047 670 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2048 670 : if (ndr_flags & NDR_SCALARS) {
2049 335 : NDR_CHECK(ndr_push_align(ndr, 5));
2050 335 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
2051 335 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->reserved));
2052 335 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
2053 335 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
2054 335 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2055 : }
2056 670 : if (ndr_flags & NDR_BUFFERS) {
2057 335 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2058 335 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->reserved));
2059 : }
2060 670 : return NDR_ERR_SUCCESS;
2061 : }
2062 :
2063 656 : static enum ndr_err_code ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo2 *r)
2064 : {
2065 656 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2066 656 : if (ndr_flags & NDR_SCALARS) {
2067 328 : NDR_CHECK(ndr_pull_align(ndr, 5));
2068 328 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
2069 328 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->reserved));
2070 328 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
2071 328 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
2072 328 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2073 : }
2074 656 : if (ndr_flags & NDR_BUFFERS) {
2075 328 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2076 328 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->reserved));
2077 : }
2078 656 : return NDR_ERR_SUCCESS;
2079 : }
2080 :
2081 14 : _PUBLIC_ void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r)
2082 : {
2083 14 : ndr_print_struct(ndr, name, "samr_UserInfo2");
2084 14 : if (r == NULL) { ndr_print_null(ndr); return; }
2085 14 : ndr->depth++;
2086 14 : ndr_print_lsa_String(ndr, "comment", &r->comment);
2087 14 : ndr_print_lsa_String(ndr, "reserved", &r->reserved);
2088 14 : ndr_print_uint16(ndr, "country_code", r->country_code);
2089 14 : ndr_print_uint16(ndr, "code_page", r->code_page);
2090 14 : ndr->depth--;
2091 : }
2092 :
2093 15640 : _PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r)
2094 : {
2095 : {
2096 15640 : uint32_t _flags_save_STRUCT = ndr->flags;
2097 15640 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2098 15640 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2099 15640 : if (ndr_flags & NDR_SCALARS) {
2100 7820 : NDR_CHECK(ndr_push_align(ndr, 5));
2101 7820 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->units_per_week));
2102 7820 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->bits));
2103 7820 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2104 : }
2105 15640 : if (ndr_flags & NDR_BUFFERS) {
2106 7820 : if (r->bits) {
2107 5981 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1260));
2108 5981 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2109 5981 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->units_per_week / 8));
2110 5981 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->bits, r->units_per_week / 8));
2111 : }
2112 : }
2113 15640 : ndr->flags = _flags_save_STRUCT;
2114 : }
2115 15640 : return NDR_ERR_SUCCESS;
2116 : }
2117 :
2118 15548 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r)
2119 : {
2120 : uint32_t _ptr_bits;
2121 15548 : uint32_t size_bits_1 = 0;
2122 15548 : uint32_t length_bits_1 = 0;
2123 15548 : TALLOC_CTX *_mem_save_bits_0 = NULL;
2124 : {
2125 15548 : uint32_t _flags_save_STRUCT = ndr->flags;
2126 15548 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2127 15548 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2128 15548 : if (ndr_flags & NDR_SCALARS) {
2129 7774 : NDR_CHECK(ndr_pull_align(ndr, 5));
2130 7774 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->units_per_week));
2131 7774 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bits));
2132 7774 : if (_ptr_bits) {
2133 5936 : NDR_PULL_ALLOC(ndr, r->bits);
2134 : } else {
2135 1838 : r->bits = NULL;
2136 : }
2137 7774 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2138 : }
2139 15548 : if (ndr_flags & NDR_BUFFERS) {
2140 7774 : if (r->bits) {
2141 5936 : _mem_save_bits_0 = NDR_PULL_GET_MEM_CTX(ndr);
2142 5936 : NDR_PULL_SET_MEM_CTX(ndr, r->bits, 0);
2143 5936 : NDR_CHECK(ndr_pull_array_size(ndr, &r->bits));
2144 5936 : NDR_CHECK(ndr_pull_array_length(ndr, &r->bits));
2145 5936 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->bits, &size_bits_1));
2146 5936 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->bits, &length_bits_1));
2147 5936 : if (length_bits_1 > size_bits_1) {
2148 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_bits_1, length_bits_1);
2149 : }
2150 5936 : NDR_PULL_ALLOC_N(ndr, r->bits, size_bits_1);
2151 5936 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->bits, length_bits_1));
2152 5936 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bits_0, 0);
2153 : }
2154 7774 : if (r->bits) {
2155 5936 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->bits, 1260));
2156 : }
2157 7774 : if (r->bits) {
2158 5936 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->bits, r->units_per_week / 8));
2159 : }
2160 : }
2161 15548 : ndr->flags = _flags_save_STRUCT;
2162 : }
2163 15548 : return NDR_ERR_SUCCESS;
2164 : }
2165 :
2166 0 : static void ndr_print_flags_samr_LogonHours(struct ndr_print *ndr, const char *name, int unused, const struct samr_LogonHours *r)
2167 : {
2168 0 : ndr_print_samr_LogonHours(ndr, name, r);
2169 0 : }
2170 :
2171 90 : _PUBLIC_ void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r)
2172 : {
2173 90 : ndr_print_struct(ndr, name, "samr_LogonHours");
2174 90 : if (r == NULL) { ndr_print_null(ndr); return; }
2175 : {
2176 90 : uint32_t _flags_save_STRUCT = ndr->flags;
2177 90 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2178 90 : ndr->depth++;
2179 90 : ndr_print_uint16(ndr, "units_per_week", r->units_per_week);
2180 90 : ndr_print_ptr(ndr, "bits", r->bits);
2181 90 : ndr->depth++;
2182 90 : if (r->bits) {
2183 90 : ndr_print_array_uint8(ndr, "bits", r->bits, r->units_per_week / 8);
2184 : }
2185 90 : ndr->depth--;
2186 90 : ndr->depth--;
2187 90 : ndr->flags = _flags_save_STRUCT;
2188 : }
2189 : }
2190 :
2191 2674 : static enum ndr_err_code ndr_push_samr_UserInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo3 *r)
2192 : {
2193 2674 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2194 2674 : if (ndr_flags & NDR_SCALARS) {
2195 1337 : NDR_CHECK(ndr_push_align(ndr, 5));
2196 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2197 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2198 1337 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2199 1337 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2200 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2201 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2202 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2203 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2204 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2205 1337 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2206 1337 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2207 1337 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2208 1337 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
2209 1337 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
2210 1337 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2211 1337 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2212 1337 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2213 1337 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2214 1337 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2215 : }
2216 2674 : if (ndr_flags & NDR_BUFFERS) {
2217 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2218 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2219 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2220 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2221 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2222 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2223 1337 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2224 1337 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2225 : }
2226 2674 : return NDR_ERR_SUCCESS;
2227 : }
2228 :
2229 2674 : static enum ndr_err_code ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo3 *r)
2230 : {
2231 2674 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2232 2674 : if (ndr_flags & NDR_SCALARS) {
2233 1337 : NDR_CHECK(ndr_pull_align(ndr, 5));
2234 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2235 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2236 1337 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2237 1337 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2238 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2239 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2240 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2241 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2242 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2243 1337 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
2244 1337 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
2245 1337 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
2246 1337 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
2247 1337 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
2248 1337 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2249 1337 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
2250 1337 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
2251 1337 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2252 1337 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2253 : }
2254 2674 : if (ndr_flags & NDR_BUFFERS) {
2255 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2256 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2257 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2258 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2259 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2260 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2261 1337 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2262 1337 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2263 : }
2264 2674 : return NDR_ERR_SUCCESS;
2265 : }
2266 :
2267 0 : _PUBLIC_ void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r)
2268 : {
2269 0 : ndr_print_struct(ndr, name, "samr_UserInfo3");
2270 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2271 0 : ndr->depth++;
2272 0 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2273 0 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2274 0 : ndr_print_uint32(ndr, "rid", r->rid);
2275 0 : ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2276 0 : ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2277 0 : ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2278 0 : ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2279 0 : ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2280 0 : ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2281 0 : ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
2282 0 : ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
2283 0 : ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
2284 0 : ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
2285 0 : ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
2286 0 : ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2287 0 : ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
2288 0 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
2289 0 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2290 0 : ndr->depth--;
2291 : }
2292 :
2293 336 : static enum ndr_err_code ndr_push_samr_UserInfo4(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo4 *r)
2294 : {
2295 336 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2296 336 : if (ndr_flags & NDR_SCALARS) {
2297 168 : NDR_CHECK(ndr_push_align(ndr, 5));
2298 168 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2299 168 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2300 : }
2301 336 : if (ndr_flags & NDR_BUFFERS) {
2302 168 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2303 : }
2304 336 : return NDR_ERR_SUCCESS;
2305 : }
2306 :
2307 336 : static enum ndr_err_code ndr_pull_samr_UserInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo4 *r)
2308 : {
2309 336 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2310 336 : if (ndr_flags & NDR_SCALARS) {
2311 168 : NDR_CHECK(ndr_pull_align(ndr, 5));
2312 168 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2313 168 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2314 : }
2315 336 : if (ndr_flags & NDR_BUFFERS) {
2316 168 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2317 : }
2318 336 : return NDR_ERR_SUCCESS;
2319 : }
2320 :
2321 0 : _PUBLIC_ void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r)
2322 : {
2323 0 : ndr_print_struct(ndr, name, "samr_UserInfo4");
2324 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2325 0 : ndr->depth++;
2326 0 : ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2327 0 : ndr->depth--;
2328 : }
2329 :
2330 3154 : static enum ndr_err_code ndr_push_samr_UserInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo5 *r)
2331 : {
2332 3154 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2333 3154 : if (ndr_flags & NDR_SCALARS) {
2334 1577 : NDR_CHECK(ndr_push_align(ndr, 5));
2335 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2336 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2337 1577 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2338 1577 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2339 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2340 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2341 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2342 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2343 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2344 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2345 1577 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2346 1577 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2347 1577 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2348 1577 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2349 1577 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2350 1577 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2351 1577 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2352 1577 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2353 1577 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2354 : }
2355 3154 : if (ndr_flags & NDR_BUFFERS) {
2356 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2357 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2358 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2359 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2360 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2361 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2362 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2363 1577 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2364 1577 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2365 : }
2366 3154 : return NDR_ERR_SUCCESS;
2367 : }
2368 :
2369 3150 : static enum ndr_err_code ndr_pull_samr_UserInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo5 *r)
2370 : {
2371 3150 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2372 3150 : if (ndr_flags & NDR_SCALARS) {
2373 1575 : NDR_CHECK(ndr_pull_align(ndr, 5));
2374 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2375 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2376 1575 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2377 1575 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2378 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2379 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2380 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2381 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2382 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2383 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2384 1575 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
2385 1575 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
2386 1575 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2387 1575 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
2388 1575 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
2389 1575 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
2390 1575 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
2391 1575 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2392 1575 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2393 : }
2394 3150 : if (ndr_flags & NDR_BUFFERS) {
2395 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2396 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2397 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2398 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2399 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2400 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2401 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2402 1575 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2403 1575 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2404 : }
2405 3150 : return NDR_ERR_SUCCESS;
2406 : }
2407 :
2408 4 : _PUBLIC_ void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r)
2409 : {
2410 4 : ndr_print_struct(ndr, name, "samr_UserInfo5");
2411 4 : if (r == NULL) { ndr_print_null(ndr); return; }
2412 4 : ndr->depth++;
2413 4 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2414 4 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2415 4 : ndr_print_uint32(ndr, "rid", r->rid);
2416 4 : ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2417 4 : ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2418 4 : ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2419 4 : ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2420 4 : ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2421 4 : ndr_print_lsa_String(ndr, "description", &r->description);
2422 4 : ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2423 4 : ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
2424 4 : ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
2425 4 : ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2426 4 : ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
2427 4 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
2428 4 : ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
2429 4 : ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
2430 4 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2431 4 : ndr->depth--;
2432 : }
2433 :
2434 1272 : static enum ndr_err_code ndr_push_samr_UserInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo6 *r)
2435 : {
2436 1272 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2437 1272 : if (ndr_flags & NDR_SCALARS) {
2438 636 : NDR_CHECK(ndr_push_align(ndr, 5));
2439 636 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2440 636 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2441 636 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2442 : }
2443 1272 : if (ndr_flags & NDR_BUFFERS) {
2444 636 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2445 636 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2446 : }
2447 1272 : return NDR_ERR_SUCCESS;
2448 : }
2449 :
2450 1272 : static enum ndr_err_code ndr_pull_samr_UserInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo6 *r)
2451 : {
2452 1272 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2453 1272 : if (ndr_flags & NDR_SCALARS) {
2454 636 : NDR_CHECK(ndr_pull_align(ndr, 5));
2455 636 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2456 636 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2457 636 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2458 : }
2459 1272 : if (ndr_flags & NDR_BUFFERS) {
2460 636 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2461 636 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2462 : }
2463 1272 : return NDR_ERR_SUCCESS;
2464 : }
2465 :
2466 0 : _PUBLIC_ void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r)
2467 : {
2468 0 : ndr_print_struct(ndr, name, "samr_UserInfo6");
2469 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2470 0 : ndr->depth++;
2471 0 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2472 0 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2473 0 : ndr->depth--;
2474 : }
2475 :
2476 656 : static enum ndr_err_code ndr_push_samr_UserInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo7 *r)
2477 : {
2478 656 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2479 656 : if (ndr_flags & NDR_SCALARS) {
2480 328 : NDR_CHECK(ndr_push_align(ndr, 5));
2481 328 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2482 328 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2483 : }
2484 656 : if (ndr_flags & NDR_BUFFERS) {
2485 328 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2486 : }
2487 656 : return NDR_ERR_SUCCESS;
2488 : }
2489 :
2490 656 : static enum ndr_err_code ndr_pull_samr_UserInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo7 *r)
2491 : {
2492 656 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2493 656 : if (ndr_flags & NDR_SCALARS) {
2494 328 : NDR_CHECK(ndr_pull_align(ndr, 5));
2495 328 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2496 328 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2497 : }
2498 656 : if (ndr_flags & NDR_BUFFERS) {
2499 328 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2500 : }
2501 656 : return NDR_ERR_SUCCESS;
2502 : }
2503 :
2504 0 : _PUBLIC_ void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r)
2505 : {
2506 0 : ndr_print_struct(ndr, name, "samr_UserInfo7");
2507 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2508 0 : ndr->depth++;
2509 0 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2510 0 : ndr->depth--;
2511 : }
2512 :
2513 332 : static enum ndr_err_code ndr_push_samr_UserInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo8 *r)
2514 : {
2515 332 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2516 332 : if (ndr_flags & NDR_SCALARS) {
2517 166 : NDR_CHECK(ndr_push_align(ndr, 5));
2518 166 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2519 166 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2520 : }
2521 332 : if (ndr_flags & NDR_BUFFERS) {
2522 166 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2523 : }
2524 332 : return NDR_ERR_SUCCESS;
2525 : }
2526 :
2527 332 : static enum ndr_err_code ndr_pull_samr_UserInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo8 *r)
2528 : {
2529 332 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2530 332 : if (ndr_flags & NDR_SCALARS) {
2531 166 : NDR_CHECK(ndr_pull_align(ndr, 5));
2532 166 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2533 166 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2534 : }
2535 332 : if (ndr_flags & NDR_BUFFERS) {
2536 166 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2537 : }
2538 332 : return NDR_ERR_SUCCESS;
2539 : }
2540 :
2541 0 : _PUBLIC_ void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r)
2542 : {
2543 0 : ndr_print_struct(ndr, name, "samr_UserInfo8");
2544 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2545 0 : ndr->depth++;
2546 0 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2547 0 : ndr->depth--;
2548 : }
2549 :
2550 24 : static enum ndr_err_code ndr_push_samr_UserInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo9 *r)
2551 : {
2552 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2553 24 : if (ndr_flags & NDR_SCALARS) {
2554 24 : NDR_CHECK(ndr_push_align(ndr, 4));
2555 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2556 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2557 : }
2558 24 : if (ndr_flags & NDR_BUFFERS) {
2559 : }
2560 24 : return NDR_ERR_SUCCESS;
2561 : }
2562 :
2563 24 : static enum ndr_err_code ndr_pull_samr_UserInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo9 *r)
2564 : {
2565 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2566 24 : if (ndr_flags & NDR_SCALARS) {
2567 24 : NDR_CHECK(ndr_pull_align(ndr, 4));
2568 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2569 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2570 : }
2571 24 : if (ndr_flags & NDR_BUFFERS) {
2572 : }
2573 24 : return NDR_ERR_SUCCESS;
2574 : }
2575 :
2576 0 : _PUBLIC_ void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r)
2577 : {
2578 0 : ndr_print_struct(ndr, name, "samr_UserInfo9");
2579 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2580 0 : ndr->depth++;
2581 0 : ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2582 0 : ndr->depth--;
2583 : }
2584 :
2585 784 : static enum ndr_err_code ndr_push_samr_UserInfo10(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo10 *r)
2586 : {
2587 784 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2588 784 : if (ndr_flags & NDR_SCALARS) {
2589 392 : NDR_CHECK(ndr_push_align(ndr, 5));
2590 392 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2591 392 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2592 392 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2593 : }
2594 784 : if (ndr_flags & NDR_BUFFERS) {
2595 392 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2596 392 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2597 : }
2598 784 : return NDR_ERR_SUCCESS;
2599 : }
2600 :
2601 760 : static enum ndr_err_code ndr_pull_samr_UserInfo10(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo10 *r)
2602 : {
2603 760 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2604 760 : if (ndr_flags & NDR_SCALARS) {
2605 380 : NDR_CHECK(ndr_pull_align(ndr, 5));
2606 380 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2607 380 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2608 380 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2609 : }
2610 760 : if (ndr_flags & NDR_BUFFERS) {
2611 380 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2612 380 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2613 : }
2614 760 : return NDR_ERR_SUCCESS;
2615 : }
2616 :
2617 24 : _PUBLIC_ void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r)
2618 : {
2619 24 : ndr_print_struct(ndr, name, "samr_UserInfo10");
2620 24 : if (r == NULL) { ndr_print_null(ndr); return; }
2621 24 : ndr->depth++;
2622 24 : ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2623 24 : ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2624 24 : ndr->depth--;
2625 : }
2626 :
2627 352 : static enum ndr_err_code ndr_push_samr_UserInfo11(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo11 *r)
2628 : {
2629 352 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2630 352 : if (ndr_flags & NDR_SCALARS) {
2631 176 : NDR_CHECK(ndr_push_align(ndr, 5));
2632 176 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2633 176 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2634 : }
2635 352 : if (ndr_flags & NDR_BUFFERS) {
2636 176 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2637 : }
2638 352 : return NDR_ERR_SUCCESS;
2639 : }
2640 :
2641 352 : static enum ndr_err_code ndr_pull_samr_UserInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo11 *r)
2642 : {
2643 352 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2644 352 : if (ndr_flags & NDR_SCALARS) {
2645 176 : NDR_CHECK(ndr_pull_align(ndr, 5));
2646 176 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2647 176 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2648 : }
2649 352 : if (ndr_flags & NDR_BUFFERS) {
2650 176 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2651 : }
2652 352 : return NDR_ERR_SUCCESS;
2653 : }
2654 :
2655 0 : _PUBLIC_ void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r)
2656 : {
2657 0 : ndr_print_struct(ndr, name, "samr_UserInfo11");
2658 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2659 0 : ndr->depth++;
2660 0 : ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2661 0 : ndr->depth--;
2662 : }
2663 :
2664 400 : static enum ndr_err_code ndr_push_samr_UserInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo12 *r)
2665 : {
2666 400 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2667 400 : if (ndr_flags & NDR_SCALARS) {
2668 200 : NDR_CHECK(ndr_push_align(ndr, 5));
2669 200 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2670 200 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2671 : }
2672 400 : if (ndr_flags & NDR_BUFFERS) {
2673 200 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2674 : }
2675 400 : return NDR_ERR_SUCCESS;
2676 : }
2677 :
2678 400 : static enum ndr_err_code ndr_pull_samr_UserInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo12 *r)
2679 : {
2680 400 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2681 400 : if (ndr_flags & NDR_SCALARS) {
2682 200 : NDR_CHECK(ndr_pull_align(ndr, 5));
2683 200 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2684 200 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2685 : }
2686 400 : if (ndr_flags & NDR_BUFFERS) {
2687 200 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2688 : }
2689 400 : return NDR_ERR_SUCCESS;
2690 : }
2691 :
2692 0 : _PUBLIC_ void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r)
2693 : {
2694 0 : ndr_print_struct(ndr, name, "samr_UserInfo12");
2695 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2696 0 : ndr->depth++;
2697 0 : ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2698 0 : ndr->depth--;
2699 : }
2700 :
2701 360 : static enum ndr_err_code ndr_push_samr_UserInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo13 *r)
2702 : {
2703 360 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2704 360 : if (ndr_flags & NDR_SCALARS) {
2705 180 : NDR_CHECK(ndr_push_align(ndr, 5));
2706 180 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2707 180 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2708 : }
2709 360 : if (ndr_flags & NDR_BUFFERS) {
2710 180 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2711 : }
2712 360 : return NDR_ERR_SUCCESS;
2713 : }
2714 :
2715 360 : static enum ndr_err_code ndr_pull_samr_UserInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo13 *r)
2716 : {
2717 360 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2718 360 : if (ndr_flags & NDR_SCALARS) {
2719 180 : NDR_CHECK(ndr_pull_align(ndr, 5));
2720 180 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2721 180 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2722 : }
2723 360 : if (ndr_flags & NDR_BUFFERS) {
2724 180 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2725 : }
2726 360 : return NDR_ERR_SUCCESS;
2727 : }
2728 :
2729 0 : _PUBLIC_ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r)
2730 : {
2731 0 : ndr_print_struct(ndr, name, "samr_UserInfo13");
2732 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2733 0 : ndr->depth++;
2734 0 : ndr_print_lsa_String(ndr, "description", &r->description);
2735 0 : ndr->depth--;
2736 : }
2737 :
2738 360 : static enum ndr_err_code ndr_push_samr_UserInfo14(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo14 *r)
2739 : {
2740 360 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2741 360 : if (ndr_flags & NDR_SCALARS) {
2742 180 : NDR_CHECK(ndr_push_align(ndr, 5));
2743 180 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2744 180 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2745 : }
2746 360 : if (ndr_flags & NDR_BUFFERS) {
2747 180 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2748 : }
2749 360 : return NDR_ERR_SUCCESS;
2750 : }
2751 :
2752 360 : static enum ndr_err_code ndr_pull_samr_UserInfo14(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo14 *r)
2753 : {
2754 360 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2755 360 : if (ndr_flags & NDR_SCALARS) {
2756 180 : NDR_CHECK(ndr_pull_align(ndr, 5));
2757 180 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2758 180 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2759 : }
2760 360 : if (ndr_flags & NDR_BUFFERS) {
2761 180 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2762 : }
2763 360 : return NDR_ERR_SUCCESS;
2764 : }
2765 :
2766 0 : _PUBLIC_ void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r)
2767 : {
2768 0 : ndr_print_struct(ndr, name, "samr_UserInfo14");
2769 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2770 0 : ndr->depth++;
2771 0 : ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2772 0 : ndr->depth--;
2773 : }
2774 :
2775 2036 : static enum ndr_err_code ndr_push_samr_UserInfo16(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo16 *r)
2776 : {
2777 2036 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2778 2036 : if (ndr_flags & NDR_SCALARS) {
2779 2036 : NDR_CHECK(ndr_push_align(ndr, 4));
2780 2036 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2781 2036 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2782 : }
2783 2036 : if (ndr_flags & NDR_BUFFERS) {
2784 : }
2785 2036 : return NDR_ERR_SUCCESS;
2786 : }
2787 :
2788 1958 : static enum ndr_err_code ndr_pull_samr_UserInfo16(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo16 *r)
2789 : {
2790 1958 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2791 1958 : if (ndr_flags & NDR_SCALARS) {
2792 1958 : NDR_CHECK(ndr_pull_align(ndr, 4));
2793 1958 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2794 1958 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2795 : }
2796 1958 : if (ndr_flags & NDR_BUFFERS) {
2797 : }
2798 1958 : return NDR_ERR_SUCCESS;
2799 : }
2800 :
2801 156 : _PUBLIC_ void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r)
2802 : {
2803 156 : ndr_print_struct(ndr, name, "samr_UserInfo16");
2804 156 : if (r == NULL) { ndr_print_null(ndr); return; }
2805 156 : ndr->depth++;
2806 156 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2807 156 : ndr->depth--;
2808 : }
2809 :
2810 142 : static enum ndr_err_code ndr_push_samr_UserInfo17(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo17 *r)
2811 : {
2812 142 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2813 142 : if (ndr_flags & NDR_SCALARS) {
2814 142 : NDR_CHECK(ndr_push_align(ndr, 4));
2815 142 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2816 142 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2817 : }
2818 142 : if (ndr_flags & NDR_BUFFERS) {
2819 : }
2820 142 : return NDR_ERR_SUCCESS;
2821 : }
2822 :
2823 142 : static enum ndr_err_code ndr_pull_samr_UserInfo17(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo17 *r)
2824 : {
2825 142 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2826 142 : if (ndr_flags & NDR_SCALARS) {
2827 142 : NDR_CHECK(ndr_pull_align(ndr, 4));
2828 142 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
2829 142 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2830 : }
2831 142 : if (ndr_flags & NDR_BUFFERS) {
2832 : }
2833 142 : return NDR_ERR_SUCCESS;
2834 : }
2835 :
2836 0 : _PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r)
2837 : {
2838 0 : ndr_print_struct(ndr, name, "samr_UserInfo17");
2839 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2840 0 : ndr->depth++;
2841 0 : ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
2842 0 : ndr->depth--;
2843 : }
2844 :
2845 4122 : _PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r)
2846 : {
2847 : {
2848 4122 : uint32_t _flags_save_STRUCT = ndr->flags;
2849 4122 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2850 4122 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2851 4122 : if (ndr_flags & NDR_SCALARS) {
2852 4122 : NDR_CHECK(ndr_push_align(ndr, 1));
2853 4122 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2854 4122 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2855 : }
2856 4122 : if (ndr_flags & NDR_BUFFERS) {
2857 : }
2858 4122 : ndr->flags = _flags_save_STRUCT;
2859 : }
2860 4122 : return NDR_ERR_SUCCESS;
2861 : }
2862 :
2863 10793 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r)
2864 : {
2865 10793 : uint32_t size_hash_0 = 0;
2866 : {
2867 10793 : uint32_t _flags_save_STRUCT = ndr->flags;
2868 10793 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2869 10793 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2870 10793 : if (ndr_flags & NDR_SCALARS) {
2871 10793 : NDR_CHECK(ndr_pull_align(ndr, 1));
2872 10793 : size_hash_0 = 16;
2873 10793 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, size_hash_0));
2874 10793 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2875 : }
2876 10793 : if (ndr_flags & NDR_BUFFERS) {
2877 : }
2878 10793 : ndr->flags = _flags_save_STRUCT;
2879 : }
2880 10793 : return NDR_ERR_SUCCESS;
2881 : }
2882 :
2883 0 : static void ndr_print_flags_samr_Password(struct ndr_print *ndr, const char *name, int unused, const struct samr_Password *r)
2884 : {
2885 0 : ndr_print_samr_Password(ndr, name, r);
2886 0 : }
2887 :
2888 41 : _PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r)
2889 : {
2890 41 : ndr_print_struct(ndr, name, "samr_Password");
2891 41 : if (r == NULL) { ndr_print_null(ndr); return; }
2892 : {
2893 41 : uint32_t _flags_save_STRUCT = ndr->flags;
2894 41 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2895 41 : ndr->depth++;
2896 41 : ndr_print_array_uint8(ndr, "hash", r->hash, 16);
2897 41 : ndr->depth--;
2898 41 : ndr->flags = _flags_save_STRUCT;
2899 : }
2900 : }
2901 :
2902 82 : static enum ndr_err_code ndr_push_samr_UserInfo18(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo18 *r)
2903 : {
2904 82 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2905 82 : if (ndr_flags & NDR_SCALARS) {
2906 82 : NDR_CHECK(ndr_push_align(ndr, 1));
2907 82 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd));
2908 82 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd));
2909 82 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_pwd_active));
2910 82 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_pwd_active));
2911 82 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
2912 82 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2913 : }
2914 82 : if (ndr_flags & NDR_BUFFERS) {
2915 : }
2916 82 : return NDR_ERR_SUCCESS;
2917 : }
2918 :
2919 82 : static enum ndr_err_code ndr_pull_samr_UserInfo18(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo18 *r)
2920 : {
2921 82 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2922 82 : if (ndr_flags & NDR_SCALARS) {
2923 82 : NDR_CHECK(ndr_pull_align(ndr, 1));
2924 82 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd));
2925 82 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd));
2926 82 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_pwd_active));
2927 82 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_pwd_active));
2928 82 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
2929 82 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2930 : }
2931 82 : if (ndr_flags & NDR_BUFFERS) {
2932 : }
2933 82 : return NDR_ERR_SUCCESS;
2934 : }
2935 :
2936 0 : _PUBLIC_ void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r)
2937 : {
2938 0 : ndr_print_struct(ndr, name, "samr_UserInfo18");
2939 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2940 0 : ndr->depth++;
2941 0 : ndr_print_samr_Password(ndr, "nt_pwd", &r->nt_pwd);
2942 0 : ndr_print_samr_Password(ndr, "lm_pwd", &r->lm_pwd);
2943 0 : ndr_print_uint8(ndr, "nt_pwd_active", r->nt_pwd_active);
2944 0 : ndr_print_uint8(ndr, "lm_pwd_active", r->lm_pwd_active);
2945 0 : ndr_print_uint8(ndr, "password_expired", r->password_expired);
2946 0 : ndr->depth--;
2947 : }
2948 :
2949 288 : static enum ndr_err_code ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo20 *r)
2950 : {
2951 288 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2952 288 : if (ndr_flags & NDR_SCALARS) {
2953 144 : NDR_CHECK(ndr_push_align(ndr, 5));
2954 144 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2955 144 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2956 : }
2957 288 : if (ndr_flags & NDR_BUFFERS) {
2958 144 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2959 : }
2960 288 : return NDR_ERR_SUCCESS;
2961 : }
2962 :
2963 288 : static enum ndr_err_code ndr_pull_samr_UserInfo20(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo20 *r)
2964 : {
2965 288 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2966 288 : if (ndr_flags & NDR_SCALARS) {
2967 144 : NDR_CHECK(ndr_pull_align(ndr, 5));
2968 144 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2969 144 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2970 : }
2971 288 : if (ndr_flags & NDR_BUFFERS) {
2972 144 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2973 : }
2974 288 : return NDR_ERR_SUCCESS;
2975 : }
2976 :
2977 0 : _PUBLIC_ void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r)
2978 : {
2979 0 : ndr_print_struct(ndr, name, "samr_UserInfo20");
2980 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2981 0 : ndr->depth++;
2982 0 : ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
2983 0 : ndr->depth--;
2984 : }
2985 :
2986 4738 : static enum ndr_err_code ndr_push_samr_FieldsPresent(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2987 : {
2988 4738 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2989 4738 : return NDR_ERR_SUCCESS;
2990 : }
2991 :
2992 4694 : static enum ndr_err_code ndr_pull_samr_FieldsPresent(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2993 : {
2994 : uint32_t v;
2995 4694 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2996 4694 : *r = v;
2997 4694 : return NDR_ERR_SUCCESS;
2998 : }
2999 :
3000 86 : _PUBLIC_ void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r)
3001 : {
3002 86 : ndr_print_uint32(ndr, name, r);
3003 86 : ndr->depth++;
3004 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCOUNT_NAME", SAMR_FIELD_ACCOUNT_NAME, r);
3005 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_FULL_NAME", SAMR_FIELD_FULL_NAME, r);
3006 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_RID", SAMR_FIELD_RID, r);
3007 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PRIMARY_GID", SAMR_FIELD_PRIMARY_GID, r);
3008 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_DESCRIPTION", SAMR_FIELD_DESCRIPTION, r);
3009 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_COMMENT", SAMR_FIELD_COMMENT, r);
3010 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_HOME_DIRECTORY", SAMR_FIELD_HOME_DIRECTORY, r);
3011 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_HOME_DRIVE", SAMR_FIELD_HOME_DRIVE, r);
3012 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LOGON_SCRIPT", SAMR_FIELD_LOGON_SCRIPT, r);
3013 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PROFILE_PATH", SAMR_FIELD_PROFILE_PATH, r);
3014 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_WORKSTATIONS", SAMR_FIELD_WORKSTATIONS, r);
3015 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGON", SAMR_FIELD_LAST_LOGON, r);
3016 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGOFF", SAMR_FIELD_LAST_LOGOFF, r);
3017 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LOGON_HOURS", SAMR_FIELD_LOGON_HOURS, r);
3018 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_BAD_PWD_COUNT", SAMR_FIELD_BAD_PWD_COUNT, r);
3019 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_NUM_LOGONS", SAMR_FIELD_NUM_LOGONS, r);
3020 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ALLOW_PWD_CHANGE", SAMR_FIELD_ALLOW_PWD_CHANGE, r);
3021 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_FORCE_PWD_CHANGE", SAMR_FIELD_FORCE_PWD_CHANGE, r);
3022 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_PWD_CHANGE", SAMR_FIELD_LAST_PWD_CHANGE, r);
3023 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCT_EXPIRY", SAMR_FIELD_ACCT_EXPIRY, r);
3024 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCT_FLAGS", SAMR_FIELD_ACCT_FLAGS, r);
3025 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PARAMETERS", SAMR_FIELD_PARAMETERS, r);
3026 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_COUNTRY_CODE", SAMR_FIELD_COUNTRY_CODE, r);
3027 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_CODE_PAGE", SAMR_FIELD_CODE_PAGE, r);
3028 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_NT_PASSWORD_PRESENT", SAMR_FIELD_NT_PASSWORD_PRESENT, r);
3029 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LM_PASSWORD_PRESENT", SAMR_FIELD_LM_PASSWORD_PRESENT, r);
3030 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PRIVATE_DATA", SAMR_FIELD_PRIVATE_DATA, r);
3031 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_EXPIRED_FLAG", SAMR_FIELD_EXPIRED_FLAG, r);
3032 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_SEC_DESC", SAMR_FIELD_SEC_DESC, r);
3033 86 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_OWF_PWD", SAMR_FIELD_OWF_PWD, r);
3034 86 : ndr->depth--;
3035 86 : }
3036 :
3037 9476 : static enum ndr_err_code ndr_push_samr_UserInfo21(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo21 *r)
3038 : {
3039 9476 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3040 9476 : if (ndr_flags & NDR_SCALARS) {
3041 4738 : NDR_CHECK(ndr_push_align(ndr, 5));
3042 4738 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
3043 4738 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
3044 4738 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
3045 4738 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
3046 4738 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
3047 4738 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
3048 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
3049 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
3050 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
3051 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
3052 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
3053 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
3054 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
3055 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
3056 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
3057 4738 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
3058 4738 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->lm_owf_password));
3059 4738 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->nt_owf_password));
3060 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->private_data));
3061 4738 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_count));
3062 4738 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer));
3063 4738 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
3064 4738 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
3065 4738 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
3066 4738 : NDR_CHECK(ndr_push_samr_FieldsPresent(ndr, NDR_SCALARS, r->fields_present));
3067 4738 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
3068 4738 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
3069 4738 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
3070 4738 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
3071 4738 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
3072 4738 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_set));
3073 4738 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_set));
3074 4738 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
3075 4738 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->private_data_sensitive));
3076 4738 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3077 : }
3078 9476 : if (ndr_flags & NDR_BUFFERS) {
3079 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
3080 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
3081 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
3082 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
3083 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
3084 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
3085 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
3086 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
3087 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
3088 4738 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
3089 4738 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->lm_owf_password));
3090 4738 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->nt_owf_password));
3091 4738 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->private_data));
3092 4738 : if (r->buffer) {
3093 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->buf_count));
3094 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->buf_count));
3095 : }
3096 4738 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
3097 : }
3098 9476 : return NDR_ERR_SUCCESS;
3099 : }
3100 :
3101 9388 : static enum ndr_err_code ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo21 *r)
3102 : {
3103 : uint32_t _ptr_buffer;
3104 9388 : uint32_t size_buffer_1 = 0;
3105 9388 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
3106 9388 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3107 9388 : if (ndr_flags & NDR_SCALARS) {
3108 4694 : NDR_CHECK(ndr_pull_align(ndr, 5));
3109 4694 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
3110 4694 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
3111 4694 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
3112 4694 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
3113 4694 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
3114 4694 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
3115 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
3116 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
3117 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
3118 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
3119 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
3120 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
3121 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
3122 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
3123 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
3124 4694 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
3125 4694 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->lm_owf_password));
3126 4694 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->nt_owf_password));
3127 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->private_data));
3128 4694 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_count));
3129 4694 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
3130 4694 : if (_ptr_buffer) {
3131 0 : NDR_PULL_ALLOC(ndr, r->buffer);
3132 : } else {
3133 4694 : r->buffer = NULL;
3134 : }
3135 4694 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3136 4694 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
3137 4694 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
3138 4694 : NDR_CHECK(ndr_pull_samr_FieldsPresent(ndr, NDR_SCALARS, &r->fields_present));
3139 4694 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
3140 4694 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
3141 4694 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
3142 4694 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
3143 4694 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
3144 4694 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_set));
3145 4694 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_set));
3146 4694 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3147 4694 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->private_data_sensitive));
3148 4694 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3149 : }
3150 9388 : if (ndr_flags & NDR_BUFFERS) {
3151 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
3152 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
3153 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
3154 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
3155 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
3156 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
3157 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
3158 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
3159 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
3160 4694 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
3161 4694 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->lm_owf_password));
3162 4694 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->nt_owf_password));
3163 4694 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->private_data));
3164 4694 : if (r->buffer) {
3165 0 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
3166 0 : NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0);
3167 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer));
3168 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->buffer, &size_buffer_1));
3169 0 : NDR_PULL_ALLOC_N(ndr, r->buffer, size_buffer_1);
3170 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, size_buffer_1));
3171 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
3172 : }
3173 4694 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
3174 4694 : if (r->buffer) {
3175 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->buffer, r->buf_count));
3176 : }
3177 : }
3178 9388 : return NDR_ERR_SUCCESS;
3179 : }
3180 :
3181 86 : _PUBLIC_ void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r)
3182 : {
3183 86 : ndr_print_struct(ndr, name, "samr_UserInfo21");
3184 86 : if (r == NULL) { ndr_print_null(ndr); return; }
3185 86 : ndr->depth++;
3186 86 : ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
3187 86 : ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
3188 86 : ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
3189 86 : ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
3190 86 : ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
3191 86 : ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
3192 86 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
3193 86 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
3194 86 : ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
3195 86 : ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
3196 86 : ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
3197 86 : ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
3198 86 : ndr_print_lsa_String(ndr, "description", &r->description);
3199 86 : ndr_print_lsa_String(ndr, "workstations", &r->workstations);
3200 86 : ndr_print_lsa_String(ndr, "comment", &r->comment);
3201 86 : ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
3202 86 : ndr_print_lsa_BinaryString(ndr, "lm_owf_password", &r->lm_owf_password);
3203 86 : ndr_print_lsa_BinaryString(ndr, "nt_owf_password", &r->nt_owf_password);
3204 86 : ndr_print_lsa_String(ndr, "private_data", &r->private_data);
3205 86 : ndr_print_uint32(ndr, "buf_count", r->buf_count);
3206 86 : ndr_print_ptr(ndr, "buffer", r->buffer);
3207 86 : ndr->depth++;
3208 86 : if (r->buffer) {
3209 0 : ndr_print_array_uint8(ndr, "buffer", r->buffer, r->buf_count);
3210 : }
3211 86 : ndr->depth--;
3212 86 : ndr_print_uint32(ndr, "rid", r->rid);
3213 86 : ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
3214 86 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
3215 86 : ndr_print_samr_FieldsPresent(ndr, "fields_present", r->fields_present);
3216 86 : ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
3217 86 : ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
3218 86 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
3219 86 : ndr_print_uint16(ndr, "country_code", r->country_code);
3220 86 : ndr_print_uint16(ndr, "code_page", r->code_page);
3221 86 : ndr_print_uint8(ndr, "lm_password_set", r->lm_password_set);
3222 86 : ndr_print_uint8(ndr, "nt_password_set", r->nt_password_set);
3223 86 : ndr_print_uint8(ndr, "password_expired", r->password_expired);
3224 86 : ndr_print_uint8(ndr, "private_data_sensitive", r->private_data_sensitive);
3225 86 : ndr->depth--;
3226 : }
3227 :
3228 3063 : _PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r)
3229 : {
3230 : {
3231 3063 : uint32_t _flags_save_STRUCT = ndr->flags;
3232 3063 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3233 3063 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3234 3063 : if (ndr_flags & NDR_SCALARS) {
3235 3063 : NDR_CHECK(ndr_push_align(ndr, 1));
3236 3063 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 516));
3237 3063 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3238 : }
3239 3063 : if (ndr_flags & NDR_BUFFERS) {
3240 : }
3241 3063 : ndr->flags = _flags_save_STRUCT;
3242 : }
3243 3063 : return NDR_ERR_SUCCESS;
3244 : }
3245 :
3246 3081 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r)
3247 : {
3248 3081 : uint32_t size_data_0 = 0;
3249 : {
3250 3081 : uint32_t _flags_save_STRUCT = ndr->flags;
3251 3081 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3252 3081 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3253 3081 : if (ndr_flags & NDR_SCALARS) {
3254 3081 : NDR_CHECK(ndr_pull_align(ndr, 1));
3255 3081 : size_data_0 = 516;
3256 3081 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
3257 3081 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3258 : }
3259 3081 : if (ndr_flags & NDR_BUFFERS) {
3260 : }
3261 3081 : ndr->flags = _flags_save_STRUCT;
3262 : }
3263 3081 : return NDR_ERR_SUCCESS;
3264 : }
3265 :
3266 0 : static void ndr_print_flags_samr_CryptPassword(struct ndr_print *ndr, const char *name, int unused, const struct samr_CryptPassword *r)
3267 : {
3268 0 : ndr_print_samr_CryptPassword(ndr, name, r);
3269 0 : }
3270 :
3271 0 : _PUBLIC_ void ndr_print_samr_CryptPassword(struct ndr_print *ndr, const char *name, const struct samr_CryptPassword *r)
3272 : {
3273 0 : ndr_print_struct(ndr, name, "samr_CryptPassword");
3274 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3275 : {
3276 0 : uint32_t _flags_save_STRUCT = ndr->flags;
3277 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3278 0 : ndr->depth++;
3279 0 : ndr_print_array_uint8(ndr, "data", r->data, 516);
3280 0 : ndr->depth--;
3281 0 : ndr->flags = _flags_save_STRUCT;
3282 : }
3283 : }
3284 :
3285 144 : static enum ndr_err_code ndr_push_samr_UserInfo23(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo23 *r)
3286 : {
3287 144 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3288 144 : if (ndr_flags & NDR_SCALARS) {
3289 72 : NDR_CHECK(ndr_push_align(ndr, 5));
3290 72 : NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3291 72 : NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3292 72 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3293 : }
3294 144 : if (ndr_flags & NDR_BUFFERS) {
3295 72 : NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3296 : }
3297 144 : return NDR_ERR_SUCCESS;
3298 : }
3299 :
3300 144 : static enum ndr_err_code ndr_pull_samr_UserInfo23(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo23 *r)
3301 : {
3302 144 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3303 144 : if (ndr_flags & NDR_SCALARS) {
3304 72 : NDR_CHECK(ndr_pull_align(ndr, 5));
3305 72 : NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3306 72 : NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3307 72 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3308 : }
3309 144 : if (ndr_flags & NDR_BUFFERS) {
3310 72 : NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3311 : }
3312 144 : return NDR_ERR_SUCCESS;
3313 : }
3314 :
3315 0 : _PUBLIC_ void ndr_print_samr_UserInfo23(struct ndr_print *ndr, const char *name, const struct samr_UserInfo23 *r)
3316 : {
3317 0 : ndr_print_struct(ndr, name, "samr_UserInfo23");
3318 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3319 0 : ndr->depth++;
3320 0 : ndr_print_samr_UserInfo21(ndr, "info", &r->info);
3321 0 : ndr_print_samr_CryptPassword(ndr, "password", &r->password);
3322 0 : ndr->depth--;
3323 : }
3324 :
3325 159 : static enum ndr_err_code ndr_push_samr_UserInfo24(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo24 *r)
3326 : {
3327 159 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3328 159 : if (ndr_flags & NDR_SCALARS) {
3329 159 : NDR_CHECK(ndr_push_align(ndr, 1));
3330 159 : NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3331 159 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
3332 159 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3333 : }
3334 159 : if (ndr_flags & NDR_BUFFERS) {
3335 : }
3336 159 : return NDR_ERR_SUCCESS;
3337 : }
3338 :
3339 159 : static enum ndr_err_code ndr_pull_samr_UserInfo24(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo24 *r)
3340 : {
3341 159 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3342 159 : if (ndr_flags & NDR_SCALARS) {
3343 159 : NDR_CHECK(ndr_pull_align(ndr, 1));
3344 159 : NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
3345 159 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3346 159 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3347 : }
3348 159 : if (ndr_flags & NDR_BUFFERS) {
3349 : }
3350 159 : return NDR_ERR_SUCCESS;
3351 : }
3352 :
3353 0 : _PUBLIC_ void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name, const struct samr_UserInfo24 *r)
3354 : {
3355 0 : ndr_print_struct(ndr, name, "samr_UserInfo24");
3356 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3357 0 : ndr->depth++;
3358 0 : ndr_print_samr_CryptPassword(ndr, "password", &r->password);
3359 0 : ndr_print_uint8(ndr, "password_expired", r->password_expired);
3360 0 : ndr->depth--;
3361 : }
3362 :
3363 494 : static enum ndr_err_code ndr_push_samr_CryptPasswordEx(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPasswordEx *r)
3364 : {
3365 : {
3366 494 : uint32_t _flags_save_STRUCT = ndr->flags;
3367 494 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3368 494 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3369 494 : if (ndr_flags & NDR_SCALARS) {
3370 494 : NDR_CHECK(ndr_push_align(ndr, 1));
3371 494 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 532));
3372 494 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3373 : }
3374 494 : if (ndr_flags & NDR_BUFFERS) {
3375 : }
3376 494 : ndr->flags = _flags_save_STRUCT;
3377 : }
3378 494 : return NDR_ERR_SUCCESS;
3379 : }
3380 :
3381 492 : static enum ndr_err_code ndr_pull_samr_CryptPasswordEx(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPasswordEx *r)
3382 : {
3383 492 : uint32_t size_data_0 = 0;
3384 : {
3385 492 : uint32_t _flags_save_STRUCT = ndr->flags;
3386 492 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3387 492 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3388 492 : if (ndr_flags & NDR_SCALARS) {
3389 492 : NDR_CHECK(ndr_pull_align(ndr, 1));
3390 492 : size_data_0 = 532;
3391 492 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
3392 492 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3393 : }
3394 492 : if (ndr_flags & NDR_BUFFERS) {
3395 : }
3396 492 : ndr->flags = _flags_save_STRUCT;
3397 : }
3398 492 : return NDR_ERR_SUCCESS;
3399 : }
3400 :
3401 0 : _PUBLIC_ void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, const struct samr_CryptPasswordEx *r)
3402 : {
3403 0 : ndr_print_struct(ndr, name, "samr_CryptPasswordEx");
3404 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3405 : {
3406 0 : uint32_t _flags_save_STRUCT = ndr->flags;
3407 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3408 0 : ndr->depth++;
3409 0 : ndr_print_array_uint8(ndr, "data", r->data, 532);
3410 0 : ndr->depth--;
3411 0 : ndr->flags = _flags_save_STRUCT;
3412 : }
3413 : }
3414 :
3415 822 : static enum ndr_err_code ndr_push_samr_UserInfo25(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo25 *r)
3416 : {
3417 822 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3418 822 : if (ndr_flags & NDR_SCALARS) {
3419 411 : NDR_CHECK(ndr_push_align(ndr, 5));
3420 411 : NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3421 411 : NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3422 411 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3423 : }
3424 822 : if (ndr_flags & NDR_BUFFERS) {
3425 411 : NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3426 : }
3427 822 : return NDR_ERR_SUCCESS;
3428 : }
3429 :
3430 820 : static enum ndr_err_code ndr_pull_samr_UserInfo25(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo25 *r)
3431 : {
3432 820 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3433 820 : if (ndr_flags & NDR_SCALARS) {
3434 410 : NDR_CHECK(ndr_pull_align(ndr, 5));
3435 410 : NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3436 410 : NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3437 410 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3438 : }
3439 820 : if (ndr_flags & NDR_BUFFERS) {
3440 410 : NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3441 : }
3442 820 : return NDR_ERR_SUCCESS;
3443 : }
3444 :
3445 0 : _PUBLIC_ void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r)
3446 : {
3447 0 : ndr_print_struct(ndr, name, "samr_UserInfo25");
3448 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3449 0 : ndr->depth++;
3450 0 : ndr_print_samr_UserInfo21(ndr, "info", &r->info);
3451 0 : ndr_print_samr_CryptPasswordEx(ndr, "password", &r->password);
3452 0 : ndr->depth--;
3453 : }
3454 :
3455 83 : static enum ndr_err_code ndr_push_samr_UserInfo26(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo26 *r)
3456 : {
3457 83 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3458 83 : if (ndr_flags & NDR_SCALARS) {
3459 83 : NDR_CHECK(ndr_push_align(ndr, 1));
3460 83 : NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3461 83 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
3462 83 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
3463 : }
3464 83 : if (ndr_flags & NDR_BUFFERS) {
3465 : }
3466 83 : return NDR_ERR_SUCCESS;
3467 : }
3468 :
3469 82 : static enum ndr_err_code ndr_pull_samr_UserInfo26(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo26 *r)
3470 : {
3471 82 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3472 82 : if (ndr_flags & NDR_SCALARS) {
3473 82 : NDR_CHECK(ndr_pull_align(ndr, 1));
3474 82 : NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
3475 82 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3476 82 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
3477 : }
3478 82 : if (ndr_flags & NDR_BUFFERS) {
3479 : }
3480 82 : return NDR_ERR_SUCCESS;
3481 : }
3482 :
3483 0 : _PUBLIC_ void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r)
3484 : {
3485 0 : ndr_print_struct(ndr, name, "samr_UserInfo26");
3486 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3487 0 : ndr->depth++;
3488 0 : ndr_print_samr_CryptPasswordEx(ndr, "password", &r->password);
3489 0 : ndr_print_uint8(ndr, "password_expired", r->password_expired);
3490 0 : ndr->depth--;
3491 : }
3492 :
3493 203 : static enum ndr_err_code ndr_push_samr_EncryptedPasswordAES(struct ndr_push *ndr, int ndr_flags, const struct samr_EncryptedPasswordAES *r)
3494 : {
3495 203 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3496 203 : if (ndr_flags & NDR_SCALARS) {
3497 107 : NDR_CHECK(ndr_push_align(ndr, 8));
3498 107 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->auth_data, 64));
3499 107 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->salt, 16));
3500 107 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cipher_len));
3501 107 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->cipher));
3502 107 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PBKDF2Iterations));
3503 107 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3504 : }
3505 203 : if (ndr_flags & NDR_BUFFERS) {
3506 107 : if (r->cipher) {
3507 107 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->cipher_len));
3508 107 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->cipher, r->cipher_len));
3509 : }
3510 : }
3511 203 : return NDR_ERR_SUCCESS;
3512 : }
3513 :
3514 210 : static enum ndr_err_code ndr_pull_samr_EncryptedPasswordAES(struct ndr_pull *ndr, int ndr_flags, struct samr_EncryptedPasswordAES *r)
3515 : {
3516 210 : uint32_t size_auth_data_0 = 0;
3517 210 : uint32_t size_salt_0 = 0;
3518 : uint32_t _ptr_cipher;
3519 210 : uint32_t size_cipher_1 = 0;
3520 210 : TALLOC_CTX *_mem_save_cipher_0 = NULL;
3521 210 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3522 210 : if (ndr_flags & NDR_SCALARS) {
3523 114 : NDR_CHECK(ndr_pull_align(ndr, 8));
3524 114 : size_auth_data_0 = 64;
3525 114 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->auth_data, size_auth_data_0));
3526 114 : size_salt_0 = 16;
3527 114 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->salt, size_salt_0));
3528 114 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cipher_len));
3529 114 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cipher));
3530 114 : if (_ptr_cipher) {
3531 114 : NDR_PULL_ALLOC(ndr, r->cipher);
3532 : } else {
3533 0 : r->cipher = NULL;
3534 : }
3535 114 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PBKDF2Iterations));
3536 114 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3537 : }
3538 210 : if (ndr_flags & NDR_BUFFERS) {
3539 114 : if (r->cipher) {
3540 114 : _mem_save_cipher_0 = NDR_PULL_GET_MEM_CTX(ndr);
3541 114 : NDR_PULL_SET_MEM_CTX(ndr, r->cipher, 0);
3542 114 : NDR_CHECK(ndr_pull_array_size(ndr, &r->cipher));
3543 114 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cipher, &size_cipher_1));
3544 114 : NDR_PULL_ALLOC_N(ndr, r->cipher, size_cipher_1);
3545 114 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->cipher, size_cipher_1));
3546 114 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cipher_0, 0);
3547 : }
3548 114 : if (r->cipher) {
3549 114 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cipher, r->cipher_len));
3550 : }
3551 : }
3552 210 : return NDR_ERR_SUCCESS;
3553 : }
3554 :
3555 0 : _PUBLIC_ void ndr_print_samr_EncryptedPasswordAES(struct ndr_print *ndr, const char *name, const struct samr_EncryptedPasswordAES *r)
3556 : {
3557 0 : ndr_print_struct(ndr, name, "samr_EncryptedPasswordAES");
3558 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3559 0 : ndr->depth++;
3560 0 : ndr_print_array_uint8(ndr, "auth_data", r->auth_data, 64);
3561 0 : ndr_print_array_uint8(ndr, "salt", r->salt, 16);
3562 0 : ndr_print_uint32(ndr, "cipher_len", r->cipher_len);
3563 0 : ndr_print_ptr(ndr, "cipher", r->cipher);
3564 0 : ndr->depth++;
3565 0 : if (r->cipher) {
3566 0 : ndr_print_array_uint8(ndr, "cipher", r->cipher, r->cipher_len);
3567 : }
3568 0 : ndr->depth--;
3569 0 : ndr_print_hyper(ndr, "PBKDF2Iterations", r->PBKDF2Iterations);
3570 0 : ndr->depth--;
3571 : }
3572 :
3573 48 : static enum ndr_err_code ndr_push_samr_UserInfo31(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo31 *r)
3574 : {
3575 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3576 48 : if (ndr_flags & NDR_SCALARS) {
3577 24 : NDR_CHECK(ndr_push_align(ndr, 8));
3578 24 : NDR_CHECK(ndr_push_samr_EncryptedPasswordAES(ndr, NDR_SCALARS, &r->password));
3579 24 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
3580 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3581 : }
3582 48 : if (ndr_flags & NDR_BUFFERS) {
3583 24 : NDR_CHECK(ndr_push_samr_EncryptedPasswordAES(ndr, NDR_BUFFERS, &r->password));
3584 : }
3585 48 : return NDR_ERR_SUCCESS;
3586 : }
3587 :
3588 48 : static enum ndr_err_code ndr_pull_samr_UserInfo31(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo31 *r)
3589 : {
3590 48 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3591 48 : if (ndr_flags & NDR_SCALARS) {
3592 24 : NDR_CHECK(ndr_pull_align(ndr, 8));
3593 24 : NDR_CHECK(ndr_pull_samr_EncryptedPasswordAES(ndr, NDR_SCALARS, &r->password));
3594 24 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
3595 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3596 : }
3597 48 : if (ndr_flags & NDR_BUFFERS) {
3598 24 : NDR_CHECK(ndr_pull_samr_EncryptedPasswordAES(ndr, NDR_BUFFERS, &r->password));
3599 : }
3600 48 : return NDR_ERR_SUCCESS;
3601 : }
3602 :
3603 0 : _PUBLIC_ void ndr_print_samr_UserInfo31(struct ndr_print *ndr, const char *name, const struct samr_UserInfo31 *r)
3604 : {
3605 0 : ndr_print_struct(ndr, name, "samr_UserInfo31");
3606 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3607 0 : ndr->depth++;
3608 0 : ndr_print_samr_EncryptedPasswordAES(ndr, "password", &r->password);
3609 0 : ndr_print_uint8(ndr, "password_expired", r->password_expired);
3610 0 : ndr->depth--;
3611 : }
3612 :
3613 144 : static enum ndr_err_code ndr_push_samr_UserInfo32(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo32 *r)
3614 : {
3615 144 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3616 144 : if (ndr_flags & NDR_SCALARS) {
3617 72 : NDR_CHECK(ndr_push_align(ndr, 8));
3618 72 : NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3619 72 : NDR_CHECK(ndr_push_samr_EncryptedPasswordAES(ndr, NDR_SCALARS, &r->password));
3620 72 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3621 : }
3622 144 : if (ndr_flags & NDR_BUFFERS) {
3623 72 : NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3624 72 : NDR_CHECK(ndr_push_samr_EncryptedPasswordAES(ndr, NDR_BUFFERS, &r->password));
3625 : }
3626 144 : return NDR_ERR_SUCCESS;
3627 : }
3628 :
3629 144 : static enum ndr_err_code ndr_pull_samr_UserInfo32(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo32 *r)
3630 : {
3631 144 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3632 144 : if (ndr_flags & NDR_SCALARS) {
3633 72 : NDR_CHECK(ndr_pull_align(ndr, 8));
3634 72 : NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info));
3635 72 : NDR_CHECK(ndr_pull_samr_EncryptedPasswordAES(ndr, NDR_SCALARS, &r->password));
3636 72 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3637 : }
3638 144 : if (ndr_flags & NDR_BUFFERS) {
3639 72 : NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info));
3640 72 : NDR_CHECK(ndr_pull_samr_EncryptedPasswordAES(ndr, NDR_BUFFERS, &r->password));
3641 : }
3642 144 : return NDR_ERR_SUCCESS;
3643 : }
3644 :
3645 0 : _PUBLIC_ void ndr_print_samr_UserInfo32(struct ndr_print *ndr, const char *name, const struct samr_UserInfo32 *r)
3646 : {
3647 0 : ndr_print_struct(ndr, name, "samr_UserInfo32");
3648 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3649 0 : ndr->depth++;
3650 0 : ndr_print_samr_UserInfo21(ndr, "info", &r->info);
3651 0 : ndr_print_samr_EncryptedPasswordAES(ndr, "password", &r->password);
3652 0 : ndr->depth--;
3653 : }
3654 :
3655 13296 : static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_flags, const union samr_UserInfo *r)
3656 : {
3657 : uint32_t level;
3658 13296 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3659 13296 : if (ndr_flags & NDR_SCALARS) {
3660 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3661 13296 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3662 13296 : NDR_CHECK(ndr_push_union_align(ndr, 8));
3663 13296 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
3664 13296 : NDR_CHECK(ndr_push_union_align(ndr, 8));
3665 13296 : switch (level) {
3666 189 : case 1: {
3667 189 : NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1));
3668 189 : break; }
3669 :
3670 335 : case 2: {
3671 335 : NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2));
3672 335 : break; }
3673 :
3674 1337 : case 3: {
3675 1337 : NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3));
3676 1337 : break; }
3677 :
3678 168 : case 4: {
3679 168 : NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4));
3680 168 : break; }
3681 :
3682 1577 : case 5: {
3683 1577 : NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5));
3684 1577 : break; }
3685 :
3686 636 : case 6: {
3687 636 : NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6));
3688 636 : break; }
3689 :
3690 328 : case 7: {
3691 328 : NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7));
3692 328 : break; }
3693 :
3694 166 : case 8: {
3695 166 : NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8));
3696 166 : break; }
3697 :
3698 24 : case 9: {
3699 24 : NDR_CHECK(ndr_push_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9));
3700 24 : break; }
3701 :
3702 392 : case 10: {
3703 392 : NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10));
3704 392 : break; }
3705 :
3706 176 : case 11: {
3707 176 : NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11));
3708 176 : break; }
3709 :
3710 200 : case 12: {
3711 200 : NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12));
3712 200 : break; }
3713 :
3714 180 : case 13: {
3715 180 : NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13));
3716 180 : break; }
3717 :
3718 180 : case 14: {
3719 180 : NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14));
3720 180 : break; }
3721 :
3722 2036 : case 16: {
3723 2036 : NDR_CHECK(ndr_push_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16));
3724 2036 : break; }
3725 :
3726 142 : case 17: {
3727 142 : NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17));
3728 142 : break; }
3729 :
3730 82 : case 18: {
3731 82 : NDR_CHECK(ndr_push_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18));
3732 82 : break; }
3733 :
3734 144 : case 20: {
3735 144 : NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20));
3736 144 : break; }
3737 :
3738 4183 : case 21: {
3739 4183 : NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21));
3740 4183 : break; }
3741 :
3742 72 : case 23: {
3743 72 : NDR_CHECK(ndr_push_samr_UserInfo23(ndr, NDR_SCALARS, &r->info23));
3744 72 : break; }
3745 :
3746 159 : case 24: {
3747 159 : NDR_CHECK(ndr_push_samr_UserInfo24(ndr, NDR_SCALARS, &r->info24));
3748 159 : break; }
3749 :
3750 411 : case 25: {
3751 411 : NDR_CHECK(ndr_push_samr_UserInfo25(ndr, NDR_SCALARS, &r->info25));
3752 411 : break; }
3753 :
3754 83 : case 26: {
3755 83 : NDR_CHECK(ndr_push_samr_UserInfo26(ndr, NDR_SCALARS, &r->info26));
3756 83 : break; }
3757 :
3758 24 : case 31: {
3759 24 : NDR_CHECK(ndr_push_samr_UserInfo31(ndr, NDR_SCALARS, &r->info31));
3760 24 : break; }
3761 :
3762 72 : case 32: {
3763 72 : NDR_CHECK(ndr_push_samr_UserInfo32(ndr, NDR_SCALARS, &r->info32));
3764 72 : break; }
3765 :
3766 0 : default:
3767 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3768 : }
3769 0 : }
3770 13296 : if (ndr_flags & NDR_BUFFERS) {
3771 13296 : if (!(ndr_flags & NDR_SCALARS)) {
3772 : /* We didn't get it above, and the token is not needed after this. */
3773 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3774 : }
3775 13296 : switch (level) {
3776 189 : case 1:
3777 189 : NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1));
3778 189 : break;
3779 :
3780 335 : case 2:
3781 335 : NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2));
3782 335 : break;
3783 :
3784 1337 : case 3:
3785 1337 : NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3));
3786 1337 : break;
3787 :
3788 168 : case 4:
3789 168 : NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4));
3790 168 : break;
3791 :
3792 1577 : case 5:
3793 1577 : NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5));
3794 1577 : break;
3795 :
3796 636 : case 6:
3797 636 : NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6));
3798 636 : break;
3799 :
3800 328 : case 7:
3801 328 : NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7));
3802 328 : break;
3803 :
3804 166 : case 8:
3805 166 : NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8));
3806 166 : break;
3807 :
3808 24 : case 9:
3809 24 : break;
3810 :
3811 392 : case 10:
3812 392 : NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10));
3813 392 : break;
3814 :
3815 176 : case 11:
3816 176 : NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11));
3817 176 : break;
3818 :
3819 200 : case 12:
3820 200 : NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12));
3821 200 : break;
3822 :
3823 180 : case 13:
3824 180 : NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13));
3825 180 : break;
3826 :
3827 180 : case 14:
3828 180 : NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14));
3829 180 : break;
3830 :
3831 2036 : case 16:
3832 2036 : break;
3833 :
3834 142 : case 17:
3835 142 : break;
3836 :
3837 82 : case 18:
3838 82 : break;
3839 :
3840 144 : case 20:
3841 144 : NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20));
3842 144 : break;
3843 :
3844 4183 : case 21:
3845 4183 : NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21));
3846 4183 : break;
3847 :
3848 72 : case 23:
3849 72 : NDR_CHECK(ndr_push_samr_UserInfo23(ndr, NDR_BUFFERS, &r->info23));
3850 72 : break;
3851 :
3852 159 : case 24:
3853 159 : break;
3854 :
3855 411 : case 25:
3856 411 : NDR_CHECK(ndr_push_samr_UserInfo25(ndr, NDR_BUFFERS, &r->info25));
3857 411 : break;
3858 :
3859 83 : case 26:
3860 83 : break;
3861 :
3862 24 : case 31:
3863 24 : NDR_CHECK(ndr_push_samr_UserInfo31(ndr, NDR_BUFFERS, &r->info31));
3864 24 : break;
3865 :
3866 72 : case 32:
3867 72 : NDR_CHECK(ndr_push_samr_UserInfo32(ndr, NDR_BUFFERS, &r->info32));
3868 72 : break;
3869 :
3870 0 : default:
3871 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3872 : }
3873 0 : }
3874 13296 : return NDR_ERR_SUCCESS;
3875 : }
3876 :
3877 13132 : static enum ndr_err_code ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_flags, union samr_UserInfo *r)
3878 : {
3879 : uint32_t level;
3880 : uint16_t _level;
3881 13132 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3882 13132 : if (ndr_flags & NDR_SCALARS) {
3883 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3884 13132 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3885 13132 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
3886 13132 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3887 13132 : if (_level != level) {
3888 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3889 : }
3890 13132 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
3891 13132 : switch (level) {
3892 169 : case 1: {
3893 169 : NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1));
3894 169 : break; }
3895 :
3896 328 : case 2: {
3897 328 : NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2));
3898 328 : break; }
3899 :
3900 1337 : case 3: {
3901 1337 : NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3));
3902 1337 : break; }
3903 :
3904 168 : case 4: {
3905 168 : NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4));
3906 168 : break; }
3907 :
3908 1575 : case 5: {
3909 1575 : NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5));
3910 1575 : break; }
3911 :
3912 636 : case 6: {
3913 636 : NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6));
3914 636 : break; }
3915 :
3916 328 : case 7: {
3917 328 : NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7));
3918 328 : break; }
3919 :
3920 166 : case 8: {
3921 166 : NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8));
3922 166 : break; }
3923 :
3924 24 : case 9: {
3925 24 : NDR_CHECK(ndr_pull_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9));
3926 24 : break; }
3927 :
3928 380 : case 10: {
3929 380 : NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10));
3930 380 : break; }
3931 :
3932 176 : case 11: {
3933 176 : NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11));
3934 176 : break; }
3935 :
3936 200 : case 12: {
3937 200 : NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12));
3938 200 : break; }
3939 :
3940 180 : case 13: {
3941 180 : NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13));
3942 180 : break; }
3943 :
3944 180 : case 14: {
3945 180 : NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14));
3946 180 : break; }
3947 :
3948 1958 : case 16: {
3949 1958 : NDR_CHECK(ndr_pull_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16));
3950 1958 : break; }
3951 :
3952 142 : case 17: {
3953 142 : NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17));
3954 142 : break; }
3955 :
3956 82 : case 18: {
3957 82 : NDR_CHECK(ndr_pull_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18));
3958 82 : break; }
3959 :
3960 144 : case 20: {
3961 144 : NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20));
3962 144 : break; }
3963 :
3964 4140 : case 21: {
3965 4140 : NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21));
3966 4140 : break; }
3967 :
3968 72 : case 23: {
3969 72 : NDR_CHECK(ndr_pull_samr_UserInfo23(ndr, NDR_SCALARS, &r->info23));
3970 72 : break; }
3971 :
3972 159 : case 24: {
3973 159 : NDR_CHECK(ndr_pull_samr_UserInfo24(ndr, NDR_SCALARS, &r->info24));
3974 159 : break; }
3975 :
3976 410 : case 25: {
3977 410 : NDR_CHECK(ndr_pull_samr_UserInfo25(ndr, NDR_SCALARS, &r->info25));
3978 410 : break; }
3979 :
3980 82 : case 26: {
3981 82 : NDR_CHECK(ndr_pull_samr_UserInfo26(ndr, NDR_SCALARS, &r->info26));
3982 82 : break; }
3983 :
3984 24 : case 31: {
3985 24 : NDR_CHECK(ndr_pull_samr_UserInfo31(ndr, NDR_SCALARS, &r->info31));
3986 24 : break; }
3987 :
3988 72 : case 32: {
3989 72 : NDR_CHECK(ndr_pull_samr_UserInfo32(ndr, NDR_SCALARS, &r->info32));
3990 72 : break; }
3991 :
3992 0 : default:
3993 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3994 : }
3995 0 : }
3996 13132 : if (ndr_flags & NDR_BUFFERS) {
3997 13132 : if (!(ndr_flags & NDR_SCALARS)) {
3998 : /* We didn't get it above, and the token is not needed after this. */
3999 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4000 : }
4001 13132 : switch (level) {
4002 169 : case 1:
4003 169 : NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1));
4004 169 : break;
4005 :
4006 328 : case 2:
4007 328 : NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2));
4008 328 : break;
4009 :
4010 1337 : case 3:
4011 1337 : NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3));
4012 1337 : break;
4013 :
4014 168 : case 4:
4015 168 : NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4));
4016 168 : break;
4017 :
4018 1575 : case 5:
4019 1575 : NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5));
4020 1575 : break;
4021 :
4022 636 : case 6:
4023 636 : NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6));
4024 636 : break;
4025 :
4026 328 : case 7:
4027 328 : NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7));
4028 328 : break;
4029 :
4030 166 : case 8:
4031 166 : NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8));
4032 166 : break;
4033 :
4034 24 : case 9:
4035 24 : break;
4036 :
4037 380 : case 10:
4038 380 : NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10));
4039 380 : break;
4040 :
4041 176 : case 11:
4042 176 : NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11));
4043 176 : break;
4044 :
4045 200 : case 12:
4046 200 : NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12));
4047 200 : break;
4048 :
4049 180 : case 13:
4050 180 : NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13));
4051 180 : break;
4052 :
4053 180 : case 14:
4054 180 : NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14));
4055 180 : break;
4056 :
4057 1958 : case 16:
4058 1958 : break;
4059 :
4060 142 : case 17:
4061 142 : break;
4062 :
4063 82 : case 18:
4064 82 : break;
4065 :
4066 144 : case 20:
4067 144 : NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20));
4068 144 : break;
4069 :
4070 4140 : case 21:
4071 4140 : NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21));
4072 4140 : break;
4073 :
4074 72 : case 23:
4075 72 : NDR_CHECK(ndr_pull_samr_UserInfo23(ndr, NDR_BUFFERS, &r->info23));
4076 72 : break;
4077 :
4078 159 : case 24:
4079 159 : break;
4080 :
4081 410 : case 25:
4082 410 : NDR_CHECK(ndr_pull_samr_UserInfo25(ndr, NDR_BUFFERS, &r->info25));
4083 410 : break;
4084 :
4085 82 : case 26:
4086 82 : break;
4087 :
4088 24 : case 31:
4089 24 : NDR_CHECK(ndr_pull_samr_UserInfo31(ndr, NDR_BUFFERS, &r->info31));
4090 24 : break;
4091 :
4092 72 : case 32:
4093 72 : NDR_CHECK(ndr_pull_samr_UserInfo32(ndr, NDR_BUFFERS, &r->info32));
4094 72 : break;
4095 :
4096 0 : default:
4097 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4098 : }
4099 0 : }
4100 13132 : return NDR_ERR_SUCCESS;
4101 : }
4102 :
4103 324 : _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r)
4104 : {
4105 : uint32_t level;
4106 324 : level = ndr_print_steal_switch_value(ndr, r);
4107 324 : ndr_print_union(ndr, name, level, "samr_UserInfo");
4108 324 : switch (level) {
4109 40 : case 1:
4110 40 : ndr_print_samr_UserInfo1(ndr, "info1", &r->info1);
4111 40 : break;
4112 :
4113 14 : case 2:
4114 14 : ndr_print_samr_UserInfo2(ndr, "info2", &r->info2);
4115 14 : break;
4116 :
4117 0 : case 3:
4118 0 : ndr_print_samr_UserInfo3(ndr, "info3", &r->info3);
4119 0 : break;
4120 :
4121 0 : case 4:
4122 0 : ndr_print_samr_UserInfo4(ndr, "info4", &r->info4);
4123 0 : break;
4124 :
4125 4 : case 5:
4126 4 : ndr_print_samr_UserInfo5(ndr, "info5", &r->info5);
4127 4 : break;
4128 :
4129 0 : case 6:
4130 0 : ndr_print_samr_UserInfo6(ndr, "info6", &r->info6);
4131 0 : break;
4132 :
4133 0 : case 7:
4134 0 : ndr_print_samr_UserInfo7(ndr, "info7", &r->info7);
4135 0 : break;
4136 :
4137 0 : case 8:
4138 0 : ndr_print_samr_UserInfo8(ndr, "info8", &r->info8);
4139 0 : break;
4140 :
4141 0 : case 9:
4142 0 : ndr_print_samr_UserInfo9(ndr, "info9", &r->info9);
4143 0 : break;
4144 :
4145 24 : case 10:
4146 24 : ndr_print_samr_UserInfo10(ndr, "info10", &r->info10);
4147 24 : break;
4148 :
4149 0 : case 11:
4150 0 : ndr_print_samr_UserInfo11(ndr, "info11", &r->info11);
4151 0 : break;
4152 :
4153 0 : case 12:
4154 0 : ndr_print_samr_UserInfo12(ndr, "info12", &r->info12);
4155 0 : break;
4156 :
4157 0 : case 13:
4158 0 : ndr_print_samr_UserInfo13(ndr, "info13", &r->info13);
4159 0 : break;
4160 :
4161 0 : case 14:
4162 0 : ndr_print_samr_UserInfo14(ndr, "info14", &r->info14);
4163 0 : break;
4164 :
4165 156 : case 16:
4166 156 : ndr_print_samr_UserInfo16(ndr, "info16", &r->info16);
4167 156 : break;
4168 :
4169 0 : case 17:
4170 0 : ndr_print_samr_UserInfo17(ndr, "info17", &r->info17);
4171 0 : break;
4172 :
4173 0 : case 18:
4174 0 : ndr_print_samr_UserInfo18(ndr, "info18", &r->info18);
4175 0 : break;
4176 :
4177 0 : case 20:
4178 0 : ndr_print_samr_UserInfo20(ndr, "info20", &r->info20);
4179 0 : break;
4180 :
4181 86 : case 21:
4182 86 : ndr_print_samr_UserInfo21(ndr, "info21", &r->info21);
4183 86 : break;
4184 :
4185 0 : case 23:
4186 0 : ndr_print_samr_UserInfo23(ndr, "info23", &r->info23);
4187 0 : break;
4188 :
4189 0 : case 24:
4190 0 : ndr_print_samr_UserInfo24(ndr, "info24", &r->info24);
4191 0 : break;
4192 :
4193 0 : case 25:
4194 0 : ndr_print_samr_UserInfo25(ndr, "info25", &r->info25);
4195 0 : break;
4196 :
4197 0 : case 26:
4198 0 : ndr_print_samr_UserInfo26(ndr, "info26", &r->info26);
4199 0 : break;
4200 :
4201 0 : case 31:
4202 0 : ndr_print_samr_UserInfo31(ndr, "info31", &r->info31);
4203 0 : break;
4204 :
4205 0 : case 32:
4206 0 : ndr_print_samr_UserInfo32(ndr, "info32", &r->info32);
4207 0 : break;
4208 :
4209 0 : default:
4210 0 : ndr_print_bad_level(ndr, name, level);
4211 : }
4212 324 : }
4213 :
4214 311371 : _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r)
4215 : {
4216 311371 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4217 311371 : if (ndr_flags & NDR_SCALARS) {
4218 311371 : NDR_CHECK(ndr_push_align(ndr, 4));
4219 311371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4220 311371 : NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
4221 311371 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4222 : }
4223 311371 : if (ndr_flags & NDR_BUFFERS) {
4224 : }
4225 311371 : return NDR_ERR_SUCCESS;
4226 : }
4227 :
4228 368510 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r)
4229 : {
4230 368510 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4231 368510 : if (ndr_flags & NDR_SCALARS) {
4232 368510 : NDR_CHECK(ndr_pull_align(ndr, 4));
4233 368510 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4234 368510 : NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
4235 368510 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4236 : }
4237 368510 : if (ndr_flags & NDR_BUFFERS) {
4238 : }
4239 368510 : return NDR_ERR_SUCCESS;
4240 : }
4241 :
4242 0 : static void ndr_print_flags_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, int unused, const struct samr_RidWithAttribute *r)
4243 : {
4244 0 : ndr_print_samr_RidWithAttribute(ndr, name, r);
4245 0 : }
4246 :
4247 11700 : _PUBLIC_ void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r)
4248 : {
4249 11700 : ndr_print_struct(ndr, name, "samr_RidWithAttribute");
4250 11700 : if (r == NULL) { ndr_print_null(ndr); return; }
4251 11700 : ndr->depth++;
4252 11700 : ndr_print_uint32(ndr, "rid", r->rid);
4253 11700 : ndr_print_security_GroupAttrs(ndr, "attributes", r->attributes);
4254 11700 : ndr->depth--;
4255 : }
4256 :
4257 243629 : _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttributeArray *r)
4258 : {
4259 : uint32_t cntr_rids_1;
4260 243629 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4261 243629 : if (ndr_flags & NDR_SCALARS) {
4262 121902 : NDR_CHECK(ndr_push_align(ndr, 5));
4263 121902 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4264 121902 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
4265 121902 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4266 : }
4267 243629 : if (ndr_flags & NDR_BUFFERS) {
4268 121902 : if (r->rids) {
4269 65949 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4270 377320 : for (cntr_rids_1 = 0; cntr_rids_1 < (r->count); cntr_rids_1++) {
4271 311371 : NDR_CHECK(ndr_push_samr_RidWithAttribute(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
4272 : }
4273 : }
4274 : }
4275 243629 : return NDR_ERR_SUCCESS;
4276 : }
4277 :
4278 292753 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r)
4279 : {
4280 : uint32_t _ptr_rids;
4281 292753 : uint32_t size_rids_1 = 0;
4282 : uint32_t cntr_rids_1;
4283 292753 : TALLOC_CTX *_mem_save_rids_0 = NULL;
4284 292753 : TALLOC_CTX *_mem_save_rids_1 = NULL;
4285 292753 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4286 292753 : if (ndr_flags & NDR_SCALARS) {
4287 146446 : NDR_CHECK(ndr_pull_align(ndr, 5));
4288 146446 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4289 146446 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
4290 146446 : if (_ptr_rids) {
4291 78518 : NDR_PULL_ALLOC(ndr, r->rids);
4292 : } else {
4293 67928 : r->rids = NULL;
4294 : }
4295 146446 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4296 : }
4297 292753 : if (ndr_flags & NDR_BUFFERS) {
4298 146446 : if (r->rids) {
4299 78518 : _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
4300 78518 : NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
4301 78518 : NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
4302 78518 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->rids, &size_rids_1));
4303 78518 : NDR_PULL_ALLOC_N(ndr, r->rids, size_rids_1);
4304 78518 : _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
4305 78518 : NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
4306 447028 : for (cntr_rids_1 = 0; cntr_rids_1 < (size_rids_1); cntr_rids_1++) {
4307 368510 : NDR_CHECK(ndr_pull_samr_RidWithAttribute(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
4308 : }
4309 78518 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
4310 78518 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
4311 : }
4312 146446 : if (r->rids) {
4313 78518 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->rids, r->count));
4314 : }
4315 : }
4316 292753 : return NDR_ERR_SUCCESS;
4317 : }
4318 :
4319 0 : static void ndr_print_flags_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, int unused, const struct samr_RidWithAttributeArray *r)
4320 : {
4321 0 : ndr_print_samr_RidWithAttributeArray(ndr, name, r);
4322 0 : }
4323 :
4324 1972 : _PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttributeArray *r)
4325 : {
4326 : uint32_t cntr_rids_1;
4327 1972 : ndr_print_struct(ndr, name, "samr_RidWithAttributeArray");
4328 1972 : if (r == NULL) { ndr_print_null(ndr); return; }
4329 1972 : ndr->depth++;
4330 1972 : ndr_print_uint32(ndr, "count", r->count);
4331 1972 : ndr_print_ptr(ndr, "rids", r->rids);
4332 1972 : ndr->depth++;
4333 1972 : if (r->rids) {
4334 1972 : ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->count);
4335 1972 : ndr->depth++;
4336 13672 : for (cntr_rids_1 = 0; cntr_rids_1 < (r->count); cntr_rids_1++) {
4337 11700 : ndr_print_samr_RidWithAttribute(ndr, "rids", &r->rids[cntr_rids_1]);
4338 : }
4339 1972 : ndr->depth--;
4340 : }
4341 1972 : ndr->depth--;
4342 1972 : ndr->depth--;
4343 : }
4344 :
4345 1928 : static enum ndr_err_code ndr_push_samr_DispEntryGeneral(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryGeneral *r)
4346 : {
4347 1928 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4348 1928 : if (ndr_flags & NDR_SCALARS) {
4349 964 : NDR_CHECK(ndr_push_align(ndr, 5));
4350 964 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4351 964 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4352 964 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
4353 964 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4354 964 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
4355 964 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
4356 964 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4357 : }
4358 1928 : if (ndr_flags & NDR_BUFFERS) {
4359 964 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4360 964 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
4361 964 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
4362 : }
4363 1928 : return NDR_ERR_SUCCESS;
4364 : }
4365 :
4366 1904 : static enum ndr_err_code ndr_pull_samr_DispEntryGeneral(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryGeneral *r)
4367 : {
4368 1904 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4369 1904 : if (ndr_flags & NDR_SCALARS) {
4370 952 : NDR_CHECK(ndr_pull_align(ndr, 5));
4371 952 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4372 952 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4373 952 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
4374 952 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4375 952 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
4376 952 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
4377 952 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4378 : }
4379 1904 : if (ndr_flags & NDR_BUFFERS) {
4380 952 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4381 952 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
4382 952 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
4383 : }
4384 1904 : return NDR_ERR_SUCCESS;
4385 : }
4386 :
4387 24 : _PUBLIC_ void ndr_print_samr_DispEntryGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispEntryGeneral *r)
4388 : {
4389 24 : ndr_print_struct(ndr, name, "samr_DispEntryGeneral");
4390 24 : if (r == NULL) { ndr_print_null(ndr); return; }
4391 24 : ndr->depth++;
4392 24 : ndr_print_uint32(ndr, "idx", r->idx);
4393 24 : ndr_print_uint32(ndr, "rid", r->rid);
4394 24 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
4395 24 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
4396 24 : ndr_print_lsa_String(ndr, "description", &r->description);
4397 24 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
4398 24 : ndr->depth--;
4399 : }
4400 :
4401 286 : static enum ndr_err_code ndr_push_samr_DispInfoGeneral(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoGeneral *r)
4402 : {
4403 : uint32_t cntr_entries_1;
4404 286 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4405 286 : if (ndr_flags & NDR_SCALARS) {
4406 143 : NDR_CHECK(ndr_push_align(ndr, 5));
4407 143 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4408 143 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4409 143 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4410 : }
4411 286 : if (ndr_flags & NDR_BUFFERS) {
4412 143 : if (r->entries) {
4413 136 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4414 1100 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4415 964 : NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4416 : }
4417 1100 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4418 964 : NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4419 : }
4420 : }
4421 : }
4422 286 : return NDR_ERR_SUCCESS;
4423 : }
4424 :
4425 284 : static enum ndr_err_code ndr_pull_samr_DispInfoGeneral(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoGeneral *r)
4426 : {
4427 : uint32_t _ptr_entries;
4428 284 : uint32_t size_entries_1 = 0;
4429 : uint32_t cntr_entries_1;
4430 284 : TALLOC_CTX *_mem_save_entries_0 = NULL;
4431 284 : TALLOC_CTX *_mem_save_entries_1 = NULL;
4432 284 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4433 284 : if (ndr_flags & NDR_SCALARS) {
4434 142 : NDR_CHECK(ndr_pull_align(ndr, 5));
4435 142 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4436 142 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4437 142 : if (_ptr_entries) {
4438 135 : NDR_PULL_ALLOC(ndr, r->entries);
4439 : } else {
4440 7 : r->entries = NULL;
4441 : }
4442 142 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4443 : }
4444 284 : if (ndr_flags & NDR_BUFFERS) {
4445 142 : if (r->entries) {
4446 135 : _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4447 135 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4448 135 : NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4449 135 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
4450 135 : NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
4451 135 : _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4452 135 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4453 1087 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4454 952 : NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4455 : }
4456 1087 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4457 952 : NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4458 : }
4459 135 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4460 135 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4461 : }
4462 142 : if (r->entries) {
4463 135 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4464 : }
4465 234 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4466 : }
4467 : }
4468 284 : return NDR_ERR_SUCCESS;
4469 : }
4470 :
4471 2 : _PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispInfoGeneral *r)
4472 : {
4473 : uint32_t cntr_entries_1;
4474 2 : ndr_print_struct(ndr, name, "samr_DispInfoGeneral");
4475 2 : if (r == NULL) { ndr_print_null(ndr); return; }
4476 2 : ndr->depth++;
4477 2 : ndr_print_uint32(ndr, "count", r->count);
4478 2 : ndr_print_ptr(ndr, "entries", r->entries);
4479 2 : ndr->depth++;
4480 2 : if (r->entries) {
4481 2 : ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4482 2 : ndr->depth++;
4483 26 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4484 24 : ndr_print_samr_DispEntryGeneral(ndr, "entries", &r->entries[cntr_entries_1]);
4485 : }
4486 2 : ndr->depth--;
4487 : }
4488 2 : ndr->depth--;
4489 2 : ndr->depth--;
4490 : }
4491 :
4492 102 : static enum ndr_err_code ndr_push_samr_DispEntryFull(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryFull *r)
4493 : {
4494 102 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4495 102 : if (ndr_flags & NDR_SCALARS) {
4496 51 : NDR_CHECK(ndr_push_align(ndr, 5));
4497 51 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4498 51 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4499 51 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
4500 51 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4501 51 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
4502 51 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4503 : }
4504 102 : if (ndr_flags & NDR_BUFFERS) {
4505 51 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4506 51 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
4507 : }
4508 102 : return NDR_ERR_SUCCESS;
4509 : }
4510 :
4511 102 : static enum ndr_err_code ndr_pull_samr_DispEntryFull(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryFull *r)
4512 : {
4513 102 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4514 102 : if (ndr_flags & NDR_SCALARS) {
4515 51 : NDR_CHECK(ndr_pull_align(ndr, 5));
4516 51 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4517 51 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4518 51 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
4519 51 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4520 51 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
4521 51 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4522 : }
4523 102 : if (ndr_flags & NDR_BUFFERS) {
4524 51 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4525 51 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
4526 : }
4527 102 : return NDR_ERR_SUCCESS;
4528 : }
4529 :
4530 0 : _PUBLIC_ void ndr_print_samr_DispEntryFull(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFull *r)
4531 : {
4532 0 : ndr_print_struct(ndr, name, "samr_DispEntryFull");
4533 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4534 0 : ndr->depth++;
4535 0 : ndr_print_uint32(ndr, "idx", r->idx);
4536 0 : ndr_print_uint32(ndr, "rid", r->rid);
4537 0 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
4538 0 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
4539 0 : ndr_print_lsa_String(ndr, "description", &r->description);
4540 0 : ndr->depth--;
4541 : }
4542 :
4543 54 : static enum ndr_err_code ndr_push_samr_DispInfoFull(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoFull *r)
4544 : {
4545 : uint32_t cntr_entries_1;
4546 54 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4547 54 : if (ndr_flags & NDR_SCALARS) {
4548 27 : NDR_CHECK(ndr_push_align(ndr, 5));
4549 27 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4550 27 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4551 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4552 : }
4553 54 : if (ndr_flags & NDR_BUFFERS) {
4554 27 : if (r->entries) {
4555 26 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4556 77 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4557 51 : NDR_CHECK(ndr_push_samr_DispEntryFull(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4558 : }
4559 77 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4560 51 : NDR_CHECK(ndr_push_samr_DispEntryFull(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4561 : }
4562 : }
4563 : }
4564 54 : return NDR_ERR_SUCCESS;
4565 : }
4566 :
4567 54 : static enum ndr_err_code ndr_pull_samr_DispInfoFull(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFull *r)
4568 : {
4569 : uint32_t _ptr_entries;
4570 54 : uint32_t size_entries_1 = 0;
4571 : uint32_t cntr_entries_1;
4572 54 : TALLOC_CTX *_mem_save_entries_0 = NULL;
4573 54 : TALLOC_CTX *_mem_save_entries_1 = NULL;
4574 54 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4575 54 : if (ndr_flags & NDR_SCALARS) {
4576 27 : NDR_CHECK(ndr_pull_align(ndr, 5));
4577 27 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4578 27 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4579 27 : if (_ptr_entries) {
4580 26 : NDR_PULL_ALLOC(ndr, r->entries);
4581 : } else {
4582 1 : r->entries = NULL;
4583 : }
4584 27 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4585 : }
4586 54 : if (ndr_flags & NDR_BUFFERS) {
4587 27 : if (r->entries) {
4588 26 : _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4589 26 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4590 26 : NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4591 26 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
4592 26 : NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
4593 26 : _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4594 26 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4595 77 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4596 51 : NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4597 : }
4598 77 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4599 51 : NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4600 : }
4601 26 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4602 26 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4603 : }
4604 27 : if (r->entries) {
4605 26 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4606 : }
4607 33 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4608 : }
4609 : }
4610 54 : return NDR_ERR_SUCCESS;
4611 : }
4612 :
4613 0 : _PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFull *r)
4614 : {
4615 : uint32_t cntr_entries_1;
4616 0 : ndr_print_struct(ndr, name, "samr_DispInfoFull");
4617 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4618 0 : ndr->depth++;
4619 0 : ndr_print_uint32(ndr, "count", r->count);
4620 0 : ndr_print_ptr(ndr, "entries", r->entries);
4621 0 : ndr->depth++;
4622 0 : if (r->entries) {
4623 0 : ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4624 0 : ndr->depth++;
4625 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4626 0 : ndr_print_samr_DispEntryFull(ndr, "entries", &r->entries[cntr_entries_1]);
4627 : }
4628 0 : ndr->depth--;
4629 : }
4630 0 : ndr->depth--;
4631 0 : ndr->depth--;
4632 : }
4633 :
4634 1810 : static enum ndr_err_code ndr_push_samr_DispEntryFullGroup(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryFullGroup *r)
4635 : {
4636 1810 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4637 1810 : if (ndr_flags & NDR_SCALARS) {
4638 905 : NDR_CHECK(ndr_push_align(ndr, 5));
4639 905 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4640 905 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4641 905 : NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->acct_flags));
4642 905 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4643 905 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
4644 905 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4645 : }
4646 1810 : if (ndr_flags & NDR_BUFFERS) {
4647 905 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4648 905 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
4649 : }
4650 1810 : return NDR_ERR_SUCCESS;
4651 : }
4652 :
4653 1810 : static enum ndr_err_code ndr_pull_samr_DispEntryFullGroup(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryFullGroup *r)
4654 : {
4655 1810 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4656 1810 : if (ndr_flags & NDR_SCALARS) {
4657 905 : NDR_CHECK(ndr_pull_align(ndr, 5));
4658 905 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4659 905 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4660 905 : NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->acct_flags));
4661 905 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
4662 905 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
4663 905 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4664 : }
4665 1810 : if (ndr_flags & NDR_BUFFERS) {
4666 905 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
4667 905 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
4668 : }
4669 1810 : return NDR_ERR_SUCCESS;
4670 : }
4671 :
4672 0 : _PUBLIC_ void ndr_print_samr_DispEntryFullGroup(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFullGroup *r)
4673 : {
4674 0 : ndr_print_struct(ndr, name, "samr_DispEntryFullGroup");
4675 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4676 0 : ndr->depth++;
4677 0 : ndr_print_uint32(ndr, "idx", r->idx);
4678 0 : ndr_print_uint32(ndr, "rid", r->rid);
4679 0 : ndr_print_security_GroupAttrs(ndr, "acct_flags", r->acct_flags);
4680 0 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
4681 0 : ndr_print_lsa_String(ndr, "description", &r->description);
4682 0 : ndr->depth--;
4683 : }
4684 :
4685 138 : static enum ndr_err_code ndr_push_samr_DispInfoFullGroups(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoFullGroups *r)
4686 : {
4687 : uint32_t cntr_entries_1;
4688 138 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4689 138 : if (ndr_flags & NDR_SCALARS) {
4690 69 : NDR_CHECK(ndr_push_align(ndr, 5));
4691 69 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4692 69 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4693 69 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4694 : }
4695 138 : if (ndr_flags & NDR_BUFFERS) {
4696 69 : if (r->entries) {
4697 68 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4698 973 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4699 905 : NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4700 : }
4701 973 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4702 905 : NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4703 : }
4704 : }
4705 : }
4706 138 : return NDR_ERR_SUCCESS;
4707 : }
4708 :
4709 138 : static enum ndr_err_code ndr_pull_samr_DispInfoFullGroups(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFullGroups *r)
4710 : {
4711 : uint32_t _ptr_entries;
4712 138 : uint32_t size_entries_1 = 0;
4713 : uint32_t cntr_entries_1;
4714 138 : TALLOC_CTX *_mem_save_entries_0 = NULL;
4715 138 : TALLOC_CTX *_mem_save_entries_1 = NULL;
4716 138 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4717 138 : if (ndr_flags & NDR_SCALARS) {
4718 69 : NDR_CHECK(ndr_pull_align(ndr, 5));
4719 69 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4720 69 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4721 69 : if (_ptr_entries) {
4722 68 : NDR_PULL_ALLOC(ndr, r->entries);
4723 : } else {
4724 1 : r->entries = NULL;
4725 : }
4726 69 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4727 : }
4728 138 : if (ndr_flags & NDR_BUFFERS) {
4729 69 : if (r->entries) {
4730 68 : _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4731 68 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4732 68 : NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4733 68 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
4734 68 : NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
4735 68 : _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4736 68 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4737 973 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4738 905 : NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4739 : }
4740 973 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4741 905 : NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4742 : }
4743 68 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4744 68 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4745 : }
4746 69 : if (r->entries) {
4747 68 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4748 : }
4749 143 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4750 : }
4751 : }
4752 138 : return NDR_ERR_SUCCESS;
4753 : }
4754 :
4755 0 : _PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFullGroups *r)
4756 : {
4757 : uint32_t cntr_entries_1;
4758 0 : ndr_print_struct(ndr, name, "samr_DispInfoFullGroups");
4759 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4760 0 : ndr->depth++;
4761 0 : ndr_print_uint32(ndr, "count", r->count);
4762 0 : ndr_print_ptr(ndr, "entries", r->entries);
4763 0 : ndr->depth++;
4764 0 : if (r->entries) {
4765 0 : ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4766 0 : ndr->depth++;
4767 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4768 0 : ndr_print_samr_DispEntryFullGroup(ndr, "entries", &r->entries[cntr_entries_1]);
4769 : }
4770 0 : ndr->depth--;
4771 : }
4772 0 : ndr->depth--;
4773 0 : ndr->depth--;
4774 : }
4775 :
4776 1386 : static enum ndr_err_code ndr_push_samr_DispEntryAscii(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryAscii *r)
4777 : {
4778 1386 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4779 1386 : if (ndr_flags & NDR_SCALARS) {
4780 693 : NDR_CHECK(ndr_push_align(ndr, 5));
4781 693 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
4782 693 : NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name));
4783 693 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4784 : }
4785 1386 : if (ndr_flags & NDR_BUFFERS) {
4786 693 : NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name));
4787 : }
4788 1386 : return NDR_ERR_SUCCESS;
4789 : }
4790 :
4791 1386 : static enum ndr_err_code ndr_pull_samr_DispEntryAscii(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryAscii *r)
4792 : {
4793 1386 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4794 1386 : if (ndr_flags & NDR_SCALARS) {
4795 693 : NDR_CHECK(ndr_pull_align(ndr, 5));
4796 693 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
4797 693 : NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name));
4798 693 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4799 : }
4800 1386 : if (ndr_flags & NDR_BUFFERS) {
4801 693 : NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name));
4802 : }
4803 1386 : return NDR_ERR_SUCCESS;
4804 : }
4805 :
4806 0 : _PUBLIC_ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, const struct samr_DispEntryAscii *r)
4807 : {
4808 0 : ndr_print_struct(ndr, name, "samr_DispEntryAscii");
4809 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4810 0 : ndr->depth++;
4811 0 : ndr_print_uint32(ndr, "idx", r->idx);
4812 0 : ndr_print_lsa_AsciiStringLarge(ndr, "account_name", &r->account_name);
4813 0 : ndr->depth--;
4814 : }
4815 :
4816 268 : static enum ndr_err_code ndr_push_samr_DispInfoAscii(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoAscii *r)
4817 : {
4818 : uint32_t cntr_entries_1;
4819 268 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4820 268 : if (ndr_flags & NDR_SCALARS) {
4821 134 : NDR_CHECK(ndr_push_align(ndr, 5));
4822 134 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4823 134 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4824 134 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4825 : }
4826 268 : if (ndr_flags & NDR_BUFFERS) {
4827 134 : if (r->entries) {
4828 132 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4829 825 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4830 693 : NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4831 : }
4832 825 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4833 693 : NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4834 : }
4835 : }
4836 : }
4837 268 : return NDR_ERR_SUCCESS;
4838 : }
4839 :
4840 268 : static enum ndr_err_code ndr_pull_samr_DispInfoAscii(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoAscii *r)
4841 : {
4842 : uint32_t _ptr_entries;
4843 268 : uint32_t size_entries_1 = 0;
4844 : uint32_t cntr_entries_1;
4845 268 : TALLOC_CTX *_mem_save_entries_0 = NULL;
4846 268 : TALLOC_CTX *_mem_save_entries_1 = NULL;
4847 268 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4848 268 : if (ndr_flags & NDR_SCALARS) {
4849 134 : NDR_CHECK(ndr_pull_align(ndr, 5));
4850 134 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4851 134 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
4852 134 : if (_ptr_entries) {
4853 132 : NDR_PULL_ALLOC(ndr, r->entries);
4854 : } else {
4855 2 : r->entries = NULL;
4856 : }
4857 134 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4858 : }
4859 268 : if (ndr_flags & NDR_BUFFERS) {
4860 134 : if (r->entries) {
4861 132 : _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
4862 132 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4863 132 : NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
4864 132 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
4865 132 : NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
4866 132 : _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
4867 132 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
4868 825 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4869 693 : NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
4870 : }
4871 825 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4872 693 : NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
4873 : }
4874 132 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
4875 132 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
4876 : }
4877 134 : if (r->entries) {
4878 132 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
4879 : }
4880 302 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
4881 : }
4882 : }
4883 268 : return NDR_ERR_SUCCESS;
4884 : }
4885 :
4886 0 : _PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r)
4887 : {
4888 : uint32_t cntr_entries_1;
4889 0 : ndr_print_struct(ndr, name, "samr_DispInfoAscii");
4890 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4891 0 : ndr->depth++;
4892 0 : ndr_print_uint32(ndr, "count", r->count);
4893 0 : ndr_print_ptr(ndr, "entries", r->entries);
4894 0 : ndr->depth++;
4895 0 : if (r->entries) {
4896 0 : ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
4897 0 : ndr->depth++;
4898 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
4899 0 : ndr_print_samr_DispEntryAscii(ndr, "entries", &r->entries[cntr_entries_1]);
4900 : }
4901 0 : ndr->depth--;
4902 : }
4903 0 : ndr->depth--;
4904 0 : ndr->depth--;
4905 : }
4906 :
4907 373 : static enum ndr_err_code ndr_push_samr_DispInfo(struct ndr_push *ndr, int ndr_flags, const union samr_DispInfo *r)
4908 : {
4909 : uint32_t level;
4910 373 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4911 373 : if (ndr_flags & NDR_SCALARS) {
4912 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4913 373 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4914 373 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4915 373 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
4916 373 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4917 373 : switch (level) {
4918 143 : case 1: {
4919 143 : NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1));
4920 143 : break; }
4921 :
4922 27 : case 2: {
4923 27 : NDR_CHECK(ndr_push_samr_DispInfoFull(ndr, NDR_SCALARS, &r->info2));
4924 27 : break; }
4925 :
4926 69 : case 3: {
4927 69 : NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr, NDR_SCALARS, &r->info3));
4928 69 : break; }
4929 :
4930 57 : case 4: {
4931 57 : NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info4));
4932 57 : break; }
4933 :
4934 77 : case 5: {
4935 77 : NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info5));
4936 77 : break; }
4937 :
4938 0 : default:
4939 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4940 : }
4941 0 : }
4942 373 : if (ndr_flags & NDR_BUFFERS) {
4943 373 : if (!(ndr_flags & NDR_SCALARS)) {
4944 : /* We didn't get it above, and the token is not needed after this. */
4945 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4946 : }
4947 373 : switch (level) {
4948 143 : case 1:
4949 143 : NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_BUFFERS, &r->info1));
4950 143 : break;
4951 :
4952 27 : case 2:
4953 27 : NDR_CHECK(ndr_push_samr_DispInfoFull(ndr, NDR_BUFFERS, &r->info2));
4954 27 : break;
4955 :
4956 69 : case 3:
4957 69 : NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr, NDR_BUFFERS, &r->info3));
4958 69 : break;
4959 :
4960 57 : case 4:
4961 57 : NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info4));
4962 57 : break;
4963 :
4964 77 : case 5:
4965 77 : NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info5));
4966 77 : break;
4967 :
4968 0 : default:
4969 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4970 : }
4971 0 : }
4972 373 : return NDR_ERR_SUCCESS;
4973 : }
4974 :
4975 372 : static enum ndr_err_code ndr_pull_samr_DispInfo(struct ndr_pull *ndr, int ndr_flags, union samr_DispInfo *r)
4976 : {
4977 : uint32_t level;
4978 : uint16_t _level;
4979 372 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4980 372 : if (ndr_flags & NDR_SCALARS) {
4981 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4982 372 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4983 372 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4984 372 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
4985 372 : if (_level != level) {
4986 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
4987 : }
4988 372 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4989 372 : switch (level) {
4990 142 : case 1: {
4991 142 : NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1));
4992 142 : break; }
4993 :
4994 27 : case 2: {
4995 27 : NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr, NDR_SCALARS, &r->info2));
4996 27 : break; }
4997 :
4998 69 : case 3: {
4999 69 : NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr, NDR_SCALARS, &r->info3));
5000 69 : break; }
5001 :
5002 57 : case 4: {
5003 57 : NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info4));
5004 57 : break; }
5005 :
5006 77 : case 5: {
5007 77 : NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info5));
5008 77 : break; }
5009 :
5010 0 : default:
5011 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5012 : }
5013 0 : }
5014 372 : if (ndr_flags & NDR_BUFFERS) {
5015 372 : if (!(ndr_flags & NDR_SCALARS)) {
5016 : /* We didn't get it above, and the token is not needed after this. */
5017 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5018 : }
5019 372 : switch (level) {
5020 142 : case 1:
5021 142 : NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr, NDR_BUFFERS, &r->info1));
5022 142 : break;
5023 :
5024 27 : case 2:
5025 27 : NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr, NDR_BUFFERS, &r->info2));
5026 27 : break;
5027 :
5028 69 : case 3:
5029 69 : NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr, NDR_BUFFERS, &r->info3));
5030 69 : break;
5031 :
5032 57 : case 4:
5033 57 : NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info4));
5034 57 : break;
5035 :
5036 77 : case 5:
5037 77 : NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info5));
5038 77 : break;
5039 :
5040 0 : default:
5041 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5042 : }
5043 0 : }
5044 372 : return NDR_ERR_SUCCESS;
5045 : }
5046 :
5047 2 : _PUBLIC_ void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r)
5048 : {
5049 : uint32_t level;
5050 2 : level = ndr_print_steal_switch_value(ndr, r);
5051 2 : ndr_print_union(ndr, name, level, "samr_DispInfo");
5052 2 : switch (level) {
5053 2 : case 1:
5054 2 : ndr_print_samr_DispInfoGeneral(ndr, "info1", &r->info1);
5055 2 : break;
5056 :
5057 0 : case 2:
5058 0 : ndr_print_samr_DispInfoFull(ndr, "info2", &r->info2);
5059 0 : break;
5060 :
5061 0 : case 3:
5062 0 : ndr_print_samr_DispInfoFullGroups(ndr, "info3", &r->info3);
5063 0 : break;
5064 :
5065 0 : case 4:
5066 0 : ndr_print_samr_DispInfoAscii(ndr, "info4", &r->info4);
5067 0 : break;
5068 :
5069 0 : case 5:
5070 0 : ndr_print_samr_DispInfoAscii(ndr, "info5", &r->info5);
5071 0 : break;
5072 :
5073 0 : default:
5074 0 : ndr_print_bad_level(ndr, name, level);
5075 : }
5076 2 : }
5077 :
5078 3223 : static enum ndr_err_code ndr_push_samr_PwInfo(struct ndr_push *ndr, int ndr_flags, const struct samr_PwInfo *r)
5079 : {
5080 3223 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5081 3223 : if (ndr_flags & NDR_SCALARS) {
5082 3223 : NDR_CHECK(ndr_push_align(ndr, 4));
5083 3223 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
5084 3223 : NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties));
5085 3223 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5086 : }
5087 3223 : if (ndr_flags & NDR_BUFFERS) {
5088 : }
5089 3223 : return NDR_ERR_SUCCESS;
5090 : }
5091 :
5092 2796 : static enum ndr_err_code ndr_pull_samr_PwInfo(struct ndr_pull *ndr, int ndr_flags, struct samr_PwInfo *r)
5093 : {
5094 2796 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5095 2796 : if (ndr_flags & NDR_SCALARS) {
5096 2796 : NDR_CHECK(ndr_pull_align(ndr, 4));
5097 2796 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
5098 2796 : NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties));
5099 2796 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5100 : }
5101 2796 : if (ndr_flags & NDR_BUFFERS) {
5102 : }
5103 2796 : return NDR_ERR_SUCCESS;
5104 : }
5105 :
5106 856 : _PUBLIC_ void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r)
5107 : {
5108 856 : ndr_print_struct(ndr, name, "samr_PwInfo");
5109 856 : if (r == NULL) { ndr_print_null(ndr); return; }
5110 856 : ndr->depth++;
5111 856 : ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
5112 856 : ndr_print_samr_PasswordProperties(ndr, "password_properties", r->password_properties);
5113 856 : ndr->depth--;
5114 : }
5115 :
5116 377 : static enum ndr_err_code ndr_push_samr_ConnectVersion(struct ndr_push *ndr, int ndr_flags, enum samr_ConnectVersion r)
5117 : {
5118 377 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
5119 377 : return NDR_ERR_SUCCESS;
5120 : }
5121 :
5122 374 : static enum ndr_err_code ndr_pull_samr_ConnectVersion(struct ndr_pull *ndr, int ndr_flags, enum samr_ConnectVersion *r)
5123 : {
5124 : uint32_t v;
5125 374 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
5126 374 : *r = v;
5127 374 : return NDR_ERR_SUCCESS;
5128 : }
5129 :
5130 6 : _PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r)
5131 : {
5132 6 : const char *val = NULL;
5133 :
5134 6 : switch (r) {
5135 0 : case SAMR_CONNECT_PRE_W2K: val = "SAMR_CONNECT_PRE_W2K"; break;
5136 0 : case SAMR_CONNECT_W2K: val = "SAMR_CONNECT_W2K"; break;
5137 6 : case SAMR_CONNECT_AFTER_W2K: val = "SAMR_CONNECT_AFTER_W2K"; break;
5138 : }
5139 6 : ndr_print_enum(ndr, name, "ENUM", val, r);
5140 6 : }
5141 :
5142 1065 : _PUBLIC_ enum ndr_err_code ndr_push_samPwdChangeReason(struct ndr_push *ndr, int ndr_flags, enum samPwdChangeReason r)
5143 : {
5144 1065 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
5145 1065 : return NDR_ERR_SUCCESS;
5146 : }
5147 :
5148 1078 : _PUBLIC_ enum ndr_err_code ndr_pull_samPwdChangeReason(struct ndr_pull *ndr, int ndr_flags, enum samPwdChangeReason *r)
5149 : {
5150 : uint32_t v;
5151 1078 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
5152 1078 : *r = v;
5153 1078 : return NDR_ERR_SUCCESS;
5154 : }
5155 :
5156 0 : _PUBLIC_ void ndr_print_samPwdChangeReason(struct ndr_print *ndr, const char *name, enum samPwdChangeReason r)
5157 : {
5158 0 : const char *val = NULL;
5159 :
5160 0 : switch (r) {
5161 0 : case SAM_PWD_CHANGE_NO_ERROR: val = "SAM_PWD_CHANGE_NO_ERROR"; break;
5162 0 : case SAM_PWD_CHANGE_PASSWORD_TOO_SHORT: val = "SAM_PWD_CHANGE_PASSWORD_TOO_SHORT"; break;
5163 0 : case SAM_PWD_CHANGE_PWD_IN_HISTORY: val = "SAM_PWD_CHANGE_PWD_IN_HISTORY"; break;
5164 0 : case SAM_PWD_CHANGE_USERNAME_IN_PASSWORD: val = "SAM_PWD_CHANGE_USERNAME_IN_PASSWORD"; break;
5165 0 : case SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD: val = "SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD"; break;
5166 0 : case SAM_PWD_CHANGE_NOT_COMPLEX: val = "SAM_PWD_CHANGE_NOT_COMPLEX"; break;
5167 0 : case SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT: val = "SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT"; break;
5168 0 : case SAM_PWD_CHANGE_FAILED_BY_FILTER: val = "SAM_PWD_CHANGE_FAILED_BY_FILTER"; break;
5169 0 : case SAM_PWD_CHANGE_PASSWORD_TOO_LONG: val = "SAM_PWD_CHANGE_PASSWORD_TOO_LONG"; break;
5170 : }
5171 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
5172 0 : }
5173 :
5174 1065 : static enum ndr_err_code ndr_push_userPwdChangeFailureInformation(struct ndr_push *ndr, int ndr_flags, const struct userPwdChangeFailureInformation *r)
5175 : {
5176 1065 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5177 1065 : if (ndr_flags & NDR_SCALARS) {
5178 1065 : NDR_CHECK(ndr_push_align(ndr, 5));
5179 1065 : NDR_CHECK(ndr_push_samPwdChangeReason(ndr, NDR_SCALARS, r->extendedFailureReason));
5180 1065 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->filterModuleName));
5181 1065 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5182 : }
5183 1065 : if (ndr_flags & NDR_BUFFERS) {
5184 1065 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->filterModuleName));
5185 : }
5186 1065 : return NDR_ERR_SUCCESS;
5187 : }
5188 :
5189 1065 : static enum ndr_err_code ndr_pull_userPwdChangeFailureInformation(struct ndr_pull *ndr, int ndr_flags, struct userPwdChangeFailureInformation *r)
5190 : {
5191 1065 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5192 1065 : if (ndr_flags & NDR_SCALARS) {
5193 1065 : NDR_CHECK(ndr_pull_align(ndr, 5));
5194 1065 : NDR_CHECK(ndr_pull_samPwdChangeReason(ndr, NDR_SCALARS, &r->extendedFailureReason));
5195 1065 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->filterModuleName));
5196 1065 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5197 : }
5198 1065 : if (ndr_flags & NDR_BUFFERS) {
5199 1065 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->filterModuleName));
5200 : }
5201 1065 : return NDR_ERR_SUCCESS;
5202 : }
5203 :
5204 0 : _PUBLIC_ void ndr_print_userPwdChangeFailureInformation(struct ndr_print *ndr, const char *name, const struct userPwdChangeFailureInformation *r)
5205 : {
5206 0 : ndr_print_struct(ndr, name, "userPwdChangeFailureInformation");
5207 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5208 0 : ndr->depth++;
5209 0 : ndr_print_samPwdChangeReason(ndr, "extendedFailureReason", r->extendedFailureReason);
5210 0 : ndr_print_lsa_String(ndr, "filterModuleName", &r->filterModuleName);
5211 0 : ndr->depth--;
5212 : }
5213 :
5214 311 : static enum ndr_err_code ndr_push_samr_SupportedFeatures(struct ndr_push *ndr, int ndr_flags, enum samr_SupportedFeatures r)
5215 : {
5216 311 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
5217 311 : return NDR_ERR_SUCCESS;
5218 : }
5219 :
5220 308 : static enum ndr_err_code ndr_pull_samr_SupportedFeatures(struct ndr_pull *ndr, int ndr_flags, enum samr_SupportedFeatures *r)
5221 : {
5222 : uint32_t v;
5223 308 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
5224 308 : *r = v;
5225 308 : return NDR_ERR_SUCCESS;
5226 : }
5227 :
5228 6 : _PUBLIC_ void ndr_print_samr_SupportedFeatures(struct ndr_print *ndr, const char *name, enum samr_SupportedFeatures r)
5229 : {
5230 6 : const char *val = NULL;
5231 :
5232 6 : switch (r) {
5233 0 : case SAMR_CONNECT_FEATURE_RID_ONLY: val = "SAMR_CONNECT_FEATURE_RID_ONLY"; break;
5234 0 : case SAMR_CONNECT_FEATURE_RESRVED1: val = "SAMR_CONNECT_FEATURE_RESRVED1"; break;
5235 0 : case SAMR_CONNECT_FEATURE_RESRVED2: val = "SAMR_CONNECT_FEATURE_RESRVED2"; break;
5236 0 : case SAMR_CONNECT_FEATURE_USE_AES: val = "SAMR_CONNECT_FEATURE_USE_AES"; break;
5237 : }
5238 6 : ndr_print_enum(ndr, name, "ENUM", val, r);
5239 6 : }
5240 :
5241 311 : static enum ndr_err_code ndr_push_samr_ConnectInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_ConnectInfo1 *r)
5242 : {
5243 311 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5244 311 : if (ndr_flags & NDR_SCALARS) {
5245 311 : NDR_CHECK(ndr_push_align(ndr, 4));
5246 311 : NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->client_version));
5247 311 : NDR_CHECK(ndr_push_samr_SupportedFeatures(ndr, NDR_SCALARS, r->supported_features));
5248 311 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5249 : }
5250 311 : if (ndr_flags & NDR_BUFFERS) {
5251 : }
5252 311 : return NDR_ERR_SUCCESS;
5253 : }
5254 :
5255 308 : static enum ndr_err_code ndr_pull_samr_ConnectInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_ConnectInfo1 *r)
5256 : {
5257 308 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5258 308 : if (ndr_flags & NDR_SCALARS) {
5259 308 : NDR_CHECK(ndr_pull_align(ndr, 4));
5260 308 : NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->client_version));
5261 308 : NDR_CHECK(ndr_pull_samr_SupportedFeatures(ndr, NDR_SCALARS, &r->supported_features));
5262 308 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5263 : }
5264 308 : if (ndr_flags & NDR_BUFFERS) {
5265 : }
5266 308 : return NDR_ERR_SUCCESS;
5267 : }
5268 :
5269 6 : _PUBLIC_ void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r)
5270 : {
5271 6 : ndr_print_struct(ndr, name, "samr_ConnectInfo1");
5272 6 : if (r == NULL) { ndr_print_null(ndr); return; }
5273 6 : ndr->depth++;
5274 6 : ndr_print_samr_ConnectVersion(ndr, "client_version", r->client_version);
5275 6 : ndr_print_samr_SupportedFeatures(ndr, "supported_features", r->supported_features);
5276 6 : ndr->depth--;
5277 : }
5278 :
5279 311 : static enum ndr_err_code ndr_push_samr_ConnectInfo(struct ndr_push *ndr, int ndr_flags, const union samr_ConnectInfo *r)
5280 : {
5281 : uint32_t level;
5282 311 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5283 311 : if (ndr_flags & NDR_SCALARS) {
5284 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5285 311 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5286 311 : NDR_CHECK(ndr_push_union_align(ndr, 4));
5287 311 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5288 311 : NDR_CHECK(ndr_push_union_align(ndr, 4));
5289 311 : switch (level) {
5290 311 : case 1: {
5291 311 : NDR_CHECK(ndr_push_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1));
5292 311 : break; }
5293 :
5294 0 : default:
5295 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
5296 : }
5297 0 : }
5298 311 : if (ndr_flags & NDR_BUFFERS) {
5299 0 : if (!(ndr_flags & NDR_SCALARS)) {
5300 : /* We didn't get it above, and the token is not needed after this. */
5301 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5302 : }
5303 0 : switch (level) {
5304 0 : case 1:
5305 0 : break;
5306 :
5307 0 : default:
5308 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
5309 : }
5310 221 : }
5311 311 : return NDR_ERR_SUCCESS;
5312 : }
5313 :
5314 308 : static enum ndr_err_code ndr_pull_samr_ConnectInfo(struct ndr_pull *ndr, int ndr_flags, union samr_ConnectInfo *r)
5315 : {
5316 : uint32_t level;
5317 : uint32_t _level;
5318 308 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5319 308 : if (ndr_flags & NDR_SCALARS) {
5320 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5321 308 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5322 308 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
5323 308 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5324 308 : if (_level != level) {
5325 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5326 : }
5327 308 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
5328 308 : switch (level) {
5329 308 : case 1: {
5330 308 : NDR_CHECK(ndr_pull_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1));
5331 308 : break; }
5332 :
5333 0 : default:
5334 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5335 : }
5336 0 : }
5337 308 : if (ndr_flags & NDR_BUFFERS) {
5338 0 : if (!(ndr_flags & NDR_SCALARS)) {
5339 : /* We didn't get it above, and the token is not needed after this. */
5340 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5341 : }
5342 0 : switch (level) {
5343 0 : case 1:
5344 0 : break;
5345 :
5346 0 : default:
5347 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5348 : }
5349 218 : }
5350 308 : return NDR_ERR_SUCCESS;
5351 : }
5352 :
5353 6 : _PUBLIC_ void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r)
5354 : {
5355 : uint32_t level;
5356 6 : level = ndr_print_steal_switch_value(ndr, r);
5357 6 : ndr_print_union(ndr, name, level, "samr_ConnectInfo");
5358 6 : switch (level) {
5359 6 : case 1:
5360 6 : ndr_print_samr_ConnectInfo1(ndr, "info1", &r->info1);
5361 6 : break;
5362 :
5363 0 : default:
5364 0 : ndr_print_bad_level(ndr, name, level);
5365 : }
5366 6 : }
5367 :
5368 9 : static enum ndr_err_code ndr_push_samr_ValidateFieldsPresent(struct ndr_push *ndr, int ndr_flags, uint32_t r)
5369 : {
5370 9 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
5371 9 : return NDR_ERR_SUCCESS;
5372 : }
5373 :
5374 9 : static enum ndr_err_code ndr_pull_samr_ValidateFieldsPresent(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
5375 : {
5376 : uint32_t v;
5377 9 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
5378 9 : *r = v;
5379 9 : return NDR_ERR_SUCCESS;
5380 : }
5381 :
5382 0 : _PUBLIC_ void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r)
5383 : {
5384 0 : ndr_print_uint32(ndr, name, r);
5385 0 : ndr->depth++;
5386 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET", SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET, r);
5387 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME", SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME, r);
5388 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_LOCKOUT_TIME", SAMR_VALIDATE_FIELD_LOCKOUT_TIME, r);
5389 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT", SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT, r);
5390 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH, r);
5391 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY, r);
5392 0 : ndr->depth--;
5393 0 : }
5394 :
5395 6 : static enum ndr_err_code ndr_push_samr_ValidatePasswordLevel(struct ndr_push *ndr, int ndr_flags, enum samr_ValidatePasswordLevel r)
5396 : {
5397 6 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
5398 6 : return NDR_ERR_SUCCESS;
5399 : }
5400 :
5401 6 : static enum ndr_err_code ndr_pull_samr_ValidatePasswordLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidatePasswordLevel *r)
5402 : {
5403 : uint16_t v;
5404 6 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
5405 6 : *r = v;
5406 6 : return NDR_ERR_SUCCESS;
5407 : }
5408 :
5409 0 : _PUBLIC_ void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const char *name, enum samr_ValidatePasswordLevel r)
5410 : {
5411 0 : const char *val = NULL;
5412 :
5413 0 : switch (r) {
5414 0 : case NetValidateAuthentication: val = "NetValidateAuthentication"; break;
5415 0 : case NetValidatePasswordChange: val = "NetValidatePasswordChange"; break;
5416 0 : case NetValidatePasswordReset: val = "NetValidatePasswordReset"; break;
5417 : }
5418 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
5419 0 : }
5420 :
5421 3 : static enum ndr_err_code ndr_push_samr_ValidationStatus(struct ndr_push *ndr, int ndr_flags, enum samr_ValidationStatus r)
5422 : {
5423 3 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
5424 3 : return NDR_ERR_SUCCESS;
5425 : }
5426 :
5427 3 : static enum ndr_err_code ndr_pull_samr_ValidationStatus(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidationStatus *r)
5428 : {
5429 : uint16_t v;
5430 3 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
5431 3 : *r = v;
5432 3 : return NDR_ERR_SUCCESS;
5433 : }
5434 :
5435 0 : _PUBLIC_ void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char *name, enum samr_ValidationStatus r)
5436 : {
5437 0 : const char *val = NULL;
5438 :
5439 0 : switch (r) {
5440 0 : case SAMR_VALIDATION_STATUS_SUCCESS: val = "SAMR_VALIDATION_STATUS_SUCCESS"; break;
5441 0 : case SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE: val = "SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE"; break;
5442 0 : case SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT: val = "SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT"; break;
5443 0 : case SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED: val = "SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED"; break;
5444 0 : case SAMR_VALIDATION_STATUS_BAD_PASSWORD: val = "SAMR_VALIDATION_STATUS_BAD_PASSWORD"; break;
5445 0 : case SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT: val = "SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT"; break;
5446 0 : case SAMR_VALIDATION_STATUS_PWD_TOO_SHORT: val = "SAMR_VALIDATION_STATUS_PWD_TOO_SHORT"; break;
5447 0 : case SAMR_VALIDATION_STATUS_PWD_TOO_LONG: val = "SAMR_VALIDATION_STATUS_PWD_TOO_LONG"; break;
5448 0 : case SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH: val = "SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH"; break;
5449 0 : case SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT: val = "SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT"; break;
5450 0 : case SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR: val = "SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR"; break;
5451 : }
5452 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
5453 0 : }
5454 :
5455 12 : static enum ndr_err_code ndr_push_samr_ValidationBlob(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidationBlob *r)
5456 : {
5457 12 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5458 12 : if (ndr_flags & NDR_SCALARS) {
5459 6 : NDR_CHECK(ndr_push_align(ndr, 5));
5460 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
5461 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
5462 6 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5463 : }
5464 12 : if (ndr_flags & NDR_BUFFERS) {
5465 6 : if (r->data) {
5466 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
5467 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
5468 : }
5469 : }
5470 12 : return NDR_ERR_SUCCESS;
5471 : }
5472 :
5473 12 : static enum ndr_err_code ndr_pull_samr_ValidationBlob(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidationBlob *r)
5474 : {
5475 : uint32_t _ptr_data;
5476 12 : uint32_t size_data_1 = 0;
5477 12 : TALLOC_CTX *_mem_save_data_0 = NULL;
5478 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5479 12 : if (ndr_flags & NDR_SCALARS) {
5480 6 : NDR_CHECK(ndr_pull_align(ndr, 5));
5481 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
5482 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
5483 6 : if (_ptr_data) {
5484 0 : NDR_PULL_ALLOC(ndr, r->data);
5485 : } else {
5486 6 : r->data = NULL;
5487 : }
5488 6 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5489 : }
5490 12 : if (ndr_flags & NDR_BUFFERS) {
5491 6 : if (r->data) {
5492 0 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
5493 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
5494 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
5495 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
5496 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
5497 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
5498 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
5499 : }
5500 6 : if (r->data) {
5501 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
5502 : }
5503 : }
5504 12 : return NDR_ERR_SUCCESS;
5505 : }
5506 :
5507 0 : _PUBLIC_ void ndr_print_samr_ValidationBlob(struct ndr_print *ndr, const char *name, const struct samr_ValidationBlob *r)
5508 : {
5509 0 : ndr_print_struct(ndr, name, "samr_ValidationBlob");
5510 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5511 0 : ndr->depth++;
5512 0 : ndr_print_uint32(ndr, "length", r->length);
5513 0 : ndr_print_ptr(ndr, "data", r->data);
5514 0 : ndr->depth++;
5515 0 : if (r->data) {
5516 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
5517 : }
5518 0 : ndr->depth--;
5519 0 : ndr->depth--;
5520 : }
5521 :
5522 18 : static enum ndr_err_code ndr_push_samr_ValidatePasswordInfo(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordInfo *r)
5523 : {
5524 : uint32_t cntr_pwd_history_1;
5525 18 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5526 18 : if (ndr_flags & NDR_SCALARS) {
5527 9 : NDR_CHECK(ndr_push_align(ndr, 8));
5528 9 : NDR_CHECK(ndr_push_samr_ValidateFieldsPresent(ndr, NDR_SCALARS, r->fields_present));
5529 9 : NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_password_change));
5530 9 : NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->bad_password_time));
5531 9 : NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->lockout_time));
5532 9 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pwd_count));
5533 9 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwd_history_len));
5534 9 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwd_history));
5535 9 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5536 : }
5537 18 : if (ndr_flags & NDR_BUFFERS) {
5538 9 : if (r->pwd_history) {
5539 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->pwd_history_len));
5540 0 : for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < (r->pwd_history_len); cntr_pwd_history_1++) {
5541 0 : NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->pwd_history[cntr_pwd_history_1]));
5542 : }
5543 0 : for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < (r->pwd_history_len); cntr_pwd_history_1++) {
5544 0 : NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->pwd_history[cntr_pwd_history_1]));
5545 : }
5546 : }
5547 : }
5548 18 : return NDR_ERR_SUCCESS;
5549 : }
5550 :
5551 18 : static enum ndr_err_code ndr_pull_samr_ValidatePasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordInfo *r)
5552 : {
5553 : uint32_t _ptr_pwd_history;
5554 18 : uint32_t size_pwd_history_1 = 0;
5555 : uint32_t cntr_pwd_history_1;
5556 18 : TALLOC_CTX *_mem_save_pwd_history_0 = NULL;
5557 18 : TALLOC_CTX *_mem_save_pwd_history_1 = NULL;
5558 18 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5559 18 : if (ndr_flags & NDR_SCALARS) {
5560 9 : NDR_CHECK(ndr_pull_align(ndr, 8));
5561 9 : NDR_CHECK(ndr_pull_samr_ValidateFieldsPresent(ndr, NDR_SCALARS, &r->fields_present));
5562 9 : NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_password_change));
5563 9 : NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->bad_password_time));
5564 9 : NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->lockout_time));
5565 9 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_pwd_count));
5566 9 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwd_history_len));
5567 9 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwd_history));
5568 9 : if (_ptr_pwd_history) {
5569 0 : NDR_PULL_ALLOC(ndr, r->pwd_history);
5570 : } else {
5571 9 : r->pwd_history = NULL;
5572 : }
5573 9 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5574 : }
5575 18 : if (ndr_flags & NDR_BUFFERS) {
5576 9 : if (r->pwd_history) {
5577 0 : _mem_save_pwd_history_0 = NDR_PULL_GET_MEM_CTX(ndr);
5578 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0);
5579 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pwd_history));
5580 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pwd_history, &size_pwd_history_1));
5581 0 : NDR_PULL_ALLOC_N(ndr, r->pwd_history, size_pwd_history_1);
5582 0 : _mem_save_pwd_history_1 = NDR_PULL_GET_MEM_CTX(ndr);
5583 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0);
5584 0 : for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < (size_pwd_history_1); cntr_pwd_history_1++) {
5585 0 : NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->pwd_history[cntr_pwd_history_1]));
5586 : }
5587 0 : for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < (size_pwd_history_1); cntr_pwd_history_1++) {
5588 0 : NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->pwd_history[cntr_pwd_history_1]));
5589 : }
5590 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwd_history_1, 0);
5591 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwd_history_0, 0);
5592 : }
5593 9 : if (r->pwd_history) {
5594 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->pwd_history, r->pwd_history_len));
5595 : }
5596 9 : for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < (size_pwd_history_1); cntr_pwd_history_1++) {
5597 : }
5598 : }
5599 18 : return NDR_ERR_SUCCESS;
5600 : }
5601 :
5602 0 : _PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordInfo *r)
5603 : {
5604 : uint32_t cntr_pwd_history_1;
5605 0 : ndr_print_struct(ndr, name, "samr_ValidatePasswordInfo");
5606 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5607 0 : ndr->depth++;
5608 0 : ndr_print_samr_ValidateFieldsPresent(ndr, "fields_present", r->fields_present);
5609 0 : ndr_print_NTTIME_hyper(ndr, "last_password_change", r->last_password_change);
5610 0 : ndr_print_NTTIME_hyper(ndr, "bad_password_time", r->bad_password_time);
5611 0 : ndr_print_NTTIME_hyper(ndr, "lockout_time", r->lockout_time);
5612 0 : ndr_print_uint32(ndr, "bad_pwd_count", r->bad_pwd_count);
5613 0 : ndr_print_uint32(ndr, "pwd_history_len", r->pwd_history_len);
5614 0 : ndr_print_ptr(ndr, "pwd_history", r->pwd_history);
5615 0 : ndr->depth++;
5616 0 : if (r->pwd_history) {
5617 0 : ndr->print(ndr, "%s: ARRAY(%d)", "pwd_history", (int)r->pwd_history_len);
5618 0 : ndr->depth++;
5619 0 : for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < (r->pwd_history_len); cntr_pwd_history_1++) {
5620 0 : ndr_print_samr_ValidationBlob(ndr, "pwd_history", &r->pwd_history[cntr_pwd_history_1]);
5621 : }
5622 0 : ndr->depth--;
5623 : }
5624 0 : ndr->depth--;
5625 0 : ndr->depth--;
5626 : }
5627 :
5628 6 : static enum ndr_err_code ndr_push_samr_ValidatePasswordRepCtr(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordRepCtr *r)
5629 : {
5630 6 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5631 6 : if (ndr_flags & NDR_SCALARS) {
5632 3 : NDR_CHECK(ndr_push_align(ndr, 8));
5633 3 : NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5634 3 : NDR_CHECK(ndr_push_samr_ValidationStatus(ndr, NDR_SCALARS, r->status));
5635 3 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5636 : }
5637 6 : if (ndr_flags & NDR_BUFFERS) {
5638 3 : NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5639 : }
5640 6 : return NDR_ERR_SUCCESS;
5641 : }
5642 :
5643 6 : static enum ndr_err_code ndr_pull_samr_ValidatePasswordRepCtr(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordRepCtr *r)
5644 : {
5645 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5646 6 : if (ndr_flags & NDR_SCALARS) {
5647 3 : NDR_CHECK(ndr_pull_align(ndr, 8));
5648 3 : NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5649 3 : NDR_CHECK(ndr_pull_samr_ValidationStatus(ndr, NDR_SCALARS, &r->status));
5650 3 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5651 : }
5652 6 : if (ndr_flags & NDR_BUFFERS) {
5653 3 : NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5654 : }
5655 6 : return NDR_ERR_SUCCESS;
5656 : }
5657 :
5658 0 : _PUBLIC_ void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordRepCtr *r)
5659 : {
5660 0 : ndr_print_struct(ndr, name, "samr_ValidatePasswordRepCtr");
5661 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5662 0 : ndr->depth++;
5663 0 : ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5664 0 : ndr_print_samr_ValidationStatus(ndr, "status", r->status);
5665 0 : ndr->depth--;
5666 : }
5667 :
5668 3 : static enum ndr_err_code ndr_push_samr_ValidatePasswordRep(struct ndr_push *ndr, int ndr_flags, const union samr_ValidatePasswordRep *r)
5669 : {
5670 : uint32_t level;
5671 3 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5672 3 : if (ndr_flags & NDR_SCALARS) {
5673 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5674 3 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5675 3 : NDR_CHECK(ndr_push_union_align(ndr, 8));
5676 3 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
5677 3 : NDR_CHECK(ndr_push_union_align(ndr, 8));
5678 3 : switch (level) {
5679 0 : case 1: {
5680 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1));
5681 0 : break; }
5682 :
5683 0 : case 2: {
5684 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr2));
5685 0 : break; }
5686 :
5687 3 : case 3: {
5688 3 : NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr3));
5689 3 : break; }
5690 :
5691 0 : default:
5692 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
5693 : }
5694 0 : }
5695 3 : if (ndr_flags & NDR_BUFFERS) {
5696 3 : if (!(ndr_flags & NDR_SCALARS)) {
5697 : /* We didn't get it above, and the token is not needed after this. */
5698 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5699 : }
5700 3 : switch (level) {
5701 0 : case 1:
5702 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr1));
5703 0 : break;
5704 :
5705 0 : case 2:
5706 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr2));
5707 0 : break;
5708 :
5709 3 : case 3:
5710 3 : NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr3));
5711 3 : break;
5712 :
5713 0 : default:
5714 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
5715 : }
5716 0 : }
5717 3 : return NDR_ERR_SUCCESS;
5718 : }
5719 :
5720 3 : static enum ndr_err_code ndr_pull_samr_ValidatePasswordRep(struct ndr_pull *ndr, int ndr_flags, union samr_ValidatePasswordRep *r)
5721 : {
5722 : uint32_t level;
5723 : uint16_t _level;
5724 3 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5725 3 : if (ndr_flags & NDR_SCALARS) {
5726 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5727 3 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5728 3 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
5729 3 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
5730 3 : if (_level != level) {
5731 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5732 : }
5733 3 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
5734 3 : switch (level) {
5735 0 : case 1: {
5736 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1));
5737 0 : break; }
5738 :
5739 0 : case 2: {
5740 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr2));
5741 0 : break; }
5742 :
5743 3 : case 3: {
5744 3 : NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr3));
5745 3 : break; }
5746 :
5747 0 : default:
5748 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5749 : }
5750 0 : }
5751 3 : if (ndr_flags & NDR_BUFFERS) {
5752 3 : if (!(ndr_flags & NDR_SCALARS)) {
5753 : /* We didn't get it above, and the token is not needed after this. */
5754 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5755 : }
5756 3 : switch (level) {
5757 0 : case 1:
5758 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr1));
5759 0 : break;
5760 :
5761 0 : case 2:
5762 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr2));
5763 0 : break;
5764 :
5765 3 : case 3:
5766 3 : NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr3));
5767 3 : break;
5768 :
5769 0 : default:
5770 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
5771 : }
5772 0 : }
5773 3 : return NDR_ERR_SUCCESS;
5774 : }
5775 :
5776 0 : _PUBLIC_ void ndr_print_samr_ValidatePasswordRep(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordRep *r)
5777 : {
5778 : uint32_t level;
5779 0 : level = ndr_print_steal_switch_value(ndr, r);
5780 0 : ndr_print_union(ndr, name, level, "samr_ValidatePasswordRep");
5781 0 : switch (level) {
5782 0 : case 1:
5783 0 : ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr1", &r->ctr1);
5784 0 : break;
5785 :
5786 0 : case 2:
5787 0 : ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr2", &r->ctr2);
5788 0 : break;
5789 :
5790 0 : case 3:
5791 0 : ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr3", &r->ctr3);
5792 0 : break;
5793 :
5794 0 : default:
5795 0 : ndr_print_bad_level(ndr, name, level);
5796 : }
5797 0 : }
5798 :
5799 12 : static enum ndr_err_code ndr_push_samr_ValidatePasswordReq3(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq3 *r)
5800 : {
5801 12 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5802 12 : if (ndr_flags & NDR_SCALARS) {
5803 6 : NDR_CHECK(ndr_push_align(ndr, 8));
5804 6 : NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5805 6 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5806 6 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5807 6 : NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5808 6 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pwd_must_change_at_next_logon));
5809 6 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->clear_lockout));
5810 6 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5811 : }
5812 12 : if (ndr_flags & NDR_BUFFERS) {
5813 6 : NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5814 6 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5815 6 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5816 6 : NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5817 : }
5818 12 : return NDR_ERR_SUCCESS;
5819 : }
5820 :
5821 12 : static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq3(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq3 *r)
5822 : {
5823 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5824 12 : if (ndr_flags & NDR_SCALARS) {
5825 6 : NDR_CHECK(ndr_pull_align(ndr, 8));
5826 6 : NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5827 6 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5828 6 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5829 6 : NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5830 6 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pwd_must_change_at_next_logon));
5831 6 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->clear_lockout));
5832 6 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5833 : }
5834 12 : if (ndr_flags & NDR_BUFFERS) {
5835 6 : NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5836 6 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5837 6 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5838 6 : NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5839 : }
5840 12 : return NDR_ERR_SUCCESS;
5841 : }
5842 :
5843 0 : _PUBLIC_ void ndr_print_samr_ValidatePasswordReq3(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq3 *r)
5844 : {
5845 0 : ndr_print_struct(ndr, name, "samr_ValidatePasswordReq3");
5846 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5847 0 : ndr->depth++;
5848 0 : ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5849 0 : ndr_print_lsa_StringLarge(ndr, "password", &r->password);
5850 0 : ndr_print_lsa_StringLarge(ndr, "account", &r->account);
5851 0 : ndr_print_samr_ValidationBlob(ndr, "hash", &r->hash);
5852 0 : ndr_print_uint8(ndr, "pwd_must_change_at_next_logon", r->pwd_must_change_at_next_logon);
5853 0 : ndr_print_uint8(ndr, "clear_lockout", r->clear_lockout);
5854 0 : ndr->depth--;
5855 : }
5856 :
5857 0 : static enum ndr_err_code ndr_push_samr_ValidatePasswordReq2(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq2 *r)
5858 : {
5859 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5860 0 : if (ndr_flags & NDR_SCALARS) {
5861 0 : NDR_CHECK(ndr_push_align(ndr, 8));
5862 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5863 0 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5864 0 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5865 0 : NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5866 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched));
5867 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5868 : }
5869 0 : if (ndr_flags & NDR_BUFFERS) {
5870 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5871 0 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5872 0 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5873 0 : NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5874 : }
5875 0 : return NDR_ERR_SUCCESS;
5876 : }
5877 :
5878 0 : static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq2(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq2 *r)
5879 : {
5880 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5881 0 : if (ndr_flags & NDR_SCALARS) {
5882 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
5883 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5884 0 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->password));
5885 0 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->account));
5886 0 : NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash));
5887 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched));
5888 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5889 : }
5890 0 : if (ndr_flags & NDR_BUFFERS) {
5891 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5892 0 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password));
5893 0 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account));
5894 0 : NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash));
5895 : }
5896 0 : return NDR_ERR_SUCCESS;
5897 : }
5898 :
5899 0 : _PUBLIC_ void ndr_print_samr_ValidatePasswordReq2(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq2 *r)
5900 : {
5901 0 : ndr_print_struct(ndr, name, "samr_ValidatePasswordReq2");
5902 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5903 0 : ndr->depth++;
5904 0 : ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5905 0 : ndr_print_lsa_StringLarge(ndr, "password", &r->password);
5906 0 : ndr_print_lsa_StringLarge(ndr, "account", &r->account);
5907 0 : ndr_print_samr_ValidationBlob(ndr, "hash", &r->hash);
5908 0 : ndr_print_uint8(ndr, "password_matched", r->password_matched);
5909 0 : ndr->depth--;
5910 : }
5911 :
5912 0 : static enum ndr_err_code ndr_push_samr_ValidatePasswordReq1(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq1 *r)
5913 : {
5914 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5915 0 : if (ndr_flags & NDR_SCALARS) {
5916 0 : NDR_CHECK(ndr_push_align(ndr, 8));
5917 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5918 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched));
5919 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5920 : }
5921 0 : if (ndr_flags & NDR_BUFFERS) {
5922 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5923 : }
5924 0 : return NDR_ERR_SUCCESS;
5925 : }
5926 :
5927 0 : static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq1(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq1 *r)
5928 : {
5929 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5930 0 : if (ndr_flags & NDR_SCALARS) {
5931 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
5932 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info));
5933 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched));
5934 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5935 : }
5936 0 : if (ndr_flags & NDR_BUFFERS) {
5937 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info));
5938 : }
5939 0 : return NDR_ERR_SUCCESS;
5940 : }
5941 :
5942 0 : _PUBLIC_ void ndr_print_samr_ValidatePasswordReq1(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq1 *r)
5943 : {
5944 0 : ndr_print_struct(ndr, name, "samr_ValidatePasswordReq1");
5945 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5946 0 : ndr->depth++;
5947 0 : ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info);
5948 0 : ndr_print_uint8(ndr, "password_matched", r->password_matched);
5949 0 : ndr->depth--;
5950 : }
5951 :
5952 6 : static enum ndr_err_code ndr_push_samr_ValidatePasswordReq(struct ndr_push *ndr, int ndr_flags, const union samr_ValidatePasswordReq *r)
5953 : {
5954 : uint32_t level;
5955 6 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5956 6 : if (ndr_flags & NDR_SCALARS) {
5957 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5958 6 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5959 6 : NDR_CHECK(ndr_push_union_align(ndr, 8));
5960 6 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
5961 6 : NDR_CHECK(ndr_push_union_align(ndr, 8));
5962 6 : switch (level) {
5963 0 : case 1: {
5964 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1));
5965 0 : break; }
5966 :
5967 0 : case 2: {
5968 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr, NDR_SCALARS, &r->req2));
5969 0 : break; }
5970 :
5971 6 : case 3: {
5972 6 : NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr, NDR_SCALARS, &r->req3));
5973 6 : break; }
5974 :
5975 0 : default:
5976 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
5977 : }
5978 0 : }
5979 6 : if (ndr_flags & NDR_BUFFERS) {
5980 6 : if (!(ndr_flags & NDR_SCALARS)) {
5981 : /* We didn't get it above, and the token is not needed after this. */
5982 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5983 : }
5984 6 : switch (level) {
5985 0 : case 1:
5986 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_BUFFERS, &r->req1));
5987 0 : break;
5988 :
5989 0 : case 2:
5990 0 : NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr, NDR_BUFFERS, &r->req2));
5991 0 : break;
5992 :
5993 6 : case 3:
5994 6 : NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr, NDR_BUFFERS, &r->req3));
5995 6 : break;
5996 :
5997 0 : default:
5998 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
5999 : }
6000 0 : }
6001 6 : return NDR_ERR_SUCCESS;
6002 : }
6003 :
6004 6 : static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq(struct ndr_pull *ndr, int ndr_flags, union samr_ValidatePasswordReq *r)
6005 : {
6006 : uint32_t level;
6007 : uint16_t _level;
6008 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6009 6 : if (ndr_flags & NDR_SCALARS) {
6010 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6011 6 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6012 6 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
6013 6 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
6014 6 : if (_level != level) {
6015 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
6016 : }
6017 6 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
6018 6 : switch (level) {
6019 0 : case 1: {
6020 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1));
6021 0 : break; }
6022 :
6023 0 : case 2: {
6024 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr, NDR_SCALARS, &r->req2));
6025 0 : break; }
6026 :
6027 6 : case 3: {
6028 6 : NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr, NDR_SCALARS, &r->req3));
6029 6 : break; }
6030 :
6031 0 : default:
6032 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
6033 : }
6034 0 : }
6035 6 : if (ndr_flags & NDR_BUFFERS) {
6036 6 : if (!(ndr_flags & NDR_SCALARS)) {
6037 : /* We didn't get it above, and the token is not needed after this. */
6038 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6039 : }
6040 6 : switch (level) {
6041 0 : case 1:
6042 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr, NDR_BUFFERS, &r->req1));
6043 0 : break;
6044 :
6045 0 : case 2:
6046 0 : NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr, NDR_BUFFERS, &r->req2));
6047 0 : break;
6048 :
6049 6 : case 3:
6050 6 : NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr, NDR_BUFFERS, &r->req3));
6051 6 : break;
6052 :
6053 0 : default:
6054 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
6055 : }
6056 0 : }
6057 6 : return NDR_ERR_SUCCESS;
6058 : }
6059 :
6060 0 : _PUBLIC_ void ndr_print_samr_ValidatePasswordReq(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordReq *r)
6061 : {
6062 : uint32_t level;
6063 0 : level = ndr_print_steal_switch_value(ndr, r);
6064 0 : ndr_print_union(ndr, name, level, "samr_ValidatePasswordReq");
6065 0 : switch (level) {
6066 0 : case 1:
6067 0 : ndr_print_samr_ValidatePasswordReq1(ndr, "req1", &r->req1);
6068 0 : break;
6069 :
6070 0 : case 2:
6071 0 : ndr_print_samr_ValidatePasswordReq2(ndr, "req2", &r->req2);
6072 0 : break;
6073 :
6074 0 : case 3:
6075 0 : ndr_print_samr_ValidatePasswordReq3(ndr, "req3", &r->req3);
6076 0 : break;
6077 :
6078 0 : default:
6079 0 : ndr_print_bad_level(ndr, name, level);
6080 : }
6081 0 : }
6082 :
6083 2108 : static enum ndr_err_code ndr_push_samr_Connect(struct ndr_push *ndr, int flags, const struct samr_Connect *r)
6084 : {
6085 2108 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6086 2108 : if (flags & NDR_IN) {
6087 952 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
6088 952 : if (r->in.system_name) {
6089 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
6090 : }
6091 952 : NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6092 : }
6093 2108 : if (flags & NDR_OUT) {
6094 1156 : if (r->out.connect_handle == NULL) {
6095 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6096 : }
6097 1156 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
6098 1156 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6099 : }
6100 2108 : return NDR_ERR_SUCCESS;
6101 : }
6102 :
6103 1906 : static enum ndr_err_code ndr_pull_samr_Connect(struct ndr_pull *ndr, int flags, struct samr_Connect *r)
6104 : {
6105 : uint32_t _ptr_system_name;
6106 1906 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
6107 1906 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
6108 1906 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6109 1906 : if (flags & NDR_IN) {
6110 954 : NDR_ZERO_STRUCT(r->out);
6111 :
6112 954 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
6113 954 : if (_ptr_system_name) {
6114 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
6115 : } else {
6116 954 : r->in.system_name = NULL;
6117 : }
6118 954 : if (r->in.system_name) {
6119 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6120 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
6121 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
6122 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
6123 : }
6124 954 : NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6125 954 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
6126 954 : NDR_ZERO_STRUCTP(r->out.connect_handle);
6127 : }
6128 1906 : if (flags & NDR_OUT) {
6129 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6130 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6131 952 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6132 202 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
6133 : }
6134 952 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6135 952 : NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6136 952 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
6137 952 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6138 952 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6139 : }
6140 1906 : return NDR_ERR_SUCCESS;
6141 : }
6142 :
6143 404 : _PUBLIC_ void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect *r)
6144 : {
6145 404 : ndr_print_struct(ndr, name, "samr_Connect");
6146 404 : if (r == NULL) { ndr_print_null(ndr); return; }
6147 404 : ndr->depth++;
6148 404 : if (flags & NDR_SET_VALUES) {
6149 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6150 : }
6151 404 : if (flags & NDR_IN) {
6152 0 : ndr_print_struct(ndr, "in", "samr_Connect");
6153 0 : ndr->depth++;
6154 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
6155 0 : ndr->depth++;
6156 0 : if (r->in.system_name) {
6157 0 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
6158 : }
6159 0 : ndr->depth--;
6160 0 : ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
6161 0 : ndr->depth--;
6162 : }
6163 404 : if (flags & NDR_OUT) {
6164 404 : ndr_print_struct(ndr, "out", "samr_Connect");
6165 404 : ndr->depth++;
6166 404 : ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
6167 404 : ndr->depth++;
6168 404 : ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
6169 404 : ndr->depth--;
6170 404 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
6171 404 : ndr->depth--;
6172 : }
6173 404 : ndr->depth--;
6174 : }
6175 :
6176 5800 : _PUBLIC_ enum ndr_err_code ndr_push_samr_Close(struct ndr_push *ndr, int flags, const struct samr_Close *r)
6177 : {
6178 5800 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6179 5800 : if (flags & NDR_IN) {
6180 2795 : if (r->in.handle == NULL) {
6181 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6182 : }
6183 2795 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6184 : }
6185 5800 : if (flags & NDR_OUT) {
6186 3005 : if (r->out.handle == NULL) {
6187 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6188 : }
6189 3005 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
6190 3005 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6191 : }
6192 5800 : return NDR_ERR_SUCCESS;
6193 : }
6194 :
6195 5601 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_Close(struct ndr_pull *ndr, int flags, struct samr_Close *r)
6196 : {
6197 5601 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6198 5601 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6199 5601 : if (flags & NDR_IN) {
6200 2814 : NDR_ZERO_STRUCT(r->out);
6201 :
6202 2814 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6203 2814 : NDR_PULL_ALLOC(ndr, r->in.handle);
6204 : }
6205 2814 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6206 2814 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6207 2814 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6208 2814 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6209 2814 : NDR_PULL_ALLOC(ndr, r->out.handle);
6210 2814 : *r->out.handle = *r->in.handle;
6211 : }
6212 5601 : if (flags & NDR_OUT) {
6213 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6214 : if (r->in.handle == NULL) {
6215 : NDR_PULL_ALLOC(ndr, r->in.handle);
6216 : NDR_ZERO_STRUCTP(r->in.handle);
6217 : }
6218 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6219 2787 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6220 1493 : NDR_PULL_ALLOC(ndr, r->out.handle);
6221 : }
6222 2787 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6223 2787 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
6224 2787 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
6225 2787 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6226 2787 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6227 : }
6228 5601 : return NDR_ERR_SUCCESS;
6229 : }
6230 :
6231 398 : _PUBLIC_ void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, const struct samr_Close *r)
6232 : {
6233 398 : ndr_print_struct(ndr, name, "samr_Close");
6234 398 : if (r == NULL) { ndr_print_null(ndr); return; }
6235 398 : ndr->depth++;
6236 398 : if (flags & NDR_SET_VALUES) {
6237 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6238 : }
6239 398 : if (flags & NDR_IN) {
6240 0 : ndr_print_struct(ndr, "in", "samr_Close");
6241 0 : ndr->depth++;
6242 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6243 0 : ndr->depth++;
6244 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6245 0 : ndr->depth--;
6246 0 : ndr->depth--;
6247 : }
6248 398 : if (flags & NDR_OUT) {
6249 398 : ndr_print_struct(ndr, "out", "samr_Close");
6250 398 : ndr->depth++;
6251 398 : ndr_print_ptr(ndr, "handle", r->out.handle);
6252 398 : ndr->depth++;
6253 398 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
6254 398 : ndr->depth--;
6255 398 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
6256 398 : ndr->depth--;
6257 : }
6258 398 : ndr->depth--;
6259 : }
6260 :
6261 0 : static enum ndr_err_code ndr_push_samr_SetSecurity(struct ndr_push *ndr, int flags, const struct samr_SetSecurity *r)
6262 : {
6263 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6264 0 : if (flags & NDR_IN) {
6265 0 : if (r->in.handle == NULL) {
6266 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6267 : }
6268 0 : if (r->in.sdbuf == NULL) {
6269 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6270 : }
6271 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6272 0 : NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
6273 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
6274 : }
6275 0 : if (flags & NDR_OUT) {
6276 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6277 : }
6278 0 : return NDR_ERR_SUCCESS;
6279 : }
6280 :
6281 0 : static enum ndr_err_code ndr_pull_samr_SetSecurity(struct ndr_pull *ndr, int flags, struct samr_SetSecurity *r)
6282 : {
6283 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6284 0 : TALLOC_CTX *_mem_save_sdbuf_0 = NULL;
6285 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6286 0 : if (flags & NDR_IN) {
6287 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6288 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6289 : }
6290 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6291 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6292 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6293 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6294 0 : NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
6295 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6296 0 : NDR_PULL_ALLOC(ndr, r->in.sdbuf);
6297 : }
6298 0 : _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
6299 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC);
6300 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
6301 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
6302 : }
6303 0 : if (flags & NDR_OUT) {
6304 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6305 : if (r->in.handle == NULL) {
6306 : NDR_PULL_ALLOC(ndr, r->in.handle);
6307 : NDR_ZERO_STRUCTP(r->in.handle);
6308 : }
6309 : if (r->in.sdbuf == NULL) {
6310 : NDR_PULL_ALLOC(ndr, r->in.sdbuf);
6311 : NDR_ZERO_STRUCTP(r->in.sdbuf);
6312 : }
6313 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6314 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6315 : }
6316 0 : return NDR_ERR_SUCCESS;
6317 : }
6318 :
6319 0 : _PUBLIC_ void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetSecurity *r)
6320 : {
6321 0 : ndr_print_struct(ndr, name, "samr_SetSecurity");
6322 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6323 0 : ndr->depth++;
6324 0 : if (flags & NDR_SET_VALUES) {
6325 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6326 : }
6327 0 : if (flags & NDR_IN) {
6328 0 : ndr_print_struct(ndr, "in", "samr_SetSecurity");
6329 0 : ndr->depth++;
6330 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6331 0 : ndr->depth++;
6332 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6333 0 : ndr->depth--;
6334 0 : ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
6335 0 : ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf);
6336 0 : ndr->depth++;
6337 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf);
6338 0 : ndr->depth--;
6339 0 : ndr->depth--;
6340 : }
6341 0 : if (flags & NDR_OUT) {
6342 0 : ndr_print_struct(ndr, "out", "samr_SetSecurity");
6343 0 : ndr->depth++;
6344 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
6345 0 : ndr->depth--;
6346 : }
6347 0 : ndr->depth--;
6348 : }
6349 :
6350 566 : static enum ndr_err_code ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int flags, const struct samr_QuerySecurity *r)
6351 : {
6352 566 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6353 566 : if (flags & NDR_IN) {
6354 283 : if (r->in.handle == NULL) {
6355 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6356 : }
6357 283 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6358 283 : NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
6359 : }
6360 566 : if (flags & NDR_OUT) {
6361 283 : if (r->out.sdbuf == NULL) {
6362 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6363 : }
6364 283 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf));
6365 283 : if (*r->out.sdbuf) {
6366 283 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
6367 : }
6368 283 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6369 : }
6370 566 : return NDR_ERR_SUCCESS;
6371 : }
6372 :
6373 566 : static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int flags, struct samr_QuerySecurity *r)
6374 : {
6375 : uint32_t _ptr_sdbuf;
6376 566 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6377 566 : TALLOC_CTX *_mem_save_sdbuf_0 = NULL;
6378 566 : TALLOC_CTX *_mem_save_sdbuf_1 = NULL;
6379 566 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6380 566 : if (flags & NDR_IN) {
6381 283 : NDR_ZERO_STRUCT(r->out);
6382 :
6383 283 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6384 283 : NDR_PULL_ALLOC(ndr, r->in.handle);
6385 : }
6386 283 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6387 283 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6388 283 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6389 283 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6390 283 : NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
6391 283 : NDR_PULL_ALLOC(ndr, r->out.sdbuf);
6392 283 : NDR_ZERO_STRUCTP(r->out.sdbuf);
6393 : }
6394 566 : if (flags & NDR_OUT) {
6395 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6396 : if (r->in.handle == NULL) {
6397 : NDR_PULL_ALLOC(ndr, r->in.handle);
6398 : NDR_ZERO_STRUCTP(r->in.handle);
6399 : }
6400 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6401 283 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6402 137 : NDR_PULL_ALLOC(ndr, r->out.sdbuf);
6403 : }
6404 283 : _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
6405 283 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
6406 283 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf));
6407 283 : if (_ptr_sdbuf) {
6408 283 : NDR_PULL_ALLOC(ndr, *r->out.sdbuf);
6409 : } else {
6410 0 : *r->out.sdbuf = NULL;
6411 : }
6412 283 : if (*r->out.sdbuf) {
6413 283 : _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr);
6414 283 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0);
6415 283 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
6416 283 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0);
6417 : }
6418 283 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
6419 283 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6420 : }
6421 566 : return NDR_ERR_SUCCESS;
6422 : }
6423 :
6424 0 : _PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_QuerySecurity *r)
6425 : {
6426 0 : ndr_print_struct(ndr, name, "samr_QuerySecurity");
6427 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6428 0 : ndr->depth++;
6429 0 : if (flags & NDR_SET_VALUES) {
6430 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6431 : }
6432 0 : if (flags & NDR_IN) {
6433 0 : ndr_print_struct(ndr, "in", "samr_QuerySecurity");
6434 0 : ndr->depth++;
6435 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6436 0 : ndr->depth++;
6437 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6438 0 : ndr->depth--;
6439 0 : ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
6440 0 : ndr->depth--;
6441 : }
6442 0 : if (flags & NDR_OUT) {
6443 0 : ndr_print_struct(ndr, "out", "samr_QuerySecurity");
6444 0 : ndr->depth++;
6445 0 : ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
6446 0 : ndr->depth++;
6447 0 : ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf);
6448 0 : ndr->depth++;
6449 0 : if (*r->out.sdbuf) {
6450 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf);
6451 : }
6452 0 : ndr->depth--;
6453 0 : ndr->depth--;
6454 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
6455 0 : ndr->depth--;
6456 : }
6457 0 : ndr->depth--;
6458 : }
6459 :
6460 0 : static enum ndr_err_code ndr_push_samr_Shutdown(struct ndr_push *ndr, int flags, const struct samr_Shutdown *r)
6461 : {
6462 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6463 0 : if (flags & NDR_IN) {
6464 0 : if (r->in.connect_handle == NULL) {
6465 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6466 : }
6467 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6468 : }
6469 0 : if (flags & NDR_OUT) {
6470 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6471 : }
6472 0 : return NDR_ERR_SUCCESS;
6473 : }
6474 :
6475 0 : static enum ndr_err_code ndr_pull_samr_Shutdown(struct ndr_pull *ndr, int flags, struct samr_Shutdown *r)
6476 : {
6477 0 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
6478 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6479 0 : if (flags & NDR_IN) {
6480 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6481 0 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6482 : }
6483 0 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6484 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6485 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6486 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6487 : }
6488 0 : if (flags & NDR_OUT) {
6489 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6490 : if (r->in.connect_handle == NULL) {
6491 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6492 : NDR_ZERO_STRUCTP(r->in.connect_handle);
6493 : }
6494 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6495 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6496 : }
6497 0 : return NDR_ERR_SUCCESS;
6498 : }
6499 :
6500 0 : _PUBLIC_ void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, const struct samr_Shutdown *r)
6501 : {
6502 0 : ndr_print_struct(ndr, name, "samr_Shutdown");
6503 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6504 0 : ndr->depth++;
6505 0 : if (flags & NDR_SET_VALUES) {
6506 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6507 : }
6508 0 : if (flags & NDR_IN) {
6509 0 : ndr_print_struct(ndr, "in", "samr_Shutdown");
6510 0 : ndr->depth++;
6511 0 : ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6512 0 : ndr->depth++;
6513 0 : ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6514 0 : ndr->depth--;
6515 0 : ndr->depth--;
6516 : }
6517 0 : if (flags & NDR_OUT) {
6518 0 : ndr_print_struct(ndr, "out", "samr_Shutdown");
6519 0 : ndr->depth++;
6520 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
6521 0 : ndr->depth--;
6522 : }
6523 0 : ndr->depth--;
6524 : }
6525 :
6526 1080 : static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int flags, const struct samr_LookupDomain *r)
6527 : {
6528 1080 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6529 1080 : if (flags & NDR_IN) {
6530 509 : if (r->in.connect_handle == NULL) {
6531 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6532 : }
6533 509 : if (r->in.domain_name == NULL) {
6534 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6535 : }
6536 509 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6537 509 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
6538 : }
6539 1080 : if (flags & NDR_OUT) {
6540 571 : if (r->out.sid == NULL) {
6541 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6542 : }
6543 571 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sid));
6544 571 : if (*r->out.sid) {
6545 483 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
6546 : }
6547 571 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6548 : }
6549 1080 : return NDR_ERR_SUCCESS;
6550 : }
6551 :
6552 1016 : static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int flags, struct samr_LookupDomain *r)
6553 : {
6554 : uint32_t _ptr_sid;
6555 1016 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
6556 1016 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
6557 1016 : TALLOC_CTX *_mem_save_sid_0 = NULL;
6558 1016 : TALLOC_CTX *_mem_save_sid_1 = NULL;
6559 1016 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6560 1016 : if (flags & NDR_IN) {
6561 507 : NDR_ZERO_STRUCT(r->out);
6562 :
6563 507 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6564 507 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6565 : }
6566 507 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6567 507 : NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6568 507 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6569 507 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6570 507 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6571 507 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
6572 : }
6573 507 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6574 507 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, LIBNDR_FLAG_REF_ALLOC);
6575 507 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
6576 507 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, LIBNDR_FLAG_REF_ALLOC);
6577 507 : NDR_PULL_ALLOC(ndr, r->out.sid);
6578 507 : NDR_ZERO_STRUCTP(r->out.sid);
6579 : }
6580 1016 : if (flags & NDR_OUT) {
6581 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6582 : if (r->in.connect_handle == NULL) {
6583 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6584 : NDR_ZERO_STRUCTP(r->in.connect_handle);
6585 : }
6586 : if (r->in.domain_name == NULL) {
6587 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
6588 : NDR_ZERO_STRUCTP(r->in.domain_name);
6589 : }
6590 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6591 509 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6592 174 : NDR_PULL_ALLOC(ndr, r->out.sid);
6593 : }
6594 509 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6595 509 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
6596 509 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
6597 509 : if (_ptr_sid) {
6598 421 : NDR_PULL_ALLOC(ndr, *r->out.sid);
6599 : } else {
6600 88 : *r->out.sid = NULL;
6601 : }
6602 509 : if (*r->out.sid) {
6603 421 : _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr);
6604 421 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, 0);
6605 421 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
6606 421 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, 0);
6607 : }
6608 509 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6609 509 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6610 : }
6611 1016 : return NDR_ERR_SUCCESS;
6612 : }
6613 :
6614 128 : _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupDomain *r)
6615 : {
6616 128 : ndr_print_struct(ndr, name, "samr_LookupDomain");
6617 128 : if (r == NULL) { ndr_print_null(ndr); return; }
6618 128 : ndr->depth++;
6619 128 : if (flags & NDR_SET_VALUES) {
6620 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6621 : }
6622 128 : if (flags & NDR_IN) {
6623 0 : ndr_print_struct(ndr, "in", "samr_LookupDomain");
6624 0 : ndr->depth++;
6625 0 : ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6626 0 : ndr->depth++;
6627 0 : ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6628 0 : ndr->depth--;
6629 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
6630 0 : ndr->depth++;
6631 0 : ndr_print_lsa_String(ndr, "domain_name", r->in.domain_name);
6632 0 : ndr->depth--;
6633 0 : ndr->depth--;
6634 : }
6635 128 : if (flags & NDR_OUT) {
6636 128 : ndr_print_struct(ndr, "out", "samr_LookupDomain");
6637 128 : ndr->depth++;
6638 128 : ndr_print_ptr(ndr, "sid", r->out.sid);
6639 128 : ndr->depth++;
6640 128 : ndr_print_ptr(ndr, "sid", *r->out.sid);
6641 128 : ndr->depth++;
6642 128 : if (*r->out.sid) {
6643 128 : ndr_print_dom_sid2(ndr, "sid", *r->out.sid);
6644 : }
6645 128 : ndr->depth--;
6646 128 : ndr->depth--;
6647 128 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
6648 128 : ndr->depth--;
6649 : }
6650 128 : ndr->depth--;
6651 : }
6652 :
6653 262 : static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int flags, const struct samr_EnumDomains *r)
6654 : {
6655 262 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6656 262 : if (flags & NDR_IN) {
6657 132 : if (r->in.connect_handle == NULL) {
6658 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6659 : }
6660 132 : if (r->in.resume_handle == NULL) {
6661 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6662 : }
6663 132 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6664 132 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6665 132 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
6666 : }
6667 262 : if (flags & NDR_OUT) {
6668 130 : if (r->out.resume_handle == NULL) {
6669 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6670 : }
6671 130 : if (r->out.sam == NULL) {
6672 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6673 : }
6674 130 : if (r->out.num_entries == NULL) {
6675 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6676 : }
6677 130 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6678 130 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
6679 130 : if (*r->out.sam) {
6680 108 : NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6681 : }
6682 130 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
6683 130 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6684 : }
6685 262 : return NDR_ERR_SUCCESS;
6686 : }
6687 :
6688 262 : static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int flags, struct samr_EnumDomains *r)
6689 : {
6690 : uint32_t _ptr_sam;
6691 262 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
6692 262 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
6693 262 : TALLOC_CTX *_mem_save_sam_0 = NULL;
6694 262 : TALLOC_CTX *_mem_save_sam_1 = NULL;
6695 262 : TALLOC_CTX *_mem_save_num_entries_0 = NULL;
6696 262 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6697 262 : if (flags & NDR_IN) {
6698 130 : NDR_ZERO_STRUCT(r->out);
6699 :
6700 130 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6701 130 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6702 : }
6703 130 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6704 130 : NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6705 130 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6706 130 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6707 130 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6708 130 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6709 : }
6710 130 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6711 130 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6712 130 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6713 130 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6714 130 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
6715 130 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6716 130 : *r->out.resume_handle = *r->in.resume_handle;
6717 130 : NDR_PULL_ALLOC(ndr, r->out.sam);
6718 130 : NDR_ZERO_STRUCTP(r->out.sam);
6719 130 : NDR_PULL_ALLOC(ndr, r->out.num_entries);
6720 130 : NDR_ZERO_STRUCTP(r->out.num_entries);
6721 : }
6722 262 : if (flags & NDR_OUT) {
6723 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6724 : if (r->in.connect_handle == NULL) {
6725 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6726 : NDR_ZERO_STRUCTP(r->in.connect_handle);
6727 : }
6728 : if (r->in.resume_handle == NULL) {
6729 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6730 : NDR_ZERO_STRUCTP(r->in.resume_handle);
6731 : }
6732 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6733 132 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6734 86 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6735 : }
6736 132 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6737 132 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6738 132 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6739 132 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6740 132 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6741 86 : NDR_PULL_ALLOC(ndr, r->out.sam);
6742 : }
6743 132 : _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
6744 132 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
6745 132 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
6746 132 : if (_ptr_sam) {
6747 110 : NDR_PULL_ALLOC(ndr, *r->out.sam);
6748 : } else {
6749 22 : *r->out.sam = NULL;
6750 : }
6751 132 : if (*r->out.sam) {
6752 110 : _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
6753 110 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
6754 110 : NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
6755 110 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
6756 : }
6757 132 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
6758 132 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6759 86 : NDR_PULL_ALLOC(ndr, r->out.num_entries);
6760 : }
6761 132 : _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6762 132 : NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
6763 132 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
6764 132 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
6765 132 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6766 : }
6767 262 : return NDR_ERR_SUCCESS;
6768 : }
6769 :
6770 0 : _PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomains *r)
6771 : {
6772 0 : ndr_print_struct(ndr, name, "samr_EnumDomains");
6773 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6774 0 : ndr->depth++;
6775 0 : if (flags & NDR_SET_VALUES) {
6776 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6777 : }
6778 0 : if (flags & NDR_IN) {
6779 0 : ndr_print_struct(ndr, "in", "samr_EnumDomains");
6780 0 : ndr->depth++;
6781 0 : ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6782 0 : ndr->depth++;
6783 0 : ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6784 0 : ndr->depth--;
6785 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6786 0 : ndr->depth++;
6787 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6788 0 : ndr->depth--;
6789 0 : ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
6790 0 : ndr->depth--;
6791 : }
6792 0 : if (flags & NDR_OUT) {
6793 0 : ndr_print_struct(ndr, "out", "samr_EnumDomains");
6794 0 : ndr->depth++;
6795 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6796 0 : ndr->depth++;
6797 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6798 0 : ndr->depth--;
6799 0 : ndr_print_ptr(ndr, "sam", r->out.sam);
6800 0 : ndr->depth++;
6801 0 : ndr_print_ptr(ndr, "sam", *r->out.sam);
6802 0 : ndr->depth++;
6803 0 : if (*r->out.sam) {
6804 0 : ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
6805 : }
6806 0 : ndr->depth--;
6807 0 : ndr->depth--;
6808 0 : ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
6809 0 : ndr->depth++;
6810 0 : ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
6811 0 : ndr->depth--;
6812 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
6813 0 : ndr->depth--;
6814 : }
6815 0 : ndr->depth--;
6816 : }
6817 :
6818 3643 : _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenDomain(struct ndr_push *ndr, int flags, const struct samr_OpenDomain *r)
6819 : {
6820 3643 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6821 3643 : if (flags & NDR_IN) {
6822 1621 : if (r->in.connect_handle == NULL) {
6823 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6824 : }
6825 1621 : if (r->in.sid == NULL) {
6826 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6827 : }
6828 1621 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6829 1621 : NDR_CHECK(ndr_push_samr_DomainAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6830 1621 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6831 : }
6832 3643 : if (flags & NDR_OUT) {
6833 2022 : if (r->out.domain_handle == NULL) {
6834 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6835 : }
6836 2022 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.domain_handle));
6837 2022 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6838 : }
6839 3643 : return NDR_ERR_SUCCESS;
6840 : }
6841 :
6842 3441 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, int flags, struct samr_OpenDomain *r)
6843 : {
6844 3441 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
6845 3441 : TALLOC_CTX *_mem_save_sid_0 = NULL;
6846 3441 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
6847 3441 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6848 3441 : if (flags & NDR_IN) {
6849 1828 : NDR_ZERO_STRUCT(r->out);
6850 :
6851 1828 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6852 1828 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6853 : }
6854 1828 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6855 1828 : NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
6856 1828 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
6857 1828 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
6858 1828 : NDR_CHECK(ndr_pull_samr_DomainAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6859 1828 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6860 1828 : NDR_PULL_ALLOC(ndr, r->in.sid);
6861 : }
6862 1828 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6863 1828 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
6864 1828 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6865 1828 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6866 1828 : NDR_PULL_ALLOC(ndr, r->out.domain_handle);
6867 1828 : NDR_ZERO_STRUCTP(r->out.domain_handle);
6868 : }
6869 3441 : if (flags & NDR_OUT) {
6870 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6871 : if (r->in.connect_handle == NULL) {
6872 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
6873 : NDR_ZERO_STRUCTP(r->in.connect_handle);
6874 : }
6875 : if (r->in.sid == NULL) {
6876 : NDR_PULL_ALLOC(ndr, r->in.sid);
6877 : NDR_ZERO_STRUCTP(r->in.sid);
6878 : }
6879 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6880 1613 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6881 887 : NDR_PULL_ALLOC(ndr, r->out.domain_handle);
6882 : }
6883 1613 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6884 1613 : NDR_PULL_SET_MEM_CTX(ndr, r->out.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6885 1613 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.domain_handle));
6886 1613 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6887 1613 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6888 : }
6889 3441 : return NDR_ERR_SUCCESS;
6890 : }
6891 :
6892 404 : _PUBLIC_ void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenDomain *r)
6893 : {
6894 404 : ndr_print_struct(ndr, name, "samr_OpenDomain");
6895 404 : if (r == NULL) { ndr_print_null(ndr); return; }
6896 404 : ndr->depth++;
6897 404 : if (flags & NDR_SET_VALUES) {
6898 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6899 : }
6900 404 : if (flags & NDR_IN) {
6901 0 : ndr_print_struct(ndr, "in", "samr_OpenDomain");
6902 0 : ndr->depth++;
6903 0 : ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
6904 0 : ndr->depth++;
6905 0 : ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
6906 0 : ndr->depth--;
6907 0 : ndr_print_samr_DomainAccessMask(ndr, "access_mask", r->in.access_mask);
6908 0 : ndr_print_ptr(ndr, "sid", r->in.sid);
6909 0 : ndr->depth++;
6910 0 : ndr_print_dom_sid2(ndr, "sid", r->in.sid);
6911 0 : ndr->depth--;
6912 0 : ndr->depth--;
6913 : }
6914 404 : if (flags & NDR_OUT) {
6915 404 : ndr_print_struct(ndr, "out", "samr_OpenDomain");
6916 404 : ndr->depth++;
6917 404 : ndr_print_ptr(ndr, "domain_handle", r->out.domain_handle);
6918 404 : ndr->depth++;
6919 404 : ndr_print_policy_handle(ndr, "domain_handle", r->out.domain_handle);
6920 404 : ndr->depth--;
6921 404 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
6922 404 : ndr->depth--;
6923 : }
6924 404 : ndr->depth--;
6925 : }
6926 :
6927 478 : static enum ndr_err_code ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, int flags, const struct samr_QueryDomainInfo *r)
6928 : {
6929 478 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6930 478 : if (flags & NDR_IN) {
6931 235 : if (r->in.domain_handle == NULL) {
6932 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6933 : }
6934 235 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6935 235 : NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
6936 : }
6937 478 : if (flags & NDR_OUT) {
6938 243 : if (r->out.info == NULL) {
6939 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6940 : }
6941 243 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
6942 243 : if (*r->out.info) {
6943 243 : NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
6944 243 : NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
6945 : }
6946 243 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6947 : }
6948 478 : return NDR_ERR_SUCCESS;
6949 : }
6950 :
6951 474 : static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo *r)
6952 : {
6953 : uint32_t _ptr_info;
6954 474 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
6955 474 : TALLOC_CTX *_mem_save_info_0 = NULL;
6956 474 : TALLOC_CTX *_mem_save_info_1 = NULL;
6957 474 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6958 474 : if (flags & NDR_IN) {
6959 239 : NDR_ZERO_STRUCT(r->out);
6960 :
6961 239 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6962 239 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6963 : }
6964 239 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6965 239 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
6966 239 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
6967 239 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
6968 239 : NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
6969 239 : NDR_PULL_ALLOC(ndr, r->out.info);
6970 239 : NDR_ZERO_STRUCTP(r->out.info);
6971 : }
6972 474 : if (flags & NDR_OUT) {
6973 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6974 : if (r->in.domain_handle == NULL) {
6975 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
6976 : NDR_ZERO_STRUCTP(r->in.domain_handle);
6977 : }
6978 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6979 235 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6980 23 : NDR_PULL_ALLOC(ndr, r->out.info);
6981 : }
6982 235 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6983 235 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
6984 235 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
6985 235 : if (_ptr_info) {
6986 235 : NDR_PULL_ALLOC(ndr, *r->out.info);
6987 : } else {
6988 0 : *r->out.info = NULL;
6989 : }
6990 235 : if (*r->out.info) {
6991 235 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
6992 235 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
6993 235 : NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
6994 235 : NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
6995 235 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
6996 : }
6997 235 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6998 235 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6999 : }
7000 474 : return NDR_ERR_SUCCESS;
7001 : }
7002 :
7003 8 : _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo *r)
7004 : {
7005 8 : ndr_print_struct(ndr, name, "samr_QueryDomainInfo");
7006 8 : if (r == NULL) { ndr_print_null(ndr); return; }
7007 8 : ndr->depth++;
7008 8 : if (flags & NDR_SET_VALUES) {
7009 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7010 : }
7011 8 : if (flags & NDR_IN) {
7012 0 : ndr_print_struct(ndr, "in", "samr_QueryDomainInfo");
7013 0 : ndr->depth++;
7014 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7015 0 : ndr->depth++;
7016 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7017 0 : ndr->depth--;
7018 0 : ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
7019 0 : ndr->depth--;
7020 : }
7021 8 : if (flags & NDR_OUT) {
7022 8 : ndr_print_struct(ndr, "out", "samr_QueryDomainInfo");
7023 8 : ndr->depth++;
7024 8 : ndr_print_ptr(ndr, "info", r->out.info);
7025 8 : ndr->depth++;
7026 8 : ndr_print_ptr(ndr, "info", *r->out.info);
7027 8 : ndr->depth++;
7028 8 : if (*r->out.info) {
7029 8 : ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
7030 8 : ndr_print_samr_DomainInfo(ndr, "info", *r->out.info);
7031 : }
7032 8 : ndr->depth--;
7033 8 : ndr->depth--;
7034 8 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
7035 8 : ndr->depth--;
7036 : }
7037 8 : ndr->depth--;
7038 : }
7039 :
7040 444 : static enum ndr_err_code ndr_push_samr_SetDomainInfo(struct ndr_push *ndr, int flags, const struct samr_SetDomainInfo *r)
7041 : {
7042 444 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7043 444 : if (flags & NDR_IN) {
7044 222 : if (r->in.domain_handle == NULL) {
7045 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7046 : }
7047 222 : if (r->in.info == NULL) {
7048 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7049 : }
7050 222 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7051 222 : NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
7052 222 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
7053 222 : NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7054 : }
7055 444 : if (flags & NDR_OUT) {
7056 222 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7057 : }
7058 444 : return NDR_ERR_SUCCESS;
7059 : }
7060 :
7061 444 : static enum ndr_err_code ndr_pull_samr_SetDomainInfo(struct ndr_pull *ndr, int flags, struct samr_SetDomainInfo *r)
7062 : {
7063 444 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
7064 444 : TALLOC_CTX *_mem_save_info_0 = NULL;
7065 444 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7066 444 : if (flags & NDR_IN) {
7067 222 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7068 222 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7069 : }
7070 222 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7071 222 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7072 222 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7073 222 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7074 222 : NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
7075 222 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7076 222 : NDR_PULL_ALLOC(ndr, r->in.info);
7077 : }
7078 222 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7079 222 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
7080 222 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
7081 222 : NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7082 222 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7083 : }
7084 444 : if (flags & NDR_OUT) {
7085 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7086 : if (r->in.domain_handle == NULL) {
7087 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7088 : NDR_ZERO_STRUCTP(r->in.domain_handle);
7089 : }
7090 : if (r->in.info == NULL) {
7091 : NDR_PULL_ALLOC(ndr, r->in.info);
7092 : NDR_ZERO_STRUCTP(r->in.info);
7093 : }
7094 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7095 222 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7096 : }
7097 444 : return NDR_ERR_SUCCESS;
7098 : }
7099 :
7100 0 : _PUBLIC_ void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDomainInfo *r)
7101 : {
7102 0 : ndr_print_struct(ndr, name, "samr_SetDomainInfo");
7103 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7104 0 : ndr->depth++;
7105 0 : if (flags & NDR_SET_VALUES) {
7106 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7107 : }
7108 0 : if (flags & NDR_IN) {
7109 0 : ndr_print_struct(ndr, "in", "samr_SetDomainInfo");
7110 0 : ndr->depth++;
7111 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7112 0 : ndr->depth++;
7113 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7114 0 : ndr->depth--;
7115 0 : ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
7116 0 : ndr_print_ptr(ndr, "info", r->in.info);
7117 0 : ndr->depth++;
7118 0 : ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
7119 0 : ndr_print_samr_DomainInfo(ndr, "info", r->in.info);
7120 0 : ndr->depth--;
7121 0 : ndr->depth--;
7122 : }
7123 0 : if (flags & NDR_OUT) {
7124 0 : ndr_print_struct(ndr, "out", "samr_SetDomainInfo");
7125 0 : ndr->depth++;
7126 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
7127 0 : ndr->depth--;
7128 : }
7129 0 : ndr->depth--;
7130 : }
7131 :
7132 1973 : static enum ndr_err_code ndr_push_samr_CreateDomainGroup(struct ndr_push *ndr, int flags, const struct samr_CreateDomainGroup *r)
7133 : {
7134 1973 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7135 1973 : if (flags & NDR_IN) {
7136 985 : if (r->in.domain_handle == NULL) {
7137 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7138 : }
7139 985 : if (r->in.name == NULL) {
7140 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7141 : }
7142 985 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7143 985 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
7144 985 : NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7145 : }
7146 1973 : if (flags & NDR_OUT) {
7147 988 : if (r->out.group_handle == NULL) {
7148 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7149 : }
7150 988 : if (r->out.rid == NULL) {
7151 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7152 : }
7153 988 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
7154 988 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
7155 988 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7156 : }
7157 1973 : return NDR_ERR_SUCCESS;
7158 : }
7159 :
7160 1970 : static enum ndr_err_code ndr_pull_samr_CreateDomainGroup(struct ndr_pull *ndr, int flags, struct samr_CreateDomainGroup *r)
7161 : {
7162 1970 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
7163 1970 : TALLOC_CTX *_mem_save_name_0 = NULL;
7164 1970 : TALLOC_CTX *_mem_save_group_handle_0 = NULL;
7165 1970 : TALLOC_CTX *_mem_save_rid_0 = NULL;
7166 1970 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7167 1970 : if (flags & NDR_IN) {
7168 985 : NDR_ZERO_STRUCT(r->out);
7169 :
7170 985 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7171 985 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7172 : }
7173 985 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7174 985 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7175 985 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7176 985 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7177 985 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7178 985 : NDR_PULL_ALLOC(ndr, r->in.name);
7179 : }
7180 985 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7181 985 : NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
7182 985 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
7183 985 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
7184 985 : NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7185 985 : NDR_PULL_ALLOC(ndr, r->out.group_handle);
7186 985 : NDR_ZERO_STRUCTP(r->out.group_handle);
7187 985 : NDR_PULL_ALLOC(ndr, r->out.rid);
7188 985 : NDR_ZERO_STRUCTP(r->out.rid);
7189 : }
7190 1970 : if (flags & NDR_OUT) {
7191 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7192 : if (r->in.domain_handle == NULL) {
7193 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7194 : NDR_ZERO_STRUCTP(r->in.domain_handle);
7195 : }
7196 : if (r->in.name == NULL) {
7197 : NDR_PULL_ALLOC(ndr, r->in.name);
7198 : NDR_ZERO_STRUCTP(r->in.name);
7199 : }
7200 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7201 985 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7202 75 : NDR_PULL_ALLOC(ndr, r->out.group_handle);
7203 : }
7204 985 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7205 985 : NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC);
7206 985 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
7207 985 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
7208 985 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7209 75 : NDR_PULL_ALLOC(ndr, r->out.rid);
7210 : }
7211 985 : _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7212 985 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
7213 985 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
7214 985 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
7215 985 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7216 : }
7217 1970 : return NDR_ERR_SUCCESS;
7218 : }
7219 :
7220 6 : _PUBLIC_ void ndr_print_samr_CreateDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomainGroup *r)
7221 : {
7222 6 : ndr_print_struct(ndr, name, "samr_CreateDomainGroup");
7223 6 : if (r == NULL) { ndr_print_null(ndr); return; }
7224 6 : ndr->depth++;
7225 6 : if (flags & NDR_SET_VALUES) {
7226 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7227 : }
7228 6 : if (flags & NDR_IN) {
7229 0 : ndr_print_struct(ndr, "in", "samr_CreateDomainGroup");
7230 0 : ndr->depth++;
7231 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7232 0 : ndr->depth++;
7233 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7234 0 : ndr->depth--;
7235 0 : ndr_print_ptr(ndr, "name", r->in.name);
7236 0 : ndr->depth++;
7237 0 : ndr_print_lsa_String(ndr, "name", r->in.name);
7238 0 : ndr->depth--;
7239 0 : ndr_print_samr_GroupAccessMask(ndr, "access_mask", r->in.access_mask);
7240 0 : ndr->depth--;
7241 : }
7242 6 : if (flags & NDR_OUT) {
7243 6 : ndr_print_struct(ndr, "out", "samr_CreateDomainGroup");
7244 6 : ndr->depth++;
7245 6 : ndr_print_ptr(ndr, "group_handle", r->out.group_handle);
7246 6 : ndr->depth++;
7247 6 : ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle);
7248 6 : ndr->depth--;
7249 6 : ndr_print_ptr(ndr, "rid", r->out.rid);
7250 6 : ndr->depth++;
7251 6 : ndr_print_uint32(ndr, "rid", *r->out.rid);
7252 6 : ndr->depth--;
7253 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
7254 6 : ndr->depth--;
7255 : }
7256 6 : ndr->depth--;
7257 : }
7258 :
7259 273 : static enum ndr_err_code ndr_push_samr_EnumDomainGroups(struct ndr_push *ndr, int flags, const struct samr_EnumDomainGroups *r)
7260 : {
7261 273 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7262 273 : if (flags & NDR_IN) {
7263 133 : if (r->in.domain_handle == NULL) {
7264 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7265 : }
7266 133 : if (r->in.resume_handle == NULL) {
7267 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7268 : }
7269 133 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7270 133 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
7271 133 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
7272 : }
7273 273 : if (flags & NDR_OUT) {
7274 140 : if (r->out.resume_handle == NULL) {
7275 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7276 : }
7277 140 : if (r->out.sam == NULL) {
7278 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7279 : }
7280 140 : if (r->out.num_entries == NULL) {
7281 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7282 : }
7283 140 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
7284 140 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
7285 140 : if (*r->out.sam) {
7286 140 : NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7287 : }
7288 140 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
7289 140 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7290 : }
7291 273 : return NDR_ERR_SUCCESS;
7292 : }
7293 :
7294 272 : static enum ndr_err_code ndr_pull_samr_EnumDomainGroups(struct ndr_pull *ndr, int flags, struct samr_EnumDomainGroups *r)
7295 : {
7296 : uint32_t _ptr_sam;
7297 272 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
7298 272 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
7299 272 : TALLOC_CTX *_mem_save_sam_0 = NULL;
7300 272 : TALLOC_CTX *_mem_save_sam_1 = NULL;
7301 272 : TALLOC_CTX *_mem_save_num_entries_0 = NULL;
7302 272 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7303 272 : if (flags & NDR_IN) {
7304 139 : NDR_ZERO_STRUCT(r->out);
7305 :
7306 139 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7307 139 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7308 : }
7309 139 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7310 139 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7311 139 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7312 139 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7313 139 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7314 139 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7315 : }
7316 139 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7317 139 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7318 139 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
7319 139 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7320 139 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
7321 139 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7322 139 : *r->out.resume_handle = *r->in.resume_handle;
7323 139 : NDR_PULL_ALLOC(ndr, r->out.sam);
7324 139 : NDR_ZERO_STRUCTP(r->out.sam);
7325 139 : NDR_PULL_ALLOC(ndr, r->out.num_entries);
7326 139 : NDR_ZERO_STRUCTP(r->out.num_entries);
7327 : }
7328 272 : if (flags & NDR_OUT) {
7329 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7330 : if (r->in.domain_handle == NULL) {
7331 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7332 : NDR_ZERO_STRUCTP(r->in.domain_handle);
7333 : }
7334 : if (r->in.resume_handle == NULL) {
7335 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7336 : NDR_ZERO_STRUCTP(r->in.resume_handle);
7337 : }
7338 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7339 133 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7340 70 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7341 : }
7342 133 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7343 133 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7344 133 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7345 133 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7346 133 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7347 70 : NDR_PULL_ALLOC(ndr, r->out.sam);
7348 : }
7349 133 : _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
7350 133 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
7351 133 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
7352 133 : if (_ptr_sam) {
7353 133 : NDR_PULL_ALLOC(ndr, *r->out.sam);
7354 : } else {
7355 0 : *r->out.sam = NULL;
7356 : }
7357 133 : if (*r->out.sam) {
7358 133 : _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
7359 133 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
7360 133 : NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7361 133 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
7362 : }
7363 133 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
7364 133 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7365 70 : NDR_PULL_ALLOC(ndr, r->out.num_entries);
7366 : }
7367 133 : _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
7368 133 : NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
7369 133 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
7370 133 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
7371 133 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7372 : }
7373 272 : return NDR_ERR_SUCCESS;
7374 : }
7375 :
7376 2 : _PUBLIC_ void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainGroups *r)
7377 : {
7378 2 : ndr_print_struct(ndr, name, "samr_EnumDomainGroups");
7379 2 : if (r == NULL) { ndr_print_null(ndr); return; }
7380 2 : ndr->depth++;
7381 2 : if (flags & NDR_SET_VALUES) {
7382 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7383 : }
7384 2 : if (flags & NDR_IN) {
7385 0 : ndr_print_struct(ndr, "in", "samr_EnumDomainGroups");
7386 0 : ndr->depth++;
7387 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7388 0 : ndr->depth++;
7389 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7390 0 : ndr->depth--;
7391 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7392 0 : ndr->depth++;
7393 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7394 0 : ndr->depth--;
7395 0 : ndr_print_uint32(ndr, "max_size", r->in.max_size);
7396 0 : ndr->depth--;
7397 : }
7398 2 : if (flags & NDR_OUT) {
7399 2 : ndr_print_struct(ndr, "out", "samr_EnumDomainGroups");
7400 2 : ndr->depth++;
7401 2 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7402 2 : ndr->depth++;
7403 2 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7404 2 : ndr->depth--;
7405 2 : ndr_print_ptr(ndr, "sam", r->out.sam);
7406 2 : ndr->depth++;
7407 2 : ndr_print_ptr(ndr, "sam", *r->out.sam);
7408 2 : ndr->depth++;
7409 2 : if (*r->out.sam) {
7410 2 : ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
7411 : }
7412 2 : ndr->depth--;
7413 2 : ndr->depth--;
7414 2 : ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
7415 2 : ndr->depth++;
7416 2 : ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
7417 2 : ndr->depth--;
7418 2 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
7419 2 : ndr->depth--;
7420 : }
7421 2 : ndr->depth--;
7422 : }
7423 :
7424 1911 : static enum ndr_err_code ndr_push_samr_CreateUser(struct ndr_push *ndr, int flags, const struct samr_CreateUser *r)
7425 : {
7426 1911 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7427 1911 : if (flags & NDR_IN) {
7428 950 : if (r->in.domain_handle == NULL) {
7429 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7430 : }
7431 950 : if (r->in.account_name == NULL) {
7432 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7433 : }
7434 950 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7435 950 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
7436 950 : NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7437 : }
7438 1911 : if (flags & NDR_OUT) {
7439 961 : if (r->out.user_handle == NULL) {
7440 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7441 : }
7442 961 : if (r->out.rid == NULL) {
7443 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7444 : }
7445 961 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
7446 961 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
7447 961 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7448 : }
7449 1911 : return NDR_ERR_SUCCESS;
7450 : }
7451 :
7452 1900 : static enum ndr_err_code ndr_pull_samr_CreateUser(struct ndr_pull *ndr, int flags, struct samr_CreateUser *r)
7453 : {
7454 1900 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
7455 1900 : TALLOC_CTX *_mem_save_account_name_0 = NULL;
7456 1900 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
7457 1900 : TALLOC_CTX *_mem_save_rid_0 = NULL;
7458 1900 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7459 1900 : if (flags & NDR_IN) {
7460 950 : NDR_ZERO_STRUCT(r->out);
7461 :
7462 950 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7463 950 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7464 : }
7465 950 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7466 950 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7467 950 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7468 950 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7469 950 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7470 950 : NDR_PULL_ALLOC(ndr, r->in.account_name);
7471 : }
7472 950 : _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7473 950 : NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
7474 950 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
7475 950 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
7476 950 : NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7477 950 : NDR_PULL_ALLOC(ndr, r->out.user_handle);
7478 950 : NDR_ZERO_STRUCTP(r->out.user_handle);
7479 950 : NDR_PULL_ALLOC(ndr, r->out.rid);
7480 950 : NDR_ZERO_STRUCTP(r->out.rid);
7481 : }
7482 1900 : if (flags & NDR_OUT) {
7483 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7484 : if (r->in.domain_handle == NULL) {
7485 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7486 : NDR_ZERO_STRUCTP(r->in.domain_handle);
7487 : }
7488 : if (r->in.account_name == NULL) {
7489 : NDR_PULL_ALLOC(ndr, r->in.account_name);
7490 : NDR_ZERO_STRUCTP(r->in.account_name);
7491 : }
7492 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7493 950 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7494 11 : NDR_PULL_ALLOC(ndr, r->out.user_handle);
7495 : }
7496 950 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7497 950 : NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
7498 950 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
7499 950 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
7500 950 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7501 11 : NDR_PULL_ALLOC(ndr, r->out.rid);
7502 : }
7503 950 : _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7504 950 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
7505 950 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
7506 950 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
7507 950 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7508 : }
7509 1900 : return NDR_ERR_SUCCESS;
7510 : }
7511 :
7512 22 : _PUBLIC_ void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser *r)
7513 : {
7514 22 : ndr_print_struct(ndr, name, "samr_CreateUser");
7515 22 : if (r == NULL) { ndr_print_null(ndr); return; }
7516 22 : ndr->depth++;
7517 22 : if (flags & NDR_SET_VALUES) {
7518 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7519 : }
7520 22 : if (flags & NDR_IN) {
7521 0 : ndr_print_struct(ndr, "in", "samr_CreateUser");
7522 0 : ndr->depth++;
7523 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7524 0 : ndr->depth++;
7525 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7526 0 : ndr->depth--;
7527 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
7528 0 : ndr->depth++;
7529 0 : ndr_print_lsa_String(ndr, "account_name", r->in.account_name);
7530 0 : ndr->depth--;
7531 0 : ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask);
7532 0 : ndr->depth--;
7533 : }
7534 22 : if (flags & NDR_OUT) {
7535 22 : ndr_print_struct(ndr, "out", "samr_CreateUser");
7536 22 : ndr->depth++;
7537 22 : ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
7538 22 : ndr->depth++;
7539 22 : ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
7540 22 : ndr->depth--;
7541 22 : ndr_print_ptr(ndr, "rid", r->out.rid);
7542 22 : ndr->depth++;
7543 22 : ndr_print_uint32(ndr, "rid", *r->out.rid);
7544 22 : ndr->depth--;
7545 22 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
7546 22 : ndr->depth--;
7547 : }
7548 22 : ndr->depth--;
7549 : }
7550 :
7551 164 : static enum ndr_err_code ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, int flags, const struct samr_EnumDomainUsers *r)
7552 : {
7553 164 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7554 164 : if (flags & NDR_IN) {
7555 79 : if (r->in.domain_handle == NULL) {
7556 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7557 : }
7558 79 : if (r->in.resume_handle == NULL) {
7559 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7560 : }
7561 79 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7562 79 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
7563 79 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags));
7564 79 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
7565 : }
7566 164 : if (flags & NDR_OUT) {
7567 85 : if (r->out.resume_handle == NULL) {
7568 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7569 : }
7570 85 : if (r->out.sam == NULL) {
7571 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7572 : }
7573 85 : if (r->out.num_entries == NULL) {
7574 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7575 : }
7576 85 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
7577 85 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
7578 85 : if (*r->out.sam) {
7579 76 : NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7580 : }
7581 85 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
7582 85 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7583 : }
7584 164 : return NDR_ERR_SUCCESS;
7585 : }
7586 :
7587 164 : static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int flags, struct samr_EnumDomainUsers *r)
7588 : {
7589 : uint32_t _ptr_sam;
7590 164 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
7591 164 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
7592 164 : TALLOC_CTX *_mem_save_sam_0 = NULL;
7593 164 : TALLOC_CTX *_mem_save_sam_1 = NULL;
7594 164 : TALLOC_CTX *_mem_save_num_entries_0 = NULL;
7595 164 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7596 164 : if (flags & NDR_IN) {
7597 85 : NDR_ZERO_STRUCT(r->out);
7598 :
7599 85 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7600 85 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7601 : }
7602 85 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7603 85 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7604 85 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7605 85 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7606 85 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7607 85 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7608 : }
7609 85 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7610 85 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7611 85 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
7612 85 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7613 85 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags));
7614 85 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
7615 85 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7616 85 : *r->out.resume_handle = *r->in.resume_handle;
7617 85 : NDR_PULL_ALLOC(ndr, r->out.sam);
7618 85 : NDR_ZERO_STRUCTP(r->out.sam);
7619 85 : NDR_PULL_ALLOC(ndr, r->out.num_entries);
7620 85 : NDR_ZERO_STRUCTP(r->out.num_entries);
7621 : }
7622 164 : if (flags & NDR_OUT) {
7623 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7624 : if (r->in.domain_handle == NULL) {
7625 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7626 : NDR_ZERO_STRUCTP(r->in.domain_handle);
7627 : }
7628 : if (r->in.resume_handle == NULL) {
7629 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7630 : NDR_ZERO_STRUCTP(r->in.resume_handle);
7631 : }
7632 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7633 79 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7634 60 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7635 : }
7636 79 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7637 79 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7638 79 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7639 79 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7640 79 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7641 60 : NDR_PULL_ALLOC(ndr, r->out.sam);
7642 : }
7643 79 : _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
7644 79 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
7645 79 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
7646 79 : if (_ptr_sam) {
7647 70 : NDR_PULL_ALLOC(ndr, *r->out.sam);
7648 : } else {
7649 9 : *r->out.sam = NULL;
7650 : }
7651 79 : if (*r->out.sam) {
7652 70 : _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
7653 70 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
7654 70 : NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7655 70 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
7656 : }
7657 79 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
7658 79 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7659 60 : NDR_PULL_ALLOC(ndr, r->out.num_entries);
7660 : }
7661 79 : _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
7662 79 : NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
7663 79 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
7664 79 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
7665 79 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7666 : }
7667 164 : return NDR_ERR_SUCCESS;
7668 : }
7669 :
7670 0 : _PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainUsers *r)
7671 : {
7672 0 : ndr_print_struct(ndr, name, "samr_EnumDomainUsers");
7673 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7674 0 : ndr->depth++;
7675 0 : if (flags & NDR_SET_VALUES) {
7676 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7677 : }
7678 0 : if (flags & NDR_IN) {
7679 0 : ndr_print_struct(ndr, "in", "samr_EnumDomainUsers");
7680 0 : ndr->depth++;
7681 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7682 0 : ndr->depth++;
7683 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7684 0 : ndr->depth--;
7685 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7686 0 : ndr->depth++;
7687 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7688 0 : ndr->depth--;
7689 0 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags);
7690 0 : ndr_print_uint32(ndr, "max_size", r->in.max_size);
7691 0 : ndr->depth--;
7692 : }
7693 0 : if (flags & NDR_OUT) {
7694 0 : ndr_print_struct(ndr, "out", "samr_EnumDomainUsers");
7695 0 : ndr->depth++;
7696 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7697 0 : ndr->depth++;
7698 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7699 0 : ndr->depth--;
7700 0 : ndr_print_ptr(ndr, "sam", r->out.sam);
7701 0 : ndr->depth++;
7702 0 : ndr_print_ptr(ndr, "sam", *r->out.sam);
7703 0 : ndr->depth++;
7704 0 : if (*r->out.sam) {
7705 0 : ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
7706 : }
7707 0 : ndr->depth--;
7708 0 : ndr->depth--;
7709 0 : ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
7710 0 : ndr->depth++;
7711 0 : ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
7712 0 : ndr->depth--;
7713 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
7714 0 : ndr->depth--;
7715 : }
7716 0 : ndr->depth--;
7717 : }
7718 :
7719 1812 : static enum ndr_err_code ndr_push_samr_CreateDomAlias(struct ndr_push *ndr, int flags, const struct samr_CreateDomAlias *r)
7720 : {
7721 1812 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7722 1812 : if (flags & NDR_IN) {
7723 906 : if (r->in.domain_handle == NULL) {
7724 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7725 : }
7726 906 : if (r->in.alias_name == NULL) {
7727 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7728 : }
7729 906 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7730 906 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.alias_name));
7731 906 : NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7732 : }
7733 1812 : if (flags & NDR_OUT) {
7734 906 : if (r->out.alias_handle == NULL) {
7735 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7736 : }
7737 906 : if (r->out.rid == NULL) {
7738 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7739 : }
7740 906 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
7741 906 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
7742 906 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7743 : }
7744 1812 : return NDR_ERR_SUCCESS;
7745 : }
7746 :
7747 1812 : static enum ndr_err_code ndr_pull_samr_CreateDomAlias(struct ndr_pull *ndr, int flags, struct samr_CreateDomAlias *r)
7748 : {
7749 1812 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
7750 1812 : TALLOC_CTX *_mem_save_alias_name_0 = NULL;
7751 1812 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
7752 1812 : TALLOC_CTX *_mem_save_rid_0 = NULL;
7753 1812 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7754 1812 : if (flags & NDR_IN) {
7755 906 : NDR_ZERO_STRUCT(r->out);
7756 :
7757 906 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7758 906 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7759 : }
7760 906 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7761 906 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7762 906 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7763 906 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7764 906 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7765 906 : NDR_PULL_ALLOC(ndr, r->in.alias_name);
7766 : }
7767 906 : _mem_save_alias_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7768 906 : NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_name, LIBNDR_FLAG_REF_ALLOC);
7769 906 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.alias_name));
7770 906 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_name_0, LIBNDR_FLAG_REF_ALLOC);
7771 906 : NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7772 906 : NDR_PULL_ALLOC(ndr, r->out.alias_handle);
7773 906 : NDR_ZERO_STRUCTP(r->out.alias_handle);
7774 906 : NDR_PULL_ALLOC(ndr, r->out.rid);
7775 906 : NDR_ZERO_STRUCTP(r->out.rid);
7776 : }
7777 1812 : if (flags & NDR_OUT) {
7778 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7779 : if (r->in.domain_handle == NULL) {
7780 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7781 : NDR_ZERO_STRUCTP(r->in.domain_handle);
7782 : }
7783 : if (r->in.alias_name == NULL) {
7784 : NDR_PULL_ALLOC(ndr, r->in.alias_name);
7785 : NDR_ZERO_STRUCTP(r->in.alias_name);
7786 : }
7787 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7788 906 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7789 0 : NDR_PULL_ALLOC(ndr, r->out.alias_handle);
7790 : }
7791 906 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7792 906 : NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC);
7793 906 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
7794 906 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
7795 906 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7796 0 : NDR_PULL_ALLOC(ndr, r->out.rid);
7797 : }
7798 906 : _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7799 906 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
7800 906 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
7801 906 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
7802 906 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7803 : }
7804 1812 : return NDR_ERR_SUCCESS;
7805 : }
7806 :
7807 0 : _PUBLIC_ void ndr_print_samr_CreateDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomAlias *r)
7808 : {
7809 0 : ndr_print_struct(ndr, name, "samr_CreateDomAlias");
7810 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7811 0 : ndr->depth++;
7812 0 : if (flags & NDR_SET_VALUES) {
7813 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7814 : }
7815 0 : if (flags & NDR_IN) {
7816 0 : ndr_print_struct(ndr, "in", "samr_CreateDomAlias");
7817 0 : ndr->depth++;
7818 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7819 0 : ndr->depth++;
7820 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7821 0 : ndr->depth--;
7822 0 : ndr_print_ptr(ndr, "alias_name", r->in.alias_name);
7823 0 : ndr->depth++;
7824 0 : ndr_print_lsa_String(ndr, "alias_name", r->in.alias_name);
7825 0 : ndr->depth--;
7826 0 : ndr_print_samr_AliasAccessMask(ndr, "access_mask", r->in.access_mask);
7827 0 : ndr->depth--;
7828 : }
7829 0 : if (flags & NDR_OUT) {
7830 0 : ndr_print_struct(ndr, "out", "samr_CreateDomAlias");
7831 0 : ndr->depth++;
7832 0 : ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle);
7833 0 : ndr->depth++;
7834 0 : ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle);
7835 0 : ndr->depth--;
7836 0 : ndr_print_ptr(ndr, "rid", r->out.rid);
7837 0 : ndr->depth++;
7838 0 : ndr_print_uint32(ndr, "rid", *r->out.rid);
7839 0 : ndr->depth--;
7840 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
7841 0 : ndr->depth--;
7842 : }
7843 0 : ndr->depth--;
7844 : }
7845 :
7846 51 : static enum ndr_err_code ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, int flags, const struct samr_EnumDomainAliases *r)
7847 : {
7848 51 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7849 51 : if (flags & NDR_IN) {
7850 22 : if (r->in.domain_handle == NULL) {
7851 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7852 : }
7853 22 : if (r->in.resume_handle == NULL) {
7854 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7855 : }
7856 22 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7857 22 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
7858 22 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
7859 : }
7860 51 : if (flags & NDR_OUT) {
7861 29 : if (r->out.resume_handle == NULL) {
7862 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7863 : }
7864 29 : if (r->out.sam == NULL) {
7865 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7866 : }
7867 29 : if (r->out.num_entries == NULL) {
7868 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7869 : }
7870 29 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
7871 29 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
7872 29 : if (*r->out.sam) {
7873 29 : NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7874 : }
7875 29 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries));
7876 29 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7877 : }
7878 51 : return NDR_ERR_SUCCESS;
7879 : }
7880 :
7881 50 : static enum ndr_err_code ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, int flags, struct samr_EnumDomainAliases *r)
7882 : {
7883 : uint32_t _ptr_sam;
7884 50 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
7885 50 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
7886 50 : TALLOC_CTX *_mem_save_sam_0 = NULL;
7887 50 : TALLOC_CTX *_mem_save_sam_1 = NULL;
7888 50 : TALLOC_CTX *_mem_save_num_entries_0 = NULL;
7889 50 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7890 50 : if (flags & NDR_IN) {
7891 28 : NDR_ZERO_STRUCT(r->out);
7892 :
7893 28 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7894 28 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7895 : }
7896 28 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7897 28 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
7898 28 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
7899 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
7900 28 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7901 28 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7902 : }
7903 28 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7904 28 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7905 28 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
7906 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7907 28 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
7908 28 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7909 28 : *r->out.resume_handle = *r->in.resume_handle;
7910 28 : NDR_PULL_ALLOC(ndr, r->out.sam);
7911 28 : NDR_ZERO_STRUCTP(r->out.sam);
7912 28 : NDR_PULL_ALLOC(ndr, r->out.num_entries);
7913 28 : NDR_ZERO_STRUCTP(r->out.num_entries);
7914 : }
7915 50 : if (flags & NDR_OUT) {
7916 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7917 : if (r->in.domain_handle == NULL) {
7918 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
7919 : NDR_ZERO_STRUCTP(r->in.domain_handle);
7920 : }
7921 : if (r->in.resume_handle == NULL) {
7922 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7923 : NDR_ZERO_STRUCTP(r->in.resume_handle);
7924 : }
7925 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7926 22 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7927 7 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7928 : }
7929 22 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7930 22 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
7931 22 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7932 22 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
7933 22 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7934 7 : NDR_PULL_ALLOC(ndr, r->out.sam);
7935 : }
7936 22 : _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
7937 22 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
7938 22 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
7939 22 : if (_ptr_sam) {
7940 22 : NDR_PULL_ALLOC(ndr, *r->out.sam);
7941 : } else {
7942 0 : *r->out.sam = NULL;
7943 : }
7944 22 : if (*r->out.sam) {
7945 22 : _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
7946 22 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
7947 22 : NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
7948 22 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
7949 : }
7950 22 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
7951 22 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7952 7 : NDR_PULL_ALLOC(ndr, r->out.num_entries);
7953 : }
7954 22 : _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
7955 22 : NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC);
7956 22 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries));
7957 22 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC);
7958 22 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7959 : }
7960 50 : return NDR_ERR_SUCCESS;
7961 : }
7962 :
7963 2 : _PUBLIC_ void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainAliases *r)
7964 : {
7965 2 : ndr_print_struct(ndr, name, "samr_EnumDomainAliases");
7966 2 : if (r == NULL) { ndr_print_null(ndr); return; }
7967 2 : ndr->depth++;
7968 2 : if (flags & NDR_SET_VALUES) {
7969 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7970 : }
7971 2 : if (flags & NDR_IN) {
7972 0 : ndr_print_struct(ndr, "in", "samr_EnumDomainAliases");
7973 0 : ndr->depth++;
7974 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
7975 0 : ndr->depth++;
7976 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
7977 0 : ndr->depth--;
7978 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7979 0 : ndr->depth++;
7980 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7981 0 : ndr->depth--;
7982 0 : ndr_print_uint32(ndr, "max_size", r->in.max_size);
7983 0 : ndr->depth--;
7984 : }
7985 2 : if (flags & NDR_OUT) {
7986 2 : ndr_print_struct(ndr, "out", "samr_EnumDomainAliases");
7987 2 : ndr->depth++;
7988 2 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7989 2 : ndr->depth++;
7990 2 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7991 2 : ndr->depth--;
7992 2 : ndr_print_ptr(ndr, "sam", r->out.sam);
7993 2 : ndr->depth++;
7994 2 : ndr_print_ptr(ndr, "sam", *r->out.sam);
7995 2 : ndr->depth++;
7996 2 : if (*r->out.sam) {
7997 2 : ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
7998 : }
7999 2 : ndr->depth--;
8000 2 : ndr->depth--;
8001 2 : ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
8002 2 : ndr->depth++;
8003 2 : ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
8004 2 : ndr->depth--;
8005 2 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8006 2 : ndr->depth--;
8007 : }
8008 2 : ndr->depth--;
8009 : }
8010 :
8011 391 : static enum ndr_err_code ndr_push_samr_GetAliasMembership(struct ndr_push *ndr, int flags, const struct samr_GetAliasMembership *r)
8012 : {
8013 391 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8014 391 : if (flags & NDR_IN) {
8015 118 : if (r->in.domain_handle == NULL) {
8016 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8017 : }
8018 118 : if (r->in.sids == NULL) {
8019 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8020 : }
8021 118 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8022 118 : NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
8023 : }
8024 391 : if (flags & NDR_OUT) {
8025 273 : if (r->out.rids == NULL) {
8026 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8027 : }
8028 273 : NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
8029 273 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8030 : }
8031 391 : return NDR_ERR_SUCCESS;
8032 : }
8033 :
8034 386 : static enum ndr_err_code ndr_pull_samr_GetAliasMembership(struct ndr_pull *ndr, int flags, struct samr_GetAliasMembership *r)
8035 : {
8036 386 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
8037 386 : TALLOC_CTX *_mem_save_sids_0 = NULL;
8038 386 : TALLOC_CTX *_mem_save_rids_0 = NULL;
8039 386 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8040 386 : if (flags & NDR_IN) {
8041 268 : NDR_ZERO_STRUCT(r->out);
8042 :
8043 268 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8044 268 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8045 : }
8046 268 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8047 268 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
8048 268 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8049 268 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
8050 268 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8051 268 : NDR_PULL_ALLOC(ndr, r->in.sids);
8052 : }
8053 268 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8054 268 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
8055 268 : NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
8056 268 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
8057 268 : NDR_PULL_ALLOC(ndr, r->out.rids);
8058 268 : NDR_ZERO_STRUCTP(r->out.rids);
8059 : }
8060 386 : if (flags & NDR_OUT) {
8061 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8062 : if (r->in.domain_handle == NULL) {
8063 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8064 : NDR_ZERO_STRUCTP(r->in.domain_handle);
8065 : }
8066 : if (r->in.sids == NULL) {
8067 : NDR_PULL_ALLOC(ndr, r->in.sids);
8068 : NDR_ZERO_STRUCTP(r->in.sids);
8069 : }
8070 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8071 118 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8072 91 : NDR_PULL_ALLOC(ndr, r->out.rids);
8073 : }
8074 118 : _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8075 118 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
8076 118 : NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
8077 118 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
8078 118 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8079 : }
8080 386 : return NDR_ERR_SUCCESS;
8081 : }
8082 :
8083 10 : _PUBLIC_ void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetAliasMembership *r)
8084 : {
8085 10 : ndr_print_struct(ndr, name, "samr_GetAliasMembership");
8086 10 : if (r == NULL) { ndr_print_null(ndr); return; }
8087 10 : ndr->depth++;
8088 10 : if (flags & NDR_SET_VALUES) {
8089 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8090 : }
8091 10 : if (flags & NDR_IN) {
8092 0 : ndr_print_struct(ndr, "in", "samr_GetAliasMembership");
8093 0 : ndr->depth++;
8094 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
8095 0 : ndr->depth++;
8096 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
8097 0 : ndr->depth--;
8098 0 : ndr_print_ptr(ndr, "sids", r->in.sids);
8099 0 : ndr->depth++;
8100 0 : ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
8101 0 : ndr->depth--;
8102 0 : ndr->depth--;
8103 : }
8104 10 : if (flags & NDR_OUT) {
8105 10 : ndr_print_struct(ndr, "out", "samr_GetAliasMembership");
8106 10 : ndr->depth++;
8107 10 : ndr_print_ptr(ndr, "rids", r->out.rids);
8108 10 : ndr->depth++;
8109 10 : ndr_print_samr_Ids(ndr, "rids", r->out.rids);
8110 10 : ndr->depth--;
8111 10 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8112 10 : ndr->depth--;
8113 : }
8114 10 : ndr->depth--;
8115 : }
8116 :
8117 5606 : _PUBLIC_ enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int flags, const struct samr_LookupNames *r)
8118 : {
8119 : uint32_t cntr_names_0;
8120 5606 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8121 5606 : if (flags & NDR_IN) {
8122 2165 : if (r->in.domain_handle == NULL) {
8123 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8124 : }
8125 2165 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8126 2165 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
8127 2165 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1000));
8128 2165 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8129 2165 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
8130 4652 : for (cntr_names_0 = 0; cntr_names_0 < (r->in.num_names); cntr_names_0++) {
8131 2487 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
8132 : }
8133 4652 : for (cntr_names_0 = 0; cntr_names_0 < (r->in.num_names); cntr_names_0++) {
8134 2487 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
8135 : }
8136 : }
8137 5606 : if (flags & NDR_OUT) {
8138 3441 : if (r->out.rids == NULL) {
8139 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8140 : }
8141 3441 : if (r->out.types == NULL) {
8142 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8143 : }
8144 3441 : NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
8145 3441 : NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
8146 3441 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8147 : }
8148 5606 : return NDR_ERR_SUCCESS;
8149 : }
8150 :
8151 5508 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r)
8152 : {
8153 5508 : uint32_t size_names_0 = 0;
8154 5508 : uint32_t length_names_0 = 0;
8155 : uint32_t cntr_names_0;
8156 5508 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
8157 5508 : TALLOC_CTX *_mem_save_names_0 = NULL;
8158 5508 : TALLOC_CTX *_mem_save_rids_0 = NULL;
8159 5508 : TALLOC_CTX *_mem_save_types_0 = NULL;
8160 5508 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8161 5508 : if (flags & NDR_IN) {
8162 3343 : NDR_ZERO_STRUCT(r->out);
8163 :
8164 3343 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8165 3343 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8166 : }
8167 3343 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8168 3343 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
8169 3343 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8170 3343 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
8171 3343 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
8172 3343 : if (r->in.num_names > 1000) {
8173 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
8174 : }
8175 3343 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
8176 3343 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.names));
8177 3343 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.names, &size_names_0));
8178 3343 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.names, &length_names_0));
8179 3343 : if (length_names_0 > size_names_0) {
8180 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_names_0, length_names_0);
8181 : }
8182 3343 : NDR_PULL_ALLOC_N(ndr, r->in.names, size_names_0);
8183 3343 : _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
8184 3343 : NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
8185 7008 : for (cntr_names_0 = 0; cntr_names_0 < (length_names_0); cntr_names_0++) {
8186 3665 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
8187 : }
8188 7008 : for (cntr_names_0 = 0; cntr_names_0 < (length_names_0); cntr_names_0++) {
8189 3665 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
8190 : }
8191 3343 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
8192 3343 : NDR_PULL_ALLOC(ndr, r->out.rids);
8193 3343 : NDR_ZERO_STRUCTP(r->out.rids);
8194 3343 : NDR_PULL_ALLOC(ndr, r->out.types);
8195 3343 : NDR_ZERO_STRUCTP(r->out.types);
8196 3343 : if (r->in.names) {
8197 3343 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, 1000));
8198 : }
8199 3343 : if (r->in.names) {
8200 3343 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.names, r->in.num_names));
8201 : }
8202 3598 : for (cntr_names_0 = 0; cntr_names_0 < (length_names_0); cntr_names_0++) {
8203 : }
8204 : }
8205 5508 : if (flags & NDR_OUT) {
8206 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8207 : if (r->in.domain_handle == NULL) {
8208 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8209 : NDR_ZERO_STRUCTP(r->in.domain_handle);
8210 : }
8211 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8212 2165 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8213 303 : NDR_PULL_ALLOC(ndr, r->out.rids);
8214 : }
8215 2165 : _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8216 2165 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
8217 2165 : NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids));
8218 2165 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
8219 2165 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8220 303 : NDR_PULL_ALLOC(ndr, r->out.types);
8221 : }
8222 2165 : _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
8223 2165 : NDR_PULL_SET_MEM_CTX(ndr, r->out.types, LIBNDR_FLAG_REF_ALLOC);
8224 2165 : NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
8225 2165 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, LIBNDR_FLAG_REF_ALLOC);
8226 2165 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8227 : }
8228 5508 : return NDR_ERR_SUCCESS;
8229 : }
8230 :
8231 196 : _PUBLIC_ void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupNames *r)
8232 : {
8233 : uint32_t cntr_names_0;
8234 196 : ndr_print_struct(ndr, name, "samr_LookupNames");
8235 196 : if (r == NULL) { ndr_print_null(ndr); return; }
8236 196 : ndr->depth++;
8237 196 : if (flags & NDR_SET_VALUES) {
8238 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8239 : }
8240 196 : if (flags & NDR_IN) {
8241 0 : ndr_print_struct(ndr, "in", "samr_LookupNames");
8242 0 : ndr->depth++;
8243 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
8244 0 : ndr->depth++;
8245 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
8246 0 : ndr->depth--;
8247 0 : ndr_print_uint32(ndr, "num_names", r->in.num_names);
8248 0 : ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
8249 0 : ndr->depth++;
8250 0 : for (cntr_names_0 = 0; cntr_names_0 < (r->in.num_names); cntr_names_0++) {
8251 0 : ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
8252 : }
8253 0 : ndr->depth--;
8254 0 : ndr->depth--;
8255 : }
8256 196 : if (flags & NDR_OUT) {
8257 196 : ndr_print_struct(ndr, "out", "samr_LookupNames");
8258 196 : ndr->depth++;
8259 196 : ndr_print_ptr(ndr, "rids", r->out.rids);
8260 196 : ndr->depth++;
8261 196 : ndr_print_samr_Ids(ndr, "rids", r->out.rids);
8262 196 : ndr->depth--;
8263 196 : ndr_print_ptr(ndr, "types", r->out.types);
8264 196 : ndr->depth++;
8265 196 : ndr_print_samr_Ids(ndr, "types", r->out.types);
8266 196 : ndr->depth--;
8267 196 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8268 196 : ndr->depth--;
8269 : }
8270 196 : ndr->depth--;
8271 : }
8272 :
8273 298 : static enum ndr_err_code ndr_push_samr_LookupRids(struct ndr_push *ndr, int flags, const struct samr_LookupRids *r)
8274 : {
8275 : uint32_t cntr_rids_0;
8276 298 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8277 298 : if (flags & NDR_IN) {
8278 129 : if (r->in.domain_handle == NULL) {
8279 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8280 : }
8281 129 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8282 129 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_rids));
8283 129 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1000));
8284 129 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8285 129 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_rids));
8286 255 : for (cntr_rids_0 = 0; cntr_rids_0 < (r->in.num_rids); cntr_rids_0++) {
8287 126 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rids[cntr_rids_0]));
8288 : }
8289 : }
8290 298 : if (flags & NDR_OUT) {
8291 169 : if (r->out.names == NULL) {
8292 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8293 : }
8294 169 : if (r->out.types == NULL) {
8295 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8296 : }
8297 169 : NDR_CHECK(ndr_push_lsa_Strings(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
8298 169 : NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
8299 169 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8300 : }
8301 298 : return NDR_ERR_SUCCESS;
8302 : }
8303 :
8304 268 : static enum ndr_err_code ndr_pull_samr_LookupRids(struct ndr_pull *ndr, int flags, struct samr_LookupRids *r)
8305 : {
8306 268 : uint32_t size_rids_0 = 0;
8307 268 : uint32_t length_rids_0 = 0;
8308 : uint32_t cntr_rids_0;
8309 268 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
8310 268 : TALLOC_CTX *_mem_save_rids_0 = NULL;
8311 268 : TALLOC_CTX *_mem_save_names_0 = NULL;
8312 268 : TALLOC_CTX *_mem_save_types_0 = NULL;
8313 268 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8314 268 : if (flags & NDR_IN) {
8315 139 : NDR_ZERO_STRUCT(r->out);
8316 :
8317 139 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8318 139 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8319 : }
8320 139 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8321 139 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
8322 139 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8323 139 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
8324 139 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_rids));
8325 139 : if (r->in.num_rids > 1000) {
8326 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
8327 : }
8328 139 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rids));
8329 139 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rids));
8330 139 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.rids, &size_rids_0));
8331 139 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.rids, &length_rids_0));
8332 139 : if (length_rids_0 > size_rids_0) {
8333 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rids_0, length_rids_0);
8334 : }
8335 139 : NDR_PULL_ALLOC_N(ndr, r->in.rids, size_rids_0);
8336 139 : _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8337 139 : NDR_PULL_SET_MEM_CTX(ndr, r->in.rids, 0);
8338 346 : for (cntr_rids_0 = 0; cntr_rids_0 < (length_rids_0); cntr_rids_0++) {
8339 207 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rids[cntr_rids_0]));
8340 : }
8341 139 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
8342 139 : NDR_PULL_ALLOC(ndr, r->out.names);
8343 139 : NDR_ZERO_STRUCTP(r->out.names);
8344 139 : NDR_PULL_ALLOC(ndr, r->out.types);
8345 139 : NDR_ZERO_STRUCTP(r->out.types);
8346 139 : if (r->in.rids) {
8347 139 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.rids, 1000));
8348 : }
8349 139 : if (r->in.rids) {
8350 139 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.rids, r->in.num_rids));
8351 : }
8352 : }
8353 268 : if (flags & NDR_OUT) {
8354 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8355 : if (r->in.domain_handle == NULL) {
8356 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8357 : NDR_ZERO_STRUCTP(r->in.domain_handle);
8358 : }
8359 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8360 129 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8361 40 : NDR_PULL_ALLOC(ndr, r->out.names);
8362 : }
8363 129 : _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
8364 129 : NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
8365 129 : NDR_CHECK(ndr_pull_lsa_Strings(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
8366 129 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
8367 129 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8368 40 : NDR_PULL_ALLOC(ndr, r->out.types);
8369 : }
8370 129 : _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
8371 129 : NDR_PULL_SET_MEM_CTX(ndr, r->out.types, LIBNDR_FLAG_REF_ALLOC);
8372 129 : NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types));
8373 129 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, LIBNDR_FLAG_REF_ALLOC);
8374 129 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8375 : }
8376 268 : return NDR_ERR_SUCCESS;
8377 : }
8378 :
8379 60 : _PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupRids *r)
8380 : {
8381 : uint32_t cntr_rids_0;
8382 60 : ndr_print_struct(ndr, name, "samr_LookupRids");
8383 60 : if (r == NULL) { ndr_print_null(ndr); return; }
8384 60 : ndr->depth++;
8385 60 : if (flags & NDR_SET_VALUES) {
8386 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8387 : }
8388 60 : if (flags & NDR_IN) {
8389 0 : ndr_print_struct(ndr, "in", "samr_LookupRids");
8390 0 : ndr->depth++;
8391 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
8392 0 : ndr->depth++;
8393 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
8394 0 : ndr->depth--;
8395 0 : ndr_print_uint32(ndr, "num_rids", r->in.num_rids);
8396 0 : ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->in.num_rids);
8397 0 : ndr->depth++;
8398 0 : for (cntr_rids_0 = 0; cntr_rids_0 < (r->in.num_rids); cntr_rids_0++) {
8399 0 : ndr_print_uint32(ndr, "rids", r->in.rids[cntr_rids_0]);
8400 : }
8401 0 : ndr->depth--;
8402 0 : ndr->depth--;
8403 : }
8404 60 : if (flags & NDR_OUT) {
8405 60 : ndr_print_struct(ndr, "out", "samr_LookupRids");
8406 60 : ndr->depth++;
8407 60 : ndr_print_ptr(ndr, "names", r->out.names);
8408 60 : ndr->depth++;
8409 60 : ndr_print_lsa_Strings(ndr, "names", r->out.names);
8410 60 : ndr->depth--;
8411 60 : ndr_print_ptr(ndr, "types", r->out.types);
8412 60 : ndr->depth++;
8413 60 : ndr_print_samr_Ids(ndr, "types", r->out.types);
8414 60 : ndr->depth--;
8415 60 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8416 60 : ndr->depth--;
8417 : }
8418 60 : ndr->depth--;
8419 : }
8420 :
8421 564 : static enum ndr_err_code ndr_push_samr_OpenGroup(struct ndr_push *ndr, int flags, const struct samr_OpenGroup *r)
8422 : {
8423 564 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8424 564 : if (flags & NDR_IN) {
8425 274 : if (r->in.domain_handle == NULL) {
8426 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8427 : }
8428 274 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8429 274 : NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
8430 274 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
8431 : }
8432 564 : if (flags & NDR_OUT) {
8433 290 : if (r->out.group_handle == NULL) {
8434 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8435 : }
8436 290 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
8437 290 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8438 : }
8439 564 : return NDR_ERR_SUCCESS;
8440 : }
8441 :
8442 544 : static enum ndr_err_code ndr_pull_samr_OpenGroup(struct ndr_pull *ndr, int flags, struct samr_OpenGroup *r)
8443 : {
8444 544 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
8445 544 : TALLOC_CTX *_mem_save_group_handle_0 = NULL;
8446 544 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8447 544 : if (flags & NDR_IN) {
8448 274 : NDR_ZERO_STRUCT(r->out);
8449 :
8450 274 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8451 274 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8452 : }
8453 274 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8454 274 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
8455 274 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
8456 274 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
8457 274 : NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
8458 274 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8459 274 : NDR_PULL_ALLOC(ndr, r->out.group_handle);
8460 274 : NDR_ZERO_STRUCTP(r->out.group_handle);
8461 : }
8462 544 : if (flags & NDR_OUT) {
8463 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8464 : if (r->in.domain_handle == NULL) {
8465 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
8466 : NDR_ZERO_STRUCTP(r->in.domain_handle);
8467 : }
8468 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8469 270 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8470 181 : NDR_PULL_ALLOC(ndr, r->out.group_handle);
8471 : }
8472 270 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8473 270 : NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC);
8474 270 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
8475 270 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8476 270 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8477 : }
8478 544 : return NDR_ERR_SUCCESS;
8479 : }
8480 :
8481 40 : _PUBLIC_ void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenGroup *r)
8482 : {
8483 40 : ndr_print_struct(ndr, name, "samr_OpenGroup");
8484 40 : if (r == NULL) { ndr_print_null(ndr); return; }
8485 40 : ndr->depth++;
8486 40 : if (flags & NDR_SET_VALUES) {
8487 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8488 : }
8489 40 : if (flags & NDR_IN) {
8490 0 : ndr_print_struct(ndr, "in", "samr_OpenGroup");
8491 0 : ndr->depth++;
8492 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
8493 0 : ndr->depth++;
8494 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
8495 0 : ndr->depth--;
8496 0 : ndr_print_samr_GroupAccessMask(ndr, "access_mask", r->in.access_mask);
8497 0 : ndr_print_uint32(ndr, "rid", r->in.rid);
8498 0 : ndr->depth--;
8499 : }
8500 40 : if (flags & NDR_OUT) {
8501 40 : ndr_print_struct(ndr, "out", "samr_OpenGroup");
8502 40 : ndr->depth++;
8503 40 : ndr_print_ptr(ndr, "group_handle", r->out.group_handle);
8504 40 : ndr->depth++;
8505 40 : ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle);
8506 40 : ndr->depth--;
8507 40 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8508 40 : ndr->depth--;
8509 : }
8510 40 : ndr->depth--;
8511 : }
8512 :
8513 459 : static enum ndr_err_code ndr_push_samr_QueryGroupInfo(struct ndr_push *ndr, int flags, const struct samr_QueryGroupInfo *r)
8514 : {
8515 459 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8516 459 : if (flags & NDR_IN) {
8517 228 : if (r->in.group_handle == NULL) {
8518 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8519 : }
8520 228 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8521 228 : NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, r->in.level));
8522 : }
8523 459 : if (flags & NDR_OUT) {
8524 231 : if (r->out.info == NULL) {
8525 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8526 : }
8527 231 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
8528 231 : if (*r->out.info) {
8529 231 : NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
8530 231 : NDR_CHECK(ndr_push_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
8531 : }
8532 231 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8533 : }
8534 459 : return NDR_ERR_SUCCESS;
8535 : }
8536 :
8537 456 : static enum ndr_err_code ndr_pull_samr_QueryGroupInfo(struct ndr_pull *ndr, int flags, struct samr_QueryGroupInfo *r)
8538 : {
8539 : uint32_t _ptr_info;
8540 456 : TALLOC_CTX *_mem_save_group_handle_0 = NULL;
8541 456 : TALLOC_CTX *_mem_save_info_0 = NULL;
8542 456 : TALLOC_CTX *_mem_save_info_1 = NULL;
8543 456 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8544 456 : if (flags & NDR_IN) {
8545 228 : NDR_ZERO_STRUCT(r->out);
8546 :
8547 228 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8548 228 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8549 : }
8550 228 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8551 228 : NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8552 228 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8553 228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8554 228 : NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr, NDR_SCALARS, &r->in.level));
8555 228 : NDR_PULL_ALLOC(ndr, r->out.info);
8556 228 : NDR_ZERO_STRUCTP(r->out.info);
8557 : }
8558 456 : if (flags & NDR_OUT) {
8559 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8560 : if (r->in.group_handle == NULL) {
8561 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8562 : NDR_ZERO_STRUCTP(r->in.group_handle);
8563 : }
8564 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8565 228 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8566 13 : NDR_PULL_ALLOC(ndr, r->out.info);
8567 : }
8568 228 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8569 228 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
8570 228 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
8571 228 : if (_ptr_info) {
8572 228 : NDR_PULL_ALLOC(ndr, *r->out.info);
8573 : } else {
8574 0 : *r->out.info = NULL;
8575 : }
8576 228 : if (*r->out.info) {
8577 228 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
8578 228 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
8579 228 : NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
8580 228 : NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
8581 228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
8582 : }
8583 228 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
8584 228 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8585 : }
8586 456 : return NDR_ERR_SUCCESS;
8587 : }
8588 :
8589 6 : _PUBLIC_ void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupInfo *r)
8590 : {
8591 6 : ndr_print_struct(ndr, name, "samr_QueryGroupInfo");
8592 6 : if (r == NULL) { ndr_print_null(ndr); return; }
8593 6 : ndr->depth++;
8594 6 : if (flags & NDR_SET_VALUES) {
8595 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8596 : }
8597 6 : if (flags & NDR_IN) {
8598 0 : ndr_print_struct(ndr, "in", "samr_QueryGroupInfo");
8599 0 : ndr->depth++;
8600 0 : ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8601 0 : ndr->depth++;
8602 0 : ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8603 0 : ndr->depth--;
8604 0 : ndr_print_samr_GroupInfoEnum(ndr, "level", r->in.level);
8605 0 : ndr->depth--;
8606 : }
8607 6 : if (flags & NDR_OUT) {
8608 6 : ndr_print_struct(ndr, "out", "samr_QueryGroupInfo");
8609 6 : ndr->depth++;
8610 6 : ndr_print_ptr(ndr, "info", r->out.info);
8611 6 : ndr->depth++;
8612 6 : ndr_print_ptr(ndr, "info", *r->out.info);
8613 6 : ndr->depth++;
8614 6 : if (*r->out.info) {
8615 6 : ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
8616 6 : ndr_print_samr_GroupInfo(ndr, "info", *r->out.info);
8617 : }
8618 6 : ndr->depth--;
8619 6 : ndr->depth--;
8620 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8621 6 : ndr->depth--;
8622 : }
8623 6 : ndr->depth--;
8624 : }
8625 :
8626 26 : static enum ndr_err_code ndr_push_samr_SetGroupInfo(struct ndr_push *ndr, int flags, const struct samr_SetGroupInfo *r)
8627 : {
8628 26 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8629 26 : if (flags & NDR_IN) {
8630 13 : if (r->in.group_handle == NULL) {
8631 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8632 : }
8633 13 : if (r->in.info == NULL) {
8634 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8635 : }
8636 13 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8637 13 : NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, r->in.level));
8638 13 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
8639 13 : NDR_CHECK(ndr_push_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
8640 : }
8641 26 : if (flags & NDR_OUT) {
8642 13 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8643 : }
8644 26 : return NDR_ERR_SUCCESS;
8645 : }
8646 :
8647 26 : static enum ndr_err_code ndr_pull_samr_SetGroupInfo(struct ndr_pull *ndr, int flags, struct samr_SetGroupInfo *r)
8648 : {
8649 26 : TALLOC_CTX *_mem_save_group_handle_0 = NULL;
8650 26 : TALLOC_CTX *_mem_save_info_0 = NULL;
8651 26 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8652 26 : if (flags & NDR_IN) {
8653 13 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8654 13 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8655 : }
8656 13 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8657 13 : NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8658 13 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8659 13 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8660 13 : NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr, NDR_SCALARS, &r->in.level));
8661 13 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8662 13 : NDR_PULL_ALLOC(ndr, r->in.info);
8663 : }
8664 13 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8665 13 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
8666 13 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
8667 13 : NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
8668 13 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
8669 : }
8670 26 : if (flags & NDR_OUT) {
8671 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8672 : if (r->in.group_handle == NULL) {
8673 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8674 : NDR_ZERO_STRUCTP(r->in.group_handle);
8675 : }
8676 : if (r->in.info == NULL) {
8677 : NDR_PULL_ALLOC(ndr, r->in.info);
8678 : NDR_ZERO_STRUCTP(r->in.info);
8679 : }
8680 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8681 13 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8682 : }
8683 26 : return NDR_ERR_SUCCESS;
8684 : }
8685 :
8686 0 : _PUBLIC_ void ndr_print_samr_SetGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetGroupInfo *r)
8687 : {
8688 0 : ndr_print_struct(ndr, name, "samr_SetGroupInfo");
8689 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8690 0 : ndr->depth++;
8691 0 : if (flags & NDR_SET_VALUES) {
8692 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8693 : }
8694 0 : if (flags & NDR_IN) {
8695 0 : ndr_print_struct(ndr, "in", "samr_SetGroupInfo");
8696 0 : ndr->depth++;
8697 0 : ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8698 0 : ndr->depth++;
8699 0 : ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8700 0 : ndr->depth--;
8701 0 : ndr_print_samr_GroupInfoEnum(ndr, "level", r->in.level);
8702 0 : ndr_print_ptr(ndr, "info", r->in.info);
8703 0 : ndr->depth++;
8704 0 : ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
8705 0 : ndr_print_samr_GroupInfo(ndr, "info", r->in.info);
8706 0 : ndr->depth--;
8707 0 : ndr->depth--;
8708 : }
8709 0 : if (flags & NDR_OUT) {
8710 0 : ndr_print_struct(ndr, "out", "samr_SetGroupInfo");
8711 0 : ndr->depth++;
8712 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8713 0 : ndr->depth--;
8714 : }
8715 0 : ndr->depth--;
8716 : }
8717 :
8718 144 : static enum ndr_err_code ndr_push_samr_AddGroupMember(struct ndr_push *ndr, int flags, const struct samr_AddGroupMember *r)
8719 : {
8720 144 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8721 144 : if (flags & NDR_IN) {
8722 72 : if (r->in.group_handle == NULL) {
8723 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8724 : }
8725 72 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8726 72 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
8727 72 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
8728 : }
8729 144 : if (flags & NDR_OUT) {
8730 72 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8731 : }
8732 144 : return NDR_ERR_SUCCESS;
8733 : }
8734 :
8735 144 : static enum ndr_err_code ndr_pull_samr_AddGroupMember(struct ndr_pull *ndr, int flags, struct samr_AddGroupMember *r)
8736 : {
8737 144 : TALLOC_CTX *_mem_save_group_handle_0 = NULL;
8738 144 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8739 144 : if (flags & NDR_IN) {
8740 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8741 72 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8742 : }
8743 72 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8744 72 : NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8745 72 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8746 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8747 72 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8748 72 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
8749 : }
8750 144 : if (flags & NDR_OUT) {
8751 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8752 : if (r->in.group_handle == NULL) {
8753 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8754 : NDR_ZERO_STRUCTP(r->in.group_handle);
8755 : }
8756 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8757 72 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8758 : }
8759 144 : return NDR_ERR_SUCCESS;
8760 : }
8761 :
8762 0 : _PUBLIC_ void ndr_print_samr_AddGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddGroupMember *r)
8763 : {
8764 0 : ndr_print_struct(ndr, name, "samr_AddGroupMember");
8765 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8766 0 : ndr->depth++;
8767 0 : if (flags & NDR_SET_VALUES) {
8768 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8769 : }
8770 0 : if (flags & NDR_IN) {
8771 0 : ndr_print_struct(ndr, "in", "samr_AddGroupMember");
8772 0 : ndr->depth++;
8773 0 : ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8774 0 : ndr->depth++;
8775 0 : ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8776 0 : ndr->depth--;
8777 0 : ndr_print_uint32(ndr, "rid", r->in.rid);
8778 0 : ndr_print_uint32(ndr, "flags", r->in.flags);
8779 0 : ndr->depth--;
8780 : }
8781 0 : if (flags & NDR_OUT) {
8782 0 : ndr_print_struct(ndr, "out", "samr_AddGroupMember");
8783 0 : ndr->depth++;
8784 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8785 0 : ndr->depth--;
8786 : }
8787 0 : ndr->depth--;
8788 : }
8789 :
8790 1065 : static enum ndr_err_code ndr_push_samr_DeleteDomainGroup(struct ndr_push *ndr, int flags, const struct samr_DeleteDomainGroup *r)
8791 : {
8792 1065 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8793 1065 : if (flags & NDR_IN) {
8794 531 : if (r->in.group_handle == NULL) {
8795 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8796 : }
8797 531 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8798 : }
8799 1065 : if (flags & NDR_OUT) {
8800 534 : if (r->out.group_handle == NULL) {
8801 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8802 : }
8803 534 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
8804 534 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8805 : }
8806 1065 : return NDR_ERR_SUCCESS;
8807 : }
8808 :
8809 1062 : static enum ndr_err_code ndr_pull_samr_DeleteDomainGroup(struct ndr_pull *ndr, int flags, struct samr_DeleteDomainGroup *r)
8810 : {
8811 1062 : TALLOC_CTX *_mem_save_group_handle_0 = NULL;
8812 1062 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8813 1062 : if (flags & NDR_IN) {
8814 531 : NDR_ZERO_STRUCT(r->out);
8815 :
8816 531 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8817 531 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8818 : }
8819 531 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8820 531 : NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8821 531 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8822 531 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8823 531 : NDR_PULL_ALLOC(ndr, r->out.group_handle);
8824 531 : *r->out.group_handle = *r->in.group_handle;
8825 : }
8826 1062 : if (flags & NDR_OUT) {
8827 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8828 : if (r->in.group_handle == NULL) {
8829 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8830 : NDR_ZERO_STRUCTP(r->in.group_handle);
8831 : }
8832 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8833 531 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8834 74 : NDR_PULL_ALLOC(ndr, r->out.group_handle);
8835 : }
8836 531 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8837 531 : NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC);
8838 531 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle));
8839 531 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8840 531 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8841 : }
8842 1062 : return NDR_ERR_SUCCESS;
8843 : }
8844 :
8845 6 : _PUBLIC_ void ndr_print_samr_DeleteDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomainGroup *r)
8846 : {
8847 6 : ndr_print_struct(ndr, name, "samr_DeleteDomainGroup");
8848 6 : if (r == NULL) { ndr_print_null(ndr); return; }
8849 6 : ndr->depth++;
8850 6 : if (flags & NDR_SET_VALUES) {
8851 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8852 : }
8853 6 : if (flags & NDR_IN) {
8854 0 : ndr_print_struct(ndr, "in", "samr_DeleteDomainGroup");
8855 0 : ndr->depth++;
8856 0 : ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8857 0 : ndr->depth++;
8858 0 : ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8859 0 : ndr->depth--;
8860 0 : ndr->depth--;
8861 : }
8862 6 : if (flags & NDR_OUT) {
8863 6 : ndr_print_struct(ndr, "out", "samr_DeleteDomainGroup");
8864 6 : ndr->depth++;
8865 6 : ndr_print_ptr(ndr, "group_handle", r->out.group_handle);
8866 6 : ndr->depth++;
8867 6 : ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle);
8868 6 : ndr->depth--;
8869 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8870 6 : ndr->depth--;
8871 : }
8872 6 : ndr->depth--;
8873 : }
8874 :
8875 148 : static enum ndr_err_code ndr_push_samr_DeleteGroupMember(struct ndr_push *ndr, int flags, const struct samr_DeleteGroupMember *r)
8876 : {
8877 148 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8878 148 : if (flags & NDR_IN) {
8879 74 : if (r->in.group_handle == NULL) {
8880 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8881 : }
8882 74 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8883 74 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
8884 : }
8885 148 : if (flags & NDR_OUT) {
8886 74 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8887 : }
8888 148 : return NDR_ERR_SUCCESS;
8889 : }
8890 :
8891 148 : static enum ndr_err_code ndr_pull_samr_DeleteGroupMember(struct ndr_pull *ndr, int flags, struct samr_DeleteGroupMember *r)
8892 : {
8893 148 : TALLOC_CTX *_mem_save_group_handle_0 = NULL;
8894 148 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8895 148 : if (flags & NDR_IN) {
8896 74 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8897 74 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8898 : }
8899 74 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8900 74 : NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8901 74 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8902 74 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8903 74 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
8904 : }
8905 148 : if (flags & NDR_OUT) {
8906 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8907 : if (r->in.group_handle == NULL) {
8908 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8909 : NDR_ZERO_STRUCTP(r->in.group_handle);
8910 : }
8911 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8912 74 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8913 : }
8914 148 : return NDR_ERR_SUCCESS;
8915 : }
8916 :
8917 0 : _PUBLIC_ void ndr_print_samr_DeleteGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteGroupMember *r)
8918 : {
8919 0 : ndr_print_struct(ndr, name, "samr_DeleteGroupMember");
8920 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8921 0 : ndr->depth++;
8922 0 : if (flags & NDR_SET_VALUES) {
8923 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8924 : }
8925 0 : if (flags & NDR_IN) {
8926 0 : ndr_print_struct(ndr, "in", "samr_DeleteGroupMember");
8927 0 : ndr->depth++;
8928 0 : ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
8929 0 : ndr->depth++;
8930 0 : ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
8931 0 : ndr->depth--;
8932 0 : ndr_print_uint32(ndr, "rid", r->in.rid);
8933 0 : ndr->depth--;
8934 : }
8935 0 : if (flags & NDR_OUT) {
8936 0 : ndr_print_struct(ndr, "out", "samr_DeleteGroupMember");
8937 0 : ndr->depth++;
8938 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
8939 0 : ndr->depth--;
8940 : }
8941 0 : ndr->depth--;
8942 : }
8943 :
8944 355 : static enum ndr_err_code ndr_push_samr_QueryGroupMember(struct ndr_push *ndr, int flags, const struct samr_QueryGroupMember *r)
8945 : {
8946 355 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8947 355 : if (flags & NDR_IN) {
8948 171 : if (r->in.group_handle == NULL) {
8949 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8950 : }
8951 171 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8952 : }
8953 355 : if (flags & NDR_OUT) {
8954 184 : if (r->out.rids == NULL) {
8955 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8956 : }
8957 184 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rids));
8958 184 : if (*r->out.rids) {
8959 184 : NDR_CHECK(ndr_push_samr_RidAttrArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
8960 : }
8961 184 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8962 : }
8963 355 : return NDR_ERR_SUCCESS;
8964 : }
8965 :
8966 342 : static enum ndr_err_code ndr_pull_samr_QueryGroupMember(struct ndr_pull *ndr, int flags, struct samr_QueryGroupMember *r)
8967 : {
8968 : uint32_t _ptr_rids;
8969 342 : TALLOC_CTX *_mem_save_group_handle_0 = NULL;
8970 342 : TALLOC_CTX *_mem_save_rids_0 = NULL;
8971 342 : TALLOC_CTX *_mem_save_rids_1 = NULL;
8972 342 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8973 342 : if (flags & NDR_IN) {
8974 171 : NDR_ZERO_STRUCT(r->out);
8975 :
8976 171 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8977 171 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8978 : }
8979 171 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8980 171 : NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
8981 171 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
8982 171 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
8983 171 : NDR_PULL_ALLOC(ndr, r->out.rids);
8984 171 : NDR_ZERO_STRUCTP(r->out.rids);
8985 : }
8986 342 : if (flags & NDR_OUT) {
8987 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8988 : if (r->in.group_handle == NULL) {
8989 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
8990 : NDR_ZERO_STRUCTP(r->in.group_handle);
8991 : }
8992 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8993 171 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8994 92 : NDR_PULL_ALLOC(ndr, r->out.rids);
8995 : }
8996 171 : _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8997 171 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
8998 171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
8999 171 : if (_ptr_rids) {
9000 171 : NDR_PULL_ALLOC(ndr, *r->out.rids);
9001 : } else {
9002 0 : *r->out.rids = NULL;
9003 : }
9004 171 : if (*r->out.rids) {
9005 171 : _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
9006 171 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, 0);
9007 171 : NDR_CHECK(ndr_pull_samr_RidAttrArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
9008 171 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
9009 : }
9010 171 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
9011 171 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9012 : }
9013 342 : return NDR_ERR_SUCCESS;
9014 : }
9015 :
9016 26 : _PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupMember *r)
9017 : {
9018 26 : ndr_print_struct(ndr, name, "samr_QueryGroupMember");
9019 26 : if (r == NULL) { ndr_print_null(ndr); return; }
9020 26 : ndr->depth++;
9021 26 : if (flags & NDR_SET_VALUES) {
9022 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9023 : }
9024 26 : if (flags & NDR_IN) {
9025 0 : ndr_print_struct(ndr, "in", "samr_QueryGroupMember");
9026 0 : ndr->depth++;
9027 0 : ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
9028 0 : ndr->depth++;
9029 0 : ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
9030 0 : ndr->depth--;
9031 0 : ndr->depth--;
9032 : }
9033 26 : if (flags & NDR_OUT) {
9034 26 : ndr_print_struct(ndr, "out", "samr_QueryGroupMember");
9035 26 : ndr->depth++;
9036 26 : ndr_print_ptr(ndr, "rids", r->out.rids);
9037 26 : ndr->depth++;
9038 26 : ndr_print_ptr(ndr, "rids", *r->out.rids);
9039 26 : ndr->depth++;
9040 26 : if (*r->out.rids) {
9041 26 : ndr_print_samr_RidAttrArray(ndr, "rids", *r->out.rids);
9042 : }
9043 26 : ndr->depth--;
9044 26 : ndr->depth--;
9045 26 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9046 26 : ndr->depth--;
9047 : }
9048 26 : ndr->depth--;
9049 : }
9050 :
9051 0 : static enum ndr_err_code ndr_push_samr_SetMemberAttributesOfGroup(struct ndr_push *ndr, int flags, const struct samr_SetMemberAttributesOfGroup *r)
9052 : {
9053 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9054 0 : if (flags & NDR_IN) {
9055 0 : if (r->in.group_handle == NULL) {
9056 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9057 : }
9058 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
9059 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
9060 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
9061 : }
9062 0 : if (flags & NDR_OUT) {
9063 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9064 : }
9065 0 : return NDR_ERR_SUCCESS;
9066 : }
9067 :
9068 0 : static enum ndr_err_code ndr_pull_samr_SetMemberAttributesOfGroup(struct ndr_pull *ndr, int flags, struct samr_SetMemberAttributesOfGroup *r)
9069 : {
9070 0 : TALLOC_CTX *_mem_save_group_handle_0 = NULL;
9071 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9072 0 : if (flags & NDR_IN) {
9073 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9074 0 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
9075 : }
9076 0 : _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9077 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC);
9078 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle));
9079 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC);
9080 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
9081 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
9082 : }
9083 0 : if (flags & NDR_OUT) {
9084 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9085 : if (r->in.group_handle == NULL) {
9086 : NDR_PULL_ALLOC(ndr, r->in.group_handle);
9087 : NDR_ZERO_STRUCTP(r->in.group_handle);
9088 : }
9089 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9090 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9091 : }
9092 0 : return NDR_ERR_SUCCESS;
9093 : }
9094 :
9095 0 : _PUBLIC_ void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetMemberAttributesOfGroup *r)
9096 : {
9097 0 : ndr_print_struct(ndr, name, "samr_SetMemberAttributesOfGroup");
9098 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9099 0 : ndr->depth++;
9100 0 : if (flags & NDR_SET_VALUES) {
9101 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9102 : }
9103 0 : if (flags & NDR_IN) {
9104 0 : ndr_print_struct(ndr, "in", "samr_SetMemberAttributesOfGroup");
9105 0 : ndr->depth++;
9106 0 : ndr_print_ptr(ndr, "group_handle", r->in.group_handle);
9107 0 : ndr->depth++;
9108 0 : ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle);
9109 0 : ndr->depth--;
9110 0 : ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
9111 0 : ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
9112 0 : ndr->depth--;
9113 : }
9114 0 : if (flags & NDR_OUT) {
9115 0 : ndr_print_struct(ndr, "out", "samr_SetMemberAttributesOfGroup");
9116 0 : ndr->depth++;
9117 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9118 0 : ndr->depth--;
9119 : }
9120 0 : ndr->depth--;
9121 : }
9122 :
9123 158 : static enum ndr_err_code ndr_push_samr_OpenAlias(struct ndr_push *ndr, int flags, const struct samr_OpenAlias *r)
9124 : {
9125 158 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9126 158 : if (flags & NDR_IN) {
9127 79 : if (r->in.domain_handle == NULL) {
9128 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9129 : }
9130 79 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9131 79 : NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
9132 79 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
9133 : }
9134 158 : if (flags & NDR_OUT) {
9135 79 : if (r->out.alias_handle == NULL) {
9136 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9137 : }
9138 79 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
9139 79 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9140 : }
9141 158 : return NDR_ERR_SUCCESS;
9142 : }
9143 :
9144 158 : static enum ndr_err_code ndr_pull_samr_OpenAlias(struct ndr_pull *ndr, int flags, struct samr_OpenAlias *r)
9145 : {
9146 158 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
9147 158 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
9148 158 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9149 158 : if (flags & NDR_IN) {
9150 79 : NDR_ZERO_STRUCT(r->out);
9151 :
9152 79 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9153 79 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9154 : }
9155 79 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9156 79 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9157 79 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9158 79 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9159 79 : NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
9160 79 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
9161 79 : NDR_PULL_ALLOC(ndr, r->out.alias_handle);
9162 79 : NDR_ZERO_STRUCTP(r->out.alias_handle);
9163 : }
9164 158 : if (flags & NDR_OUT) {
9165 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9166 : if (r->in.domain_handle == NULL) {
9167 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9168 : NDR_ZERO_STRUCTP(r->in.domain_handle);
9169 : }
9170 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9171 79 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9172 0 : NDR_PULL_ALLOC(ndr, r->out.alias_handle);
9173 : }
9174 79 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9175 79 : NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC);
9176 79 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
9177 79 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
9178 79 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9179 : }
9180 158 : return NDR_ERR_SUCCESS;
9181 : }
9182 :
9183 0 : _PUBLIC_ void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenAlias *r)
9184 : {
9185 0 : ndr_print_struct(ndr, name, "samr_OpenAlias");
9186 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9187 0 : ndr->depth++;
9188 0 : if (flags & NDR_SET_VALUES) {
9189 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9190 : }
9191 0 : if (flags & NDR_IN) {
9192 0 : ndr_print_struct(ndr, "in", "samr_OpenAlias");
9193 0 : ndr->depth++;
9194 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
9195 0 : ndr->depth++;
9196 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
9197 0 : ndr->depth--;
9198 0 : ndr_print_samr_AliasAccessMask(ndr, "access_mask", r->in.access_mask);
9199 0 : ndr_print_uint32(ndr, "rid", r->in.rid);
9200 0 : ndr->depth--;
9201 : }
9202 0 : if (flags & NDR_OUT) {
9203 0 : ndr_print_struct(ndr, "out", "samr_OpenAlias");
9204 0 : ndr->depth++;
9205 0 : ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle);
9206 0 : ndr->depth++;
9207 0 : ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle);
9208 0 : ndr->depth--;
9209 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9210 0 : ndr->depth--;
9211 : }
9212 0 : ndr->depth--;
9213 : }
9214 :
9215 504 : static enum ndr_err_code ndr_push_samr_QueryAliasInfo(struct ndr_push *ndr, int flags, const struct samr_QueryAliasInfo *r)
9216 : {
9217 504 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9218 504 : if (flags & NDR_IN) {
9219 252 : if (r->in.alias_handle == NULL) {
9220 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9221 : }
9222 252 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9223 252 : NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, r->in.level));
9224 : }
9225 504 : if (flags & NDR_OUT) {
9226 252 : if (r->out.info == NULL) {
9227 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9228 : }
9229 252 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9230 252 : if (*r->out.info) {
9231 252 : NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9232 252 : NDR_CHECK(ndr_push_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9233 : }
9234 252 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9235 : }
9236 504 : return NDR_ERR_SUCCESS;
9237 : }
9238 :
9239 504 : static enum ndr_err_code ndr_pull_samr_QueryAliasInfo(struct ndr_pull *ndr, int flags, struct samr_QueryAliasInfo *r)
9240 : {
9241 : uint32_t _ptr_info;
9242 504 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
9243 504 : TALLOC_CTX *_mem_save_info_0 = NULL;
9244 504 : TALLOC_CTX *_mem_save_info_1 = NULL;
9245 504 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9246 504 : if (flags & NDR_IN) {
9247 252 : NDR_ZERO_STRUCT(r->out);
9248 :
9249 252 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9250 252 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9251 : }
9252 252 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9253 252 : NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
9254 252 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9255 252 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
9256 252 : NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9257 252 : NDR_PULL_ALLOC(ndr, r->out.info);
9258 252 : NDR_ZERO_STRUCTP(r->out.info);
9259 : }
9260 504 : if (flags & NDR_OUT) {
9261 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9262 : if (r->in.alias_handle == NULL) {
9263 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9264 : NDR_ZERO_STRUCTP(r->in.alias_handle);
9265 : }
9266 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9267 252 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9268 0 : NDR_PULL_ALLOC(ndr, r->out.info);
9269 : }
9270 252 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9271 252 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9272 252 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9273 252 : if (_ptr_info) {
9274 252 : NDR_PULL_ALLOC(ndr, *r->out.info);
9275 : } else {
9276 0 : *r->out.info = NULL;
9277 : }
9278 252 : if (*r->out.info) {
9279 252 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9280 252 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9281 252 : NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9282 252 : NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9283 252 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9284 : }
9285 252 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9286 252 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9287 : }
9288 504 : return NDR_ERR_SUCCESS;
9289 : }
9290 :
9291 0 : _PUBLIC_ void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryAliasInfo *r)
9292 : {
9293 0 : ndr_print_struct(ndr, name, "samr_QueryAliasInfo");
9294 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9295 0 : ndr->depth++;
9296 0 : if (flags & NDR_SET_VALUES) {
9297 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9298 : }
9299 0 : if (flags & NDR_IN) {
9300 0 : ndr_print_struct(ndr, "in", "samr_QueryAliasInfo");
9301 0 : ndr->depth++;
9302 0 : ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
9303 0 : ndr->depth++;
9304 0 : ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
9305 0 : ndr->depth--;
9306 0 : ndr_print_samr_AliasInfoEnum(ndr, "level", r->in.level);
9307 0 : ndr->depth--;
9308 : }
9309 0 : if (flags & NDR_OUT) {
9310 0 : ndr_print_struct(ndr, "out", "samr_QueryAliasInfo");
9311 0 : ndr->depth++;
9312 0 : ndr_print_ptr(ndr, "info", r->out.info);
9313 0 : ndr->depth++;
9314 0 : ndr_print_ptr(ndr, "info", *r->out.info);
9315 0 : ndr->depth++;
9316 0 : if (*r->out.info) {
9317 0 : ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9318 0 : ndr_print_samr_AliasInfo(ndr, "info", *r->out.info);
9319 : }
9320 0 : ndr->depth--;
9321 0 : ndr->depth--;
9322 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9323 0 : ndr->depth--;
9324 : }
9325 0 : ndr->depth--;
9326 : }
9327 :
9328 12 : static enum ndr_err_code ndr_push_samr_SetAliasInfo(struct ndr_push *ndr, int flags, const struct samr_SetAliasInfo *r)
9329 : {
9330 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9331 12 : if (flags & NDR_IN) {
9332 6 : if (r->in.alias_handle == NULL) {
9333 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9334 : }
9335 6 : if (r->in.info == NULL) {
9336 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9337 : }
9338 6 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9339 6 : NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, r->in.level));
9340 6 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9341 6 : NDR_CHECK(ndr_push_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9342 : }
9343 12 : if (flags & NDR_OUT) {
9344 6 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9345 : }
9346 12 : return NDR_ERR_SUCCESS;
9347 : }
9348 :
9349 12 : static enum ndr_err_code ndr_pull_samr_SetAliasInfo(struct ndr_pull *ndr, int flags, struct samr_SetAliasInfo *r)
9350 : {
9351 12 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
9352 12 : TALLOC_CTX *_mem_save_info_0 = NULL;
9353 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9354 12 : if (flags & NDR_IN) {
9355 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9356 6 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9357 : }
9358 6 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9359 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
9360 6 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9361 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
9362 6 : NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9363 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9364 6 : NDR_PULL_ALLOC(ndr, r->in.info);
9365 : }
9366 6 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9367 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
9368 6 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9369 6 : NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9370 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9371 : }
9372 12 : if (flags & NDR_OUT) {
9373 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9374 : if (r->in.alias_handle == NULL) {
9375 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9376 : NDR_ZERO_STRUCTP(r->in.alias_handle);
9377 : }
9378 : if (r->in.info == NULL) {
9379 : NDR_PULL_ALLOC(ndr, r->in.info);
9380 : NDR_ZERO_STRUCTP(r->in.info);
9381 : }
9382 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9383 6 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9384 : }
9385 12 : return NDR_ERR_SUCCESS;
9386 : }
9387 :
9388 0 : _PUBLIC_ void ndr_print_samr_SetAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetAliasInfo *r)
9389 : {
9390 0 : ndr_print_struct(ndr, name, "samr_SetAliasInfo");
9391 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9392 0 : ndr->depth++;
9393 0 : if (flags & NDR_SET_VALUES) {
9394 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9395 : }
9396 0 : if (flags & NDR_IN) {
9397 0 : ndr_print_struct(ndr, "in", "samr_SetAliasInfo");
9398 0 : ndr->depth++;
9399 0 : ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
9400 0 : ndr->depth++;
9401 0 : ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
9402 0 : ndr->depth--;
9403 0 : ndr_print_samr_AliasInfoEnum(ndr, "level", r->in.level);
9404 0 : ndr_print_ptr(ndr, "info", r->in.info);
9405 0 : ndr->depth++;
9406 0 : ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9407 0 : ndr_print_samr_AliasInfo(ndr, "info", r->in.info);
9408 0 : ndr->depth--;
9409 0 : ndr->depth--;
9410 : }
9411 0 : if (flags & NDR_OUT) {
9412 0 : ndr_print_struct(ndr, "out", "samr_SetAliasInfo");
9413 0 : ndr->depth++;
9414 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9415 0 : ndr->depth--;
9416 : }
9417 0 : ndr->depth--;
9418 : }
9419 :
9420 906 : static enum ndr_err_code ndr_push_samr_DeleteDomAlias(struct ndr_push *ndr, int flags, const struct samr_DeleteDomAlias *r)
9421 : {
9422 906 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9423 906 : if (flags & NDR_IN) {
9424 453 : if (r->in.alias_handle == NULL) {
9425 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9426 : }
9427 453 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9428 : }
9429 906 : if (flags & NDR_OUT) {
9430 453 : if (r->out.alias_handle == NULL) {
9431 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9432 : }
9433 453 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
9434 453 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9435 : }
9436 906 : return NDR_ERR_SUCCESS;
9437 : }
9438 :
9439 906 : static enum ndr_err_code ndr_pull_samr_DeleteDomAlias(struct ndr_pull *ndr, int flags, struct samr_DeleteDomAlias *r)
9440 : {
9441 906 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
9442 906 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9443 906 : if (flags & NDR_IN) {
9444 453 : NDR_ZERO_STRUCT(r->out);
9445 :
9446 453 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9447 453 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9448 : }
9449 453 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9450 453 : NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
9451 453 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9452 453 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
9453 453 : NDR_PULL_ALLOC(ndr, r->out.alias_handle);
9454 453 : *r->out.alias_handle = *r->in.alias_handle;
9455 : }
9456 906 : if (flags & NDR_OUT) {
9457 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9458 : if (r->in.alias_handle == NULL) {
9459 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9460 : NDR_ZERO_STRUCTP(r->in.alias_handle);
9461 : }
9462 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9463 453 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9464 0 : NDR_PULL_ALLOC(ndr, r->out.alias_handle);
9465 : }
9466 453 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9467 453 : NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC);
9468 453 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle));
9469 453 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
9470 453 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9471 : }
9472 906 : return NDR_ERR_SUCCESS;
9473 : }
9474 :
9475 0 : _PUBLIC_ void ndr_print_samr_DeleteDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomAlias *r)
9476 : {
9477 0 : ndr_print_struct(ndr, name, "samr_DeleteDomAlias");
9478 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9479 0 : ndr->depth++;
9480 0 : if (flags & NDR_SET_VALUES) {
9481 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9482 : }
9483 0 : if (flags & NDR_IN) {
9484 0 : ndr_print_struct(ndr, "in", "samr_DeleteDomAlias");
9485 0 : ndr->depth++;
9486 0 : ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
9487 0 : ndr->depth++;
9488 0 : ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
9489 0 : ndr->depth--;
9490 0 : ndr->depth--;
9491 : }
9492 0 : if (flags & NDR_OUT) {
9493 0 : ndr_print_struct(ndr, "out", "samr_DeleteDomAlias");
9494 0 : ndr->depth++;
9495 0 : ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle);
9496 0 : ndr->depth++;
9497 0 : ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle);
9498 0 : ndr->depth--;
9499 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9500 0 : ndr->depth--;
9501 : }
9502 0 : ndr->depth--;
9503 : }
9504 :
9505 6 : static enum ndr_err_code ndr_push_samr_AddAliasMember(struct ndr_push *ndr, int flags, const struct samr_AddAliasMember *r)
9506 : {
9507 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9508 6 : if (flags & NDR_IN) {
9509 3 : if (r->in.alias_handle == NULL) {
9510 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9511 : }
9512 3 : if (r->in.sid == NULL) {
9513 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9514 : }
9515 3 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9516 3 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
9517 : }
9518 6 : if (flags & NDR_OUT) {
9519 3 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9520 : }
9521 6 : return NDR_ERR_SUCCESS;
9522 : }
9523 :
9524 6 : static enum ndr_err_code ndr_pull_samr_AddAliasMember(struct ndr_pull *ndr, int flags, struct samr_AddAliasMember *r)
9525 : {
9526 6 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
9527 6 : TALLOC_CTX *_mem_save_sid_0 = NULL;
9528 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9529 6 : if (flags & NDR_IN) {
9530 3 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9531 3 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9532 : }
9533 3 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9534 3 : NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
9535 3 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9536 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
9537 3 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9538 3 : NDR_PULL_ALLOC(ndr, r->in.sid);
9539 : }
9540 3 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9541 3 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
9542 3 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
9543 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
9544 : }
9545 6 : if (flags & NDR_OUT) {
9546 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9547 : if (r->in.alias_handle == NULL) {
9548 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9549 : NDR_ZERO_STRUCTP(r->in.alias_handle);
9550 : }
9551 : if (r->in.sid == NULL) {
9552 : NDR_PULL_ALLOC(ndr, r->in.sid);
9553 : NDR_ZERO_STRUCTP(r->in.sid);
9554 : }
9555 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9556 3 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9557 : }
9558 6 : return NDR_ERR_SUCCESS;
9559 : }
9560 :
9561 0 : _PUBLIC_ void ndr_print_samr_AddAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddAliasMember *r)
9562 : {
9563 0 : ndr_print_struct(ndr, name, "samr_AddAliasMember");
9564 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9565 0 : ndr->depth++;
9566 0 : if (flags & NDR_SET_VALUES) {
9567 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9568 : }
9569 0 : if (flags & NDR_IN) {
9570 0 : ndr_print_struct(ndr, "in", "samr_AddAliasMember");
9571 0 : ndr->depth++;
9572 0 : ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
9573 0 : ndr->depth++;
9574 0 : ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
9575 0 : ndr->depth--;
9576 0 : ndr_print_ptr(ndr, "sid", r->in.sid);
9577 0 : ndr->depth++;
9578 0 : ndr_print_dom_sid2(ndr, "sid", r->in.sid);
9579 0 : ndr->depth--;
9580 0 : ndr->depth--;
9581 : }
9582 0 : if (flags & NDR_OUT) {
9583 0 : ndr_print_struct(ndr, "out", "samr_AddAliasMember");
9584 0 : ndr->depth++;
9585 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9586 0 : ndr->depth--;
9587 : }
9588 0 : ndr->depth--;
9589 : }
9590 :
9591 6 : static enum ndr_err_code ndr_push_samr_DeleteAliasMember(struct ndr_push *ndr, int flags, const struct samr_DeleteAliasMember *r)
9592 : {
9593 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9594 6 : if (flags & NDR_IN) {
9595 3 : if (r->in.alias_handle == NULL) {
9596 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9597 : }
9598 3 : if (r->in.sid == NULL) {
9599 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9600 : }
9601 3 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9602 3 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
9603 : }
9604 6 : if (flags & NDR_OUT) {
9605 3 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9606 : }
9607 6 : return NDR_ERR_SUCCESS;
9608 : }
9609 :
9610 6 : static enum ndr_err_code ndr_pull_samr_DeleteAliasMember(struct ndr_pull *ndr, int flags, struct samr_DeleteAliasMember *r)
9611 : {
9612 6 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
9613 6 : TALLOC_CTX *_mem_save_sid_0 = NULL;
9614 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9615 6 : if (flags & NDR_IN) {
9616 3 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9617 3 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9618 : }
9619 3 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9620 3 : NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
9621 3 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9622 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
9623 3 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9624 3 : NDR_PULL_ALLOC(ndr, r->in.sid);
9625 : }
9626 3 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9627 3 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
9628 3 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
9629 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
9630 : }
9631 6 : if (flags & NDR_OUT) {
9632 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9633 : if (r->in.alias_handle == NULL) {
9634 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9635 : NDR_ZERO_STRUCTP(r->in.alias_handle);
9636 : }
9637 : if (r->in.sid == NULL) {
9638 : NDR_PULL_ALLOC(ndr, r->in.sid);
9639 : NDR_ZERO_STRUCTP(r->in.sid);
9640 : }
9641 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9642 3 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9643 : }
9644 6 : return NDR_ERR_SUCCESS;
9645 : }
9646 :
9647 0 : _PUBLIC_ void ndr_print_samr_DeleteAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteAliasMember *r)
9648 : {
9649 0 : ndr_print_struct(ndr, name, "samr_DeleteAliasMember");
9650 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9651 0 : ndr->depth++;
9652 0 : if (flags & NDR_SET_VALUES) {
9653 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9654 : }
9655 0 : if (flags & NDR_IN) {
9656 0 : ndr_print_struct(ndr, "in", "samr_DeleteAliasMember");
9657 0 : ndr->depth++;
9658 0 : ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
9659 0 : ndr->depth++;
9660 0 : ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
9661 0 : ndr->depth--;
9662 0 : ndr_print_ptr(ndr, "sid", r->in.sid);
9663 0 : ndr->depth++;
9664 0 : ndr_print_dom_sid2(ndr, "sid", r->in.sid);
9665 0 : ndr->depth--;
9666 0 : ndr->depth--;
9667 : }
9668 0 : if (flags & NDR_OUT) {
9669 0 : ndr_print_struct(ndr, "out", "samr_DeleteAliasMember");
9670 0 : ndr->depth++;
9671 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9672 0 : ndr->depth--;
9673 : }
9674 0 : ndr->depth--;
9675 : }
9676 :
9677 158 : static enum ndr_err_code ndr_push_samr_GetMembersInAlias(struct ndr_push *ndr, int flags, const struct samr_GetMembersInAlias *r)
9678 : {
9679 158 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9680 158 : if (flags & NDR_IN) {
9681 79 : if (r->in.alias_handle == NULL) {
9682 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9683 : }
9684 79 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9685 : }
9686 158 : if (flags & NDR_OUT) {
9687 79 : if (r->out.sids == NULL) {
9688 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9689 : }
9690 79 : NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
9691 79 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9692 : }
9693 158 : return NDR_ERR_SUCCESS;
9694 : }
9695 :
9696 158 : static enum ndr_err_code ndr_pull_samr_GetMembersInAlias(struct ndr_pull *ndr, int flags, struct samr_GetMembersInAlias *r)
9697 : {
9698 158 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
9699 158 : TALLOC_CTX *_mem_save_sids_0 = NULL;
9700 158 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9701 158 : if (flags & NDR_IN) {
9702 79 : NDR_ZERO_STRUCT(r->out);
9703 :
9704 79 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9705 79 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9706 : }
9707 79 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9708 79 : NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
9709 79 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
9710 79 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
9711 79 : NDR_PULL_ALLOC(ndr, r->out.sids);
9712 79 : NDR_ZERO_STRUCTP(r->out.sids);
9713 : }
9714 158 : if (flags & NDR_OUT) {
9715 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9716 : if (r->in.alias_handle == NULL) {
9717 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
9718 : NDR_ZERO_STRUCTP(r->in.alias_handle);
9719 : }
9720 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9721 79 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9722 0 : NDR_PULL_ALLOC(ndr, r->out.sids);
9723 : }
9724 79 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
9725 79 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
9726 79 : NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
9727 79 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
9728 79 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9729 : }
9730 158 : return NDR_ERR_SUCCESS;
9731 : }
9732 :
9733 0 : _PUBLIC_ void ndr_print_samr_GetMembersInAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetMembersInAlias *r)
9734 : {
9735 0 : ndr_print_struct(ndr, name, "samr_GetMembersInAlias");
9736 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9737 0 : ndr->depth++;
9738 0 : if (flags & NDR_SET_VALUES) {
9739 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9740 : }
9741 0 : if (flags & NDR_IN) {
9742 0 : ndr_print_struct(ndr, "in", "samr_GetMembersInAlias");
9743 0 : ndr->depth++;
9744 0 : ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
9745 0 : ndr->depth++;
9746 0 : ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
9747 0 : ndr->depth--;
9748 0 : ndr->depth--;
9749 : }
9750 0 : if (flags & NDR_OUT) {
9751 0 : ndr_print_struct(ndr, "out", "samr_GetMembersInAlias");
9752 0 : ndr->depth++;
9753 0 : ndr_print_ptr(ndr, "sids", r->out.sids);
9754 0 : ndr->depth++;
9755 0 : ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
9756 0 : ndr->depth--;
9757 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9758 0 : ndr->depth--;
9759 : }
9760 0 : ndr->depth--;
9761 : }
9762 :
9763 3480 : _PUBLIC_ enum ndr_err_code ndr_push_samr_OpenUser(struct ndr_push *ndr, int flags, const struct samr_OpenUser *r)
9764 : {
9765 3480 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9766 3480 : if (flags & NDR_IN) {
9767 1681 : if (r->in.domain_handle == NULL) {
9768 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9769 : }
9770 1681 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9771 1681 : NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
9772 1681 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
9773 : }
9774 3480 : if (flags & NDR_OUT) {
9775 1799 : if (r->out.user_handle == NULL) {
9776 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9777 : }
9778 1799 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
9779 1799 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9780 : }
9781 3480 : return NDR_ERR_SUCCESS;
9782 : }
9783 :
9784 3380 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenUser(struct ndr_pull *ndr, int flags, struct samr_OpenUser *r)
9785 : {
9786 3380 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
9787 3380 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
9788 3380 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9789 3380 : if (flags & NDR_IN) {
9790 1703 : NDR_ZERO_STRUCT(r->out);
9791 :
9792 1703 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9793 1703 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9794 : }
9795 1703 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9796 1703 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
9797 1703 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
9798 1703 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
9799 1703 : NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
9800 1703 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
9801 1703 : NDR_PULL_ALLOC(ndr, r->out.user_handle);
9802 1703 : NDR_ZERO_STRUCTP(r->out.user_handle);
9803 : }
9804 3380 : if (flags & NDR_OUT) {
9805 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9806 : if (r->in.domain_handle == NULL) {
9807 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
9808 : NDR_ZERO_STRUCTP(r->in.domain_handle);
9809 : }
9810 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9811 1677 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9812 1073 : NDR_PULL_ALLOC(ndr, r->out.user_handle);
9813 : }
9814 1677 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9815 1677 : NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
9816 1677 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
9817 1677 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9818 1677 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9819 : }
9820 3380 : return NDR_ERR_SUCCESS;
9821 : }
9822 :
9823 200 : _PUBLIC_ void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenUser *r)
9824 : {
9825 200 : ndr_print_struct(ndr, name, "samr_OpenUser");
9826 200 : if (r == NULL) { ndr_print_null(ndr); return; }
9827 200 : ndr->depth++;
9828 200 : if (flags & NDR_SET_VALUES) {
9829 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9830 : }
9831 200 : if (flags & NDR_IN) {
9832 0 : ndr_print_struct(ndr, "in", "samr_OpenUser");
9833 0 : ndr->depth++;
9834 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
9835 0 : ndr->depth++;
9836 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
9837 0 : ndr->depth--;
9838 0 : ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask);
9839 0 : ndr_print_uint32(ndr, "rid", r->in.rid);
9840 0 : ndr->depth--;
9841 : }
9842 200 : if (flags & NDR_OUT) {
9843 200 : ndr_print_struct(ndr, "out", "samr_OpenUser");
9844 200 : ndr->depth++;
9845 200 : ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
9846 200 : ndr->depth++;
9847 200 : ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
9848 200 : ndr->depth--;
9849 200 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9850 200 : ndr->depth--;
9851 : }
9852 200 : ndr->depth--;
9853 : }
9854 :
9855 1774 : static enum ndr_err_code ndr_push_samr_DeleteUser(struct ndr_push *ndr, int flags, const struct samr_DeleteUser *r)
9856 : {
9857 1774 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9858 1774 : if (flags & NDR_IN) {
9859 849 : if (r->in.user_handle == NULL) {
9860 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9861 : }
9862 849 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9863 : }
9864 1774 : if (flags & NDR_OUT) {
9865 925 : if (r->out.user_handle == NULL) {
9866 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9867 : }
9868 925 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
9869 925 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9870 : }
9871 1774 : return NDR_ERR_SUCCESS;
9872 : }
9873 :
9874 1697 : static enum ndr_err_code ndr_pull_samr_DeleteUser(struct ndr_pull *ndr, int flags, struct samr_DeleteUser *r)
9875 : {
9876 1697 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
9877 1697 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9878 1697 : if (flags & NDR_IN) {
9879 848 : NDR_ZERO_STRUCT(r->out);
9880 :
9881 848 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9882 848 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
9883 : }
9884 848 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9885 848 : NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9886 848 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9887 848 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9888 848 : NDR_PULL_ALLOC(ndr, r->out.user_handle);
9889 848 : *r->out.user_handle = *r->in.user_handle;
9890 : }
9891 1697 : if (flags & NDR_OUT) {
9892 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9893 : if (r->in.user_handle == NULL) {
9894 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
9895 : NDR_ZERO_STRUCTP(r->in.user_handle);
9896 : }
9897 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9898 849 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9899 82 : NDR_PULL_ALLOC(ndr, r->out.user_handle);
9900 : }
9901 849 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9902 849 : NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
9903 849 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
9904 849 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9905 849 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9906 : }
9907 1697 : return NDR_ERR_SUCCESS;
9908 : }
9909 :
9910 156 : _PUBLIC_ void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteUser *r)
9911 : {
9912 156 : ndr_print_struct(ndr, name, "samr_DeleteUser");
9913 156 : if (r == NULL) { ndr_print_null(ndr); return; }
9914 156 : ndr->depth++;
9915 156 : if (flags & NDR_SET_VALUES) {
9916 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9917 : }
9918 156 : if (flags & NDR_IN) {
9919 0 : ndr_print_struct(ndr, "in", "samr_DeleteUser");
9920 0 : ndr->depth++;
9921 0 : ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
9922 0 : ndr->depth++;
9923 0 : ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
9924 0 : ndr->depth--;
9925 0 : ndr->depth--;
9926 : }
9927 156 : if (flags & NDR_OUT) {
9928 156 : ndr_print_struct(ndr, "out", "samr_DeleteUser");
9929 156 : ndr->depth++;
9930 156 : ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
9931 156 : ndr->depth++;
9932 156 : ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
9933 156 : ndr->depth--;
9934 156 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
9935 156 : ndr->depth--;
9936 : }
9937 156 : ndr->depth--;
9938 : }
9939 :
9940 18379 : _PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo *r)
9941 : {
9942 18379 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9943 18379 : if (flags & NDR_IN) {
9944 9109 : if (r->in.user_handle == NULL) {
9945 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9946 : }
9947 9109 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9948 9109 : NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
9949 : }
9950 18379 : if (flags & NDR_OUT) {
9951 9270 : if (r->out.info == NULL) {
9952 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9953 : }
9954 9270 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9955 9270 : if (*r->out.info) {
9956 9270 : NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9957 9270 : NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9958 : }
9959 9270 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9960 : }
9961 18379 : return NDR_ERR_SUCCESS;
9962 : }
9963 :
9964 18217 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r)
9965 : {
9966 : uint32_t _ptr_info;
9967 18217 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
9968 18217 : TALLOC_CTX *_mem_save_info_0 = NULL;
9969 18217 : TALLOC_CTX *_mem_save_info_1 = NULL;
9970 18217 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9971 18217 : if (flags & NDR_IN) {
9972 9108 : NDR_ZERO_STRUCT(r->out);
9973 :
9974 9108 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9975 9108 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
9976 : }
9977 9108 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9978 9108 : NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
9979 9108 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
9980 9108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
9981 9108 : NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
9982 9108 : NDR_PULL_ALLOC(ndr, r->out.info);
9983 9108 : NDR_ZERO_STRUCTP(r->out.info);
9984 : }
9985 18217 : if (flags & NDR_OUT) {
9986 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9987 : if (r->in.user_handle == NULL) {
9988 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
9989 : NDR_ZERO_STRUCTP(r->in.user_handle);
9990 : }
9991 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9992 9109 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9993 3326 : NDR_PULL_ALLOC(ndr, r->out.info);
9994 : }
9995 9109 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9996 9109 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9997 9109 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9998 9109 : if (_ptr_info) {
9999 9109 : NDR_PULL_ALLOC(ndr, *r->out.info);
10000 : } else {
10001 0 : *r->out.info = NULL;
10002 : }
10003 9109 : if (*r->out.info) {
10004 9109 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10005 9109 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10006 9109 : NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10007 9109 : NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10008 9109 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10009 : }
10010 9109 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10011 9109 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10012 : }
10013 18217 : return NDR_ERR_SUCCESS;
10014 : }
10015 :
10016 324 : _PUBLIC_ void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo *r)
10017 : {
10018 324 : ndr_print_struct(ndr, name, "samr_QueryUserInfo");
10019 324 : if (r == NULL) { ndr_print_null(ndr); return; }
10020 324 : ndr->depth++;
10021 324 : if (flags & NDR_SET_VALUES) {
10022 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10023 : }
10024 324 : if (flags & NDR_IN) {
10025 0 : ndr_print_struct(ndr, "in", "samr_QueryUserInfo");
10026 0 : ndr->depth++;
10027 0 : ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
10028 0 : ndr->depth++;
10029 0 : ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
10030 0 : ndr->depth--;
10031 0 : ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
10032 0 : ndr->depth--;
10033 : }
10034 324 : if (flags & NDR_OUT) {
10035 324 : ndr_print_struct(ndr, "out", "samr_QueryUserInfo");
10036 324 : ndr->depth++;
10037 324 : ndr_print_ptr(ndr, "info", r->out.info);
10038 324 : ndr->depth++;
10039 324 : ndr_print_ptr(ndr, "info", *r->out.info);
10040 324 : ndr->depth++;
10041 324 : if (*r->out.info) {
10042 324 : ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10043 324 : ndr_print_samr_UserInfo(ndr, "info", *r->out.info);
10044 : }
10045 324 : ndr->depth--;
10046 324 : ndr->depth--;
10047 324 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10048 324 : ndr->depth--;
10049 : }
10050 324 : ndr->depth--;
10051 : }
10052 :
10053 4910 : _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo *r)
10054 : {
10055 4910 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10056 4910 : if (flags & NDR_IN) {
10057 2391 : if (r->in.user_handle == NULL) {
10058 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10059 : }
10060 2391 : if (r->in.info == NULL) {
10061 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10062 : }
10063 2391 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10064 2391 : NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
10065 2391 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
10066 2391 : NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10067 : }
10068 4910 : if (flags & NDR_OUT) {
10069 2519 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10070 : }
10071 4910 : return NDR_ERR_SUCCESS;
10072 : }
10073 :
10074 4782 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo *r)
10075 : {
10076 4782 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
10077 4782 : TALLOC_CTX *_mem_save_info_0 = NULL;
10078 4782 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10079 4782 : if (flags & NDR_IN) {
10080 2391 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10081 2391 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10082 : }
10083 2391 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10084 2391 : NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
10085 2391 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10086 2391 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
10087 2391 : NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
10088 2391 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10089 2391 : NDR_PULL_ALLOC(ndr, r->in.info);
10090 : }
10091 2391 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10092 2391 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
10093 2391 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10094 2391 : NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10095 2391 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10096 : }
10097 4782 : if (flags & NDR_OUT) {
10098 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10099 : if (r->in.user_handle == NULL) {
10100 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10101 : NDR_ZERO_STRUCTP(r->in.user_handle);
10102 : }
10103 : if (r->in.info == NULL) {
10104 : NDR_PULL_ALLOC(ndr, r->in.info);
10105 : NDR_ZERO_STRUCTP(r->in.info);
10106 : }
10107 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10108 2391 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10109 : }
10110 4782 : return NDR_ERR_SUCCESS;
10111 : }
10112 :
10113 256 : _PUBLIC_ void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo *r)
10114 : {
10115 256 : ndr_print_struct(ndr, name, "samr_SetUserInfo");
10116 256 : if (r == NULL) { ndr_print_null(ndr); return; }
10117 256 : ndr->depth++;
10118 256 : if (flags & NDR_SET_VALUES) {
10119 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10120 : }
10121 256 : if (flags & NDR_IN) {
10122 0 : ndr_print_struct(ndr, "in", "samr_SetUserInfo");
10123 0 : ndr->depth++;
10124 0 : ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
10125 0 : ndr->depth++;
10126 0 : ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
10127 0 : ndr->depth--;
10128 0 : ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
10129 0 : ndr_print_ptr(ndr, "info", r->in.info);
10130 0 : ndr->depth++;
10131 0 : ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10132 0 : ndr_print_samr_UserInfo(ndr, "info", r->in.info);
10133 0 : ndr->depth--;
10134 0 : ndr->depth--;
10135 : }
10136 256 : if (flags & NDR_OUT) {
10137 256 : ndr_print_struct(ndr, "out", "samr_SetUserInfo");
10138 256 : ndr->depth++;
10139 256 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10140 256 : ndr->depth--;
10141 : }
10142 256 : ndr->depth--;
10143 : }
10144 :
10145 48 : static enum ndr_err_code ndr_push_samr_ChangePasswordUser(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser *r)
10146 : {
10147 48 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10148 48 : if (flags & NDR_IN) {
10149 24 : if (r->in.user_handle == NULL) {
10150 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10151 : }
10152 24 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10153 24 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_present));
10154 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_lm_crypted));
10155 24 : if (r->in.old_lm_crypted) {
10156 24 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.old_lm_crypted));
10157 : }
10158 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_lm_crypted));
10159 24 : if (r->in.new_lm_crypted) {
10160 24 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_lm_crypted));
10161 : }
10162 24 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.nt_present));
10163 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_nt_crypted));
10164 24 : if (r->in.old_nt_crypted) {
10165 24 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.old_nt_crypted));
10166 : }
10167 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_nt_crypted));
10168 24 : if (r->in.new_nt_crypted) {
10169 24 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_nt_crypted));
10170 : }
10171 24 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.cross1_present));
10172 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_cross));
10173 24 : if (r->in.nt_cross) {
10174 24 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_cross));
10175 : }
10176 24 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.cross2_present));
10177 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_cross));
10178 24 : if (r->in.lm_cross) {
10179 24 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_cross));
10180 : }
10181 : }
10182 48 : if (flags & NDR_OUT) {
10183 24 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10184 : }
10185 48 : return NDR_ERR_SUCCESS;
10186 : }
10187 :
10188 48 : static enum ndr_err_code ndr_pull_samr_ChangePasswordUser(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser *r)
10189 : {
10190 : uint32_t _ptr_old_lm_crypted;
10191 : uint32_t _ptr_new_lm_crypted;
10192 : uint32_t _ptr_old_nt_crypted;
10193 : uint32_t _ptr_new_nt_crypted;
10194 : uint32_t _ptr_nt_cross;
10195 : uint32_t _ptr_lm_cross;
10196 48 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
10197 48 : TALLOC_CTX *_mem_save_old_lm_crypted_0 = NULL;
10198 48 : TALLOC_CTX *_mem_save_new_lm_crypted_0 = NULL;
10199 48 : TALLOC_CTX *_mem_save_old_nt_crypted_0 = NULL;
10200 48 : TALLOC_CTX *_mem_save_new_nt_crypted_0 = NULL;
10201 48 : TALLOC_CTX *_mem_save_nt_cross_0 = NULL;
10202 48 : TALLOC_CTX *_mem_save_lm_cross_0 = NULL;
10203 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10204 48 : if (flags & NDR_IN) {
10205 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10206 24 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10207 : }
10208 24 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10209 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
10210 24 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10211 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
10212 24 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_present));
10213 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_lm_crypted));
10214 24 : if (_ptr_old_lm_crypted) {
10215 24 : NDR_PULL_ALLOC(ndr, r->in.old_lm_crypted);
10216 : } else {
10217 0 : r->in.old_lm_crypted = NULL;
10218 : }
10219 24 : if (r->in.old_lm_crypted) {
10220 24 : _mem_save_old_lm_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
10221 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.old_lm_crypted, 0);
10222 24 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.old_lm_crypted));
10223 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_lm_crypted_0, 0);
10224 : }
10225 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_lm_crypted));
10226 24 : if (_ptr_new_lm_crypted) {
10227 24 : NDR_PULL_ALLOC(ndr, r->in.new_lm_crypted);
10228 : } else {
10229 0 : r->in.new_lm_crypted = NULL;
10230 : }
10231 24 : if (r->in.new_lm_crypted) {
10232 24 : _mem_save_new_lm_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
10233 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.new_lm_crypted, 0);
10234 24 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_lm_crypted));
10235 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_lm_crypted_0, 0);
10236 : }
10237 24 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.nt_present));
10238 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_nt_crypted));
10239 24 : if (_ptr_old_nt_crypted) {
10240 24 : NDR_PULL_ALLOC(ndr, r->in.old_nt_crypted);
10241 : } else {
10242 0 : r->in.old_nt_crypted = NULL;
10243 : }
10244 24 : if (r->in.old_nt_crypted) {
10245 24 : _mem_save_old_nt_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
10246 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.old_nt_crypted, 0);
10247 24 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.old_nt_crypted));
10248 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_nt_crypted_0, 0);
10249 : }
10250 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_nt_crypted));
10251 24 : if (_ptr_new_nt_crypted) {
10252 24 : NDR_PULL_ALLOC(ndr, r->in.new_nt_crypted);
10253 : } else {
10254 0 : r->in.new_nt_crypted = NULL;
10255 : }
10256 24 : if (r->in.new_nt_crypted) {
10257 24 : _mem_save_new_nt_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr);
10258 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.new_nt_crypted, 0);
10259 24 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_nt_crypted));
10260 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_nt_crypted_0, 0);
10261 : }
10262 24 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.cross1_present));
10263 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_cross));
10264 24 : if (_ptr_nt_cross) {
10265 24 : NDR_PULL_ALLOC(ndr, r->in.nt_cross);
10266 : } else {
10267 0 : r->in.nt_cross = NULL;
10268 : }
10269 24 : if (r->in.nt_cross) {
10270 24 : _mem_save_nt_cross_0 = NDR_PULL_GET_MEM_CTX(ndr);
10271 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_cross, 0);
10272 24 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_cross));
10273 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_cross_0, 0);
10274 : }
10275 24 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.cross2_present));
10276 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_cross));
10277 24 : if (_ptr_lm_cross) {
10278 24 : NDR_PULL_ALLOC(ndr, r->in.lm_cross);
10279 : } else {
10280 0 : r->in.lm_cross = NULL;
10281 : }
10282 24 : if (r->in.lm_cross) {
10283 24 : _mem_save_lm_cross_0 = NDR_PULL_GET_MEM_CTX(ndr);
10284 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_cross, 0);
10285 24 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_cross));
10286 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_cross_0, 0);
10287 : }
10288 : }
10289 48 : if (flags & NDR_OUT) {
10290 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10291 : if (r->in.user_handle == NULL) {
10292 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10293 : NDR_ZERO_STRUCTP(r->in.user_handle);
10294 : }
10295 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10296 24 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10297 : }
10298 48 : return NDR_ERR_SUCCESS;
10299 : }
10300 :
10301 0 : _PUBLIC_ void ndr_print_samr_ChangePasswordUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser *r)
10302 : {
10303 0 : ndr_print_struct(ndr, name, "samr_ChangePasswordUser");
10304 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10305 0 : ndr->depth++;
10306 0 : if (flags & NDR_SET_VALUES) {
10307 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10308 : }
10309 0 : if (flags & NDR_IN) {
10310 0 : ndr_print_struct(ndr, "in", "samr_ChangePasswordUser");
10311 0 : ndr->depth++;
10312 0 : ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
10313 0 : ndr->depth++;
10314 0 : ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
10315 0 : ndr->depth--;
10316 0 : ndr_print_uint8(ndr, "lm_present", r->in.lm_present);
10317 0 : ndr_print_ptr(ndr, "old_lm_crypted", r->in.old_lm_crypted);
10318 0 : ndr->depth++;
10319 0 : if (r->in.old_lm_crypted) {
10320 0 : ndr_print_samr_Password(ndr, "old_lm_crypted", r->in.old_lm_crypted);
10321 : }
10322 0 : ndr->depth--;
10323 0 : ndr_print_ptr(ndr, "new_lm_crypted", r->in.new_lm_crypted);
10324 0 : ndr->depth++;
10325 0 : if (r->in.new_lm_crypted) {
10326 0 : ndr_print_samr_Password(ndr, "new_lm_crypted", r->in.new_lm_crypted);
10327 : }
10328 0 : ndr->depth--;
10329 0 : ndr_print_uint8(ndr, "nt_present", r->in.nt_present);
10330 0 : ndr_print_ptr(ndr, "old_nt_crypted", r->in.old_nt_crypted);
10331 0 : ndr->depth++;
10332 0 : if (r->in.old_nt_crypted) {
10333 0 : ndr_print_samr_Password(ndr, "old_nt_crypted", r->in.old_nt_crypted);
10334 : }
10335 0 : ndr->depth--;
10336 0 : ndr_print_ptr(ndr, "new_nt_crypted", r->in.new_nt_crypted);
10337 0 : ndr->depth++;
10338 0 : if (r->in.new_nt_crypted) {
10339 0 : ndr_print_samr_Password(ndr, "new_nt_crypted", r->in.new_nt_crypted);
10340 : }
10341 0 : ndr->depth--;
10342 0 : ndr_print_uint8(ndr, "cross1_present", r->in.cross1_present);
10343 0 : ndr_print_ptr(ndr, "nt_cross", r->in.nt_cross);
10344 0 : ndr->depth++;
10345 0 : if (r->in.nt_cross) {
10346 0 : ndr_print_samr_Password(ndr, "nt_cross", r->in.nt_cross);
10347 : }
10348 0 : ndr->depth--;
10349 0 : ndr_print_uint8(ndr, "cross2_present", r->in.cross2_present);
10350 0 : ndr_print_ptr(ndr, "lm_cross", r->in.lm_cross);
10351 0 : ndr->depth++;
10352 0 : if (r->in.lm_cross) {
10353 0 : ndr_print_samr_Password(ndr, "lm_cross", r->in.lm_cross);
10354 : }
10355 0 : ndr->depth--;
10356 0 : ndr->depth--;
10357 : }
10358 0 : if (flags & NDR_OUT) {
10359 0 : ndr_print_struct(ndr, "out", "samr_ChangePasswordUser");
10360 0 : ndr->depth++;
10361 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10362 0 : ndr->depth--;
10363 : }
10364 0 : ndr->depth--;
10365 : }
10366 :
10367 314 : static enum ndr_err_code ndr_push_samr_GetGroupsForUser(struct ndr_push *ndr, int flags, const struct samr_GetGroupsForUser *r)
10368 : {
10369 314 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10370 314 : if (flags & NDR_IN) {
10371 139 : if (r->in.user_handle == NULL) {
10372 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10373 : }
10374 139 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10375 : }
10376 314 : if (flags & NDR_OUT) {
10377 175 : if (r->out.rids == NULL) {
10378 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10379 : }
10380 175 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rids));
10381 175 : if (*r->out.rids) {
10382 175 : NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
10383 : }
10384 175 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10385 : }
10386 314 : return NDR_ERR_SUCCESS;
10387 : }
10388 :
10389 302 : static enum ndr_err_code ndr_pull_samr_GetGroupsForUser(struct ndr_pull *ndr, int flags, struct samr_GetGroupsForUser *r)
10390 : {
10391 : uint32_t _ptr_rids;
10392 302 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
10393 302 : TALLOC_CTX *_mem_save_rids_0 = NULL;
10394 302 : TALLOC_CTX *_mem_save_rids_1 = NULL;
10395 302 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10396 302 : if (flags & NDR_IN) {
10397 163 : NDR_ZERO_STRUCT(r->out);
10398 :
10399 163 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10400 163 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10401 : }
10402 163 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10403 163 : NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
10404 163 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10405 163 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
10406 163 : NDR_PULL_ALLOC(ndr, r->out.rids);
10407 163 : NDR_ZERO_STRUCTP(r->out.rids);
10408 : }
10409 302 : if (flags & NDR_OUT) {
10410 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10411 : if (r->in.user_handle == NULL) {
10412 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10413 : NDR_ZERO_STRUCTP(r->in.user_handle);
10414 : }
10415 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10416 139 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10417 104 : NDR_PULL_ALLOC(ndr, r->out.rids);
10418 : }
10419 139 : _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10420 139 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC);
10421 139 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
10422 139 : if (_ptr_rids) {
10423 139 : NDR_PULL_ALLOC(ndr, *r->out.rids);
10424 : } else {
10425 0 : *r->out.rids = NULL;
10426 : }
10427 139 : if (*r->out.rids) {
10428 139 : _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
10429 139 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, 0);
10430 139 : NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids));
10431 139 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
10432 : }
10433 139 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC);
10434 139 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10435 : }
10436 302 : return NDR_ERR_SUCCESS;
10437 : }
10438 :
10439 24 : _PUBLIC_ void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetGroupsForUser *r)
10440 : {
10441 24 : ndr_print_struct(ndr, name, "samr_GetGroupsForUser");
10442 24 : if (r == NULL) { ndr_print_null(ndr); return; }
10443 24 : ndr->depth++;
10444 24 : if (flags & NDR_SET_VALUES) {
10445 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10446 : }
10447 24 : if (flags & NDR_IN) {
10448 0 : ndr_print_struct(ndr, "in", "samr_GetGroupsForUser");
10449 0 : ndr->depth++;
10450 0 : ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
10451 0 : ndr->depth++;
10452 0 : ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
10453 0 : ndr->depth--;
10454 0 : ndr->depth--;
10455 : }
10456 24 : if (flags & NDR_OUT) {
10457 24 : ndr_print_struct(ndr, "out", "samr_GetGroupsForUser");
10458 24 : ndr->depth++;
10459 24 : ndr_print_ptr(ndr, "rids", r->out.rids);
10460 24 : ndr->depth++;
10461 24 : ndr_print_ptr(ndr, "rids", *r->out.rids);
10462 24 : ndr->depth++;
10463 24 : if (*r->out.rids) {
10464 24 : ndr_print_samr_RidWithAttributeArray(ndr, "rids", *r->out.rids);
10465 : }
10466 24 : ndr->depth--;
10467 24 : ndr->depth--;
10468 24 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10469 24 : ndr->depth--;
10470 : }
10471 24 : ndr->depth--;
10472 : }
10473 :
10474 617 : static enum ndr_err_code ndr_push_samr_QueryDisplayInfo(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo *r)
10475 : {
10476 617 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10477 617 : if (flags & NDR_IN) {
10478 308 : if (r->in.domain_handle == NULL) {
10479 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10480 : }
10481 308 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10482 308 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10483 308 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx));
10484 308 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries));
10485 308 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
10486 : }
10487 617 : if (flags & NDR_OUT) {
10488 309 : if (r->out.total_size == NULL) {
10489 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10490 : }
10491 309 : if (r->out.returned_size == NULL) {
10492 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10493 : }
10494 309 : if (r->out.info == NULL) {
10495 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10496 : }
10497 309 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size));
10498 309 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size));
10499 309 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
10500 309 : NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10501 309 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10502 : }
10503 617 : return NDR_ERR_SUCCESS;
10504 : }
10505 :
10506 616 : static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo *r)
10507 : {
10508 616 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
10509 616 : TALLOC_CTX *_mem_save_total_size_0 = NULL;
10510 616 : TALLOC_CTX *_mem_save_returned_size_0 = NULL;
10511 616 : TALLOC_CTX *_mem_save_info_0 = NULL;
10512 616 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10513 616 : if (flags & NDR_IN) {
10514 308 : NDR_ZERO_STRUCT(r->out);
10515 :
10516 308 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10517 308 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10518 : }
10519 308 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10520 308 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10521 308 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10522 308 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10523 308 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10524 308 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx));
10525 308 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries));
10526 308 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
10527 308 : NDR_PULL_ALLOC(ndr, r->out.total_size);
10528 308 : NDR_ZERO_STRUCTP(r->out.total_size);
10529 308 : NDR_PULL_ALLOC(ndr, r->out.returned_size);
10530 308 : NDR_ZERO_STRUCTP(r->out.returned_size);
10531 308 : NDR_PULL_ALLOC(ndr, r->out.info);
10532 308 : NDR_ZERO_STRUCTP(r->out.info);
10533 : }
10534 616 : if (flags & NDR_OUT) {
10535 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10536 : if (r->in.domain_handle == NULL) {
10537 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10538 : NDR_ZERO_STRUCTP(r->in.domain_handle);
10539 : }
10540 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10541 308 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10542 46 : NDR_PULL_ALLOC(ndr, r->out.total_size);
10543 : }
10544 308 : _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10545 308 : NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC);
10546 308 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size));
10547 308 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC);
10548 308 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10549 46 : NDR_PULL_ALLOC(ndr, r->out.returned_size);
10550 : }
10551 308 : _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
10552 308 : NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC);
10553 308 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size));
10554 308 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC);
10555 308 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10556 46 : NDR_PULL_ALLOC(ndr, r->out.info);
10557 : }
10558 308 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10559 308 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10560 308 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
10561 308 : NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
10562 308 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10563 308 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10564 : }
10565 616 : return NDR_ERR_SUCCESS;
10566 : }
10567 :
10568 2 : _PUBLIC_ void ndr_print_samr_QueryDisplayInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo *r)
10569 : {
10570 2 : ndr_print_struct(ndr, name, "samr_QueryDisplayInfo");
10571 2 : if (r == NULL) { ndr_print_null(ndr); return; }
10572 2 : ndr->depth++;
10573 2 : if (flags & NDR_SET_VALUES) {
10574 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10575 : }
10576 2 : if (flags & NDR_IN) {
10577 0 : ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo");
10578 0 : ndr->depth++;
10579 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10580 0 : ndr->depth++;
10581 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10582 0 : ndr->depth--;
10583 0 : ndr_print_uint16(ndr, "level", r->in.level);
10584 0 : ndr_print_uint32(ndr, "start_idx", r->in.start_idx);
10585 0 : ndr_print_uint32(ndr, "max_entries", r->in.max_entries);
10586 0 : ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
10587 0 : ndr->depth--;
10588 : }
10589 2 : if (flags & NDR_OUT) {
10590 2 : ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo");
10591 2 : ndr->depth++;
10592 2 : ndr_print_ptr(ndr, "total_size", r->out.total_size);
10593 2 : ndr->depth++;
10594 2 : ndr_print_uint32(ndr, "total_size", *r->out.total_size);
10595 2 : ndr->depth--;
10596 2 : ndr_print_ptr(ndr, "returned_size", r->out.returned_size);
10597 2 : ndr->depth++;
10598 2 : ndr_print_uint32(ndr, "returned_size", *r->out.returned_size);
10599 2 : ndr->depth--;
10600 2 : ndr_print_ptr(ndr, "info", r->out.info);
10601 2 : ndr->depth++;
10602 2 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
10603 2 : ndr_print_samr_DispInfo(ndr, "info", r->out.info);
10604 2 : ndr->depth--;
10605 2 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10606 2 : ndr->depth--;
10607 : }
10608 2 : ndr->depth--;
10609 : }
10610 :
10611 0 : static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex(struct ndr_push *ndr, int flags, const struct samr_GetDisplayEnumerationIndex *r)
10612 : {
10613 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10614 0 : if (flags & NDR_IN) {
10615 0 : if (r->in.domain_handle == NULL) {
10616 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10617 : }
10618 0 : if (r->in.name == NULL) {
10619 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10620 : }
10621 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10622 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10623 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
10624 : }
10625 0 : if (flags & NDR_OUT) {
10626 0 : if (r->out.idx == NULL) {
10627 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10628 : }
10629 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.idx));
10630 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10631 : }
10632 0 : return NDR_ERR_SUCCESS;
10633 : }
10634 :
10635 0 : static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex *r)
10636 : {
10637 0 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
10638 0 : TALLOC_CTX *_mem_save_name_0 = NULL;
10639 0 : TALLOC_CTX *_mem_save_idx_0 = NULL;
10640 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10641 0 : if (flags & NDR_IN) {
10642 0 : NDR_ZERO_STRUCT(r->out);
10643 :
10644 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10645 0 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10646 : }
10647 0 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10648 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10649 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10650 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10651 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10652 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10653 0 : NDR_PULL_ALLOC(ndr, r->in.name);
10654 : }
10655 0 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10656 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
10657 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
10658 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
10659 0 : NDR_PULL_ALLOC(ndr, r->out.idx);
10660 0 : NDR_ZERO_STRUCTP(r->out.idx);
10661 : }
10662 0 : if (flags & NDR_OUT) {
10663 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10664 : if (r->in.domain_handle == NULL) {
10665 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10666 : NDR_ZERO_STRUCTP(r->in.domain_handle);
10667 : }
10668 : if (r->in.name == NULL) {
10669 : NDR_PULL_ALLOC(ndr, r->in.name);
10670 : NDR_ZERO_STRUCTP(r->in.name);
10671 : }
10672 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10673 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10674 0 : NDR_PULL_ALLOC(ndr, r->out.idx);
10675 : }
10676 0 : _mem_save_idx_0 = NDR_PULL_GET_MEM_CTX(ndr);
10677 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.idx, LIBNDR_FLAG_REF_ALLOC);
10678 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.idx));
10679 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_idx_0, LIBNDR_FLAG_REF_ALLOC);
10680 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10681 : }
10682 0 : return NDR_ERR_SUCCESS;
10683 : }
10684 :
10685 0 : _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex *r)
10686 : {
10687 0 : ndr_print_struct(ndr, name, "samr_GetDisplayEnumerationIndex");
10688 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10689 0 : ndr->depth++;
10690 0 : if (flags & NDR_SET_VALUES) {
10691 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10692 : }
10693 0 : if (flags & NDR_IN) {
10694 0 : ndr_print_struct(ndr, "in", "samr_GetDisplayEnumerationIndex");
10695 0 : ndr->depth++;
10696 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10697 0 : ndr->depth++;
10698 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10699 0 : ndr->depth--;
10700 0 : ndr_print_uint16(ndr, "level", r->in.level);
10701 0 : ndr_print_ptr(ndr, "name", r->in.name);
10702 0 : ndr->depth++;
10703 0 : ndr_print_lsa_String(ndr, "name", r->in.name);
10704 0 : ndr->depth--;
10705 0 : ndr->depth--;
10706 : }
10707 0 : if (flags & NDR_OUT) {
10708 0 : ndr_print_struct(ndr, "out", "samr_GetDisplayEnumerationIndex");
10709 0 : ndr->depth++;
10710 0 : ndr_print_ptr(ndr, "idx", r->out.idx);
10711 0 : ndr->depth++;
10712 0 : ndr_print_uint32(ndr, "idx", *r->out.idx);
10713 0 : ndr->depth--;
10714 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10715 0 : ndr->depth--;
10716 : }
10717 0 : ndr->depth--;
10718 : }
10719 :
10720 12 : static enum ndr_err_code ndr_push_samr_TestPrivateFunctionsDomain(struct ndr_push *ndr, int flags, const struct samr_TestPrivateFunctionsDomain *r)
10721 : {
10722 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10723 12 : if (flags & NDR_IN) {
10724 6 : if (r->in.domain_handle == NULL) {
10725 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10726 : }
10727 6 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10728 : }
10729 12 : if (flags & NDR_OUT) {
10730 6 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10731 : }
10732 12 : return NDR_ERR_SUCCESS;
10733 : }
10734 :
10735 12 : static enum ndr_err_code ndr_pull_samr_TestPrivateFunctionsDomain(struct ndr_pull *ndr, int flags, struct samr_TestPrivateFunctionsDomain *r)
10736 : {
10737 12 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
10738 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10739 12 : if (flags & NDR_IN) {
10740 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10741 6 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10742 : }
10743 6 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10744 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10745 6 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10746 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10747 : }
10748 12 : if (flags & NDR_OUT) {
10749 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10750 : if (r->in.domain_handle == NULL) {
10751 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10752 : NDR_ZERO_STRUCTP(r->in.domain_handle);
10753 : }
10754 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10755 6 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10756 : }
10757 12 : return NDR_ERR_SUCCESS;
10758 : }
10759 :
10760 0 : _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsDomain *r)
10761 : {
10762 0 : ndr_print_struct(ndr, name, "samr_TestPrivateFunctionsDomain");
10763 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10764 0 : ndr->depth++;
10765 0 : if (flags & NDR_SET_VALUES) {
10766 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10767 : }
10768 0 : if (flags & NDR_IN) {
10769 0 : ndr_print_struct(ndr, "in", "samr_TestPrivateFunctionsDomain");
10770 0 : ndr->depth++;
10771 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
10772 0 : ndr->depth++;
10773 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
10774 0 : ndr->depth--;
10775 0 : ndr->depth--;
10776 : }
10777 0 : if (flags & NDR_OUT) {
10778 0 : ndr_print_struct(ndr, "out", "samr_TestPrivateFunctionsDomain");
10779 0 : ndr->depth++;
10780 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10781 0 : ndr->depth--;
10782 : }
10783 0 : ndr->depth--;
10784 : }
10785 :
10786 24 : static enum ndr_err_code ndr_push_samr_TestPrivateFunctionsUser(struct ndr_push *ndr, int flags, const struct samr_TestPrivateFunctionsUser *r)
10787 : {
10788 24 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10789 24 : if (flags & NDR_IN) {
10790 12 : if (r->in.user_handle == NULL) {
10791 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10792 : }
10793 12 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10794 : }
10795 24 : if (flags & NDR_OUT) {
10796 12 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10797 : }
10798 24 : return NDR_ERR_SUCCESS;
10799 : }
10800 :
10801 24 : static enum ndr_err_code ndr_pull_samr_TestPrivateFunctionsUser(struct ndr_pull *ndr, int flags, struct samr_TestPrivateFunctionsUser *r)
10802 : {
10803 24 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
10804 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10805 24 : if (flags & NDR_IN) {
10806 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10807 12 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10808 : }
10809 12 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10810 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
10811 12 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10812 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
10813 : }
10814 24 : if (flags & NDR_OUT) {
10815 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10816 : if (r->in.user_handle == NULL) {
10817 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10818 : NDR_ZERO_STRUCTP(r->in.user_handle);
10819 : }
10820 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10821 12 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10822 : }
10823 24 : return NDR_ERR_SUCCESS;
10824 : }
10825 :
10826 0 : _PUBLIC_ void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsUser *r)
10827 : {
10828 0 : ndr_print_struct(ndr, name, "samr_TestPrivateFunctionsUser");
10829 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10830 0 : ndr->depth++;
10831 0 : if (flags & NDR_SET_VALUES) {
10832 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10833 : }
10834 0 : if (flags & NDR_IN) {
10835 0 : ndr_print_struct(ndr, "in", "samr_TestPrivateFunctionsUser");
10836 0 : ndr->depth++;
10837 0 : ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
10838 0 : ndr->depth++;
10839 0 : ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
10840 0 : ndr->depth--;
10841 0 : ndr->depth--;
10842 : }
10843 0 : if (flags & NDR_OUT) {
10844 0 : ndr_print_struct(ndr, "out", "samr_TestPrivateFunctionsUser");
10845 0 : ndr->depth++;
10846 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10847 0 : ndr->depth--;
10848 : }
10849 0 : ndr->depth--;
10850 : }
10851 :
10852 2091 : _PUBLIC_ enum ndr_err_code ndr_push_samr_GetUserPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetUserPwInfo *r)
10853 : {
10854 2091 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10855 2091 : if (flags & NDR_IN) {
10856 1012 : if (r->in.user_handle == NULL) {
10857 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10858 : }
10859 1012 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10860 : }
10861 2091 : if (flags & NDR_OUT) {
10862 1079 : if (r->out.info == NULL) {
10863 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10864 : }
10865 1079 : NDR_CHECK(ndr_push_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
10866 1079 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10867 : }
10868 2091 : return NDR_ERR_SUCCESS;
10869 : }
10870 :
10871 2023 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_GetUserPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetUserPwInfo *r)
10872 : {
10873 2023 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
10874 2023 : TALLOC_CTX *_mem_save_info_0 = NULL;
10875 2023 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10876 2023 : if (flags & NDR_IN) {
10877 1011 : NDR_ZERO_STRUCT(r->out);
10878 :
10879 1011 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10880 1011 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10881 : }
10882 1011 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10883 1011 : NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
10884 1011 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
10885 1011 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
10886 1011 : NDR_PULL_ALLOC(ndr, r->out.info);
10887 1011 : NDR_ZERO_STRUCTP(r->out.info);
10888 : }
10889 2023 : if (flags & NDR_OUT) {
10890 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10891 : if (r->in.user_handle == NULL) {
10892 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
10893 : NDR_ZERO_STRUCTP(r->in.user_handle);
10894 : }
10895 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10896 1012 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10897 72 : NDR_PULL_ALLOC(ndr, r->out.info);
10898 : }
10899 1012 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10900 1012 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10901 1012 : NDR_CHECK(ndr_pull_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
10902 1012 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10903 1012 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10904 : }
10905 2023 : return NDR_ERR_SUCCESS;
10906 : }
10907 :
10908 136 : _PUBLIC_ void ndr_print_samr_GetUserPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetUserPwInfo *r)
10909 : {
10910 136 : ndr_print_struct(ndr, name, "samr_GetUserPwInfo");
10911 136 : if (r == NULL) { ndr_print_null(ndr); return; }
10912 136 : ndr->depth++;
10913 136 : if (flags & NDR_SET_VALUES) {
10914 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10915 : }
10916 136 : if (flags & NDR_IN) {
10917 0 : ndr_print_struct(ndr, "in", "samr_GetUserPwInfo");
10918 0 : ndr->depth++;
10919 0 : ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
10920 0 : ndr->depth++;
10921 0 : ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
10922 0 : ndr->depth--;
10923 0 : ndr->depth--;
10924 : }
10925 136 : if (flags & NDR_OUT) {
10926 136 : ndr_print_struct(ndr, "out", "samr_GetUserPwInfo");
10927 136 : ndr->depth++;
10928 136 : ndr_print_ptr(ndr, "info", r->out.info);
10929 136 : ndr->depth++;
10930 136 : ndr_print_samr_PwInfo(ndr, "info", r->out.info);
10931 136 : ndr->depth--;
10932 136 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10933 136 : ndr->depth--;
10934 : }
10935 136 : ndr->depth--;
10936 : }
10937 :
10938 19 : static enum ndr_err_code ndr_push_samr_RemoveMemberFromForeignDomain(struct ndr_push *ndr, int flags, const struct samr_RemoveMemberFromForeignDomain *r)
10939 : {
10940 19 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10941 19 : if (flags & NDR_IN) {
10942 10 : if (r->in.domain_handle == NULL) {
10943 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10944 : }
10945 10 : if (r->in.sid == NULL) {
10946 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10947 : }
10948 10 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10949 10 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
10950 : }
10951 19 : if (flags & NDR_OUT) {
10952 9 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10953 : }
10954 19 : return NDR_ERR_SUCCESS;
10955 : }
10956 :
10957 19 : static enum ndr_err_code ndr_pull_samr_RemoveMemberFromForeignDomain(struct ndr_pull *ndr, int flags, struct samr_RemoveMemberFromForeignDomain *r)
10958 : {
10959 19 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
10960 19 : TALLOC_CTX *_mem_save_sid_0 = NULL;
10961 19 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10962 19 : if (flags & NDR_IN) {
10963 9 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10964 9 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10965 : }
10966 9 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10967 9 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
10968 9 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
10969 9 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
10970 9 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10971 9 : NDR_PULL_ALLOC(ndr, r->in.sid);
10972 : }
10973 9 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
10974 9 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
10975 9 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
10976 9 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
10977 : }
10978 19 : if (flags & NDR_OUT) {
10979 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10980 : if (r->in.domain_handle == NULL) {
10981 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
10982 : NDR_ZERO_STRUCTP(r->in.domain_handle);
10983 : }
10984 : if (r->in.sid == NULL) {
10985 : NDR_PULL_ALLOC(ndr, r->in.sid);
10986 : NDR_ZERO_STRUCTP(r->in.sid);
10987 : }
10988 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10989 10 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10990 : }
10991 19 : return NDR_ERR_SUCCESS;
10992 : }
10993 :
10994 0 : _PUBLIC_ void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMemberFromForeignDomain *r)
10995 : {
10996 0 : ndr_print_struct(ndr, name, "samr_RemoveMemberFromForeignDomain");
10997 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10998 0 : ndr->depth++;
10999 0 : if (flags & NDR_SET_VALUES) {
11000 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11001 : }
11002 0 : if (flags & NDR_IN) {
11003 0 : ndr_print_struct(ndr, "in", "samr_RemoveMemberFromForeignDomain");
11004 0 : ndr->depth++;
11005 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
11006 0 : ndr->depth++;
11007 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
11008 0 : ndr->depth--;
11009 0 : ndr_print_ptr(ndr, "sid", r->in.sid);
11010 0 : ndr->depth++;
11011 0 : ndr_print_dom_sid2(ndr, "sid", r->in.sid);
11012 0 : ndr->depth--;
11013 0 : ndr->depth--;
11014 : }
11015 0 : if (flags & NDR_OUT) {
11016 0 : ndr_print_struct(ndr, "out", "samr_RemoveMemberFromForeignDomain");
11017 0 : ndr->depth++;
11018 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11019 0 : ndr->depth--;
11020 : }
11021 0 : ndr->depth--;
11022 : }
11023 :
11024 214 : static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryDomainInfo2 *r)
11025 : {
11026 214 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11027 214 : if (flags & NDR_IN) {
11028 107 : if (r->in.domain_handle == NULL) {
11029 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11030 : }
11031 107 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11032 107 : NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
11033 : }
11034 214 : if (flags & NDR_OUT) {
11035 107 : if (r->out.info == NULL) {
11036 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11037 : }
11038 107 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
11039 107 : if (*r->out.info) {
11040 107 : NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
11041 107 : NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
11042 : }
11043 107 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11044 : }
11045 214 : return NDR_ERR_SUCCESS;
11046 : }
11047 :
11048 214 : static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo2 *r)
11049 : {
11050 : uint32_t _ptr_info;
11051 214 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
11052 214 : TALLOC_CTX *_mem_save_info_0 = NULL;
11053 214 : TALLOC_CTX *_mem_save_info_1 = NULL;
11054 214 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11055 214 : if (flags & NDR_IN) {
11056 107 : NDR_ZERO_STRUCT(r->out);
11057 :
11058 107 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11059 107 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11060 : }
11061 107 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11062 107 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
11063 107 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11064 107 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
11065 107 : NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
11066 107 : NDR_PULL_ALLOC(ndr, r->out.info);
11067 107 : NDR_ZERO_STRUCTP(r->out.info);
11068 : }
11069 214 : if (flags & NDR_OUT) {
11070 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11071 : if (r->in.domain_handle == NULL) {
11072 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11073 : NDR_ZERO_STRUCTP(r->in.domain_handle);
11074 : }
11075 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11076 107 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11077 1 : NDR_PULL_ALLOC(ndr, r->out.info);
11078 : }
11079 107 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11080 107 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
11081 107 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
11082 107 : if (_ptr_info) {
11083 107 : NDR_PULL_ALLOC(ndr, *r->out.info);
11084 : } else {
11085 0 : *r->out.info = NULL;
11086 : }
11087 107 : if (*r->out.info) {
11088 107 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
11089 107 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
11090 107 : NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
11091 107 : NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
11092 107 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
11093 : }
11094 107 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11095 107 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11096 : }
11097 214 : return NDR_ERR_SUCCESS;
11098 : }
11099 :
11100 0 : _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo2 *r)
11101 : {
11102 0 : ndr_print_struct(ndr, name, "samr_QueryDomainInfo2");
11103 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11104 0 : ndr->depth++;
11105 0 : if (flags & NDR_SET_VALUES) {
11106 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11107 : }
11108 0 : if (flags & NDR_IN) {
11109 0 : ndr_print_struct(ndr, "in", "samr_QueryDomainInfo2");
11110 0 : ndr->depth++;
11111 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
11112 0 : ndr->depth++;
11113 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
11114 0 : ndr->depth--;
11115 0 : ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
11116 0 : ndr->depth--;
11117 : }
11118 0 : if (flags & NDR_OUT) {
11119 0 : ndr_print_struct(ndr, "out", "samr_QueryDomainInfo2");
11120 0 : ndr->depth++;
11121 0 : ndr_print_ptr(ndr, "info", r->out.info);
11122 0 : ndr->depth++;
11123 0 : ndr_print_ptr(ndr, "info", *r->out.info);
11124 0 : ndr->depth++;
11125 0 : if (*r->out.info) {
11126 0 : ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
11127 0 : ndr_print_samr_DomainInfo(ndr, "info", *r->out.info);
11128 : }
11129 0 : ndr->depth--;
11130 0 : ndr->depth--;
11131 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11132 0 : ndr->depth--;
11133 : }
11134 0 : ndr->depth--;
11135 : }
11136 :
11137 432 : static enum ndr_err_code ndr_push_samr_QueryUserInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo2 *r)
11138 : {
11139 432 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11140 432 : if (flags & NDR_IN) {
11141 216 : if (r->in.user_handle == NULL) {
11142 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11143 : }
11144 216 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
11145 216 : NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
11146 : }
11147 432 : if (flags & NDR_OUT) {
11148 216 : if (r->out.info == NULL) {
11149 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11150 : }
11151 216 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
11152 216 : if (*r->out.info) {
11153 216 : NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
11154 216 : NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
11155 : }
11156 216 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11157 : }
11158 432 : return NDR_ERR_SUCCESS;
11159 : }
11160 :
11161 432 : static enum ndr_err_code ndr_pull_samr_QueryUserInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo2 *r)
11162 : {
11163 : uint32_t _ptr_info;
11164 432 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
11165 432 : TALLOC_CTX *_mem_save_info_0 = NULL;
11166 432 : TALLOC_CTX *_mem_save_info_1 = NULL;
11167 432 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11168 432 : if (flags & NDR_IN) {
11169 216 : NDR_ZERO_STRUCT(r->out);
11170 :
11171 216 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11172 216 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
11173 : }
11174 216 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11175 216 : NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
11176 216 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
11177 216 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
11178 216 : NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
11179 216 : NDR_PULL_ALLOC(ndr, r->out.info);
11180 216 : NDR_ZERO_STRUCTP(r->out.info);
11181 : }
11182 432 : if (flags & NDR_OUT) {
11183 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11184 : if (r->in.user_handle == NULL) {
11185 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
11186 : NDR_ZERO_STRUCTP(r->in.user_handle);
11187 : }
11188 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11189 216 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11190 0 : NDR_PULL_ALLOC(ndr, r->out.info);
11191 : }
11192 216 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11193 216 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
11194 216 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
11195 216 : if (_ptr_info) {
11196 216 : NDR_PULL_ALLOC(ndr, *r->out.info);
11197 : } else {
11198 0 : *r->out.info = NULL;
11199 : }
11200 216 : if (*r->out.info) {
11201 216 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
11202 216 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
11203 216 : NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
11204 216 : NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
11205 216 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
11206 : }
11207 216 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11208 216 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11209 : }
11210 432 : return NDR_ERR_SUCCESS;
11211 : }
11212 :
11213 0 : _PUBLIC_ void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo2 *r)
11214 : {
11215 0 : ndr_print_struct(ndr, name, "samr_QueryUserInfo2");
11216 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11217 0 : ndr->depth++;
11218 0 : if (flags & NDR_SET_VALUES) {
11219 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11220 : }
11221 0 : if (flags & NDR_IN) {
11222 0 : ndr_print_struct(ndr, "in", "samr_QueryUserInfo2");
11223 0 : ndr->depth++;
11224 0 : ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
11225 0 : ndr->depth++;
11226 0 : ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
11227 0 : ndr->depth--;
11228 0 : ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
11229 0 : ndr->depth--;
11230 : }
11231 0 : if (flags & NDR_OUT) {
11232 0 : ndr_print_struct(ndr, "out", "samr_QueryUserInfo2");
11233 0 : ndr->depth++;
11234 0 : ndr_print_ptr(ndr, "info", r->out.info);
11235 0 : ndr->depth++;
11236 0 : ndr_print_ptr(ndr, "info", *r->out.info);
11237 0 : ndr->depth++;
11238 0 : if (*r->out.info) {
11239 0 : ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
11240 0 : ndr_print_samr_UserInfo(ndr, "info", *r->out.info);
11241 : }
11242 0 : ndr->depth--;
11243 0 : ndr->depth--;
11244 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11245 0 : ndr->depth--;
11246 : }
11247 0 : ndr->depth--;
11248 : }
11249 :
11250 68 : static enum ndr_err_code ndr_push_samr_QueryDisplayInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo2 *r)
11251 : {
11252 68 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11253 68 : if (flags & NDR_IN) {
11254 34 : if (r->in.domain_handle == NULL) {
11255 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11256 : }
11257 34 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11258 34 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
11259 34 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx));
11260 34 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries));
11261 34 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
11262 : }
11263 68 : if (flags & NDR_OUT) {
11264 34 : if (r->out.total_size == NULL) {
11265 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11266 : }
11267 34 : if (r->out.returned_size == NULL) {
11268 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11269 : }
11270 34 : if (r->out.info == NULL) {
11271 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11272 : }
11273 34 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size));
11274 34 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size));
11275 34 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
11276 34 : NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
11277 34 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11278 : }
11279 68 : return NDR_ERR_SUCCESS;
11280 : }
11281 :
11282 68 : static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo2 *r)
11283 : {
11284 68 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
11285 68 : TALLOC_CTX *_mem_save_total_size_0 = NULL;
11286 68 : TALLOC_CTX *_mem_save_returned_size_0 = NULL;
11287 68 : TALLOC_CTX *_mem_save_info_0 = NULL;
11288 68 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11289 68 : if (flags & NDR_IN) {
11290 34 : NDR_ZERO_STRUCT(r->out);
11291 :
11292 34 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11293 34 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11294 : }
11295 34 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11296 34 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
11297 34 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11298 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
11299 34 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
11300 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx));
11301 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries));
11302 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
11303 34 : NDR_PULL_ALLOC(ndr, r->out.total_size);
11304 34 : NDR_ZERO_STRUCTP(r->out.total_size);
11305 34 : NDR_PULL_ALLOC(ndr, r->out.returned_size);
11306 34 : NDR_ZERO_STRUCTP(r->out.returned_size);
11307 34 : NDR_PULL_ALLOC(ndr, r->out.info);
11308 34 : NDR_ZERO_STRUCTP(r->out.info);
11309 : }
11310 68 : if (flags & NDR_OUT) {
11311 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11312 : if (r->in.domain_handle == NULL) {
11313 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11314 : NDR_ZERO_STRUCTP(r->in.domain_handle);
11315 : }
11316 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11317 34 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11318 4 : NDR_PULL_ALLOC(ndr, r->out.total_size);
11319 : }
11320 34 : _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
11321 34 : NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC);
11322 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size));
11323 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC);
11324 34 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11325 4 : NDR_PULL_ALLOC(ndr, r->out.returned_size);
11326 : }
11327 34 : _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
11328 34 : NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC);
11329 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size));
11330 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC);
11331 34 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11332 4 : NDR_PULL_ALLOC(ndr, r->out.info);
11333 : }
11334 34 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11335 34 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
11336 34 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
11337 34 : NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
11338 34 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11339 34 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11340 : }
11341 68 : return NDR_ERR_SUCCESS;
11342 : }
11343 :
11344 0 : _PUBLIC_ void ndr_print_samr_QueryDisplayInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo2 *r)
11345 : {
11346 0 : ndr_print_struct(ndr, name, "samr_QueryDisplayInfo2");
11347 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11348 0 : ndr->depth++;
11349 0 : if (flags & NDR_SET_VALUES) {
11350 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11351 : }
11352 0 : if (flags & NDR_IN) {
11353 0 : ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo2");
11354 0 : ndr->depth++;
11355 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
11356 0 : ndr->depth++;
11357 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
11358 0 : ndr->depth--;
11359 0 : ndr_print_uint16(ndr, "level", r->in.level);
11360 0 : ndr_print_uint32(ndr, "start_idx", r->in.start_idx);
11361 0 : ndr_print_uint32(ndr, "max_entries", r->in.max_entries);
11362 0 : ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
11363 0 : ndr->depth--;
11364 : }
11365 0 : if (flags & NDR_OUT) {
11366 0 : ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo2");
11367 0 : ndr->depth++;
11368 0 : ndr_print_ptr(ndr, "total_size", r->out.total_size);
11369 0 : ndr->depth++;
11370 0 : ndr_print_uint32(ndr, "total_size", *r->out.total_size);
11371 0 : ndr->depth--;
11372 0 : ndr_print_ptr(ndr, "returned_size", r->out.returned_size);
11373 0 : ndr->depth++;
11374 0 : ndr_print_uint32(ndr, "returned_size", *r->out.returned_size);
11375 0 : ndr->depth--;
11376 0 : ndr_print_ptr(ndr, "info", r->out.info);
11377 0 : ndr->depth++;
11378 0 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
11379 0 : ndr_print_samr_DispInfo(ndr, "info", r->out.info);
11380 0 : ndr->depth--;
11381 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11382 0 : ndr->depth--;
11383 : }
11384 0 : ndr->depth--;
11385 : }
11386 :
11387 0 : static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex2(struct ndr_push *ndr, int flags, const struct samr_GetDisplayEnumerationIndex2 *r)
11388 : {
11389 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11390 0 : if (flags & NDR_IN) {
11391 0 : if (r->in.domain_handle == NULL) {
11392 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11393 : }
11394 0 : if (r->in.name == NULL) {
11395 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11396 : }
11397 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11398 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
11399 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
11400 : }
11401 0 : if (flags & NDR_OUT) {
11402 0 : if (r->out.idx == NULL) {
11403 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11404 : }
11405 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.idx));
11406 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11407 : }
11408 0 : return NDR_ERR_SUCCESS;
11409 : }
11410 :
11411 0 : static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex2(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex2 *r)
11412 : {
11413 0 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
11414 0 : TALLOC_CTX *_mem_save_name_0 = NULL;
11415 0 : TALLOC_CTX *_mem_save_idx_0 = NULL;
11416 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11417 0 : if (flags & NDR_IN) {
11418 0 : NDR_ZERO_STRUCT(r->out);
11419 :
11420 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11421 0 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11422 : }
11423 0 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11424 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
11425 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11426 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
11427 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
11428 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11429 0 : NDR_PULL_ALLOC(ndr, r->in.name);
11430 : }
11431 0 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11432 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
11433 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
11434 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
11435 0 : NDR_PULL_ALLOC(ndr, r->out.idx);
11436 0 : NDR_ZERO_STRUCTP(r->out.idx);
11437 : }
11438 0 : if (flags & NDR_OUT) {
11439 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11440 : if (r->in.domain_handle == NULL) {
11441 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11442 : NDR_ZERO_STRUCTP(r->in.domain_handle);
11443 : }
11444 : if (r->in.name == NULL) {
11445 : NDR_PULL_ALLOC(ndr, r->in.name);
11446 : NDR_ZERO_STRUCTP(r->in.name);
11447 : }
11448 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11449 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11450 0 : NDR_PULL_ALLOC(ndr, r->out.idx);
11451 : }
11452 0 : _mem_save_idx_0 = NDR_PULL_GET_MEM_CTX(ndr);
11453 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.idx, LIBNDR_FLAG_REF_ALLOC);
11454 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.idx));
11455 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_idx_0, LIBNDR_FLAG_REF_ALLOC);
11456 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11457 : }
11458 0 : return NDR_ERR_SUCCESS;
11459 : }
11460 :
11461 0 : _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex2 *r)
11462 : {
11463 0 : ndr_print_struct(ndr, name, "samr_GetDisplayEnumerationIndex2");
11464 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11465 0 : ndr->depth++;
11466 0 : if (flags & NDR_SET_VALUES) {
11467 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11468 : }
11469 0 : if (flags & NDR_IN) {
11470 0 : ndr_print_struct(ndr, "in", "samr_GetDisplayEnumerationIndex2");
11471 0 : ndr->depth++;
11472 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
11473 0 : ndr->depth++;
11474 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
11475 0 : ndr->depth--;
11476 0 : ndr_print_uint16(ndr, "level", r->in.level);
11477 0 : ndr_print_ptr(ndr, "name", r->in.name);
11478 0 : ndr->depth++;
11479 0 : ndr_print_lsa_String(ndr, "name", r->in.name);
11480 0 : ndr->depth--;
11481 0 : ndr->depth--;
11482 : }
11483 0 : if (flags & NDR_OUT) {
11484 0 : ndr_print_struct(ndr, "out", "samr_GetDisplayEnumerationIndex2");
11485 0 : ndr->depth++;
11486 0 : ndr_print_ptr(ndr, "idx", r->out.idx);
11487 0 : ndr->depth++;
11488 0 : ndr_print_uint32(ndr, "idx", *r->out.idx);
11489 0 : ndr->depth--;
11490 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11491 0 : ndr->depth--;
11492 : }
11493 0 : ndr->depth--;
11494 : }
11495 :
11496 1323 : static enum ndr_err_code ndr_push_samr_CreateUser2(struct ndr_push *ndr, int flags, const struct samr_CreateUser2 *r)
11497 : {
11498 1323 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11499 1323 : if (flags & NDR_IN) {
11500 628 : if (r->in.domain_handle == NULL) {
11501 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11502 : }
11503 628 : if (r->in.account_name == NULL) {
11504 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11505 : }
11506 628 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11507 628 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
11508 628 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags));
11509 628 : NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
11510 : }
11511 1323 : if (flags & NDR_OUT) {
11512 695 : if (r->out.user_handle == NULL) {
11513 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11514 : }
11515 695 : if (r->out.access_granted == NULL) {
11516 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11517 : }
11518 695 : if (r->out.rid == NULL) {
11519 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11520 : }
11521 695 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
11522 695 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.access_granted));
11523 695 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
11524 695 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11525 : }
11526 1323 : return NDR_ERR_SUCCESS;
11527 : }
11528 :
11529 1255 : static enum ndr_err_code ndr_pull_samr_CreateUser2(struct ndr_pull *ndr, int flags, struct samr_CreateUser2 *r)
11530 : {
11531 1255 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
11532 1255 : TALLOC_CTX *_mem_save_account_name_0 = NULL;
11533 1255 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
11534 1255 : TALLOC_CTX *_mem_save_access_granted_0 = NULL;
11535 1255 : TALLOC_CTX *_mem_save_rid_0 = NULL;
11536 1255 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11537 1255 : if (flags & NDR_IN) {
11538 627 : NDR_ZERO_STRUCT(r->out);
11539 :
11540 627 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11541 627 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11542 : }
11543 627 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11544 627 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
11545 627 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11546 627 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
11547 627 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11548 627 : NDR_PULL_ALLOC(ndr, r->in.account_name);
11549 : }
11550 627 : _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11551 627 : NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
11552 627 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
11553 627 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
11554 627 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags));
11555 627 : NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
11556 627 : NDR_PULL_ALLOC(ndr, r->out.user_handle);
11557 627 : NDR_ZERO_STRUCTP(r->out.user_handle);
11558 627 : NDR_PULL_ALLOC(ndr, r->out.access_granted);
11559 627 : NDR_ZERO_STRUCTP(r->out.access_granted);
11560 627 : NDR_PULL_ALLOC(ndr, r->out.rid);
11561 627 : NDR_ZERO_STRUCTP(r->out.rid);
11562 : }
11563 1255 : if (flags & NDR_OUT) {
11564 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11565 : if (r->in.domain_handle == NULL) {
11566 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11567 : NDR_ZERO_STRUCTP(r->in.domain_handle);
11568 : }
11569 : if (r->in.account_name == NULL) {
11570 : NDR_PULL_ALLOC(ndr, r->in.account_name);
11571 : NDR_ZERO_STRUCTP(r->in.account_name);
11572 : }
11573 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11574 628 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11575 74 : NDR_PULL_ALLOC(ndr, r->out.user_handle);
11576 : }
11577 628 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11578 628 : NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC);
11579 628 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle));
11580 628 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
11581 628 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11582 74 : NDR_PULL_ALLOC(ndr, r->out.access_granted);
11583 : }
11584 628 : _mem_save_access_granted_0 = NDR_PULL_GET_MEM_CTX(ndr);
11585 628 : NDR_PULL_SET_MEM_CTX(ndr, r->out.access_granted, LIBNDR_FLAG_REF_ALLOC);
11586 628 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.access_granted));
11587 628 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_granted_0, LIBNDR_FLAG_REF_ALLOC);
11588 628 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11589 74 : NDR_PULL_ALLOC(ndr, r->out.rid);
11590 : }
11591 628 : _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
11592 628 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
11593 628 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
11594 628 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
11595 628 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11596 : }
11597 1255 : return NDR_ERR_SUCCESS;
11598 : }
11599 :
11600 138 : _PUBLIC_ void ndr_print_samr_CreateUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser2 *r)
11601 : {
11602 138 : ndr_print_struct(ndr, name, "samr_CreateUser2");
11603 138 : if (r == NULL) { ndr_print_null(ndr); return; }
11604 138 : ndr->depth++;
11605 138 : if (flags & NDR_SET_VALUES) {
11606 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11607 : }
11608 138 : if (flags & NDR_IN) {
11609 0 : ndr_print_struct(ndr, "in", "samr_CreateUser2");
11610 0 : ndr->depth++;
11611 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
11612 0 : ndr->depth++;
11613 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
11614 0 : ndr->depth--;
11615 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
11616 0 : ndr->depth++;
11617 0 : ndr_print_lsa_String(ndr, "account_name", r->in.account_name);
11618 0 : ndr->depth--;
11619 0 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags);
11620 0 : ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask);
11621 0 : ndr->depth--;
11622 : }
11623 138 : if (flags & NDR_OUT) {
11624 138 : ndr_print_struct(ndr, "out", "samr_CreateUser2");
11625 138 : ndr->depth++;
11626 138 : ndr_print_ptr(ndr, "user_handle", r->out.user_handle);
11627 138 : ndr->depth++;
11628 138 : ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle);
11629 138 : ndr->depth--;
11630 138 : ndr_print_ptr(ndr, "access_granted", r->out.access_granted);
11631 138 : ndr->depth++;
11632 138 : ndr_print_uint32(ndr, "access_granted", *r->out.access_granted);
11633 138 : ndr->depth--;
11634 138 : ndr_print_ptr(ndr, "rid", r->out.rid);
11635 138 : ndr->depth++;
11636 138 : ndr_print_uint32(ndr, "rid", *r->out.rid);
11637 138 : ndr->depth--;
11638 138 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11639 138 : ndr->depth--;
11640 : }
11641 138 : ndr->depth--;
11642 : }
11643 :
11644 60 : static enum ndr_err_code ndr_push_samr_QueryDisplayInfo3(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo3 *r)
11645 : {
11646 60 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11647 60 : if (flags & NDR_IN) {
11648 30 : if (r->in.domain_handle == NULL) {
11649 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11650 : }
11651 30 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11652 30 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
11653 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx));
11654 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries));
11655 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
11656 : }
11657 60 : if (flags & NDR_OUT) {
11658 30 : if (r->out.total_size == NULL) {
11659 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11660 : }
11661 30 : if (r->out.returned_size == NULL) {
11662 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11663 : }
11664 30 : if (r->out.info == NULL) {
11665 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11666 : }
11667 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size));
11668 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size));
11669 30 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
11670 30 : NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
11671 30 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11672 : }
11673 60 : return NDR_ERR_SUCCESS;
11674 : }
11675 :
11676 60 : static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo3(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo3 *r)
11677 : {
11678 60 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
11679 60 : TALLOC_CTX *_mem_save_total_size_0 = NULL;
11680 60 : TALLOC_CTX *_mem_save_returned_size_0 = NULL;
11681 60 : TALLOC_CTX *_mem_save_info_0 = NULL;
11682 60 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11683 60 : if (flags & NDR_IN) {
11684 30 : NDR_ZERO_STRUCT(r->out);
11685 :
11686 30 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11687 30 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11688 : }
11689 30 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11690 30 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
11691 30 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
11692 30 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
11693 30 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
11694 30 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx));
11695 30 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries));
11696 30 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
11697 30 : NDR_PULL_ALLOC(ndr, r->out.total_size);
11698 30 : NDR_ZERO_STRUCTP(r->out.total_size);
11699 30 : NDR_PULL_ALLOC(ndr, r->out.returned_size);
11700 30 : NDR_ZERO_STRUCTP(r->out.returned_size);
11701 30 : NDR_PULL_ALLOC(ndr, r->out.info);
11702 30 : NDR_ZERO_STRUCTP(r->out.info);
11703 : }
11704 60 : if (flags & NDR_OUT) {
11705 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11706 : if (r->in.domain_handle == NULL) {
11707 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
11708 : NDR_ZERO_STRUCTP(r->in.domain_handle);
11709 : }
11710 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11711 30 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11712 0 : NDR_PULL_ALLOC(ndr, r->out.total_size);
11713 : }
11714 30 : _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
11715 30 : NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC);
11716 30 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size));
11717 30 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC);
11718 30 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11719 0 : NDR_PULL_ALLOC(ndr, r->out.returned_size);
11720 : }
11721 30 : _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
11722 30 : NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC);
11723 30 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size));
11724 30 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC);
11725 30 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11726 0 : NDR_PULL_ALLOC(ndr, r->out.info);
11727 : }
11728 30 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11729 30 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
11730 30 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
11731 30 : NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
11732 30 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11733 30 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11734 : }
11735 60 : return NDR_ERR_SUCCESS;
11736 : }
11737 :
11738 0 : _PUBLIC_ void ndr_print_samr_QueryDisplayInfo3(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo3 *r)
11739 : {
11740 0 : ndr_print_struct(ndr, name, "samr_QueryDisplayInfo3");
11741 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11742 0 : ndr->depth++;
11743 0 : if (flags & NDR_SET_VALUES) {
11744 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11745 : }
11746 0 : if (flags & NDR_IN) {
11747 0 : ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo3");
11748 0 : ndr->depth++;
11749 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
11750 0 : ndr->depth++;
11751 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
11752 0 : ndr->depth--;
11753 0 : ndr_print_uint16(ndr, "level", r->in.level);
11754 0 : ndr_print_uint32(ndr, "start_idx", r->in.start_idx);
11755 0 : ndr_print_uint32(ndr, "max_entries", r->in.max_entries);
11756 0 : ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
11757 0 : ndr->depth--;
11758 : }
11759 0 : if (flags & NDR_OUT) {
11760 0 : ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo3");
11761 0 : ndr->depth++;
11762 0 : ndr_print_ptr(ndr, "total_size", r->out.total_size);
11763 0 : ndr->depth++;
11764 0 : ndr_print_uint32(ndr, "total_size", *r->out.total_size);
11765 0 : ndr->depth--;
11766 0 : ndr_print_ptr(ndr, "returned_size", r->out.returned_size);
11767 0 : ndr->depth++;
11768 0 : ndr_print_uint32(ndr, "returned_size", *r->out.returned_size);
11769 0 : ndr->depth--;
11770 0 : ndr_print_ptr(ndr, "info", r->out.info);
11771 0 : ndr->depth++;
11772 0 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
11773 0 : ndr_print_samr_DispInfo(ndr, "info", r->out.info);
11774 0 : ndr->depth--;
11775 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11776 0 : ndr->depth--;
11777 : }
11778 0 : ndr->depth--;
11779 : }
11780 :
11781 0 : static enum ndr_err_code ndr_push_samr_AddMultipleMembersToAlias(struct ndr_push *ndr, int flags, const struct samr_AddMultipleMembersToAlias *r)
11782 : {
11783 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11784 0 : if (flags & NDR_IN) {
11785 0 : if (r->in.alias_handle == NULL) {
11786 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11787 : }
11788 0 : if (r->in.sids == NULL) {
11789 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11790 : }
11791 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
11792 0 : NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11793 : }
11794 0 : if (flags & NDR_OUT) {
11795 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11796 : }
11797 0 : return NDR_ERR_SUCCESS;
11798 : }
11799 :
11800 0 : static enum ndr_err_code ndr_pull_samr_AddMultipleMembersToAlias(struct ndr_pull *ndr, int flags, struct samr_AddMultipleMembersToAlias *r)
11801 : {
11802 0 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
11803 0 : TALLOC_CTX *_mem_save_sids_0 = NULL;
11804 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11805 0 : if (flags & NDR_IN) {
11806 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11807 0 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
11808 : }
11809 0 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11810 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
11811 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
11812 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
11813 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11814 0 : NDR_PULL_ALLOC(ndr, r->in.sids);
11815 : }
11816 0 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11817 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11818 0 : NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11819 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11820 : }
11821 0 : if (flags & NDR_OUT) {
11822 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11823 : if (r->in.alias_handle == NULL) {
11824 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
11825 : NDR_ZERO_STRUCTP(r->in.alias_handle);
11826 : }
11827 : if (r->in.sids == NULL) {
11828 : NDR_PULL_ALLOC(ndr, r->in.sids);
11829 : NDR_ZERO_STRUCTP(r->in.sids);
11830 : }
11831 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11832 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11833 : }
11834 0 : return NDR_ERR_SUCCESS;
11835 : }
11836 :
11837 0 : _PUBLIC_ void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddMultipleMembersToAlias *r)
11838 : {
11839 0 : ndr_print_struct(ndr, name, "samr_AddMultipleMembersToAlias");
11840 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11841 0 : ndr->depth++;
11842 0 : if (flags & NDR_SET_VALUES) {
11843 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11844 : }
11845 0 : if (flags & NDR_IN) {
11846 0 : ndr_print_struct(ndr, "in", "samr_AddMultipleMembersToAlias");
11847 0 : ndr->depth++;
11848 0 : ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
11849 0 : ndr->depth++;
11850 0 : ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
11851 0 : ndr->depth--;
11852 0 : ndr_print_ptr(ndr, "sids", r->in.sids);
11853 0 : ndr->depth++;
11854 0 : ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
11855 0 : ndr->depth--;
11856 0 : ndr->depth--;
11857 : }
11858 0 : if (flags & NDR_OUT) {
11859 0 : ndr_print_struct(ndr, "out", "samr_AddMultipleMembersToAlias");
11860 0 : ndr->depth++;
11861 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11862 0 : ndr->depth--;
11863 : }
11864 0 : ndr->depth--;
11865 : }
11866 :
11867 0 : static enum ndr_err_code ndr_push_samr_RemoveMultipleMembersFromAlias(struct ndr_push *ndr, int flags, const struct samr_RemoveMultipleMembersFromAlias *r)
11868 : {
11869 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11870 0 : if (flags & NDR_IN) {
11871 0 : if (r->in.alias_handle == NULL) {
11872 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11873 : }
11874 0 : if (r->in.sids == NULL) {
11875 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11876 : }
11877 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
11878 0 : NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11879 : }
11880 0 : if (flags & NDR_OUT) {
11881 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11882 : }
11883 0 : return NDR_ERR_SUCCESS;
11884 : }
11885 :
11886 0 : static enum ndr_err_code ndr_pull_samr_RemoveMultipleMembersFromAlias(struct ndr_pull *ndr, int flags, struct samr_RemoveMultipleMembersFromAlias *r)
11887 : {
11888 0 : TALLOC_CTX *_mem_save_alias_handle_0 = NULL;
11889 0 : TALLOC_CTX *_mem_save_sids_0 = NULL;
11890 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11891 0 : if (flags & NDR_IN) {
11892 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11893 0 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
11894 : }
11895 0 : _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11896 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC);
11897 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle));
11898 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC);
11899 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11900 0 : NDR_PULL_ALLOC(ndr, r->in.sids);
11901 : }
11902 0 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11903 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11904 0 : NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11905 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11906 : }
11907 0 : if (flags & NDR_OUT) {
11908 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11909 : if (r->in.alias_handle == NULL) {
11910 : NDR_PULL_ALLOC(ndr, r->in.alias_handle);
11911 : NDR_ZERO_STRUCTP(r->in.alias_handle);
11912 : }
11913 : if (r->in.sids == NULL) {
11914 : NDR_PULL_ALLOC(ndr, r->in.sids);
11915 : NDR_ZERO_STRUCTP(r->in.sids);
11916 : }
11917 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11918 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11919 : }
11920 0 : return NDR_ERR_SUCCESS;
11921 : }
11922 :
11923 0 : _PUBLIC_ void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMultipleMembersFromAlias *r)
11924 : {
11925 0 : ndr_print_struct(ndr, name, "samr_RemoveMultipleMembersFromAlias");
11926 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11927 0 : ndr->depth++;
11928 0 : if (flags & NDR_SET_VALUES) {
11929 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11930 : }
11931 0 : if (flags & NDR_IN) {
11932 0 : ndr_print_struct(ndr, "in", "samr_RemoveMultipleMembersFromAlias");
11933 0 : ndr->depth++;
11934 0 : ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle);
11935 0 : ndr->depth++;
11936 0 : ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle);
11937 0 : ndr->depth--;
11938 0 : ndr_print_ptr(ndr, "sids", r->in.sids);
11939 0 : ndr->depth++;
11940 0 : ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
11941 0 : ndr->depth--;
11942 0 : ndr->depth--;
11943 : }
11944 0 : if (flags & NDR_OUT) {
11945 0 : ndr_print_struct(ndr, "out", "samr_RemoveMultipleMembersFromAlias");
11946 0 : ndr->depth++;
11947 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11948 0 : ndr->depth--;
11949 : }
11950 0 : ndr->depth--;
11951 : }
11952 :
11953 48 : static enum ndr_err_code ndr_push_samr_OemChangePasswordUser2(struct ndr_push *ndr, int flags, const struct samr_OemChangePasswordUser2 *r)
11954 : {
11955 48 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11956 48 : if (flags & NDR_IN) {
11957 24 : if (r->in.account == NULL) {
11958 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11959 : }
11960 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
11961 24 : if (r->in.server) {
11962 24 : NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
11963 : }
11964 24 : NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
11965 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
11966 24 : if (r->in.password) {
11967 24 : NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password));
11968 : }
11969 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hash));
11970 24 : if (r->in.hash) {
11971 24 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.hash));
11972 : }
11973 : }
11974 48 : if (flags & NDR_OUT) {
11975 24 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11976 : }
11977 48 : return NDR_ERR_SUCCESS;
11978 : }
11979 :
11980 48 : static enum ndr_err_code ndr_pull_samr_OemChangePasswordUser2(struct ndr_pull *ndr, int flags, struct samr_OemChangePasswordUser2 *r)
11981 : {
11982 : uint32_t _ptr_server;
11983 : uint32_t _ptr_password;
11984 : uint32_t _ptr_hash;
11985 48 : TALLOC_CTX *_mem_save_server_0 = NULL;
11986 48 : TALLOC_CTX *_mem_save_account_0 = NULL;
11987 48 : TALLOC_CTX *_mem_save_password_0 = NULL;
11988 48 : TALLOC_CTX *_mem_save_hash_0 = NULL;
11989 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11990 48 : if (flags & NDR_IN) {
11991 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
11992 24 : if (_ptr_server) {
11993 24 : NDR_PULL_ALLOC(ndr, r->in.server);
11994 : } else {
11995 0 : r->in.server = NULL;
11996 : }
11997 24 : if (r->in.server) {
11998 24 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
11999 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
12000 24 : NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
12001 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
12002 : }
12003 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12004 24 : NDR_PULL_ALLOC(ndr, r->in.account);
12005 : }
12006 24 : _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
12007 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
12008 24 : NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
12009 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
12010 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
12011 24 : if (_ptr_password) {
12012 24 : NDR_PULL_ALLOC(ndr, r->in.password);
12013 : } else {
12014 0 : r->in.password = NULL;
12015 : }
12016 24 : if (r->in.password) {
12017 24 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
12018 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
12019 24 : NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password));
12020 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
12021 : }
12022 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hash));
12023 24 : if (_ptr_hash) {
12024 24 : NDR_PULL_ALLOC(ndr, r->in.hash);
12025 : } else {
12026 0 : r->in.hash = NULL;
12027 : }
12028 24 : if (r->in.hash) {
12029 24 : _mem_save_hash_0 = NDR_PULL_GET_MEM_CTX(ndr);
12030 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.hash, 0);
12031 24 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.hash));
12032 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hash_0, 0);
12033 : }
12034 : }
12035 48 : if (flags & NDR_OUT) {
12036 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12037 : if (r->in.account == NULL) {
12038 : NDR_PULL_ALLOC(ndr, r->in.account);
12039 : NDR_ZERO_STRUCTP(r->in.account);
12040 : }
12041 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12042 24 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12043 : }
12044 48 : return NDR_ERR_SUCCESS;
12045 : }
12046 :
12047 0 : _PUBLIC_ void ndr_print_samr_OemChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_OemChangePasswordUser2 *r)
12048 : {
12049 0 : ndr_print_struct(ndr, name, "samr_OemChangePasswordUser2");
12050 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12051 0 : ndr->depth++;
12052 0 : if (flags & NDR_SET_VALUES) {
12053 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12054 : }
12055 0 : if (flags & NDR_IN) {
12056 0 : ndr_print_struct(ndr, "in", "samr_OemChangePasswordUser2");
12057 0 : ndr->depth++;
12058 0 : ndr_print_ptr(ndr, "server", r->in.server);
12059 0 : ndr->depth++;
12060 0 : if (r->in.server) {
12061 0 : ndr_print_lsa_AsciiString(ndr, "server", r->in.server);
12062 : }
12063 0 : ndr->depth--;
12064 0 : ndr_print_ptr(ndr, "account", r->in.account);
12065 0 : ndr->depth++;
12066 0 : ndr_print_lsa_AsciiString(ndr, "account", r->in.account);
12067 0 : ndr->depth--;
12068 0 : ndr_print_ptr(ndr, "password", r->in.password);
12069 0 : ndr->depth++;
12070 0 : if (r->in.password) {
12071 0 : ndr_print_samr_CryptPassword(ndr, "password", r->in.password);
12072 : }
12073 0 : ndr->depth--;
12074 0 : ndr_print_ptr(ndr, "hash", r->in.hash);
12075 0 : ndr->depth++;
12076 0 : if (r->in.hash) {
12077 0 : ndr_print_samr_Password(ndr, "hash", r->in.hash);
12078 : }
12079 0 : ndr->depth--;
12080 0 : ndr->depth--;
12081 : }
12082 0 : if (flags & NDR_OUT) {
12083 0 : ndr_print_struct(ndr, "out", "samr_OemChangePasswordUser2");
12084 0 : ndr->depth++;
12085 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12086 0 : ndr->depth--;
12087 : }
12088 0 : ndr->depth--;
12089 : }
12090 :
12091 324 : static enum ndr_err_code ndr_push_samr_ChangePasswordUser2(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser2 *r)
12092 : {
12093 324 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12094 324 : if (flags & NDR_IN) {
12095 162 : if (r->in.account == NULL) {
12096 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12097 : }
12098 162 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
12099 162 : if (r->in.server) {
12100 162 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
12101 : }
12102 162 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
12103 162 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_password));
12104 162 : if (r->in.nt_password) {
12105 158 : NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
12106 : }
12107 162 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_verifier));
12108 162 : if (r->in.nt_verifier) {
12109 158 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
12110 : }
12111 162 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_change));
12112 162 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_password));
12113 162 : if (r->in.lm_password) {
12114 158 : NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
12115 : }
12116 162 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_verifier));
12117 162 : if (r->in.lm_verifier) {
12118 158 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
12119 : }
12120 : }
12121 324 : if (flags & NDR_OUT) {
12122 162 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12123 : }
12124 324 : return NDR_ERR_SUCCESS;
12125 : }
12126 :
12127 324 : static enum ndr_err_code ndr_pull_samr_ChangePasswordUser2(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser2 *r)
12128 : {
12129 : uint32_t _ptr_server;
12130 : uint32_t _ptr_nt_password;
12131 : uint32_t _ptr_nt_verifier;
12132 : uint32_t _ptr_lm_password;
12133 : uint32_t _ptr_lm_verifier;
12134 324 : TALLOC_CTX *_mem_save_server_0 = NULL;
12135 324 : TALLOC_CTX *_mem_save_account_0 = NULL;
12136 324 : TALLOC_CTX *_mem_save_nt_password_0 = NULL;
12137 324 : TALLOC_CTX *_mem_save_nt_verifier_0 = NULL;
12138 324 : TALLOC_CTX *_mem_save_lm_password_0 = NULL;
12139 324 : TALLOC_CTX *_mem_save_lm_verifier_0 = NULL;
12140 324 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12141 324 : if (flags & NDR_IN) {
12142 162 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
12143 162 : if (_ptr_server) {
12144 162 : NDR_PULL_ALLOC(ndr, r->in.server);
12145 : } else {
12146 0 : r->in.server = NULL;
12147 : }
12148 162 : if (r->in.server) {
12149 162 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
12150 162 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
12151 162 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
12152 162 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
12153 : }
12154 162 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12155 162 : NDR_PULL_ALLOC(ndr, r->in.account);
12156 : }
12157 162 : _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
12158 162 : NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
12159 162 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
12160 162 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
12161 162 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_password));
12162 162 : if (_ptr_nt_password) {
12163 160 : NDR_PULL_ALLOC(ndr, r->in.nt_password);
12164 : } else {
12165 2 : r->in.nt_password = NULL;
12166 : }
12167 162 : if (r->in.nt_password) {
12168 160 : _mem_save_nt_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
12169 160 : NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_password, 0);
12170 160 : NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
12171 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_password_0, 0);
12172 : }
12173 162 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_verifier));
12174 162 : if (_ptr_nt_verifier) {
12175 160 : NDR_PULL_ALLOC(ndr, r->in.nt_verifier);
12176 : } else {
12177 2 : r->in.nt_verifier = NULL;
12178 : }
12179 162 : if (r->in.nt_verifier) {
12180 160 : _mem_save_nt_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
12181 160 : NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_verifier, 0);
12182 160 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
12183 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_verifier_0, 0);
12184 : }
12185 162 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_change));
12186 162 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_password));
12187 162 : if (_ptr_lm_password) {
12188 160 : NDR_PULL_ALLOC(ndr, r->in.lm_password);
12189 : } else {
12190 2 : r->in.lm_password = NULL;
12191 : }
12192 162 : if (r->in.lm_password) {
12193 160 : _mem_save_lm_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
12194 160 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_password, 0);
12195 160 : NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
12196 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_password_0, 0);
12197 : }
12198 162 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_verifier));
12199 162 : if (_ptr_lm_verifier) {
12200 160 : NDR_PULL_ALLOC(ndr, r->in.lm_verifier);
12201 : } else {
12202 2 : r->in.lm_verifier = NULL;
12203 : }
12204 162 : if (r->in.lm_verifier) {
12205 160 : _mem_save_lm_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
12206 160 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_verifier, 0);
12207 160 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
12208 160 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_verifier_0, 0);
12209 : }
12210 : }
12211 324 : if (flags & NDR_OUT) {
12212 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12213 : if (r->in.account == NULL) {
12214 : NDR_PULL_ALLOC(ndr, r->in.account);
12215 : NDR_ZERO_STRUCTP(r->in.account);
12216 : }
12217 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12218 162 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12219 : }
12220 324 : return NDR_ERR_SUCCESS;
12221 : }
12222 :
12223 0 : _PUBLIC_ void ndr_print_samr_ChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser2 *r)
12224 : {
12225 0 : ndr_print_struct(ndr, name, "samr_ChangePasswordUser2");
12226 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12227 0 : ndr->depth++;
12228 0 : if (flags & NDR_SET_VALUES) {
12229 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12230 : }
12231 0 : if (flags & NDR_IN) {
12232 0 : ndr_print_struct(ndr, "in", "samr_ChangePasswordUser2");
12233 0 : ndr->depth++;
12234 0 : ndr_print_ptr(ndr, "server", r->in.server);
12235 0 : ndr->depth++;
12236 0 : if (r->in.server) {
12237 0 : ndr_print_lsa_String(ndr, "server", r->in.server);
12238 : }
12239 0 : ndr->depth--;
12240 0 : ndr_print_ptr(ndr, "account", r->in.account);
12241 0 : ndr->depth++;
12242 0 : ndr_print_lsa_String(ndr, "account", r->in.account);
12243 0 : ndr->depth--;
12244 0 : ndr_print_ptr(ndr, "nt_password", r->in.nt_password);
12245 0 : ndr->depth++;
12246 0 : if (r->in.nt_password) {
12247 0 : ndr_print_samr_CryptPassword(ndr, "nt_password", r->in.nt_password);
12248 : }
12249 0 : ndr->depth--;
12250 0 : ndr_print_ptr(ndr, "nt_verifier", r->in.nt_verifier);
12251 0 : ndr->depth++;
12252 0 : if (r->in.nt_verifier) {
12253 0 : ndr_print_samr_Password(ndr, "nt_verifier", r->in.nt_verifier);
12254 : }
12255 0 : ndr->depth--;
12256 0 : ndr_print_uint8(ndr, "lm_change", r->in.lm_change);
12257 0 : ndr_print_ptr(ndr, "lm_password", r->in.lm_password);
12258 0 : ndr->depth++;
12259 0 : if (r->in.lm_password) {
12260 0 : ndr_print_samr_CryptPassword(ndr, "lm_password", r->in.lm_password);
12261 : }
12262 0 : ndr->depth--;
12263 0 : ndr_print_ptr(ndr, "lm_verifier", r->in.lm_verifier);
12264 0 : ndr->depth++;
12265 0 : if (r->in.lm_verifier) {
12266 0 : ndr_print_samr_Password(ndr, "lm_verifier", r->in.lm_verifier);
12267 : }
12268 0 : ndr->depth--;
12269 0 : ndr->depth--;
12270 : }
12271 0 : if (flags & NDR_OUT) {
12272 0 : ndr_print_struct(ndr, "out", "samr_ChangePasswordUser2");
12273 0 : ndr->depth++;
12274 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12275 0 : ndr->depth--;
12276 : }
12277 0 : ndr->depth--;
12278 : }
12279 :
12280 3928 : static enum ndr_err_code ndr_push_samr_GetDomPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetDomPwInfo *r)
12281 : {
12282 3928 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12283 3928 : if (flags & NDR_IN) {
12284 1784 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
12285 1784 : if (r->in.domain_name) {
12286 1784 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
12287 : }
12288 : }
12289 3928 : if (flags & NDR_OUT) {
12290 2144 : if (r->out.info == NULL) {
12291 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12292 : }
12293 2144 : NDR_CHECK(ndr_push_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
12294 2144 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12295 : }
12296 3928 : return NDR_ERR_SUCCESS;
12297 : }
12298 :
12299 3568 : static enum ndr_err_code ndr_pull_samr_GetDomPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetDomPwInfo *r)
12300 : {
12301 : uint32_t _ptr_domain_name;
12302 3568 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
12303 3568 : TALLOC_CTX *_mem_save_info_0 = NULL;
12304 3568 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12305 3568 : if (flags & NDR_IN) {
12306 1784 : NDR_ZERO_STRUCT(r->out);
12307 :
12308 1784 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
12309 1784 : if (_ptr_domain_name) {
12310 1784 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
12311 : } else {
12312 0 : r->in.domain_name = NULL;
12313 : }
12314 1784 : if (r->in.domain_name) {
12315 1784 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12316 1784 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
12317 1784 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name));
12318 1784 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
12319 : }
12320 1784 : NDR_PULL_ALLOC(ndr, r->out.info);
12321 1784 : NDR_ZERO_STRUCTP(r->out.info);
12322 : }
12323 3568 : if (flags & NDR_OUT) {
12324 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12325 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12326 1784 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12327 360 : NDR_PULL_ALLOC(ndr, r->out.info);
12328 : }
12329 1784 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
12330 1784 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
12331 1784 : NDR_CHECK(ndr_pull_samr_PwInfo(ndr, NDR_SCALARS, r->out.info));
12332 1784 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
12333 1784 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12334 : }
12335 3568 : return NDR_ERR_SUCCESS;
12336 : }
12337 :
12338 720 : _PUBLIC_ void ndr_print_samr_GetDomPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDomPwInfo *r)
12339 : {
12340 720 : ndr_print_struct(ndr, name, "samr_GetDomPwInfo");
12341 720 : if (r == NULL) { ndr_print_null(ndr); return; }
12342 720 : ndr->depth++;
12343 720 : if (flags & NDR_SET_VALUES) {
12344 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12345 : }
12346 720 : if (flags & NDR_IN) {
12347 0 : ndr_print_struct(ndr, "in", "samr_GetDomPwInfo");
12348 0 : ndr->depth++;
12349 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
12350 0 : ndr->depth++;
12351 0 : if (r->in.domain_name) {
12352 0 : ndr_print_lsa_String(ndr, "domain_name", r->in.domain_name);
12353 : }
12354 0 : ndr->depth--;
12355 0 : ndr->depth--;
12356 : }
12357 720 : if (flags & NDR_OUT) {
12358 720 : ndr_print_struct(ndr, "out", "samr_GetDomPwInfo");
12359 720 : ndr->depth++;
12360 720 : ndr_print_ptr(ndr, "info", r->out.info);
12361 720 : ndr->depth++;
12362 720 : ndr_print_samr_PwInfo(ndr, "info", r->out.info);
12363 720 : ndr->depth--;
12364 720 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12365 720 : ndr->depth--;
12366 : }
12367 720 : ndr->depth--;
12368 : }
12369 :
12370 1538 : static enum ndr_err_code ndr_push_samr_Connect2(struct ndr_push *ndr, int flags, const struct samr_Connect2 *r)
12371 : {
12372 1538 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12373 1538 : if (flags & NDR_IN) {
12374 664 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
12375 664 : if (r->in.system_name) {
12376 141 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12377 141 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12378 141 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12379 141 : 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));
12380 : }
12381 664 : NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
12382 : }
12383 1538 : if (flags & NDR_OUT) {
12384 874 : if (r->out.connect_handle == NULL) {
12385 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12386 : }
12387 874 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12388 874 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12389 : }
12390 1538 : return NDR_ERR_SUCCESS;
12391 : }
12392 :
12393 1538 : static enum ndr_err_code ndr_pull_samr_Connect2(struct ndr_pull *ndr, int flags, struct samr_Connect2 *r)
12394 : {
12395 : uint32_t _ptr_system_name;
12396 1538 : uint32_t size_system_name_1 = 0;
12397 1538 : uint32_t length_system_name_1 = 0;
12398 1538 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
12399 1538 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
12400 1538 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12401 1538 : if (flags & NDR_IN) {
12402 874 : NDR_ZERO_STRUCT(r->out);
12403 :
12404 874 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
12405 874 : if (_ptr_system_name) {
12406 351 : NDR_PULL_ALLOC(ndr, r->in.system_name);
12407 : } else {
12408 523 : r->in.system_name = NULL;
12409 : }
12410 874 : if (r->in.system_name) {
12411 351 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12412 351 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
12413 351 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
12414 351 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
12415 351 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.system_name, &size_system_name_1));
12416 351 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.system_name, &length_system_name_1));
12417 351 : if (length_system_name_1 > size_system_name_1) {
12418 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
12419 : }
12420 351 : NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
12421 351 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
12422 351 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
12423 : }
12424 874 : NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
12425 874 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12426 874 : NDR_ZERO_STRUCTP(r->out.connect_handle);
12427 : }
12428 1538 : if (flags & NDR_OUT) {
12429 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12430 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12431 664 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12432 598 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12433 : }
12434 664 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12435 664 : NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
12436 664 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12437 664 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
12438 664 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12439 : }
12440 1538 : return NDR_ERR_SUCCESS;
12441 : }
12442 :
12443 0 : _PUBLIC_ void ndr_print_samr_Connect2(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect2 *r)
12444 : {
12445 0 : ndr_print_struct(ndr, name, "samr_Connect2");
12446 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12447 0 : ndr->depth++;
12448 0 : if (flags & NDR_SET_VALUES) {
12449 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12450 : }
12451 0 : if (flags & NDR_IN) {
12452 0 : ndr_print_struct(ndr, "in", "samr_Connect2");
12453 0 : ndr->depth++;
12454 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
12455 0 : ndr->depth++;
12456 0 : if (r->in.system_name) {
12457 0 : ndr_print_string(ndr, "system_name", r->in.system_name);
12458 : }
12459 0 : ndr->depth--;
12460 0 : ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
12461 0 : ndr->depth--;
12462 : }
12463 0 : if (flags & NDR_OUT) {
12464 0 : ndr_print_struct(ndr, "out", "samr_Connect2");
12465 0 : ndr->depth++;
12466 0 : ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
12467 0 : ndr->depth++;
12468 0 : ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
12469 0 : ndr->depth--;
12470 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12471 0 : ndr->depth--;
12472 : }
12473 0 : ndr->depth--;
12474 : }
12475 :
12476 2901 : _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo2(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo2 *r)
12477 : {
12478 2901 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12479 2901 : if (flags & NDR_IN) {
12480 1419 : if (r->in.user_handle == NULL) {
12481 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12482 : }
12483 1419 : if (r->in.info == NULL) {
12484 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12485 : }
12486 1419 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
12487 1419 : NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
12488 1419 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
12489 1419 : NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
12490 : }
12491 2901 : if (flags & NDR_OUT) {
12492 1482 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12493 : }
12494 2901 : return NDR_ERR_SUCCESS;
12495 : }
12496 :
12497 2835 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo2 *r)
12498 : {
12499 2835 : TALLOC_CTX *_mem_save_user_handle_0 = NULL;
12500 2835 : TALLOC_CTX *_mem_save_info_0 = NULL;
12501 2835 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12502 2835 : if (flags & NDR_IN) {
12503 1416 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12504 1416 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
12505 : }
12506 1416 : _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12507 1416 : NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
12508 1416 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
12509 1416 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
12510 1416 : NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
12511 1416 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12512 1416 : NDR_PULL_ALLOC(ndr, r->in.info);
12513 : }
12514 1416 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
12515 1416 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
12516 1416 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
12517 1416 : NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
12518 1416 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
12519 : }
12520 2835 : if (flags & NDR_OUT) {
12521 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12522 : if (r->in.user_handle == NULL) {
12523 : NDR_PULL_ALLOC(ndr, r->in.user_handle);
12524 : NDR_ZERO_STRUCTP(r->in.user_handle);
12525 : }
12526 : if (r->in.info == NULL) {
12527 : NDR_PULL_ALLOC(ndr, r->in.info);
12528 : NDR_ZERO_STRUCTP(r->in.info);
12529 : }
12530 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12531 1419 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12532 : }
12533 2835 : return NDR_ERR_SUCCESS;
12534 : }
12535 :
12536 132 : _PUBLIC_ void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo2 *r)
12537 : {
12538 132 : ndr_print_struct(ndr, name, "samr_SetUserInfo2");
12539 132 : if (r == NULL) { ndr_print_null(ndr); return; }
12540 132 : ndr->depth++;
12541 132 : if (flags & NDR_SET_VALUES) {
12542 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12543 : }
12544 132 : if (flags & NDR_IN) {
12545 0 : ndr_print_struct(ndr, "in", "samr_SetUserInfo2");
12546 0 : ndr->depth++;
12547 0 : ndr_print_ptr(ndr, "user_handle", r->in.user_handle);
12548 0 : ndr->depth++;
12549 0 : ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
12550 0 : ndr->depth--;
12551 0 : ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
12552 0 : ndr_print_ptr(ndr, "info", r->in.info);
12553 0 : ndr->depth++;
12554 0 : ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
12555 0 : ndr_print_samr_UserInfo(ndr, "info", r->in.info);
12556 0 : ndr->depth--;
12557 0 : ndr->depth--;
12558 : }
12559 132 : if (flags & NDR_OUT) {
12560 132 : ndr_print_struct(ndr, "out", "samr_SetUserInfo2");
12561 132 : ndr->depth++;
12562 132 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12563 132 : ndr->depth--;
12564 : }
12565 132 : ndr->depth--;
12566 : }
12567 :
12568 0 : static enum ndr_err_code ndr_push_samr_SetBootKeyInformation(struct ndr_push *ndr, int flags, const struct samr_SetBootKeyInformation *r)
12569 : {
12570 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12571 0 : if (flags & NDR_IN) {
12572 0 : if (r->in.connect_handle == NULL) {
12573 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12574 : }
12575 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
12576 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
12577 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
12578 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
12579 : }
12580 0 : if (flags & NDR_OUT) {
12581 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12582 : }
12583 0 : return NDR_ERR_SUCCESS;
12584 : }
12585 :
12586 0 : static enum ndr_err_code ndr_pull_samr_SetBootKeyInformation(struct ndr_pull *ndr, int flags, struct samr_SetBootKeyInformation *r)
12587 : {
12588 0 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
12589 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12590 0 : if (flags & NDR_IN) {
12591 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12592 0 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
12593 : }
12594 0 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12595 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC);
12596 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle));
12597 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
12598 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
12599 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
12600 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
12601 : }
12602 0 : if (flags & NDR_OUT) {
12603 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12604 : if (r->in.connect_handle == NULL) {
12605 : NDR_PULL_ALLOC(ndr, r->in.connect_handle);
12606 : NDR_ZERO_STRUCTP(r->in.connect_handle);
12607 : }
12608 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12609 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12610 : }
12611 0 : return NDR_ERR_SUCCESS;
12612 : }
12613 :
12614 0 : _PUBLIC_ void ndr_print_samr_SetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetBootKeyInformation *r)
12615 : {
12616 0 : ndr_print_struct(ndr, name, "samr_SetBootKeyInformation");
12617 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12618 0 : ndr->depth++;
12619 0 : if (flags & NDR_SET_VALUES) {
12620 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12621 : }
12622 0 : if (flags & NDR_IN) {
12623 0 : ndr_print_struct(ndr, "in", "samr_SetBootKeyInformation");
12624 0 : ndr->depth++;
12625 0 : ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle);
12626 0 : ndr->depth++;
12627 0 : ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle);
12628 0 : ndr->depth--;
12629 0 : ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
12630 0 : ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
12631 0 : ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
12632 0 : ndr->depth--;
12633 : }
12634 0 : if (flags & NDR_OUT) {
12635 0 : ndr_print_struct(ndr, "out", "samr_SetBootKeyInformation");
12636 0 : ndr->depth++;
12637 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12638 0 : ndr->depth--;
12639 : }
12640 0 : ndr->depth--;
12641 : }
12642 :
12643 12 : static enum ndr_err_code ndr_push_samr_GetBootKeyInformation(struct ndr_push *ndr, int flags, const struct samr_GetBootKeyInformation *r)
12644 : {
12645 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12646 12 : if (flags & NDR_IN) {
12647 6 : if (r->in.domain_handle == NULL) {
12648 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12649 : }
12650 6 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
12651 : }
12652 12 : if (flags & NDR_OUT) {
12653 6 : if (r->out.unknown == NULL) {
12654 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12655 : }
12656 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown));
12657 6 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12658 : }
12659 12 : return NDR_ERR_SUCCESS;
12660 : }
12661 :
12662 12 : static enum ndr_err_code ndr_pull_samr_GetBootKeyInformation(struct ndr_pull *ndr, int flags, struct samr_GetBootKeyInformation *r)
12663 : {
12664 12 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
12665 12 : TALLOC_CTX *_mem_save_unknown_0 = NULL;
12666 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12667 12 : if (flags & NDR_IN) {
12668 6 : NDR_ZERO_STRUCT(r->out);
12669 :
12670 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12671 6 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
12672 : }
12673 6 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12674 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
12675 6 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
12676 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
12677 6 : NDR_PULL_ALLOC(ndr, r->out.unknown);
12678 6 : NDR_ZERO_STRUCTP(r->out.unknown);
12679 : }
12680 12 : if (flags & NDR_OUT) {
12681 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12682 : if (r->in.domain_handle == NULL) {
12683 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
12684 : NDR_ZERO_STRUCTP(r->in.domain_handle);
12685 : }
12686 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12687 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12688 0 : NDR_PULL_ALLOC(ndr, r->out.unknown);
12689 : }
12690 6 : _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
12691 6 : NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, LIBNDR_FLAG_REF_ALLOC);
12692 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown));
12693 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, LIBNDR_FLAG_REF_ALLOC);
12694 6 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12695 : }
12696 12 : return NDR_ERR_SUCCESS;
12697 : }
12698 :
12699 0 : _PUBLIC_ void ndr_print_samr_GetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetBootKeyInformation *r)
12700 : {
12701 0 : ndr_print_struct(ndr, name, "samr_GetBootKeyInformation");
12702 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12703 0 : ndr->depth++;
12704 0 : if (flags & NDR_SET_VALUES) {
12705 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12706 : }
12707 0 : if (flags & NDR_IN) {
12708 0 : ndr_print_struct(ndr, "in", "samr_GetBootKeyInformation");
12709 0 : ndr->depth++;
12710 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
12711 0 : ndr->depth++;
12712 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
12713 0 : ndr->depth--;
12714 0 : ndr->depth--;
12715 : }
12716 0 : if (flags & NDR_OUT) {
12717 0 : ndr_print_struct(ndr, "out", "samr_GetBootKeyInformation");
12718 0 : ndr->depth++;
12719 0 : ndr_print_ptr(ndr, "unknown", r->out.unknown);
12720 0 : ndr->depth++;
12721 0 : ndr_print_uint32(ndr, "unknown", *r->out.unknown);
12722 0 : ndr->depth--;
12723 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12724 0 : ndr->depth--;
12725 : }
12726 0 : ndr->depth--;
12727 : }
12728 :
12729 132 : static enum ndr_err_code ndr_push_samr_Connect3(struct ndr_push *ndr, int flags, const struct samr_Connect3 *r)
12730 : {
12731 132 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12732 132 : if (flags & NDR_IN) {
12733 66 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
12734 66 : if (r->in.system_name) {
12735 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12736 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12737 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12738 0 : 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));
12739 : }
12740 66 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
12741 66 : NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
12742 : }
12743 132 : if (flags & NDR_OUT) {
12744 66 : if (r->out.connect_handle == NULL) {
12745 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12746 : }
12747 66 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12748 66 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12749 : }
12750 132 : return NDR_ERR_SUCCESS;
12751 : }
12752 :
12753 132 : static enum ndr_err_code ndr_pull_samr_Connect3(struct ndr_pull *ndr, int flags, struct samr_Connect3 *r)
12754 : {
12755 : uint32_t _ptr_system_name;
12756 132 : uint32_t size_system_name_1 = 0;
12757 132 : uint32_t length_system_name_1 = 0;
12758 132 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
12759 132 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
12760 132 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12761 132 : if (flags & NDR_IN) {
12762 66 : NDR_ZERO_STRUCT(r->out);
12763 :
12764 66 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
12765 66 : if (_ptr_system_name) {
12766 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
12767 : } else {
12768 66 : r->in.system_name = NULL;
12769 : }
12770 66 : if (r->in.system_name) {
12771 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12772 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
12773 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
12774 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
12775 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.system_name, &size_system_name_1));
12776 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.system_name, &length_system_name_1));
12777 0 : if (length_system_name_1 > size_system_name_1) {
12778 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
12779 : }
12780 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
12781 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
12782 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
12783 : }
12784 66 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
12785 66 : NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
12786 66 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12787 66 : NDR_ZERO_STRUCTP(r->out.connect_handle);
12788 : }
12789 132 : if (flags & NDR_OUT) {
12790 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12791 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12792 66 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12793 0 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12794 : }
12795 66 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12796 66 : NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
12797 66 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12798 66 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
12799 66 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12800 : }
12801 132 : return NDR_ERR_SUCCESS;
12802 : }
12803 :
12804 0 : _PUBLIC_ void ndr_print_samr_Connect3(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect3 *r)
12805 : {
12806 0 : ndr_print_struct(ndr, name, "samr_Connect3");
12807 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12808 0 : ndr->depth++;
12809 0 : if (flags & NDR_SET_VALUES) {
12810 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12811 : }
12812 0 : if (flags & NDR_IN) {
12813 0 : ndr_print_struct(ndr, "in", "samr_Connect3");
12814 0 : ndr->depth++;
12815 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
12816 0 : ndr->depth++;
12817 0 : if (r->in.system_name) {
12818 0 : ndr_print_string(ndr, "system_name", r->in.system_name);
12819 : }
12820 0 : ndr->depth--;
12821 0 : ndr_print_uint32(ndr, "unknown", r->in.unknown);
12822 0 : ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
12823 0 : ndr->depth--;
12824 : }
12825 0 : if (flags & NDR_OUT) {
12826 0 : ndr_print_struct(ndr, "out", "samr_Connect3");
12827 0 : ndr->depth++;
12828 0 : ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
12829 0 : ndr->depth++;
12830 0 : ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
12831 0 : ndr->depth--;
12832 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12833 0 : ndr->depth--;
12834 : }
12835 0 : ndr->depth--;
12836 : }
12837 :
12838 132 : static enum ndr_err_code ndr_push_samr_Connect4(struct ndr_push *ndr, int flags, const struct samr_Connect4 *r)
12839 : {
12840 132 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12841 132 : if (flags & NDR_IN) {
12842 66 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
12843 66 : if (r->in.system_name) {
12844 66 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12845 66 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12846 66 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
12847 66 : 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));
12848 : }
12849 66 : NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->in.client_version));
12850 66 : NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
12851 : }
12852 132 : if (flags & NDR_OUT) {
12853 66 : if (r->out.connect_handle == NULL) {
12854 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12855 : }
12856 66 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12857 66 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12858 : }
12859 132 : return NDR_ERR_SUCCESS;
12860 : }
12861 :
12862 132 : static enum ndr_err_code ndr_pull_samr_Connect4(struct ndr_pull *ndr, int flags, struct samr_Connect4 *r)
12863 : {
12864 : uint32_t _ptr_system_name;
12865 132 : uint32_t size_system_name_1 = 0;
12866 132 : uint32_t length_system_name_1 = 0;
12867 132 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
12868 132 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
12869 132 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12870 132 : if (flags & NDR_IN) {
12871 66 : NDR_ZERO_STRUCT(r->out);
12872 :
12873 66 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
12874 66 : if (_ptr_system_name) {
12875 66 : NDR_PULL_ALLOC(ndr, r->in.system_name);
12876 : } else {
12877 0 : r->in.system_name = NULL;
12878 : }
12879 66 : if (r->in.system_name) {
12880 66 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12881 66 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
12882 66 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
12883 66 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
12884 66 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.system_name, &size_system_name_1));
12885 66 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.system_name, &length_system_name_1));
12886 66 : if (length_system_name_1 > size_system_name_1) {
12887 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
12888 : }
12889 66 : NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
12890 66 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
12891 66 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
12892 : }
12893 66 : NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->in.client_version));
12894 66 : NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
12895 66 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12896 66 : NDR_ZERO_STRUCTP(r->out.connect_handle);
12897 : }
12898 132 : if (flags & NDR_OUT) {
12899 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12900 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12901 66 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12902 0 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
12903 : }
12904 66 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12905 66 : NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
12906 66 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
12907 66 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
12908 66 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12909 : }
12910 132 : return NDR_ERR_SUCCESS;
12911 : }
12912 :
12913 0 : _PUBLIC_ void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect4 *r)
12914 : {
12915 0 : ndr_print_struct(ndr, name, "samr_Connect4");
12916 0 : if (r == NULL) { ndr_print_null(ndr); return; }
12917 0 : ndr->depth++;
12918 0 : if (flags & NDR_SET_VALUES) {
12919 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12920 : }
12921 0 : if (flags & NDR_IN) {
12922 0 : ndr_print_struct(ndr, "in", "samr_Connect4");
12923 0 : ndr->depth++;
12924 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
12925 0 : ndr->depth++;
12926 0 : if (r->in.system_name) {
12927 0 : ndr_print_string(ndr, "system_name", r->in.system_name);
12928 : }
12929 0 : ndr->depth--;
12930 0 : ndr_print_samr_ConnectVersion(ndr, "client_version", r->in.client_version);
12931 0 : ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
12932 0 : ndr->depth--;
12933 : }
12934 0 : if (flags & NDR_OUT) {
12935 0 : ndr_print_struct(ndr, "out", "samr_Connect4");
12936 0 : ndr->depth++;
12937 0 : ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
12938 0 : ndr->depth++;
12939 0 : ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
12940 0 : ndr->depth--;
12941 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12942 0 : ndr->depth--;
12943 : }
12944 0 : ndr->depth--;
12945 : }
12946 :
12947 2511 : _PUBLIC_ enum ndr_err_code ndr_push_samr_ChangePasswordUser3(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser3 *r)
12948 : {
12949 2511 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12950 2511 : if (flags & NDR_IN) {
12951 1252 : if (r->in.account == NULL) {
12952 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12953 : }
12954 1252 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
12955 1252 : if (r->in.server) {
12956 1252 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
12957 : }
12958 1252 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
12959 1252 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_password));
12960 1252 : if (r->in.nt_password) {
12961 1252 : NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
12962 : }
12963 1252 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_verifier));
12964 1252 : if (r->in.nt_verifier) {
12965 1252 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
12966 : }
12967 1252 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_change));
12968 1252 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_password));
12969 1252 : if (r->in.lm_password) {
12970 1240 : NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
12971 : }
12972 1252 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_verifier));
12973 1252 : if (r->in.lm_verifier) {
12974 1240 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
12975 : }
12976 1252 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password3));
12977 1252 : if (r->in.password3) {
12978 0 : NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password3));
12979 : }
12980 : }
12981 2511 : if (flags & NDR_OUT) {
12982 1259 : if (r->out.dominfo == NULL) {
12983 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12984 : }
12985 1259 : if (r->out.reject == NULL) {
12986 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12987 : }
12988 1259 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dominfo));
12989 1259 : if (*r->out.dominfo) {
12990 150 : NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, *r->out.dominfo));
12991 : }
12992 1259 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.reject));
12993 1259 : if (*r->out.reject) {
12994 1065 : NDR_CHECK(ndr_push_userPwdChangeFailureInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.reject));
12995 : }
12996 1259 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12997 : }
12998 2511 : return NDR_ERR_SUCCESS;
12999 : }
13000 :
13001 2511 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser3 *r)
13002 : {
13003 : uint32_t _ptr_server;
13004 : uint32_t _ptr_nt_password;
13005 : uint32_t _ptr_nt_verifier;
13006 : uint32_t _ptr_lm_password;
13007 : uint32_t _ptr_lm_verifier;
13008 : uint32_t _ptr_password3;
13009 : uint32_t _ptr_dominfo;
13010 : uint32_t _ptr_reject;
13011 2511 : TALLOC_CTX *_mem_save_server_0 = NULL;
13012 2511 : TALLOC_CTX *_mem_save_account_0 = NULL;
13013 2511 : TALLOC_CTX *_mem_save_nt_password_0 = NULL;
13014 2511 : TALLOC_CTX *_mem_save_nt_verifier_0 = NULL;
13015 2511 : TALLOC_CTX *_mem_save_lm_password_0 = NULL;
13016 2511 : TALLOC_CTX *_mem_save_lm_verifier_0 = NULL;
13017 2511 : TALLOC_CTX *_mem_save_password3_0 = NULL;
13018 2511 : TALLOC_CTX *_mem_save_dominfo_0 = NULL;
13019 2511 : TALLOC_CTX *_mem_save_dominfo_1 = NULL;
13020 2511 : TALLOC_CTX *_mem_save_reject_0 = NULL;
13021 2511 : TALLOC_CTX *_mem_save_reject_1 = NULL;
13022 2511 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13023 2511 : if (flags & NDR_IN) {
13024 1259 : NDR_ZERO_STRUCT(r->out);
13025 :
13026 1259 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
13027 1259 : if (_ptr_server) {
13028 1259 : NDR_PULL_ALLOC(ndr, r->in.server);
13029 : } else {
13030 0 : r->in.server = NULL;
13031 : }
13032 1259 : if (r->in.server) {
13033 1259 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
13034 1259 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
13035 1259 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
13036 1259 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
13037 : }
13038 1259 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13039 1259 : NDR_PULL_ALLOC(ndr, r->in.account);
13040 : }
13041 1259 : _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
13042 1259 : NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
13043 1259 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
13044 1259 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
13045 1259 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_password));
13046 1259 : if (_ptr_nt_password) {
13047 1259 : NDR_PULL_ALLOC(ndr, r->in.nt_password);
13048 : } else {
13049 0 : r->in.nt_password = NULL;
13050 : }
13051 1259 : if (r->in.nt_password) {
13052 1259 : _mem_save_nt_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
13053 1259 : NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_password, 0);
13054 1259 : NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password));
13055 1259 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_password_0, 0);
13056 : }
13057 1259 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_verifier));
13058 1259 : if (_ptr_nt_verifier) {
13059 1259 : NDR_PULL_ALLOC(ndr, r->in.nt_verifier);
13060 : } else {
13061 0 : r->in.nt_verifier = NULL;
13062 : }
13063 1259 : if (r->in.nt_verifier) {
13064 1259 : _mem_save_nt_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
13065 1259 : NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_verifier, 0);
13066 1259 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier));
13067 1259 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_verifier_0, 0);
13068 : }
13069 1259 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_change));
13070 1259 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_password));
13071 1259 : if (_ptr_lm_password) {
13072 1247 : NDR_PULL_ALLOC(ndr, r->in.lm_password);
13073 : } else {
13074 12 : r->in.lm_password = NULL;
13075 : }
13076 1259 : if (r->in.lm_password) {
13077 1247 : _mem_save_lm_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
13078 1247 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_password, 0);
13079 1247 : NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password));
13080 1247 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_password_0, 0);
13081 : }
13082 1259 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_verifier));
13083 1259 : if (_ptr_lm_verifier) {
13084 1247 : NDR_PULL_ALLOC(ndr, r->in.lm_verifier);
13085 : } else {
13086 12 : r->in.lm_verifier = NULL;
13087 : }
13088 1259 : if (r->in.lm_verifier) {
13089 1247 : _mem_save_lm_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
13090 1247 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_verifier, 0);
13091 1247 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier));
13092 1247 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_verifier_0, 0);
13093 : }
13094 1259 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password3));
13095 1259 : if (_ptr_password3) {
13096 0 : NDR_PULL_ALLOC(ndr, r->in.password3);
13097 : } else {
13098 1259 : r->in.password3 = NULL;
13099 : }
13100 1259 : if (r->in.password3) {
13101 0 : _mem_save_password3_0 = NDR_PULL_GET_MEM_CTX(ndr);
13102 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password3, 0);
13103 0 : NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password3));
13104 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password3_0, 0);
13105 : }
13106 1259 : NDR_PULL_ALLOC(ndr, r->out.dominfo);
13107 1259 : NDR_ZERO_STRUCTP(r->out.dominfo);
13108 1259 : NDR_PULL_ALLOC(ndr, r->out.reject);
13109 1259 : NDR_ZERO_STRUCTP(r->out.reject);
13110 : }
13111 2511 : if (flags & NDR_OUT) {
13112 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13113 : if (r->in.account == NULL) {
13114 : NDR_PULL_ALLOC(ndr, r->in.account);
13115 : NDR_ZERO_STRUCTP(r->in.account);
13116 : }
13117 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13118 1252 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13119 0 : NDR_PULL_ALLOC(ndr, r->out.dominfo);
13120 : }
13121 1252 : _mem_save_dominfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
13122 1252 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dominfo, LIBNDR_FLAG_REF_ALLOC);
13123 1252 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dominfo));
13124 1252 : if (_ptr_dominfo) {
13125 150 : NDR_PULL_ALLOC(ndr, *r->out.dominfo);
13126 : } else {
13127 1102 : *r->out.dominfo = NULL;
13128 : }
13129 1252 : if (*r->out.dominfo) {
13130 150 : _mem_save_dominfo_1 = NDR_PULL_GET_MEM_CTX(ndr);
13131 150 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.dominfo, 0);
13132 150 : NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, *r->out.dominfo));
13133 150 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dominfo_1, 0);
13134 : }
13135 1252 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dominfo_0, LIBNDR_FLAG_REF_ALLOC);
13136 1252 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13137 0 : NDR_PULL_ALLOC(ndr, r->out.reject);
13138 : }
13139 1252 : _mem_save_reject_0 = NDR_PULL_GET_MEM_CTX(ndr);
13140 1252 : NDR_PULL_SET_MEM_CTX(ndr, r->out.reject, LIBNDR_FLAG_REF_ALLOC);
13141 1252 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_reject));
13142 1252 : if (_ptr_reject) {
13143 1065 : NDR_PULL_ALLOC(ndr, *r->out.reject);
13144 : } else {
13145 187 : *r->out.reject = NULL;
13146 : }
13147 1252 : if (*r->out.reject) {
13148 1065 : _mem_save_reject_1 = NDR_PULL_GET_MEM_CTX(ndr);
13149 1065 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.reject, 0);
13150 1065 : NDR_CHECK(ndr_pull_userPwdChangeFailureInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.reject));
13151 1065 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_1, 0);
13152 : }
13153 1252 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_0, LIBNDR_FLAG_REF_ALLOC);
13154 1252 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13155 : }
13156 2511 : return NDR_ERR_SUCCESS;
13157 : }
13158 :
13159 0 : _PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser3 *r)
13160 : {
13161 0 : ndr_print_struct(ndr, name, "samr_ChangePasswordUser3");
13162 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13163 0 : ndr->depth++;
13164 0 : if (flags & NDR_SET_VALUES) {
13165 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13166 : }
13167 0 : if (flags & NDR_IN) {
13168 0 : ndr_print_struct(ndr, "in", "samr_ChangePasswordUser3");
13169 0 : ndr->depth++;
13170 0 : ndr_print_ptr(ndr, "server", r->in.server);
13171 0 : ndr->depth++;
13172 0 : if (r->in.server) {
13173 0 : ndr_print_lsa_String(ndr, "server", r->in.server);
13174 : }
13175 0 : ndr->depth--;
13176 0 : ndr_print_ptr(ndr, "account", r->in.account);
13177 0 : ndr->depth++;
13178 0 : ndr_print_lsa_String(ndr, "account", r->in.account);
13179 0 : ndr->depth--;
13180 0 : ndr_print_ptr(ndr, "nt_password", r->in.nt_password);
13181 0 : ndr->depth++;
13182 0 : if (r->in.nt_password) {
13183 0 : ndr_print_samr_CryptPassword(ndr, "nt_password", r->in.nt_password);
13184 : }
13185 0 : ndr->depth--;
13186 0 : ndr_print_ptr(ndr, "nt_verifier", r->in.nt_verifier);
13187 0 : ndr->depth++;
13188 0 : if (r->in.nt_verifier) {
13189 0 : ndr_print_samr_Password(ndr, "nt_verifier", r->in.nt_verifier);
13190 : }
13191 0 : ndr->depth--;
13192 0 : ndr_print_uint8(ndr, "lm_change", r->in.lm_change);
13193 0 : ndr_print_ptr(ndr, "lm_password", r->in.lm_password);
13194 0 : ndr->depth++;
13195 0 : if (r->in.lm_password) {
13196 0 : ndr_print_samr_CryptPassword(ndr, "lm_password", r->in.lm_password);
13197 : }
13198 0 : ndr->depth--;
13199 0 : ndr_print_ptr(ndr, "lm_verifier", r->in.lm_verifier);
13200 0 : ndr->depth++;
13201 0 : if (r->in.lm_verifier) {
13202 0 : ndr_print_samr_Password(ndr, "lm_verifier", r->in.lm_verifier);
13203 : }
13204 0 : ndr->depth--;
13205 0 : ndr_print_ptr(ndr, "password3", r->in.password3);
13206 0 : ndr->depth++;
13207 0 : if (r->in.password3) {
13208 0 : ndr_print_samr_CryptPassword(ndr, "password3", r->in.password3);
13209 : }
13210 0 : ndr->depth--;
13211 0 : ndr->depth--;
13212 : }
13213 0 : if (flags & NDR_OUT) {
13214 0 : ndr_print_struct(ndr, "out", "samr_ChangePasswordUser3");
13215 0 : ndr->depth++;
13216 0 : ndr_print_ptr(ndr, "dominfo", r->out.dominfo);
13217 0 : ndr->depth++;
13218 0 : ndr_print_ptr(ndr, "dominfo", *r->out.dominfo);
13219 0 : ndr->depth++;
13220 0 : if (*r->out.dominfo) {
13221 0 : ndr_print_samr_DomInfo1(ndr, "dominfo", *r->out.dominfo);
13222 : }
13223 0 : ndr->depth--;
13224 0 : ndr->depth--;
13225 0 : ndr_print_ptr(ndr, "reject", r->out.reject);
13226 0 : ndr->depth++;
13227 0 : ndr_print_ptr(ndr, "reject", *r->out.reject);
13228 0 : ndr->depth++;
13229 0 : if (*r->out.reject) {
13230 0 : ndr_print_userPwdChangeFailureInformation(ndr, "reject", *r->out.reject);
13231 : }
13232 0 : ndr->depth--;
13233 0 : ndr->depth--;
13234 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13235 0 : ndr->depth--;
13236 : }
13237 0 : ndr->depth--;
13238 : }
13239 :
13240 311 : _PUBLIC_ enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flags, const struct samr_Connect5 *r)
13241 : {
13242 311 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13243 311 : if (flags & NDR_IN) {
13244 155 : if (r->in.info_in == NULL) {
13245 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13246 : }
13247 155 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
13248 155 : if (r->in.system_name) {
13249 154 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
13250 154 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13251 154 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
13252 154 : 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));
13253 : }
13254 155 : NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
13255 155 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level_in));
13256 155 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info_in, r->in.level_in));
13257 155 : NDR_CHECK(ndr_push_samr_ConnectInfo(ndr, NDR_SCALARS, r->in.info_in));
13258 : }
13259 311 : if (flags & NDR_OUT) {
13260 156 : if (r->out.level_out == NULL) {
13261 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13262 : }
13263 156 : if (r->out.info_out == NULL) {
13264 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13265 : }
13266 156 : if (r->out.connect_handle == NULL) {
13267 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13268 : }
13269 156 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
13270 156 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info_out, *r->out.level_out));
13271 156 : NDR_CHECK(ndr_push_samr_ConnectInfo(ndr, NDR_SCALARS, r->out.info_out));
13272 156 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
13273 156 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13274 : }
13275 311 : return NDR_ERR_SUCCESS;
13276 : }
13277 :
13278 308 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r)
13279 : {
13280 : uint32_t _ptr_system_name;
13281 308 : uint32_t size_system_name_1 = 0;
13282 308 : uint32_t length_system_name_1 = 0;
13283 308 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
13284 308 : TALLOC_CTX *_mem_save_info_in_0 = NULL;
13285 308 : TALLOC_CTX *_mem_save_level_out_0 = NULL;
13286 308 : TALLOC_CTX *_mem_save_info_out_0 = NULL;
13287 308 : TALLOC_CTX *_mem_save_connect_handle_0 = NULL;
13288 308 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13289 308 : if (flags & NDR_IN) {
13290 153 : NDR_ZERO_STRUCT(r->out);
13291 :
13292 153 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
13293 153 : if (_ptr_system_name) {
13294 152 : NDR_PULL_ALLOC(ndr, r->in.system_name);
13295 : } else {
13296 1 : r->in.system_name = NULL;
13297 : }
13298 153 : if (r->in.system_name) {
13299 152 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13300 152 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
13301 152 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
13302 152 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
13303 152 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.system_name, &size_system_name_1));
13304 152 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.system_name, &length_system_name_1));
13305 152 : if (length_system_name_1 > size_system_name_1) {
13306 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
13307 : }
13308 152 : NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
13309 152 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
13310 152 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
13311 : }
13312 153 : NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
13313 153 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level_in));
13314 153 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13315 153 : NDR_PULL_ALLOC(ndr, r->in.info_in);
13316 : }
13317 153 : _mem_save_info_in_0 = NDR_PULL_GET_MEM_CTX(ndr);
13318 153 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info_in, LIBNDR_FLAG_REF_ALLOC);
13319 153 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info_in, r->in.level_in));
13320 153 : NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr, NDR_SCALARS, r->in.info_in));
13321 153 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_in_0, LIBNDR_FLAG_REF_ALLOC);
13322 153 : NDR_PULL_ALLOC(ndr, r->out.level_out);
13323 153 : NDR_ZERO_STRUCTP(r->out.level_out);
13324 153 : NDR_PULL_ALLOC(ndr, r->out.info_out);
13325 153 : NDR_ZERO_STRUCTP(r->out.info_out);
13326 153 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
13327 153 : NDR_ZERO_STRUCTP(r->out.connect_handle);
13328 : }
13329 308 : if (flags & NDR_OUT) {
13330 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13331 : if (r->in.info_in == NULL) {
13332 : NDR_PULL_ALLOC(ndr, r->in.info_in);
13333 : NDR_ZERO_STRUCTP(r->in.info_in);
13334 : }
13335 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13336 155 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13337 80 : NDR_PULL_ALLOC(ndr, r->out.level_out);
13338 : }
13339 155 : _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
13340 155 : NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
13341 155 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
13342 155 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
13343 155 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13344 80 : NDR_PULL_ALLOC(ndr, r->out.info_out);
13345 : }
13346 155 : _mem_save_info_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
13347 155 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info_out, LIBNDR_FLAG_REF_ALLOC);
13348 155 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info_out, *r->out.level_out));
13349 155 : NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr, NDR_SCALARS, r->out.info_out));
13350 155 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_out_0, LIBNDR_FLAG_REF_ALLOC);
13351 155 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13352 80 : NDR_PULL_ALLOC(ndr, r->out.connect_handle);
13353 : }
13354 155 : _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13355 155 : NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC);
13356 155 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle));
13357 155 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC);
13358 155 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13359 : }
13360 308 : return NDR_ERR_SUCCESS;
13361 : }
13362 :
13363 6 : _PUBLIC_ void ndr_print_samr_Connect5(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect5 *r)
13364 : {
13365 6 : ndr_print_struct(ndr, name, "samr_Connect5");
13366 6 : if (r == NULL) { ndr_print_null(ndr); return; }
13367 6 : ndr->depth++;
13368 6 : if (flags & NDR_SET_VALUES) {
13369 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13370 : }
13371 6 : if (flags & NDR_IN) {
13372 0 : ndr_print_struct(ndr, "in", "samr_Connect5");
13373 0 : ndr->depth++;
13374 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
13375 0 : ndr->depth++;
13376 0 : if (r->in.system_name) {
13377 0 : ndr_print_string(ndr, "system_name", r->in.system_name);
13378 : }
13379 0 : ndr->depth--;
13380 0 : ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask);
13381 0 : ndr_print_uint32(ndr, "level_in", r->in.level_in);
13382 0 : ndr_print_ptr(ndr, "info_in", r->in.info_in);
13383 0 : ndr->depth++;
13384 0 : ndr_print_set_switch_value(ndr, r->in.info_in, r->in.level_in);
13385 0 : ndr_print_samr_ConnectInfo(ndr, "info_in", r->in.info_in);
13386 0 : ndr->depth--;
13387 0 : ndr->depth--;
13388 : }
13389 6 : if (flags & NDR_OUT) {
13390 6 : ndr_print_struct(ndr, "out", "samr_Connect5");
13391 6 : ndr->depth++;
13392 6 : ndr_print_ptr(ndr, "level_out", r->out.level_out);
13393 6 : ndr->depth++;
13394 6 : ndr_print_uint32(ndr, "level_out", *r->out.level_out);
13395 6 : ndr->depth--;
13396 6 : ndr_print_ptr(ndr, "info_out", r->out.info_out);
13397 6 : ndr->depth++;
13398 6 : ndr_print_set_switch_value(ndr, r->out.info_out, *r->out.level_out);
13399 6 : ndr_print_samr_ConnectInfo(ndr, "info_out", r->out.info_out);
13400 6 : ndr->depth--;
13401 6 : ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle);
13402 6 : ndr->depth++;
13403 6 : ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle);
13404 6 : ndr->depth--;
13405 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13406 6 : ndr->depth--;
13407 : }
13408 6 : ndr->depth--;
13409 : }
13410 :
13411 48 : static enum ndr_err_code ndr_push_samr_RidToSid(struct ndr_push *ndr, int flags, const struct samr_RidToSid *r)
13412 : {
13413 48 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13414 48 : if (flags & NDR_IN) {
13415 24 : if (r->in.domain_handle == NULL) {
13416 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13417 : }
13418 24 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
13419 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid));
13420 : }
13421 48 : if (flags & NDR_OUT) {
13422 24 : if (r->out.sid == NULL) {
13423 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13424 : }
13425 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sid));
13426 24 : if (*r->out.sid) {
13427 24 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
13428 : }
13429 24 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13430 : }
13431 48 : return NDR_ERR_SUCCESS;
13432 : }
13433 :
13434 48 : static enum ndr_err_code ndr_pull_samr_RidToSid(struct ndr_pull *ndr, int flags, struct samr_RidToSid *r)
13435 : {
13436 : uint32_t _ptr_sid;
13437 48 : TALLOC_CTX *_mem_save_domain_handle_0 = NULL;
13438 48 : TALLOC_CTX *_mem_save_sid_0 = NULL;
13439 48 : TALLOC_CTX *_mem_save_sid_1 = NULL;
13440 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13441 48 : if (flags & NDR_IN) {
13442 24 : NDR_ZERO_STRUCT(r->out);
13443 :
13444 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13445 24 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
13446 : }
13447 24 : _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13448 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
13449 24 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
13450 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
13451 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid));
13452 24 : NDR_PULL_ALLOC(ndr, r->out.sid);
13453 24 : NDR_ZERO_STRUCTP(r->out.sid);
13454 : }
13455 48 : if (flags & NDR_OUT) {
13456 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13457 : if (r->in.domain_handle == NULL) {
13458 : NDR_PULL_ALLOC(ndr, r->in.domain_handle);
13459 : NDR_ZERO_STRUCTP(r->in.domain_handle);
13460 : }
13461 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13462 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13463 0 : NDR_PULL_ALLOC(ndr, r->out.sid);
13464 : }
13465 24 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
13466 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
13467 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
13468 24 : if (_ptr_sid) {
13469 24 : NDR_PULL_ALLOC(ndr, *r->out.sid);
13470 : } else {
13471 0 : *r->out.sid = NULL;
13472 : }
13473 24 : if (*r->out.sid) {
13474 24 : _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr);
13475 24 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, 0);
13476 24 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
13477 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, 0);
13478 : }
13479 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
13480 24 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13481 : }
13482 48 : return NDR_ERR_SUCCESS;
13483 : }
13484 :
13485 0 : _PUBLIC_ void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, int flags, const struct samr_RidToSid *r)
13486 : {
13487 0 : ndr_print_struct(ndr, name, "samr_RidToSid");
13488 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13489 0 : ndr->depth++;
13490 0 : if (flags & NDR_SET_VALUES) {
13491 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13492 : }
13493 0 : if (flags & NDR_IN) {
13494 0 : ndr_print_struct(ndr, "in", "samr_RidToSid");
13495 0 : ndr->depth++;
13496 0 : ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle);
13497 0 : ndr->depth++;
13498 0 : ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
13499 0 : ndr->depth--;
13500 0 : ndr_print_uint32(ndr, "rid", r->in.rid);
13501 0 : ndr->depth--;
13502 : }
13503 0 : if (flags & NDR_OUT) {
13504 0 : ndr_print_struct(ndr, "out", "samr_RidToSid");
13505 0 : ndr->depth++;
13506 0 : ndr_print_ptr(ndr, "sid", r->out.sid);
13507 0 : ndr->depth++;
13508 0 : ndr_print_ptr(ndr, "sid", *r->out.sid);
13509 0 : ndr->depth++;
13510 0 : if (*r->out.sid) {
13511 0 : ndr_print_dom_sid2(ndr, "sid", *r->out.sid);
13512 : }
13513 0 : ndr->depth--;
13514 0 : ndr->depth--;
13515 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13516 0 : ndr->depth--;
13517 : }
13518 0 : ndr->depth--;
13519 : }
13520 :
13521 0 : static enum ndr_err_code ndr_push_samr_SetDsrmPassword(struct ndr_push *ndr, int flags, const struct samr_SetDsrmPassword *r)
13522 : {
13523 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13524 0 : if (flags & NDR_IN) {
13525 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.name));
13526 0 : if (r->in.name) {
13527 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
13528 : }
13529 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
13530 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hash));
13531 0 : if (r->in.hash) {
13532 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.hash));
13533 : }
13534 : }
13535 0 : if (flags & NDR_OUT) {
13536 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13537 : }
13538 0 : return NDR_ERR_SUCCESS;
13539 : }
13540 :
13541 0 : static enum ndr_err_code ndr_pull_samr_SetDsrmPassword(struct ndr_pull *ndr, int flags, struct samr_SetDsrmPassword *r)
13542 : {
13543 : uint32_t _ptr_name;
13544 : uint32_t _ptr_hash;
13545 0 : TALLOC_CTX *_mem_save_name_0 = NULL;
13546 0 : TALLOC_CTX *_mem_save_hash_0 = NULL;
13547 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13548 0 : if (flags & NDR_IN) {
13549 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
13550 0 : if (_ptr_name) {
13551 0 : NDR_PULL_ALLOC(ndr, r->in.name);
13552 : } else {
13553 0 : r->in.name = NULL;
13554 : }
13555 0 : if (r->in.name) {
13556 0 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13557 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.name, 0);
13558 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
13559 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
13560 : }
13561 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
13562 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hash));
13563 0 : if (_ptr_hash) {
13564 0 : NDR_PULL_ALLOC(ndr, r->in.hash);
13565 : } else {
13566 0 : r->in.hash = NULL;
13567 : }
13568 0 : if (r->in.hash) {
13569 0 : _mem_save_hash_0 = NDR_PULL_GET_MEM_CTX(ndr);
13570 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.hash, 0);
13571 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.hash));
13572 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hash_0, 0);
13573 : }
13574 : }
13575 0 : if (flags & NDR_OUT) {
13576 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13577 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13578 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13579 : }
13580 0 : return NDR_ERR_SUCCESS;
13581 : }
13582 :
13583 0 : _PUBLIC_ void ndr_print_samr_SetDsrmPassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDsrmPassword *r)
13584 : {
13585 0 : ndr_print_struct(ndr, name, "samr_SetDsrmPassword");
13586 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13587 0 : ndr->depth++;
13588 0 : if (flags & NDR_SET_VALUES) {
13589 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13590 : }
13591 0 : if (flags & NDR_IN) {
13592 0 : ndr_print_struct(ndr, "in", "samr_SetDsrmPassword");
13593 0 : ndr->depth++;
13594 0 : ndr_print_ptr(ndr, "name", r->in.name);
13595 0 : ndr->depth++;
13596 0 : if (r->in.name) {
13597 0 : ndr_print_lsa_String(ndr, "name", r->in.name);
13598 : }
13599 0 : ndr->depth--;
13600 0 : ndr_print_uint32(ndr, "unknown", r->in.unknown);
13601 0 : ndr_print_ptr(ndr, "hash", r->in.hash);
13602 0 : ndr->depth++;
13603 0 : if (r->in.hash) {
13604 0 : ndr_print_samr_Password(ndr, "hash", r->in.hash);
13605 : }
13606 0 : ndr->depth--;
13607 0 : ndr->depth--;
13608 : }
13609 0 : if (flags & NDR_OUT) {
13610 0 : ndr_print_struct(ndr, "out", "samr_SetDsrmPassword");
13611 0 : ndr->depth++;
13612 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13613 0 : ndr->depth--;
13614 : }
13615 0 : ndr->depth--;
13616 : }
13617 :
13618 9 : static enum ndr_err_code ndr_push_samr_ValidatePassword(struct ndr_push *ndr, int flags, const struct samr_ValidatePassword *r)
13619 : {
13620 9 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13621 9 : if (flags & NDR_IN) {
13622 6 : if (r->in.req == NULL) {
13623 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13624 : }
13625 6 : NDR_CHECK(ndr_push_samr_ValidatePasswordLevel(ndr, NDR_SCALARS, r->in.level));
13626 6 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
13627 6 : NDR_CHECK(ndr_push_samr_ValidatePasswordReq(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
13628 : }
13629 9 : if (flags & NDR_OUT) {
13630 3 : if (r->out.rep == NULL) {
13631 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13632 : }
13633 3 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rep));
13634 3 : if (*r->out.rep) {
13635 3 : NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.rep, r->in.level));
13636 3 : NDR_CHECK(ndr_push_samr_ValidatePasswordRep(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rep));
13637 : }
13638 3 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13639 : }
13640 9 : return NDR_ERR_SUCCESS;
13641 : }
13642 :
13643 9 : static enum ndr_err_code ndr_pull_samr_ValidatePassword(struct ndr_pull *ndr, int flags, struct samr_ValidatePassword *r)
13644 : {
13645 : uint32_t _ptr_rep;
13646 9 : TALLOC_CTX *_mem_save_req_0 = NULL;
13647 9 : TALLOC_CTX *_mem_save_rep_0 = NULL;
13648 9 : TALLOC_CTX *_mem_save_rep_1 = NULL;
13649 9 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13650 9 : if (flags & NDR_IN) {
13651 6 : NDR_ZERO_STRUCT(r->out);
13652 :
13653 6 : NDR_CHECK(ndr_pull_samr_ValidatePasswordLevel(ndr, NDR_SCALARS, &r->in.level));
13654 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13655 6 : NDR_PULL_ALLOC(ndr, r->in.req);
13656 : }
13657 6 : _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
13658 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
13659 6 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
13660 6 : NDR_CHECK(ndr_pull_samr_ValidatePasswordReq(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
13661 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
13662 6 : NDR_PULL_ALLOC(ndr, r->out.rep);
13663 6 : NDR_ZERO_STRUCTP(r->out.rep);
13664 : }
13665 9 : if (flags & NDR_OUT) {
13666 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13667 : if (r->in.req == NULL) {
13668 : NDR_PULL_ALLOC(ndr, r->in.req);
13669 : NDR_ZERO_STRUCTP(r->in.req);
13670 : }
13671 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13672 3 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13673 0 : NDR_PULL_ALLOC(ndr, r->out.rep);
13674 : }
13675 3 : _mem_save_rep_0 = NDR_PULL_GET_MEM_CTX(ndr);
13676 3 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rep, LIBNDR_FLAG_REF_ALLOC);
13677 3 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rep));
13678 3 : if (_ptr_rep) {
13679 3 : NDR_PULL_ALLOC(ndr, *r->out.rep);
13680 : } else {
13681 0 : *r->out.rep = NULL;
13682 : }
13683 3 : if (*r->out.rep) {
13684 3 : _mem_save_rep_1 = NDR_PULL_GET_MEM_CTX(ndr);
13685 3 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.rep, 0);
13686 3 : NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.rep, r->in.level));
13687 3 : NDR_CHECK(ndr_pull_samr_ValidatePasswordRep(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rep));
13688 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rep_1, 0);
13689 : }
13690 3 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rep_0, LIBNDR_FLAG_REF_ALLOC);
13691 3 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13692 : }
13693 9 : return NDR_ERR_SUCCESS;
13694 : }
13695 :
13696 0 : _PUBLIC_ void ndr_print_samr_ValidatePassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_ValidatePassword *r)
13697 : {
13698 0 : ndr_print_struct(ndr, name, "samr_ValidatePassword");
13699 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13700 0 : ndr->depth++;
13701 0 : if (flags & NDR_SET_VALUES) {
13702 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13703 : }
13704 0 : if (flags & NDR_IN) {
13705 0 : ndr_print_struct(ndr, "in", "samr_ValidatePassword");
13706 0 : ndr->depth++;
13707 0 : ndr_print_samr_ValidatePasswordLevel(ndr, "level", r->in.level);
13708 0 : ndr_print_ptr(ndr, "req", r->in.req);
13709 0 : ndr->depth++;
13710 0 : ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
13711 0 : ndr_print_samr_ValidatePasswordReq(ndr, "req", r->in.req);
13712 0 : ndr->depth--;
13713 0 : ndr->depth--;
13714 : }
13715 0 : if (flags & NDR_OUT) {
13716 0 : ndr_print_struct(ndr, "out", "samr_ValidatePassword");
13717 0 : ndr->depth++;
13718 0 : ndr_print_ptr(ndr, "rep", r->out.rep);
13719 0 : ndr->depth++;
13720 0 : ndr_print_ptr(ndr, "rep", *r->out.rep);
13721 0 : ndr->depth++;
13722 0 : if (*r->out.rep) {
13723 0 : ndr_print_set_switch_value(ndr, *r->out.rep, r->in.level);
13724 0 : ndr_print_samr_ValidatePasswordRep(ndr, "rep", *r->out.rep);
13725 : }
13726 0 : ndr->depth--;
13727 0 : ndr->depth--;
13728 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13729 0 : ndr->depth--;
13730 : }
13731 0 : ndr->depth--;
13732 : }
13733 :
13734 0 : static enum ndr_err_code ndr_push_samr_Opnum68NotUsedOnWire(struct ndr_push *ndr, int flags, const struct samr_Opnum68NotUsedOnWire *r)
13735 : {
13736 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13737 0 : if (flags & NDR_IN) {
13738 : }
13739 0 : if (flags & NDR_OUT) {
13740 : }
13741 0 : return NDR_ERR_SUCCESS;
13742 : }
13743 :
13744 0 : static enum ndr_err_code ndr_pull_samr_Opnum68NotUsedOnWire(struct ndr_pull *ndr, int flags, struct samr_Opnum68NotUsedOnWire *r)
13745 : {
13746 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13747 0 : if (flags & NDR_IN) {
13748 : }
13749 0 : if (flags & NDR_OUT) {
13750 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13751 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13752 : }
13753 0 : return NDR_ERR_SUCCESS;
13754 : }
13755 :
13756 0 : _PUBLIC_ void ndr_print_samr_Opnum68NotUsedOnWire(struct ndr_print *ndr, const char *name, int flags, const struct samr_Opnum68NotUsedOnWire *r)
13757 : {
13758 0 : ndr_print_struct(ndr, name, "samr_Opnum68NotUsedOnWire");
13759 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13760 0 : ndr->depth++;
13761 0 : if (flags & NDR_SET_VALUES) {
13762 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13763 : }
13764 0 : if (flags & NDR_IN) {
13765 0 : ndr_print_struct(ndr, "in", "samr_Opnum68NotUsedOnWire");
13766 0 : ndr->depth++;
13767 0 : ndr->depth--;
13768 : }
13769 0 : if (flags & NDR_OUT) {
13770 0 : ndr_print_struct(ndr, "out", "samr_Opnum68NotUsedOnWire");
13771 0 : ndr->depth++;
13772 0 : ndr->depth--;
13773 : }
13774 0 : ndr->depth--;
13775 : }
13776 :
13777 0 : static enum ndr_err_code ndr_push_samr_Opnum69NotUsedOnWire(struct ndr_push *ndr, int flags, const struct samr_Opnum69NotUsedOnWire *r)
13778 : {
13779 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13780 0 : if (flags & NDR_IN) {
13781 : }
13782 0 : if (flags & NDR_OUT) {
13783 : }
13784 0 : return NDR_ERR_SUCCESS;
13785 : }
13786 :
13787 0 : static enum ndr_err_code ndr_pull_samr_Opnum69NotUsedOnWire(struct ndr_pull *ndr, int flags, struct samr_Opnum69NotUsedOnWire *r)
13788 : {
13789 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13790 0 : if (flags & NDR_IN) {
13791 : }
13792 0 : if (flags & NDR_OUT) {
13793 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13794 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13795 : }
13796 0 : return NDR_ERR_SUCCESS;
13797 : }
13798 :
13799 0 : _PUBLIC_ void ndr_print_samr_Opnum69NotUsedOnWire(struct ndr_print *ndr, const char *name, int flags, const struct samr_Opnum69NotUsedOnWire *r)
13800 : {
13801 0 : ndr_print_struct(ndr, name, "samr_Opnum69NotUsedOnWire");
13802 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13803 0 : ndr->depth++;
13804 0 : if (flags & NDR_SET_VALUES) {
13805 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13806 : }
13807 0 : if (flags & NDR_IN) {
13808 0 : ndr_print_struct(ndr, "in", "samr_Opnum69NotUsedOnWire");
13809 0 : ndr->depth++;
13810 0 : ndr->depth--;
13811 : }
13812 0 : if (flags & NDR_OUT) {
13813 0 : ndr_print_struct(ndr, "out", "samr_Opnum69NotUsedOnWire");
13814 0 : ndr->depth++;
13815 0 : ndr->depth--;
13816 : }
13817 0 : ndr->depth--;
13818 : }
13819 :
13820 0 : static enum ndr_err_code ndr_push_samr_Opnum70NotUsedOnWire(struct ndr_push *ndr, int flags, const struct samr_Opnum70NotUsedOnWire *r)
13821 : {
13822 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13823 0 : if (flags & NDR_IN) {
13824 : }
13825 0 : if (flags & NDR_OUT) {
13826 : }
13827 0 : return NDR_ERR_SUCCESS;
13828 : }
13829 :
13830 0 : static enum ndr_err_code ndr_pull_samr_Opnum70NotUsedOnWire(struct ndr_pull *ndr, int flags, struct samr_Opnum70NotUsedOnWire *r)
13831 : {
13832 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13833 0 : if (flags & NDR_IN) {
13834 : }
13835 0 : if (flags & NDR_OUT) {
13836 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13837 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13838 : }
13839 0 : return NDR_ERR_SUCCESS;
13840 : }
13841 :
13842 0 : _PUBLIC_ void ndr_print_samr_Opnum70NotUsedOnWire(struct ndr_print *ndr, const char *name, int flags, const struct samr_Opnum70NotUsedOnWire *r)
13843 : {
13844 0 : ndr_print_struct(ndr, name, "samr_Opnum70NotUsedOnWire");
13845 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13846 0 : ndr->depth++;
13847 0 : if (flags & NDR_SET_VALUES) {
13848 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13849 : }
13850 0 : if (flags & NDR_IN) {
13851 0 : ndr_print_struct(ndr, "in", "samr_Opnum70NotUsedOnWire");
13852 0 : ndr->depth++;
13853 0 : ndr->depth--;
13854 : }
13855 0 : if (flags & NDR_OUT) {
13856 0 : ndr_print_struct(ndr, "out", "samr_Opnum70NotUsedOnWire");
13857 0 : ndr->depth++;
13858 0 : ndr->depth--;
13859 : }
13860 0 : ndr->depth--;
13861 : }
13862 :
13863 0 : static enum ndr_err_code ndr_push_samr_Opnum71NotUsedOnWire(struct ndr_push *ndr, int flags, const struct samr_Opnum71NotUsedOnWire *r)
13864 : {
13865 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13866 0 : if (flags & NDR_IN) {
13867 : }
13868 0 : if (flags & NDR_OUT) {
13869 : }
13870 0 : return NDR_ERR_SUCCESS;
13871 : }
13872 :
13873 0 : static enum ndr_err_code ndr_pull_samr_Opnum71NotUsedOnWire(struct ndr_pull *ndr, int flags, struct samr_Opnum71NotUsedOnWire *r)
13874 : {
13875 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13876 0 : if (flags & NDR_IN) {
13877 : }
13878 0 : if (flags & NDR_OUT) {
13879 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13880 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13881 : }
13882 0 : return NDR_ERR_SUCCESS;
13883 : }
13884 :
13885 0 : _PUBLIC_ void ndr_print_samr_Opnum71NotUsedOnWire(struct ndr_print *ndr, const char *name, int flags, const struct samr_Opnum71NotUsedOnWire *r)
13886 : {
13887 0 : ndr_print_struct(ndr, name, "samr_Opnum71NotUsedOnWire");
13888 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13889 0 : ndr->depth++;
13890 0 : if (flags & NDR_SET_VALUES) {
13891 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13892 : }
13893 0 : if (flags & NDR_IN) {
13894 0 : ndr_print_struct(ndr, "in", "samr_Opnum71NotUsedOnWire");
13895 0 : ndr->depth++;
13896 0 : ndr->depth--;
13897 : }
13898 0 : if (flags & NDR_OUT) {
13899 0 : ndr_print_struct(ndr, "out", "samr_Opnum71NotUsedOnWire");
13900 0 : ndr->depth++;
13901 0 : ndr->depth--;
13902 : }
13903 0 : ndr->depth--;
13904 : }
13905 :
13906 0 : static enum ndr_err_code ndr_push_samr_Opnum72NotUsedOnWire(struct ndr_push *ndr, int flags, const struct samr_Opnum72NotUsedOnWire *r)
13907 : {
13908 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13909 0 : if (flags & NDR_IN) {
13910 : }
13911 0 : if (flags & NDR_OUT) {
13912 : }
13913 0 : return NDR_ERR_SUCCESS;
13914 : }
13915 :
13916 0 : static enum ndr_err_code ndr_pull_samr_Opnum72NotUsedOnWire(struct ndr_pull *ndr, int flags, struct samr_Opnum72NotUsedOnWire *r)
13917 : {
13918 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13919 0 : if (flags & NDR_IN) {
13920 : }
13921 0 : if (flags & NDR_OUT) {
13922 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13923 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13924 : }
13925 0 : return NDR_ERR_SUCCESS;
13926 : }
13927 :
13928 0 : _PUBLIC_ void ndr_print_samr_Opnum72NotUsedOnWire(struct ndr_print *ndr, const char *name, int flags, const struct samr_Opnum72NotUsedOnWire *r)
13929 : {
13930 0 : ndr_print_struct(ndr, name, "samr_Opnum72NotUsedOnWire");
13931 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13932 0 : ndr->depth++;
13933 0 : if (flags & NDR_SET_VALUES) {
13934 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13935 : }
13936 0 : if (flags & NDR_IN) {
13937 0 : ndr_print_struct(ndr, "in", "samr_Opnum72NotUsedOnWire");
13938 0 : ndr->depth++;
13939 0 : ndr->depth--;
13940 : }
13941 0 : if (flags & NDR_OUT) {
13942 0 : ndr_print_struct(ndr, "out", "samr_Opnum72NotUsedOnWire");
13943 0 : ndr->depth++;
13944 0 : ndr->depth--;
13945 : }
13946 0 : ndr->depth--;
13947 : }
13948 :
13949 29 : _PUBLIC_ enum ndr_err_code ndr_push_samr_ChangePasswordUser4(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser4 *r)
13950 : {
13951 29 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13952 29 : if (flags & NDR_IN) {
13953 11 : if (r->in.account == NULL) {
13954 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13955 : }
13956 11 : if (r->in.password == NULL) {
13957 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13958 : }
13959 11 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
13960 11 : if (r->in.server) {
13961 11 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
13962 : }
13963 11 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
13964 11 : NDR_CHECK(ndr_push_samr_EncryptedPasswordAES(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.password));
13965 : }
13966 29 : if (flags & NDR_OUT) {
13967 18 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13968 : }
13969 29 : return NDR_ERR_SUCCESS;
13970 : }
13971 :
13972 29 : _PUBLIC_ enum ndr_err_code ndr_pull_samr_ChangePasswordUser4(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser4 *r)
13973 : {
13974 : uint32_t _ptr_server;
13975 29 : TALLOC_CTX *_mem_save_server_0 = NULL;
13976 29 : TALLOC_CTX *_mem_save_account_0 = NULL;
13977 29 : TALLOC_CTX *_mem_save_password_0 = NULL;
13978 29 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13979 29 : if (flags & NDR_IN) {
13980 18 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
13981 18 : if (_ptr_server) {
13982 18 : NDR_PULL_ALLOC(ndr, r->in.server);
13983 : } else {
13984 0 : r->in.server = NULL;
13985 : }
13986 18 : if (r->in.server) {
13987 18 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
13988 18 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
13989 18 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server));
13990 18 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
13991 : }
13992 18 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13993 18 : NDR_PULL_ALLOC(ndr, r->in.account);
13994 : }
13995 18 : _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
13996 18 : NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC);
13997 18 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account));
13998 18 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC);
13999 18 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14000 18 : NDR_PULL_ALLOC(ndr, r->in.password);
14001 : }
14002 18 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
14003 18 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, LIBNDR_FLAG_REF_ALLOC);
14004 18 : NDR_CHECK(ndr_pull_samr_EncryptedPasswordAES(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.password));
14005 18 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, LIBNDR_FLAG_REF_ALLOC);
14006 : }
14007 29 : if (flags & NDR_OUT) {
14008 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14009 : if (r->in.account == NULL) {
14010 : NDR_PULL_ALLOC(ndr, r->in.account);
14011 : NDR_ZERO_STRUCTP(r->in.account);
14012 : }
14013 : if (r->in.password == NULL) {
14014 : NDR_PULL_ALLOC(ndr, r->in.password);
14015 : NDR_ZERO_STRUCTP(r->in.password);
14016 : }
14017 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14018 11 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
14019 : }
14020 29 : return NDR_ERR_SUCCESS;
14021 : }
14022 :
14023 0 : _PUBLIC_ void ndr_print_samr_ChangePasswordUser4(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser4 *r)
14024 : {
14025 0 : ndr_print_struct(ndr, name, "samr_ChangePasswordUser4");
14026 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14027 0 : ndr->depth++;
14028 0 : if (flags & NDR_SET_VALUES) {
14029 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14030 : }
14031 0 : if (flags & NDR_IN) {
14032 0 : ndr_print_struct(ndr, "in", "samr_ChangePasswordUser4");
14033 0 : ndr->depth++;
14034 0 : ndr_print_ptr(ndr, "server", r->in.server);
14035 0 : ndr->depth++;
14036 0 : if (r->in.server) {
14037 0 : ndr_print_lsa_String(ndr, "server", r->in.server);
14038 : }
14039 0 : ndr->depth--;
14040 0 : ndr_print_ptr(ndr, "account", r->in.account);
14041 0 : ndr->depth++;
14042 0 : ndr_print_lsa_String(ndr, "account", r->in.account);
14043 0 : ndr->depth--;
14044 0 : ndr_print_ptr(ndr, "password", r->in.password);
14045 0 : ndr->depth++;
14046 0 : ndr_print_samr_EncryptedPasswordAES(ndr, "password", r->in.password);
14047 0 : ndr->depth--;
14048 0 : ndr->depth--;
14049 : }
14050 0 : if (flags & NDR_OUT) {
14051 0 : ndr_print_struct(ndr, "out", "samr_ChangePasswordUser4");
14052 0 : ndr->depth++;
14053 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
14054 0 : ndr->depth--;
14055 : }
14056 0 : ndr->depth--;
14057 : }
14058 :
14059 : #ifndef SKIP_NDR_TABLE_samr
14060 : static const struct ndr_interface_public_struct samr_public_structs[] = {
14061 : {
14062 : .name = "samr_DomInfo1",
14063 : .struct_size = sizeof(struct samr_DomInfo1 ),
14064 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_samr_DomInfo1,
14065 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_samr_DomInfo1,
14066 : .ndr_print = (ndr_print_function_t) ndr_print_flags_samr_DomInfo1,
14067 : },
14068 : {
14069 : .name = "samr_LogonHours",
14070 : .struct_size = sizeof(struct samr_LogonHours ),
14071 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_samr_LogonHours,
14072 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_samr_LogonHours,
14073 : .ndr_print = (ndr_print_function_t) ndr_print_flags_samr_LogonHours,
14074 : },
14075 : {
14076 : .name = "samr_Password",
14077 : .struct_size = sizeof(struct samr_Password ),
14078 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_samr_Password,
14079 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_samr_Password,
14080 : .ndr_print = (ndr_print_function_t) ndr_print_flags_samr_Password,
14081 : },
14082 : {
14083 : .name = "samr_CryptPassword",
14084 : .struct_size = sizeof(struct samr_CryptPassword ),
14085 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_samr_CryptPassword,
14086 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_samr_CryptPassword,
14087 : .ndr_print = (ndr_print_function_t) ndr_print_flags_samr_CryptPassword,
14088 : },
14089 : {
14090 : .name = "samr_RidWithAttribute",
14091 : .struct_size = sizeof(struct samr_RidWithAttribute ),
14092 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_samr_RidWithAttribute,
14093 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_samr_RidWithAttribute,
14094 : .ndr_print = (ndr_print_function_t) ndr_print_flags_samr_RidWithAttribute,
14095 : },
14096 : {
14097 : .name = "samr_RidWithAttributeArray",
14098 : .struct_size = sizeof(struct samr_RidWithAttributeArray ),
14099 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_samr_RidWithAttributeArray,
14100 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_samr_RidWithAttributeArray,
14101 : .ndr_print = (ndr_print_function_t) ndr_print_flags_samr_RidWithAttributeArray,
14102 : },
14103 : { .name = NULL }
14104 : };
14105 :
14106 : static const struct ndr_interface_call samr_calls[] = {
14107 : {
14108 : "samr_Connect",
14109 : sizeof(struct samr_Connect),
14110 : (ndr_push_flags_fn_t) ndr_push_samr_Connect,
14111 : (ndr_pull_flags_fn_t) ndr_pull_samr_Connect,
14112 : (ndr_print_function_t) ndr_print_samr_Connect,
14113 : { 0, NULL },
14114 : { 0, NULL },
14115 : },
14116 : {
14117 : "samr_Close",
14118 : sizeof(struct samr_Close),
14119 : (ndr_push_flags_fn_t) ndr_push_samr_Close,
14120 : (ndr_pull_flags_fn_t) ndr_pull_samr_Close,
14121 : (ndr_print_function_t) ndr_print_samr_Close,
14122 : { 0, NULL },
14123 : { 0, NULL },
14124 : },
14125 : {
14126 : "samr_SetSecurity",
14127 : sizeof(struct samr_SetSecurity),
14128 : (ndr_push_flags_fn_t) ndr_push_samr_SetSecurity,
14129 : (ndr_pull_flags_fn_t) ndr_pull_samr_SetSecurity,
14130 : (ndr_print_function_t) ndr_print_samr_SetSecurity,
14131 : { 0, NULL },
14132 : { 0, NULL },
14133 : },
14134 : {
14135 : "samr_QuerySecurity",
14136 : sizeof(struct samr_QuerySecurity),
14137 : (ndr_push_flags_fn_t) ndr_push_samr_QuerySecurity,
14138 : (ndr_pull_flags_fn_t) ndr_pull_samr_QuerySecurity,
14139 : (ndr_print_function_t) ndr_print_samr_QuerySecurity,
14140 : { 0, NULL },
14141 : { 0, NULL },
14142 : },
14143 : {
14144 : "samr_Shutdown",
14145 : sizeof(struct samr_Shutdown),
14146 : (ndr_push_flags_fn_t) ndr_push_samr_Shutdown,
14147 : (ndr_pull_flags_fn_t) ndr_pull_samr_Shutdown,
14148 : (ndr_print_function_t) ndr_print_samr_Shutdown,
14149 : { 0, NULL },
14150 : { 0, NULL },
14151 : },
14152 : {
14153 : "samr_LookupDomain",
14154 : sizeof(struct samr_LookupDomain),
14155 : (ndr_push_flags_fn_t) ndr_push_samr_LookupDomain,
14156 : (ndr_pull_flags_fn_t) ndr_pull_samr_LookupDomain,
14157 : (ndr_print_function_t) ndr_print_samr_LookupDomain,
14158 : { 0, NULL },
14159 : { 0, NULL },
14160 : },
14161 : {
14162 : "samr_EnumDomains",
14163 : sizeof(struct samr_EnumDomains),
14164 : (ndr_push_flags_fn_t) ndr_push_samr_EnumDomains,
14165 : (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomains,
14166 : (ndr_print_function_t) ndr_print_samr_EnumDomains,
14167 : { 0, NULL },
14168 : { 0, NULL },
14169 : },
14170 : {
14171 : "samr_OpenDomain",
14172 : sizeof(struct samr_OpenDomain),
14173 : (ndr_push_flags_fn_t) ndr_push_samr_OpenDomain,
14174 : (ndr_pull_flags_fn_t) ndr_pull_samr_OpenDomain,
14175 : (ndr_print_function_t) ndr_print_samr_OpenDomain,
14176 : { 0, NULL },
14177 : { 0, NULL },
14178 : },
14179 : {
14180 : "samr_QueryDomainInfo",
14181 : sizeof(struct samr_QueryDomainInfo),
14182 : (ndr_push_flags_fn_t) ndr_push_samr_QueryDomainInfo,
14183 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDomainInfo,
14184 : (ndr_print_function_t) ndr_print_samr_QueryDomainInfo,
14185 : { 0, NULL },
14186 : { 0, NULL },
14187 : },
14188 : {
14189 : "samr_SetDomainInfo",
14190 : sizeof(struct samr_SetDomainInfo),
14191 : (ndr_push_flags_fn_t) ndr_push_samr_SetDomainInfo,
14192 : (ndr_pull_flags_fn_t) ndr_pull_samr_SetDomainInfo,
14193 : (ndr_print_function_t) ndr_print_samr_SetDomainInfo,
14194 : { 0, NULL },
14195 : { 0, NULL },
14196 : },
14197 : {
14198 : "samr_CreateDomainGroup",
14199 : sizeof(struct samr_CreateDomainGroup),
14200 : (ndr_push_flags_fn_t) ndr_push_samr_CreateDomainGroup,
14201 : (ndr_pull_flags_fn_t) ndr_pull_samr_CreateDomainGroup,
14202 : (ndr_print_function_t) ndr_print_samr_CreateDomainGroup,
14203 : { 0, NULL },
14204 : { 0, NULL },
14205 : },
14206 : {
14207 : "samr_EnumDomainGroups",
14208 : sizeof(struct samr_EnumDomainGroups),
14209 : (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainGroups,
14210 : (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainGroups,
14211 : (ndr_print_function_t) ndr_print_samr_EnumDomainGroups,
14212 : { 0, NULL },
14213 : { 0, NULL },
14214 : },
14215 : {
14216 : "samr_CreateUser",
14217 : sizeof(struct samr_CreateUser),
14218 : (ndr_push_flags_fn_t) ndr_push_samr_CreateUser,
14219 : (ndr_pull_flags_fn_t) ndr_pull_samr_CreateUser,
14220 : (ndr_print_function_t) ndr_print_samr_CreateUser,
14221 : { 0, NULL },
14222 : { 0, NULL },
14223 : },
14224 : {
14225 : "samr_EnumDomainUsers",
14226 : sizeof(struct samr_EnumDomainUsers),
14227 : (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainUsers,
14228 : (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainUsers,
14229 : (ndr_print_function_t) ndr_print_samr_EnumDomainUsers,
14230 : { 0, NULL },
14231 : { 0, NULL },
14232 : },
14233 : {
14234 : "samr_CreateDomAlias",
14235 : sizeof(struct samr_CreateDomAlias),
14236 : (ndr_push_flags_fn_t) ndr_push_samr_CreateDomAlias,
14237 : (ndr_pull_flags_fn_t) ndr_pull_samr_CreateDomAlias,
14238 : (ndr_print_function_t) ndr_print_samr_CreateDomAlias,
14239 : { 0, NULL },
14240 : { 0, NULL },
14241 : },
14242 : {
14243 : "samr_EnumDomainAliases",
14244 : sizeof(struct samr_EnumDomainAliases),
14245 : (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainAliases,
14246 : (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainAliases,
14247 : (ndr_print_function_t) ndr_print_samr_EnumDomainAliases,
14248 : { 0, NULL },
14249 : { 0, NULL },
14250 : },
14251 : {
14252 : "samr_GetAliasMembership",
14253 : sizeof(struct samr_GetAliasMembership),
14254 : (ndr_push_flags_fn_t) ndr_push_samr_GetAliasMembership,
14255 : (ndr_pull_flags_fn_t) ndr_pull_samr_GetAliasMembership,
14256 : (ndr_print_function_t) ndr_print_samr_GetAliasMembership,
14257 : { 0, NULL },
14258 : { 0, NULL },
14259 : },
14260 : {
14261 : "samr_LookupNames",
14262 : sizeof(struct samr_LookupNames),
14263 : (ndr_push_flags_fn_t) ndr_push_samr_LookupNames,
14264 : (ndr_pull_flags_fn_t) ndr_pull_samr_LookupNames,
14265 : (ndr_print_function_t) ndr_print_samr_LookupNames,
14266 : { 0, NULL },
14267 : { 0, NULL },
14268 : },
14269 : {
14270 : "samr_LookupRids",
14271 : sizeof(struct samr_LookupRids),
14272 : (ndr_push_flags_fn_t) ndr_push_samr_LookupRids,
14273 : (ndr_pull_flags_fn_t) ndr_pull_samr_LookupRids,
14274 : (ndr_print_function_t) ndr_print_samr_LookupRids,
14275 : { 0, NULL },
14276 : { 0, NULL },
14277 : },
14278 : {
14279 : "samr_OpenGroup",
14280 : sizeof(struct samr_OpenGroup),
14281 : (ndr_push_flags_fn_t) ndr_push_samr_OpenGroup,
14282 : (ndr_pull_flags_fn_t) ndr_pull_samr_OpenGroup,
14283 : (ndr_print_function_t) ndr_print_samr_OpenGroup,
14284 : { 0, NULL },
14285 : { 0, NULL },
14286 : },
14287 : {
14288 : "samr_QueryGroupInfo",
14289 : sizeof(struct samr_QueryGroupInfo),
14290 : (ndr_push_flags_fn_t) ndr_push_samr_QueryGroupInfo,
14291 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryGroupInfo,
14292 : (ndr_print_function_t) ndr_print_samr_QueryGroupInfo,
14293 : { 0, NULL },
14294 : { 0, NULL },
14295 : },
14296 : {
14297 : "samr_SetGroupInfo",
14298 : sizeof(struct samr_SetGroupInfo),
14299 : (ndr_push_flags_fn_t) ndr_push_samr_SetGroupInfo,
14300 : (ndr_pull_flags_fn_t) ndr_pull_samr_SetGroupInfo,
14301 : (ndr_print_function_t) ndr_print_samr_SetGroupInfo,
14302 : { 0, NULL },
14303 : { 0, NULL },
14304 : },
14305 : {
14306 : "samr_AddGroupMember",
14307 : sizeof(struct samr_AddGroupMember),
14308 : (ndr_push_flags_fn_t) ndr_push_samr_AddGroupMember,
14309 : (ndr_pull_flags_fn_t) ndr_pull_samr_AddGroupMember,
14310 : (ndr_print_function_t) ndr_print_samr_AddGroupMember,
14311 : { 0, NULL },
14312 : { 0, NULL },
14313 : },
14314 : {
14315 : "samr_DeleteDomainGroup",
14316 : sizeof(struct samr_DeleteDomainGroup),
14317 : (ndr_push_flags_fn_t) ndr_push_samr_DeleteDomainGroup,
14318 : (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteDomainGroup,
14319 : (ndr_print_function_t) ndr_print_samr_DeleteDomainGroup,
14320 : { 0, NULL },
14321 : { 0, NULL },
14322 : },
14323 : {
14324 : "samr_DeleteGroupMember",
14325 : sizeof(struct samr_DeleteGroupMember),
14326 : (ndr_push_flags_fn_t) ndr_push_samr_DeleteGroupMember,
14327 : (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteGroupMember,
14328 : (ndr_print_function_t) ndr_print_samr_DeleteGroupMember,
14329 : { 0, NULL },
14330 : { 0, NULL },
14331 : },
14332 : {
14333 : "samr_QueryGroupMember",
14334 : sizeof(struct samr_QueryGroupMember),
14335 : (ndr_push_flags_fn_t) ndr_push_samr_QueryGroupMember,
14336 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryGroupMember,
14337 : (ndr_print_function_t) ndr_print_samr_QueryGroupMember,
14338 : { 0, NULL },
14339 : { 0, NULL },
14340 : },
14341 : {
14342 : "samr_SetMemberAttributesOfGroup",
14343 : sizeof(struct samr_SetMemberAttributesOfGroup),
14344 : (ndr_push_flags_fn_t) ndr_push_samr_SetMemberAttributesOfGroup,
14345 : (ndr_pull_flags_fn_t) ndr_pull_samr_SetMemberAttributesOfGroup,
14346 : (ndr_print_function_t) ndr_print_samr_SetMemberAttributesOfGroup,
14347 : { 0, NULL },
14348 : { 0, NULL },
14349 : },
14350 : {
14351 : "samr_OpenAlias",
14352 : sizeof(struct samr_OpenAlias),
14353 : (ndr_push_flags_fn_t) ndr_push_samr_OpenAlias,
14354 : (ndr_pull_flags_fn_t) ndr_pull_samr_OpenAlias,
14355 : (ndr_print_function_t) ndr_print_samr_OpenAlias,
14356 : { 0, NULL },
14357 : { 0, NULL },
14358 : },
14359 : {
14360 : "samr_QueryAliasInfo",
14361 : sizeof(struct samr_QueryAliasInfo),
14362 : (ndr_push_flags_fn_t) ndr_push_samr_QueryAliasInfo,
14363 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryAliasInfo,
14364 : (ndr_print_function_t) ndr_print_samr_QueryAliasInfo,
14365 : { 0, NULL },
14366 : { 0, NULL },
14367 : },
14368 : {
14369 : "samr_SetAliasInfo",
14370 : sizeof(struct samr_SetAliasInfo),
14371 : (ndr_push_flags_fn_t) ndr_push_samr_SetAliasInfo,
14372 : (ndr_pull_flags_fn_t) ndr_pull_samr_SetAliasInfo,
14373 : (ndr_print_function_t) ndr_print_samr_SetAliasInfo,
14374 : { 0, NULL },
14375 : { 0, NULL },
14376 : },
14377 : {
14378 : "samr_DeleteDomAlias",
14379 : sizeof(struct samr_DeleteDomAlias),
14380 : (ndr_push_flags_fn_t) ndr_push_samr_DeleteDomAlias,
14381 : (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteDomAlias,
14382 : (ndr_print_function_t) ndr_print_samr_DeleteDomAlias,
14383 : { 0, NULL },
14384 : { 0, NULL },
14385 : },
14386 : {
14387 : "samr_AddAliasMember",
14388 : sizeof(struct samr_AddAliasMember),
14389 : (ndr_push_flags_fn_t) ndr_push_samr_AddAliasMember,
14390 : (ndr_pull_flags_fn_t) ndr_pull_samr_AddAliasMember,
14391 : (ndr_print_function_t) ndr_print_samr_AddAliasMember,
14392 : { 0, NULL },
14393 : { 0, NULL },
14394 : },
14395 : {
14396 : "samr_DeleteAliasMember",
14397 : sizeof(struct samr_DeleteAliasMember),
14398 : (ndr_push_flags_fn_t) ndr_push_samr_DeleteAliasMember,
14399 : (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteAliasMember,
14400 : (ndr_print_function_t) ndr_print_samr_DeleteAliasMember,
14401 : { 0, NULL },
14402 : { 0, NULL },
14403 : },
14404 : {
14405 : "samr_GetMembersInAlias",
14406 : sizeof(struct samr_GetMembersInAlias),
14407 : (ndr_push_flags_fn_t) ndr_push_samr_GetMembersInAlias,
14408 : (ndr_pull_flags_fn_t) ndr_pull_samr_GetMembersInAlias,
14409 : (ndr_print_function_t) ndr_print_samr_GetMembersInAlias,
14410 : { 0, NULL },
14411 : { 0, NULL },
14412 : },
14413 : {
14414 : "samr_OpenUser",
14415 : sizeof(struct samr_OpenUser),
14416 : (ndr_push_flags_fn_t) ndr_push_samr_OpenUser,
14417 : (ndr_pull_flags_fn_t) ndr_pull_samr_OpenUser,
14418 : (ndr_print_function_t) ndr_print_samr_OpenUser,
14419 : { 0, NULL },
14420 : { 0, NULL },
14421 : },
14422 : {
14423 : "samr_DeleteUser",
14424 : sizeof(struct samr_DeleteUser),
14425 : (ndr_push_flags_fn_t) ndr_push_samr_DeleteUser,
14426 : (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteUser,
14427 : (ndr_print_function_t) ndr_print_samr_DeleteUser,
14428 : { 0, NULL },
14429 : { 0, NULL },
14430 : },
14431 : {
14432 : "samr_QueryUserInfo",
14433 : sizeof(struct samr_QueryUserInfo),
14434 : (ndr_push_flags_fn_t) ndr_push_samr_QueryUserInfo,
14435 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryUserInfo,
14436 : (ndr_print_function_t) ndr_print_samr_QueryUserInfo,
14437 : { 0, NULL },
14438 : { 0, NULL },
14439 : },
14440 : {
14441 : "samr_SetUserInfo",
14442 : sizeof(struct samr_SetUserInfo),
14443 : (ndr_push_flags_fn_t) ndr_push_samr_SetUserInfo,
14444 : (ndr_pull_flags_fn_t) ndr_pull_samr_SetUserInfo,
14445 : (ndr_print_function_t) ndr_print_samr_SetUserInfo,
14446 : { 0, NULL },
14447 : { 0, NULL },
14448 : },
14449 : {
14450 : "samr_ChangePasswordUser",
14451 : sizeof(struct samr_ChangePasswordUser),
14452 : (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser,
14453 : (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser,
14454 : (ndr_print_function_t) ndr_print_samr_ChangePasswordUser,
14455 : { 0, NULL },
14456 : { 0, NULL },
14457 : },
14458 : {
14459 : "samr_GetGroupsForUser",
14460 : sizeof(struct samr_GetGroupsForUser),
14461 : (ndr_push_flags_fn_t) ndr_push_samr_GetGroupsForUser,
14462 : (ndr_pull_flags_fn_t) ndr_pull_samr_GetGroupsForUser,
14463 : (ndr_print_function_t) ndr_print_samr_GetGroupsForUser,
14464 : { 0, NULL },
14465 : { 0, NULL },
14466 : },
14467 : {
14468 : "samr_QueryDisplayInfo",
14469 : sizeof(struct samr_QueryDisplayInfo),
14470 : (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo,
14471 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo,
14472 : (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo,
14473 : { 0, NULL },
14474 : { 0, NULL },
14475 : },
14476 : {
14477 : "samr_GetDisplayEnumerationIndex",
14478 : sizeof(struct samr_GetDisplayEnumerationIndex),
14479 : (ndr_push_flags_fn_t) ndr_push_samr_GetDisplayEnumerationIndex,
14480 : (ndr_pull_flags_fn_t) ndr_pull_samr_GetDisplayEnumerationIndex,
14481 : (ndr_print_function_t) ndr_print_samr_GetDisplayEnumerationIndex,
14482 : { 0, NULL },
14483 : { 0, NULL },
14484 : },
14485 : {
14486 : "samr_TestPrivateFunctionsDomain",
14487 : sizeof(struct samr_TestPrivateFunctionsDomain),
14488 : (ndr_push_flags_fn_t) ndr_push_samr_TestPrivateFunctionsDomain,
14489 : (ndr_pull_flags_fn_t) ndr_pull_samr_TestPrivateFunctionsDomain,
14490 : (ndr_print_function_t) ndr_print_samr_TestPrivateFunctionsDomain,
14491 : { 0, NULL },
14492 : { 0, NULL },
14493 : },
14494 : {
14495 : "samr_TestPrivateFunctionsUser",
14496 : sizeof(struct samr_TestPrivateFunctionsUser),
14497 : (ndr_push_flags_fn_t) ndr_push_samr_TestPrivateFunctionsUser,
14498 : (ndr_pull_flags_fn_t) ndr_pull_samr_TestPrivateFunctionsUser,
14499 : (ndr_print_function_t) ndr_print_samr_TestPrivateFunctionsUser,
14500 : { 0, NULL },
14501 : { 0, NULL },
14502 : },
14503 : {
14504 : "samr_GetUserPwInfo",
14505 : sizeof(struct samr_GetUserPwInfo),
14506 : (ndr_push_flags_fn_t) ndr_push_samr_GetUserPwInfo,
14507 : (ndr_pull_flags_fn_t) ndr_pull_samr_GetUserPwInfo,
14508 : (ndr_print_function_t) ndr_print_samr_GetUserPwInfo,
14509 : { 0, NULL },
14510 : { 0, NULL },
14511 : },
14512 : {
14513 : "samr_RemoveMemberFromForeignDomain",
14514 : sizeof(struct samr_RemoveMemberFromForeignDomain),
14515 : (ndr_push_flags_fn_t) ndr_push_samr_RemoveMemberFromForeignDomain,
14516 : (ndr_pull_flags_fn_t) ndr_pull_samr_RemoveMemberFromForeignDomain,
14517 : (ndr_print_function_t) ndr_print_samr_RemoveMemberFromForeignDomain,
14518 : { 0, NULL },
14519 : { 0, NULL },
14520 : },
14521 : {
14522 : "samr_QueryDomainInfo2",
14523 : sizeof(struct samr_QueryDomainInfo2),
14524 : (ndr_push_flags_fn_t) ndr_push_samr_QueryDomainInfo2,
14525 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDomainInfo2,
14526 : (ndr_print_function_t) ndr_print_samr_QueryDomainInfo2,
14527 : { 0, NULL },
14528 : { 0, NULL },
14529 : },
14530 : {
14531 : "samr_QueryUserInfo2",
14532 : sizeof(struct samr_QueryUserInfo2),
14533 : (ndr_push_flags_fn_t) ndr_push_samr_QueryUserInfo2,
14534 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryUserInfo2,
14535 : (ndr_print_function_t) ndr_print_samr_QueryUserInfo2,
14536 : { 0, NULL },
14537 : { 0, NULL },
14538 : },
14539 : {
14540 : "samr_QueryDisplayInfo2",
14541 : sizeof(struct samr_QueryDisplayInfo2),
14542 : (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo2,
14543 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo2,
14544 : (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo2,
14545 : { 0, NULL },
14546 : { 0, NULL },
14547 : },
14548 : {
14549 : "samr_GetDisplayEnumerationIndex2",
14550 : sizeof(struct samr_GetDisplayEnumerationIndex2),
14551 : (ndr_push_flags_fn_t) ndr_push_samr_GetDisplayEnumerationIndex2,
14552 : (ndr_pull_flags_fn_t) ndr_pull_samr_GetDisplayEnumerationIndex2,
14553 : (ndr_print_function_t) ndr_print_samr_GetDisplayEnumerationIndex2,
14554 : { 0, NULL },
14555 : { 0, NULL },
14556 : },
14557 : {
14558 : "samr_CreateUser2",
14559 : sizeof(struct samr_CreateUser2),
14560 : (ndr_push_flags_fn_t) ndr_push_samr_CreateUser2,
14561 : (ndr_pull_flags_fn_t) ndr_pull_samr_CreateUser2,
14562 : (ndr_print_function_t) ndr_print_samr_CreateUser2,
14563 : { 0, NULL },
14564 : { 0, NULL },
14565 : },
14566 : {
14567 : "samr_QueryDisplayInfo3",
14568 : sizeof(struct samr_QueryDisplayInfo3),
14569 : (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo3,
14570 : (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo3,
14571 : (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo3,
14572 : { 0, NULL },
14573 : { 0, NULL },
14574 : },
14575 : {
14576 : "samr_AddMultipleMembersToAlias",
14577 : sizeof(struct samr_AddMultipleMembersToAlias),
14578 : (ndr_push_flags_fn_t) ndr_push_samr_AddMultipleMembersToAlias,
14579 : (ndr_pull_flags_fn_t) ndr_pull_samr_AddMultipleMembersToAlias,
14580 : (ndr_print_function_t) ndr_print_samr_AddMultipleMembersToAlias,
14581 : { 0, NULL },
14582 : { 0, NULL },
14583 : },
14584 : {
14585 : "samr_RemoveMultipleMembersFromAlias",
14586 : sizeof(struct samr_RemoveMultipleMembersFromAlias),
14587 : (ndr_push_flags_fn_t) ndr_push_samr_RemoveMultipleMembersFromAlias,
14588 : (ndr_pull_flags_fn_t) ndr_pull_samr_RemoveMultipleMembersFromAlias,
14589 : (ndr_print_function_t) ndr_print_samr_RemoveMultipleMembersFromAlias,
14590 : { 0, NULL },
14591 : { 0, NULL },
14592 : },
14593 : {
14594 : "samr_OemChangePasswordUser2",
14595 : sizeof(struct samr_OemChangePasswordUser2),
14596 : (ndr_push_flags_fn_t) ndr_push_samr_OemChangePasswordUser2,
14597 : (ndr_pull_flags_fn_t) ndr_pull_samr_OemChangePasswordUser2,
14598 : (ndr_print_function_t) ndr_print_samr_OemChangePasswordUser2,
14599 : { 0, NULL },
14600 : { 0, NULL },
14601 : },
14602 : {
14603 : "samr_ChangePasswordUser2",
14604 : sizeof(struct samr_ChangePasswordUser2),
14605 : (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser2,
14606 : (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser2,
14607 : (ndr_print_function_t) ndr_print_samr_ChangePasswordUser2,
14608 : { 0, NULL },
14609 : { 0, NULL },
14610 : },
14611 : {
14612 : "samr_GetDomPwInfo",
14613 : sizeof(struct samr_GetDomPwInfo),
14614 : (ndr_push_flags_fn_t) ndr_push_samr_GetDomPwInfo,
14615 : (ndr_pull_flags_fn_t) ndr_pull_samr_GetDomPwInfo,
14616 : (ndr_print_function_t) ndr_print_samr_GetDomPwInfo,
14617 : { 0, NULL },
14618 : { 0, NULL },
14619 : },
14620 : {
14621 : "samr_Connect2",
14622 : sizeof(struct samr_Connect2),
14623 : (ndr_push_flags_fn_t) ndr_push_samr_Connect2,
14624 : (ndr_pull_flags_fn_t) ndr_pull_samr_Connect2,
14625 : (ndr_print_function_t) ndr_print_samr_Connect2,
14626 : { 0, NULL },
14627 : { 0, NULL },
14628 : },
14629 : {
14630 : "samr_SetUserInfo2",
14631 : sizeof(struct samr_SetUserInfo2),
14632 : (ndr_push_flags_fn_t) ndr_push_samr_SetUserInfo2,
14633 : (ndr_pull_flags_fn_t) ndr_pull_samr_SetUserInfo2,
14634 : (ndr_print_function_t) ndr_print_samr_SetUserInfo2,
14635 : { 0, NULL },
14636 : { 0, NULL },
14637 : },
14638 : {
14639 : "samr_SetBootKeyInformation",
14640 : sizeof(struct samr_SetBootKeyInformation),
14641 : (ndr_push_flags_fn_t) ndr_push_samr_SetBootKeyInformation,
14642 : (ndr_pull_flags_fn_t) ndr_pull_samr_SetBootKeyInformation,
14643 : (ndr_print_function_t) ndr_print_samr_SetBootKeyInformation,
14644 : { 0, NULL },
14645 : { 0, NULL },
14646 : },
14647 : {
14648 : "samr_GetBootKeyInformation",
14649 : sizeof(struct samr_GetBootKeyInformation),
14650 : (ndr_push_flags_fn_t) ndr_push_samr_GetBootKeyInformation,
14651 : (ndr_pull_flags_fn_t) ndr_pull_samr_GetBootKeyInformation,
14652 : (ndr_print_function_t) ndr_print_samr_GetBootKeyInformation,
14653 : { 0, NULL },
14654 : { 0, NULL },
14655 : },
14656 : {
14657 : "samr_Connect3",
14658 : sizeof(struct samr_Connect3),
14659 : (ndr_push_flags_fn_t) ndr_push_samr_Connect3,
14660 : (ndr_pull_flags_fn_t) ndr_pull_samr_Connect3,
14661 : (ndr_print_function_t) ndr_print_samr_Connect3,
14662 : { 0, NULL },
14663 : { 0, NULL },
14664 : },
14665 : {
14666 : "samr_Connect4",
14667 : sizeof(struct samr_Connect4),
14668 : (ndr_push_flags_fn_t) ndr_push_samr_Connect4,
14669 : (ndr_pull_flags_fn_t) ndr_pull_samr_Connect4,
14670 : (ndr_print_function_t) ndr_print_samr_Connect4,
14671 : { 0, NULL },
14672 : { 0, NULL },
14673 : },
14674 : {
14675 : "samr_ChangePasswordUser3",
14676 : sizeof(struct samr_ChangePasswordUser3),
14677 : (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser3,
14678 : (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser3,
14679 : (ndr_print_function_t) ndr_print_samr_ChangePasswordUser3,
14680 : { 0, NULL },
14681 : { 0, NULL },
14682 : },
14683 : {
14684 : "samr_Connect5",
14685 : sizeof(struct samr_Connect5),
14686 : (ndr_push_flags_fn_t) ndr_push_samr_Connect5,
14687 : (ndr_pull_flags_fn_t) ndr_pull_samr_Connect5,
14688 : (ndr_print_function_t) ndr_print_samr_Connect5,
14689 : { 0, NULL },
14690 : { 0, NULL },
14691 : },
14692 : {
14693 : "samr_RidToSid",
14694 : sizeof(struct samr_RidToSid),
14695 : (ndr_push_flags_fn_t) ndr_push_samr_RidToSid,
14696 : (ndr_pull_flags_fn_t) ndr_pull_samr_RidToSid,
14697 : (ndr_print_function_t) ndr_print_samr_RidToSid,
14698 : { 0, NULL },
14699 : { 0, NULL },
14700 : },
14701 : {
14702 : "samr_SetDsrmPassword",
14703 : sizeof(struct samr_SetDsrmPassword),
14704 : (ndr_push_flags_fn_t) ndr_push_samr_SetDsrmPassword,
14705 : (ndr_pull_flags_fn_t) ndr_pull_samr_SetDsrmPassword,
14706 : (ndr_print_function_t) ndr_print_samr_SetDsrmPassword,
14707 : { 0, NULL },
14708 : { 0, NULL },
14709 : },
14710 : {
14711 : "samr_ValidatePassword",
14712 : sizeof(struct samr_ValidatePassword),
14713 : (ndr_push_flags_fn_t) ndr_push_samr_ValidatePassword,
14714 : (ndr_pull_flags_fn_t) ndr_pull_samr_ValidatePassword,
14715 : (ndr_print_function_t) ndr_print_samr_ValidatePassword,
14716 : { 0, NULL },
14717 : { 0, NULL },
14718 : },
14719 : {
14720 : "samr_Opnum68NotUsedOnWire",
14721 : sizeof(struct samr_Opnum68NotUsedOnWire),
14722 : (ndr_push_flags_fn_t) ndr_push_samr_Opnum68NotUsedOnWire,
14723 : (ndr_pull_flags_fn_t) ndr_pull_samr_Opnum68NotUsedOnWire,
14724 : (ndr_print_function_t) ndr_print_samr_Opnum68NotUsedOnWire,
14725 : { 0, NULL },
14726 : { 0, NULL },
14727 : },
14728 : {
14729 : "samr_Opnum69NotUsedOnWire",
14730 : sizeof(struct samr_Opnum69NotUsedOnWire),
14731 : (ndr_push_flags_fn_t) ndr_push_samr_Opnum69NotUsedOnWire,
14732 : (ndr_pull_flags_fn_t) ndr_pull_samr_Opnum69NotUsedOnWire,
14733 : (ndr_print_function_t) ndr_print_samr_Opnum69NotUsedOnWire,
14734 : { 0, NULL },
14735 : { 0, NULL },
14736 : },
14737 : {
14738 : "samr_Opnum70NotUsedOnWire",
14739 : sizeof(struct samr_Opnum70NotUsedOnWire),
14740 : (ndr_push_flags_fn_t) ndr_push_samr_Opnum70NotUsedOnWire,
14741 : (ndr_pull_flags_fn_t) ndr_pull_samr_Opnum70NotUsedOnWire,
14742 : (ndr_print_function_t) ndr_print_samr_Opnum70NotUsedOnWire,
14743 : { 0, NULL },
14744 : { 0, NULL },
14745 : },
14746 : {
14747 : "samr_Opnum71NotUsedOnWire",
14748 : sizeof(struct samr_Opnum71NotUsedOnWire),
14749 : (ndr_push_flags_fn_t) ndr_push_samr_Opnum71NotUsedOnWire,
14750 : (ndr_pull_flags_fn_t) ndr_pull_samr_Opnum71NotUsedOnWire,
14751 : (ndr_print_function_t) ndr_print_samr_Opnum71NotUsedOnWire,
14752 : { 0, NULL },
14753 : { 0, NULL },
14754 : },
14755 : {
14756 : "samr_Opnum72NotUsedOnWire",
14757 : sizeof(struct samr_Opnum72NotUsedOnWire),
14758 : (ndr_push_flags_fn_t) ndr_push_samr_Opnum72NotUsedOnWire,
14759 : (ndr_pull_flags_fn_t) ndr_pull_samr_Opnum72NotUsedOnWire,
14760 : (ndr_print_function_t) ndr_print_samr_Opnum72NotUsedOnWire,
14761 : { 0, NULL },
14762 : { 0, NULL },
14763 : },
14764 : {
14765 : "samr_ChangePasswordUser4",
14766 : sizeof(struct samr_ChangePasswordUser4),
14767 : (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser4,
14768 : (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser4,
14769 : (ndr_print_function_t) ndr_print_samr_ChangePasswordUser4,
14770 : { 0, NULL },
14771 : { 0, NULL },
14772 : },
14773 : { .name = NULL }
14774 : };
14775 :
14776 : static const char * const samr_endpoint_strings[] = {
14777 : "ncacn_np:[\\pipe\\samr]",
14778 : "ncacn_ip_tcp:",
14779 : "ncalrpc:",
14780 : };
14781 :
14782 : static const struct ndr_interface_string_array samr_endpoints = {
14783 : .count = 3,
14784 : .names = samr_endpoint_strings
14785 : };
14786 :
14787 : static const char * const samr_authservice_strings[] = {
14788 : "host",
14789 : };
14790 :
14791 : static const struct ndr_interface_string_array samr_authservices = {
14792 : .count = 1,
14793 : .names = samr_authservice_strings
14794 : };
14795 :
14796 :
14797 : const struct ndr_interface_table ndr_table_samr = {
14798 : .name = "samr",
14799 : .syntax_id = {
14800 : {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xac}},
14801 : NDR_SAMR_VERSION
14802 : },
14803 : .helpstring = NDR_SAMR_HELPSTRING,
14804 : .num_calls = 74,
14805 : .calls = samr_calls,
14806 : .num_public_structs = 6,
14807 : .public_structs = samr_public_structs,
14808 : .endpoints = &samr_endpoints,
14809 : .authservices = &samr_authservices
14810 : };
14811 :
14812 : #endif /* SKIP_NDR_TABLE_samr */
|