Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_netlogon.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_lsa.h"
8 : #include "librpc/gen_ndr/ndr_samr.h"
9 : #include "librpc/gen_ndr/ndr_security.h"
10 : #include "librpc/gen_ndr/ndr_nbt.h"
11 0 : static enum ndr_err_code ndr_push_netr_UasInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_UasInfo *r)
12 : {
13 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
14 0 : if (ndr_flags & NDR_SCALARS) {
15 0 : NDR_CHECK(ndr_push_align(ndr, 5));
16 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
17 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priv));
18 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_flags));
19 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_count));
20 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pw_count));
21 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logon));
22 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logoff));
23 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->logoff_time));
24 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->kickoff_time));
25 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->password_age));
26 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_can_change));
27 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_must_change));
28 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer));
29 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
30 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->script_path));
31 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
32 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
33 : }
34 0 : if (ndr_flags & NDR_BUFFERS) {
35 0 : if (r->account_name) {
36 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
37 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
38 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
39 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
40 : }
41 0 : if (r->computer) {
42 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
43 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
44 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
45 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer, ndr_charset_length(r->computer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
46 : }
47 0 : if (r->domain) {
48 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
49 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
50 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
51 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
52 : }
53 0 : if (r->script_path) {
54 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
55 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
56 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
57 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->script_path, ndr_charset_length(r->script_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
58 : }
59 : }
60 0 : return NDR_ERR_SUCCESS;
61 : }
62 :
63 0 : static enum ndr_err_code ndr_pull_netr_UasInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_UasInfo *r)
64 : {
65 0 : uint32_t _ptr_account_name;
66 0 : uint32_t size_account_name_1 = 0;
67 0 : uint32_t length_account_name_1 = 0;
68 0 : TALLOC_CTX *_mem_save_account_name_0 = NULL;
69 0 : uint32_t _ptr_computer;
70 0 : uint32_t size_computer_1 = 0;
71 0 : uint32_t length_computer_1 = 0;
72 0 : TALLOC_CTX *_mem_save_computer_0 = NULL;
73 0 : uint32_t _ptr_domain;
74 0 : uint32_t size_domain_1 = 0;
75 0 : uint32_t length_domain_1 = 0;
76 0 : TALLOC_CTX *_mem_save_domain_0 = NULL;
77 0 : uint32_t _ptr_script_path;
78 0 : uint32_t size_script_path_1 = 0;
79 0 : uint32_t length_script_path_1 = 0;
80 0 : TALLOC_CTX *_mem_save_script_path_0 = NULL;
81 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
82 0 : if (ndr_flags & NDR_SCALARS) {
83 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
84 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
85 0 : if (_ptr_account_name) {
86 0 : NDR_PULL_ALLOC(ndr, r->account_name);
87 : } else {
88 0 : r->account_name = NULL;
89 : }
90 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priv));
91 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_flags));
92 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_count));
93 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_pw_count));
94 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logon));
95 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logoff));
96 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->logoff_time));
97 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->kickoff_time));
98 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->password_age));
99 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_can_change));
100 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_must_change));
101 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer));
102 0 : if (_ptr_computer) {
103 0 : NDR_PULL_ALLOC(ndr, r->computer);
104 : } else {
105 0 : r->computer = NULL;
106 : }
107 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
108 0 : if (_ptr_domain) {
109 0 : NDR_PULL_ALLOC(ndr, r->domain);
110 : } else {
111 0 : r->domain = NULL;
112 : }
113 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_script_path));
114 0 : if (_ptr_script_path) {
115 0 : NDR_PULL_ALLOC(ndr, r->script_path);
116 : } else {
117 0 : r->script_path = NULL;
118 : }
119 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
120 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
121 : }
122 0 : if (ndr_flags & NDR_BUFFERS) {
123 0 : if (r->account_name) {
124 0 : _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
125 0 : NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
126 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
127 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
128 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_1));
129 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_1));
130 0 : if (length_account_name_1 > size_account_name_1) {
131 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
132 : }
133 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
134 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
135 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
136 : }
137 0 : if (r->computer) {
138 0 : _mem_save_computer_0 = NDR_PULL_GET_MEM_CTX(ndr);
139 0 : NDR_PULL_SET_MEM_CTX(ndr, r->computer, 0);
140 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer));
141 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->computer));
142 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer, &size_computer_1));
143 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer, &length_computer_1));
144 0 : if (length_computer_1 > size_computer_1) {
145 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_1, length_computer_1);
146 : }
147 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_1, sizeof(uint16_t)));
148 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer, length_computer_1, sizeof(uint16_t), CH_UTF16));
149 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_0, 0);
150 : }
151 0 : if (r->domain) {
152 0 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
153 0 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
154 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
155 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
156 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
157 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
158 0 : if (length_domain_1 > size_domain_1) {
159 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
160 : }
161 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
162 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
163 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
164 : }
165 0 : if (r->script_path) {
166 0 : _mem_save_script_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
167 0 : NDR_PULL_SET_MEM_CTX(ndr, r->script_path, 0);
168 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->script_path));
169 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->script_path));
170 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->script_path, &size_script_path_1));
171 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->script_path, &length_script_path_1));
172 0 : if (length_script_path_1 > size_script_path_1) {
173 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_script_path_1, length_script_path_1);
174 : }
175 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_script_path_1, sizeof(uint16_t)));
176 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->script_path, length_script_path_1, sizeof(uint16_t), CH_UTF16));
177 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_script_path_0, 0);
178 : }
179 : }
180 0 : return NDR_ERR_SUCCESS;
181 : }
182 :
183 0 : _PUBLIC_ void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r)
184 : {
185 0 : ndr_print_struct(ndr, name, "netr_UasInfo");
186 0 : if (r == NULL) { ndr_print_null(ndr); return; }
187 0 : ndr->depth++;
188 0 : ndr_print_ptr(ndr, "account_name", r->account_name);
189 0 : ndr->depth++;
190 0 : if (r->account_name) {
191 0 : ndr_print_string(ndr, "account_name", r->account_name);
192 : }
193 0 : ndr->depth--;
194 0 : ndr_print_uint32(ndr, "priv", r->priv);
195 0 : ndr_print_uint32(ndr, "auth_flags", r->auth_flags);
196 0 : ndr_print_uint32(ndr, "logon_count", r->logon_count);
197 0 : ndr_print_uint32(ndr, "bad_pw_count", r->bad_pw_count);
198 0 : ndr_print_time_t(ndr, "last_logon", r->last_logon);
199 0 : ndr_print_time_t(ndr, "last_logoff", r->last_logoff);
200 0 : ndr_print_time_t(ndr, "logoff_time", r->logoff_time);
201 0 : ndr_print_time_t(ndr, "kickoff_time", r->kickoff_time);
202 0 : ndr_print_uint32(ndr, "password_age", r->password_age);
203 0 : ndr_print_time_t(ndr, "pw_can_change", r->pw_can_change);
204 0 : ndr_print_time_t(ndr, "pw_must_change", r->pw_must_change);
205 0 : ndr_print_ptr(ndr, "computer", r->computer);
206 0 : ndr->depth++;
207 0 : if (r->computer) {
208 0 : ndr_print_string(ndr, "computer", r->computer);
209 : }
210 0 : ndr->depth--;
211 0 : ndr_print_ptr(ndr, "domain", r->domain);
212 0 : ndr->depth++;
213 0 : if (r->domain) {
214 0 : ndr_print_string(ndr, "domain", r->domain);
215 : }
216 0 : ndr->depth--;
217 0 : ndr_print_ptr(ndr, "script_path", r->script_path);
218 0 : ndr->depth++;
219 0 : if (r->script_path) {
220 0 : ndr_print_string(ndr, "script_path", r->script_path);
221 : }
222 0 : ndr->depth--;
223 0 : ndr_print_uint32(ndr, "unknown", r->unknown);
224 0 : ndr->depth--;
225 : }
226 :
227 0 : static enum ndr_err_code ndr_push_netr_UasLogoffInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_UasLogoffInfo *r)
228 : {
229 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
230 0 : if (ndr_flags & NDR_SCALARS) {
231 0 : NDR_CHECK(ndr_push_align(ndr, 4));
232 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->duration));
233 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
234 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
235 : }
236 0 : if (ndr_flags & NDR_BUFFERS) {
237 0 : }
238 0 : return NDR_ERR_SUCCESS;
239 : }
240 :
241 0 : static enum ndr_err_code ndr_pull_netr_UasLogoffInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_UasLogoffInfo *r)
242 : {
243 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
244 0 : if (ndr_flags & NDR_SCALARS) {
245 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
246 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->duration));
247 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
248 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
249 : }
250 0 : if (ndr_flags & NDR_BUFFERS) {
251 0 : }
252 0 : return NDR_ERR_SUCCESS;
253 : }
254 :
255 0 : _PUBLIC_ void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r)
256 : {
257 0 : ndr_print_struct(ndr, name, "netr_UasLogoffInfo");
258 0 : if (r == NULL) { ndr_print_null(ndr); return; }
259 0 : ndr->depth++;
260 0 : ndr_print_uint32(ndr, "duration", r->duration);
261 0 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
262 0 : ndr->depth--;
263 : }
264 :
265 0 : _PUBLIC_ enum ndr_err_code ndr_push_netr_AcctLockStr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_AcctLockStr *r)
266 : {
267 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
268 0 : if (ndr_flags & NDR_SCALARS) {
269 0 : NDR_CHECK(ndr_push_align(ndr, 4));
270 0 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->lockout_duration));
271 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->reset_count));
272 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_attempt_lockout));
273 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy));
274 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
275 : }
276 0 : if (ndr_flags & NDR_BUFFERS) {
277 0 : }
278 0 : return NDR_ERR_SUCCESS;
279 : }
280 :
281 0 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_AcctLockStr *r)
282 : {
283 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
284 0 : if (ndr_flags & NDR_SCALARS) {
285 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
286 0 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->lockout_duration));
287 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->reset_count));
288 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_attempt_lockout));
289 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy));
290 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
291 : }
292 0 : if (ndr_flags & NDR_BUFFERS) {
293 0 : }
294 0 : return NDR_ERR_SUCCESS;
295 : }
296 :
297 0 : static void ndr_print_flags_netr_AcctLockStr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_AcctLockStr *r)
298 : {
299 0 : ndr_print_netr_AcctLockStr(ndr, name, r);
300 0 : }
301 :
302 0 : _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r)
303 : {
304 0 : ndr_print_struct(ndr, name, "netr_AcctLockStr");
305 0 : if (r == NULL) { ndr_print_null(ndr); return; }
306 0 : ndr->depth++;
307 0 : ndr_print_dlong(ndr, "lockout_duration", r->lockout_duration);
308 0 : ndr_print_udlong(ndr, "reset_count", r->reset_count);
309 0 : ndr_print_uint32(ndr, "bad_attempt_lockout", r->bad_attempt_lockout);
310 0 : ndr_print_uint32(ndr, "dummy", r->dummy);
311 0 : ndr->depth--;
312 : }
313 :
314 19966 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonParameterControl(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
315 : {
316 19966 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
317 18122 : return NDR_ERR_SUCCESS;
318 : }
319 :
320 18664 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonParameterControl(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
321 : {
322 1840 : uint32_t v;
323 18664 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
324 18664 : *r = v;
325 18664 : return NDR_ERR_SUCCESS;
326 : }
327 :
328 2 : _PUBLIC_ void ndr_print_netr_LogonParameterControl(struct ndr_print *ndr, const char *name, uint32_t r)
329 : {
330 2 : ndr_print_uint32(ndr, name, r);
331 2 : ndr->depth++;
332 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", MSV1_0_CLEARTEXT_PASSWORD_ALLOWED, r);
333 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_UPDATE_LOGON_STATISTICS", MSV1_0_UPDATE_LOGON_STATISTICS, r);
334 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_USER_PARAMETERS", MSV1_0_RETURN_USER_PARAMETERS, r);
335 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_DONT_TRY_GUEST_ACCOUNT", MSV1_0_DONT_TRY_GUEST_ACCOUNT, r);
336 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT, r);
337 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_PASSWORD_EXPIRY", MSV1_0_RETURN_PASSWORD_EXPIRY, r);
338 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_USE_CLIENT_CHALLENGE", MSV1_0_USE_CLIENT_CHALLENGE, r);
339 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_TRY_GUEST_ACCOUNT_ONLY", MSV1_0_TRY_GUEST_ACCOUNT_ONLY, r);
340 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_PROFILE_PATH", MSV1_0_RETURN_PROFILE_PATH, r);
341 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY", MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY, r);
342 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT, r);
343 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_DISABLE_PERSONAL_FALLBACK", MSV1_0_DISABLE_PERSONAL_FALLBACK, r);
344 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_FORCE_GUEST", MSV1_0_ALLOW_FORCE_GUEST, r);
345 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED", MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED, r);
346 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY", MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY, r);
347 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_MSVCHAPV2", MSV1_0_ALLOW_MSVCHAPV2, r);
348 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_S4U2SELF", MSV1_0_S4U2SELF, r);
349 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CHECK_LOGONHOURS_FOR_S4U", MSV1_0_CHECK_LOGONHOURS_FOR_S4U, r);
350 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_SUBAUTHENTICATION_DLL_EX", MSV1_0_SUBAUTHENTICATION_DLL_EX, r);
351 2 : ndr->depth--;
352 2 : }
353 :
354 39932 : static enum ndr_err_code ndr_push_netr_IdentityInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_IdentityInfo *r)
355 : {
356 39932 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
357 39932 : if (ndr_flags & NDR_SCALARS) {
358 19966 : NDR_CHECK(ndr_push_align(ndr, 5));
359 19966 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
360 19966 : NDR_CHECK(ndr_push_netr_LogonParameterControl(ndr, NDR_SCALARS, r->parameter_control));
361 19966 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->logon_id));
362 19966 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
363 19966 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstation));
364 19966 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
365 : }
366 39932 : if (ndr_flags & NDR_BUFFERS) {
367 19966 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
368 19966 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
369 19966 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
370 : }
371 36244 : return NDR_ERR_SUCCESS;
372 : }
373 :
374 37328 : static enum ndr_err_code ndr_pull_netr_IdentityInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_IdentityInfo *r)
375 : {
376 37328 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
377 37328 : if (ndr_flags & NDR_SCALARS) {
378 18664 : NDR_CHECK(ndr_pull_align(ndr, 5));
379 18664 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
380 18664 : NDR_CHECK(ndr_pull_netr_LogonParameterControl(ndr, NDR_SCALARS, &r->parameter_control));
381 18664 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->logon_id));
382 18664 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
383 18664 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstation));
384 18664 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
385 : }
386 37328 : if (ndr_flags & NDR_BUFFERS) {
387 18664 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
388 18664 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
389 18664 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
390 : }
391 33648 : return NDR_ERR_SUCCESS;
392 : }
393 :
394 2 : _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r)
395 : {
396 2 : ndr_print_struct(ndr, name, "netr_IdentityInfo");
397 2 : if (r == NULL) { ndr_print_null(ndr); return; }
398 2 : ndr->depth++;
399 2 : ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
400 2 : ndr_print_netr_LogonParameterControl(ndr, "parameter_control", r->parameter_control);
401 2 : ndr_print_udlong(ndr, "logon_id", r->logon_id);
402 2 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
403 2 : ndr_print_lsa_String(ndr, "workstation", &r->workstation);
404 2 : ndr->depth--;
405 : }
406 :
407 513 : static enum ndr_err_code ndr_push_netr_PasswordInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_PasswordInfo *r)
408 : {
409 513 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
410 513 : if (ndr_flags & NDR_SCALARS) {
411 513 : NDR_CHECK(ndr_push_align(ndr, 5));
412 513 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
413 513 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
414 513 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
415 513 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
416 : }
417 513 : if (ndr_flags & NDR_BUFFERS) {
418 513 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
419 : }
420 513 : return NDR_ERR_SUCCESS;
421 : }
422 :
423 673 : static enum ndr_err_code ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_PasswordInfo *r)
424 : {
425 673 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
426 673 : if (ndr_flags & NDR_SCALARS) {
427 673 : NDR_CHECK(ndr_pull_align(ndr, 5));
428 673 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
429 673 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
430 673 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
431 673 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
432 : }
433 673 : if (ndr_flags & NDR_BUFFERS) {
434 673 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
435 : }
436 671 : return NDR_ERR_SUCCESS;
437 : }
438 :
439 2 : _PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r)
440 : {
441 2 : ndr_print_struct(ndr, name, "netr_PasswordInfo");
442 2 : if (r == NULL) { ndr_print_null(ndr); return; }
443 2 : ndr->depth++;
444 2 : ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
445 2 : ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
446 2 : ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
447 2 : ndr->depth--;
448 : }
449 :
450 76812 : static enum ndr_err_code ndr_push_netr_ChallengeResponse(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_ChallengeResponse *r)
451 : {
452 : {
453 76812 : libndr_flags _flags_save_STRUCT = ndr->flags;
454 76812 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
455 76812 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
456 76812 : if (ndr_flags & NDR_SCALARS) {
457 38406 : NDR_CHECK(ndr_push_align(ndr, 5));
458 38406 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
459 38406 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
460 38406 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
461 38406 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
462 : }
463 76812 : if (ndr_flags & NDR_BUFFERS) {
464 38406 : if (r->data) {
465 36215 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
466 36215 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
467 36215 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
468 36215 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
469 : }
470 : }
471 76812 : ndr->flags = _flags_save_STRUCT;
472 : }
473 76812 : return NDR_ERR_SUCCESS;
474 : }
475 :
476 70964 : static enum ndr_err_code ndr_pull_netr_ChallengeResponse(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_ChallengeResponse *r)
477 : {
478 7352 : uint32_t _ptr_data;
479 70964 : uint32_t size_data_1 = 0;
480 70964 : uint32_t length_data_1 = 0;
481 70964 : TALLOC_CTX *_mem_save_data_0 = NULL;
482 : {
483 70964 : libndr_flags _flags_save_STRUCT = ndr->flags;
484 70964 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
485 70964 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
486 70964 : if (ndr_flags & NDR_SCALARS) {
487 35482 : NDR_CHECK(ndr_pull_align(ndr, 5));
488 35482 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
489 35482 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
490 35482 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
491 35482 : if (_ptr_data) {
492 33291 : NDR_PULL_ALLOC(ndr, r->data);
493 : } else {
494 2191 : r->data = NULL;
495 : }
496 35482 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
497 : }
498 70964 : if (ndr_flags & NDR_BUFFERS) {
499 35482 : if (r->data) {
500 33291 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
501 33291 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
502 33291 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
503 33291 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
504 33291 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
505 33291 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->data, &length_data_1));
506 33291 : if (length_data_1 > size_data_1) {
507 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_1, length_data_1);
508 : }
509 33291 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
510 33291 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, length_data_1));
511 33291 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
512 : }
513 35482 : if (r->data) {
514 33291 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
515 : }
516 35482 : if (r->data) {
517 33291 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->data, r->length));
518 : }
519 : }
520 70964 : ndr->flags = _flags_save_STRUCT;
521 : }
522 70964 : return NDR_ERR_SUCCESS;
523 : }
524 :
525 0 : _PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r)
526 : {
527 0 : ndr_print_struct(ndr, name, "netr_ChallengeResponse");
528 0 : if (r == NULL) { ndr_print_null(ndr); return; }
529 : {
530 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
531 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
532 0 : ndr->depth++;
533 0 : ndr_print_uint16(ndr, "length", r->length);
534 0 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size);
535 0 : ndr_print_ptr(ndr, "data", r->data);
536 0 : ndr->depth++;
537 0 : if (r->data) {
538 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
539 : }
540 0 : ndr->depth--;
541 0 : ndr->depth--;
542 0 : ndr->flags = _flags_save_STRUCT;
543 : }
544 : }
545 :
546 19203 : static enum ndr_err_code ndr_push_netr_NetworkInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NetworkInfo *r)
547 : {
548 : {
549 19203 : libndr_flags _flags_save_STRUCT = ndr->flags;
550 19203 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
551 19203 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
552 19203 : if (ndr_flags & NDR_SCALARS) {
553 19203 : NDR_CHECK(ndr_push_align(ndr, 5));
554 19203 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
555 19203 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->challenge, 8));
556 19203 : NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
557 19203 : NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
558 19203 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
559 : }
560 19203 : if (ndr_flags & NDR_BUFFERS) {
561 19203 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
562 19203 : NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
563 19203 : NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
564 : }
565 19203 : ndr->flags = _flags_save_STRUCT;
566 : }
567 19203 : return NDR_ERR_SUCCESS;
568 : }
569 :
570 17741 : static enum ndr_err_code ndr_pull_netr_NetworkInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NetworkInfo *r)
571 : {
572 17741 : uint32_t size_challenge_0 = 0;
573 : {
574 17741 : libndr_flags _flags_save_STRUCT = ndr->flags;
575 17741 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
576 17741 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
577 17741 : if (ndr_flags & NDR_SCALARS) {
578 17741 : NDR_CHECK(ndr_pull_align(ndr, 5));
579 17741 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
580 17741 : size_challenge_0 = 8;
581 17741 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->challenge, size_challenge_0));
582 17741 : NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
583 17741 : NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
584 17741 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
585 : }
586 17741 : if (ndr_flags & NDR_BUFFERS) {
587 17741 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
588 17741 : NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
589 17741 : NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
590 : }
591 17741 : ndr->flags = _flags_save_STRUCT;
592 : }
593 17741 : return NDR_ERR_SUCCESS;
594 : }
595 :
596 0 : _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r)
597 : {
598 0 : ndr_print_struct(ndr, name, "netr_NetworkInfo");
599 0 : if (r == NULL) { ndr_print_null(ndr); return; }
600 : {
601 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
602 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
603 0 : ndr->depth++;
604 0 : ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
605 0 : ndr_print_array_uint8(ndr, "challenge", r->challenge, 8);
606 0 : ndr_print_netr_ChallengeResponse(ndr, "nt", &r->nt);
607 0 : ndr_print_netr_ChallengeResponse(ndr, "lm", &r->lm);
608 0 : ndr->depth--;
609 0 : ndr->flags = _flags_save_STRUCT;
610 : }
611 : }
612 :
613 250 : static enum ndr_err_code ndr_push_netr_GenericInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_GenericInfo *r)
614 : {
615 : {
616 250 : libndr_flags _flags_save_STRUCT = ndr->flags;
617 250 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
618 250 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
619 250 : if (ndr_flags & NDR_SCALARS) {
620 250 : NDR_CHECK(ndr_push_align(ndr, 5));
621 250 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
622 250 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->package_name));
623 250 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
624 250 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
625 250 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
626 : }
627 250 : if (ndr_flags & NDR_BUFFERS) {
628 250 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
629 250 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
630 250 : if (r->data) {
631 250 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
632 250 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
633 : }
634 : }
635 250 : ndr->flags = _flags_save_STRUCT;
636 : }
637 250 : return NDR_ERR_SUCCESS;
638 : }
639 :
640 250 : static enum ndr_err_code ndr_pull_netr_GenericInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_GenericInfo *r)
641 : {
642 0 : uint32_t _ptr_data;
643 250 : uint32_t size_data_1 = 0;
644 250 : TALLOC_CTX *_mem_save_data_0 = NULL;
645 : {
646 250 : libndr_flags _flags_save_STRUCT = ndr->flags;
647 250 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
648 250 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
649 250 : if (ndr_flags & NDR_SCALARS) {
650 250 : NDR_CHECK(ndr_pull_align(ndr, 5));
651 250 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
652 250 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->package_name));
653 250 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
654 250 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
655 250 : if (_ptr_data) {
656 250 : NDR_PULL_ALLOC(ndr, r->data);
657 : } else {
658 0 : r->data = NULL;
659 : }
660 250 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
661 : }
662 250 : if (ndr_flags & NDR_BUFFERS) {
663 250 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
664 250 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
665 250 : if (r->data) {
666 250 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
667 250 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
668 250 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
669 250 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
670 250 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
671 250 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
672 250 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
673 : }
674 250 : if (r->data) {
675 250 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
676 : }
677 : }
678 250 : ndr->flags = _flags_save_STRUCT;
679 : }
680 250 : return NDR_ERR_SUCCESS;
681 : }
682 :
683 0 : _PUBLIC_ void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo *r)
684 : {
685 0 : ndr_print_struct(ndr, name, "netr_GenericInfo");
686 0 : if (r == NULL) { ndr_print_null(ndr); return; }
687 : {
688 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
689 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
690 0 : ndr->depth++;
691 0 : ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
692 0 : ndr_print_lsa_String(ndr, "package_name", &r->package_name);
693 0 : ndr_print_uint32(ndr, "length", r->length);
694 0 : ndr_print_ptr(ndr, "data", r->data);
695 0 : ndr->depth++;
696 0 : if (r->data) {
697 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
698 : }
699 0 : ndr->depth--;
700 0 : ndr->depth--;
701 0 : ndr->flags = _flags_save_STRUCT;
702 : }
703 : }
704 :
705 47138 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfoClass(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_LogonInfoClass r)
706 : {
707 47138 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
708 41984 : return NDR_ERR_SUCCESS;
709 : }
710 :
711 22816 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfoClass(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_LogonInfoClass *r)
712 : {
713 2576 : uint16_t v;
714 22816 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
715 22816 : *r = v;
716 22816 : return NDR_ERR_SUCCESS;
717 : }
718 :
719 2 : _PUBLIC_ void ndr_print_netr_LogonInfoClass(struct ndr_print *ndr, const char *name, enum netr_LogonInfoClass r)
720 : {
721 2 : const char *val = NULL;
722 :
723 2 : switch (r) {
724 2 : case NetlogonInteractiveInformation: val = "NetlogonInteractiveInformation"; break;
725 0 : case NetlogonNetworkInformation: val = "NetlogonNetworkInformation"; break;
726 0 : case NetlogonServiceInformation: val = "NetlogonServiceInformation"; break;
727 0 : case NetlogonGenericInformation: val = "NetlogonGenericInformation"; break;
728 0 : case NetlogonInteractiveTransitiveInformation: val = "NetlogonInteractiveTransitiveInformation"; break;
729 0 : case NetlogonNetworkTransitiveInformation: val = "NetlogonNetworkTransitiveInformation"; break;
730 0 : case NetlogonServiceTransitiveInformation: val = "NetlogonServiceTransitiveInformation"; break;
731 : }
732 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
733 2 : }
734 :
735 24270 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_LogonLevel *r)
736 : {
737 2580 : uint32_t level;
738 24270 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
739 24270 : if (ndr_flags & NDR_SCALARS) {
740 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
741 24270 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
742 24270 : NDR_CHECK(ndr_push_union_align(ndr, 5));
743 24270 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, level));
744 : /* ms_union is always aligned to the largest union arm*/
745 24270 : NDR_CHECK(ndr_push_align(ndr, 5));
746 24270 : switch (level) {
747 494 : case NetlogonInteractiveInformation: {
748 494 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
749 494 : break; }
750 :
751 16124 : case NetlogonNetworkInformation: {
752 16124 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
753 14280 : break; }
754 :
755 0 : case NetlogonServiceInformation: {
756 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
757 0 : break; }
758 :
759 250 : case NetlogonGenericInformation: {
760 250 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
761 250 : break; }
762 :
763 19 : case NetlogonInteractiveTransitiveInformation: {
764 19 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
765 19 : break; }
766 :
767 3079 : case NetlogonNetworkTransitiveInformation: {
768 3079 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
769 3079 : break; }
770 :
771 0 : case NetlogonServiceTransitiveInformation: {
772 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
773 0 : break; }
774 :
775 3568 : default: {
776 3568 : break; }
777 :
778 : }
779 : }
780 24270 : if (ndr_flags & NDR_BUFFERS) {
781 24270 : if (!(ndr_flags & NDR_SCALARS)) {
782 : /* We didn't get it above, and the token is not needed after this. */
783 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
784 : }
785 24270 : switch (level) {
786 494 : case NetlogonInteractiveInformation:
787 494 : if (r->password) {
788 494 : NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
789 : }
790 494 : break;
791 :
792 16124 : case NetlogonNetworkInformation:
793 16124 : if (r->network) {
794 16124 : NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
795 : }
796 14280 : break;
797 :
798 0 : case NetlogonServiceInformation:
799 0 : if (r->password) {
800 0 : NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
801 : }
802 0 : break;
803 :
804 250 : case NetlogonGenericInformation:
805 250 : if (r->generic) {
806 250 : NDR_CHECK(ndr_push_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
807 : }
808 250 : break;
809 :
810 19 : case NetlogonInteractiveTransitiveInformation:
811 19 : if (r->password) {
812 19 : NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
813 : }
814 19 : break;
815 :
816 3079 : case NetlogonNetworkTransitiveInformation:
817 3079 : if (r->network) {
818 3079 : NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
819 : }
820 3079 : break;
821 :
822 0 : case NetlogonServiceTransitiveInformation:
823 0 : if (r->password) {
824 0 : NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
825 : }
826 0 : break;
827 :
828 3568 : default:
829 3568 : break;
830 :
831 : }
832 : }
833 21690 : return NDR_ERR_SUCCESS;
834 : }
835 :
836 22816 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_LogonLevel *r)
837 : {
838 2576 : uint32_t level;
839 2576 : uint16_t _level;
840 22816 : TALLOC_CTX *_mem_save_password_0 = NULL;
841 2576 : uint32_t _ptr_password;
842 22816 : TALLOC_CTX *_mem_save_network_0 = NULL;
843 2576 : uint32_t _ptr_network;
844 22816 : TALLOC_CTX *_mem_save_generic_0 = NULL;
845 2576 : uint32_t _ptr_generic;
846 22816 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
847 22816 : if (ndr_flags & NDR_SCALARS) {
848 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
849 22816 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
850 22816 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
851 22816 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
852 22816 : if (_level != level) {
853 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
854 : }
855 : /* ms_union is always aligned to the largest union arm*/
856 22816 : NDR_CHECK(ndr_pull_align(ndr, 5));
857 22816 : switch (level) {
858 579 : case NetlogonInteractiveInformation: {
859 579 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
860 579 : if (_ptr_password) {
861 579 : NDR_PULL_ALLOC(ndr, r->password);
862 : } else {
863 0 : r->password = NULL;
864 : }
865 577 : break; }
866 :
867 14427 : case NetlogonNetworkInformation: {
868 14427 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
869 14427 : if (_ptr_network) {
870 14427 : NDR_PULL_ALLOC(ndr, r->network);
871 : } else {
872 0 : r->network = NULL;
873 : }
874 12589 : break; }
875 :
876 0 : case NetlogonServiceInformation: {
877 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
878 0 : if (_ptr_password) {
879 0 : NDR_PULL_ALLOC(ndr, r->password);
880 : } else {
881 0 : r->password = NULL;
882 : }
883 0 : break; }
884 :
885 250 : case NetlogonGenericInformation: {
886 250 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
887 250 : if (_ptr_generic) {
888 250 : NDR_PULL_ALLOC(ndr, r->generic);
889 : } else {
890 0 : r->generic = NULL;
891 : }
892 250 : break; }
893 :
894 94 : case NetlogonInteractiveTransitiveInformation: {
895 94 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
896 94 : if (_ptr_password) {
897 94 : NDR_PULL_ALLOC(ndr, r->password);
898 : } else {
899 0 : r->password = NULL;
900 : }
901 94 : break; }
902 :
903 3314 : case NetlogonNetworkTransitiveInformation: {
904 3314 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
905 3314 : if (_ptr_network) {
906 3314 : NDR_PULL_ALLOC(ndr, r->network);
907 : } else {
908 0 : r->network = NULL;
909 : }
910 3314 : break; }
911 :
912 0 : case NetlogonServiceTransitiveInformation: {
913 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
914 0 : if (_ptr_password) {
915 0 : NDR_PULL_ALLOC(ndr, r->password);
916 : } else {
917 0 : r->password = NULL;
918 : }
919 0 : break; }
920 :
921 3416 : default: {
922 3416 : break; }
923 :
924 : }
925 : }
926 22816 : if (ndr_flags & NDR_BUFFERS) {
927 22816 : if (!(ndr_flags & NDR_SCALARS)) {
928 : /* We didn't get it above, and the token is not needed after this. */
929 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
930 : }
931 22816 : switch (level) {
932 579 : case NetlogonInteractiveInformation:
933 579 : if (r->password) {
934 579 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
935 579 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
936 579 : NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
937 579 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
938 : }
939 577 : break;
940 :
941 14427 : case NetlogonNetworkInformation:
942 14427 : if (r->network) {
943 14427 : _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
944 14427 : NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
945 14427 : NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
946 14427 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
947 : }
948 12589 : break;
949 :
950 0 : case NetlogonServiceInformation:
951 0 : if (r->password) {
952 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
953 0 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
954 0 : NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
955 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
956 : }
957 0 : break;
958 :
959 250 : case NetlogonGenericInformation:
960 250 : if (r->generic) {
961 250 : _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
962 250 : NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
963 250 : NDR_CHECK(ndr_pull_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
964 250 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
965 : }
966 250 : break;
967 :
968 94 : case NetlogonInteractiveTransitiveInformation:
969 94 : if (r->password) {
970 94 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
971 94 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
972 94 : NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
973 94 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
974 : }
975 94 : break;
976 :
977 3314 : case NetlogonNetworkTransitiveInformation:
978 3314 : if (r->network) {
979 3314 : _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
980 3314 : NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
981 3314 : NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
982 3314 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
983 : }
984 3314 : break;
985 :
986 0 : case NetlogonServiceTransitiveInformation:
987 0 : if (r->password) {
988 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
989 0 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
990 0 : NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
991 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
992 : }
993 0 : break;
994 :
995 3416 : default:
996 3416 : break;
997 :
998 : }
999 : }
1000 20240 : return NDR_ERR_SUCCESS;
1001 : }
1002 :
1003 2 : _PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r)
1004 : {
1005 2 : uint32_t level;
1006 2 : level = ndr_print_steal_switch_value(ndr, r);
1007 2 : ndr_print_union(ndr, name, level, "netr_LogonLevel");
1008 2 : switch (level) {
1009 2 : case NetlogonInteractiveInformation:
1010 2 : ndr_print_ptr(ndr, "password", r->password);
1011 2 : ndr->depth++;
1012 2 : if (r->password) {
1013 2 : ndr_print_netr_PasswordInfo(ndr, "password", r->password);
1014 : }
1015 2 : ndr->depth--;
1016 2 : break;
1017 :
1018 0 : case NetlogonNetworkInformation:
1019 0 : ndr_print_ptr(ndr, "network", r->network);
1020 0 : ndr->depth++;
1021 0 : if (r->network) {
1022 0 : ndr_print_netr_NetworkInfo(ndr, "network", r->network);
1023 : }
1024 0 : ndr->depth--;
1025 0 : break;
1026 :
1027 0 : case NetlogonServiceInformation:
1028 0 : ndr_print_ptr(ndr, "password", r->password);
1029 0 : ndr->depth++;
1030 0 : if (r->password) {
1031 0 : ndr_print_netr_PasswordInfo(ndr, "password", r->password);
1032 : }
1033 0 : ndr->depth--;
1034 0 : break;
1035 :
1036 0 : case NetlogonGenericInformation:
1037 0 : ndr_print_ptr(ndr, "generic", r->generic);
1038 0 : ndr->depth++;
1039 0 : if (r->generic) {
1040 0 : ndr_print_netr_GenericInfo(ndr, "generic", r->generic);
1041 : }
1042 0 : ndr->depth--;
1043 0 : break;
1044 :
1045 0 : case NetlogonInteractiveTransitiveInformation:
1046 0 : ndr_print_ptr(ndr, "password", r->password);
1047 0 : ndr->depth++;
1048 0 : if (r->password) {
1049 0 : ndr_print_netr_PasswordInfo(ndr, "password", r->password);
1050 : }
1051 0 : ndr->depth--;
1052 0 : break;
1053 :
1054 0 : case NetlogonNetworkTransitiveInformation:
1055 0 : ndr_print_ptr(ndr, "network", r->network);
1056 0 : ndr->depth++;
1057 0 : if (r->network) {
1058 0 : ndr_print_netr_NetworkInfo(ndr, "network", r->network);
1059 : }
1060 0 : ndr->depth--;
1061 0 : break;
1062 :
1063 0 : case NetlogonServiceTransitiveInformation:
1064 0 : ndr_print_ptr(ndr, "password", r->password);
1065 0 : ndr->depth++;
1066 0 : if (r->password) {
1067 0 : ndr_print_netr_PasswordInfo(ndr, "password", r->password);
1068 : }
1069 0 : ndr->depth--;
1070 0 : break;
1071 :
1072 0 : default:
1073 0 : break;
1074 :
1075 : }
1076 2 : }
1077 :
1078 103837 : _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_UserSessionKey *r)
1079 : {
1080 : {
1081 103837 : libndr_flags _flags_save_STRUCT = ndr->flags;
1082 103837 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1083 103837 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1084 103837 : if (ndr_flags & NDR_SCALARS) {
1085 103837 : NDR_CHECK(ndr_push_align(ndr, 1));
1086 103837 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 16));
1087 103837 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1088 : }
1089 103837 : if (ndr_flags & NDR_BUFFERS) {
1090 4784 : }
1091 103837 : ndr->flags = _flags_save_STRUCT;
1092 : }
1093 103837 : return NDR_ERR_SUCCESS;
1094 : }
1095 :
1096 208060 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_UserSessionKey *r)
1097 : {
1098 208060 : uint32_t size_key_0 = 0;
1099 : {
1100 208060 : libndr_flags _flags_save_STRUCT = ndr->flags;
1101 208060 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1102 208060 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1103 208060 : if (ndr_flags & NDR_SCALARS) {
1104 208060 : NDR_CHECK(ndr_pull_align(ndr, 1));
1105 208060 : size_key_0 = 16;
1106 208060 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, size_key_0));
1107 208060 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1108 : }
1109 208060 : if (ndr_flags & NDR_BUFFERS) {
1110 4166 : }
1111 208060 : ndr->flags = _flags_save_STRUCT;
1112 : }
1113 208060 : return NDR_ERR_SUCCESS;
1114 : }
1115 :
1116 0 : static void ndr_print_flags_netr_UserSessionKey(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_UserSessionKey *r)
1117 : {
1118 0 : ndr_print_netr_UserSessionKey(ndr, name, r);
1119 0 : }
1120 :
1121 3883 : _PUBLIC_ void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r)
1122 : {
1123 3883 : ndr_print_struct(ndr, name, "netr_UserSessionKey");
1124 3883 : if (r == NULL) { ndr_print_null(ndr); return; }
1125 : {
1126 3883 : libndr_flags _flags_save_STRUCT = ndr->flags;
1127 3883 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1128 3883 : ndr->depth++;
1129 3883 : ndr_print_array_uint8(ndr, "key", r->key, 16);
1130 3883 : ndr->depth--;
1131 3883 : ndr->flags = _flags_save_STRUCT;
1132 : }
1133 : }
1134 :
1135 103837 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LMSessionKey(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_LMSessionKey *r)
1136 : {
1137 : {
1138 103837 : libndr_flags _flags_save_STRUCT = ndr->flags;
1139 103837 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1140 103837 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1141 103837 : if (ndr_flags & NDR_SCALARS) {
1142 103837 : NDR_CHECK(ndr_push_align(ndr, 1));
1143 103837 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 8));
1144 103837 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1145 : }
1146 103837 : if (ndr_flags & NDR_BUFFERS) {
1147 4784 : }
1148 103837 : ndr->flags = _flags_save_STRUCT;
1149 : }
1150 103837 : return NDR_ERR_SUCCESS;
1151 : }
1152 :
1153 208060 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_LMSessionKey *r)
1154 : {
1155 208060 : uint32_t size_key_0 = 0;
1156 : {
1157 208060 : libndr_flags _flags_save_STRUCT = ndr->flags;
1158 208060 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1159 208060 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1160 208060 : if (ndr_flags & NDR_SCALARS) {
1161 208060 : NDR_CHECK(ndr_pull_align(ndr, 1));
1162 208060 : size_key_0 = 8;
1163 208060 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, size_key_0));
1164 208060 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1165 : }
1166 208060 : if (ndr_flags & NDR_BUFFERS) {
1167 4166 : }
1168 208060 : ndr->flags = _flags_save_STRUCT;
1169 : }
1170 208060 : return NDR_ERR_SUCCESS;
1171 : }
1172 :
1173 0 : static void ndr_print_flags_netr_LMSessionKey(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_LMSessionKey *r)
1174 : {
1175 0 : ndr_print_netr_LMSessionKey(ndr, name, r);
1176 0 : }
1177 :
1178 3883 : _PUBLIC_ void ndr_print_netr_LMSessionKey(struct ndr_print *ndr, const char *name, const struct netr_LMSessionKey *r)
1179 : {
1180 3883 : ndr_print_struct(ndr, name, "netr_LMSessionKey");
1181 3883 : if (r == NULL) { ndr_print_null(ndr); return; }
1182 : {
1183 3883 : libndr_flags _flags_save_STRUCT = ndr->flags;
1184 3883 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1185 3883 : ndr->depth++;
1186 3883 : ndr_print_array_uint8(ndr, "key", r->key, 8);
1187 3883 : ndr->depth--;
1188 3883 : ndr->flags = _flags_save_STRUCT;
1189 : }
1190 : }
1191 :
1192 103837 : _PUBLIC_ enum ndr_err_code ndr_push_netr_UserFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
1193 : {
1194 103837 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1195 99053 : return NDR_ERR_SUCCESS;
1196 : }
1197 :
1198 208060 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
1199 : {
1200 4166 : uint32_t v;
1201 208060 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1202 208060 : *r = v;
1203 208060 : return NDR_ERR_SUCCESS;
1204 : }
1205 :
1206 3883 : _PUBLIC_ void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name, uint32_t r)
1207 : {
1208 3883 : ndr_print_uint32(ndr, name, r);
1209 3883 : ndr->depth++;
1210 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_GUEST", NETLOGON_GUEST, r);
1211 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NOENCRYPTION", NETLOGON_NOENCRYPTION, r);
1212 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_CACHED_ACCOUNT", NETLOGON_CACHED_ACCOUNT, r);
1213 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_USED_LM_PASSWORD", NETLOGON_USED_LM_PASSWORD, r);
1214 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_EXTRA_SIDS", NETLOGON_EXTRA_SIDS, r);
1215 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SUBAUTH_SESSION_KEY", NETLOGON_SUBAUTH_SESSION_KEY, r);
1216 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SERVER_TRUST_ACCOUNT", NETLOGON_SERVER_TRUST_ACCOUNT, r);
1217 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NTLMV2_ENABLED", NETLOGON_NTLMV2_ENABLED, r);
1218 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_RESOURCE_GROUPS", NETLOGON_RESOURCE_GROUPS, r);
1219 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_PROFILE_PATH_RETURNED", NETLOGON_PROFILE_PATH_RETURNED, r);
1220 3883 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_GRACE_LOGON", NETLOGON_GRACE_LOGON, r);
1221 3883 : ndr->depth--;
1222 3883 : }
1223 :
1224 207674 : static enum ndr_err_code ndr_push_netr_SamBaseInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SamBaseInfo *r)
1225 : {
1226 207674 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1227 207674 : if (ndr_flags & NDR_SCALARS) {
1228 103837 : NDR_CHECK(ndr_push_align(ndr, 5));
1229 103837 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logon_time));
1230 103837 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logoff_time));
1231 103837 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->kickoff_time));
1232 103837 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
1233 103837 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
1234 103837 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
1235 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
1236 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
1237 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
1238 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
1239 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
1240 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
1241 103837 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
1242 103837 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
1243 103837 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
1244 103837 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
1245 103837 : NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
1246 103837 : NDR_CHECK(ndr_push_netr_UserFlags(ndr, NDR_SCALARS, r->user_flags));
1247 : {
1248 103837 : libndr_flags _flags_save_netr_UserSessionKey = ndr->flags;
1249 103837 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1250 103837 : NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
1251 103837 : ndr->flags = _flags_save_netr_UserSessionKey;
1252 : }
1253 103837 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
1254 103837 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_domain));
1255 103837 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
1256 : {
1257 103837 : libndr_flags _flags_save_netr_LMSessionKey = ndr->flags;
1258 103837 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1259 103837 : NDR_CHECK(ndr_push_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
1260 103837 : ndr->flags = _flags_save_netr_LMSessionKey;
1261 : }
1262 103837 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
1263 103837 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sub_auth_status));
1264 103837 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_successful_logon));
1265 103837 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_failed_logon));
1266 103837 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->failed_logon_count));
1267 103837 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
1268 103837 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1269 : }
1270 207674 : if (ndr_flags & NDR_BUFFERS) {
1271 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
1272 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
1273 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
1274 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
1275 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
1276 103837 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
1277 103837 : NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
1278 103837 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
1279 103837 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_domain));
1280 103837 : if (r->domain_sid) {
1281 103837 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
1282 : }
1283 : }
1284 198106 : return NDR_ERR_SUCCESS;
1285 : }
1286 :
1287 416120 : static enum ndr_err_code ndr_pull_netr_SamBaseInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SamBaseInfo *r)
1288 : {
1289 8332 : uint32_t _ptr_domain_sid;
1290 416120 : TALLOC_CTX *_mem_save_domain_sid_0 = NULL;
1291 416120 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1292 416120 : if (ndr_flags & NDR_SCALARS) {
1293 208060 : NDR_CHECK(ndr_pull_align(ndr, 5));
1294 208060 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logon_time));
1295 208060 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logoff_time));
1296 208060 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->kickoff_time));
1297 208060 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
1298 208060 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
1299 208060 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
1300 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
1301 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
1302 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
1303 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
1304 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
1305 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
1306 208060 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
1307 208060 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
1308 208060 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
1309 208060 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
1310 208060 : NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
1311 208060 : NDR_CHECK(ndr_pull_netr_UserFlags(ndr, NDR_SCALARS, &r->user_flags));
1312 : {
1313 208060 : libndr_flags _flags_save_netr_UserSessionKey = ndr->flags;
1314 208060 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1315 208060 : NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
1316 208060 : ndr->flags = _flags_save_netr_UserSessionKey;
1317 : }
1318 208060 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
1319 208060 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_domain));
1320 208060 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
1321 208060 : if (_ptr_domain_sid) {
1322 207824 : NDR_PULL_ALLOC(ndr, r->domain_sid);
1323 : } else {
1324 236 : r->domain_sid = NULL;
1325 : }
1326 : {
1327 208060 : libndr_flags _flags_save_netr_LMSessionKey = ndr->flags;
1328 208060 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1329 208060 : NDR_CHECK(ndr_pull_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
1330 208060 : ndr->flags = _flags_save_netr_LMSessionKey;
1331 : }
1332 208060 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
1333 208060 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_auth_status));
1334 208060 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_successful_logon));
1335 208060 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_failed_logon));
1336 208060 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->failed_logon_count));
1337 208060 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1338 208060 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1339 : }
1340 416120 : if (ndr_flags & NDR_BUFFERS) {
1341 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
1342 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
1343 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
1344 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
1345 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
1346 208060 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
1347 208060 : NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
1348 208060 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
1349 208060 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_domain));
1350 208060 : if (r->domain_sid) {
1351 207824 : _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1352 207824 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
1353 207824 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
1354 207824 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
1355 : }
1356 : }
1357 407788 : return NDR_ERR_SUCCESS;
1358 : }
1359 :
1360 3883 : _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name, const struct netr_SamBaseInfo *r)
1361 : {
1362 3883 : ndr_print_struct(ndr, name, "netr_SamBaseInfo");
1363 3883 : if (r == NULL) { ndr_print_null(ndr); return; }
1364 3883 : ndr->depth++;
1365 3883 : ndr_print_NTTIME(ndr, "logon_time", r->logon_time);
1366 3883 : ndr_print_NTTIME(ndr, "logoff_time", r->logoff_time);
1367 3883 : ndr_print_NTTIME(ndr, "kickoff_time", r->kickoff_time);
1368 3883 : ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
1369 3883 : ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
1370 3883 : ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
1371 3883 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
1372 3883 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
1373 3883 : ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
1374 3883 : ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
1375 3883 : ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
1376 3883 : ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
1377 3883 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
1378 3883 : ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
1379 3883 : ndr_print_uint32(ndr, "rid", r->rid);
1380 3883 : ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
1381 3883 : ndr_print_samr_RidWithAttributeArray(ndr, "groups", &r->groups);
1382 3883 : ndr_print_netr_UserFlags(ndr, "user_flags", r->user_flags);
1383 : {
1384 3883 : libndr_flags _flags_save_netr_UserSessionKey = ndr->flags;
1385 3883 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1386 3883 : ndr_print_netr_UserSessionKey(ndr, "key", &r->key);
1387 3883 : ndr->flags = _flags_save_netr_UserSessionKey;
1388 : }
1389 3883 : ndr_print_lsa_StringLarge(ndr, "logon_server", &r->logon_server);
1390 3883 : ndr_print_lsa_StringLarge(ndr, "logon_domain", &r->logon_domain);
1391 3883 : ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
1392 3883 : ndr->depth++;
1393 3883 : if (r->domain_sid) {
1394 3883 : ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
1395 : }
1396 3883 : ndr->depth--;
1397 : {
1398 3883 : libndr_flags _flags_save_netr_LMSessionKey = ndr->flags;
1399 3883 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1400 3883 : ndr_print_netr_LMSessionKey(ndr, "LMSessKey", &r->LMSessKey);
1401 3883 : ndr->flags = _flags_save_netr_LMSessionKey;
1402 : }
1403 3883 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
1404 3883 : ndr_print_uint32(ndr, "sub_auth_status", r->sub_auth_status);
1405 3883 : ndr_print_NTTIME(ndr, "last_successful_logon", r->last_successful_logon);
1406 3883 : ndr_print_NTTIME(ndr, "last_failed_logon", r->last_failed_logon);
1407 3883 : ndr_print_uint32(ndr, "failed_logon_count", r->failed_logon_count);
1408 3883 : ndr_print_uint32(ndr, "reserved", r->reserved);
1409 3883 : ndr->depth--;
1410 : }
1411 :
1412 6232 : static enum ndr_err_code ndr_push_netr_SamInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SamInfo2 *r)
1413 : {
1414 6232 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1415 6232 : if (ndr_flags & NDR_SCALARS) {
1416 6232 : NDR_CHECK(ndr_push_align(ndr, 5));
1417 6232 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1418 6232 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1419 : }
1420 6232 : if (ndr_flags & NDR_BUFFERS) {
1421 6232 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1422 : }
1423 5329 : return NDR_ERR_SUCCESS;
1424 : }
1425 :
1426 5478 : static enum ndr_err_code ndr_pull_netr_SamInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SamInfo2 *r)
1427 : {
1428 5478 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1429 5478 : if (ndr_flags & NDR_SCALARS) {
1430 5478 : NDR_CHECK(ndr_pull_align(ndr, 5));
1431 5478 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1432 5478 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1433 : }
1434 5478 : if (ndr_flags & NDR_BUFFERS) {
1435 5478 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1436 : }
1437 4726 : return NDR_ERR_SUCCESS;
1438 : }
1439 :
1440 1824 : _PUBLIC_ void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, const struct netr_SamInfo2 *r)
1441 : {
1442 1824 : ndr_print_struct(ndr, name, "netr_SamInfo2");
1443 1824 : if (r == NULL) { ndr_print_null(ndr); return; }
1444 1824 : ndr->depth++;
1445 1824 : ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
1446 1824 : ndr->depth--;
1447 : }
1448 :
1449 381464 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SidAttr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SidAttr *r)
1450 : {
1451 381464 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1452 381464 : if (ndr_flags & NDR_SCALARS) {
1453 190732 : NDR_CHECK(ndr_push_align(ndr, 5));
1454 190732 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1455 190732 : NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
1456 190732 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1457 : }
1458 381464 : if (ndr_flags & NDR_BUFFERS) {
1459 190732 : if (r->sid) {
1460 190732 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1461 : }
1462 : }
1463 367520 : return NDR_ERR_SUCCESS;
1464 : }
1465 :
1466 453574 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SidAttr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SidAttr *r)
1467 : {
1468 12626 : uint32_t _ptr_sid;
1469 453574 : TALLOC_CTX *_mem_save_sid_0 = NULL;
1470 453574 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1471 453574 : if (ndr_flags & NDR_SCALARS) {
1472 226787 : NDR_CHECK(ndr_pull_align(ndr, 5));
1473 226787 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1474 226787 : if (_ptr_sid) {
1475 226787 : NDR_PULL_ALLOC(ndr, r->sid);
1476 : } else {
1477 0 : r->sid = NULL;
1478 : }
1479 226787 : NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
1480 226787 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1481 : }
1482 453574 : if (ndr_flags & NDR_BUFFERS) {
1483 226787 : if (r->sid) {
1484 226787 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1485 226787 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1486 226787 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1487 226787 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1488 : }
1489 : }
1490 440948 : return NDR_ERR_SUCCESS;
1491 : }
1492 :
1493 0 : static void ndr_print_flags_netr_SidAttr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_SidAttr *r)
1494 : {
1495 0 : ndr_print_netr_SidAttr(ndr, name, r);
1496 0 : }
1497 :
1498 2052 : _PUBLIC_ void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, const struct netr_SidAttr *r)
1499 : {
1500 2052 : ndr_print_struct(ndr, name, "netr_SidAttr");
1501 2052 : if (r == NULL) { ndr_print_null(ndr); return; }
1502 2052 : ndr->depth++;
1503 2052 : ndr_print_ptr(ndr, "sid", r->sid);
1504 2052 : ndr->depth++;
1505 2052 : if (r->sid) {
1506 2052 : ndr_print_dom_sid2(ndr, "sid", r->sid);
1507 : }
1508 2052 : ndr->depth--;
1509 2052 : ndr_print_security_GroupAttrs(ndr, "attributes", r->attributes);
1510 2052 : ndr->depth--;
1511 : }
1512 :
1513 183614 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SamInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SamInfo3 *r)
1514 : {
1515 6643 : uint32_t cntr_sids_1;
1516 183614 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1517 183614 : if (ndr_flags & NDR_SCALARS) {
1518 94977 : NDR_CHECK(ndr_push_align(ndr, 5));
1519 94977 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1520 94977 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
1521 94977 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
1522 94977 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1523 : }
1524 183614 : if (ndr_flags & NDR_BUFFERS) {
1525 94977 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1526 94977 : if (r->sids) {
1527 93327 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->sidcount));
1528 281592 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1529 188265 : NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1530 : }
1531 281592 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1532 188265 : NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1533 : }
1534 : }
1535 : }
1536 176971 : return NDR_ERR_SUCCESS;
1537 : }
1538 :
1539 394098 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SamInfo3 *r)
1540 : {
1541 5896 : uint32_t _ptr_sids;
1542 394098 : uint32_t size_sids_1 = 0;
1543 5896 : uint32_t cntr_sids_1;
1544 394098 : TALLOC_CTX *_mem_save_sids_0 = NULL;
1545 394098 : TALLOC_CTX *_mem_save_sids_1 = NULL;
1546 394098 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1547 394098 : if (ndr_flags & NDR_SCALARS) {
1548 200134 : NDR_CHECK(ndr_pull_align(ndr, 5));
1549 200134 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1550 200134 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
1551 200134 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
1552 200134 : if (_ptr_sids) {
1553 110364 : NDR_PULL_ALLOC(ndr, r->sids);
1554 : } else {
1555 89770 : r->sids = NULL;
1556 : }
1557 200134 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1558 : }
1559 394098 : if (ndr_flags & NDR_BUFFERS) {
1560 200134 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1561 200134 : if (r->sids) {
1562 110364 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1563 110364 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1564 110364 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
1565 110364 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
1566 110364 : NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
1567 110364 : _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1568 110364 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1569 335298 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1570 224934 : NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1571 : }
1572 335298 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1573 224934 : NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1574 : }
1575 110364 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
1576 110364 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
1577 : }
1578 200134 : if (r->sids) {
1579 110364 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
1580 : }
1581 425068 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1582 6223 : }
1583 : }
1584 388202 : return NDR_ERR_SUCCESS;
1585 : }
1586 :
1587 0 : static void ndr_print_flags_netr_SamInfo3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_SamInfo3 *r)
1588 : {
1589 0 : ndr_print_netr_SamInfo3(ndr, name, r);
1590 0 : }
1591 :
1592 1843 : _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r)
1593 : {
1594 317 : uint32_t cntr_sids_1;
1595 1843 : ndr_print_struct(ndr, name, "netr_SamInfo3");
1596 1843 : if (r == NULL) { ndr_print_null(ndr); return; }
1597 1843 : ndr->depth++;
1598 1843 : ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
1599 1843 : ndr_print_uint32(ndr, "sidcount", r->sidcount);
1600 1843 : ndr_print_ptr(ndr, "sids", r->sids);
1601 1843 : ndr->depth++;
1602 1843 : if (r->sids) {
1603 1834 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sids", (uint32_t)(r->sidcount));
1604 1834 : ndr->depth++;
1605 3670 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1606 1836 : ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
1607 : }
1608 1834 : ndr->depth--;
1609 : }
1610 1843 : ndr->depth--;
1611 1843 : ndr->depth--;
1612 : }
1613 :
1614 2628 : static enum ndr_err_code ndr_push_netr_SamInfo6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SamInfo6 *r)
1615 : {
1616 108 : uint32_t cntr_sids_1;
1617 108 : uint32_t cntr_unknown4_0;
1618 2628 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1619 2628 : if (ndr_flags & NDR_SCALARS) {
1620 2628 : NDR_CHECK(ndr_push_align(ndr, 5));
1621 2628 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1622 2628 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
1623 2628 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
1624 2628 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
1625 2628 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
1626 55188 : for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (20); cntr_unknown4_0++) {
1627 52560 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4[cntr_unknown4_0]));
1628 : }
1629 2628 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1630 : }
1631 2628 : if (ndr_flags & NDR_BUFFERS) {
1632 2628 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1633 2628 : if (r->sids) {
1634 1769 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->sidcount));
1635 3556 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1636 1787 : NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1637 : }
1638 3556 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1639 1787 : NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1640 : }
1641 : }
1642 2628 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
1643 2628 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
1644 : }
1645 2520 : return NDR_ERR_SUCCESS;
1646 : }
1647 :
1648 2448 : static enum ndr_err_code ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SamInfo6 *r)
1649 : {
1650 90 : uint32_t _ptr_sids;
1651 2448 : uint32_t size_sids_1 = 0;
1652 90 : uint32_t cntr_sids_1;
1653 2448 : TALLOC_CTX *_mem_save_sids_0 = NULL;
1654 2448 : TALLOC_CTX *_mem_save_sids_1 = NULL;
1655 2448 : uint32_t size_unknown4_0 = 0;
1656 90 : uint32_t cntr_unknown4_0;
1657 2448 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1658 2448 : if (ndr_flags & NDR_SCALARS) {
1659 2448 : NDR_CHECK(ndr_pull_align(ndr, 5));
1660 2448 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1661 2448 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
1662 2448 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
1663 2448 : if (_ptr_sids) {
1664 1589 : NDR_PULL_ALLOC(ndr, r->sids);
1665 : } else {
1666 859 : r->sids = NULL;
1667 : }
1668 2448 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
1669 2448 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
1670 4248 : size_unknown4_0 = 20;
1671 51408 : for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (size_unknown4_0); cntr_unknown4_0++) {
1672 48960 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4[cntr_unknown4_0]));
1673 : }
1674 2448 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1675 : }
1676 2448 : if (ndr_flags & NDR_BUFFERS) {
1677 2448 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1678 2448 : if (r->sids) {
1679 1589 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1680 1589 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1681 1589 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
1682 1589 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
1683 1589 : NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
1684 1589 : _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1685 1589 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1686 3248 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1687 1659 : NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1688 : }
1689 3248 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1690 1659 : NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1691 : }
1692 1589 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
1693 1589 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
1694 : }
1695 2448 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
1696 2448 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
1697 2448 : if (r->sids) {
1698 1589 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
1699 : }
1700 4107 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1701 90 : }
1702 : }
1703 2358 : return NDR_ERR_SUCCESS;
1704 : }
1705 :
1706 216 : _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r)
1707 : {
1708 36 : uint32_t cntr_sids_1;
1709 36 : uint32_t cntr_unknown4_0;
1710 216 : ndr_print_struct(ndr, name, "netr_SamInfo6");
1711 216 : if (r == NULL) { ndr_print_null(ndr); return; }
1712 216 : ndr->depth++;
1713 216 : ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
1714 216 : ndr_print_uint32(ndr, "sidcount", r->sidcount);
1715 216 : ndr_print_ptr(ndr, "sids", r->sids);
1716 216 : ndr->depth++;
1717 216 : if (r->sids) {
1718 216 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sids", (uint32_t)(r->sidcount));
1719 216 : ndr->depth++;
1720 432 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1721 216 : ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
1722 : }
1723 216 : ndr->depth--;
1724 : }
1725 216 : ndr->depth--;
1726 216 : ndr_print_lsa_String(ndr, "dns_domainname", &r->dns_domainname);
1727 216 : ndr_print_lsa_String(ndr, "principal_name", &r->principal_name);
1728 216 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "unknown4", (uint32_t)(20));
1729 216 : ndr->depth++;
1730 4536 : for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (20); cntr_unknown4_0++) {
1731 4320 : ndr_print_uint32(ndr, "unknown4", r->unknown4[cntr_unknown4_0]);
1732 : }
1733 216 : ndr->depth--;
1734 216 : ndr->depth--;
1735 : }
1736 :
1737 0 : static enum ndr_err_code ndr_push_netr_PacInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_PacInfo *r)
1738 : {
1739 0 : uint32_t cntr_expansionroom_0;
1740 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1741 0 : if (ndr_flags & NDR_SCALARS) {
1742 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1743 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pac_size));
1744 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
1745 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
1746 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
1747 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
1748 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_size));
1749 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->auth));
1750 0 : NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
1751 0 : for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (10); cntr_expansionroom_0++) {
1752 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->expansionroom[cntr_expansionroom_0]));
1753 : }
1754 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
1755 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
1756 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
1757 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
1758 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1759 : }
1760 0 : if (ndr_flags & NDR_BUFFERS) {
1761 0 : if (r->pac) {
1762 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->pac_size));
1763 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pac, r->pac_size));
1764 : }
1765 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
1766 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
1767 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
1768 0 : if (r->auth) {
1769 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->auth_size));
1770 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->auth, r->auth_size));
1771 : }
1772 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
1773 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
1774 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
1775 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
1776 : }
1777 0 : return NDR_ERR_SUCCESS;
1778 : }
1779 :
1780 0 : static enum ndr_err_code ndr_pull_netr_PacInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_PacInfo *r)
1781 : {
1782 0 : uint32_t _ptr_pac;
1783 0 : uint32_t size_pac_1 = 0;
1784 0 : TALLOC_CTX *_mem_save_pac_0 = NULL;
1785 0 : uint32_t _ptr_auth;
1786 0 : uint32_t size_auth_1 = 0;
1787 0 : TALLOC_CTX *_mem_save_auth_0 = NULL;
1788 0 : uint32_t size_expansionroom_0 = 0;
1789 0 : uint32_t cntr_expansionroom_0;
1790 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1791 0 : if (ndr_flags & NDR_SCALARS) {
1792 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1793 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pac_size));
1794 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
1795 0 : if (_ptr_pac) {
1796 0 : NDR_PULL_ALLOC(ndr, r->pac);
1797 : } else {
1798 0 : r->pac = NULL;
1799 : }
1800 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
1801 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
1802 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
1803 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_size));
1804 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_auth));
1805 0 : if (_ptr_auth) {
1806 0 : NDR_PULL_ALLOC(ndr, r->auth);
1807 : } else {
1808 0 : r->auth = NULL;
1809 : }
1810 0 : NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
1811 0 : size_expansionroom_0 = 10;
1812 0 : for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (size_expansionroom_0); cntr_expansionroom_0++) {
1813 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->expansionroom[cntr_expansionroom_0]));
1814 : }
1815 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
1816 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
1817 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
1818 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
1819 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1820 : }
1821 0 : if (ndr_flags & NDR_BUFFERS) {
1822 0 : if (r->pac) {
1823 0 : _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr);
1824 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0);
1825 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pac));
1826 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pac, &size_pac_1));
1827 0 : NDR_PULL_ALLOC_N(ndr, r->pac, size_pac_1);
1828 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pac, size_pac_1));
1829 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
1830 : }
1831 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
1832 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
1833 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
1834 0 : if (r->auth) {
1835 0 : _mem_save_auth_0 = NDR_PULL_GET_MEM_CTX(ndr);
1836 0 : NDR_PULL_SET_MEM_CTX(ndr, r->auth, 0);
1837 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->auth));
1838 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->auth, &size_auth_1));
1839 0 : NDR_PULL_ALLOC_N(ndr, r->auth, size_auth_1);
1840 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->auth, size_auth_1));
1841 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_0, 0);
1842 : }
1843 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
1844 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
1845 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
1846 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
1847 0 : if (r->pac) {
1848 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->pac, r->pac_size));
1849 : }
1850 0 : if (r->auth) {
1851 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->auth, r->auth_size));
1852 : }
1853 : }
1854 0 : return NDR_ERR_SUCCESS;
1855 : }
1856 :
1857 0 : _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r)
1858 : {
1859 0 : uint32_t cntr_expansionroom_0;
1860 0 : ndr_print_struct(ndr, name, "netr_PacInfo");
1861 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1862 0 : ndr->depth++;
1863 0 : ndr_print_uint32(ndr, "pac_size", r->pac_size);
1864 0 : ndr_print_ptr(ndr, "pac", r->pac);
1865 0 : ndr->depth++;
1866 0 : if (r->pac) {
1867 0 : ndr_print_array_uint8(ndr, "pac", r->pac, r->pac_size);
1868 : }
1869 0 : ndr->depth--;
1870 0 : ndr_print_lsa_String(ndr, "logon_domain", &r->logon_domain);
1871 0 : ndr_print_lsa_String(ndr, "logon_server", &r->logon_server);
1872 0 : ndr_print_lsa_String(ndr, "principal_name", &r->principal_name);
1873 0 : ndr_print_uint32(ndr, "auth_size", r->auth_size);
1874 0 : ndr_print_ptr(ndr, "auth", r->auth);
1875 0 : ndr->depth++;
1876 0 : if (r->auth) {
1877 0 : ndr_print_array_uint8(ndr, "auth", r->auth, r->auth_size);
1878 : }
1879 0 : ndr->depth--;
1880 0 : ndr_print_netr_UserSessionKey(ndr, "user_session_key", &r->user_session_key);
1881 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "expansionroom", (uint32_t)(10));
1882 0 : ndr->depth++;
1883 0 : for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (10); cntr_expansionroom_0++) {
1884 0 : ndr_print_uint32(ndr, "expansionroom", r->expansionroom[cntr_expansionroom_0]);
1885 : }
1886 0 : ndr->depth--;
1887 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
1888 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
1889 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
1890 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
1891 0 : ndr->depth--;
1892 : }
1893 :
1894 250 : static enum ndr_err_code ndr_push_netr_GenericInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_GenericInfo2 *r)
1895 : {
1896 : {
1897 250 : libndr_flags _flags_save_STRUCT = ndr->flags;
1898 250 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1899 250 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1900 250 : if (ndr_flags & NDR_SCALARS) {
1901 250 : NDR_CHECK(ndr_push_align(ndr, 5));
1902 250 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
1903 250 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
1904 250 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1905 : }
1906 250 : if (ndr_flags & NDR_BUFFERS) {
1907 250 : if (r->data) {
1908 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
1909 50 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
1910 : }
1911 : }
1912 250 : ndr->flags = _flags_save_STRUCT;
1913 : }
1914 250 : return NDR_ERR_SUCCESS;
1915 : }
1916 :
1917 250 : static enum ndr_err_code ndr_pull_netr_GenericInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_GenericInfo2 *r)
1918 : {
1919 0 : uint32_t _ptr_data;
1920 250 : uint32_t size_data_1 = 0;
1921 250 : TALLOC_CTX *_mem_save_data_0 = NULL;
1922 : {
1923 250 : libndr_flags _flags_save_STRUCT = ndr->flags;
1924 250 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1925 250 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1926 250 : if (ndr_flags & NDR_SCALARS) {
1927 250 : NDR_CHECK(ndr_pull_align(ndr, 5));
1928 250 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
1929 250 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
1930 250 : if (_ptr_data) {
1931 50 : NDR_PULL_ALLOC(ndr, r->data);
1932 : } else {
1933 200 : r->data = NULL;
1934 : }
1935 250 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1936 : }
1937 250 : if (ndr_flags & NDR_BUFFERS) {
1938 250 : if (r->data) {
1939 50 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1940 50 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
1941 50 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
1942 50 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
1943 50 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
1944 50 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
1945 50 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
1946 : }
1947 250 : if (r->data) {
1948 50 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
1949 : }
1950 : }
1951 250 : ndr->flags = _flags_save_STRUCT;
1952 : }
1953 250 : return NDR_ERR_SUCCESS;
1954 : }
1955 :
1956 0 : _PUBLIC_ void ndr_print_netr_GenericInfo2(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo2 *r)
1957 : {
1958 0 : ndr_print_struct(ndr, name, "netr_GenericInfo2");
1959 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1960 : {
1961 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
1962 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1963 0 : ndr->depth++;
1964 0 : ndr_print_uint32(ndr, "length", r->length);
1965 0 : ndr_print_ptr(ndr, "data", r->data);
1966 0 : ndr->depth++;
1967 0 : if (r->data) {
1968 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
1969 : }
1970 0 : ndr->depth--;
1971 0 : ndr->depth--;
1972 0 : ndr->flags = _flags_save_STRUCT;
1973 : }
1974 : }
1975 :
1976 25938 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_Validation *r)
1977 : {
1978 3091 : uint32_t level;
1979 25938 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1980 25938 : if (ndr_flags & NDR_SCALARS) {
1981 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1982 25938 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1983 25938 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1984 25938 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
1985 : /* ms_union is always aligned to the largest union arm*/
1986 25938 : NDR_CHECK(ndr_push_align(ndr, 5));
1987 25938 : switch (level) {
1988 10148 : case NetlogonValidationSamInfo: {
1989 10148 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam2));
1990 8731 : break; }
1991 :
1992 9952 : case NetlogonValidationSamInfo2: {
1993 9952 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam3));
1994 8607 : break; }
1995 :
1996 0 : case 4: {
1997 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
1998 0 : break; }
1999 :
2000 250 : case NetlogonValidationGenericInfo2: {
2001 250 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
2002 250 : break; }
2003 :
2004 4326 : case NetlogonValidationSamInfo4: {
2005 4326 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam6));
2006 4218 : break; }
2007 :
2008 1041 : default: {
2009 1041 : break; }
2010 :
2011 : }
2012 : }
2013 25938 : if (ndr_flags & NDR_BUFFERS) {
2014 25938 : if (!(ndr_flags & NDR_SCALARS)) {
2015 : /* We didn't get it above, and the token is not needed after this. */
2016 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2017 : }
2018 25938 : switch (level) {
2019 10148 : case NetlogonValidationSamInfo:
2020 10148 : if (r->sam2) {
2021 6232 : NDR_CHECK(ndr_push_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
2022 : }
2023 8731 : break;
2024 :
2025 9952 : case NetlogonValidationSamInfo2:
2026 9952 : if (r->sam3) {
2027 6340 : NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
2028 : }
2029 8607 : break;
2030 :
2031 0 : case 4:
2032 0 : if (r->pac) {
2033 0 : NDR_CHECK(ndr_push_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
2034 : }
2035 0 : break;
2036 :
2037 250 : case NetlogonValidationGenericInfo2:
2038 250 : if (r->generic) {
2039 250 : NDR_CHECK(ndr_push_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
2040 : }
2041 250 : break;
2042 :
2043 4326 : case NetlogonValidationSamInfo4:
2044 4326 : if (r->sam6) {
2045 2628 : NDR_CHECK(ndr_push_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
2046 : }
2047 4218 : break;
2048 :
2049 1041 : default:
2050 1041 : break;
2051 :
2052 : }
2053 : }
2054 22847 : return NDR_ERR_SUCCESS;
2055 : }
2056 :
2057 25035 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_Validation *r)
2058 : {
2059 2580 : uint32_t level;
2060 2580 : uint16_t _level;
2061 25035 : TALLOC_CTX *_mem_save_sam2_0 = NULL;
2062 2580 : uint32_t _ptr_sam2;
2063 25035 : TALLOC_CTX *_mem_save_sam3_0 = NULL;
2064 2580 : uint32_t _ptr_sam3;
2065 25035 : TALLOC_CTX *_mem_save_pac_0 = NULL;
2066 2580 : uint32_t _ptr_pac;
2067 25035 : TALLOC_CTX *_mem_save_generic_0 = NULL;
2068 2580 : uint32_t _ptr_generic;
2069 25035 : TALLOC_CTX *_mem_save_sam6_0 = NULL;
2070 2580 : uint32_t _ptr_sam6;
2071 25035 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2072 25035 : if (ndr_flags & NDR_SCALARS) {
2073 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2074 25035 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2075 25035 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2076 25035 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
2077 25035 : if (_level != level) {
2078 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
2079 : }
2080 : /* ms_union is always aligned to the largest union arm*/
2081 25035 : NDR_CHECK(ndr_pull_align(ndr, 5));
2082 25035 : switch (level) {
2083 8962 : case NetlogonValidationSamInfo: {
2084 8962 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam2));
2085 8962 : if (_ptr_sam2) {
2086 5478 : NDR_PULL_ALLOC(ndr, r->sam2);
2087 : } else {
2088 3484 : r->sam2 = NULL;
2089 : }
2090 7782 : break; }
2091 :
2092 9410 : case NetlogonValidationSamInfo2: {
2093 9410 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam3));
2094 9410 : if (_ptr_sam3) {
2095 6170 : NDR_PULL_ALLOC(ndr, r->sam3);
2096 : } else {
2097 3240 : r->sam3 = NULL;
2098 : }
2099 8290 : break; }
2100 :
2101 0 : case 4: {
2102 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
2103 0 : if (_ptr_pac) {
2104 0 : NDR_PULL_ALLOC(ndr, r->pac);
2105 : } else {
2106 0 : r->pac = NULL;
2107 : }
2108 0 : break; }
2109 :
2110 250 : case NetlogonValidationGenericInfo2: {
2111 250 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
2112 250 : if (_ptr_generic) {
2113 250 : NDR_PULL_ALLOC(ndr, r->generic);
2114 : } else {
2115 0 : r->generic = NULL;
2116 : }
2117 250 : break; }
2118 :
2119 5337 : case NetlogonValidationSamInfo4: {
2120 5337 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam6));
2121 5337 : if (_ptr_sam6) {
2122 2448 : NDR_PULL_ALLOC(ndr, r->sam6);
2123 : } else {
2124 2889 : r->sam6 = NULL;
2125 : }
2126 5241 : break; }
2127 :
2128 892 : default: {
2129 892 : break; }
2130 :
2131 : }
2132 : }
2133 25035 : if (ndr_flags & NDR_BUFFERS) {
2134 25035 : if (!(ndr_flags & NDR_SCALARS)) {
2135 : /* We didn't get it above, and the token is not needed after this. */
2136 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2137 : }
2138 25035 : switch (level) {
2139 8962 : case NetlogonValidationSamInfo:
2140 8962 : if (r->sam2) {
2141 5478 : _mem_save_sam2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2142 5478 : NDR_PULL_SET_MEM_CTX(ndr, r->sam2, 0);
2143 5478 : NDR_CHECK(ndr_pull_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
2144 5478 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam2_0, 0);
2145 : }
2146 7782 : break;
2147 :
2148 9410 : case NetlogonValidationSamInfo2:
2149 9410 : if (r->sam3) {
2150 6170 : _mem_save_sam3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2151 6170 : NDR_PULL_SET_MEM_CTX(ndr, r->sam3, 0);
2152 6170 : NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
2153 6170 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam3_0, 0);
2154 : }
2155 8290 : break;
2156 :
2157 0 : case 4:
2158 0 : if (r->pac) {
2159 0 : _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr);
2160 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0);
2161 0 : NDR_CHECK(ndr_pull_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
2162 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
2163 : }
2164 0 : break;
2165 :
2166 250 : case NetlogonValidationGenericInfo2:
2167 250 : if (r->generic) {
2168 250 : _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
2169 250 : NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
2170 250 : NDR_CHECK(ndr_pull_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
2171 250 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
2172 : }
2173 250 : break;
2174 :
2175 5337 : case NetlogonValidationSamInfo4:
2176 5337 : if (r->sam6) {
2177 2448 : _mem_save_sam6_0 = NDR_PULL_GET_MEM_CTX(ndr);
2178 2448 : NDR_PULL_SET_MEM_CTX(ndr, r->sam6, 0);
2179 2448 : NDR_CHECK(ndr_pull_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
2180 2448 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam6_0, 0);
2181 : }
2182 5241 : break;
2183 :
2184 892 : default:
2185 892 : break;
2186 :
2187 : }
2188 : }
2189 22455 : return NDR_ERR_SUCCESS;
2190 : }
2191 :
2192 6248 : _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r)
2193 : {
2194 1034 : uint32_t level;
2195 6248 : level = ndr_print_steal_switch_value(ndr, r);
2196 6248 : ndr_print_union(ndr, name, level, "netr_Validation");
2197 6248 : switch (level) {
2198 2864 : case NetlogonValidationSamInfo:
2199 2864 : ndr_print_ptr(ndr, "sam2", r->sam2);
2200 2864 : ndr->depth++;
2201 2864 : if (r->sam2) {
2202 1824 : ndr_print_netr_SamInfo2(ndr, "sam2", r->sam2);
2203 : }
2204 2864 : ndr->depth--;
2205 2864 : break;
2206 :
2207 2720 : case NetlogonValidationSamInfo2:
2208 2720 : ndr_print_ptr(ndr, "sam3", r->sam3);
2209 2720 : ndr->depth++;
2210 2720 : if (r->sam3) {
2211 1824 : ndr_print_netr_SamInfo3(ndr, "sam3", r->sam3);
2212 : }
2213 2720 : ndr->depth--;
2214 2720 : break;
2215 :
2216 0 : case 4:
2217 0 : ndr_print_ptr(ndr, "pac", r->pac);
2218 0 : ndr->depth++;
2219 0 : if (r->pac) {
2220 0 : ndr_print_netr_PacInfo(ndr, "pac", r->pac);
2221 : }
2222 0 : ndr->depth--;
2223 0 : break;
2224 :
2225 0 : case NetlogonValidationGenericInfo2:
2226 0 : ndr_print_ptr(ndr, "generic", r->generic);
2227 0 : ndr->depth++;
2228 0 : if (r->generic) {
2229 0 : ndr_print_netr_GenericInfo2(ndr, "generic", r->generic);
2230 : }
2231 0 : ndr->depth--;
2232 0 : break;
2233 :
2234 216 : case NetlogonValidationSamInfo4:
2235 216 : ndr_print_ptr(ndr, "sam6", r->sam6);
2236 216 : ndr->depth++;
2237 216 : if (r->sam6) {
2238 216 : ndr_print_netr_SamInfo6(ndr, "sam6", r->sam6);
2239 : }
2240 216 : ndr->depth--;
2241 216 : break;
2242 :
2243 374 : default:
2244 374 : break;
2245 :
2246 : }
2247 6248 : }
2248 :
2249 147525 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Credential(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_Credential *r)
2250 : {
2251 : {
2252 147525 : libndr_flags _flags_save_STRUCT = ndr->flags;
2253 147525 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2254 147525 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2255 147525 : if (ndr_flags & NDR_SCALARS) {
2256 147525 : NDR_CHECK(ndr_push_align(ndr, 1));
2257 147525 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 8));
2258 147525 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2259 : }
2260 147525 : if (ndr_flags & NDR_BUFFERS) {
2261 13285 : }
2262 147525 : ndr->flags = _flags_save_STRUCT;
2263 : }
2264 147525 : return NDR_ERR_SUCCESS;
2265 : }
2266 :
2267 144192 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Credential(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_Credential *r)
2268 : {
2269 144192 : uint32_t size_data_0 = 0;
2270 : {
2271 144192 : libndr_flags _flags_save_STRUCT = ndr->flags;
2272 144192 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2273 144192 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2274 144192 : if (ndr_flags & NDR_SCALARS) {
2275 144192 : NDR_CHECK(ndr_pull_align(ndr, 1));
2276 144192 : size_data_0 = 8;
2277 144192 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
2278 144192 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2279 : }
2280 144192 : if (ndr_flags & NDR_BUFFERS) {
2281 13579 : }
2282 144192 : ndr->flags = _flags_save_STRUCT;
2283 : }
2284 144192 : return NDR_ERR_SUCCESS;
2285 : }
2286 :
2287 0 : static void ndr_print_flags_netr_Credential(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_Credential *r)
2288 : {
2289 0 : ndr_print_netr_Credential(ndr, name, r);
2290 0 : }
2291 :
2292 11412 : _PUBLIC_ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const struct netr_Credential *r)
2293 : {
2294 11412 : ndr_print_struct(ndr, name, "netr_Credential");
2295 11412 : if (r == NULL) { ndr_print_null(ndr); return; }
2296 : {
2297 11412 : libndr_flags _flags_save_STRUCT = ndr->flags;
2298 11412 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2299 11412 : ndr->depth++;
2300 11412 : ndr_print_array_uint8(ndr, "data", r->data, 8);
2301 11412 : ndr->depth--;
2302 11412 : ndr->flags = _flags_save_STRUCT;
2303 : }
2304 : }
2305 :
2306 0 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_server_pipe_state(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netlogon_server_pipe_state *r)
2307 : {
2308 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2309 0 : if (ndr_flags & NDR_SCALARS) {
2310 0 : NDR_CHECK(ndr_push_align(ndr, 1));
2311 0 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
2312 0 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
2313 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2314 : }
2315 0 : if (ndr_flags & NDR_BUFFERS) {
2316 0 : }
2317 0 : return NDR_ERR_SUCCESS;
2318 : }
2319 :
2320 0 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_server_pipe_state(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netlogon_server_pipe_state *r)
2321 : {
2322 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2323 0 : if (ndr_flags & NDR_SCALARS) {
2324 0 : NDR_CHECK(ndr_pull_align(ndr, 1));
2325 0 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
2326 0 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
2327 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2328 : }
2329 0 : if (ndr_flags & NDR_BUFFERS) {
2330 0 : }
2331 0 : return NDR_ERR_SUCCESS;
2332 : }
2333 :
2334 0 : static void ndr_print_flags_netlogon_server_pipe_state(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netlogon_server_pipe_state *r)
2335 : {
2336 0 : ndr_print_netlogon_server_pipe_state(ndr, name, r);
2337 0 : }
2338 :
2339 0 : _PUBLIC_ void ndr_print_netlogon_server_pipe_state(struct ndr_print *ndr, const char *name, const struct netlogon_server_pipe_state *r)
2340 : {
2341 0 : ndr_print_struct(ndr, name, "netlogon_server_pipe_state");
2342 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2343 0 : ndr->depth++;
2344 0 : ndr_print_netr_Credential(ndr, "client_challenge", &r->client_challenge);
2345 0 : ndr_print_netr_Credential(ndr, "server_challenge", &r->server_challenge);
2346 0 : ndr->depth--;
2347 : }
2348 :
2349 52480 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_Authenticator *r)
2350 : {
2351 52480 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2352 52480 : if (ndr_flags & NDR_SCALARS) {
2353 52480 : NDR_CHECK(ndr_push_align(ndr, 4));
2354 52480 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->cred));
2355 52480 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
2356 52480 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2357 : }
2358 52480 : if (ndr_flags & NDR_BUFFERS) {
2359 6444 : }
2360 52480 : return NDR_ERR_SUCCESS;
2361 : }
2362 :
2363 50343 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_Authenticator *r)
2364 : {
2365 50343 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2366 50343 : if (ndr_flags & NDR_SCALARS) {
2367 50343 : NDR_CHECK(ndr_pull_align(ndr, 4));
2368 50343 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->cred));
2369 50343 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
2370 50343 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2371 : }
2372 50343 : if (ndr_flags & NDR_BUFFERS) {
2373 6198 : }
2374 50343 : return NDR_ERR_SUCCESS;
2375 : }
2376 :
2377 0 : static void ndr_print_flags_netr_Authenticator(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_Authenticator *r)
2378 : {
2379 0 : ndr_print_netr_Authenticator(ndr, name, r);
2380 0 : }
2381 :
2382 3438 : _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r)
2383 : {
2384 3438 : ndr_print_struct(ndr, name, "netr_Authenticator");
2385 3438 : if (r == NULL) { ndr_print_null(ndr); return; }
2386 3438 : ndr->depth++;
2387 3438 : ndr_print_netr_Credential(ndr, "cred", &r->cred);
2388 3438 : ndr_print_time_t(ndr, "timestamp", r->timestamp);
2389 3438 : ndr->depth--;
2390 : }
2391 :
2392 0 : static enum ndr_err_code ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_DELETE_USER *r)
2393 : {
2394 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2395 0 : if (ndr_flags & NDR_SCALARS) {
2396 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2397 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
2398 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
2399 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
2400 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2401 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
2402 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
2403 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
2404 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
2405 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
2406 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2407 : }
2408 0 : if (ndr_flags & NDR_BUFFERS) {
2409 0 : if (r->account_name) {
2410 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
2411 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2412 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
2413 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2414 : }
2415 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
2416 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
2417 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2418 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
2419 : }
2420 0 : return NDR_ERR_SUCCESS;
2421 : }
2422 :
2423 0 : static enum ndr_err_code ndr_pull_netr_DELTA_DELETE_USER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_DELETE_USER *r)
2424 : {
2425 0 : uint32_t _ptr_account_name;
2426 0 : uint32_t size_account_name_1 = 0;
2427 0 : uint32_t length_account_name_1 = 0;
2428 0 : TALLOC_CTX *_mem_save_account_name_0 = NULL;
2429 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2430 0 : if (ndr_flags & NDR_SCALARS) {
2431 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2432 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
2433 0 : if (_ptr_account_name) {
2434 0 : NDR_PULL_ALLOC(ndr, r->account_name);
2435 : } else {
2436 0 : r->account_name = NULL;
2437 : }
2438 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
2439 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
2440 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2441 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
2442 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
2443 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
2444 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
2445 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
2446 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2447 : }
2448 0 : if (ndr_flags & NDR_BUFFERS) {
2449 0 : if (r->account_name) {
2450 0 : _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2451 0 : NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
2452 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
2453 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
2454 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_1));
2455 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_1));
2456 0 : if (length_account_name_1 > size_account_name_1) {
2457 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
2458 : }
2459 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
2460 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
2461 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
2462 : }
2463 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
2464 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
2465 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2466 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
2467 : }
2468 0 : return NDR_ERR_SUCCESS;
2469 : }
2470 :
2471 0 : _PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r)
2472 : {
2473 0 : ndr_print_struct(ndr, name, "netr_DELTA_DELETE_USER");
2474 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2475 0 : ndr->depth++;
2476 0 : ndr_print_ptr(ndr, "account_name", r->account_name);
2477 0 : ndr->depth++;
2478 0 : if (r->account_name) {
2479 0 : ndr_print_string(ndr, "account_name", r->account_name);
2480 : }
2481 0 : ndr->depth--;
2482 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
2483 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
2484 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
2485 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
2486 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
2487 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
2488 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
2489 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
2490 0 : ndr->depth--;
2491 : }
2492 :
2493 0 : static enum ndr_err_code ndr_push_netr_USER_KEY16(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_KEY16 *r)
2494 : {
2495 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2496 0 : if (ndr_flags & NDR_SCALARS) {
2497 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2498 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
2499 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
2500 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
2501 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->pwd));
2502 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2503 : }
2504 0 : if (ndr_flags & NDR_BUFFERS) {
2505 0 : }
2506 0 : return NDR_ERR_SUCCESS;
2507 : }
2508 :
2509 0 : static enum ndr_err_code ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_KEY16 *r)
2510 : {
2511 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2512 0 : if (ndr_flags & NDR_SCALARS) {
2513 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2514 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
2515 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
2516 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
2517 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->pwd));
2518 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2519 : }
2520 0 : if (ndr_flags & NDR_BUFFERS) {
2521 0 : }
2522 0 : return NDR_ERR_SUCCESS;
2523 : }
2524 :
2525 0 : _PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r)
2526 : {
2527 0 : ndr_print_struct(ndr, name, "netr_USER_KEY16");
2528 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2529 0 : ndr->depth++;
2530 0 : ndr_print_uint16(ndr, "length", r->length);
2531 0 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size);
2532 0 : ndr_print_uint32(ndr, "flags", r->flags);
2533 0 : ndr_print_samr_Password(ndr, "pwd", &r->pwd);
2534 0 : ndr->depth--;
2535 : }
2536 :
2537 0 : static enum ndr_err_code ndr_push_netr_PasswordHistory(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_PasswordHistory *r)
2538 : {
2539 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2540 0 : if (ndr_flags & NDR_SCALARS) {
2541 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2542 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length));
2543 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length));
2544 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nt_flags));
2545 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length));
2546 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length));
2547 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lm_flags));
2548 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->nt_history, r->nt_length));
2549 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->lm_history, r->lm_length));
2550 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2551 : }
2552 0 : if (ndr_flags & NDR_BUFFERS) {
2553 0 : }
2554 0 : return NDR_ERR_SUCCESS;
2555 : }
2556 :
2557 0 : static enum ndr_err_code ndr_pull_netr_PasswordHistory(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_PasswordHistory *r)
2558 : {
2559 0 : uint32_t size_nt_history_0 = 0;
2560 0 : uint32_t size_lm_history_0 = 0;
2561 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2562 0 : if (ndr_flags & NDR_SCALARS) {
2563 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2564 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_length));
2565 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_size));
2566 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nt_flags));
2567 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_length));
2568 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_size));
2569 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lm_flags));
2570 0 : size_nt_history_0 = r->nt_length;
2571 0 : NDR_PULL_ALLOC_N(ndr, r->nt_history, size_nt_history_0);
2572 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->nt_history, size_nt_history_0));
2573 0 : size_lm_history_0 = r->lm_length;
2574 0 : NDR_PULL_ALLOC_N(ndr, r->lm_history, size_lm_history_0);
2575 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->lm_history, size_lm_history_0));
2576 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2577 : }
2578 0 : if (ndr_flags & NDR_BUFFERS) {
2579 0 : }
2580 0 : return NDR_ERR_SUCCESS;
2581 : }
2582 :
2583 0 : _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r)
2584 : {
2585 0 : ndr_print_struct(ndr, name, "netr_PasswordHistory");
2586 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2587 0 : ndr->depth++;
2588 0 : ndr_print_uint16(ndr, "nt_length", r->nt_length);
2589 0 : ndr_print_uint16(ndr, "nt_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->nt_length:r->nt_size);
2590 0 : ndr_print_uint32(ndr, "nt_flags", r->nt_flags);
2591 0 : ndr_print_uint16(ndr, "lm_length", r->lm_length);
2592 0 : ndr_print_uint16(ndr, "lm_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->lm_length:r->lm_size);
2593 0 : ndr_print_uint32(ndr, "lm_flags", r->lm_flags);
2594 0 : ndr_print_array_uint8(ndr, "nt_history", r->nt_history, r->nt_length);
2595 0 : ndr_print_array_uint8(ndr, "lm_history", r->lm_history, r->lm_length);
2596 0 : ndr->depth--;
2597 : }
2598 :
2599 0 : static enum ndr_err_code ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_KEYS2 *r)
2600 : {
2601 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2602 0 : if (ndr_flags & NDR_SCALARS) {
2603 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2604 0 : NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
2605 0 : NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
2606 0 : NDR_CHECK(ndr_push_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
2607 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2608 : }
2609 0 : if (ndr_flags & NDR_BUFFERS) {
2610 0 : }
2611 0 : return NDR_ERR_SUCCESS;
2612 : }
2613 :
2614 0 : static enum ndr_err_code ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_KEYS2 *r)
2615 : {
2616 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2617 0 : if (ndr_flags & NDR_SCALARS) {
2618 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2619 0 : NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
2620 0 : NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
2621 0 : NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
2622 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2623 : }
2624 0 : if (ndr_flags & NDR_BUFFERS) {
2625 0 : }
2626 0 : return NDR_ERR_SUCCESS;
2627 : }
2628 :
2629 0 : _PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS2 *r)
2630 : {
2631 0 : ndr_print_struct(ndr, name, "netr_USER_KEYS2");
2632 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2633 0 : ndr->depth++;
2634 0 : ndr_print_netr_USER_KEY16(ndr, "lmpassword", &r->lmpassword);
2635 0 : ndr_print_netr_USER_KEY16(ndr, "ntpassword", &r->ntpassword);
2636 0 : ndr_print_netr_PasswordHistory(ndr, "history", &r->history);
2637 0 : ndr->depth--;
2638 : }
2639 :
2640 0 : static enum ndr_err_code ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_KEY_UNION *r)
2641 : {
2642 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2643 0 : if (ndr_flags & NDR_SCALARS) {
2644 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2645 0 : NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
2646 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2647 : }
2648 0 : if (ndr_flags & NDR_BUFFERS) {
2649 0 : }
2650 0 : return NDR_ERR_SUCCESS;
2651 : }
2652 :
2653 0 : static enum ndr_err_code ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_KEY_UNION *r)
2654 : {
2655 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2656 0 : if (ndr_flags & NDR_SCALARS) {
2657 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2658 0 : NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
2659 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2660 : }
2661 0 : if (ndr_flags & NDR_BUFFERS) {
2662 0 : }
2663 0 : return NDR_ERR_SUCCESS;
2664 : }
2665 :
2666 0 : _PUBLIC_ void ndr_print_netr_USER_KEY_UNION(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY_UNION *r)
2667 : {
2668 0 : ndr_print_struct(ndr, name, "netr_USER_KEY_UNION");
2669 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2670 0 : ndr->depth++;
2671 0 : ndr_print_netr_USER_KEYS2(ndr, "keys2", &r->keys2);
2672 0 : ndr->depth--;
2673 : }
2674 :
2675 0 : _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_KEYS *r)
2676 : {
2677 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2678 0 : if (ndr_flags & NDR_SCALARS) {
2679 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2680 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2681 0 : NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
2682 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2683 : }
2684 0 : if (ndr_flags & NDR_BUFFERS) {
2685 0 : }
2686 0 : return NDR_ERR_SUCCESS;
2687 : }
2688 :
2689 0 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_KEYS *r)
2690 : {
2691 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2692 0 : if (ndr_flags & NDR_SCALARS) {
2693 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2694 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2695 0 : NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
2696 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2697 : }
2698 0 : if (ndr_flags & NDR_BUFFERS) {
2699 0 : }
2700 0 : return NDR_ERR_SUCCESS;
2701 : }
2702 :
2703 0 : static void ndr_print_flags_netr_USER_KEYS(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_USER_KEYS *r)
2704 : {
2705 0 : ndr_print_netr_USER_KEYS(ndr, name, r);
2706 0 : }
2707 :
2708 0 : _PUBLIC_ void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS *r)
2709 : {
2710 0 : ndr_print_struct(ndr, name, "netr_USER_KEYS");
2711 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2712 0 : ndr->depth++;
2713 0 : ndr_print_uint32(ndr, "version", r->version);
2714 0 : ndr_print_netr_USER_KEY_UNION(ndr, "keys", &r->keys);
2715 0 : ndr->depth--;
2716 : }
2717 :
2718 0 : static enum ndr_err_code ndr_push_netr_USER_PRIVATE_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_PRIVATE_INFO *r)
2719 : {
2720 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2721 0 : if (ndr_flags & NDR_SCALARS) {
2722 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2723 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->SensitiveDataFlag));
2724 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DataLength));
2725 : {
2726 0 : libndr_flags _flags_save_uint8 = ndr->flags;
2727 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2728 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->SensitiveData));
2729 0 : ndr->flags = _flags_save_uint8;
2730 : }
2731 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2732 : }
2733 0 : if (ndr_flags & NDR_BUFFERS) {
2734 : {
2735 0 : libndr_flags _flags_save_uint8 = ndr->flags;
2736 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2737 0 : if (r->SensitiveData) {
2738 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->DataLength));
2739 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, r->DataLength));
2740 : }
2741 0 : ndr->flags = _flags_save_uint8;
2742 : }
2743 : }
2744 0 : return NDR_ERR_SUCCESS;
2745 : }
2746 :
2747 0 : static enum ndr_err_code ndr_pull_netr_USER_PRIVATE_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_PRIVATE_INFO *r)
2748 : {
2749 0 : uint32_t _ptr_SensitiveData;
2750 0 : uint32_t size_SensitiveData_1 = 0;
2751 0 : TALLOC_CTX *_mem_save_SensitiveData_0 = NULL;
2752 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2753 0 : if (ndr_flags & NDR_SCALARS) {
2754 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2755 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->SensitiveDataFlag));
2756 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataLength));
2757 : {
2758 0 : libndr_flags _flags_save_uint8 = ndr->flags;
2759 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2760 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_SensitiveData));
2761 0 : if (_ptr_SensitiveData) {
2762 0 : NDR_PULL_ALLOC(ndr, r->SensitiveData);
2763 : } else {
2764 0 : r->SensitiveData = NULL;
2765 : }
2766 0 : ndr->flags = _flags_save_uint8;
2767 : }
2768 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2769 : }
2770 0 : if (ndr_flags & NDR_BUFFERS) {
2771 : {
2772 0 : libndr_flags _flags_save_uint8 = ndr->flags;
2773 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2774 0 : if (r->SensitiveData) {
2775 0 : _mem_save_SensitiveData_0 = NDR_PULL_GET_MEM_CTX(ndr);
2776 0 : NDR_PULL_SET_MEM_CTX(ndr, r->SensitiveData, 0);
2777 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->SensitiveData));
2778 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->SensitiveData, &size_SensitiveData_1));
2779 0 : NDR_PULL_ALLOC_N(ndr, r->SensitiveData, size_SensitiveData_1);
2780 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, size_SensitiveData_1));
2781 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SensitiveData_0, 0);
2782 : }
2783 0 : ndr->flags = _flags_save_uint8;
2784 : }
2785 0 : if (r->SensitiveData) {
2786 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->SensitiveData, r->DataLength));
2787 : }
2788 : }
2789 0 : return NDR_ERR_SUCCESS;
2790 : }
2791 :
2792 0 : _PUBLIC_ void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char *name, const struct netr_USER_PRIVATE_INFO *r)
2793 : {
2794 0 : ndr_print_struct(ndr, name, "netr_USER_PRIVATE_INFO");
2795 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2796 0 : ndr->depth++;
2797 0 : ndr_print_uint8(ndr, "SensitiveDataFlag", r->SensitiveDataFlag);
2798 0 : ndr_print_uint32(ndr, "DataLength", r->DataLength);
2799 : {
2800 0 : libndr_flags _flags_save_uint8 = ndr->flags;
2801 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2802 0 : ndr_print_ptr(ndr, "SensitiveData", r->SensitiveData);
2803 0 : ndr->depth++;
2804 0 : if (r->SensitiveData) {
2805 0 : ndr_print_array_uint8(ndr, "SensitiveData", r->SensitiveData, r->DataLength);
2806 : }
2807 0 : ndr->depth--;
2808 0 : ndr->flags = _flags_save_uint8;
2809 : }
2810 0 : ndr->depth--;
2811 : }
2812 :
2813 0 : static enum ndr_err_code ndr_push_netr_DELTA_USER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_USER *r)
2814 : {
2815 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2816 0 : if (ndr_flags & NDR_SCALARS) {
2817 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2818 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2819 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2820 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2821 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2822 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2823 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2824 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2825 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2826 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2827 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2828 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2829 0 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2830 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2831 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2832 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2833 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2834 0 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2835 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
2836 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
2837 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_present));
2838 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_present));
2839 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
2840 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
2841 0 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2842 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
2843 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
2844 0 : NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
2845 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
2846 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
2847 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2848 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
2849 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2850 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
2851 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
2852 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
2853 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
2854 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
2855 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2856 : }
2857 0 : if (ndr_flags & NDR_BUFFERS) {
2858 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2859 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2860 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2861 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2862 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2863 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2864 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2865 0 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2866 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2867 0 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2868 0 : NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
2869 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
2870 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2871 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
2872 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2873 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
2874 : }
2875 0 : return NDR_ERR_SUCCESS;
2876 : }
2877 :
2878 0 : static enum ndr_err_code ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_USER *r)
2879 : {
2880 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2881 0 : if (ndr_flags & NDR_SCALARS) {
2882 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2883 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2884 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2885 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2886 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2887 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2888 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2889 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2890 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2891 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2892 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
2893 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
2894 0 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2895 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
2896 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
2897 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
2898 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
2899 0 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2900 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
2901 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
2902 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_present));
2903 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_present));
2904 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
2905 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
2906 0 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2907 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
2908 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
2909 0 : NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
2910 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
2911 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
2912 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2913 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
2914 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2915 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
2916 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
2917 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
2918 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
2919 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
2920 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2921 : }
2922 0 : if (ndr_flags & NDR_BUFFERS) {
2923 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2924 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2925 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2926 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2927 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2928 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2929 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2930 0 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2931 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2932 0 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2933 0 : NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
2934 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
2935 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2936 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
2937 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2938 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
2939 : }
2940 0 : return NDR_ERR_SUCCESS;
2941 : }
2942 :
2943 0 : _PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_USER *r)
2944 : {
2945 0 : ndr_print_struct(ndr, name, "netr_DELTA_USER");
2946 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2947 0 : ndr->depth++;
2948 0 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2949 0 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2950 0 : ndr_print_uint32(ndr, "rid", r->rid);
2951 0 : ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2952 0 : ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2953 0 : ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2954 0 : ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2955 0 : ndr_print_lsa_String(ndr, "description", &r->description);
2956 0 : ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2957 0 : ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
2958 0 : ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
2959 0 : ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2960 0 : ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
2961 0 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
2962 0 : ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
2963 0 : ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
2964 0 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2965 0 : ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
2966 0 : ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
2967 0 : ndr_print_uint8(ndr, "nt_password_present", r->nt_password_present);
2968 0 : ndr_print_uint8(ndr, "lm_password_present", r->lm_password_present);
2969 0 : ndr_print_uint8(ndr, "password_expired", r->password_expired);
2970 0 : ndr_print_lsa_String(ndr, "comment", &r->comment);
2971 0 : ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
2972 0 : ndr_print_uint16(ndr, "country_code", r->country_code);
2973 0 : ndr_print_uint16(ndr, "code_page", r->code_page);
2974 0 : ndr_print_netr_USER_PRIVATE_INFO(ndr, "user_private_info", &r->user_private_info);
2975 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
2976 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
2977 0 : ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2978 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
2979 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
2980 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
2981 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
2982 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
2983 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
2984 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
2985 0 : ndr->depth--;
2986 : }
2987 :
2988 0 : static enum ndr_err_code ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_DOMAIN *r)
2989 : {
2990 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2991 0 : if (ndr_flags & NDR_SCALARS) {
2992 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2993 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
2994 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
2995 0 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->force_logoff_time));
2996 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
2997 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length));
2998 0 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age));
2999 0 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age));
3000 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
3001 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
3002 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3003 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3004 0 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->account_lockout));
3005 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3006 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3007 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3008 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_to_chgpass));
3009 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3010 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3011 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3012 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3013 : }
3014 0 : if (ndr_flags & NDR_BUFFERS) {
3015 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
3016 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
3017 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3018 0 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
3019 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3020 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3021 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3022 : }
3023 0 : return NDR_ERR_SUCCESS;
3024 : }
3025 :
3026 0 : static enum ndr_err_code ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_DOMAIN *r)
3027 : {
3028 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3029 0 : if (ndr_flags & NDR_SCALARS) {
3030 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3031 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
3032 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
3033 0 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->force_logoff_time));
3034 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
3035 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length));
3036 0 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age));
3037 0 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age));
3038 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
3039 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
3040 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3041 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3042 0 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->account_lockout));
3043 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3044 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3045 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3046 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_to_chgpass));
3047 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3048 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3049 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3050 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3051 : }
3052 0 : if (ndr_flags & NDR_BUFFERS) {
3053 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
3054 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
3055 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3056 0 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
3057 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3058 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3059 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3060 : }
3061 0 : return NDR_ERR_SUCCESS;
3062 : }
3063 :
3064 0 : _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DOMAIN *r)
3065 : {
3066 0 : ndr_print_struct(ndr, name, "netr_DELTA_DOMAIN");
3067 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3068 0 : ndr->depth++;
3069 0 : ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
3070 0 : ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
3071 0 : ndr_print_dlong(ndr, "force_logoff_time", r->force_logoff_time);
3072 0 : ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
3073 0 : ndr_print_uint16(ndr, "password_history_length", r->password_history_length);
3074 0 : ndr_print_dlong(ndr, "max_password_age", r->max_password_age);
3075 0 : ndr_print_dlong(ndr, "min_password_age", r->min_password_age);
3076 0 : ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
3077 0 : ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
3078 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3079 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3080 0 : ndr_print_lsa_BinaryString(ndr, "account_lockout", &r->account_lockout);
3081 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3082 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3083 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3084 0 : ndr_print_uint32(ndr, "logon_to_chgpass", r->logon_to_chgpass);
3085 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3086 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3087 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3088 0 : ndr->depth--;
3089 : }
3090 :
3091 0 : static enum ndr_err_code ndr_push_netr_DELTA_GROUP(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_GROUP *r)
3092 : {
3093 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3094 0 : if (ndr_flags & NDR_SCALARS) {
3095 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3096 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->group_name));
3097 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
3098 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
3099 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
3100 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3101 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3102 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3103 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3104 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3105 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3106 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3107 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3108 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3109 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3110 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3111 : }
3112 0 : if (ndr_flags & NDR_BUFFERS) {
3113 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
3114 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
3115 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3116 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3117 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3118 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3119 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3120 : }
3121 0 : return NDR_ERR_SUCCESS;
3122 : }
3123 :
3124 0 : static enum ndr_err_code ndr_pull_netr_DELTA_GROUP(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_GROUP *r)
3125 : {
3126 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3127 0 : if (ndr_flags & NDR_SCALARS) {
3128 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3129 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->group_name));
3130 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3131 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
3132 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
3133 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3134 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3135 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3136 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3137 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3138 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3139 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3140 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3141 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3142 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3143 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3144 : }
3145 0 : if (ndr_flags & NDR_BUFFERS) {
3146 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
3147 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
3148 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3149 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3150 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3151 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3152 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3153 : }
3154 0 : return NDR_ERR_SUCCESS;
3155 : }
3156 :
3157 0 : _PUBLIC_ void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP *r)
3158 : {
3159 0 : ndr_print_struct(ndr, name, "netr_DELTA_GROUP");
3160 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3161 0 : ndr->depth++;
3162 0 : ndr_print_lsa_String(ndr, "group_name", &r->group_name);
3163 0 : ndr_print_uint32(ndr, "rid", r->rid);
3164 0 : ndr_print_uint32(ndr, "attributes", r->attributes);
3165 0 : ndr_print_lsa_String(ndr, "description", &r->description);
3166 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3167 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3168 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
3169 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3170 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3171 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3172 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
3173 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3174 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3175 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3176 0 : ndr->depth--;
3177 : }
3178 :
3179 0 : static enum ndr_err_code ndr_push_netr_DELTA_RENAME(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_RENAME *r)
3180 : {
3181 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3182 0 : if (ndr_flags & NDR_SCALARS) {
3183 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3184 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->OldName));
3185 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->NewName));
3186 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3187 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3188 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3189 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3190 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3191 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3192 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3193 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3194 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3195 : }
3196 0 : if (ndr_flags & NDR_BUFFERS) {
3197 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
3198 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
3199 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3200 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3201 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3202 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3203 : }
3204 0 : return NDR_ERR_SUCCESS;
3205 : }
3206 :
3207 0 : static enum ndr_err_code ndr_pull_netr_DELTA_RENAME(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_RENAME *r)
3208 : {
3209 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3210 0 : if (ndr_flags & NDR_SCALARS) {
3211 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3212 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->OldName));
3213 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->NewName));
3214 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3215 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3216 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3217 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3218 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3219 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3220 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3221 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3222 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3223 : }
3224 0 : if (ndr_flags & NDR_BUFFERS) {
3225 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
3226 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
3227 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3228 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3229 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3230 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3231 : }
3232 0 : return NDR_ERR_SUCCESS;
3233 : }
3234 :
3235 0 : _PUBLIC_ void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *name, const struct netr_DELTA_RENAME *r)
3236 : {
3237 0 : ndr_print_struct(ndr, name, "netr_DELTA_RENAME");
3238 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3239 0 : ndr->depth++;
3240 0 : ndr_print_lsa_String(ndr, "OldName", &r->OldName);
3241 0 : ndr_print_lsa_String(ndr, "NewName", &r->NewName);
3242 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
3243 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3244 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3245 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3246 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
3247 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3248 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3249 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3250 0 : ndr->depth--;
3251 : }
3252 :
3253 0 : static enum ndr_err_code ndr_push_netr_DELTA_GROUP_MEMBER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_GROUP_MEMBER *r)
3254 : {
3255 0 : uint32_t cntr_rids_1;
3256 0 : uint32_t cntr_attribs_1;
3257 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3258 0 : if (ndr_flags & NDR_SCALARS) {
3259 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3260 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
3261 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribs));
3262 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
3263 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3264 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
3265 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
3266 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
3267 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3268 : }
3269 0 : if (ndr_flags & NDR_BUFFERS) {
3270 0 : if (r->rids) {
3271 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
3272 0 : for (cntr_rids_1 = 0; cntr_rids_1 < (r->num_rids); cntr_rids_1++) {
3273 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_1]));
3274 : }
3275 : }
3276 0 : if (r->attribs) {
3277 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
3278 0 : for (cntr_attribs_1 = 0; cntr_attribs_1 < (r->num_rids); cntr_attribs_1++) {
3279 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribs[cntr_attribs_1]));
3280 : }
3281 : }
3282 : }
3283 0 : return NDR_ERR_SUCCESS;
3284 : }
3285 :
3286 0 : static enum ndr_err_code ndr_pull_netr_DELTA_GROUP_MEMBER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_GROUP_MEMBER *r)
3287 : {
3288 0 : uint32_t _ptr_rids;
3289 0 : uint32_t size_rids_1 = 0;
3290 0 : uint32_t cntr_rids_1;
3291 0 : TALLOC_CTX *_mem_save_rids_0 = NULL;
3292 0 : TALLOC_CTX *_mem_save_rids_1 = NULL;
3293 0 : uint32_t _ptr_attribs;
3294 0 : uint32_t size_attribs_1 = 0;
3295 0 : uint32_t cntr_attribs_1;
3296 0 : TALLOC_CTX *_mem_save_attribs_0 = NULL;
3297 0 : TALLOC_CTX *_mem_save_attribs_1 = NULL;
3298 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3299 0 : if (ndr_flags & NDR_SCALARS) {
3300 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3301 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
3302 0 : if (_ptr_rids) {
3303 0 : NDR_PULL_ALLOC(ndr, r->rids);
3304 : } else {
3305 0 : r->rids = NULL;
3306 : }
3307 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribs));
3308 0 : if (_ptr_attribs) {
3309 0 : NDR_PULL_ALLOC(ndr, r->attribs);
3310 : } else {
3311 0 : r->attribs = NULL;
3312 : }
3313 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_rids));
3314 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3315 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
3316 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
3317 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
3318 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3319 : }
3320 0 : if (ndr_flags & NDR_BUFFERS) {
3321 0 : if (r->rids) {
3322 0 : _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
3323 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
3324 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
3325 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->rids, &size_rids_1));
3326 0 : NDR_PULL_ALLOC_N(ndr, r->rids, size_rids_1);
3327 0 : _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
3328 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
3329 0 : for (cntr_rids_1 = 0; cntr_rids_1 < (size_rids_1); cntr_rids_1++) {
3330 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
3331 : }
3332 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
3333 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
3334 : }
3335 0 : if (r->attribs) {
3336 0 : _mem_save_attribs_0 = NDR_PULL_GET_MEM_CTX(ndr);
3337 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
3338 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attribs));
3339 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attribs, &size_attribs_1));
3340 0 : NDR_PULL_ALLOC_N(ndr, r->attribs, size_attribs_1);
3341 0 : _mem_save_attribs_1 = NDR_PULL_GET_MEM_CTX(ndr);
3342 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
3343 0 : for (cntr_attribs_1 = 0; cntr_attribs_1 < (size_attribs_1); cntr_attribs_1++) {
3344 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribs[cntr_attribs_1]));
3345 : }
3346 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_1, 0);
3347 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_0, 0);
3348 : }
3349 0 : if (r->rids) {
3350 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->rids, r->num_rids));
3351 : }
3352 0 : if (r->attribs) {
3353 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->attribs, r->num_rids));
3354 : }
3355 : }
3356 0 : return NDR_ERR_SUCCESS;
3357 : }
3358 :
3359 0 : _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP_MEMBER *r)
3360 : {
3361 0 : uint32_t cntr_rids_1;
3362 0 : uint32_t cntr_attribs_1;
3363 0 : ndr_print_struct(ndr, name, "netr_DELTA_GROUP_MEMBER");
3364 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3365 0 : ndr->depth++;
3366 0 : ndr_print_ptr(ndr, "rids", r->rids);
3367 0 : ndr->depth++;
3368 0 : if (r->rids) {
3369 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "rids", (uint32_t)(r->num_rids));
3370 0 : ndr->depth++;
3371 0 : for (cntr_rids_1 = 0; cntr_rids_1 < (r->num_rids); cntr_rids_1++) {
3372 0 : ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
3373 : }
3374 0 : ndr->depth--;
3375 : }
3376 0 : ndr->depth--;
3377 0 : ndr_print_ptr(ndr, "attribs", r->attribs);
3378 0 : ndr->depth++;
3379 0 : if (r->attribs) {
3380 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "attribs", (uint32_t)(r->num_rids));
3381 0 : ndr->depth++;
3382 0 : for (cntr_attribs_1 = 0; cntr_attribs_1 < (r->num_rids); cntr_attribs_1++) {
3383 0 : ndr_print_uint32(ndr, "attribs", r->attribs[cntr_attribs_1]);
3384 : }
3385 0 : ndr->depth--;
3386 : }
3387 0 : ndr->depth--;
3388 0 : ndr_print_uint32(ndr, "num_rids", r->num_rids);
3389 0 : ndr_print_uint32(ndr, "unknown1", r->unknown1);
3390 0 : ndr_print_uint32(ndr, "unknown2", r->unknown2);
3391 0 : ndr_print_uint32(ndr, "unknown3", r->unknown3);
3392 0 : ndr_print_uint32(ndr, "unknown4", r->unknown4);
3393 0 : ndr->depth--;
3394 : }
3395 :
3396 0 : static enum ndr_err_code ndr_push_netr_DELTA_ALIAS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ALIAS *r)
3397 : {
3398 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3399 0 : if (ndr_flags & NDR_SCALARS) {
3400 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3401 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
3402 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
3403 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3404 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3405 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
3406 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3407 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3408 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3409 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3410 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3411 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3412 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3413 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3414 : }
3415 0 : if (ndr_flags & NDR_BUFFERS) {
3416 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
3417 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3418 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
3419 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3420 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3421 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3422 : }
3423 0 : return NDR_ERR_SUCCESS;
3424 : }
3425 :
3426 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ALIAS *r)
3427 : {
3428 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3429 0 : if (ndr_flags & NDR_SCALARS) {
3430 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3431 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
3432 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3433 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3434 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3435 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
3436 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3437 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3438 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3439 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3440 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3441 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3442 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3443 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3444 : }
3445 0 : if (ndr_flags & NDR_BUFFERS) {
3446 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
3447 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3448 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
3449 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3450 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3451 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3452 : }
3453 0 : return NDR_ERR_SUCCESS;
3454 : }
3455 :
3456 0 : _PUBLIC_ void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS *r)
3457 : {
3458 0 : ndr_print_struct(ndr, name, "netr_DELTA_ALIAS");
3459 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3460 0 : ndr->depth++;
3461 0 : ndr_print_lsa_String(ndr, "alias_name", &r->alias_name);
3462 0 : ndr_print_uint32(ndr, "rid", r->rid);
3463 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3464 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3465 0 : ndr_print_lsa_String(ndr, "description", &r->description);
3466 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3467 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3468 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3469 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
3470 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3471 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3472 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3473 0 : ndr->depth--;
3474 : }
3475 :
3476 0 : static enum ndr_err_code ndr_push_netr_DELTA_ALIAS_MEMBER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ALIAS_MEMBER *r)
3477 : {
3478 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3479 0 : if (ndr_flags & NDR_SCALARS) {
3480 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3481 0 : NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
3482 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3483 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
3484 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
3485 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
3486 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3487 : }
3488 0 : if (ndr_flags & NDR_BUFFERS) {
3489 0 : NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
3490 : }
3491 0 : return NDR_ERR_SUCCESS;
3492 : }
3493 :
3494 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS_MEMBER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ALIAS_MEMBER *r)
3495 : {
3496 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3497 0 : if (ndr_flags & NDR_SCALARS) {
3498 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3499 0 : NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
3500 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3501 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
3502 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
3503 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
3504 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3505 : }
3506 0 : if (ndr_flags & NDR_BUFFERS) {
3507 0 : NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
3508 : }
3509 0 : return NDR_ERR_SUCCESS;
3510 : }
3511 :
3512 0 : _PUBLIC_ void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS_MEMBER *r)
3513 : {
3514 0 : ndr_print_struct(ndr, name, "netr_DELTA_ALIAS_MEMBER");
3515 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3516 0 : ndr->depth++;
3517 0 : ndr_print_lsa_SidArray(ndr, "sids", &r->sids);
3518 0 : ndr_print_uint32(ndr, "unknown1", r->unknown1);
3519 0 : ndr_print_uint32(ndr, "unknown2", r->unknown2);
3520 0 : ndr_print_uint32(ndr, "unknown3", r->unknown3);
3521 0 : ndr_print_uint32(ndr, "unknown4", r->unknown4);
3522 0 : ndr->depth--;
3523 : }
3524 :
3525 0 : static enum ndr_err_code ndr_push_netr_QUOTA_LIMITS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_QUOTA_LIMITS *r)
3526 : {
3527 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3528 0 : if (ndr_flags & NDR_SCALARS) {
3529 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3530 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagedpoollimit));
3531 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nonpagedpoollimit));
3532 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minimumworkingsetsize));
3533 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximumworkingsetsize));
3534 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefilelimit));
3535 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timelimit));
3536 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3537 : }
3538 0 : if (ndr_flags & NDR_BUFFERS) {
3539 0 : }
3540 0 : return NDR_ERR_SUCCESS;
3541 : }
3542 :
3543 0 : static enum ndr_err_code ndr_pull_netr_QUOTA_LIMITS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_QUOTA_LIMITS *r)
3544 : {
3545 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3546 0 : if (ndr_flags & NDR_SCALARS) {
3547 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
3548 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagedpoollimit));
3549 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nonpagedpoollimit));
3550 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minimumworkingsetsize));
3551 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximumworkingsetsize));
3552 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefilelimit));
3553 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timelimit));
3554 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3555 : }
3556 0 : if (ndr_flags & NDR_BUFFERS) {
3557 0 : }
3558 0 : return NDR_ERR_SUCCESS;
3559 : }
3560 :
3561 0 : _PUBLIC_ void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *name, const struct netr_QUOTA_LIMITS *r)
3562 : {
3563 0 : ndr_print_struct(ndr, name, "netr_QUOTA_LIMITS");
3564 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3565 0 : ndr->depth++;
3566 0 : ndr_print_uint32(ndr, "pagedpoollimit", r->pagedpoollimit);
3567 0 : ndr_print_uint32(ndr, "nonpagedpoollimit", r->nonpagedpoollimit);
3568 0 : ndr_print_uint32(ndr, "minimumworkingsetsize", r->minimumworkingsetsize);
3569 0 : ndr_print_uint32(ndr, "maximumworkingsetsize", r->maximumworkingsetsize);
3570 0 : ndr_print_uint32(ndr, "pagefilelimit", r->pagefilelimit);
3571 0 : ndr_print_NTTIME(ndr, "timelimit", r->timelimit);
3572 0 : ndr->depth--;
3573 : }
3574 :
3575 0 : static enum ndr_err_code ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_POLICY *r)
3576 : {
3577 0 : uint32_t cntr_eventauditoptions_1;
3578 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3579 0 : if (ndr_flags & NDR_SCALARS) {
3580 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3581 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlogsize));
3582 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->auditretentionperiod));
3583 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->auditingmode));
3584 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxauditeventcount));
3585 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->eventauditoptions));
3586 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
3587 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
3588 0 : NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
3589 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
3590 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->db_create_time));
3591 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3592 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3593 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3594 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3595 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3596 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3597 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3598 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3599 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3600 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3601 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3602 : }
3603 0 : if (ndr_flags & NDR_BUFFERS) {
3604 0 : if (r->eventauditoptions) {
3605 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->maxauditeventcount + 1));
3606 0 : for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (r->maxauditeventcount + 1); cntr_eventauditoptions_1++) {
3607 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->eventauditoptions[cntr_eventauditoptions_1]));
3608 : }
3609 : }
3610 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
3611 0 : if (r->sid) {
3612 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3613 : }
3614 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3615 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3616 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3617 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3618 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3619 : }
3620 0 : return NDR_ERR_SUCCESS;
3621 : }
3622 :
3623 0 : static enum ndr_err_code ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_POLICY *r)
3624 : {
3625 0 : uint32_t _ptr_eventauditoptions;
3626 0 : uint32_t size_eventauditoptions_1 = 0;
3627 0 : uint32_t cntr_eventauditoptions_1;
3628 0 : TALLOC_CTX *_mem_save_eventauditoptions_0 = NULL;
3629 0 : TALLOC_CTX *_mem_save_eventauditoptions_1 = NULL;
3630 0 : uint32_t _ptr_sid;
3631 0 : TALLOC_CTX *_mem_save_sid_0 = NULL;
3632 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3633 0 : if (ndr_flags & NDR_SCALARS) {
3634 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3635 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlogsize));
3636 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->auditretentionperiod));
3637 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->auditingmode));
3638 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxauditeventcount));
3639 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventauditoptions));
3640 0 : if (_ptr_eventauditoptions) {
3641 0 : NDR_PULL_ALLOC(ndr, r->eventauditoptions);
3642 : } else {
3643 0 : r->eventauditoptions = NULL;
3644 : }
3645 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
3646 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
3647 0 : if (_ptr_sid) {
3648 0 : NDR_PULL_ALLOC(ndr, r->sid);
3649 : } else {
3650 0 : r->sid = NULL;
3651 : }
3652 0 : NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
3653 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
3654 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->db_create_time));
3655 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3656 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3657 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3658 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3659 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3660 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3661 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3662 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3663 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3664 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3665 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3666 : }
3667 0 : if (ndr_flags & NDR_BUFFERS) {
3668 0 : if (r->eventauditoptions) {
3669 0 : _mem_save_eventauditoptions_0 = NDR_PULL_GET_MEM_CTX(ndr);
3670 0 : NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
3671 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->eventauditoptions));
3672 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->eventauditoptions, &size_eventauditoptions_1));
3673 0 : NDR_PULL_ALLOC_N(ndr, r->eventauditoptions, size_eventauditoptions_1);
3674 0 : _mem_save_eventauditoptions_1 = NDR_PULL_GET_MEM_CTX(ndr);
3675 0 : NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
3676 0 : for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (size_eventauditoptions_1); cntr_eventauditoptions_1++) {
3677 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->eventauditoptions[cntr_eventauditoptions_1]));
3678 : }
3679 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_1, 0);
3680 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_0, 0);
3681 : }
3682 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
3683 0 : if (r->sid) {
3684 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3685 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3686 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3687 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3688 : }
3689 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3690 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3691 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3692 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3693 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3694 0 : if (r->eventauditoptions) {
3695 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->eventauditoptions, r->maxauditeventcount + 1));
3696 : }
3697 : }
3698 0 : return NDR_ERR_SUCCESS;
3699 : }
3700 :
3701 0 : _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_POLICY *r)
3702 : {
3703 0 : uint32_t cntr_eventauditoptions_1;
3704 0 : ndr_print_struct(ndr, name, "netr_DELTA_POLICY");
3705 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3706 0 : ndr->depth++;
3707 0 : ndr_print_uint32(ndr, "maxlogsize", r->maxlogsize);
3708 0 : ndr_print_NTTIME(ndr, "auditretentionperiod", r->auditretentionperiod);
3709 0 : ndr_print_uint8(ndr, "auditingmode", r->auditingmode);
3710 0 : ndr_print_uint32(ndr, "maxauditeventcount", r->maxauditeventcount);
3711 0 : ndr_print_ptr(ndr, "eventauditoptions", r->eventauditoptions);
3712 0 : ndr->depth++;
3713 0 : if (r->eventauditoptions) {
3714 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "eventauditoptions", (uint32_t)(r->maxauditeventcount + 1));
3715 0 : ndr->depth++;
3716 0 : for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (r->maxauditeventcount + 1); cntr_eventauditoptions_1++) {
3717 0 : ndr_print_uint32(ndr, "eventauditoptions", r->eventauditoptions[cntr_eventauditoptions_1]);
3718 : }
3719 0 : ndr->depth--;
3720 : }
3721 0 : ndr->depth--;
3722 0 : ndr_print_lsa_String(ndr, "primary_domain_name", &r->primary_domain_name);
3723 0 : ndr_print_ptr(ndr, "sid", r->sid);
3724 0 : ndr->depth++;
3725 0 : if (r->sid) {
3726 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
3727 : }
3728 0 : ndr->depth--;
3729 0 : ndr_print_netr_QUOTA_LIMITS(ndr, "quota_limits", &r->quota_limits);
3730 0 : ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
3731 0 : ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time);
3732 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3733 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3734 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
3735 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3736 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3737 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3738 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
3739 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3740 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3741 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3742 0 : ndr->depth--;
3743 : }
3744 :
3745 0 : static enum ndr_err_code ndr_push_netr_DELTA_TRUSTED_DOMAIN(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_TRUSTED_DOMAIN *r)
3746 : {
3747 0 : uint32_t cntr_controller_names_1;
3748 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3749 0 : if (ndr_flags & NDR_SCALARS) {
3750 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3751 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
3752 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_controllers));
3753 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->controller_names));
3754 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3755 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3756 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3757 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3758 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3759 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3760 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
3761 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3762 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3763 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3764 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3765 : }
3766 0 : if (ndr_flags & NDR_BUFFERS) {
3767 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
3768 0 : if (r->controller_names) {
3769 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_controllers));
3770 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
3771 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
3772 : }
3773 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
3774 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
3775 : }
3776 : }
3777 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3778 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3779 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3780 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3781 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3782 : }
3783 0 : return NDR_ERR_SUCCESS;
3784 : }
3785 :
3786 0 : static enum ndr_err_code ndr_pull_netr_DELTA_TRUSTED_DOMAIN(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_TRUSTED_DOMAIN *r)
3787 : {
3788 0 : uint32_t _ptr_controller_names;
3789 0 : uint32_t size_controller_names_1 = 0;
3790 0 : uint32_t cntr_controller_names_1;
3791 0 : TALLOC_CTX *_mem_save_controller_names_0 = NULL;
3792 0 : TALLOC_CTX *_mem_save_controller_names_1 = NULL;
3793 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3794 0 : if (ndr_flags & NDR_SCALARS) {
3795 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3796 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
3797 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_controllers));
3798 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_controller_names));
3799 0 : if (_ptr_controller_names) {
3800 0 : NDR_PULL_ALLOC(ndr, r->controller_names);
3801 : } else {
3802 0 : r->controller_names = NULL;
3803 : }
3804 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3805 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3806 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3807 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3808 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3809 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3810 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
3811 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3812 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3813 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3814 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3815 : }
3816 0 : if (ndr_flags & NDR_BUFFERS) {
3817 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
3818 0 : if (r->controller_names) {
3819 0 : _mem_save_controller_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
3820 0 : NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
3821 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->controller_names));
3822 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->controller_names, &size_controller_names_1));
3823 0 : NDR_PULL_ALLOC_N(ndr, r->controller_names, size_controller_names_1);
3824 0 : _mem_save_controller_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
3825 0 : NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
3826 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
3827 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
3828 : }
3829 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
3830 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
3831 : }
3832 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_1, 0);
3833 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_0, 0);
3834 : }
3835 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3836 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3837 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3838 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3839 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3840 0 : if (r->controller_names) {
3841 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->controller_names, r->num_controllers));
3842 : }
3843 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
3844 0 : }
3845 : }
3846 0 : return NDR_ERR_SUCCESS;
3847 : }
3848 :
3849 0 : _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_TRUSTED_DOMAIN *r)
3850 : {
3851 0 : uint32_t cntr_controller_names_1;
3852 0 : ndr_print_struct(ndr, name, "netr_DELTA_TRUSTED_DOMAIN");
3853 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3854 0 : ndr->depth++;
3855 0 : ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
3856 0 : ndr_print_uint32(ndr, "num_controllers", r->num_controllers);
3857 0 : ndr_print_ptr(ndr, "controller_names", r->controller_names);
3858 0 : ndr->depth++;
3859 0 : if (r->controller_names) {
3860 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "controller_names", (uint32_t)(r->num_controllers));
3861 0 : ndr->depth++;
3862 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
3863 0 : ndr_print_lsa_String(ndr, "controller_names", &r->controller_names[cntr_controller_names_1]);
3864 : }
3865 0 : ndr->depth--;
3866 : }
3867 0 : ndr->depth--;
3868 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3869 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3870 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
3871 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3872 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3873 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3874 0 : ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
3875 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3876 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3877 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3878 0 : ndr->depth--;
3879 : }
3880 :
3881 0 : static enum ndr_err_code ndr_push_netr_DELTA_ACCOUNT(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ACCOUNT *r)
3882 : {
3883 0 : uint32_t cntr_privilege_attrib_1;
3884 0 : uint32_t cntr_privilege_name_1;
3885 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3886 0 : if (ndr_flags & NDR_SCALARS) {
3887 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3888 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_entries));
3889 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_control));
3890 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_attrib));
3891 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_name));
3892 0 : NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
3893 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->system_flags));
3894 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3895 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3896 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3897 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3898 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3899 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3900 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3901 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3902 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3903 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3904 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3905 : }
3906 0 : if (ndr_flags & NDR_BUFFERS) {
3907 0 : if (r->privilege_attrib) {
3908 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->privilege_entries));
3909 0 : for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (r->privilege_entries); cntr_privilege_attrib_1++) {
3910 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_attrib[cntr_privilege_attrib_1]));
3911 : }
3912 : }
3913 0 : if (r->privilege_name) {
3914 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->privilege_entries));
3915 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
3916 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
3917 : }
3918 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
3919 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
3920 : }
3921 : }
3922 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3923 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3924 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3925 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3926 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3927 : }
3928 0 : return NDR_ERR_SUCCESS;
3929 : }
3930 :
3931 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ACCOUNT(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ACCOUNT *r)
3932 : {
3933 0 : uint32_t _ptr_privilege_attrib;
3934 0 : uint32_t size_privilege_attrib_1 = 0;
3935 0 : uint32_t cntr_privilege_attrib_1;
3936 0 : TALLOC_CTX *_mem_save_privilege_attrib_0 = NULL;
3937 0 : TALLOC_CTX *_mem_save_privilege_attrib_1 = NULL;
3938 0 : uint32_t _ptr_privilege_name;
3939 0 : uint32_t size_privilege_name_1 = 0;
3940 0 : uint32_t cntr_privilege_name_1;
3941 0 : TALLOC_CTX *_mem_save_privilege_name_0 = NULL;
3942 0 : TALLOC_CTX *_mem_save_privilege_name_1 = NULL;
3943 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3944 0 : if (ndr_flags & NDR_SCALARS) {
3945 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3946 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_entries));
3947 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_control));
3948 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_attrib));
3949 0 : if (_ptr_privilege_attrib) {
3950 0 : NDR_PULL_ALLOC(ndr, r->privilege_attrib);
3951 : } else {
3952 0 : r->privilege_attrib = NULL;
3953 : }
3954 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_name));
3955 0 : if (_ptr_privilege_name) {
3956 0 : NDR_PULL_ALLOC(ndr, r->privilege_name);
3957 : } else {
3958 0 : r->privilege_name = NULL;
3959 : }
3960 0 : NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
3961 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->system_flags));
3962 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3963 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3964 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3965 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3966 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3967 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3968 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3969 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3970 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3971 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3972 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3973 : }
3974 0 : if (ndr_flags & NDR_BUFFERS) {
3975 0 : if (r->privilege_attrib) {
3976 0 : _mem_save_privilege_attrib_0 = NDR_PULL_GET_MEM_CTX(ndr);
3977 0 : NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
3978 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_attrib));
3979 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->privilege_attrib, &size_privilege_attrib_1));
3980 0 : NDR_PULL_ALLOC_N(ndr, r->privilege_attrib, size_privilege_attrib_1);
3981 0 : _mem_save_privilege_attrib_1 = NDR_PULL_GET_MEM_CTX(ndr);
3982 0 : NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
3983 0 : for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (size_privilege_attrib_1); cntr_privilege_attrib_1++) {
3984 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_attrib[cntr_privilege_attrib_1]));
3985 : }
3986 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_1, 0);
3987 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_0, 0);
3988 : }
3989 0 : if (r->privilege_name) {
3990 0 : _mem_save_privilege_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3991 0 : NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
3992 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_name));
3993 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->privilege_name, &size_privilege_name_1));
3994 0 : NDR_PULL_ALLOC_N(ndr, r->privilege_name, size_privilege_name_1);
3995 0 : _mem_save_privilege_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3996 0 : NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
3997 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
3998 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
3999 : }
4000 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
4001 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
4002 : }
4003 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_1, 0);
4004 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_0, 0);
4005 : }
4006 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
4007 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
4008 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
4009 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
4010 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
4011 0 : if (r->privilege_attrib) {
4012 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->privilege_attrib, r->privilege_entries));
4013 : }
4014 0 : if (r->privilege_name) {
4015 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privilege_name, r->privilege_entries));
4016 : }
4017 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
4018 0 : }
4019 : }
4020 0 : return NDR_ERR_SUCCESS;
4021 : }
4022 :
4023 0 : _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ACCOUNT *r)
4024 : {
4025 0 : uint32_t cntr_privilege_attrib_1;
4026 0 : uint32_t cntr_privilege_name_1;
4027 0 : ndr_print_struct(ndr, name, "netr_DELTA_ACCOUNT");
4028 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4029 0 : ndr->depth++;
4030 0 : ndr_print_uint32(ndr, "privilege_entries", r->privilege_entries);
4031 0 : ndr_print_uint32(ndr, "privilege_control", r->privilege_control);
4032 0 : ndr_print_ptr(ndr, "privilege_attrib", r->privilege_attrib);
4033 0 : ndr->depth++;
4034 0 : if (r->privilege_attrib) {
4035 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "privilege_attrib", (uint32_t)(r->privilege_entries));
4036 0 : ndr->depth++;
4037 0 : for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (r->privilege_entries); cntr_privilege_attrib_1++) {
4038 0 : ndr_print_uint32(ndr, "privilege_attrib", r->privilege_attrib[cntr_privilege_attrib_1]);
4039 : }
4040 0 : ndr->depth--;
4041 : }
4042 0 : ndr->depth--;
4043 0 : ndr_print_ptr(ndr, "privilege_name", r->privilege_name);
4044 0 : ndr->depth++;
4045 0 : if (r->privilege_name) {
4046 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "privilege_name", (uint32_t)(r->privilege_entries));
4047 0 : ndr->depth++;
4048 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
4049 0 : ndr_print_lsa_String(ndr, "privilege_name", &r->privilege_name[cntr_privilege_name_1]);
4050 : }
4051 0 : ndr->depth--;
4052 : }
4053 0 : ndr->depth--;
4054 0 : ndr_print_netr_QUOTA_LIMITS(ndr, "quotalimits", &r->quotalimits);
4055 0 : ndr_print_uint32(ndr, "system_flags", r->system_flags);
4056 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
4057 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
4058 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
4059 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
4060 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
4061 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
4062 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
4063 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
4064 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
4065 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
4066 0 : ndr->depth--;
4067 : }
4068 :
4069 0 : static enum ndr_err_code ndr_push_netr_CIPHER_VALUE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_CIPHER_VALUE *r)
4070 : {
4071 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4072 0 : if (ndr_flags & NDR_SCALARS) {
4073 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4074 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
4075 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlen));
4076 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->cipher_data));
4077 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4078 : }
4079 0 : if (ndr_flags & NDR_BUFFERS) {
4080 0 : if (r->cipher_data) {
4081 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->maxlen));
4082 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4083 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->len));
4084 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->cipher_data, r->len));
4085 : }
4086 : }
4087 0 : return NDR_ERR_SUCCESS;
4088 : }
4089 :
4090 0 : static enum ndr_err_code ndr_pull_netr_CIPHER_VALUE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_CIPHER_VALUE *r)
4091 : {
4092 0 : uint32_t _ptr_cipher_data;
4093 0 : uint32_t size_cipher_data_1 = 0;
4094 0 : uint32_t length_cipher_data_1 = 0;
4095 0 : TALLOC_CTX *_mem_save_cipher_data_0 = NULL;
4096 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4097 0 : if (ndr_flags & NDR_SCALARS) {
4098 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4099 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
4100 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlen));
4101 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cipher_data));
4102 0 : if (_ptr_cipher_data) {
4103 0 : NDR_PULL_ALLOC(ndr, r->cipher_data);
4104 : } else {
4105 0 : r->cipher_data = NULL;
4106 : }
4107 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4108 : }
4109 0 : if (ndr_flags & NDR_BUFFERS) {
4110 0 : if (r->cipher_data) {
4111 0 : _mem_save_cipher_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
4112 0 : NDR_PULL_SET_MEM_CTX(ndr, r->cipher_data, 0);
4113 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->cipher_data));
4114 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->cipher_data));
4115 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cipher_data, &size_cipher_data_1));
4116 0 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->cipher_data, &length_cipher_data_1));
4117 0 : if (length_cipher_data_1 > size_cipher_data_1) {
4118 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_cipher_data_1, length_cipher_data_1);
4119 : }
4120 0 : NDR_PULL_ALLOC_N(ndr, r->cipher_data, size_cipher_data_1);
4121 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->cipher_data, length_cipher_data_1));
4122 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cipher_data_0, 0);
4123 : }
4124 0 : if (r->cipher_data) {
4125 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cipher_data, r->maxlen));
4126 : }
4127 0 : if (r->cipher_data) {
4128 0 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->cipher_data, r->len));
4129 : }
4130 : }
4131 0 : return NDR_ERR_SUCCESS;
4132 : }
4133 :
4134 0 : _PUBLIC_ void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *name, const struct netr_CIPHER_VALUE *r)
4135 : {
4136 0 : ndr_print_struct(ndr, name, "netr_CIPHER_VALUE");
4137 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4138 0 : ndr->depth++;
4139 0 : ndr_print_uint32(ndr, "len", r->len);
4140 0 : ndr_print_uint32(ndr, "maxlen", r->maxlen);
4141 0 : ndr_print_ptr(ndr, "cipher_data", r->cipher_data);
4142 0 : ndr->depth++;
4143 0 : if (r->cipher_data) {
4144 0 : ndr_print_array_uint8(ndr, "cipher_data", r->cipher_data, r->len);
4145 : }
4146 0 : ndr->depth--;
4147 0 : ndr->depth--;
4148 : }
4149 :
4150 0 : static enum ndr_err_code ndr_push_netr_DELTA_SECRET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_SECRET *r)
4151 : {
4152 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4153 0 : if (ndr_flags & NDR_SCALARS) {
4154 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4155 0 : NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
4156 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->current_cipher_set_time));
4157 0 : NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
4158 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->old_cipher_set_time));
4159 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
4160 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
4161 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
4162 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
4163 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
4164 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
4165 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
4166 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
4167 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
4168 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
4169 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4170 : }
4171 0 : if (ndr_flags & NDR_BUFFERS) {
4172 0 : NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
4173 0 : NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
4174 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
4175 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
4176 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
4177 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
4178 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
4179 : }
4180 0 : return NDR_ERR_SUCCESS;
4181 : }
4182 :
4183 0 : static enum ndr_err_code ndr_pull_netr_DELTA_SECRET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_SECRET *r)
4184 : {
4185 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4186 0 : if (ndr_flags & NDR_SCALARS) {
4187 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4188 0 : NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
4189 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->current_cipher_set_time));
4190 0 : NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
4191 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->old_cipher_set_time));
4192 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
4193 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
4194 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
4195 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
4196 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
4197 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
4198 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
4199 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
4200 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
4201 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
4202 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4203 : }
4204 0 : if (ndr_flags & NDR_BUFFERS) {
4205 0 : NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
4206 0 : NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
4207 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
4208 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
4209 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
4210 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
4211 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
4212 : }
4213 0 : return NDR_ERR_SUCCESS;
4214 : }
4215 :
4216 0 : _PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_SECRET *r)
4217 : {
4218 0 : ndr_print_struct(ndr, name, "netr_DELTA_SECRET");
4219 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4220 0 : ndr->depth++;
4221 0 : ndr_print_netr_CIPHER_VALUE(ndr, "current_cipher", &r->current_cipher);
4222 0 : ndr_print_NTTIME(ndr, "current_cipher_set_time", r->current_cipher_set_time);
4223 0 : ndr_print_netr_CIPHER_VALUE(ndr, "old_cipher", &r->old_cipher);
4224 0 : ndr_print_NTTIME(ndr, "old_cipher_set_time", r->old_cipher_set_time);
4225 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
4226 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
4227 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
4228 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
4229 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
4230 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
4231 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
4232 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
4233 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
4234 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
4235 0 : ndr->depth--;
4236 : }
4237 :
4238 0 : static enum ndr_err_code ndr_push_netr_DeltaEnum(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_DeltaEnum r)
4239 : {
4240 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
4241 0 : return NDR_ERR_SUCCESS;
4242 : }
4243 :
4244 0 : static enum ndr_err_code ndr_pull_netr_DeltaEnum(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_DeltaEnum *r)
4245 : {
4246 0 : uint16_t v;
4247 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
4248 0 : *r = v;
4249 0 : return NDR_ERR_SUCCESS;
4250 : }
4251 :
4252 0 : _PUBLIC_ void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum r)
4253 : {
4254 0 : const char *val = NULL;
4255 :
4256 0 : switch (r) {
4257 0 : case NETR_DELTA_DOMAIN: val = "NETR_DELTA_DOMAIN"; break;
4258 0 : case NETR_DELTA_GROUP: val = "NETR_DELTA_GROUP"; break;
4259 0 : case NETR_DELTA_DELETE_GROUP: val = "NETR_DELTA_DELETE_GROUP"; break;
4260 0 : case NETR_DELTA_RENAME_GROUP: val = "NETR_DELTA_RENAME_GROUP"; break;
4261 0 : case NETR_DELTA_USER: val = "NETR_DELTA_USER"; break;
4262 0 : case NETR_DELTA_DELETE_USER: val = "NETR_DELTA_DELETE_USER"; break;
4263 0 : case NETR_DELTA_RENAME_USER: val = "NETR_DELTA_RENAME_USER"; break;
4264 0 : case NETR_DELTA_GROUP_MEMBER: val = "NETR_DELTA_GROUP_MEMBER"; break;
4265 0 : case NETR_DELTA_ALIAS: val = "NETR_DELTA_ALIAS"; break;
4266 0 : case NETR_DELTA_DELETE_ALIAS: val = "NETR_DELTA_DELETE_ALIAS"; break;
4267 0 : case NETR_DELTA_RENAME_ALIAS: val = "NETR_DELTA_RENAME_ALIAS"; break;
4268 0 : case NETR_DELTA_ALIAS_MEMBER: val = "NETR_DELTA_ALIAS_MEMBER"; break;
4269 0 : case NETR_DELTA_POLICY: val = "NETR_DELTA_POLICY"; break;
4270 0 : case NETR_DELTA_TRUSTED_DOMAIN: val = "NETR_DELTA_TRUSTED_DOMAIN"; break;
4271 0 : case NETR_DELTA_DELETE_TRUST: val = "NETR_DELTA_DELETE_TRUST"; break;
4272 0 : case NETR_DELTA_ACCOUNT: val = "NETR_DELTA_ACCOUNT"; break;
4273 0 : case NETR_DELTA_DELETE_ACCOUNT: val = "NETR_DELTA_DELETE_ACCOUNT"; break;
4274 0 : case NETR_DELTA_SECRET: val = "NETR_DELTA_SECRET"; break;
4275 0 : case NETR_DELTA_DELETE_SECRET: val = "NETR_DELTA_DELETE_SECRET"; break;
4276 0 : case NETR_DELTA_DELETE_GROUP2: val = "NETR_DELTA_DELETE_GROUP2"; break;
4277 0 : case NETR_DELTA_DELETE_USER2: val = "NETR_DELTA_DELETE_USER2"; break;
4278 0 : case NETR_DELTA_MODIFY_COUNT: val = "NETR_DELTA_MODIFY_COUNT"; break;
4279 : }
4280 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
4281 0 : }
4282 :
4283 0 : static enum ndr_err_code ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_DELTA_UNION *r)
4284 : {
4285 0 : uint32_t level;
4286 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4287 0 : if (ndr_flags & NDR_SCALARS) {
4288 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4289 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4290 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4291 0 : NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
4292 : /* ms_union is always aligned to the largest union arm*/
4293 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4294 0 : switch (level) {
4295 0 : case NETR_DELTA_DOMAIN: {
4296 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
4297 0 : break; }
4298 :
4299 0 : case NETR_DELTA_GROUP: {
4300 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->group));
4301 0 : break; }
4302 :
4303 0 : case NETR_DELTA_DELETE_GROUP: {
4304 0 : break; }
4305 :
4306 0 : case NETR_DELTA_RENAME_GROUP: {
4307 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_group));
4308 0 : break; }
4309 :
4310 0 : case NETR_DELTA_USER: {
4311 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
4312 0 : break; }
4313 :
4314 0 : case NETR_DELTA_DELETE_USER: {
4315 0 : break; }
4316 :
4317 0 : case NETR_DELTA_RENAME_USER: {
4318 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_user));
4319 0 : break; }
4320 :
4321 0 : case NETR_DELTA_GROUP_MEMBER: {
4322 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_member));
4323 0 : break; }
4324 :
4325 0 : case NETR_DELTA_ALIAS: {
4326 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias));
4327 0 : break; }
4328 :
4329 0 : case NETR_DELTA_DELETE_ALIAS: {
4330 0 : break; }
4331 :
4332 0 : case NETR_DELTA_RENAME_ALIAS: {
4333 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_alias));
4334 0 : break; }
4335 :
4336 0 : case NETR_DELTA_ALIAS_MEMBER: {
4337 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias_member));
4338 0 : break; }
4339 :
4340 0 : case NETR_DELTA_POLICY: {
4341 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
4342 0 : break; }
4343 :
4344 0 : case NETR_DELTA_TRUSTED_DOMAIN: {
4345 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain));
4346 0 : break; }
4347 :
4348 0 : case NETR_DELTA_DELETE_TRUST: {
4349 0 : break; }
4350 :
4351 0 : case NETR_DELTA_ACCOUNT: {
4352 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->account));
4353 0 : break; }
4354 :
4355 0 : case NETR_DELTA_DELETE_ACCOUNT: {
4356 0 : break; }
4357 :
4358 0 : case NETR_DELTA_SECRET: {
4359 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->secret));
4360 0 : break; }
4361 :
4362 0 : case NETR_DELTA_DELETE_SECRET: {
4363 0 : break; }
4364 :
4365 0 : case NETR_DELTA_DELETE_GROUP2: {
4366 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_group));
4367 0 : break; }
4368 :
4369 0 : case NETR_DELTA_DELETE_USER2: {
4370 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_user));
4371 0 : break; }
4372 :
4373 0 : case NETR_DELTA_MODIFY_COUNT: {
4374 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->modified_count));
4375 0 : break; }
4376 :
4377 0 : default: {
4378 0 : break; }
4379 :
4380 : }
4381 : }
4382 0 : if (ndr_flags & NDR_BUFFERS) {
4383 0 : if (!(ndr_flags & NDR_SCALARS)) {
4384 : /* We didn't get it above, and the token is not needed after this. */
4385 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4386 : }
4387 0 : switch (level) {
4388 0 : case NETR_DELTA_DOMAIN:
4389 0 : if (r->domain) {
4390 0 : NDR_CHECK(ndr_push_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
4391 : }
4392 0 : break;
4393 :
4394 0 : case NETR_DELTA_GROUP:
4395 0 : if (r->group) {
4396 0 : NDR_CHECK(ndr_push_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
4397 : }
4398 0 : break;
4399 :
4400 0 : case NETR_DELTA_DELETE_GROUP:
4401 0 : break;
4402 :
4403 0 : case NETR_DELTA_RENAME_GROUP:
4404 0 : if (r->rename_group) {
4405 0 : NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
4406 : }
4407 0 : break;
4408 :
4409 0 : case NETR_DELTA_USER:
4410 0 : if (r->user) {
4411 0 : NDR_CHECK(ndr_push_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
4412 : }
4413 0 : break;
4414 :
4415 0 : case NETR_DELTA_DELETE_USER:
4416 0 : break;
4417 :
4418 0 : case NETR_DELTA_RENAME_USER:
4419 0 : if (r->rename_user) {
4420 0 : NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
4421 : }
4422 0 : break;
4423 :
4424 0 : case NETR_DELTA_GROUP_MEMBER:
4425 0 : if (r->group_member) {
4426 0 : NDR_CHECK(ndr_push_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
4427 : }
4428 0 : break;
4429 :
4430 0 : case NETR_DELTA_ALIAS:
4431 0 : if (r->alias) {
4432 0 : NDR_CHECK(ndr_push_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
4433 : }
4434 0 : break;
4435 :
4436 0 : case NETR_DELTA_DELETE_ALIAS:
4437 0 : break;
4438 :
4439 0 : case NETR_DELTA_RENAME_ALIAS:
4440 0 : if (r->rename_alias) {
4441 0 : NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
4442 : }
4443 0 : break;
4444 :
4445 0 : case NETR_DELTA_ALIAS_MEMBER:
4446 0 : if (r->alias_member) {
4447 0 : NDR_CHECK(ndr_push_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
4448 : }
4449 0 : break;
4450 :
4451 0 : case NETR_DELTA_POLICY:
4452 0 : if (r->policy) {
4453 0 : NDR_CHECK(ndr_push_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
4454 : }
4455 0 : break;
4456 :
4457 0 : case NETR_DELTA_TRUSTED_DOMAIN:
4458 0 : if (r->trusted_domain) {
4459 0 : NDR_CHECK(ndr_push_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
4460 : }
4461 0 : break;
4462 :
4463 0 : case NETR_DELTA_DELETE_TRUST:
4464 0 : break;
4465 :
4466 0 : case NETR_DELTA_ACCOUNT:
4467 0 : if (r->account) {
4468 0 : NDR_CHECK(ndr_push_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
4469 : }
4470 0 : break;
4471 :
4472 0 : case NETR_DELTA_DELETE_ACCOUNT:
4473 0 : break;
4474 :
4475 0 : case NETR_DELTA_SECRET:
4476 0 : if (r->secret) {
4477 0 : NDR_CHECK(ndr_push_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
4478 : }
4479 0 : break;
4480 :
4481 0 : case NETR_DELTA_DELETE_SECRET:
4482 0 : break;
4483 :
4484 0 : case NETR_DELTA_DELETE_GROUP2:
4485 0 : if (r->delete_group) {
4486 0 : NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
4487 : }
4488 0 : break;
4489 :
4490 0 : case NETR_DELTA_DELETE_USER2:
4491 0 : if (r->delete_user) {
4492 0 : NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
4493 : }
4494 0 : break;
4495 :
4496 0 : case NETR_DELTA_MODIFY_COUNT:
4497 0 : if (r->modified_count) {
4498 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->modified_count));
4499 : }
4500 0 : break;
4501 :
4502 0 : default:
4503 0 : break;
4504 :
4505 : }
4506 : }
4507 0 : return NDR_ERR_SUCCESS;
4508 : }
4509 :
4510 0 : static enum ndr_err_code ndr_pull_netr_DELTA_UNION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_DELTA_UNION *r)
4511 : {
4512 0 : uint32_t level;
4513 0 : uint16_t _level;
4514 0 : TALLOC_CTX *_mem_save_domain_0 = NULL;
4515 0 : uint32_t _ptr_domain;
4516 0 : TALLOC_CTX *_mem_save_group_0 = NULL;
4517 0 : uint32_t _ptr_group;
4518 0 : TALLOC_CTX *_mem_save_rename_group_0 = NULL;
4519 0 : uint32_t _ptr_rename_group;
4520 0 : TALLOC_CTX *_mem_save_user_0 = NULL;
4521 0 : uint32_t _ptr_user;
4522 0 : TALLOC_CTX *_mem_save_rename_user_0 = NULL;
4523 0 : uint32_t _ptr_rename_user;
4524 0 : TALLOC_CTX *_mem_save_group_member_0 = NULL;
4525 0 : uint32_t _ptr_group_member;
4526 0 : TALLOC_CTX *_mem_save_alias_0 = NULL;
4527 0 : uint32_t _ptr_alias;
4528 0 : TALLOC_CTX *_mem_save_rename_alias_0 = NULL;
4529 0 : uint32_t _ptr_rename_alias;
4530 0 : TALLOC_CTX *_mem_save_alias_member_0 = NULL;
4531 0 : uint32_t _ptr_alias_member;
4532 0 : TALLOC_CTX *_mem_save_policy_0 = NULL;
4533 0 : uint32_t _ptr_policy;
4534 0 : TALLOC_CTX *_mem_save_trusted_domain_0 = NULL;
4535 0 : uint32_t _ptr_trusted_domain;
4536 0 : TALLOC_CTX *_mem_save_account_0 = NULL;
4537 0 : uint32_t _ptr_account;
4538 0 : TALLOC_CTX *_mem_save_secret_0 = NULL;
4539 0 : uint32_t _ptr_secret;
4540 0 : TALLOC_CTX *_mem_save_delete_group_0 = NULL;
4541 0 : uint32_t _ptr_delete_group;
4542 0 : TALLOC_CTX *_mem_save_delete_user_0 = NULL;
4543 0 : uint32_t _ptr_delete_user;
4544 0 : TALLOC_CTX *_mem_save_modified_count_0 = NULL;
4545 0 : uint32_t _ptr_modified_count;
4546 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4547 0 : if (ndr_flags & NDR_SCALARS) {
4548 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4549 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4550 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4551 0 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
4552 0 : if (_level != level) {
4553 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
4554 : }
4555 : /* ms_union is always aligned to the largest union arm*/
4556 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4557 0 : switch (level) {
4558 0 : case NETR_DELTA_DOMAIN: {
4559 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
4560 0 : if (_ptr_domain) {
4561 0 : NDR_PULL_ALLOC(ndr, r->domain);
4562 : } else {
4563 0 : r->domain = NULL;
4564 : }
4565 0 : break; }
4566 :
4567 0 : case NETR_DELTA_GROUP: {
4568 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group));
4569 0 : if (_ptr_group) {
4570 0 : NDR_PULL_ALLOC(ndr, r->group);
4571 : } else {
4572 0 : r->group = NULL;
4573 : }
4574 0 : break; }
4575 :
4576 0 : case NETR_DELTA_DELETE_GROUP: {
4577 0 : break; }
4578 :
4579 0 : case NETR_DELTA_RENAME_GROUP: {
4580 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_group));
4581 0 : if (_ptr_rename_group) {
4582 0 : NDR_PULL_ALLOC(ndr, r->rename_group);
4583 : } else {
4584 0 : r->rename_group = NULL;
4585 : }
4586 0 : break; }
4587 :
4588 0 : case NETR_DELTA_USER: {
4589 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
4590 0 : if (_ptr_user) {
4591 0 : NDR_PULL_ALLOC(ndr, r->user);
4592 : } else {
4593 0 : r->user = NULL;
4594 : }
4595 0 : break; }
4596 :
4597 0 : case NETR_DELTA_DELETE_USER: {
4598 0 : break; }
4599 :
4600 0 : case NETR_DELTA_RENAME_USER: {
4601 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_user));
4602 0 : if (_ptr_rename_user) {
4603 0 : NDR_PULL_ALLOC(ndr, r->rename_user);
4604 : } else {
4605 0 : r->rename_user = NULL;
4606 : }
4607 0 : break; }
4608 :
4609 0 : case NETR_DELTA_GROUP_MEMBER: {
4610 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_member));
4611 0 : if (_ptr_group_member) {
4612 0 : NDR_PULL_ALLOC(ndr, r->group_member);
4613 : } else {
4614 0 : r->group_member = NULL;
4615 : }
4616 0 : break; }
4617 :
4618 0 : case NETR_DELTA_ALIAS: {
4619 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias));
4620 0 : if (_ptr_alias) {
4621 0 : NDR_PULL_ALLOC(ndr, r->alias);
4622 : } else {
4623 0 : r->alias = NULL;
4624 : }
4625 0 : break; }
4626 :
4627 0 : case NETR_DELTA_DELETE_ALIAS: {
4628 0 : break; }
4629 :
4630 0 : case NETR_DELTA_RENAME_ALIAS: {
4631 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_alias));
4632 0 : if (_ptr_rename_alias) {
4633 0 : NDR_PULL_ALLOC(ndr, r->rename_alias);
4634 : } else {
4635 0 : r->rename_alias = NULL;
4636 : }
4637 0 : break; }
4638 :
4639 0 : case NETR_DELTA_ALIAS_MEMBER: {
4640 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias_member));
4641 0 : if (_ptr_alias_member) {
4642 0 : NDR_PULL_ALLOC(ndr, r->alias_member);
4643 : } else {
4644 0 : r->alias_member = NULL;
4645 : }
4646 0 : break; }
4647 :
4648 0 : case NETR_DELTA_POLICY: {
4649 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
4650 0 : if (_ptr_policy) {
4651 0 : NDR_PULL_ALLOC(ndr, r->policy);
4652 : } else {
4653 0 : r->policy = NULL;
4654 : }
4655 0 : break; }
4656 :
4657 0 : case NETR_DELTA_TRUSTED_DOMAIN: {
4658 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain));
4659 0 : if (_ptr_trusted_domain) {
4660 0 : NDR_PULL_ALLOC(ndr, r->trusted_domain);
4661 : } else {
4662 0 : r->trusted_domain = NULL;
4663 : }
4664 0 : break; }
4665 :
4666 0 : case NETR_DELTA_DELETE_TRUST: {
4667 0 : break; }
4668 :
4669 0 : case NETR_DELTA_ACCOUNT: {
4670 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account));
4671 0 : if (_ptr_account) {
4672 0 : NDR_PULL_ALLOC(ndr, r->account);
4673 : } else {
4674 0 : r->account = NULL;
4675 : }
4676 0 : break; }
4677 :
4678 0 : case NETR_DELTA_DELETE_ACCOUNT: {
4679 0 : break; }
4680 :
4681 0 : case NETR_DELTA_SECRET: {
4682 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secret));
4683 0 : if (_ptr_secret) {
4684 0 : NDR_PULL_ALLOC(ndr, r->secret);
4685 : } else {
4686 0 : r->secret = NULL;
4687 : }
4688 0 : break; }
4689 :
4690 0 : case NETR_DELTA_DELETE_SECRET: {
4691 0 : break; }
4692 :
4693 0 : case NETR_DELTA_DELETE_GROUP2: {
4694 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_group));
4695 0 : if (_ptr_delete_group) {
4696 0 : NDR_PULL_ALLOC(ndr, r->delete_group);
4697 : } else {
4698 0 : r->delete_group = NULL;
4699 : }
4700 0 : break; }
4701 :
4702 0 : case NETR_DELTA_DELETE_USER2: {
4703 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_user));
4704 0 : if (_ptr_delete_user) {
4705 0 : NDR_PULL_ALLOC(ndr, r->delete_user);
4706 : } else {
4707 0 : r->delete_user = NULL;
4708 : }
4709 0 : break; }
4710 :
4711 0 : case NETR_DELTA_MODIFY_COUNT: {
4712 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_modified_count));
4713 0 : if (_ptr_modified_count) {
4714 0 : NDR_PULL_ALLOC(ndr, r->modified_count);
4715 : } else {
4716 0 : r->modified_count = NULL;
4717 : }
4718 0 : break; }
4719 :
4720 0 : default: {
4721 0 : break; }
4722 :
4723 : }
4724 : }
4725 0 : if (ndr_flags & NDR_BUFFERS) {
4726 0 : if (!(ndr_flags & NDR_SCALARS)) {
4727 : /* We didn't get it above, and the token is not needed after this. */
4728 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4729 : }
4730 0 : switch (level) {
4731 0 : case NETR_DELTA_DOMAIN:
4732 0 : if (r->domain) {
4733 0 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
4734 0 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
4735 0 : NDR_CHECK(ndr_pull_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
4736 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
4737 : }
4738 0 : break;
4739 :
4740 0 : case NETR_DELTA_GROUP:
4741 0 : if (r->group) {
4742 0 : _mem_save_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4743 0 : NDR_PULL_SET_MEM_CTX(ndr, r->group, 0);
4744 0 : NDR_CHECK(ndr_pull_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
4745 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_0, 0);
4746 : }
4747 0 : break;
4748 :
4749 0 : case NETR_DELTA_DELETE_GROUP:
4750 0 : break;
4751 :
4752 0 : case NETR_DELTA_RENAME_GROUP:
4753 0 : if (r->rename_group) {
4754 0 : _mem_save_rename_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4755 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rename_group, 0);
4756 0 : NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
4757 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_group_0, 0);
4758 : }
4759 0 : break;
4760 :
4761 0 : case NETR_DELTA_USER:
4762 0 : if (r->user) {
4763 0 : _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
4764 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
4765 0 : NDR_CHECK(ndr_pull_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
4766 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
4767 : }
4768 0 : break;
4769 :
4770 0 : case NETR_DELTA_DELETE_USER:
4771 0 : break;
4772 :
4773 0 : case NETR_DELTA_RENAME_USER:
4774 0 : if (r->rename_user) {
4775 0 : _mem_save_rename_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
4776 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rename_user, 0);
4777 0 : NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
4778 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_user_0, 0);
4779 : }
4780 0 : break;
4781 :
4782 0 : case NETR_DELTA_GROUP_MEMBER:
4783 0 : if (r->group_member) {
4784 0 : _mem_save_group_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
4785 0 : NDR_PULL_SET_MEM_CTX(ndr, r->group_member, 0);
4786 0 : NDR_CHECK(ndr_pull_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
4787 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_member_0, 0);
4788 : }
4789 0 : break;
4790 :
4791 0 : case NETR_DELTA_ALIAS:
4792 0 : if (r->alias) {
4793 0 : _mem_save_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
4794 0 : NDR_PULL_SET_MEM_CTX(ndr, r->alias, 0);
4795 0 : NDR_CHECK(ndr_pull_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
4796 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_0, 0);
4797 : }
4798 0 : break;
4799 :
4800 0 : case NETR_DELTA_DELETE_ALIAS:
4801 0 : break;
4802 :
4803 0 : case NETR_DELTA_RENAME_ALIAS:
4804 0 : if (r->rename_alias) {
4805 0 : _mem_save_rename_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
4806 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rename_alias, 0);
4807 0 : NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
4808 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_alias_0, 0);
4809 : }
4810 0 : break;
4811 :
4812 0 : case NETR_DELTA_ALIAS_MEMBER:
4813 0 : if (r->alias_member) {
4814 0 : _mem_save_alias_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
4815 0 : NDR_PULL_SET_MEM_CTX(ndr, r->alias_member, 0);
4816 0 : NDR_CHECK(ndr_pull_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
4817 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_member_0, 0);
4818 : }
4819 0 : break;
4820 :
4821 0 : case NETR_DELTA_POLICY:
4822 0 : if (r->policy) {
4823 0 : _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr);
4824 0 : NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0);
4825 0 : NDR_CHECK(ndr_pull_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
4826 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
4827 : }
4828 0 : break;
4829 :
4830 0 : case NETR_DELTA_TRUSTED_DOMAIN:
4831 0 : if (r->trusted_domain) {
4832 0 : _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
4833 0 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domain, 0);
4834 0 : NDR_CHECK(ndr_pull_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
4835 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, 0);
4836 : }
4837 0 : break;
4838 :
4839 0 : case NETR_DELTA_DELETE_TRUST:
4840 0 : break;
4841 :
4842 0 : case NETR_DELTA_ACCOUNT:
4843 0 : if (r->account) {
4844 0 : _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
4845 0 : NDR_PULL_SET_MEM_CTX(ndr, r->account, 0);
4846 0 : NDR_CHECK(ndr_pull_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
4847 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, 0);
4848 : }
4849 0 : break;
4850 :
4851 0 : case NETR_DELTA_DELETE_ACCOUNT:
4852 0 : break;
4853 :
4854 0 : case NETR_DELTA_SECRET:
4855 0 : if (r->secret) {
4856 0 : _mem_save_secret_0 = NDR_PULL_GET_MEM_CTX(ndr);
4857 0 : NDR_PULL_SET_MEM_CTX(ndr, r->secret, 0);
4858 0 : NDR_CHECK(ndr_pull_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
4859 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secret_0, 0);
4860 : }
4861 0 : break;
4862 :
4863 0 : case NETR_DELTA_DELETE_SECRET:
4864 0 : break;
4865 :
4866 0 : case NETR_DELTA_DELETE_GROUP2:
4867 0 : if (r->delete_group) {
4868 0 : _mem_save_delete_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4869 0 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_group, 0);
4870 0 : NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
4871 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_group_0, 0);
4872 : }
4873 0 : break;
4874 :
4875 0 : case NETR_DELTA_DELETE_USER2:
4876 0 : if (r->delete_user) {
4877 0 : _mem_save_delete_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
4878 0 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_user, 0);
4879 0 : NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
4880 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_user_0, 0);
4881 : }
4882 0 : break;
4883 :
4884 0 : case NETR_DELTA_MODIFY_COUNT:
4885 0 : if (r->modified_count) {
4886 0 : _mem_save_modified_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
4887 0 : NDR_PULL_SET_MEM_CTX(ndr, r->modified_count, 0);
4888 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->modified_count));
4889 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_modified_count_0, 0);
4890 : }
4891 0 : break;
4892 :
4893 0 : default:
4894 0 : break;
4895 :
4896 : }
4897 : }
4898 0 : return NDR_ERR_SUCCESS;
4899 : }
4900 :
4901 0 : _PUBLIC_ void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_UNION *r)
4902 : {
4903 0 : uint32_t level;
4904 0 : level = ndr_print_steal_switch_value(ndr, r);
4905 0 : ndr_print_union(ndr, name, level, "netr_DELTA_UNION");
4906 0 : switch (level) {
4907 0 : case NETR_DELTA_DOMAIN:
4908 0 : ndr_print_ptr(ndr, "domain", r->domain);
4909 0 : ndr->depth++;
4910 0 : if (r->domain) {
4911 0 : ndr_print_netr_DELTA_DOMAIN(ndr, "domain", r->domain);
4912 : }
4913 0 : ndr->depth--;
4914 0 : break;
4915 :
4916 0 : case NETR_DELTA_GROUP:
4917 0 : ndr_print_ptr(ndr, "group", r->group);
4918 0 : ndr->depth++;
4919 0 : if (r->group) {
4920 0 : ndr_print_netr_DELTA_GROUP(ndr, "group", r->group);
4921 : }
4922 0 : ndr->depth--;
4923 0 : break;
4924 :
4925 0 : case NETR_DELTA_DELETE_GROUP:
4926 0 : break;
4927 :
4928 0 : case NETR_DELTA_RENAME_GROUP:
4929 0 : ndr_print_ptr(ndr, "rename_group", r->rename_group);
4930 0 : ndr->depth++;
4931 0 : if (r->rename_group) {
4932 0 : ndr_print_netr_DELTA_RENAME(ndr, "rename_group", r->rename_group);
4933 : }
4934 0 : ndr->depth--;
4935 0 : break;
4936 :
4937 0 : case NETR_DELTA_USER:
4938 0 : ndr_print_ptr(ndr, "user", r->user);
4939 0 : ndr->depth++;
4940 0 : if (r->user) {
4941 0 : ndr_print_netr_DELTA_USER(ndr, "user", r->user);
4942 : }
4943 0 : ndr->depth--;
4944 0 : break;
4945 :
4946 0 : case NETR_DELTA_DELETE_USER:
4947 0 : break;
4948 :
4949 0 : case NETR_DELTA_RENAME_USER:
4950 0 : ndr_print_ptr(ndr, "rename_user", r->rename_user);
4951 0 : ndr->depth++;
4952 0 : if (r->rename_user) {
4953 0 : ndr_print_netr_DELTA_RENAME(ndr, "rename_user", r->rename_user);
4954 : }
4955 0 : ndr->depth--;
4956 0 : break;
4957 :
4958 0 : case NETR_DELTA_GROUP_MEMBER:
4959 0 : ndr_print_ptr(ndr, "group_member", r->group_member);
4960 0 : ndr->depth++;
4961 0 : if (r->group_member) {
4962 0 : ndr_print_netr_DELTA_GROUP_MEMBER(ndr, "group_member", r->group_member);
4963 : }
4964 0 : ndr->depth--;
4965 0 : break;
4966 :
4967 0 : case NETR_DELTA_ALIAS:
4968 0 : ndr_print_ptr(ndr, "alias", r->alias);
4969 0 : ndr->depth++;
4970 0 : if (r->alias) {
4971 0 : ndr_print_netr_DELTA_ALIAS(ndr, "alias", r->alias);
4972 : }
4973 0 : ndr->depth--;
4974 0 : break;
4975 :
4976 0 : case NETR_DELTA_DELETE_ALIAS:
4977 0 : break;
4978 :
4979 0 : case NETR_DELTA_RENAME_ALIAS:
4980 0 : ndr_print_ptr(ndr, "rename_alias", r->rename_alias);
4981 0 : ndr->depth++;
4982 0 : if (r->rename_alias) {
4983 0 : ndr_print_netr_DELTA_RENAME(ndr, "rename_alias", r->rename_alias);
4984 : }
4985 0 : ndr->depth--;
4986 0 : break;
4987 :
4988 0 : case NETR_DELTA_ALIAS_MEMBER:
4989 0 : ndr_print_ptr(ndr, "alias_member", r->alias_member);
4990 0 : ndr->depth++;
4991 0 : if (r->alias_member) {
4992 0 : ndr_print_netr_DELTA_ALIAS_MEMBER(ndr, "alias_member", r->alias_member);
4993 : }
4994 0 : ndr->depth--;
4995 0 : break;
4996 :
4997 0 : case NETR_DELTA_POLICY:
4998 0 : ndr_print_ptr(ndr, "policy", r->policy);
4999 0 : ndr->depth++;
5000 0 : if (r->policy) {
5001 0 : ndr_print_netr_DELTA_POLICY(ndr, "policy", r->policy);
5002 : }
5003 0 : ndr->depth--;
5004 0 : break;
5005 :
5006 0 : case NETR_DELTA_TRUSTED_DOMAIN:
5007 0 : ndr_print_ptr(ndr, "trusted_domain", r->trusted_domain);
5008 0 : ndr->depth++;
5009 0 : if (r->trusted_domain) {
5010 0 : ndr_print_netr_DELTA_TRUSTED_DOMAIN(ndr, "trusted_domain", r->trusted_domain);
5011 : }
5012 0 : ndr->depth--;
5013 0 : break;
5014 :
5015 0 : case NETR_DELTA_DELETE_TRUST:
5016 0 : break;
5017 :
5018 0 : case NETR_DELTA_ACCOUNT:
5019 0 : ndr_print_ptr(ndr, "account", r->account);
5020 0 : ndr->depth++;
5021 0 : if (r->account) {
5022 0 : ndr_print_netr_DELTA_ACCOUNT(ndr, "account", r->account);
5023 : }
5024 0 : ndr->depth--;
5025 0 : break;
5026 :
5027 0 : case NETR_DELTA_DELETE_ACCOUNT:
5028 0 : break;
5029 :
5030 0 : case NETR_DELTA_SECRET:
5031 0 : ndr_print_ptr(ndr, "secret", r->secret);
5032 0 : ndr->depth++;
5033 0 : if (r->secret) {
5034 0 : ndr_print_netr_DELTA_SECRET(ndr, "secret", r->secret);
5035 : }
5036 0 : ndr->depth--;
5037 0 : break;
5038 :
5039 0 : case NETR_DELTA_DELETE_SECRET:
5040 0 : break;
5041 :
5042 0 : case NETR_DELTA_DELETE_GROUP2:
5043 0 : ndr_print_ptr(ndr, "delete_group", r->delete_group);
5044 0 : ndr->depth++;
5045 0 : if (r->delete_group) {
5046 0 : ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_group", r->delete_group);
5047 : }
5048 0 : ndr->depth--;
5049 0 : break;
5050 :
5051 0 : case NETR_DELTA_DELETE_USER2:
5052 0 : ndr_print_ptr(ndr, "delete_user", r->delete_user);
5053 0 : ndr->depth++;
5054 0 : if (r->delete_user) {
5055 0 : ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_user", r->delete_user);
5056 : }
5057 0 : ndr->depth--;
5058 0 : break;
5059 :
5060 0 : case NETR_DELTA_MODIFY_COUNT:
5061 0 : ndr_print_ptr(ndr, "modified_count", r->modified_count);
5062 0 : ndr->depth++;
5063 0 : if (r->modified_count) {
5064 0 : ndr_print_udlong(ndr, "modified_count", *r->modified_count);
5065 : }
5066 0 : ndr->depth--;
5067 0 : break;
5068 :
5069 0 : default:
5070 0 : break;
5071 :
5072 : }
5073 0 : }
5074 :
5075 0 : static enum ndr_err_code ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_DELTA_ID_UNION *r)
5076 : {
5077 0 : uint32_t level;
5078 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5079 0 : if (ndr_flags & NDR_SCALARS) {
5080 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5081 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5082 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5083 0 : NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
5084 : /* ms_union is always aligned to the largest union arm*/
5085 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5086 0 : switch (level) {
5087 0 : case NETR_DELTA_DOMAIN: {
5088 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5089 0 : break; }
5090 :
5091 0 : case NETR_DELTA_GROUP: {
5092 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5093 0 : break; }
5094 :
5095 0 : case NETR_DELTA_DELETE_GROUP: {
5096 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5097 0 : break; }
5098 :
5099 0 : case NETR_DELTA_RENAME_GROUP: {
5100 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5101 0 : break; }
5102 :
5103 0 : case NETR_DELTA_USER: {
5104 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5105 0 : break; }
5106 :
5107 0 : case NETR_DELTA_DELETE_USER: {
5108 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5109 0 : break; }
5110 :
5111 0 : case NETR_DELTA_RENAME_USER: {
5112 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5113 0 : break; }
5114 :
5115 0 : case NETR_DELTA_GROUP_MEMBER: {
5116 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5117 0 : break; }
5118 :
5119 0 : case NETR_DELTA_ALIAS: {
5120 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5121 0 : break; }
5122 :
5123 0 : case NETR_DELTA_DELETE_ALIAS: {
5124 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5125 0 : break; }
5126 :
5127 0 : case NETR_DELTA_RENAME_ALIAS: {
5128 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5129 0 : break; }
5130 :
5131 0 : case NETR_DELTA_ALIAS_MEMBER: {
5132 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5133 0 : break; }
5134 :
5135 0 : case NETR_DELTA_POLICY: {
5136 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5137 0 : break; }
5138 :
5139 0 : case NETR_DELTA_TRUSTED_DOMAIN: {
5140 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5141 0 : break; }
5142 :
5143 0 : case NETR_DELTA_DELETE_TRUST: {
5144 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5145 0 : break; }
5146 :
5147 0 : case NETR_DELTA_ACCOUNT: {
5148 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5149 0 : break; }
5150 :
5151 0 : case NETR_DELTA_DELETE_ACCOUNT: {
5152 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5153 0 : break; }
5154 :
5155 0 : case NETR_DELTA_SECRET: {
5156 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
5157 0 : break; }
5158 :
5159 0 : case NETR_DELTA_DELETE_SECRET: {
5160 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
5161 0 : break; }
5162 :
5163 0 : case NETR_DELTA_DELETE_GROUP2: {
5164 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5165 0 : break; }
5166 :
5167 0 : case NETR_DELTA_DELETE_USER2: {
5168 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5169 0 : break; }
5170 :
5171 0 : case NETR_DELTA_MODIFY_COUNT: {
5172 0 : break; }
5173 :
5174 0 : default: {
5175 0 : break; }
5176 :
5177 : }
5178 : }
5179 0 : if (ndr_flags & NDR_BUFFERS) {
5180 0 : if (!(ndr_flags & NDR_SCALARS)) {
5181 : /* We didn't get it above, and the token is not needed after this. */
5182 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5183 : }
5184 0 : switch (level) {
5185 0 : case NETR_DELTA_DOMAIN:
5186 0 : break;
5187 :
5188 0 : case NETR_DELTA_GROUP:
5189 0 : break;
5190 :
5191 0 : case NETR_DELTA_DELETE_GROUP:
5192 0 : break;
5193 :
5194 0 : case NETR_DELTA_RENAME_GROUP:
5195 0 : break;
5196 :
5197 0 : case NETR_DELTA_USER:
5198 0 : break;
5199 :
5200 0 : case NETR_DELTA_DELETE_USER:
5201 0 : break;
5202 :
5203 0 : case NETR_DELTA_RENAME_USER:
5204 0 : break;
5205 :
5206 0 : case NETR_DELTA_GROUP_MEMBER:
5207 0 : break;
5208 :
5209 0 : case NETR_DELTA_ALIAS:
5210 0 : break;
5211 :
5212 0 : case NETR_DELTA_DELETE_ALIAS:
5213 0 : break;
5214 :
5215 0 : case NETR_DELTA_RENAME_ALIAS:
5216 0 : break;
5217 :
5218 0 : case NETR_DELTA_ALIAS_MEMBER:
5219 0 : break;
5220 :
5221 0 : case NETR_DELTA_POLICY:
5222 0 : if (r->sid) {
5223 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5224 : }
5225 0 : break;
5226 :
5227 0 : case NETR_DELTA_TRUSTED_DOMAIN:
5228 0 : if (r->sid) {
5229 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5230 : }
5231 0 : break;
5232 :
5233 0 : case NETR_DELTA_DELETE_TRUST:
5234 0 : if (r->sid) {
5235 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5236 : }
5237 0 : break;
5238 :
5239 0 : case NETR_DELTA_ACCOUNT:
5240 0 : if (r->sid) {
5241 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5242 : }
5243 0 : break;
5244 :
5245 0 : case NETR_DELTA_DELETE_ACCOUNT:
5246 0 : if (r->sid) {
5247 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5248 : }
5249 0 : break;
5250 :
5251 0 : case NETR_DELTA_SECRET:
5252 0 : if (r->name) {
5253 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
5254 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5255 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
5256 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5257 : }
5258 0 : break;
5259 :
5260 0 : case NETR_DELTA_DELETE_SECRET:
5261 0 : if (r->name) {
5262 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
5263 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5264 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
5265 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5266 : }
5267 0 : break;
5268 :
5269 0 : case NETR_DELTA_DELETE_GROUP2:
5270 0 : break;
5271 :
5272 0 : case NETR_DELTA_DELETE_USER2:
5273 0 : break;
5274 :
5275 0 : case NETR_DELTA_MODIFY_COUNT:
5276 0 : break;
5277 :
5278 0 : default:
5279 0 : break;
5280 :
5281 : }
5282 : }
5283 0 : return NDR_ERR_SUCCESS;
5284 : }
5285 :
5286 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ID_UNION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_DELTA_ID_UNION *r)
5287 : {
5288 0 : uint32_t level;
5289 0 : uint16_t _level;
5290 0 : TALLOC_CTX *_mem_save_sid_0 = NULL;
5291 0 : uint32_t _ptr_sid;
5292 0 : TALLOC_CTX *_mem_save_name_0 = NULL;
5293 0 : uint32_t _ptr_name;
5294 0 : uint32_t size_name_1 = 0;
5295 0 : uint32_t length_name_1 = 0;
5296 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5297 0 : if (ndr_flags & NDR_SCALARS) {
5298 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5299 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5300 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5301 0 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
5302 0 : if (_level != level) {
5303 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
5304 : }
5305 : /* ms_union is always aligned to the largest union arm*/
5306 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5307 0 : switch (level) {
5308 0 : case NETR_DELTA_DOMAIN: {
5309 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5310 0 : break; }
5311 :
5312 0 : case NETR_DELTA_GROUP: {
5313 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5314 0 : break; }
5315 :
5316 0 : case NETR_DELTA_DELETE_GROUP: {
5317 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5318 0 : break; }
5319 :
5320 0 : case NETR_DELTA_RENAME_GROUP: {
5321 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5322 0 : break; }
5323 :
5324 0 : case NETR_DELTA_USER: {
5325 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5326 0 : break; }
5327 :
5328 0 : case NETR_DELTA_DELETE_USER: {
5329 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5330 0 : break; }
5331 :
5332 0 : case NETR_DELTA_RENAME_USER: {
5333 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5334 0 : break; }
5335 :
5336 0 : case NETR_DELTA_GROUP_MEMBER: {
5337 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5338 0 : break; }
5339 :
5340 0 : case NETR_DELTA_ALIAS: {
5341 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5342 0 : break; }
5343 :
5344 0 : case NETR_DELTA_DELETE_ALIAS: {
5345 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5346 0 : break; }
5347 :
5348 0 : case NETR_DELTA_RENAME_ALIAS: {
5349 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5350 0 : break; }
5351 :
5352 0 : case NETR_DELTA_ALIAS_MEMBER: {
5353 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5354 0 : break; }
5355 :
5356 0 : case NETR_DELTA_POLICY: {
5357 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5358 0 : if (_ptr_sid) {
5359 0 : NDR_PULL_ALLOC(ndr, r->sid);
5360 : } else {
5361 0 : r->sid = NULL;
5362 : }
5363 0 : break; }
5364 :
5365 0 : case NETR_DELTA_TRUSTED_DOMAIN: {
5366 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5367 0 : if (_ptr_sid) {
5368 0 : NDR_PULL_ALLOC(ndr, r->sid);
5369 : } else {
5370 0 : r->sid = NULL;
5371 : }
5372 0 : break; }
5373 :
5374 0 : case NETR_DELTA_DELETE_TRUST: {
5375 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5376 0 : if (_ptr_sid) {
5377 0 : NDR_PULL_ALLOC(ndr, r->sid);
5378 : } else {
5379 0 : r->sid = NULL;
5380 : }
5381 0 : break; }
5382 :
5383 0 : case NETR_DELTA_ACCOUNT: {
5384 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5385 0 : if (_ptr_sid) {
5386 0 : NDR_PULL_ALLOC(ndr, r->sid);
5387 : } else {
5388 0 : r->sid = NULL;
5389 : }
5390 0 : break; }
5391 :
5392 0 : case NETR_DELTA_DELETE_ACCOUNT: {
5393 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5394 0 : if (_ptr_sid) {
5395 0 : NDR_PULL_ALLOC(ndr, r->sid);
5396 : } else {
5397 0 : r->sid = NULL;
5398 : }
5399 0 : break; }
5400 :
5401 0 : case NETR_DELTA_SECRET: {
5402 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
5403 0 : if (_ptr_name) {
5404 0 : NDR_PULL_ALLOC(ndr, r->name);
5405 : } else {
5406 0 : r->name = NULL;
5407 : }
5408 0 : break; }
5409 :
5410 0 : case NETR_DELTA_DELETE_SECRET: {
5411 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
5412 0 : if (_ptr_name) {
5413 0 : NDR_PULL_ALLOC(ndr, r->name);
5414 : } else {
5415 0 : r->name = NULL;
5416 : }
5417 0 : break; }
5418 :
5419 0 : case NETR_DELTA_DELETE_GROUP2: {
5420 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5421 0 : break; }
5422 :
5423 0 : case NETR_DELTA_DELETE_USER2: {
5424 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5425 0 : break; }
5426 :
5427 0 : case NETR_DELTA_MODIFY_COUNT: {
5428 0 : break; }
5429 :
5430 0 : default: {
5431 0 : break; }
5432 :
5433 : }
5434 : }
5435 0 : if (ndr_flags & NDR_BUFFERS) {
5436 0 : if (!(ndr_flags & NDR_SCALARS)) {
5437 : /* We didn't get it above, and the token is not needed after this. */
5438 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5439 : }
5440 0 : switch (level) {
5441 0 : case NETR_DELTA_DOMAIN:
5442 0 : break;
5443 :
5444 0 : case NETR_DELTA_GROUP:
5445 0 : break;
5446 :
5447 0 : case NETR_DELTA_DELETE_GROUP:
5448 0 : break;
5449 :
5450 0 : case NETR_DELTA_RENAME_GROUP:
5451 0 : break;
5452 :
5453 0 : case NETR_DELTA_USER:
5454 0 : break;
5455 :
5456 0 : case NETR_DELTA_DELETE_USER:
5457 0 : break;
5458 :
5459 0 : case NETR_DELTA_RENAME_USER:
5460 0 : break;
5461 :
5462 0 : case NETR_DELTA_GROUP_MEMBER:
5463 0 : break;
5464 :
5465 0 : case NETR_DELTA_ALIAS:
5466 0 : break;
5467 :
5468 0 : case NETR_DELTA_DELETE_ALIAS:
5469 0 : break;
5470 :
5471 0 : case NETR_DELTA_RENAME_ALIAS:
5472 0 : break;
5473 :
5474 0 : case NETR_DELTA_ALIAS_MEMBER:
5475 0 : break;
5476 :
5477 0 : case NETR_DELTA_POLICY:
5478 0 : if (r->sid) {
5479 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5480 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5481 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5482 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5483 : }
5484 0 : break;
5485 :
5486 0 : case NETR_DELTA_TRUSTED_DOMAIN:
5487 0 : if (r->sid) {
5488 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5489 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5490 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5491 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5492 : }
5493 0 : break;
5494 :
5495 0 : case NETR_DELTA_DELETE_TRUST:
5496 0 : if (r->sid) {
5497 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5498 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5499 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5500 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5501 : }
5502 0 : break;
5503 :
5504 0 : case NETR_DELTA_ACCOUNT:
5505 0 : if (r->sid) {
5506 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5507 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5508 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5509 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5510 : }
5511 0 : break;
5512 :
5513 0 : case NETR_DELTA_DELETE_ACCOUNT:
5514 0 : if (r->sid) {
5515 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5516 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5517 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5518 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5519 : }
5520 0 : break;
5521 :
5522 0 : case NETR_DELTA_SECRET:
5523 0 : if (r->name) {
5524 0 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5525 0 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
5526 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
5527 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
5528 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
5529 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
5530 0 : if (length_name_1 > size_name_1) {
5531 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
5532 : }
5533 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
5534 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
5535 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
5536 : }
5537 0 : break;
5538 :
5539 0 : case NETR_DELTA_DELETE_SECRET:
5540 0 : if (r->name) {
5541 0 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5542 0 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
5543 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
5544 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
5545 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
5546 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
5547 0 : if (length_name_1 > size_name_1) {
5548 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
5549 : }
5550 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
5551 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
5552 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
5553 : }
5554 0 : break;
5555 :
5556 0 : case NETR_DELTA_DELETE_GROUP2:
5557 0 : break;
5558 :
5559 0 : case NETR_DELTA_DELETE_USER2:
5560 0 : break;
5561 :
5562 0 : case NETR_DELTA_MODIFY_COUNT:
5563 0 : break;
5564 :
5565 0 : default:
5566 0 : break;
5567 :
5568 : }
5569 : }
5570 0 : return NDR_ERR_SUCCESS;
5571 : }
5572 :
5573 0 : _PUBLIC_ void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_ID_UNION *r)
5574 : {
5575 0 : uint32_t level;
5576 0 : level = ndr_print_steal_switch_value(ndr, r);
5577 0 : ndr_print_union(ndr, name, level, "netr_DELTA_ID_UNION");
5578 0 : switch (level) {
5579 0 : case NETR_DELTA_DOMAIN:
5580 0 : ndr_print_uint32(ndr, "rid", r->rid);
5581 0 : break;
5582 :
5583 0 : case NETR_DELTA_GROUP:
5584 0 : ndr_print_uint32(ndr, "rid", r->rid);
5585 0 : break;
5586 :
5587 0 : case NETR_DELTA_DELETE_GROUP:
5588 0 : ndr_print_uint32(ndr, "rid", r->rid);
5589 0 : break;
5590 :
5591 0 : case NETR_DELTA_RENAME_GROUP:
5592 0 : ndr_print_uint32(ndr, "rid", r->rid);
5593 0 : break;
5594 :
5595 0 : case NETR_DELTA_USER:
5596 0 : ndr_print_uint32(ndr, "rid", r->rid);
5597 0 : break;
5598 :
5599 0 : case NETR_DELTA_DELETE_USER:
5600 0 : ndr_print_uint32(ndr, "rid", r->rid);
5601 0 : break;
5602 :
5603 0 : case NETR_DELTA_RENAME_USER:
5604 0 : ndr_print_uint32(ndr, "rid", r->rid);
5605 0 : break;
5606 :
5607 0 : case NETR_DELTA_GROUP_MEMBER:
5608 0 : ndr_print_uint32(ndr, "rid", r->rid);
5609 0 : break;
5610 :
5611 0 : case NETR_DELTA_ALIAS:
5612 0 : ndr_print_uint32(ndr, "rid", r->rid);
5613 0 : break;
5614 :
5615 0 : case NETR_DELTA_DELETE_ALIAS:
5616 0 : ndr_print_uint32(ndr, "rid", r->rid);
5617 0 : break;
5618 :
5619 0 : case NETR_DELTA_RENAME_ALIAS:
5620 0 : ndr_print_uint32(ndr, "rid", r->rid);
5621 0 : break;
5622 :
5623 0 : case NETR_DELTA_ALIAS_MEMBER:
5624 0 : ndr_print_uint32(ndr, "rid", r->rid);
5625 0 : break;
5626 :
5627 0 : case NETR_DELTA_POLICY:
5628 0 : ndr_print_ptr(ndr, "sid", r->sid);
5629 0 : ndr->depth++;
5630 0 : if (r->sid) {
5631 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5632 : }
5633 0 : ndr->depth--;
5634 0 : break;
5635 :
5636 0 : case NETR_DELTA_TRUSTED_DOMAIN:
5637 0 : ndr_print_ptr(ndr, "sid", r->sid);
5638 0 : ndr->depth++;
5639 0 : if (r->sid) {
5640 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5641 : }
5642 0 : ndr->depth--;
5643 0 : break;
5644 :
5645 0 : case NETR_DELTA_DELETE_TRUST:
5646 0 : ndr_print_ptr(ndr, "sid", r->sid);
5647 0 : ndr->depth++;
5648 0 : if (r->sid) {
5649 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5650 : }
5651 0 : ndr->depth--;
5652 0 : break;
5653 :
5654 0 : case NETR_DELTA_ACCOUNT:
5655 0 : ndr_print_ptr(ndr, "sid", r->sid);
5656 0 : ndr->depth++;
5657 0 : if (r->sid) {
5658 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5659 : }
5660 0 : ndr->depth--;
5661 0 : break;
5662 :
5663 0 : case NETR_DELTA_DELETE_ACCOUNT:
5664 0 : ndr_print_ptr(ndr, "sid", r->sid);
5665 0 : ndr->depth++;
5666 0 : if (r->sid) {
5667 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5668 : }
5669 0 : ndr->depth--;
5670 0 : break;
5671 :
5672 0 : case NETR_DELTA_SECRET:
5673 0 : ndr_print_ptr(ndr, "name", r->name);
5674 0 : ndr->depth++;
5675 0 : if (r->name) {
5676 0 : ndr_print_string(ndr, "name", r->name);
5677 : }
5678 0 : ndr->depth--;
5679 0 : break;
5680 :
5681 0 : case NETR_DELTA_DELETE_SECRET:
5682 0 : ndr_print_ptr(ndr, "name", r->name);
5683 0 : ndr->depth++;
5684 0 : if (r->name) {
5685 0 : ndr_print_string(ndr, "name", r->name);
5686 : }
5687 0 : ndr->depth--;
5688 0 : break;
5689 :
5690 0 : case NETR_DELTA_DELETE_GROUP2:
5691 0 : ndr_print_uint32(ndr, "rid", r->rid);
5692 0 : break;
5693 :
5694 0 : case NETR_DELTA_DELETE_USER2:
5695 0 : ndr_print_uint32(ndr, "rid", r->rid);
5696 0 : break;
5697 :
5698 0 : case NETR_DELTA_MODIFY_COUNT:
5699 0 : break;
5700 :
5701 0 : default:
5702 0 : break;
5703 :
5704 : }
5705 0 : }
5706 :
5707 0 : static enum ndr_err_code ndr_push_netr_DELTA_ENUM(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ENUM *r)
5708 : {
5709 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5710 0 : if (ndr_flags & NDR_SCALARS) {
5711 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5712 0 : NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, r->delta_type));
5713 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
5714 0 : NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
5715 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type));
5716 0 : NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
5717 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5718 : }
5719 0 : if (ndr_flags & NDR_BUFFERS) {
5720 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
5721 0 : NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
5722 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type));
5723 0 : NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
5724 : }
5725 0 : return NDR_ERR_SUCCESS;
5726 : }
5727 :
5728 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ENUM(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ENUM *r)
5729 : {
5730 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5731 0 : if (ndr_flags & NDR_SCALARS) {
5732 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5733 0 : NDR_CHECK(ndr_pull_netr_DeltaEnum(ndr, NDR_SCALARS, &r->delta_type));
5734 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
5735 0 : NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
5736 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type));
5737 0 : NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
5738 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5739 : }
5740 0 : if (ndr_flags & NDR_BUFFERS) {
5741 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
5742 0 : NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
5743 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type));
5744 0 : NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
5745 : }
5746 0 : return NDR_ERR_SUCCESS;
5747 : }
5748 :
5749 0 : _PUBLIC_ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM *r)
5750 : {
5751 0 : ndr_print_struct(ndr, name, "netr_DELTA_ENUM");
5752 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5753 0 : ndr->depth++;
5754 0 : ndr_print_netr_DeltaEnum(ndr, "delta_type", r->delta_type);
5755 0 : ndr_print_set_switch_value(ndr, &r->delta_id_union, r->delta_type);
5756 0 : ndr_print_netr_DELTA_ID_UNION(ndr, "delta_id_union", &r->delta_id_union);
5757 0 : ndr_print_set_switch_value(ndr, &r->delta_union, r->delta_type);
5758 0 : ndr_print_netr_DELTA_UNION(ndr, "delta_union", &r->delta_union);
5759 0 : ndr->depth--;
5760 : }
5761 :
5762 0 : static enum ndr_err_code ndr_push_netr_DELTA_ENUM_ARRAY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ENUM_ARRAY *r)
5763 : {
5764 0 : uint32_t cntr_delta_enum_1;
5765 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5766 0 : if (ndr_flags & NDR_SCALARS) {
5767 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5768 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_deltas));
5769 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delta_enum));
5770 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5771 : }
5772 0 : if (ndr_flags & NDR_BUFFERS) {
5773 0 : if (r->delta_enum) {
5774 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_deltas));
5775 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
5776 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
5777 : }
5778 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
5779 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
5780 : }
5781 : }
5782 : }
5783 0 : return NDR_ERR_SUCCESS;
5784 : }
5785 :
5786 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ENUM_ARRAY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ENUM_ARRAY *r)
5787 : {
5788 0 : uint32_t _ptr_delta_enum;
5789 0 : uint32_t size_delta_enum_1 = 0;
5790 0 : uint32_t cntr_delta_enum_1;
5791 0 : TALLOC_CTX *_mem_save_delta_enum_0 = NULL;
5792 0 : TALLOC_CTX *_mem_save_delta_enum_1 = NULL;
5793 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5794 0 : if (ndr_flags & NDR_SCALARS) {
5795 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5796 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_deltas));
5797 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum));
5798 0 : if (_ptr_delta_enum) {
5799 0 : NDR_PULL_ALLOC(ndr, r->delta_enum);
5800 : } else {
5801 0 : r->delta_enum = NULL;
5802 : }
5803 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5804 : }
5805 0 : if (ndr_flags & NDR_BUFFERS) {
5806 0 : if (r->delta_enum) {
5807 0 : _mem_save_delta_enum_0 = NDR_PULL_GET_MEM_CTX(ndr);
5808 0 : NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
5809 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->delta_enum));
5810 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->delta_enum, &size_delta_enum_1));
5811 0 : NDR_PULL_ALLOC_N(ndr, r->delta_enum, size_delta_enum_1);
5812 0 : _mem_save_delta_enum_1 = NDR_PULL_GET_MEM_CTX(ndr);
5813 0 : NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
5814 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
5815 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
5816 : }
5817 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
5818 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
5819 : }
5820 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_1, 0);
5821 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_0, 0);
5822 : }
5823 0 : if (r->delta_enum) {
5824 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->delta_enum, r->num_deltas));
5825 : }
5826 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
5827 0 : }
5828 : }
5829 0 : return NDR_ERR_SUCCESS;
5830 : }
5831 :
5832 0 : _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r)
5833 : {
5834 0 : uint32_t cntr_delta_enum_1;
5835 0 : ndr_print_struct(ndr, name, "netr_DELTA_ENUM_ARRAY");
5836 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5837 0 : ndr->depth++;
5838 0 : ndr_print_uint32(ndr, "num_deltas", r->num_deltas);
5839 0 : ndr_print_ptr(ndr, "delta_enum", r->delta_enum);
5840 0 : ndr->depth++;
5841 0 : if (r->delta_enum) {
5842 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "delta_enum", (uint32_t)(r->num_deltas));
5843 0 : ndr->depth++;
5844 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
5845 0 : ndr_print_netr_DELTA_ENUM(ndr, "delta_enum", &r->delta_enum[cntr_delta_enum_1]);
5846 : }
5847 0 : ndr->depth--;
5848 : }
5849 0 : ndr->depth--;
5850 0 : ndr->depth--;
5851 : }
5852 :
5853 108 : static enum ndr_err_code ndr_push_netr_UAS_INFO_0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_UAS_INFO_0 *r)
5854 : {
5855 : {
5856 108 : libndr_flags _flags_save_STRUCT = ndr->flags;
5857 108 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
5858 108 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5859 108 : if (ndr_flags & NDR_SCALARS) {
5860 108 : NDR_CHECK(ndr_push_align(ndr, 4));
5861 108 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->computer_name, 16));
5862 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timecreated));
5863 108 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number));
5864 108 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5865 : }
5866 108 : if (ndr_flags & NDR_BUFFERS) {
5867 18 : }
5868 108 : ndr->flags = _flags_save_STRUCT;
5869 : }
5870 108 : return NDR_ERR_SUCCESS;
5871 : }
5872 :
5873 96 : static enum ndr_err_code ndr_pull_netr_UAS_INFO_0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_UAS_INFO_0 *r)
5874 : {
5875 96 : uint32_t size_computer_name_0 = 0;
5876 : {
5877 96 : libndr_flags _flags_save_STRUCT = ndr->flags;
5878 96 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
5879 96 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5880 96 : if (ndr_flags & NDR_SCALARS) {
5881 96 : NDR_CHECK(ndr_pull_align(ndr, 4));
5882 96 : size_computer_name_0 = 16;
5883 96 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->computer_name, size_computer_name_0));
5884 96 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timecreated));
5885 96 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number));
5886 96 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5887 : }
5888 96 : if (ndr_flags & NDR_BUFFERS) {
5889 16 : }
5890 96 : ndr->flags = _flags_save_STRUCT;
5891 : }
5892 96 : return NDR_ERR_SUCCESS;
5893 : }
5894 :
5895 24 : _PUBLIC_ void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r)
5896 : {
5897 24 : ndr_print_struct(ndr, name, "netr_UAS_INFO_0");
5898 24 : if (r == NULL) { ndr_print_null(ndr); return; }
5899 : {
5900 24 : libndr_flags _flags_save_STRUCT = ndr->flags;
5901 24 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
5902 24 : ndr->depth++;
5903 24 : ndr_print_array_uint8(ndr, "computer_name", r->computer_name, 16);
5904 24 : ndr_print_uint32(ndr, "timecreated", r->timecreated);
5905 24 : ndr_print_uint32(ndr, "serial_number", r->serial_number);
5906 24 : ndr->depth--;
5907 24 : ndr->flags = _flags_save_STRUCT;
5908 : }
5909 : }
5910 :
5911 60 : static enum ndr_err_code ndr_push_netr_AccountBuffer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_AccountBuffer *r)
5912 : {
5913 60 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5914 60 : if (ndr_flags & NDR_SCALARS) {
5915 60 : NDR_CHECK(ndr_push_align(ndr, 4));
5916 : {
5917 60 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
5918 60 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
5919 60 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
5920 60 : ndr->flags = _flags_save_DATA_BLOB;
5921 : }
5922 60 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5923 : }
5924 60 : if (ndr_flags & NDR_BUFFERS) {
5925 10 : }
5926 60 : return NDR_ERR_SUCCESS;
5927 : }
5928 :
5929 48 : static enum ndr_err_code ndr_pull_netr_AccountBuffer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_AccountBuffer *r)
5930 : {
5931 48 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5932 48 : if (ndr_flags & NDR_SCALARS) {
5933 48 : NDR_CHECK(ndr_pull_align(ndr, 4));
5934 : {
5935 48 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
5936 48 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
5937 48 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->blob));
5938 48 : ndr->flags = _flags_save_DATA_BLOB;
5939 : }
5940 48 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5941 : }
5942 48 : if (ndr_flags & NDR_BUFFERS) {
5943 8 : }
5944 48 : return NDR_ERR_SUCCESS;
5945 : }
5946 :
5947 24 : _PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r)
5948 : {
5949 24 : ndr_print_struct(ndr, name, "netr_AccountBuffer");
5950 24 : if (r == NULL) { ndr_print_null(ndr); return; }
5951 24 : ndr->depth++;
5952 : {
5953 24 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
5954 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
5955 24 : ndr_print_DATA_BLOB(ndr, "blob", r->blob);
5956 24 : ndr->flags = _flags_save_DATA_BLOB;
5957 : }
5958 24 : ndr->depth--;
5959 : }
5960 :
5961 352 : static enum ndr_err_code ndr_push_netr_InfoFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
5962 : {
5963 352 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
5964 310 : return NDR_ERR_SUCCESS;
5965 : }
5966 :
5967 477 : static enum ndr_err_code ndr_pull_netr_InfoFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
5968 : {
5969 51 : uint32_t v;
5970 477 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
5971 477 : *r = v;
5972 477 : return NDR_ERR_SUCCESS;
5973 : }
5974 :
5975 84 : _PUBLIC_ void ndr_print_netr_InfoFlags(struct ndr_print *ndr, const char *name, uint32_t r)
5976 : {
5977 84 : ndr_print_uint32(ndr, name, r);
5978 84 : ndr->depth++;
5979 84 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REPLICATION_NEEDED", NETLOGON_REPLICATION_NEEDED, r);
5980 84 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REPLICATION_IN_PROGRESS", NETLOGON_REPLICATION_IN_PROGRESS, r);
5981 84 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_FULL_SYNC_REPLICATION", NETLOGON_FULL_SYNC_REPLICATION, r);
5982 84 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REDO_NEEDED", NETLOGON_REDO_NEEDED, r);
5983 84 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_HAS_IP", NETLOGON_HAS_IP, r);
5984 84 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_HAS_TIMESERV", NETLOGON_HAS_TIMESERV, r);
5985 84 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_DNS_UPDATE_FAILURE", NETLOGON_DNS_UPDATE_FAILURE, r);
5986 84 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERIFY_STATUS_RETURNED", NETLOGON_VERIFY_STATUS_RETURNED, r);
5987 84 : ndr->depth--;
5988 84 : }
5989 :
5990 115 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NETLOGON_INFO_1 *r)
5991 : {
5992 115 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5993 115 : if (ndr_flags & NDR_SCALARS) {
5994 115 : NDR_CHECK(ndr_push_align(ndr, 4));
5995 133 : NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
5996 115 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status));
5997 115 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5998 : }
5999 115 : if (ndr_flags & NDR_BUFFERS) {
6000 18 : }
6001 115 : return NDR_ERR_SUCCESS;
6002 : }
6003 :
6004 99 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NETLOGON_INFO_1 *r)
6005 : {
6006 99 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6007 99 : if (ndr_flags & NDR_SCALARS) {
6008 99 : NDR_CHECK(ndr_pull_align(ndr, 4));
6009 114 : NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
6010 99 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->pdc_connection_status));
6011 99 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
6012 : }
6013 99 : if (ndr_flags & NDR_BUFFERS) {
6014 15 : }
6015 99 : return NDR_ERR_SUCCESS;
6016 : }
6017 :
6018 36 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r)
6019 : {
6020 36 : ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_1");
6021 36 : if (r == NULL) { ndr_print_null(ndr); return; }
6022 36 : ndr->depth++;
6023 36 : ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
6024 36 : ndr_print_WERROR(ndr, "pdc_connection_status", r->pdc_connection_status);
6025 36 : ndr->depth--;
6026 : }
6027 :
6028 225 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NETLOGON_INFO_2 *r)
6029 : {
6030 225 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6031 225 : if (ndr_flags & NDR_SCALARS) {
6032 225 : NDR_CHECK(ndr_push_align(ndr, 5));
6033 249 : NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
6034 225 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status));
6035 225 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name));
6036 225 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->tc_connection_status));
6037 225 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6038 : }
6039 225 : if (ndr_flags & NDR_BUFFERS) {
6040 225 : if (r->trusted_dc_name) {
6041 213 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
6042 213 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6043 213 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
6044 213 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->trusted_dc_name, ndr_charset_length(r->trusted_dc_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6045 : }
6046 : }
6047 201 : return NDR_ERR_SUCCESS;
6048 : }
6049 :
6050 366 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NETLOGON_INFO_2 *r)
6051 : {
6052 36 : uint32_t _ptr_trusted_dc_name;
6053 366 : uint32_t size_trusted_dc_name_1 = 0;
6054 366 : uint32_t length_trusted_dc_name_1 = 0;
6055 366 : TALLOC_CTX *_mem_save_trusted_dc_name_0 = NULL;
6056 366 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6057 366 : if (ndr_flags & NDR_SCALARS) {
6058 366 : NDR_CHECK(ndr_pull_align(ndr, 5));
6059 402 : NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
6060 366 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->pdc_connection_status));
6061 366 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_dc_name));
6062 366 : if (_ptr_trusted_dc_name) {
6063 354 : NDR_PULL_ALLOC(ndr, r->trusted_dc_name);
6064 : } else {
6065 12 : r->trusted_dc_name = NULL;
6066 : }
6067 366 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->tc_connection_status));
6068 366 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6069 : }
6070 366 : if (ndr_flags & NDR_BUFFERS) {
6071 366 : if (r->trusted_dc_name) {
6072 354 : _mem_save_trusted_dc_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6073 354 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_dc_name, 0);
6074 354 : NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_dc_name));
6075 354 : NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_dc_name));
6076 354 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_dc_name, &size_trusted_dc_name_1));
6077 354 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_dc_name, &length_trusted_dc_name_1));
6078 354 : if (length_trusted_dc_name_1 > size_trusted_dc_name_1) {
6079 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_trusted_dc_name_1, length_trusted_dc_name_1);
6080 : }
6081 354 : NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_dc_name_1, sizeof(uint16_t)));
6082 354 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_dc_name, length_trusted_dc_name_1, sizeof(uint16_t), CH_UTF16));
6083 354 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_dc_name_0, 0);
6084 : }
6085 : }
6086 330 : return NDR_ERR_SUCCESS;
6087 : }
6088 :
6089 48 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r)
6090 : {
6091 48 : ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_2");
6092 48 : if (r == NULL) { ndr_print_null(ndr); return; }
6093 48 : ndr->depth++;
6094 48 : ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
6095 48 : ndr_print_WERROR(ndr, "pdc_connection_status", r->pdc_connection_status);
6096 48 : ndr_print_ptr(ndr, "trusted_dc_name", r->trusted_dc_name);
6097 48 : ndr->depth++;
6098 48 : if (r->trusted_dc_name) {
6099 48 : ndr_print_string(ndr, "trusted_dc_name", r->trusted_dc_name);
6100 : }
6101 48 : ndr->depth--;
6102 48 : ndr_print_WERROR(ndr, "tc_connection_status", r->tc_connection_status);
6103 48 : ndr->depth--;
6104 : }
6105 :
6106 12 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NETLOGON_INFO_3 *r)
6107 : {
6108 12 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6109 12 : if (ndr_flags & NDR_SCALARS) {
6110 12 : NDR_CHECK(ndr_push_align(ndr, 4));
6111 12 : NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
6112 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_attempts));
6113 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
6114 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
6115 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
6116 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
6117 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
6118 12 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
6119 : }
6120 12 : if (ndr_flags & NDR_BUFFERS) {
6121 0 : }
6122 12 : return NDR_ERR_SUCCESS;
6123 : }
6124 :
6125 12 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NETLOGON_INFO_3 *r)
6126 : {
6127 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6128 12 : if (ndr_flags & NDR_SCALARS) {
6129 12 : NDR_CHECK(ndr_pull_align(ndr, 4));
6130 12 : NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
6131 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_attempts));
6132 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
6133 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
6134 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
6135 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
6136 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
6137 12 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
6138 : }
6139 12 : if (ndr_flags & NDR_BUFFERS) {
6140 0 : }
6141 12 : return NDR_ERR_SUCCESS;
6142 : }
6143 :
6144 0 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r)
6145 : {
6146 0 : ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_3");
6147 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6148 0 : ndr->depth++;
6149 0 : ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
6150 0 : ndr_print_uint32(ndr, "logon_attempts", r->logon_attempts);
6151 0 : ndr_print_uint32(ndr, "unknown1", r->unknown1);
6152 0 : ndr_print_uint32(ndr, "unknown2", r->unknown2);
6153 0 : ndr_print_uint32(ndr, "unknown3", r->unknown3);
6154 0 : ndr_print_uint32(ndr, "unknown4", r->unknown4);
6155 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
6156 0 : ndr->depth--;
6157 : }
6158 :
6159 0 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NETLOGON_INFO_4 *r)
6160 : {
6161 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6162 0 : if (ndr_flags & NDR_SCALARS) {
6163 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6164 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name));
6165 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain_name));
6166 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6167 : }
6168 0 : if (ndr_flags & NDR_BUFFERS) {
6169 0 : if (r->trusted_dc_name) {
6170 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
6171 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6172 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
6173 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->trusted_dc_name, ndr_charset_length(r->trusted_dc_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6174 : }
6175 0 : if (r->trusted_domain_name) {
6176 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_domain_name, CH_UTF16)));
6177 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6178 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_domain_name, CH_UTF16)));
6179 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->trusted_domain_name, ndr_charset_length(r->trusted_domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6180 : }
6181 : }
6182 0 : return NDR_ERR_SUCCESS;
6183 : }
6184 :
6185 0 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NETLOGON_INFO_4 *r)
6186 : {
6187 0 : uint32_t _ptr_trusted_dc_name;
6188 0 : uint32_t size_trusted_dc_name_1 = 0;
6189 0 : uint32_t length_trusted_dc_name_1 = 0;
6190 0 : TALLOC_CTX *_mem_save_trusted_dc_name_0 = NULL;
6191 0 : uint32_t _ptr_trusted_domain_name;
6192 0 : uint32_t size_trusted_domain_name_1 = 0;
6193 0 : uint32_t length_trusted_domain_name_1 = 0;
6194 0 : TALLOC_CTX *_mem_save_trusted_domain_name_0 = NULL;
6195 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6196 0 : if (ndr_flags & NDR_SCALARS) {
6197 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6198 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_dc_name));
6199 0 : if (_ptr_trusted_dc_name) {
6200 0 : NDR_PULL_ALLOC(ndr, r->trusted_dc_name);
6201 : } else {
6202 0 : r->trusted_dc_name = NULL;
6203 : }
6204 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain_name));
6205 0 : if (_ptr_trusted_domain_name) {
6206 0 : NDR_PULL_ALLOC(ndr, r->trusted_domain_name);
6207 : } else {
6208 0 : r->trusted_domain_name = NULL;
6209 : }
6210 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6211 : }
6212 0 : if (ndr_flags & NDR_BUFFERS) {
6213 0 : if (r->trusted_dc_name) {
6214 0 : _mem_save_trusted_dc_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6215 0 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_dc_name, 0);
6216 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_dc_name));
6217 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_dc_name));
6218 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_dc_name, &size_trusted_dc_name_1));
6219 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_dc_name, &length_trusted_dc_name_1));
6220 0 : if (length_trusted_dc_name_1 > size_trusted_dc_name_1) {
6221 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_trusted_dc_name_1, length_trusted_dc_name_1);
6222 : }
6223 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_dc_name_1, sizeof(uint16_t)));
6224 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_dc_name, length_trusted_dc_name_1, sizeof(uint16_t), CH_UTF16));
6225 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_dc_name_0, 0);
6226 : }
6227 0 : if (r->trusted_domain_name) {
6228 0 : _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6229 0 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domain_name, 0);
6230 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_domain_name));
6231 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_domain_name));
6232 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_domain_name, &size_trusted_domain_name_1));
6233 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_domain_name, &length_trusted_domain_name_1));
6234 0 : if (length_trusted_domain_name_1 > size_trusted_domain_name_1) {
6235 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_trusted_domain_name_1, length_trusted_domain_name_1);
6236 : }
6237 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_domain_name_1, sizeof(uint16_t)));
6238 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_domain_name, length_trusted_domain_name_1, sizeof(uint16_t), CH_UTF16));
6239 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, 0);
6240 : }
6241 : }
6242 0 : return NDR_ERR_SUCCESS;
6243 : }
6244 :
6245 0 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_4(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_4 *r)
6246 : {
6247 0 : ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_4");
6248 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6249 0 : ndr->depth++;
6250 0 : ndr_print_ptr(ndr, "trusted_dc_name", r->trusted_dc_name);
6251 0 : ndr->depth++;
6252 0 : if (r->trusted_dc_name) {
6253 0 : ndr_print_string(ndr, "trusted_dc_name", r->trusted_dc_name);
6254 : }
6255 0 : ndr->depth--;
6256 0 : ndr_print_ptr(ndr, "trusted_domain_name", r->trusted_domain_name);
6257 0 : ndr->depth++;
6258 0 : if (r->trusted_domain_name) {
6259 0 : ndr_print_string(ndr, "trusted_domain_name", r->trusted_domain_name);
6260 : }
6261 0 : ndr->depth--;
6262 0 : ndr->depth--;
6263 : }
6264 :
6265 9718 : _PUBLIC_ enum ndr_err_code ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_CONTROL_QUERY_INFORMATION *r)
6266 : {
6267 1674 : uint32_t level;
6268 9718 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6269 9718 : if (ndr_flags & NDR_SCALARS) {
6270 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6271 9718 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6272 9718 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6273 9718 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
6274 : /* ms_union is always aligned to the largest union arm*/
6275 9718 : NDR_CHECK(ndr_push_align(ndr, 5));
6276 9718 : switch (level) {
6277 2472 : case 1: {
6278 2472 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
6279 2040 : break; }
6280 :
6281 2611 : case 2: {
6282 2611 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
6283 2179 : break; }
6284 :
6285 2678 : case 3: {
6286 2678 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
6287 2210 : break; }
6288 :
6289 1648 : case 4: {
6290 1648 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
6291 1360 : break; }
6292 :
6293 255 : default: {
6294 255 : break; }
6295 :
6296 : }
6297 : }
6298 9718 : if (ndr_flags & NDR_BUFFERS) {
6299 9718 : if (!(ndr_flags & NDR_SCALARS)) {
6300 : /* We didn't get it above, and the token is not needed after this. */
6301 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6302 : }
6303 9718 : switch (level) {
6304 2472 : case 1:
6305 2472 : if (r->info1) {
6306 115 : NDR_CHECK(ndr_push_netr_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
6307 : }
6308 2040 : break;
6309 :
6310 2611 : case 2:
6311 2611 : if (r->info2) {
6312 225 : NDR_CHECK(ndr_push_netr_NETLOGON_INFO_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
6313 : }
6314 2179 : break;
6315 :
6316 2678 : case 3:
6317 2678 : if (r->info3) {
6318 12 : NDR_CHECK(ndr_push_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
6319 : }
6320 2210 : break;
6321 :
6322 1648 : case 4:
6323 1648 : if (r->info4) {
6324 0 : NDR_CHECK(ndr_push_netr_NETLOGON_INFO_4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
6325 : }
6326 1360 : break;
6327 :
6328 255 : default:
6329 255 : break;
6330 :
6331 : }
6332 : }
6333 8044 : return NDR_ERR_SUCCESS;
6334 : }
6335 :
6336 8337 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_CONTROL_QUERY_INFORMATION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_CONTROL_QUERY_INFORMATION *r)
6337 : {
6338 1411 : uint32_t level;
6339 1411 : uint32_t _level;
6340 8337 : TALLOC_CTX *_mem_save_info1_0 = NULL;
6341 1411 : uint32_t _ptr_info1;
6342 8337 : TALLOC_CTX *_mem_save_info2_0 = NULL;
6343 1411 : uint32_t _ptr_info2;
6344 8337 : TALLOC_CTX *_mem_save_info3_0 = NULL;
6345 1411 : uint32_t _ptr_info3;
6346 8337 : TALLOC_CTX *_mem_save_info4_0 = NULL;
6347 1411 : uint32_t _ptr_info4;
6348 8337 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6349 8337 : if (ndr_flags & NDR_SCALARS) {
6350 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6351 8337 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6352 8337 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6353 8337 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6354 8337 : if (_level != level) {
6355 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
6356 : }
6357 : /* ms_union is always aligned to the largest union arm*/
6358 8337 : NDR_CHECK(ndr_pull_align(ndr, 5));
6359 8337 : switch (level) {
6360 2088 : case 1: {
6361 2088 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
6362 2088 : if (_ptr_info1) {
6363 99 : NDR_PULL_ALLOC(ndr, r->info1);
6364 : } else {
6365 1989 : r->info1 = NULL;
6366 : }
6367 1728 : break; }
6368 :
6369 2334 : case 2: {
6370 2334 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
6371 2334 : if (_ptr_info2) {
6372 366 : NDR_PULL_ALLOC(ndr, r->info2);
6373 : } else {
6374 1968 : r->info2 = NULL;
6375 : }
6376 1958 : break; }
6377 :
6378 2262 : case 3: {
6379 2262 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
6380 2262 : if (_ptr_info3) {
6381 12 : NDR_PULL_ALLOC(ndr, r->info3);
6382 : } else {
6383 2250 : r->info3 = NULL;
6384 : }
6385 1872 : break; }
6386 :
6387 1392 : case 4: {
6388 1392 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
6389 1392 : if (_ptr_info4) {
6390 0 : NDR_PULL_ALLOC(ndr, r->info4);
6391 : } else {
6392 1392 : r->info4 = NULL;
6393 : }
6394 1152 : break; }
6395 :
6396 216 : default: {
6397 216 : break; }
6398 :
6399 : }
6400 : }
6401 8337 : if (ndr_flags & NDR_BUFFERS) {
6402 8337 : if (!(ndr_flags & NDR_SCALARS)) {
6403 : /* We didn't get it above, and the token is not needed after this. */
6404 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6405 : }
6406 8337 : switch (level) {
6407 2088 : case 1:
6408 2088 : if (r->info1) {
6409 99 : _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6410 99 : NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
6411 99 : NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
6412 99 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
6413 : }
6414 1728 : break;
6415 :
6416 2334 : case 2:
6417 2334 : if (r->info2) {
6418 366 : _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
6419 366 : NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
6420 366 : NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
6421 366 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
6422 : }
6423 1958 : break;
6424 :
6425 2262 : case 3:
6426 2262 : if (r->info3) {
6427 12 : _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
6428 12 : NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
6429 12 : NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
6430 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
6431 : }
6432 1872 : break;
6433 :
6434 1392 : case 4:
6435 1392 : if (r->info4) {
6436 0 : _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
6437 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
6438 0 : NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
6439 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
6440 : }
6441 1152 : break;
6442 :
6443 216 : default:
6444 216 : break;
6445 :
6446 : }
6447 : }
6448 6926 : return NDR_ERR_SUCCESS;
6449 : }
6450 :
6451 3348 : _PUBLIC_ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r)
6452 : {
6453 558 : uint32_t level;
6454 3348 : level = ndr_print_steal_switch_value(ndr, r);
6455 3348 : ndr_print_union(ndr, name, level, "netr_CONTROL_QUERY_INFORMATION");
6456 3348 : switch (level) {
6457 864 : case 1:
6458 864 : ndr_print_ptr(ndr, "info1", r->info1);
6459 864 : ndr->depth++;
6460 864 : if (r->info1) {
6461 36 : ndr_print_netr_NETLOGON_INFO_1(ndr, "info1", r->info1);
6462 : }
6463 864 : ndr->depth--;
6464 864 : break;
6465 :
6466 864 : case 2:
6467 864 : ndr_print_ptr(ndr, "info2", r->info2);
6468 864 : ndr->depth++;
6469 864 : if (r->info2) {
6470 48 : ndr_print_netr_NETLOGON_INFO_2(ndr, "info2", r->info2);
6471 : }
6472 864 : ndr->depth--;
6473 864 : break;
6474 :
6475 936 : case 3:
6476 936 : ndr_print_ptr(ndr, "info3", r->info3);
6477 936 : ndr->depth++;
6478 936 : if (r->info3) {
6479 0 : ndr_print_netr_NETLOGON_INFO_3(ndr, "info3", r->info3);
6480 : }
6481 936 : ndr->depth--;
6482 936 : break;
6483 :
6484 576 : case 4:
6485 576 : ndr_print_ptr(ndr, "info4", r->info4);
6486 576 : ndr->depth++;
6487 576 : if (r->info4) {
6488 0 : ndr_print_netr_NETLOGON_INFO_4(ndr, "info4", r->info4);
6489 : }
6490 576 : ndr->depth--;
6491 576 : break;
6492 :
6493 90 : default:
6494 90 : break;
6495 :
6496 : }
6497 3348 : }
6498 :
6499 11019 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonControlCode(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_LogonControlCode r)
6500 : {
6501 11019 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
6502 9172 : return NDR_ERR_SUCCESS;
6503 : }
6504 :
6505 8044 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonControlCode(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_LogonControlCode *r)
6506 : {
6507 1395 : uint32_t v;
6508 8044 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
6509 8044 : *r = v;
6510 8044 : return NDR_ERR_SUCCESS;
6511 : }
6512 :
6513 0 : _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r)
6514 : {
6515 0 : const char *val = NULL;
6516 :
6517 0 : switch (r) {
6518 0 : case NETLOGON_CONTROL_QUERY: val = "NETLOGON_CONTROL_QUERY"; break;
6519 0 : case NETLOGON_CONTROL_REPLICATE: val = "NETLOGON_CONTROL_REPLICATE"; break;
6520 0 : case NETLOGON_CONTROL_SYNCHRONIZE: val = "NETLOGON_CONTROL_SYNCHRONIZE"; break;
6521 0 : case NETLOGON_CONTROL_PDC_REPLICATE: val = "NETLOGON_CONTROL_PDC_REPLICATE"; break;
6522 0 : case NETLOGON_CONTROL_REDISCOVER: val = "NETLOGON_CONTROL_REDISCOVER"; break;
6523 0 : case NETLOGON_CONTROL_TC_QUERY: val = "NETLOGON_CONTROL_TC_QUERY"; break;
6524 0 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY: val = "NETLOGON_CONTROL_TRANSPORT_NOTIFY"; break;
6525 0 : case NETLOGON_CONTROL_FIND_USER: val = "NETLOGON_CONTROL_FIND_USER"; break;
6526 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD: val = "NETLOGON_CONTROL_CHANGE_PASSWORD"; break;
6527 0 : case NETLOGON_CONTROL_TC_VERIFY: val = "NETLOGON_CONTROL_TC_VERIFY"; break;
6528 0 : case NETLOGON_CONTROL_FORCE_DNS_REG: val = "NETLOGON_CONTROL_FORCE_DNS_REG"; break;
6529 0 : case NETLOGON_CONTROL_QUERY_DNS_REG: val = "NETLOGON_CONTROL_QUERY_DNS_REG"; break;
6530 0 : case NETLOGON_CONTROL_BACKUP_CHANGE_LOG: val = "NETLOGON_CONTROL_BACKUP_CHANGE_LOG"; break;
6531 0 : case NETLOGON_CONTROL_TRUNCATE_LOG: val = "NETLOGON_CONTROL_TRUNCATE_LOG"; break;
6532 0 : case NETLOGON_CONTROL_SET_DBFLAG: val = "NETLOGON_CONTROL_SET_DBFLAG"; break;
6533 0 : case NETLOGON_CONTROL_BREAKPOINT: val = "NETLOGON_CONTROL_BREAKPOINT"; break;
6534 : }
6535 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
6536 0 : }
6537 :
6538 2682 : _PUBLIC_ enum ndr_err_code ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_CONTROL_DATA_INFORMATION *r)
6539 : {
6540 436 : uint32_t level;
6541 2682 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6542 2682 : if (ndr_flags & NDR_SCALARS) {
6543 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6544 2682 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6545 2682 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6546 2682 : NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, level));
6547 : /* ms_union is always aligned to the largest union arm*/
6548 2682 : NDR_CHECK(ndr_push_align(ndr, 5));
6549 2682 : switch (level) {
6550 620 : case NETLOGON_CONTROL_REDISCOVER: {
6551 620 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6552 522 : break; }
6553 :
6554 564 : case NETLOGON_CONTROL_TC_QUERY: {
6555 564 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6556 466 : break; }
6557 :
6558 522 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY: {
6559 522 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6560 432 : break; }
6561 :
6562 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD: {
6563 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6564 0 : break; }
6565 :
6566 106 : case NETLOGON_CONTROL_TC_VERIFY: {
6567 106 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6568 106 : break; }
6569 :
6570 0 : case NETLOGON_CONTROL_FIND_USER: {
6571 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
6572 0 : break; }
6573 :
6574 696 : case NETLOGON_CONTROL_SET_DBFLAG: {
6575 696 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->debug_level));
6576 576 : break; }
6577 :
6578 144 : default: {
6579 144 : break; }
6580 :
6581 : }
6582 : }
6583 2682 : if (ndr_flags & NDR_BUFFERS) {
6584 2682 : if (!(ndr_flags & NDR_SCALARS)) {
6585 : /* We didn't get it above, and the token is not needed after this. */
6586 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6587 : }
6588 2682 : switch (level) {
6589 620 : case NETLOGON_CONTROL_REDISCOVER:
6590 620 : if (r->domain) {
6591 620 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6592 620 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6593 620 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6594 620 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6595 : }
6596 522 : break;
6597 :
6598 564 : case NETLOGON_CONTROL_TC_QUERY:
6599 564 : if (r->domain) {
6600 564 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6601 564 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6602 564 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6603 564 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6604 : }
6605 466 : break;
6606 :
6607 522 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
6608 522 : if (r->domain) {
6609 522 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6610 522 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6611 522 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6612 522 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6613 : }
6614 432 : break;
6615 :
6616 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD:
6617 0 : if (r->domain) {
6618 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6619 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6620 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6621 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6622 : }
6623 0 : break;
6624 :
6625 106 : case NETLOGON_CONTROL_TC_VERIFY:
6626 106 : if (r->domain) {
6627 106 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6628 106 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6629 106 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6630 106 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6631 : }
6632 106 : break;
6633 :
6634 0 : case NETLOGON_CONTROL_FIND_USER:
6635 0 : if (r->user) {
6636 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
6637 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6638 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
6639 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6640 : }
6641 0 : break;
6642 :
6643 576 : case NETLOGON_CONTROL_SET_DBFLAG:
6644 576 : break;
6645 :
6646 144 : default:
6647 144 : break;
6648 :
6649 : }
6650 : }
6651 2246 : return NDR_ERR_SUCCESS;
6652 : }
6653 :
6654 2461 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_CONTROL_DATA_INFORMATION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_CONTROL_DATA_INFORMATION *r)
6655 : {
6656 420 : uint32_t level;
6657 420 : uint32_t _level;
6658 2461 : TALLOC_CTX *_mem_save_domain_0 = NULL;
6659 420 : uint32_t _ptr_domain;
6660 2461 : uint32_t size_domain_1 = 0;
6661 2461 : uint32_t length_domain_1 = 0;
6662 2461 : TALLOC_CTX *_mem_save_user_0 = NULL;
6663 420 : uint32_t _ptr_user;
6664 2461 : uint32_t size_user_1 = 0;
6665 2461 : uint32_t length_user_1 = 0;
6666 2461 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6667 2461 : if (ndr_flags & NDR_SCALARS) {
6668 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6669 2461 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6670 2461 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6671 2461 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6672 2461 : if (_level != level) {
6673 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
6674 : }
6675 : /* ms_union is always aligned to the largest union arm*/
6676 2461 : NDR_CHECK(ndr_pull_align(ndr, 5));
6677 2461 : switch (level) {
6678 538 : case NETLOGON_CONTROL_REDISCOVER: {
6679 538 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6680 538 : if (_ptr_domain) {
6681 538 : NDR_PULL_ALLOC(ndr, r->domain);
6682 : } else {
6683 0 : r->domain = NULL;
6684 : }
6685 448 : break; }
6686 :
6687 510 : case NETLOGON_CONTROL_TC_QUERY: {
6688 510 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6689 510 : if (_ptr_domain) {
6690 510 : NDR_PULL_ALLOC(ndr, r->domain);
6691 : } else {
6692 0 : r->domain = NULL;
6693 : }
6694 420 : break; }
6695 :
6696 510 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY: {
6697 510 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6698 510 : if (_ptr_domain) {
6699 510 : NDR_PULL_ALLOC(ndr, r->domain);
6700 : } else {
6701 0 : r->domain = NULL;
6702 : }
6703 420 : break; }
6704 :
6705 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD: {
6706 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6707 0 : if (_ptr_domain) {
6708 0 : NDR_PULL_ALLOC(ndr, r->domain);
6709 : } else {
6710 0 : r->domain = NULL;
6711 : }
6712 0 : break; }
6713 :
6714 53 : case NETLOGON_CONTROL_TC_VERIFY: {
6715 53 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6716 53 : if (_ptr_domain) {
6717 53 : NDR_PULL_ALLOC(ndr, r->domain);
6718 : } else {
6719 0 : r->domain = NULL;
6720 : }
6721 53 : break; }
6722 :
6723 0 : case NETLOGON_CONTROL_FIND_USER: {
6724 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
6725 0 : if (_ptr_user) {
6726 0 : NDR_PULL_ALLOC(ndr, r->user);
6727 : } else {
6728 0 : r->user = NULL;
6729 : }
6730 0 : break; }
6731 :
6732 680 : case NETLOGON_CONTROL_SET_DBFLAG: {
6733 680 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->debug_level));
6734 560 : break; }
6735 :
6736 140 : default: {
6737 140 : break; }
6738 :
6739 : }
6740 : }
6741 2461 : if (ndr_flags & NDR_BUFFERS) {
6742 2461 : if (!(ndr_flags & NDR_SCALARS)) {
6743 : /* We didn't get it above, and the token is not needed after this. */
6744 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6745 : }
6746 2461 : switch (level) {
6747 538 : case NETLOGON_CONTROL_REDISCOVER:
6748 538 : if (r->domain) {
6749 538 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6750 538 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6751 538 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6752 538 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6753 538 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6754 538 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6755 538 : if (length_domain_1 > size_domain_1) {
6756 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
6757 : }
6758 538 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6759 538 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6760 538 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6761 : }
6762 448 : break;
6763 :
6764 510 : case NETLOGON_CONTROL_TC_QUERY:
6765 510 : if (r->domain) {
6766 510 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6767 510 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6768 510 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6769 510 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6770 510 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6771 510 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6772 510 : if (length_domain_1 > size_domain_1) {
6773 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
6774 : }
6775 510 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6776 510 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6777 510 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6778 : }
6779 420 : break;
6780 :
6781 510 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
6782 510 : if (r->domain) {
6783 510 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6784 510 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6785 510 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6786 510 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6787 510 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6788 510 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6789 510 : if (length_domain_1 > size_domain_1) {
6790 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
6791 : }
6792 510 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6793 510 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6794 510 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6795 : }
6796 420 : break;
6797 :
6798 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD:
6799 0 : if (r->domain) {
6800 0 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6801 0 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6802 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6803 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6804 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6805 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6806 0 : if (length_domain_1 > size_domain_1) {
6807 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
6808 : }
6809 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6810 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6811 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6812 : }
6813 0 : break;
6814 :
6815 53 : case NETLOGON_CONTROL_TC_VERIFY:
6816 53 : if (r->domain) {
6817 53 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6818 53 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6819 53 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6820 53 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6821 53 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6822 53 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6823 53 : if (length_domain_1 > size_domain_1) {
6824 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
6825 : }
6826 53 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6827 53 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6828 53 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6829 : }
6830 53 : break;
6831 :
6832 0 : case NETLOGON_CONTROL_FIND_USER:
6833 0 : if (r->user) {
6834 0 : _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
6835 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
6836 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
6837 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
6838 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
6839 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
6840 0 : if (length_user_1 > size_user_1) {
6841 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_1, length_user_1);
6842 : }
6843 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
6844 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
6845 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
6846 : }
6847 0 : break;
6848 :
6849 560 : case NETLOGON_CONTROL_SET_DBFLAG:
6850 560 : break;
6851 :
6852 140 : default:
6853 140 : break;
6854 :
6855 : }
6856 : }
6857 2041 : return NDR_ERR_SUCCESS;
6858 : }
6859 :
6860 0 : _PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r)
6861 : {
6862 0 : uint32_t level;
6863 0 : level = ndr_print_steal_switch_value(ndr, r);
6864 0 : ndr_print_union(ndr, name, level, "netr_CONTROL_DATA_INFORMATION");
6865 0 : switch (level) {
6866 0 : case NETLOGON_CONTROL_REDISCOVER:
6867 0 : ndr_print_ptr(ndr, "domain", r->domain);
6868 0 : ndr->depth++;
6869 0 : if (r->domain) {
6870 0 : ndr_print_string(ndr, "domain", r->domain);
6871 : }
6872 0 : ndr->depth--;
6873 0 : break;
6874 :
6875 0 : case NETLOGON_CONTROL_TC_QUERY:
6876 0 : ndr_print_ptr(ndr, "domain", r->domain);
6877 0 : ndr->depth++;
6878 0 : if (r->domain) {
6879 0 : ndr_print_string(ndr, "domain", r->domain);
6880 : }
6881 0 : ndr->depth--;
6882 0 : break;
6883 :
6884 0 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
6885 0 : ndr_print_ptr(ndr, "domain", r->domain);
6886 0 : ndr->depth++;
6887 0 : if (r->domain) {
6888 0 : ndr_print_string(ndr, "domain", r->domain);
6889 : }
6890 0 : ndr->depth--;
6891 0 : break;
6892 :
6893 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD:
6894 0 : ndr_print_ptr(ndr, "domain", r->domain);
6895 0 : ndr->depth++;
6896 0 : if (r->domain) {
6897 0 : ndr_print_string(ndr, "domain", r->domain);
6898 : }
6899 0 : ndr->depth--;
6900 0 : break;
6901 :
6902 0 : case NETLOGON_CONTROL_TC_VERIFY:
6903 0 : ndr_print_ptr(ndr, "domain", r->domain);
6904 0 : ndr->depth++;
6905 0 : if (r->domain) {
6906 0 : ndr_print_string(ndr, "domain", r->domain);
6907 : }
6908 0 : ndr->depth--;
6909 0 : break;
6910 :
6911 0 : case NETLOGON_CONTROL_FIND_USER:
6912 0 : ndr_print_ptr(ndr, "user", r->user);
6913 0 : ndr->depth++;
6914 0 : if (r->user) {
6915 0 : ndr_print_string(ndr, "user", r->user);
6916 : }
6917 0 : ndr->depth--;
6918 0 : break;
6919 :
6920 0 : case NETLOGON_CONTROL_SET_DBFLAG:
6921 0 : ndr_print_uint32(ndr, "debug_level", r->debug_level);
6922 0 : break;
6923 :
6924 0 : default:
6925 0 : break;
6926 :
6927 : }
6928 0 : }
6929 :
6930 18375 : _PUBLIC_ enum ndr_err_code ndr_push_netr_NegotiateFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
6931 : {
6932 18375 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
6933 16488 : return NDR_ERR_SUCCESS;
6934 : }
6935 :
6936 25145 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_NegotiateFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
6937 : {
6938 2419 : uint32_t v;
6939 25145 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
6940 25145 : *r = v;
6941 25145 : return NDR_ERR_SUCCESS;
6942 : }
6943 :
6944 1070 : _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *name, uint32_t r)
6945 : {
6946 1070 : ndr_print_uint32(ndr, name, r);
6947 1070 : ndr->depth++;
6948 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_ACCOUNT_LOCKOUT", NETLOGON_NEG_ACCOUNT_LOCKOUT, r);
6949 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PERSISTENT_SAMREPL", NETLOGON_NEG_PERSISTENT_SAMREPL, r);
6950 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_ARCFOUR", NETLOGON_NEG_ARCFOUR, r);
6951 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PROMOTION_COUNT", NETLOGON_NEG_PROMOTION_COUNT, r);
6952 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CHANGELOG_BDC", NETLOGON_NEG_CHANGELOG_BDC, r);
6953 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_FULL_SYNC_REPL", NETLOGON_NEG_FULL_SYNC_REPL, r);
6954 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_MULTIPLE_SIDS", NETLOGON_NEG_MULTIPLE_SIDS, r);
6955 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_REDO", NETLOGON_NEG_REDO, r);
6956 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL", NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL, r);
6957 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SEND_PASSWORD_INFO_PDC", NETLOGON_NEG_SEND_PASSWORD_INFO_PDC, r);
6958 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_GENERIC_PASSTHROUGH", NETLOGON_NEG_GENERIC_PASSTHROUGH, r);
6959 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CONCURRENT_RPC", NETLOGON_NEG_CONCURRENT_RPC, r);
6960 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL", NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL, r);
6961 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL", NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL, r);
6962 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_STRONG_KEYS", NETLOGON_NEG_STRONG_KEYS, r);
6963 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_TRANSITIVE_TRUSTS", NETLOGON_NEG_TRANSITIVE_TRUSTS, r);
6964 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_DNS_DOMAIN_TRUSTS", NETLOGON_NEG_DNS_DOMAIN_TRUSTS, r);
6965 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_SET2", NETLOGON_NEG_PASSWORD_SET2, r);
6966 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_GETDOMAININFO", NETLOGON_NEG_GETDOMAININFO, r);
6967 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CROSS_FOREST_TRUSTS", NETLOGON_NEG_CROSS_FOREST_TRUSTS, r);
6968 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION", NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION, r);
6969 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_RODC_PASSTHROUGH", NETLOGON_NEG_RODC_PASSTHROUGH, r);
6970 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SUPPORTS_AES_SHA2", NETLOGON_NEG_SUPPORTS_AES_SHA2, r);
6971 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SUPPORTS_AES", NETLOGON_NEG_SUPPORTS_AES, r);
6972 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AUTHENTICATED_RPC_LSASS", NETLOGON_NEG_AUTHENTICATED_RPC_LSASS, r);
6973 1070 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AUTHENTICATED_RPC", NETLOGON_NEG_AUTHENTICATED_RPC, r);
6974 1070 : ndr->depth--;
6975 1070 : }
6976 :
6977 12 : static enum ndr_err_code ndr_push_SyncStateEnum(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum SyncStateEnum r)
6978 : {
6979 12 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
6980 12 : return NDR_ERR_SUCCESS;
6981 : }
6982 :
6983 12 : static enum ndr_err_code ndr_pull_SyncStateEnum(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum SyncStateEnum *r)
6984 : {
6985 0 : uint16_t v;
6986 12 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
6987 12 : *r = v;
6988 12 : return NDR_ERR_SUCCESS;
6989 : }
6990 :
6991 0 : _PUBLIC_ void ndr_print_SyncStateEnum(struct ndr_print *ndr, const char *name, enum SyncStateEnum r)
6992 : {
6993 0 : const char *val = NULL;
6994 :
6995 0 : switch (r) {
6996 0 : case SYNCSTATE_NORMAL_STATE: val = "SYNCSTATE_NORMAL_STATE"; break;
6997 0 : case SYNCSTATE_DOMAIN_STATE: val = "SYNCSTATE_DOMAIN_STATE"; break;
6998 0 : case SYNCSTATE_GROUP_STATE: val = "SYNCSTATE_GROUP_STATE"; break;
6999 0 : case SYNCSTATE_UAS_BUILT_IN_GROUP_STATE: val = "SYNCSTATE_UAS_BUILT_IN_GROUP_STATE"; break;
7000 0 : case SYNCSTATE_USER_STATE: val = "SYNCSTATE_USER_STATE"; break;
7001 0 : case SYNCSTATE_GROUP_MEMBER_STATE: val = "SYNCSTATE_GROUP_MEMBER_STATE"; break;
7002 0 : case SYNCSTATE_ALIAS_STATE: val = "SYNCSTATE_ALIAS_STATE"; break;
7003 0 : case SYNCSTATE_ALIAS_MEMBER_STATE: val = "SYNCSTATE_ALIAS_MEMBER_STATE"; break;
7004 0 : case SYNCSTATE_SAM_DONE_STATE: val = "SYNCSTATE_SAM_DONE_STATE"; break;
7005 : }
7006 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
7007 0 : }
7008 :
7009 48 : static enum ndr_err_code ndr_push_netr_ChangeLogFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint16_t r)
7010 : {
7011 48 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
7012 40 : return NDR_ERR_SUCCESS;
7013 : }
7014 :
7015 24 : static enum ndr_err_code ndr_pull_netr_ChangeLogFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint16_t *r)
7016 : {
7017 4 : uint16_t v;
7018 24 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
7019 24 : *r = v;
7020 24 : return NDR_ERR_SUCCESS;
7021 : }
7022 :
7023 0 : _PUBLIC_ void ndr_print_netr_ChangeLogFlags(struct ndr_print *ndr, const char *name, uint16_t r)
7024 : {
7025 0 : ndr_print_uint16(ndr, name, r);
7026 0 : ndr->depth++;
7027 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED", NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED, r);
7028 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_CHANGED_PASSWORD", NETR_CHANGELOG_CHANGED_PASSWORD, r);
7029 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_SID_INCLUDED", NETR_CHANGELOG_SID_INCLUDED, r);
7030 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_NAME_INCLUDED", NETR_CHANGELOG_NAME_INCLUDED, r);
7031 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_FIRST_PROMOTION_OBJ", NETR_CHANGELOG_FIRST_PROMOTION_OBJ, r);
7032 0 : ndr->depth--;
7033 0 : }
7034 :
7035 88 : static enum ndr_err_code ndr_push_netr_ChangeLogObject(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_ChangeLogObject *r)
7036 : {
7037 8 : uint32_t level;
7038 88 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7039 88 : if (ndr_flags & NDR_SCALARS) {
7040 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7041 48 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7042 : /* ms_union is always aligned to the largest union arm*/
7043 48 : NDR_CHECK(ndr_push_align(ndr, 4));
7044 48 : switch (level) {
7045 0 : case NETR_CHANGELOG_SID_INCLUDED: {
7046 0 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
7047 0 : break; }
7048 :
7049 0 : case NETR_CHANGELOG_NAME_INCLUDED: {
7050 : {
7051 0 : libndr_flags _flags_save_string = ndr->flags;
7052 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7053 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->object_name));
7054 0 : ndr->flags = _flags_save_string;
7055 : }
7056 0 : break; }
7057 :
7058 40 : default: {
7059 40 : break; }
7060 :
7061 : }
7062 : }
7063 80 : return NDR_ERR_SUCCESS;
7064 : }
7065 :
7066 44 : static enum ndr_err_code ndr_pull_netr_ChangeLogObject(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_ChangeLogObject *r)
7067 : {
7068 4 : uint32_t level;
7069 44 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7070 44 : if (ndr_flags & NDR_SCALARS) {
7071 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7072 24 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7073 : /* ms_union is always aligned to the largest union arm*/
7074 24 : NDR_CHECK(ndr_pull_align(ndr, 4));
7075 24 : switch (level) {
7076 0 : case NETR_CHANGELOG_SID_INCLUDED: {
7077 0 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
7078 0 : break; }
7079 :
7080 0 : case NETR_CHANGELOG_NAME_INCLUDED: {
7081 : {
7082 0 : libndr_flags _flags_save_string = ndr->flags;
7083 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7084 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->object_name));
7085 0 : ndr->flags = _flags_save_string;
7086 : }
7087 0 : break; }
7088 :
7089 20 : default: {
7090 20 : break; }
7091 :
7092 : }
7093 : }
7094 40 : return NDR_ERR_SUCCESS;
7095 : }
7096 :
7097 0 : _PUBLIC_ void ndr_print_netr_ChangeLogObject(struct ndr_print *ndr, const char *name, const union netr_ChangeLogObject *r)
7098 : {
7099 0 : uint32_t level;
7100 0 : level = ndr_print_steal_switch_value(ndr, r);
7101 0 : ndr_print_union(ndr, name, level, "netr_ChangeLogObject");
7102 0 : switch (level) {
7103 0 : case NETR_CHANGELOG_SID_INCLUDED:
7104 0 : ndr_print_dom_sid(ndr, "object_sid", &r->object_sid);
7105 0 : break;
7106 :
7107 0 : case NETR_CHANGELOG_NAME_INCLUDED:
7108 : {
7109 0 : libndr_flags _flags_save_string = ndr->flags;
7110 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7111 0 : ndr_print_string(ndr, "object_name", r->object_name);
7112 0 : ndr->flags = _flags_save_string;
7113 : }
7114 0 : break;
7115 :
7116 0 : default:
7117 0 : break;
7118 :
7119 : }
7120 0 : }
7121 :
7122 48 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ChangeLogEntry(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_ChangeLogEntry *r)
7123 : {
7124 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7125 48 : if (ndr_flags & NDR_SCALARS) {
7126 48 : NDR_CHECK(ndr_push_align(ndr, 4));
7127 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number1));
7128 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number2));
7129 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_rid));
7130 56 : NDR_CHECK(ndr_push_netr_ChangeLogFlags(ndr, NDR_SCALARS, r->flags));
7131 48 : NDR_CHECK(ndr_push_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, r->db_index));
7132 48 : NDR_CHECK(ndr_push_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, r->delta_type));
7133 48 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
7134 48 : NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
7135 48 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7136 : }
7137 48 : if (ndr_flags & NDR_BUFFERS) {
7138 48 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
7139 40 : NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
7140 : }
7141 40 : return NDR_ERR_SUCCESS;
7142 : }
7143 :
7144 24 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ChangeLogEntry(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_ChangeLogEntry *r)
7145 : {
7146 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7147 24 : if (ndr_flags & NDR_SCALARS) {
7148 24 : NDR_CHECK(ndr_pull_align(ndr, 4));
7149 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number1));
7150 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number2));
7151 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_rid));
7152 28 : NDR_CHECK(ndr_pull_netr_ChangeLogFlags(ndr, NDR_SCALARS, &r->flags));
7153 24 : NDR_CHECK(ndr_pull_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, &r->db_index));
7154 24 : NDR_CHECK(ndr_pull_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, &r->delta_type));
7155 24 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
7156 24 : NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
7157 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7158 : }
7159 24 : if (ndr_flags & NDR_BUFFERS) {
7160 24 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
7161 20 : NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
7162 : }
7163 20 : return NDR_ERR_SUCCESS;
7164 : }
7165 :
7166 0 : static void ndr_print_flags_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_ChangeLogEntry *r)
7167 : {
7168 0 : ndr_print_netr_ChangeLogEntry(ndr, name, r);
7169 0 : }
7170 :
7171 0 : _PUBLIC_ void ndr_print_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, const struct netr_ChangeLogEntry *r)
7172 : {
7173 0 : ndr_print_struct(ndr, name, "netr_ChangeLogEntry");
7174 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7175 0 : ndr->depth++;
7176 0 : ndr_print_uint32(ndr, "serial_number1", r->serial_number1);
7177 0 : ndr_print_uint32(ndr, "serial_number2", r->serial_number2);
7178 0 : ndr_print_uint32(ndr, "object_rid", r->object_rid);
7179 0 : ndr_print_netr_ChangeLogFlags(ndr, "flags", r->flags);
7180 0 : ndr_print_netr_SamDatabaseID8Bit(ndr, "db_index", r->db_index);
7181 0 : ndr_print_netr_DeltaEnum8Bit(ndr, "delta_type", r->delta_type);
7182 0 : ndr_print_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED));
7183 0 : ndr_print_netr_ChangeLogObject(ndr, "object", &r->object);
7184 0 : ndr->depth--;
7185 : }
7186 :
7187 24 : _PUBLIC_ size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, libndr_flags flags)
7188 : {
7189 24 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
7190 : }
7191 :
7192 0 : static enum ndr_err_code ndr_push_netr_Blob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_Blob *r)
7193 : {
7194 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7195 0 : if (ndr_flags & NDR_SCALARS) {
7196 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7197 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
7198 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
7199 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7200 : }
7201 0 : if (ndr_flags & NDR_BUFFERS) {
7202 0 : if (r->data) {
7203 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
7204 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
7205 : }
7206 : }
7207 0 : return NDR_ERR_SUCCESS;
7208 : }
7209 :
7210 0 : static enum ndr_err_code ndr_pull_netr_Blob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_Blob *r)
7211 : {
7212 0 : uint32_t _ptr_data;
7213 0 : uint32_t size_data_1 = 0;
7214 0 : TALLOC_CTX *_mem_save_data_0 = NULL;
7215 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7216 0 : if (ndr_flags & NDR_SCALARS) {
7217 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7218 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
7219 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
7220 0 : if (_ptr_data) {
7221 0 : NDR_PULL_ALLOC(ndr, r->data);
7222 : } else {
7223 0 : r->data = NULL;
7224 : }
7225 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7226 : }
7227 0 : if (ndr_flags & NDR_BUFFERS) {
7228 0 : if (r->data) {
7229 0 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
7230 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
7231 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
7232 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
7233 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
7234 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
7235 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
7236 : }
7237 0 : if (r->data) {
7238 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
7239 : }
7240 : }
7241 0 : return NDR_ERR_SUCCESS;
7242 : }
7243 :
7244 0 : _PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r)
7245 : {
7246 0 : ndr_print_struct(ndr, name, "netr_Blob");
7247 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7248 0 : ndr->depth++;
7249 0 : ndr_print_uint32(ndr, "length", r->length);
7250 0 : ndr_print_ptr(ndr, "data", r->data);
7251 0 : ndr->depth++;
7252 0 : if (r->data) {
7253 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
7254 : }
7255 0 : ndr->depth--;
7256 0 : ndr->depth--;
7257 : }
7258 :
7259 375 : static enum ndr_err_code ndr_push_netr_DsRGetDCName_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
7260 : {
7261 375 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7262 341 : return NDR_ERR_SUCCESS;
7263 : }
7264 :
7265 391 : static enum ndr_err_code ndr_pull_netr_DsRGetDCName_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
7266 : {
7267 34 : uint32_t v;
7268 391 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7269 391 : *r = v;
7270 391 : return NDR_ERR_SUCCESS;
7271 : }
7272 :
7273 0 : _PUBLIC_ void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r)
7274 : {
7275 0 : ndr_print_uint32(ndr, name, r);
7276 0 : ndr->depth++;
7277 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_FORCE_REDISCOVERY", DS_FORCE_REDISCOVERY, r);
7278 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_REQUIRED", DS_DIRECTORY_SERVICE_REQUIRED, r);
7279 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_PREFERRED", DS_DIRECTORY_SERVICE_PREFERRED, r);
7280 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GC_SERVER_REQUIRED", DS_GC_SERVER_REQUIRED, r);
7281 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_PDC_REQUIRED", DS_PDC_REQUIRED, r);
7282 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_BACKGROUND_ONLY", DS_BACKGROUND_ONLY, r);
7283 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IP_REQUIRED", DS_IP_REQUIRED, r);
7284 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_KDC_REQUIRED", DS_KDC_REQUIRED, r);
7285 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TIMESERV_REQUIRED", DS_TIMESERV_REQUIRED, r);
7286 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_WRITABLE_REQUIRED", DS_WRITABLE_REQUIRED, r);
7287 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GOOD_TIMESERV_PREFERRED", DS_GOOD_TIMESERV_PREFERRED, r);
7288 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_AVOID_SELF", DS_AVOID_SELF, r);
7289 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED, r);
7290 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_FLAT_NAME", DS_IS_FLAT_NAME, r);
7291 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_DNS_NAME", DS_IS_DNS_NAME, r);
7292 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TRY_NEXTCLOSEST_SITE", DS_TRY_NEXTCLOSEST_SITE, r);
7293 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_6_REQUIRED", DS_DIRECTORY_SERVICE_6_REQUIRED, r);
7294 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_WEB_SERVICE_REQUIRED", DS_WEB_SERVICE_REQUIRED, r);
7295 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_8_REQUIRED", DS_DIRECTORY_SERVICE_8_REQUIRED, r);
7296 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_9_REQUIRED", DS_DIRECTORY_SERVICE_9_REQUIRED, r);
7297 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_10_REQUIRED", DS_DIRECTORY_SERVICE_10_REQUIRED, r);
7298 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_DNS_NAME", DS_RETURN_DNS_NAME, r);
7299 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME, r);
7300 0 : ndr->depth--;
7301 0 : }
7302 :
7303 2051 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo_AddressType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_DsRGetDCNameInfo_AddressType r)
7304 : {
7305 2051 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
7306 2009 : return NDR_ERR_SUCCESS;
7307 : }
7308 :
7309 461 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo_AddressType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_DsRGetDCNameInfo_AddressType *r)
7310 : {
7311 38 : uint32_t v;
7312 461 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
7313 461 : *r = v;
7314 461 : return NDR_ERR_SUCCESS;
7315 : }
7316 :
7317 222 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r)
7318 : {
7319 222 : const char *val = NULL;
7320 :
7321 222 : switch (r) {
7322 222 : case DS_ADDRESS_TYPE_INET: val = "DS_ADDRESS_TYPE_INET"; break;
7323 0 : case DS_ADDRESS_TYPE_NETBIOS: val = "DS_ADDRESS_TYPE_NETBIOS"; break;
7324 : }
7325 222 : ndr_print_enum(ndr, name, "ENUM", val, r);
7326 222 : }
7327 :
7328 3671 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DsRGetDCNameInfo *r)
7329 : {
7330 3671 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7331 3671 : if (ndr_flags & NDR_SCALARS) {
7332 2051 : NDR_CHECK(ndr_push_align(ndr, 5));
7333 2051 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_unc));
7334 2051 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_address));
7335 2093 : NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, r->dc_address_type));
7336 2051 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
7337 2051 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
7338 2051 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_name));
7339 2051 : NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->dc_flags));
7340 2051 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_site_name));
7341 2051 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_site_name));
7342 2051 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7343 : }
7344 3671 : if (ndr_flags & NDR_BUFFERS) {
7345 2051 : if (r->dc_unc) {
7346 2051 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
7347 2051 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7348 2051 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
7349 2051 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_unc, ndr_charset_length(r->dc_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7350 : }
7351 2051 : if (r->dc_address) {
7352 2051 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16)));
7353 2051 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7354 2051 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16)));
7355 2051 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_address, ndr_charset_length(r->dc_address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7356 : }
7357 2051 : if (r->domain_name) {
7358 2051 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
7359 2051 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7360 2051 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
7361 2051 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7362 : }
7363 2051 : if (r->forest_name) {
7364 2037 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
7365 2037 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7366 2037 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
7367 2037 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->forest_name, ndr_charset_length(r->forest_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7368 : }
7369 2051 : if (r->dc_site_name) {
7370 1497 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
7371 1497 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7372 1497 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
7373 1497 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_site_name, ndr_charset_length(r->dc_site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7374 : }
7375 2051 : if (r->client_site_name) {
7376 1473 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
7377 1473 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7378 1473 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
7379 1473 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_site_name, ndr_charset_length(r->client_site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7380 : }
7381 : }
7382 3629 : return NDR_ERR_SUCCESS;
7383 : }
7384 :
7385 501 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DsRGetDCNameInfo *r)
7386 : {
7387 42 : uint32_t _ptr_dc_unc;
7388 501 : uint32_t size_dc_unc_1 = 0;
7389 501 : uint32_t length_dc_unc_1 = 0;
7390 501 : TALLOC_CTX *_mem_save_dc_unc_0 = NULL;
7391 42 : uint32_t _ptr_dc_address;
7392 501 : uint32_t size_dc_address_1 = 0;
7393 501 : uint32_t length_dc_address_1 = 0;
7394 501 : TALLOC_CTX *_mem_save_dc_address_0 = NULL;
7395 42 : uint32_t _ptr_domain_name;
7396 501 : uint32_t size_domain_name_1 = 0;
7397 501 : uint32_t length_domain_name_1 = 0;
7398 501 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
7399 42 : uint32_t _ptr_forest_name;
7400 501 : uint32_t size_forest_name_1 = 0;
7401 501 : uint32_t length_forest_name_1 = 0;
7402 501 : TALLOC_CTX *_mem_save_forest_name_0 = NULL;
7403 42 : uint32_t _ptr_dc_site_name;
7404 501 : uint32_t size_dc_site_name_1 = 0;
7405 501 : uint32_t length_dc_site_name_1 = 0;
7406 501 : TALLOC_CTX *_mem_save_dc_site_name_0 = NULL;
7407 42 : uint32_t _ptr_client_site_name;
7408 501 : uint32_t size_client_site_name_1 = 0;
7409 501 : uint32_t length_client_site_name_1 = 0;
7410 501 : TALLOC_CTX *_mem_save_client_site_name_0 = NULL;
7411 501 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7412 501 : if (ndr_flags & NDR_SCALARS) {
7413 461 : NDR_CHECK(ndr_pull_align(ndr, 5));
7414 461 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_unc));
7415 461 : if (_ptr_dc_unc) {
7416 461 : NDR_PULL_ALLOC(ndr, r->dc_unc);
7417 : } else {
7418 0 : r->dc_unc = NULL;
7419 : }
7420 461 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_address));
7421 461 : if (_ptr_dc_address) {
7422 461 : NDR_PULL_ALLOC(ndr, r->dc_address);
7423 : } else {
7424 0 : r->dc_address = NULL;
7425 : }
7426 499 : NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, &r->dc_address_type));
7427 461 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
7428 461 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
7429 461 : if (_ptr_domain_name) {
7430 461 : NDR_PULL_ALLOC(ndr, r->domain_name);
7431 : } else {
7432 0 : r->domain_name = NULL;
7433 : }
7434 461 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_name));
7435 461 : if (_ptr_forest_name) {
7436 437 : NDR_PULL_ALLOC(ndr, r->forest_name);
7437 : } else {
7438 24 : r->forest_name = NULL;
7439 : }
7440 461 : NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->dc_flags));
7441 461 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_site_name));
7442 461 : if (_ptr_dc_site_name) {
7443 427 : NDR_PULL_ALLOC(ndr, r->dc_site_name);
7444 : } else {
7445 34 : r->dc_site_name = NULL;
7446 : }
7447 461 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_site_name));
7448 461 : if (_ptr_client_site_name) {
7449 403 : NDR_PULL_ALLOC(ndr, r->client_site_name);
7450 : } else {
7451 58 : r->client_site_name = NULL;
7452 : }
7453 461 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7454 : }
7455 501 : if (ndr_flags & NDR_BUFFERS) {
7456 461 : if (r->dc_unc) {
7457 461 : _mem_save_dc_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
7458 461 : NDR_PULL_SET_MEM_CTX(ndr, r->dc_unc, 0);
7459 461 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_unc));
7460 461 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_unc));
7461 461 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_unc, &size_dc_unc_1));
7462 461 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_unc, &length_dc_unc_1));
7463 461 : if (length_dc_unc_1 > size_dc_unc_1) {
7464 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dc_unc_1, length_dc_unc_1);
7465 : }
7466 461 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_unc_1, sizeof(uint16_t)));
7467 461 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_unc, length_dc_unc_1, sizeof(uint16_t), CH_UTF16));
7468 461 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_unc_0, 0);
7469 : }
7470 461 : if (r->dc_address) {
7471 461 : _mem_save_dc_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
7472 461 : NDR_PULL_SET_MEM_CTX(ndr, r->dc_address, 0);
7473 461 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_address));
7474 461 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_address));
7475 461 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_address, &size_dc_address_1));
7476 461 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_address, &length_dc_address_1));
7477 461 : if (length_dc_address_1 > size_dc_address_1) {
7478 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dc_address_1, length_dc_address_1);
7479 : }
7480 461 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_address_1, sizeof(uint16_t)));
7481 461 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_address, length_dc_address_1, sizeof(uint16_t), CH_UTF16));
7482 461 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_address_0, 0);
7483 : }
7484 461 : if (r->domain_name) {
7485 461 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7486 461 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
7487 461 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
7488 461 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
7489 461 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
7490 461 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
7491 461 : if (length_domain_name_1 > size_domain_name_1) {
7492 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
7493 : }
7494 461 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
7495 461 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
7496 461 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
7497 : }
7498 461 : if (r->forest_name) {
7499 437 : _mem_save_forest_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7500 437 : NDR_PULL_SET_MEM_CTX(ndr, r->forest_name, 0);
7501 437 : NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_name));
7502 437 : NDR_CHECK(ndr_pull_array_length(ndr, &r->forest_name));
7503 437 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->forest_name, &size_forest_name_1));
7504 437 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->forest_name, &length_forest_name_1));
7505 437 : if (length_forest_name_1 > size_forest_name_1) {
7506 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_forest_name_1, length_forest_name_1);
7507 : }
7508 437 : NDR_CHECK(ndr_check_string_terminator(ndr, length_forest_name_1, sizeof(uint16_t)));
7509 437 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest_name, length_forest_name_1, sizeof(uint16_t), CH_UTF16));
7510 437 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_name_0, 0);
7511 : }
7512 461 : if (r->dc_site_name) {
7513 427 : _mem_save_dc_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7514 427 : NDR_PULL_SET_MEM_CTX(ndr, r->dc_site_name, 0);
7515 427 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_site_name));
7516 427 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_site_name));
7517 427 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_site_name, &size_dc_site_name_1));
7518 427 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_site_name, &length_dc_site_name_1));
7519 427 : if (length_dc_site_name_1 > size_dc_site_name_1) {
7520 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dc_site_name_1, length_dc_site_name_1);
7521 : }
7522 427 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_site_name_1, sizeof(uint16_t)));
7523 427 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_site_name, length_dc_site_name_1, sizeof(uint16_t), CH_UTF16));
7524 427 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_site_name_0, 0);
7525 : }
7526 461 : if (r->client_site_name) {
7527 403 : _mem_save_client_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7528 403 : NDR_PULL_SET_MEM_CTX(ndr, r->client_site_name, 0);
7529 403 : NDR_CHECK(ndr_pull_array_size(ndr, &r->client_site_name));
7530 403 : NDR_CHECK(ndr_pull_array_length(ndr, &r->client_site_name));
7531 403 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client_site_name, &size_client_site_name_1));
7532 403 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client_site_name, &length_client_site_name_1));
7533 403 : if (length_client_site_name_1 > size_client_site_name_1) {
7534 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_client_site_name_1, length_client_site_name_1);
7535 : }
7536 403 : NDR_CHECK(ndr_check_string_terminator(ndr, length_client_site_name_1, sizeof(uint16_t)));
7537 403 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_site_name, length_client_site_name_1, sizeof(uint16_t), CH_UTF16));
7538 403 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_site_name_0, 0);
7539 : }
7540 : }
7541 459 : return NDR_ERR_SUCCESS;
7542 : }
7543 :
7544 0 : static void ndr_print_flags_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_DsRGetDCNameInfo *r)
7545 : {
7546 0 : ndr_print_netr_DsRGetDCNameInfo(ndr, name, r);
7547 0 : }
7548 :
7549 222 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r)
7550 : {
7551 222 : ndr_print_struct(ndr, name, "netr_DsRGetDCNameInfo");
7552 222 : if (r == NULL) { ndr_print_null(ndr); return; }
7553 222 : ndr->depth++;
7554 222 : ndr_print_ptr(ndr, "dc_unc", r->dc_unc);
7555 222 : ndr->depth++;
7556 222 : if (r->dc_unc) {
7557 222 : ndr_print_string(ndr, "dc_unc", r->dc_unc);
7558 : }
7559 222 : ndr->depth--;
7560 222 : ndr_print_ptr(ndr, "dc_address", r->dc_address);
7561 222 : ndr->depth++;
7562 222 : if (r->dc_address) {
7563 222 : ndr_print_string(ndr, "dc_address", r->dc_address);
7564 : }
7565 222 : ndr->depth--;
7566 222 : ndr_print_netr_DsRGetDCNameInfo_AddressType(ndr, "dc_address_type", r->dc_address_type);
7567 222 : ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
7568 222 : ndr_print_ptr(ndr, "domain_name", r->domain_name);
7569 222 : ndr->depth++;
7570 222 : if (r->domain_name) {
7571 222 : ndr_print_string(ndr, "domain_name", r->domain_name);
7572 : }
7573 222 : ndr->depth--;
7574 222 : ndr_print_ptr(ndr, "forest_name", r->forest_name);
7575 222 : ndr->depth++;
7576 222 : if (r->forest_name) {
7577 204 : ndr_print_string(ndr, "forest_name", r->forest_name);
7578 : }
7579 222 : ndr->depth--;
7580 222 : ndr_print_nbt_server_type(ndr, "dc_flags", r->dc_flags);
7581 222 : ndr_print_ptr(ndr, "dc_site_name", r->dc_site_name);
7582 222 : ndr->depth++;
7583 222 : if (r->dc_site_name) {
7584 186 : ndr_print_string(ndr, "dc_site_name", r->dc_site_name);
7585 : }
7586 222 : ndr->depth--;
7587 222 : ndr_print_ptr(ndr, "client_site_name", r->client_site_name);
7588 222 : ndr->depth++;
7589 222 : if (r->client_site_name) {
7590 186 : ndr_print_string(ndr, "client_site_name", r->client_site_name);
7591 : }
7592 222 : ndr->depth--;
7593 222 : ndr->depth--;
7594 : }
7595 :
7596 1184 : static enum ndr_err_code ndr_push_netr_Capabilities(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_Capabilities *r)
7597 : {
7598 156 : uint32_t level;
7599 1184 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7600 1184 : if (ndr_flags & NDR_SCALARS) {
7601 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7602 1184 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7603 1184 : NDR_CHECK(ndr_push_union_align(ndr, 4));
7604 1184 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
7605 : /* ms_union is always aligned to the largest union arm*/
7606 1184 : NDR_CHECK(ndr_push_align(ndr, 4));
7607 1184 : switch (level) {
7608 1184 : case 1: {
7609 1184 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->server_capabilities));
7610 1028 : break; }
7611 :
7612 0 : case 2: {
7613 0 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->server_capabilities));
7614 0 : break; }
7615 :
7616 0 : default:
7617 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7618 : }
7619 : }
7620 1184 : if (ndr_flags & NDR_BUFFERS) {
7621 0 : if (!(ndr_flags & NDR_SCALARS)) {
7622 : /* We didn't get it above, and the token is not needed after this. */
7623 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7624 : }
7625 0 : switch (level) {
7626 0 : case 1:
7627 0 : break;
7628 :
7629 0 : case 2:
7630 0 : break;
7631 :
7632 0 : default:
7633 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
7634 : }
7635 : }
7636 1028 : return NDR_ERR_SUCCESS;
7637 : }
7638 :
7639 994 : static enum ndr_err_code ndr_pull_netr_Capabilities(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_Capabilities *r)
7640 : {
7641 130 : uint32_t level;
7642 130 : uint32_t _level;
7643 994 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7644 994 : if (ndr_flags & NDR_SCALARS) {
7645 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7646 994 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7647 994 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
7648 994 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
7649 994 : if (_level != level) {
7650 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
7651 : }
7652 : /* ms_union is always aligned to the largest union arm*/
7653 994 : NDR_CHECK(ndr_pull_align(ndr, 4));
7654 994 : switch (level) {
7655 994 : case 1: {
7656 994 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->server_capabilities));
7657 864 : break; }
7658 :
7659 0 : case 2: {
7660 0 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->server_capabilities));
7661 0 : break; }
7662 :
7663 0 : default:
7664 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7665 : }
7666 : }
7667 994 : if (ndr_flags & NDR_BUFFERS) {
7668 0 : if (!(ndr_flags & NDR_SCALARS)) {
7669 : /* We didn't get it above, and the token is not needed after this. */
7670 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7671 : }
7672 0 : switch (level) {
7673 0 : case 1:
7674 0 : break;
7675 :
7676 0 : case 2:
7677 0 : break;
7678 :
7679 0 : default:
7680 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
7681 : }
7682 : }
7683 864 : return NDR_ERR_SUCCESS;
7684 : }
7685 :
7686 312 : _PUBLIC_ void ndr_print_netr_Capabilities(struct ndr_print *ndr, const char *name, const union netr_Capabilities *r)
7687 : {
7688 52 : uint32_t level;
7689 312 : level = ndr_print_steal_switch_value(ndr, r);
7690 312 : ndr_print_union(ndr, name, level, "netr_Capabilities");
7691 312 : switch (level) {
7692 312 : case 1:
7693 312 : ndr_print_netr_NegotiateFlags(ndr, "server_capabilities", r->server_capabilities);
7694 312 : break;
7695 :
7696 0 : case 2:
7697 0 : ndr_print_netr_NegotiateFlags(ndr, "server_capabilities", r->server_capabilities);
7698 0 : break;
7699 :
7700 0 : default:
7701 0 : ndr_print_bad_level(ndr, name, level);
7702 : }
7703 312 : }
7704 :
7705 477 : _PUBLIC_ enum ndr_err_code ndr_push_netr_TrustFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
7706 : {
7707 477 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7708 433 : return NDR_ERR_SUCCESS;
7709 : }
7710 :
7711 4756 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_TrustFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
7712 : {
7713 44 : uint32_t v;
7714 4756 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7715 4756 : *r = v;
7716 4756 : return NDR_ERR_SUCCESS;
7717 : }
7718 :
7719 107 : _PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r)
7720 : {
7721 107 : ndr_print_uint32(ndr, name, r);
7722 107 : ndr->depth++;
7723 107 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_IN_FOREST", NETR_TRUST_FLAG_IN_FOREST, r);
7724 107 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_OUTBOUND", NETR_TRUST_FLAG_OUTBOUND, r);
7725 107 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_TREEROOT", NETR_TRUST_FLAG_TREEROOT, r);
7726 107 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_PRIMARY", NETR_TRUST_FLAG_PRIMARY, r);
7727 107 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_NATIVE", NETR_TRUST_FLAG_NATIVE, r);
7728 107 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_INBOUND", NETR_TRUST_FLAG_INBOUND, r);
7729 107 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_MIT_KRB5", NETR_TRUST_FLAG_MIT_KRB5, r);
7730 107 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_AES", NETR_TRUST_FLAG_AES, r);
7731 107 : ndr->depth--;
7732 107 : }
7733 :
7734 430 : static enum ndr_err_code ndr_push_netr_WorkstationFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
7735 : {
7736 430 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7737 367 : return NDR_ERR_SUCCESS;
7738 : }
7739 :
7740 406 : static enum ndr_err_code ndr_pull_netr_WorkstationFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
7741 : {
7742 70 : uint32_t v;
7743 406 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7744 406 : *r = v;
7745 406 : return NDR_ERR_SUCCESS;
7746 : }
7747 :
7748 98 : _PUBLIC_ void ndr_print_netr_WorkstationFlags(struct ndr_print *ndr, const char *name, uint32_t r)
7749 : {
7750 98 : ndr_print_uint32(ndr, name, r);
7751 98 : ndr->depth++;
7752 98 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS, r);
7753 98 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_SPN_UPDATE", NETR_WS_FLAG_HANDLES_SPN_UPDATE, r);
7754 98 : ndr->depth--;
7755 98 : }
7756 :
7757 48 : static enum ndr_err_code ndr_push_netr_SuiteMask(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint16_t r)
7758 : {
7759 48 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
7760 40 : return NDR_ERR_SUCCESS;
7761 : }
7762 :
7763 50 : static enum ndr_err_code ndr_pull_netr_SuiteMask(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint16_t *r)
7764 : {
7765 10 : uint16_t v;
7766 50 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
7767 50 : *r = v;
7768 50 : return NDR_ERR_SUCCESS;
7769 : }
7770 :
7771 2 : _PUBLIC_ void ndr_print_netr_SuiteMask(struct ndr_print *ndr, const char *name, uint16_t r)
7772 : {
7773 2 : ndr_print_uint16(ndr, name, r);
7774 2 : ndr->depth++;
7775 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_BACKOFFICE", NETR_VER_SUITE_BACKOFFICE, r);
7776 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_BLADE", NETR_VER_SUITE_BLADE, r);
7777 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_COMPUTE_SERVER", NETR_VER_SUITE_COMPUTE_SERVER, r);
7778 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_DATACENTER", NETR_VER_SUITE_DATACENTER, r);
7779 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_ENTERPRISE", NETR_VER_SUITE_ENTERPRISE, r);
7780 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_EMBEDDEDNT", NETR_VER_SUITE_EMBEDDEDNT, r);
7781 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_PERSONAL", NETR_VER_SUITE_PERSONAL, r);
7782 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SINGLEUSERTS", NETR_VER_SUITE_SINGLEUSERTS, r);
7783 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SMALLBUSINESS", NETR_VER_SUITE_SMALLBUSINESS, r);
7784 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED", NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED, r);
7785 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_STORAGE_SERVER", NETR_VER_SUITE_STORAGE_SERVER, r);
7786 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_TERMINAL", NETR_VER_SUITE_TERMINAL, r);
7787 2 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_WH_SERVER", NETR_VER_SUITE_WH_SERVER, r);
7788 2 : ndr->depth--;
7789 2 : }
7790 :
7791 48 : static enum ndr_err_code ndr_push_netr_ProductType(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint8_t r)
7792 : {
7793 48 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
7794 40 : return NDR_ERR_SUCCESS;
7795 : }
7796 :
7797 50 : static enum ndr_err_code ndr_pull_netr_ProductType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint8_t *r)
7798 : {
7799 10 : uint8_t v;
7800 50 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
7801 50 : *r = v;
7802 50 : return NDR_ERR_SUCCESS;
7803 : }
7804 :
7805 2 : _PUBLIC_ void ndr_print_netr_ProductType(struct ndr_print *ndr, const char *name, uint8_t r)
7806 : {
7807 2 : ndr_print_uint8(ndr, name, r);
7808 2 : ndr->depth++;
7809 2 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_DOMAIN_CONTROLLER", NETR_VER_NT_DOMAIN_CONTROLLER, r);
7810 2 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_SERVER", NETR_VER_NT_SERVER, r);
7811 2 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_WORKSTATION", NETR_VER_NT_WORKSTATION, r);
7812 2 : ndr->depth--;
7813 2 : }
7814 :
7815 874 : static enum ndr_err_code ndr_push_netr_LsaPolicyInformation(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_LsaPolicyInformation *r)
7816 : {
7817 874 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7818 874 : if (ndr_flags & NDR_SCALARS) {
7819 444 : NDR_CHECK(ndr_push_align(ndr, 5));
7820 444 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->policy_size));
7821 444 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
7822 444 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7823 : }
7824 874 : if (ndr_flags & NDR_BUFFERS) {
7825 444 : if (r->policy) {
7826 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->policy_size));
7827 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->policy, r->policy_size));
7828 : }
7829 : }
7830 748 : return NDR_ERR_SUCCESS;
7831 : }
7832 :
7833 822 : static enum ndr_err_code ndr_pull_netr_LsaPolicyInformation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_LsaPolicyInformation *r)
7834 : {
7835 140 : uint32_t _ptr_policy;
7836 822 : uint32_t size_policy_1 = 0;
7837 822 : TALLOC_CTX *_mem_save_policy_0 = NULL;
7838 822 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7839 822 : if (ndr_flags & NDR_SCALARS) {
7840 416 : NDR_CHECK(ndr_pull_align(ndr, 5));
7841 416 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->policy_size));
7842 416 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
7843 416 : if (_ptr_policy) {
7844 0 : NDR_PULL_ALLOC(ndr, r->policy);
7845 : } else {
7846 416 : r->policy = NULL;
7847 : }
7848 416 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7849 : }
7850 822 : if (ndr_flags & NDR_BUFFERS) {
7851 416 : if (r->policy) {
7852 0 : _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr);
7853 0 : NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0);
7854 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->policy));
7855 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->policy, &size_policy_1));
7856 0 : NDR_PULL_ALLOC_N(ndr, r->policy, size_policy_1);
7857 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->policy, size_policy_1));
7858 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
7859 : }
7860 416 : if (r->policy) {
7861 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->policy, r->policy_size));
7862 : }
7863 : }
7864 682 : return NDR_ERR_SUCCESS;
7865 : }
7866 :
7867 98 : _PUBLIC_ void ndr_print_netr_LsaPolicyInformation(struct ndr_print *ndr, const char *name, const struct netr_LsaPolicyInformation *r)
7868 : {
7869 98 : ndr_print_struct(ndr, name, "netr_LsaPolicyInformation");
7870 98 : if (r == NULL) { ndr_print_null(ndr); return; }
7871 98 : ndr->depth++;
7872 98 : ndr_print_uint32(ndr, "policy_size", r->policy_size);
7873 98 : ndr_print_ptr(ndr, "policy", r->policy);
7874 98 : ndr->depth++;
7875 98 : if (r->policy) {
7876 0 : ndr_print_array_uint8(ndr, "policy", r->policy, r->policy_size);
7877 : }
7878 98 : ndr->depth--;
7879 98 : ndr->depth--;
7880 : }
7881 :
7882 48 : static enum ndr_err_code ndr_push_netr_OsVersionInfoEx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_OsVersionInfoEx *r)
7883 : {
7884 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7885 48 : if (ndr_flags & NDR_SCALARS) {
7886 48 : NDR_CHECK(ndr_push_align(ndr, 4));
7887 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 284));
7888 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MajorVersion));
7889 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MinorVersion));
7890 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->BuildNumber));
7891 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->PlatformId));
7892 : {
7893 48 : libndr_flags _flags_save_string = ndr->flags;
7894 48 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7895 : {
7896 8 : struct ndr_push *_ndr_CSDVersion;
7897 48 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_CSDVersion, 0, 256));
7898 48 : NDR_CHECK(ndr_push_string(_ndr_CSDVersion, NDR_SCALARS, r->CSDVersion));
7899 48 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_CSDVersion, 0, 256));
7900 : }
7901 48 : ndr->flags = _flags_save_string;
7902 : }
7903 48 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ServicePackMajor));
7904 48 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ServicePackMinor));
7905 56 : NDR_CHECK(ndr_push_netr_SuiteMask(ndr, NDR_SCALARS, r->SuiteMask));
7906 56 : NDR_CHECK(ndr_push_netr_ProductType(ndr, NDR_SCALARS, r->ProductType));
7907 48 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Reserved));
7908 48 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7909 : }
7910 48 : if (ndr_flags & NDR_BUFFERS) {
7911 8 : }
7912 48 : return NDR_ERR_SUCCESS;
7913 : }
7914 :
7915 50 : static enum ndr_err_code ndr_pull_netr_OsVersionInfoEx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_OsVersionInfoEx *r)
7916 : {
7917 50 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7918 50 : if (ndr_flags & NDR_SCALARS) {
7919 50 : NDR_CHECK(ndr_pull_align(ndr, 4));
7920 50 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OSVersionInfoSize));
7921 50 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MajorVersion));
7922 50 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MinorVersion));
7923 50 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->BuildNumber));
7924 50 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->PlatformId));
7925 : {
7926 50 : libndr_flags _flags_save_string = ndr->flags;
7927 50 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7928 : {
7929 10 : struct ndr_pull *_ndr_CSDVersion;
7930 50 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_CSDVersion, 0, 256));
7931 50 : NDR_CHECK(ndr_pull_string(_ndr_CSDVersion, NDR_SCALARS, &r->CSDVersion));
7932 50 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_CSDVersion, 0, 256));
7933 : }
7934 50 : ndr->flags = _flags_save_string;
7935 : }
7936 50 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ServicePackMajor));
7937 50 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ServicePackMinor));
7938 60 : NDR_CHECK(ndr_pull_netr_SuiteMask(ndr, NDR_SCALARS, &r->SuiteMask));
7939 60 : NDR_CHECK(ndr_pull_netr_ProductType(ndr, NDR_SCALARS, &r->ProductType));
7940 50 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Reserved));
7941 50 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7942 : }
7943 50 : if (ndr_flags & NDR_BUFFERS) {
7944 10 : }
7945 50 : return NDR_ERR_SUCCESS;
7946 : }
7947 :
7948 2 : _PUBLIC_ void ndr_print_netr_OsVersionInfoEx(struct ndr_print *ndr, const char *name, const struct netr_OsVersionInfoEx *r)
7949 : {
7950 2 : ndr_print_struct(ndr, name, "netr_OsVersionInfoEx");
7951 2 : if (r == NULL) { ndr_print_null(ndr); return; }
7952 2 : ndr->depth++;
7953 2 : ndr_print_uint32(ndr, "OSVersionInfoSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?284:r->OSVersionInfoSize);
7954 2 : ndr_print_uint32(ndr, "MajorVersion", r->MajorVersion);
7955 2 : ndr_print_uint32(ndr, "MinorVersion", r->MinorVersion);
7956 2 : ndr_print_uint32(ndr, "BuildNumber", r->BuildNumber);
7957 2 : ndr_print_uint32(ndr, "PlatformId", r->PlatformId);
7958 : {
7959 2 : libndr_flags _flags_save_string = ndr->flags;
7960 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7961 2 : ndr_print_string(ndr, "CSDVersion", r->CSDVersion);
7962 2 : ndr->flags = _flags_save_string;
7963 : }
7964 2 : ndr_print_uint16(ndr, "ServicePackMajor", r->ServicePackMajor);
7965 2 : ndr_print_uint16(ndr, "ServicePackMinor", r->ServicePackMinor);
7966 2 : ndr_print_netr_SuiteMask(ndr, "SuiteMask", r->SuiteMask);
7967 2 : ndr_print_netr_ProductType(ndr, "ProductType", r->ProductType);
7968 2 : ndr_print_uint8(ndr, "Reserved", r->Reserved);
7969 2 : ndr->depth--;
7970 : }
7971 :
7972 48 : static enum ndr_err_code ndr_push_netr_OsVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_OsVersion *r)
7973 : {
7974 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7975 48 : if (ndr_flags & NDR_SCALARS) {
7976 48 : NDR_CHECK(ndr_push_align(ndr, 5));
7977 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 142));
7978 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7979 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 142));
7980 : {
7981 8 : struct ndr_push *_ndr_os;
7982 48 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_os, 0, 142 * 2));
7983 48 : NDR_CHECK(ndr_push_netr_OsVersionInfoEx(_ndr_os, NDR_SCALARS, &r->os));
7984 48 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_os, 0, 142 * 2));
7985 : }
7986 48 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7987 : }
7988 48 : if (ndr_flags & NDR_BUFFERS) {
7989 8 : }
7990 48 : return NDR_ERR_SUCCESS;
7991 : }
7992 :
7993 50 : static enum ndr_err_code ndr_pull_netr_OsVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_OsVersion *r)
7994 : {
7995 50 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7996 50 : if (ndr_flags & NDR_SCALARS) {
7997 50 : NDR_CHECK(ndr_pull_align(ndr, 5));
7998 50 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
7999 50 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->dummy));
8000 50 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->size));
8001 : {
8002 10 : struct ndr_pull *_ndr_os;
8003 50 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_os, 0, r->size * 2));
8004 50 : NDR_CHECK(ndr_pull_netr_OsVersionInfoEx(_ndr_os, NDR_SCALARS, &r->os));
8005 50 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_os, 0, r->size * 2));
8006 : }
8007 50 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8008 : }
8009 50 : if (ndr_flags & NDR_BUFFERS) {
8010 10 : }
8011 50 : return NDR_ERR_SUCCESS;
8012 : }
8013 :
8014 2 : _PUBLIC_ void ndr_print_netr_OsVersion(struct ndr_print *ndr, const char *name, const struct netr_OsVersion *r)
8015 : {
8016 2 : ndr_print_struct(ndr, name, "netr_OsVersion");
8017 2 : if (r == NULL) { ndr_print_null(ndr); return; }
8018 2 : ndr->depth++;
8019 2 : ndr_print_uint3264(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?142:r->length);
8020 2 : ndr_print_uint3264(ndr, "dummy", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->dummy);
8021 2 : ndr_print_uint3264(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?142:r->size);
8022 2 : ndr_print_netr_OsVersionInfoEx(ndr, "os", &r->os);
8023 2 : ndr->depth--;
8024 : }
8025 :
8026 398 : static enum ndr_err_code ndr_push_netr_OsVersionContainer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_OsVersionContainer *r)
8027 : {
8028 398 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8029 398 : if (ndr_flags & NDR_SCALARS) {
8030 199 : NDR_CHECK(ndr_push_align(ndr, 5));
8031 207 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284));
8032 207 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284));
8033 199 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->os));
8034 199 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8035 : }
8036 398 : if (ndr_flags & NDR_BUFFERS) {
8037 199 : if (r->os) {
8038 48 : NDR_CHECK(ndr_push_netr_OsVersion(ndr, NDR_SCALARS, r->os));
8039 : }
8040 : }
8041 342 : return NDR_ERR_SUCCESS;
8042 : }
8043 :
8044 426 : static enum ndr_err_code ndr_pull_netr_OsVersionContainer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_OsVersionContainer *r)
8045 : {
8046 76 : uint32_t _ptr_os;
8047 426 : TALLOC_CTX *_mem_save_os_0 = NULL;
8048 426 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8049 426 : if (ndr_flags & NDR_SCALARS) {
8050 213 : NDR_CHECK(ndr_pull_align(ndr, 5));
8051 213 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
8052 213 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
8053 213 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_os));
8054 213 : if (_ptr_os) {
8055 50 : NDR_PULL_ALLOC(ndr, r->os);
8056 : } else {
8057 163 : r->os = NULL;
8058 : }
8059 213 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8060 : }
8061 426 : if (ndr_flags & NDR_BUFFERS) {
8062 213 : if (r->os) {
8063 50 : _mem_save_os_0 = NDR_PULL_GET_MEM_CTX(ndr);
8064 50 : NDR_PULL_SET_MEM_CTX(ndr, r->os, 0);
8065 50 : NDR_CHECK(ndr_pull_netr_OsVersion(ndr, NDR_SCALARS, r->os));
8066 50 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_os_0, 0);
8067 : }
8068 : }
8069 350 : return NDR_ERR_SUCCESS;
8070 : }
8071 :
8072 10 : _PUBLIC_ void ndr_print_netr_OsVersionContainer(struct ndr_print *ndr, const char *name, const struct netr_OsVersionContainer *r)
8073 : {
8074 10 : ndr_print_struct(ndr, name, "netr_OsVersionContainer");
8075 10 : if (r == NULL) { ndr_print_null(ndr); return; }
8076 10 : ndr->depth++;
8077 10 : ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->os == NULL?0:284:r->length);
8078 10 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->os == NULL?0:284:r->size);
8079 10 : ndr_print_ptr(ndr, "os", r->os);
8080 10 : ndr->depth++;
8081 10 : if (r->os) {
8082 2 : ndr_print_netr_OsVersion(ndr, "os", r->os);
8083 : }
8084 10 : ndr->depth--;
8085 10 : ndr->depth--;
8086 : }
8087 :
8088 199 : static enum ndr_err_code ndr_push_netr_WorkstationInformation(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_WorkstationInformation *r)
8089 : {
8090 199 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8091 199 : if (ndr_flags & NDR_SCALARS) {
8092 199 : NDR_CHECK(ndr_push_align(ndr, 5));
8093 199 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
8094 199 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_hostname));
8095 199 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
8096 199 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy1));
8097 199 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy2));
8098 199 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy3));
8099 199 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy4));
8100 199 : NDR_CHECK(ndr_push_netr_OsVersionContainer(ndr, NDR_SCALARS, &r->os_version));
8101 199 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->os_name));
8102 199 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummy_string3));
8103 199 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummy_string4));
8104 227 : NDR_CHECK(ndr_push_netr_WorkstationFlags(ndr, NDR_SCALARS, r->workstation_flags));
8105 199 : NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->supported_enc_types));
8106 199 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
8107 199 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
8108 199 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8109 : }
8110 199 : if (ndr_flags & NDR_BUFFERS) {
8111 199 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
8112 199 : if (r->dns_hostname) {
8113 165 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_hostname, CH_UTF16)));
8114 165 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8115 165 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_hostname, CH_UTF16)));
8116 165 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_hostname, ndr_charset_length(r->dns_hostname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8117 : }
8118 199 : if (r->sitename) {
8119 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sitename, CH_UTF16)));
8120 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8121 168 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sitename, CH_UTF16)));
8122 168 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sitename, ndr_charset_length(r->sitename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8123 : }
8124 199 : if (r->dummy1) {
8125 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy1, CH_UTF16)));
8126 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8127 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy1, CH_UTF16)));
8128 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy1, ndr_charset_length(r->dummy1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8129 : }
8130 199 : if (r->dummy2) {
8131 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy2, CH_UTF16)));
8132 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8133 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy2, CH_UTF16)));
8134 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy2, ndr_charset_length(r->dummy2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8135 : }
8136 199 : if (r->dummy3) {
8137 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy3, CH_UTF16)));
8138 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8139 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy3, CH_UTF16)));
8140 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy3, ndr_charset_length(r->dummy3, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8141 : }
8142 199 : if (r->dummy4) {
8143 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy4, CH_UTF16)));
8144 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8145 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy4, CH_UTF16)));
8146 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy4, ndr_charset_length(r->dummy4, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8147 : }
8148 199 : NDR_CHECK(ndr_push_netr_OsVersionContainer(ndr, NDR_BUFFERS, &r->os_version));
8149 199 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->os_name));
8150 199 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string3));
8151 199 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string4));
8152 : }
8153 171 : return NDR_ERR_SUCCESS;
8154 : }
8155 :
8156 213 : static enum ndr_err_code ndr_pull_netr_WorkstationInformation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_WorkstationInformation *r)
8157 : {
8158 38 : uint32_t _ptr_dns_hostname;
8159 213 : uint32_t size_dns_hostname_1 = 0;
8160 213 : uint32_t length_dns_hostname_1 = 0;
8161 213 : TALLOC_CTX *_mem_save_dns_hostname_0 = NULL;
8162 38 : uint32_t _ptr_sitename;
8163 213 : uint32_t size_sitename_1 = 0;
8164 213 : uint32_t length_sitename_1 = 0;
8165 213 : TALLOC_CTX *_mem_save_sitename_0 = NULL;
8166 38 : uint32_t _ptr_dummy1;
8167 213 : uint32_t size_dummy1_1 = 0;
8168 213 : uint32_t length_dummy1_1 = 0;
8169 213 : TALLOC_CTX *_mem_save_dummy1_0 = NULL;
8170 38 : uint32_t _ptr_dummy2;
8171 213 : uint32_t size_dummy2_1 = 0;
8172 213 : uint32_t length_dummy2_1 = 0;
8173 213 : TALLOC_CTX *_mem_save_dummy2_0 = NULL;
8174 38 : uint32_t _ptr_dummy3;
8175 213 : uint32_t size_dummy3_1 = 0;
8176 213 : uint32_t length_dummy3_1 = 0;
8177 213 : TALLOC_CTX *_mem_save_dummy3_0 = NULL;
8178 38 : uint32_t _ptr_dummy4;
8179 213 : uint32_t size_dummy4_1 = 0;
8180 213 : uint32_t length_dummy4_1 = 0;
8181 213 : TALLOC_CTX *_mem_save_dummy4_0 = NULL;
8182 213 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8183 213 : if (ndr_flags & NDR_SCALARS) {
8184 213 : NDR_CHECK(ndr_pull_align(ndr, 5));
8185 213 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
8186 213 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_hostname));
8187 213 : if (_ptr_dns_hostname) {
8188 167 : NDR_PULL_ALLOC(ndr, r->dns_hostname);
8189 : } else {
8190 46 : r->dns_hostname = NULL;
8191 : }
8192 213 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename));
8193 213 : if (_ptr_sitename) {
8194 170 : NDR_PULL_ALLOC(ndr, r->sitename);
8195 : } else {
8196 43 : r->sitename = NULL;
8197 : }
8198 213 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy1));
8199 213 : if (_ptr_dummy1) {
8200 0 : NDR_PULL_ALLOC(ndr, r->dummy1);
8201 : } else {
8202 213 : r->dummy1 = NULL;
8203 : }
8204 213 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy2));
8205 213 : if (_ptr_dummy2) {
8206 0 : NDR_PULL_ALLOC(ndr, r->dummy2);
8207 : } else {
8208 213 : r->dummy2 = NULL;
8209 : }
8210 213 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy3));
8211 213 : if (_ptr_dummy3) {
8212 0 : NDR_PULL_ALLOC(ndr, r->dummy3);
8213 : } else {
8214 213 : r->dummy3 = NULL;
8215 : }
8216 213 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy4));
8217 213 : if (_ptr_dummy4) {
8218 0 : NDR_PULL_ALLOC(ndr, r->dummy4);
8219 : } else {
8220 213 : r->dummy4 = NULL;
8221 : }
8222 213 : NDR_CHECK(ndr_pull_netr_OsVersionContainer(ndr, NDR_SCALARS, &r->os_version));
8223 213 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->os_name));
8224 213 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummy_string3));
8225 213 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummy_string4));
8226 251 : NDR_CHECK(ndr_pull_netr_WorkstationFlags(ndr, NDR_SCALARS, &r->workstation_flags));
8227 213 : NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->supported_enc_types));
8228 213 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3));
8229 213 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4));
8230 213 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8231 : }
8232 213 : if (ndr_flags & NDR_BUFFERS) {
8233 213 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
8234 213 : if (r->dns_hostname) {
8235 167 : _mem_save_dns_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
8236 167 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_hostname, 0);
8237 167 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_hostname));
8238 167 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_hostname));
8239 167 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_hostname, &size_dns_hostname_1));
8240 167 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_hostname, &length_dns_hostname_1));
8241 167 : if (length_dns_hostname_1 > size_dns_hostname_1) {
8242 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_hostname_1, length_dns_hostname_1);
8243 : }
8244 167 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_hostname_1, sizeof(uint16_t)));
8245 167 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_hostname, length_dns_hostname_1, sizeof(uint16_t), CH_UTF16));
8246 167 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_hostname_0, 0);
8247 : }
8248 213 : if (r->sitename) {
8249 170 : _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr);
8250 170 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
8251 170 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename));
8252 170 : NDR_CHECK(ndr_pull_array_length(ndr, &r->sitename));
8253 170 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->sitename, &size_sitename_1));
8254 170 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->sitename, &length_sitename_1));
8255 170 : if (length_sitename_1 > size_sitename_1) {
8256 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_sitename_1, length_sitename_1);
8257 : }
8258 170 : NDR_CHECK(ndr_check_string_terminator(ndr, length_sitename_1, sizeof(uint16_t)));
8259 170 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sitename, length_sitename_1, sizeof(uint16_t), CH_UTF16));
8260 170 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0);
8261 : }
8262 213 : if (r->dummy1) {
8263 0 : _mem_save_dummy1_0 = NDR_PULL_GET_MEM_CTX(ndr);
8264 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy1, 0);
8265 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy1));
8266 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy1));
8267 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy1, &size_dummy1_1));
8268 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy1, &length_dummy1_1));
8269 0 : if (length_dummy1_1 > size_dummy1_1) {
8270 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dummy1_1, length_dummy1_1);
8271 : }
8272 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy1_1, sizeof(uint16_t)));
8273 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy1, length_dummy1_1, sizeof(uint16_t), CH_UTF16));
8274 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy1_0, 0);
8275 : }
8276 213 : if (r->dummy2) {
8277 0 : _mem_save_dummy2_0 = NDR_PULL_GET_MEM_CTX(ndr);
8278 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy2, 0);
8279 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy2));
8280 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy2));
8281 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy2, &size_dummy2_1));
8282 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy2, &length_dummy2_1));
8283 0 : if (length_dummy2_1 > size_dummy2_1) {
8284 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dummy2_1, length_dummy2_1);
8285 : }
8286 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy2_1, sizeof(uint16_t)));
8287 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy2, length_dummy2_1, sizeof(uint16_t), CH_UTF16));
8288 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy2_0, 0);
8289 : }
8290 213 : if (r->dummy3) {
8291 0 : _mem_save_dummy3_0 = NDR_PULL_GET_MEM_CTX(ndr);
8292 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy3, 0);
8293 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy3));
8294 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy3));
8295 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy3, &size_dummy3_1));
8296 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy3, &length_dummy3_1));
8297 0 : if (length_dummy3_1 > size_dummy3_1) {
8298 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dummy3_1, length_dummy3_1);
8299 : }
8300 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy3_1, sizeof(uint16_t)));
8301 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy3, length_dummy3_1, sizeof(uint16_t), CH_UTF16));
8302 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy3_0, 0);
8303 : }
8304 213 : if (r->dummy4) {
8305 0 : _mem_save_dummy4_0 = NDR_PULL_GET_MEM_CTX(ndr);
8306 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy4, 0);
8307 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy4));
8308 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy4));
8309 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy4, &size_dummy4_1));
8310 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy4, &length_dummy4_1));
8311 0 : if (length_dummy4_1 > size_dummy4_1) {
8312 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dummy4_1, length_dummy4_1);
8313 : }
8314 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy4_1, sizeof(uint16_t)));
8315 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy4, length_dummy4_1, sizeof(uint16_t), CH_UTF16));
8316 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy4_0, 0);
8317 : }
8318 213 : NDR_CHECK(ndr_pull_netr_OsVersionContainer(ndr, NDR_BUFFERS, &r->os_version));
8319 213 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->os_name));
8320 213 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string3));
8321 213 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string4));
8322 : }
8323 175 : return NDR_ERR_SUCCESS;
8324 : }
8325 :
8326 10 : _PUBLIC_ void ndr_print_netr_WorkstationInformation(struct ndr_print *ndr, const char *name, const struct netr_WorkstationInformation *r)
8327 : {
8328 10 : ndr_print_struct(ndr, name, "netr_WorkstationInformation");
8329 10 : if (r == NULL) { ndr_print_null(ndr); return; }
8330 10 : ndr->depth++;
8331 10 : ndr_print_netr_LsaPolicyInformation(ndr, "lsa_policy", &r->lsa_policy);
8332 10 : ndr_print_ptr(ndr, "dns_hostname", r->dns_hostname);
8333 10 : ndr->depth++;
8334 10 : if (r->dns_hostname) {
8335 2 : ndr_print_string(ndr, "dns_hostname", r->dns_hostname);
8336 : }
8337 10 : ndr->depth--;
8338 10 : ndr_print_ptr(ndr, "sitename", r->sitename);
8339 10 : ndr->depth++;
8340 10 : if (r->sitename) {
8341 2 : ndr_print_string(ndr, "sitename", r->sitename);
8342 : }
8343 10 : ndr->depth--;
8344 10 : ndr_print_ptr(ndr, "dummy1", r->dummy1);
8345 10 : ndr->depth++;
8346 10 : if (r->dummy1) {
8347 0 : ndr_print_string(ndr, "dummy1", r->dummy1);
8348 : }
8349 10 : ndr->depth--;
8350 10 : ndr_print_ptr(ndr, "dummy2", r->dummy2);
8351 10 : ndr->depth++;
8352 10 : if (r->dummy2) {
8353 0 : ndr_print_string(ndr, "dummy2", r->dummy2);
8354 : }
8355 10 : ndr->depth--;
8356 10 : ndr_print_ptr(ndr, "dummy3", r->dummy3);
8357 10 : ndr->depth++;
8358 10 : if (r->dummy3) {
8359 0 : ndr_print_string(ndr, "dummy3", r->dummy3);
8360 : }
8361 10 : ndr->depth--;
8362 10 : ndr_print_ptr(ndr, "dummy4", r->dummy4);
8363 10 : ndr->depth++;
8364 10 : if (r->dummy4) {
8365 0 : ndr_print_string(ndr, "dummy4", r->dummy4);
8366 : }
8367 10 : ndr->depth--;
8368 10 : ndr_print_netr_OsVersionContainer(ndr, "os_version", &r->os_version);
8369 10 : ndr_print_lsa_String(ndr, "os_name", &r->os_name);
8370 10 : ndr_print_lsa_String(ndr, "dummy_string3", &r->dummy_string3);
8371 10 : ndr_print_lsa_String(ndr, "dummy_string4", &r->dummy_string4);
8372 10 : ndr_print_netr_WorkstationFlags(ndr, "workstation_flags", r->workstation_flags);
8373 10 : ndr_print_kerb_EncTypes(ndr, "supported_enc_types", r->supported_enc_types);
8374 10 : ndr_print_uint32(ndr, "dummy_long3", r->dummy_long3);
8375 10 : ndr_print_uint32(ndr, "dummy_long4", r->dummy_long4);
8376 10 : ndr->depth--;
8377 : }
8378 :
8379 199 : static enum ndr_err_code ndr_push_netr_WorkstationInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_WorkstationInfo *r)
8380 : {
8381 28 : uint32_t level;
8382 199 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8383 199 : if (ndr_flags & NDR_SCALARS) {
8384 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8385 199 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8386 199 : NDR_CHECK(ndr_push_union_align(ndr, 5));
8387 199 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
8388 : /* ms_union is always aligned to the largest union arm*/
8389 199 : NDR_CHECK(ndr_push_align(ndr, 5));
8390 199 : switch (level) {
8391 189 : case 1: {
8392 189 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->workstation_info));
8393 161 : break; }
8394 :
8395 10 : case 2: {
8396 10 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->lsa_policy_info));
8397 10 : break; }
8398 :
8399 0 : default:
8400 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
8401 : }
8402 : }
8403 199 : if (ndr_flags & NDR_BUFFERS) {
8404 199 : if (!(ndr_flags & NDR_SCALARS)) {
8405 : /* We didn't get it above, and the token is not needed after this. */
8406 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8407 : }
8408 199 : switch (level) {
8409 189 : case 1:
8410 189 : if (r->workstation_info) {
8411 189 : NDR_CHECK(ndr_push_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->workstation_info));
8412 : }
8413 161 : break;
8414 :
8415 10 : case 2:
8416 10 : if (r->lsa_policy_info) {
8417 10 : NDR_CHECK(ndr_push_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
8418 : }
8419 10 : break;
8420 :
8421 0 : default:
8422 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
8423 : }
8424 : }
8425 171 : return NDR_ERR_SUCCESS;
8426 : }
8427 :
8428 213 : static enum ndr_err_code ndr_pull_netr_WorkstationInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_WorkstationInfo *r)
8429 : {
8430 38 : uint32_t level;
8431 38 : uint32_t _level;
8432 213 : TALLOC_CTX *_mem_save_workstation_info_0 = NULL;
8433 38 : uint32_t _ptr_workstation_info;
8434 213 : TALLOC_CTX *_mem_save_lsa_policy_info_0 = NULL;
8435 38 : uint32_t _ptr_lsa_policy_info;
8436 213 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8437 213 : if (ndr_flags & NDR_SCALARS) {
8438 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8439 213 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8440 213 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
8441 213 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
8442 213 : if (_level != level) {
8443 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
8444 : }
8445 : /* ms_union is always aligned to the largest union arm*/
8446 213 : NDR_CHECK(ndr_pull_align(ndr, 5));
8447 213 : switch (level) {
8448 199 : case 1: {
8449 199 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_workstation_info));
8450 199 : if (_ptr_workstation_info) {
8451 199 : NDR_PULL_ALLOC(ndr, r->workstation_info);
8452 : } else {
8453 0 : r->workstation_info = NULL;
8454 : }
8455 161 : break; }
8456 :
8457 14 : case 2: {
8458 14 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lsa_policy_info));
8459 14 : if (_ptr_lsa_policy_info) {
8460 14 : NDR_PULL_ALLOC(ndr, r->lsa_policy_info);
8461 : } else {
8462 0 : r->lsa_policy_info = NULL;
8463 : }
8464 14 : break; }
8465 :
8466 0 : default:
8467 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
8468 : }
8469 : }
8470 213 : if (ndr_flags & NDR_BUFFERS) {
8471 213 : if (!(ndr_flags & NDR_SCALARS)) {
8472 : /* We didn't get it above, and the token is not needed after this. */
8473 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8474 : }
8475 213 : switch (level) {
8476 199 : case 1:
8477 199 : if (r->workstation_info) {
8478 199 : _mem_save_workstation_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8479 199 : NDR_PULL_SET_MEM_CTX(ndr, r->workstation_info, 0);
8480 199 : NDR_CHECK(ndr_pull_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->workstation_info));
8481 199 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_workstation_info_0, 0);
8482 : }
8483 161 : break;
8484 :
8485 14 : case 2:
8486 14 : if (r->lsa_policy_info) {
8487 14 : _mem_save_lsa_policy_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8488 14 : NDR_PULL_SET_MEM_CTX(ndr, r->lsa_policy_info, 0);
8489 14 : NDR_CHECK(ndr_pull_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
8490 14 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lsa_policy_info_0, 0);
8491 : }
8492 14 : break;
8493 :
8494 0 : default:
8495 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
8496 : }
8497 : }
8498 175 : return NDR_ERR_SUCCESS;
8499 : }
8500 :
8501 10 : _PUBLIC_ void ndr_print_netr_WorkstationInfo(struct ndr_print *ndr, const char *name, const union netr_WorkstationInfo *r)
8502 : {
8503 10 : uint32_t level;
8504 10 : level = ndr_print_steal_switch_value(ndr, r);
8505 10 : ndr_print_union(ndr, name, level, "netr_WorkstationInfo");
8506 10 : switch (level) {
8507 10 : case 1:
8508 10 : ndr_print_ptr(ndr, "workstation_info", r->workstation_info);
8509 10 : ndr->depth++;
8510 10 : if (r->workstation_info) {
8511 10 : ndr_print_netr_WorkstationInformation(ndr, "workstation_info", r->workstation_info);
8512 : }
8513 10 : ndr->depth--;
8514 10 : break;
8515 :
8516 0 : case 2:
8517 0 : ndr_print_ptr(ndr, "lsa_policy_info", r->lsa_policy_info);
8518 0 : ndr->depth++;
8519 0 : if (r->lsa_policy_info) {
8520 0 : ndr_print_netr_WorkstationInformation(ndr, "lsa_policy_info", r->lsa_policy_info);
8521 : }
8522 0 : ndr->depth--;
8523 0 : break;
8524 :
8525 0 : default:
8526 0 : ndr_print_bad_level(ndr, name, level);
8527 : }
8528 10 : }
8529 :
8530 231 : static enum ndr_err_code ndr_push_netr_trust_extension_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_trust_extension_info *r)
8531 : {
8532 231 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8533 231 : if (ndr_flags & NDR_SCALARS) {
8534 231 : NDR_CHECK(ndr_push_align(ndr, 4));
8535 231 : NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->flags));
8536 231 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index));
8537 231 : NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
8538 231 : NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
8539 231 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8540 : }
8541 231 : if (ndr_flags & NDR_BUFFERS) {
8542 35 : }
8543 231 : return NDR_ERR_SUCCESS;
8544 : }
8545 :
8546 197 : static enum ndr_err_code ndr_pull_netr_trust_extension_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_trust_extension_info *r)
8547 : {
8548 197 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8549 197 : if (ndr_flags & NDR_SCALARS) {
8550 197 : NDR_CHECK(ndr_pull_align(ndr, 4));
8551 197 : NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->flags));
8552 197 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index));
8553 197 : NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
8554 197 : NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
8555 197 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8556 : }
8557 197 : if (ndr_flags & NDR_BUFFERS) {
8558 36 : }
8559 197 : return NDR_ERR_SUCCESS;
8560 : }
8561 :
8562 92 : _PUBLIC_ void ndr_print_netr_trust_extension_info(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_info *r)
8563 : {
8564 92 : ndr_print_struct(ndr, name, "netr_trust_extension_info");
8565 92 : if (r == NULL) { ndr_print_null(ndr); return; }
8566 92 : ndr->depth++;
8567 92 : ndr_print_netr_TrustFlags(ndr, "flags", r->flags);
8568 92 : ndr_print_uint32(ndr, "parent_index", r->parent_index);
8569 92 : ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
8570 92 : ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
8571 92 : ndr->depth--;
8572 : }
8573 :
8574 231 : static enum ndr_err_code ndr_push_netr_trust_extension(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_trust_extension *r)
8575 : {
8576 231 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8577 231 : if (ndr_flags & NDR_SCALARS) {
8578 231 : NDR_CHECK(ndr_push_align(ndr, 5));
8579 231 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 8));
8580 231 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8581 231 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 8));
8582 : {
8583 35 : struct ndr_push *_ndr_info;
8584 231 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, 8 * 2));
8585 231 : NDR_CHECK(ndr_push_netr_trust_extension_info(_ndr_info, NDR_SCALARS, &r->info));
8586 231 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, 8 * 2));
8587 : }
8588 231 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8589 : }
8590 231 : if (ndr_flags & NDR_BUFFERS) {
8591 35 : }
8592 231 : return NDR_ERR_SUCCESS;
8593 : }
8594 :
8595 197 : static enum ndr_err_code ndr_pull_netr_trust_extension(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_trust_extension *r)
8596 : {
8597 197 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8598 197 : if (ndr_flags & NDR_SCALARS) {
8599 197 : NDR_CHECK(ndr_pull_align(ndr, 5));
8600 197 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
8601 197 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->dummy));
8602 197 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->size));
8603 : {
8604 36 : struct ndr_pull *_ndr_info;
8605 197 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, r->size * 2));
8606 197 : NDR_CHECK(ndr_pull_netr_trust_extension_info(_ndr_info, NDR_SCALARS, &r->info));
8607 197 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, r->size * 2));
8608 : }
8609 197 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8610 : }
8611 197 : if (ndr_flags & NDR_BUFFERS) {
8612 36 : }
8613 197 : return NDR_ERR_SUCCESS;
8614 : }
8615 :
8616 92 : _PUBLIC_ void ndr_print_netr_trust_extension(struct ndr_print *ndr, const char *name, const struct netr_trust_extension *r)
8617 : {
8618 92 : ndr_print_struct(ndr, name, "netr_trust_extension");
8619 92 : if (r == NULL) { ndr_print_null(ndr); return; }
8620 92 : ndr->depth++;
8621 92 : ndr_print_uint3264(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->length);
8622 92 : ndr_print_uint3264(ndr, "dummy", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->dummy);
8623 92 : ndr_print_uint3264(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->size);
8624 92 : ndr_print_netr_trust_extension_info(ndr, "info", &r->info);
8625 92 : ndr->depth--;
8626 : }
8627 :
8628 924 : static enum ndr_err_code ndr_push_netr_trust_extension_container(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_trust_extension_container *r)
8629 : {
8630 924 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8631 924 : if (ndr_flags & NDR_SCALARS) {
8632 462 : NDR_CHECK(ndr_push_align(ndr, 5));
8633 497 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->info == NULL?0:16));
8634 497 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->info == NULL?0:16));
8635 462 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
8636 462 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8637 : }
8638 924 : if (ndr_flags & NDR_BUFFERS) {
8639 462 : if (r->info) {
8640 231 : NDR_CHECK(ndr_push_netr_trust_extension(ndr, NDR_SCALARS, r->info));
8641 : }
8642 : }
8643 784 : return NDR_ERR_SUCCESS;
8644 : }
8645 :
8646 780 : static enum ndr_err_code ndr_pull_netr_trust_extension_container(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_trust_extension_container *r)
8647 : {
8648 136 : uint32_t _ptr_info;
8649 780 : TALLOC_CTX *_mem_save_info_0 = NULL;
8650 780 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8651 780 : if (ndr_flags & NDR_SCALARS) {
8652 390 : NDR_CHECK(ndr_pull_align(ndr, 5));
8653 390 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
8654 390 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
8655 390 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
8656 390 : if (_ptr_info) {
8657 197 : NDR_PULL_ALLOC(ndr, r->info);
8658 : } else {
8659 193 : r->info = NULL;
8660 : }
8661 390 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8662 : }
8663 780 : if (ndr_flags & NDR_BUFFERS) {
8664 390 : if (r->info) {
8665 197 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8666 197 : NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
8667 197 : NDR_CHECK(ndr_pull_netr_trust_extension(ndr, NDR_SCALARS, r->info));
8668 197 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
8669 : }
8670 : }
8671 644 : return NDR_ERR_SUCCESS;
8672 : }
8673 :
8674 180 : _PUBLIC_ void ndr_print_netr_trust_extension_container(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_container *r)
8675 : {
8676 180 : ndr_print_struct(ndr, name, "netr_trust_extension_container");
8677 180 : if (r == NULL) { ndr_print_null(ndr); return; }
8678 180 : ndr->depth++;
8679 180 : ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->info == NULL?0:16:r->length);
8680 180 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->info == NULL?0:16:r->size);
8681 180 : ndr_print_ptr(ndr, "info", r->info);
8682 180 : ndr->depth++;
8683 180 : if (r->info) {
8684 92 : ndr_print_netr_trust_extension(ndr, "info", r->info);
8685 : }
8686 180 : ndr->depth--;
8687 180 : ndr->depth--;
8688 : }
8689 :
8690 924 : static enum ndr_err_code ndr_push_netr_OneDomainInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_OneDomainInfo *r)
8691 : {
8692 924 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8693 924 : if (ndr_flags & NDR_SCALARS) {
8694 462 : NDR_CHECK(ndr_push_align(ndr, 5));
8695 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domainname));
8696 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domainname));
8697 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forestname));
8698 462 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
8699 462 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
8700 462 : NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension));
8701 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
8702 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
8703 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
8704 462 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long1));
8705 462 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long2));
8706 462 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
8707 462 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
8708 462 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8709 : }
8710 924 : if (ndr_flags & NDR_BUFFERS) {
8711 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domainname));
8712 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domainname));
8713 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forestname));
8714 462 : if (r->domain_sid) {
8715 462 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
8716 : }
8717 462 : NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension));
8718 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
8719 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
8720 462 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
8721 : }
8722 784 : return NDR_ERR_SUCCESS;
8723 : }
8724 :
8725 780 : static enum ndr_err_code ndr_pull_netr_OneDomainInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_OneDomainInfo *r)
8726 : {
8727 136 : uint32_t _ptr_domain_sid;
8728 780 : TALLOC_CTX *_mem_save_domain_sid_0 = NULL;
8729 780 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8730 780 : if (ndr_flags & NDR_SCALARS) {
8731 390 : NDR_CHECK(ndr_pull_align(ndr, 5));
8732 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domainname));
8733 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domainname));
8734 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forestname));
8735 390 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
8736 390 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
8737 390 : if (_ptr_domain_sid) {
8738 390 : NDR_PULL_ALLOC(ndr, r->domain_sid);
8739 : } else {
8740 0 : r->domain_sid = NULL;
8741 : }
8742 390 : NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension));
8743 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
8744 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
8745 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
8746 390 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long1));
8747 390 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long2));
8748 390 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3));
8749 390 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4));
8750 390 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8751 : }
8752 780 : if (ndr_flags & NDR_BUFFERS) {
8753 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domainname));
8754 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domainname));
8755 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forestname));
8756 390 : if (r->domain_sid) {
8757 390 : _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8758 390 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
8759 390 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
8760 390 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
8761 : }
8762 390 : NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension));
8763 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
8764 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
8765 390 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
8766 : }
8767 644 : return NDR_ERR_SUCCESS;
8768 : }
8769 :
8770 180 : _PUBLIC_ void ndr_print_netr_OneDomainInfo(struct ndr_print *ndr, const char *name, const struct netr_OneDomainInfo *r)
8771 : {
8772 180 : ndr_print_struct(ndr, name, "netr_OneDomainInfo");
8773 180 : if (r == NULL) { ndr_print_null(ndr); return; }
8774 180 : ndr->depth++;
8775 180 : ndr_print_lsa_StringLarge(ndr, "domainname", &r->domainname);
8776 180 : ndr_print_lsa_StringLarge(ndr, "dns_domainname", &r->dns_domainname);
8777 180 : ndr_print_lsa_StringLarge(ndr, "dns_forestname", &r->dns_forestname);
8778 180 : ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
8779 180 : ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
8780 180 : ndr->depth++;
8781 180 : if (r->domain_sid) {
8782 180 : ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
8783 : }
8784 180 : ndr->depth--;
8785 180 : ndr_print_netr_trust_extension_container(ndr, "trust_extension", &r->trust_extension);
8786 180 : ndr_print_lsa_StringLarge(ndr, "dummy_string2", &r->dummy_string2);
8787 180 : ndr_print_lsa_StringLarge(ndr, "dummy_string3", &r->dummy_string3);
8788 180 : ndr_print_lsa_StringLarge(ndr, "dummy_string4", &r->dummy_string4);
8789 180 : ndr_print_uint32(ndr, "dummy_long1", r->dummy_long1);
8790 180 : ndr_print_uint32(ndr, "dummy_long2", r->dummy_long2);
8791 180 : ndr_print_uint32(ndr, "dummy_long3", r->dummy_long3);
8792 180 : ndr_print_uint32(ndr, "dummy_long4", r->dummy_long4);
8793 180 : ndr->depth--;
8794 : }
8795 :
8796 231 : static enum ndr_err_code ndr_push_netr_DomainInformation(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DomainInformation *r)
8797 : {
8798 35 : uint32_t cntr_trusted_domains_1;
8799 231 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8800 231 : if (ndr_flags & NDR_SCALARS) {
8801 231 : NDR_CHECK(ndr_push_align(ndr, 5));
8802 231 : NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->primary_domain));
8803 231 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trusted_domain_count));
8804 231 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domains));
8805 231 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
8806 231 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_hostname));
8807 231 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
8808 231 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
8809 231 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
8810 266 : NDR_CHECK(ndr_push_netr_WorkstationFlags(ndr, NDR_SCALARS, r->workstation_flags));
8811 231 : NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->supported_enc_types));
8812 231 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
8813 231 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
8814 231 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8815 : }
8816 231 : if (ndr_flags & NDR_BUFFERS) {
8817 231 : NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->primary_domain));
8818 231 : if (r->trusted_domains) {
8819 231 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->trusted_domain_count));
8820 462 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (r->trusted_domain_count); cntr_trusted_domains_1++) {
8821 231 : NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->trusted_domains[cntr_trusted_domains_1]));
8822 : }
8823 462 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (r->trusted_domain_count); cntr_trusted_domains_1++) {
8824 231 : NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->trusted_domains[cntr_trusted_domains_1]));
8825 : }
8826 : }
8827 231 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
8828 231 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_hostname));
8829 231 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
8830 231 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
8831 231 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
8832 : }
8833 196 : return NDR_ERR_SUCCESS;
8834 : }
8835 :
8836 193 : static enum ndr_err_code ndr_pull_netr_DomainInformation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DomainInformation *r)
8837 : {
8838 32 : uint32_t _ptr_trusted_domains;
8839 193 : uint32_t size_trusted_domains_1 = 0;
8840 32 : uint32_t cntr_trusted_domains_1;
8841 193 : TALLOC_CTX *_mem_save_trusted_domains_0 = NULL;
8842 193 : TALLOC_CTX *_mem_save_trusted_domains_1 = NULL;
8843 193 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8844 193 : if (ndr_flags & NDR_SCALARS) {
8845 193 : NDR_CHECK(ndr_pull_align(ndr, 5));
8846 193 : NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->primary_domain));
8847 193 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trusted_domain_count));
8848 193 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domains));
8849 193 : if (_ptr_trusted_domains) {
8850 193 : NDR_PULL_ALLOC(ndr, r->trusted_domains);
8851 : } else {
8852 0 : r->trusted_domains = NULL;
8853 : }
8854 193 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
8855 193 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_hostname));
8856 193 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
8857 193 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
8858 193 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
8859 225 : NDR_CHECK(ndr_pull_netr_WorkstationFlags(ndr, NDR_SCALARS, &r->workstation_flags));
8860 193 : NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->supported_enc_types));
8861 193 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3));
8862 193 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4));
8863 193 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8864 : }
8865 193 : if (ndr_flags & NDR_BUFFERS) {
8866 193 : NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->primary_domain));
8867 193 : if (r->trusted_domains) {
8868 193 : _mem_save_trusted_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
8869 193 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domains, 0);
8870 193 : NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_domains));
8871 193 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->trusted_domains, &size_trusted_domains_1));
8872 193 : NDR_PULL_ALLOC_N(ndr, r->trusted_domains, size_trusted_domains_1);
8873 193 : _mem_save_trusted_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
8874 193 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domains, 0);
8875 390 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (size_trusted_domains_1); cntr_trusted_domains_1++) {
8876 197 : NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->trusted_domains[cntr_trusted_domains_1]));
8877 : }
8878 390 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (size_trusted_domains_1); cntr_trusted_domains_1++) {
8879 197 : NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->trusted_domains[cntr_trusted_domains_1]));
8880 : }
8881 193 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_1, 0);
8882 193 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_0, 0);
8883 : }
8884 193 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
8885 193 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_hostname));
8886 193 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
8887 193 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
8888 193 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
8889 193 : if (r->trusted_domains) {
8890 193 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->trusted_domains, r->trusted_domain_count));
8891 : }
8892 390 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (size_trusted_domains_1); cntr_trusted_domains_1++) {
8893 36 : }
8894 : }
8895 161 : return NDR_ERR_SUCCESS;
8896 : }
8897 :
8898 88 : _PUBLIC_ void ndr_print_netr_DomainInformation(struct ndr_print *ndr, const char *name, const struct netr_DomainInformation *r)
8899 : {
8900 18 : uint32_t cntr_trusted_domains_1;
8901 88 : ndr_print_struct(ndr, name, "netr_DomainInformation");
8902 88 : if (r == NULL) { ndr_print_null(ndr); return; }
8903 88 : ndr->depth++;
8904 88 : ndr_print_netr_OneDomainInfo(ndr, "primary_domain", &r->primary_domain);
8905 88 : ndr_print_uint32(ndr, "trusted_domain_count", r->trusted_domain_count);
8906 88 : ndr_print_ptr(ndr, "trusted_domains", r->trusted_domains);
8907 88 : ndr->depth++;
8908 88 : if (r->trusted_domains) {
8909 88 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "trusted_domains", (uint32_t)(r->trusted_domain_count));
8910 88 : ndr->depth++;
8911 180 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (r->trusted_domain_count); cntr_trusted_domains_1++) {
8912 92 : ndr_print_netr_OneDomainInfo(ndr, "trusted_domains", &r->trusted_domains[cntr_trusted_domains_1]);
8913 : }
8914 88 : ndr->depth--;
8915 : }
8916 88 : ndr->depth--;
8917 88 : ndr_print_netr_LsaPolicyInformation(ndr, "lsa_policy", &r->lsa_policy);
8918 88 : ndr_print_lsa_StringLarge(ndr, "dns_hostname", &r->dns_hostname);
8919 88 : ndr_print_lsa_StringLarge(ndr, "dummy_string2", &r->dummy_string2);
8920 88 : ndr_print_lsa_StringLarge(ndr, "dummy_string3", &r->dummy_string3);
8921 88 : ndr_print_lsa_StringLarge(ndr, "dummy_string4", &r->dummy_string4);
8922 88 : ndr_print_netr_WorkstationFlags(ndr, "workstation_flags", r->workstation_flags);
8923 88 : ndr_print_kerb_EncTypes(ndr, "supported_enc_types", r->supported_enc_types);
8924 88 : ndr_print_uint32(ndr, "dummy_long3", r->dummy_long3);
8925 88 : ndr_print_uint32(ndr, "dummy_long4", r->dummy_long4);
8926 88 : ndr->depth--;
8927 : }
8928 :
8929 245 : static enum ndr_err_code ndr_push_netr_DomainInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_DomainInfo *r)
8930 : {
8931 35 : uint32_t level;
8932 245 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8933 245 : if (ndr_flags & NDR_SCALARS) {
8934 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8935 245 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8936 245 : NDR_CHECK(ndr_push_union_align(ndr, 5));
8937 245 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
8938 : /* ms_union is always aligned to the largest union arm*/
8939 245 : NDR_CHECK(ndr_push_align(ndr, 5));
8940 245 : switch (level) {
8941 231 : case 1: {
8942 231 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_info));
8943 196 : break; }
8944 :
8945 14 : case 2: {
8946 14 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->lsa_policy_info));
8947 14 : break; }
8948 :
8949 0 : default:
8950 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
8951 : }
8952 : }
8953 245 : if (ndr_flags & NDR_BUFFERS) {
8954 245 : if (!(ndr_flags & NDR_SCALARS)) {
8955 : /* We didn't get it above, and the token is not needed after this. */
8956 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8957 : }
8958 245 : switch (level) {
8959 231 : case 1:
8960 231 : if (r->domain_info) {
8961 231 : NDR_CHECK(ndr_push_netr_DomainInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_info));
8962 : }
8963 196 : break;
8964 :
8965 14 : case 2:
8966 14 : if (r->lsa_policy_info) {
8967 14 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
8968 : }
8969 14 : break;
8970 :
8971 0 : default:
8972 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
8973 : }
8974 : }
8975 210 : return NDR_ERR_SUCCESS;
8976 : }
8977 :
8978 203 : static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_DomainInfo *r)
8979 : {
8980 32 : uint32_t level;
8981 32 : uint32_t _level;
8982 203 : TALLOC_CTX *_mem_save_domain_info_0 = NULL;
8983 32 : uint32_t _ptr_domain_info;
8984 203 : TALLOC_CTX *_mem_save_lsa_policy_info_0 = NULL;
8985 32 : uint32_t _ptr_lsa_policy_info;
8986 203 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8987 203 : if (ndr_flags & NDR_SCALARS) {
8988 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8989 203 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8990 203 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
8991 203 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
8992 203 : if (_level != level) {
8993 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
8994 : }
8995 : /* ms_union is always aligned to the largest union arm*/
8996 203 : NDR_CHECK(ndr_pull_align(ndr, 5));
8997 203 : switch (level) {
8998 193 : case 1: {
8999 193 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_info));
9000 193 : if (_ptr_domain_info) {
9001 193 : NDR_PULL_ALLOC(ndr, r->domain_info);
9002 : } else {
9003 0 : r->domain_info = NULL;
9004 : }
9005 161 : break; }
9006 :
9007 10 : case 2: {
9008 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lsa_policy_info));
9009 10 : if (_ptr_lsa_policy_info) {
9010 10 : NDR_PULL_ALLOC(ndr, r->lsa_policy_info);
9011 : } else {
9012 0 : r->lsa_policy_info = NULL;
9013 : }
9014 10 : break; }
9015 :
9016 0 : default:
9017 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
9018 : }
9019 : }
9020 203 : if (ndr_flags & NDR_BUFFERS) {
9021 203 : if (!(ndr_flags & NDR_SCALARS)) {
9022 : /* We didn't get it above, and the token is not needed after this. */
9023 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
9024 : }
9025 203 : switch (level) {
9026 193 : case 1:
9027 193 : if (r->domain_info) {
9028 193 : _mem_save_domain_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9029 193 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_info, 0);
9030 193 : NDR_CHECK(ndr_pull_netr_DomainInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_info));
9031 193 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_info_0, 0);
9032 : }
9033 161 : break;
9034 :
9035 10 : case 2:
9036 10 : if (r->lsa_policy_info) {
9037 10 : _mem_save_lsa_policy_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9038 10 : NDR_PULL_SET_MEM_CTX(ndr, r->lsa_policy_info, 0);
9039 10 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
9040 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lsa_policy_info_0, 0);
9041 : }
9042 10 : break;
9043 :
9044 0 : default:
9045 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
9046 : }
9047 : }
9048 171 : return NDR_ERR_SUCCESS;
9049 : }
9050 :
9051 88 : _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r)
9052 : {
9053 18 : uint32_t level;
9054 88 : level = ndr_print_steal_switch_value(ndr, r);
9055 88 : ndr_print_union(ndr, name, level, "netr_DomainInfo");
9056 88 : switch (level) {
9057 88 : case 1:
9058 88 : ndr_print_ptr(ndr, "domain_info", r->domain_info);
9059 88 : ndr->depth++;
9060 88 : if (r->domain_info) {
9061 88 : ndr_print_netr_DomainInformation(ndr, "domain_info", r->domain_info);
9062 : }
9063 88 : ndr->depth--;
9064 88 : break;
9065 :
9066 0 : case 2:
9067 0 : ndr_print_ptr(ndr, "lsa_policy_info", r->lsa_policy_info);
9068 0 : ndr->depth++;
9069 0 : if (r->lsa_policy_info) {
9070 0 : ndr_print_netr_LsaPolicyInformation(ndr, "lsa_policy_info", r->lsa_policy_info);
9071 : }
9072 0 : ndr->depth--;
9073 0 : break;
9074 :
9075 0 : default:
9076 0 : ndr_print_bad_level(ndr, name, level);
9077 : }
9078 88 : }
9079 :
9080 453 : static enum ndr_err_code ndr_push_netr_CryptPassword(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_CryptPassword *r)
9081 : {
9082 : {
9083 453 : libndr_flags _flags_save_STRUCT = ndr->flags;
9084 453 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
9085 453 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9086 453 : if (ndr_flags & NDR_SCALARS) {
9087 453 : NDR_CHECK(ndr_push_align(ndr, 4));
9088 453 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 512));
9089 453 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
9090 453 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9091 : }
9092 453 : if (ndr_flags & NDR_BUFFERS) {
9093 47 : }
9094 453 : ndr->flags = _flags_save_STRUCT;
9095 : }
9096 453 : return NDR_ERR_SUCCESS;
9097 : }
9098 :
9099 459 : static enum ndr_err_code ndr_pull_netr_CryptPassword(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_CryptPassword *r)
9100 : {
9101 459 : uint32_t size_data_0 = 0;
9102 : {
9103 459 : libndr_flags _flags_save_STRUCT = ndr->flags;
9104 459 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
9105 459 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9106 459 : if (ndr_flags & NDR_SCALARS) {
9107 459 : NDR_CHECK(ndr_pull_align(ndr, 4));
9108 459 : size_data_0 = 512;
9109 459 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
9110 459 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
9111 459 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9112 : }
9113 459 : if (ndr_flags & NDR_BUFFERS) {
9114 47 : }
9115 459 : ndr->flags = _flags_save_STRUCT;
9116 : }
9117 459 : return NDR_ERR_SUCCESS;
9118 : }
9119 :
9120 0 : _PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r)
9121 : {
9122 0 : ndr_print_struct(ndr, name, "netr_CryptPassword");
9123 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9124 : {
9125 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
9126 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
9127 0 : ndr->depth++;
9128 0 : ndr_print_array_uint8(ndr, "data", r->data, 512);
9129 0 : ndr_print_uint32(ndr, "length", r->length);
9130 0 : ndr->depth--;
9131 0 : ndr->flags = _flags_save_STRUCT;
9132 : }
9133 : }
9134 :
9135 17 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SendToSamType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_SendToSamType r)
9136 : {
9137 17 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
9138 17 : return NDR_ERR_SUCCESS;
9139 : }
9140 :
9141 17 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SendToSamType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_SendToSamType *r)
9142 : {
9143 0 : uint16_t v;
9144 17 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
9145 17 : *r = v;
9146 17 : return NDR_ERR_SUCCESS;
9147 : }
9148 :
9149 0 : _PUBLIC_ void ndr_print_netr_SendToSamType(struct ndr_print *ndr, const char *name, enum netr_SendToSamType r)
9150 : {
9151 0 : const char *val = NULL;
9152 :
9153 0 : switch (r) {
9154 0 : case SendToSamUpdatePassword: val = "SendToSamUpdatePassword"; break;
9155 0 : case SendToSamResetBadPasswordCount: val = "SendToSamResetBadPasswordCount"; break;
9156 0 : case SendToSamUpdatePasswordForward: val = "SendToSamUpdatePasswordForward"; break;
9157 0 : case SendToSamUpdateLastLogonTimestamp: val = "SendToSamUpdateLastLogonTimestamp"; break;
9158 0 : case SendToSamResetSmartCardPassword: val = "SendToSamResetSmartCardPassword"; break;
9159 : }
9160 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
9161 0 : }
9162 :
9163 17 : static enum ndr_err_code ndr_push_netr_SendToSamResetBadPasswordCount(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SendToSamResetBadPasswordCount *r)
9164 : {
9165 17 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9166 17 : if (ndr_flags & NDR_SCALARS) {
9167 17 : NDR_CHECK(ndr_push_align(ndr, 4));
9168 17 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
9169 17 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9170 : }
9171 17 : if (ndr_flags & NDR_BUFFERS) {
9172 0 : }
9173 17 : return NDR_ERR_SUCCESS;
9174 : }
9175 :
9176 17 : static enum ndr_err_code ndr_pull_netr_SendToSamResetBadPasswordCount(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SendToSamResetBadPasswordCount *r)
9177 : {
9178 17 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9179 17 : if (ndr_flags & NDR_SCALARS) {
9180 17 : NDR_CHECK(ndr_pull_align(ndr, 4));
9181 17 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
9182 17 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9183 : }
9184 17 : if (ndr_flags & NDR_BUFFERS) {
9185 0 : }
9186 17 : return NDR_ERR_SUCCESS;
9187 : }
9188 :
9189 0 : _PUBLIC_ void ndr_print_netr_SendToSamResetBadPasswordCount(struct ndr_print *ndr, const char *name, const struct netr_SendToSamResetBadPasswordCount *r)
9190 : {
9191 0 : ndr_print_struct(ndr, name, "netr_SendToSamResetBadPasswordCount");
9192 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9193 0 : ndr->depth++;
9194 0 : ndr_print_GUID(ndr, "guid", &r->guid);
9195 0 : ndr->depth--;
9196 : }
9197 :
9198 17 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SendToSamMessage(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_SendToSamMessage *r)
9199 : {
9200 0 : uint32_t level;
9201 17 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9202 17 : if (ndr_flags & NDR_SCALARS) {
9203 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
9204 17 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
9205 : /* ms_union is always aligned to the largest union arm*/
9206 17 : NDR_CHECK(ndr_push_align(ndr, 4));
9207 17 : switch (level) {
9208 17 : case SendToSamResetBadPasswordCount: {
9209 17 : NDR_CHECK(ndr_push_netr_SendToSamResetBadPasswordCount(ndr, NDR_SCALARS, &r->reset_bad_password));
9210 17 : break; }
9211 :
9212 0 : default: {
9213 0 : break; }
9214 :
9215 : }
9216 : }
9217 17 : return NDR_ERR_SUCCESS;
9218 : }
9219 :
9220 17 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SendToSamMessage(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_SendToSamMessage *r)
9221 : {
9222 0 : uint32_t level;
9223 17 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9224 17 : if (ndr_flags & NDR_SCALARS) {
9225 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
9226 17 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
9227 : /* ms_union is always aligned to the largest union arm*/
9228 17 : NDR_CHECK(ndr_pull_align(ndr, 4));
9229 17 : switch (level) {
9230 17 : case SendToSamResetBadPasswordCount: {
9231 17 : NDR_CHECK(ndr_pull_netr_SendToSamResetBadPasswordCount(ndr, NDR_SCALARS, &r->reset_bad_password));
9232 17 : break; }
9233 :
9234 0 : default: {
9235 0 : break; }
9236 :
9237 : }
9238 : }
9239 17 : return NDR_ERR_SUCCESS;
9240 : }
9241 :
9242 0 : _PUBLIC_ void ndr_print_netr_SendToSamMessage(struct ndr_print *ndr, const char *name, const union netr_SendToSamMessage *r)
9243 : {
9244 0 : uint32_t level;
9245 0 : level = ndr_print_steal_switch_value(ndr, r);
9246 0 : ndr_print_union(ndr, name, level, "netr_SendToSamMessage");
9247 0 : switch (level) {
9248 0 : case SendToSamResetBadPasswordCount:
9249 0 : ndr_print_netr_SendToSamResetBadPasswordCount(ndr, "reset_bad_password", &r->reset_bad_password);
9250 0 : break;
9251 :
9252 0 : default:
9253 0 : break;
9254 :
9255 : }
9256 0 : }
9257 :
9258 17 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SendToSamBase(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SendToSamBase *r)
9259 : {
9260 17 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9261 17 : if (ndr_flags & NDR_SCALARS) {
9262 17 : NDR_CHECK(ndr_push_align(ndr, 4));
9263 17 : NDR_CHECK(ndr_push_netr_SendToSamType(ndr, NDR_SCALARS, r->message_type));
9264 17 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_size));
9265 : {
9266 0 : struct ndr_push *_ndr_message;
9267 17 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_message, 0, r->message_size));
9268 17 : NDR_CHECK(ndr_push_set_switch_value(_ndr_message, &r->message, r->message_type));
9269 17 : NDR_CHECK(ndr_push_netr_SendToSamMessage(_ndr_message, NDR_SCALARS|NDR_BUFFERS, &r->message));
9270 17 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_message, 0, r->message_size));
9271 : }
9272 17 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9273 : }
9274 17 : if (ndr_flags & NDR_BUFFERS) {
9275 0 : }
9276 17 : return NDR_ERR_SUCCESS;
9277 : }
9278 :
9279 17 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SendToSamBase(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SendToSamBase *r)
9280 : {
9281 17 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9282 17 : if (ndr_flags & NDR_SCALARS) {
9283 17 : NDR_CHECK(ndr_pull_align(ndr, 4));
9284 17 : NDR_CHECK(ndr_pull_netr_SendToSamType(ndr, NDR_SCALARS, &r->message_type));
9285 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_size));
9286 : {
9287 0 : struct ndr_pull *_ndr_message;
9288 17 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_message, 0, r->message_size));
9289 17 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_message, &r->message, r->message_type));
9290 17 : NDR_CHECK(ndr_pull_netr_SendToSamMessage(_ndr_message, NDR_SCALARS|NDR_BUFFERS, &r->message));
9291 17 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_message, 0, r->message_size));
9292 : }
9293 17 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9294 : }
9295 17 : if (ndr_flags & NDR_BUFFERS) {
9296 0 : }
9297 17 : return NDR_ERR_SUCCESS;
9298 : }
9299 :
9300 0 : static void ndr_print_flags_netr_SendToSamBase(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_SendToSamBase *r)
9301 : {
9302 0 : ndr_print_netr_SendToSamBase(ndr, name, r);
9303 0 : }
9304 :
9305 0 : _PUBLIC_ void ndr_print_netr_SendToSamBase(struct ndr_print *ndr, const char *name, const struct netr_SendToSamBase *r)
9306 : {
9307 0 : ndr_print_struct(ndr, name, "netr_SendToSamBase");
9308 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9309 0 : ndr->depth++;
9310 0 : ndr_print_netr_SendToSamType(ndr, "message_type", r->message_type);
9311 0 : ndr_print_uint32(ndr, "message_size", r->message_size);
9312 0 : ndr_print_set_switch_value(ndr, &r->message, r->message_type);
9313 0 : ndr_print_netr_SendToSamMessage(ndr, "message", &r->message);
9314 0 : ndr->depth--;
9315 : }
9316 :
9317 90 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesWCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DsRAddressToSitenamesWCtr *r)
9318 : {
9319 15 : uint32_t cntr_sitename_1;
9320 90 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9321 90 : if (ndr_flags & NDR_SCALARS) {
9322 90 : NDR_CHECK(ndr_push_align(ndr, 5));
9323 90 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
9324 90 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
9325 90 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9326 : }
9327 90 : if (ndr_flags & NDR_BUFFERS) {
9328 90 : if (r->sitename) {
9329 90 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
9330 630 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9331 540 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
9332 : }
9333 630 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9334 540 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
9335 : }
9336 : }
9337 : }
9338 75 : return NDR_ERR_SUCCESS;
9339 : }
9340 :
9341 72 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesWCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DsRAddressToSitenamesWCtr *r)
9342 : {
9343 12 : uint32_t _ptr_sitename;
9344 72 : uint32_t size_sitename_1 = 0;
9345 12 : uint32_t cntr_sitename_1;
9346 72 : TALLOC_CTX *_mem_save_sitename_0 = NULL;
9347 72 : TALLOC_CTX *_mem_save_sitename_1 = NULL;
9348 72 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9349 72 : if (ndr_flags & NDR_SCALARS) {
9350 72 : NDR_CHECK(ndr_pull_align(ndr, 5));
9351 72 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
9352 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename));
9353 72 : if (_ptr_sitename) {
9354 72 : NDR_PULL_ALLOC(ndr, r->sitename);
9355 : } else {
9356 0 : r->sitename = NULL;
9357 : }
9358 72 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9359 : }
9360 72 : if (ndr_flags & NDR_BUFFERS) {
9361 72 : if (r->sitename) {
9362 72 : _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr);
9363 72 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
9364 72 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename));
9365 72 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sitename, &size_sitename_1));
9366 72 : NDR_PULL_ALLOC_N(ndr, r->sitename, size_sitename_1);
9367 72 : _mem_save_sitename_1 = NDR_PULL_GET_MEM_CTX(ndr);
9368 72 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
9369 504 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9370 432 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
9371 : }
9372 504 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9373 432 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
9374 : }
9375 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_1, 0);
9376 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0);
9377 : }
9378 72 : if (r->sitename) {
9379 72 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sitename, r->count));
9380 : }
9381 504 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9382 72 : }
9383 : }
9384 60 : return NDR_ERR_SUCCESS;
9385 : }
9386 :
9387 36 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r)
9388 : {
9389 6 : uint32_t cntr_sitename_1;
9390 36 : ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesWCtr");
9391 36 : if (r == NULL) { ndr_print_null(ndr); return; }
9392 36 : ndr->depth++;
9393 36 : ndr_print_uint32(ndr, "count", r->count);
9394 36 : ndr_print_ptr(ndr, "sitename", r->sitename);
9395 36 : ndr->depth++;
9396 36 : if (r->sitename) {
9397 36 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sitename", (uint32_t)(r->count));
9398 36 : ndr->depth++;
9399 252 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9400 216 : ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
9401 : }
9402 36 : ndr->depth--;
9403 : }
9404 36 : ndr->depth--;
9405 36 : ndr->depth--;
9406 : }
9407 :
9408 1728 : static enum ndr_err_code ndr_push_netr_DsRAddress(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DsRAddress *r)
9409 : {
9410 1728 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9411 1728 : if (ndr_flags & NDR_SCALARS) {
9412 864 : NDR_CHECK(ndr_push_align(ndr, 5));
9413 864 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer));
9414 864 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
9415 864 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9416 : }
9417 1728 : if (ndr_flags & NDR_BUFFERS) {
9418 864 : if (r->buffer) {
9419 864 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
9420 864 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->size));
9421 : }
9422 : }
9423 1440 : return NDR_ERR_SUCCESS;
9424 : }
9425 :
9426 1728 : static enum ndr_err_code ndr_pull_netr_DsRAddress(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DsRAddress *r)
9427 : {
9428 288 : uint32_t _ptr_buffer;
9429 1728 : uint32_t size_buffer_1 = 0;
9430 1728 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
9431 1728 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9432 1728 : if (ndr_flags & NDR_SCALARS) {
9433 864 : NDR_CHECK(ndr_pull_align(ndr, 5));
9434 864 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
9435 864 : if (_ptr_buffer) {
9436 864 : NDR_PULL_ALLOC(ndr, r->buffer);
9437 : } else {
9438 0 : r->buffer = NULL;
9439 : }
9440 864 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
9441 864 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9442 : }
9443 1728 : if (ndr_flags & NDR_BUFFERS) {
9444 864 : if (r->buffer) {
9445 864 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9446 864 : NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0);
9447 864 : NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer));
9448 864 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->buffer, &size_buffer_1));
9449 864 : NDR_PULL_ALLOC_N(ndr, r->buffer, size_buffer_1);
9450 864 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, size_buffer_1));
9451 864 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
9452 : }
9453 864 : if (r->buffer) {
9454 864 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->buffer, r->size));
9455 : }
9456 : }
9457 1440 : return NDR_ERR_SUCCESS;
9458 : }
9459 :
9460 0 : _PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r)
9461 : {
9462 0 : ndr_print_struct(ndr, name, "netr_DsRAddress");
9463 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9464 0 : ndr->depth++;
9465 0 : ndr_print_ptr(ndr, "buffer", r->buffer);
9466 0 : ndr->depth++;
9467 0 : if (r->buffer) {
9468 0 : ndr_print_array_uint8(ndr, "buffer", r->buffer, r->size);
9469 : }
9470 0 : ndr->depth--;
9471 0 : ndr_print_uint32(ndr, "size", r->size);
9472 0 : ndr->depth--;
9473 : }
9474 :
9475 192 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DomainTrust(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DomainTrust *r)
9476 : {
9477 192 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9478 192 : if (ndr_flags & NDR_SCALARS) {
9479 96 : NDR_CHECK(ndr_push_align(ndr, 5));
9480 96 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
9481 96 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
9482 96 : NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->trust_flags));
9483 96 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index));
9484 96 : NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
9485 96 : NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
9486 96 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
9487 96 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
9488 96 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9489 : }
9490 192 : if (ndr_flags & NDR_BUFFERS) {
9491 96 : if (r->netbios_name) {
9492 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
9493 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9494 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
9495 96 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9496 : }
9497 96 : if (r->dns_name) {
9498 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
9499 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9500 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
9501 96 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9502 : }
9503 96 : if (r->sid) {
9504 96 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
9505 : }
9506 : }
9507 182 : return NDR_ERR_SUCCESS;
9508 : }
9509 :
9510 156 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DomainTrust(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DomainTrust *r)
9511 : {
9512 8 : uint32_t _ptr_netbios_name;
9513 156 : uint32_t size_netbios_name_1 = 0;
9514 156 : uint32_t length_netbios_name_1 = 0;
9515 156 : TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
9516 8 : uint32_t _ptr_dns_name;
9517 156 : uint32_t size_dns_name_1 = 0;
9518 156 : uint32_t length_dns_name_1 = 0;
9519 156 : TALLOC_CTX *_mem_save_dns_name_0 = NULL;
9520 8 : uint32_t _ptr_sid;
9521 156 : TALLOC_CTX *_mem_save_sid_0 = NULL;
9522 156 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9523 156 : if (ndr_flags & NDR_SCALARS) {
9524 78 : NDR_CHECK(ndr_pull_align(ndr, 5));
9525 78 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
9526 78 : if (_ptr_netbios_name) {
9527 78 : NDR_PULL_ALLOC(ndr, r->netbios_name);
9528 : } else {
9529 0 : r->netbios_name = NULL;
9530 : }
9531 78 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
9532 78 : if (_ptr_dns_name) {
9533 78 : NDR_PULL_ALLOC(ndr, r->dns_name);
9534 : } else {
9535 0 : r->dns_name = NULL;
9536 : }
9537 78 : NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->trust_flags));
9538 78 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index));
9539 78 : NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
9540 78 : NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
9541 78 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
9542 78 : if (_ptr_sid) {
9543 78 : NDR_PULL_ALLOC(ndr, r->sid);
9544 : } else {
9545 0 : r->sid = NULL;
9546 : }
9547 78 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
9548 78 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9549 : }
9550 156 : if (ndr_flags & NDR_BUFFERS) {
9551 78 : if (r->netbios_name) {
9552 78 : _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9553 78 : NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
9554 78 : NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
9555 78 : NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
9556 78 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
9557 78 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
9558 78 : if (length_netbios_name_1 > size_netbios_name_1) {
9559 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_netbios_name_1, length_netbios_name_1);
9560 : }
9561 78 : NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
9562 78 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
9563 78 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
9564 : }
9565 78 : if (r->dns_name) {
9566 78 : _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9567 78 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
9568 78 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
9569 78 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
9570 78 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
9571 78 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
9572 78 : if (length_dns_name_1 > size_dns_name_1) {
9573 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_name_1, length_dns_name_1);
9574 : }
9575 78 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
9576 78 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
9577 78 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
9578 : }
9579 78 : if (r->sid) {
9580 78 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9581 78 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
9582 78 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
9583 78 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
9584 : }
9585 : }
9586 148 : return NDR_ERR_SUCCESS;
9587 : }
9588 :
9589 0 : static void ndr_print_flags_netr_DomainTrust(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_DomainTrust *r)
9590 : {
9591 0 : ndr_print_netr_DomainTrust(ndr, name, r);
9592 0 : }
9593 :
9594 12 : _PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r)
9595 : {
9596 12 : ndr_print_struct(ndr, name, "netr_DomainTrust");
9597 12 : if (r == NULL) { ndr_print_null(ndr); return; }
9598 12 : ndr->depth++;
9599 12 : ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
9600 12 : ndr->depth++;
9601 12 : if (r->netbios_name) {
9602 12 : ndr_print_string(ndr, "netbios_name", r->netbios_name);
9603 : }
9604 12 : ndr->depth--;
9605 12 : ndr_print_ptr(ndr, "dns_name", r->dns_name);
9606 12 : ndr->depth++;
9607 12 : if (r->dns_name) {
9608 12 : ndr_print_string(ndr, "dns_name", r->dns_name);
9609 : }
9610 12 : ndr->depth--;
9611 12 : ndr_print_netr_TrustFlags(ndr, "trust_flags", r->trust_flags);
9612 12 : ndr_print_uint32(ndr, "parent_index", r->parent_index);
9613 12 : ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
9614 12 : ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
9615 12 : ndr_print_ptr(ndr, "sid", r->sid);
9616 12 : ndr->depth++;
9617 12 : if (r->sid) {
9618 12 : ndr_print_dom_sid2(ndr, "sid", r->sid);
9619 : }
9620 12 : ndr->depth--;
9621 12 : ndr_print_GUID(ndr, "guid", &r->guid);
9622 12 : ndr->depth--;
9623 : }
9624 :
9625 60 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DomainTrustList(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DomainTrustList *r)
9626 : {
9627 5 : uint32_t cntr_array_1;
9628 60 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9629 60 : if (ndr_flags & NDR_SCALARS) {
9630 60 : NDR_CHECK(ndr_push_align(ndr, 5));
9631 60 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
9632 60 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
9633 60 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9634 : }
9635 60 : if (ndr_flags & NDR_BUFFERS) {
9636 60 : if (r->array) {
9637 60 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
9638 156 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
9639 96 : NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
9640 : }
9641 156 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
9642 96 : NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
9643 : }
9644 : }
9645 : }
9646 55 : return NDR_ERR_SUCCESS;
9647 : }
9648 :
9649 50 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DomainTrustList(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DomainTrustList *r)
9650 : {
9651 4 : uint32_t _ptr_array;
9652 50 : uint32_t size_array_1 = 0;
9653 4 : uint32_t cntr_array_1;
9654 50 : TALLOC_CTX *_mem_save_array_0 = NULL;
9655 50 : TALLOC_CTX *_mem_save_array_1 = NULL;
9656 50 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9657 50 : if (ndr_flags & NDR_SCALARS) {
9658 50 : NDR_CHECK(ndr_pull_align(ndr, 5));
9659 50 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
9660 50 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
9661 50 : if (_ptr_array) {
9662 50 : NDR_PULL_ALLOC(ndr, r->array);
9663 : } else {
9664 0 : r->array = NULL;
9665 : }
9666 50 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9667 : }
9668 50 : if (ndr_flags & NDR_BUFFERS) {
9669 50 : if (r->array) {
9670 50 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
9671 50 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
9672 50 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
9673 50 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
9674 50 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
9675 50 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
9676 50 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
9677 128 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
9678 78 : NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
9679 : }
9680 128 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
9681 78 : NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
9682 : }
9683 50 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
9684 50 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
9685 : }
9686 50 : if (r->array) {
9687 50 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
9688 : }
9689 128 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
9690 4 : }
9691 : }
9692 46 : return NDR_ERR_SUCCESS;
9693 : }
9694 :
9695 0 : static void ndr_print_flags_netr_DomainTrustList(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_DomainTrustList *r)
9696 : {
9697 0 : ndr_print_netr_DomainTrustList(ndr, name, r);
9698 0 : }
9699 :
9700 12 : _PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustList *r)
9701 : {
9702 2 : uint32_t cntr_array_1;
9703 12 : ndr_print_struct(ndr, name, "netr_DomainTrustList");
9704 12 : if (r == NULL) { ndr_print_null(ndr); return; }
9705 12 : ndr->depth++;
9706 12 : ndr_print_uint32(ndr, "count", r->count);
9707 12 : ndr_print_ptr(ndr, "array", r->array);
9708 12 : ndr->depth++;
9709 12 : if (r->array) {
9710 12 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
9711 12 : ndr->depth++;
9712 24 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
9713 12 : ndr_print_netr_DomainTrust(ndr, "array", &r->array[cntr_array_1]);
9714 : }
9715 12 : ndr->depth--;
9716 : }
9717 12 : ndr->depth--;
9718 12 : ndr->depth--;
9719 : }
9720 :
9721 90 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExWCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DsRAddressToSitenamesExWCtr *r)
9722 : {
9723 15 : uint32_t cntr_sitename_1;
9724 15 : uint32_t cntr_subnetname_1;
9725 90 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9726 90 : if (ndr_flags & NDR_SCALARS) {
9727 90 : NDR_CHECK(ndr_push_align(ndr, 5));
9728 90 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
9729 90 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
9730 90 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->subnetname));
9731 90 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9732 : }
9733 90 : if (ndr_flags & NDR_BUFFERS) {
9734 90 : if (r->sitename) {
9735 90 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
9736 630 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9737 540 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
9738 : }
9739 630 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9740 540 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
9741 : }
9742 : }
9743 90 : if (r->subnetname) {
9744 90 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
9745 630 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (r->count); cntr_subnetname_1++) {
9746 540 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->subnetname[cntr_subnetname_1]));
9747 : }
9748 630 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (r->count); cntr_subnetname_1++) {
9749 540 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->subnetname[cntr_subnetname_1]));
9750 : }
9751 : }
9752 : }
9753 75 : return NDR_ERR_SUCCESS;
9754 : }
9755 :
9756 72 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExWCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DsRAddressToSitenamesExWCtr *r)
9757 : {
9758 12 : uint32_t _ptr_sitename;
9759 72 : uint32_t size_sitename_1 = 0;
9760 12 : uint32_t cntr_sitename_1;
9761 72 : TALLOC_CTX *_mem_save_sitename_0 = NULL;
9762 72 : TALLOC_CTX *_mem_save_sitename_1 = NULL;
9763 12 : uint32_t _ptr_subnetname;
9764 72 : uint32_t size_subnetname_1 = 0;
9765 12 : uint32_t cntr_subnetname_1;
9766 72 : TALLOC_CTX *_mem_save_subnetname_0 = NULL;
9767 72 : TALLOC_CTX *_mem_save_subnetname_1 = NULL;
9768 72 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9769 72 : if (ndr_flags & NDR_SCALARS) {
9770 72 : NDR_CHECK(ndr_pull_align(ndr, 5));
9771 72 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
9772 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename));
9773 72 : if (_ptr_sitename) {
9774 72 : NDR_PULL_ALLOC(ndr, r->sitename);
9775 : } else {
9776 0 : r->sitename = NULL;
9777 : }
9778 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_subnetname));
9779 72 : if (_ptr_subnetname) {
9780 72 : NDR_PULL_ALLOC(ndr, r->subnetname);
9781 : } else {
9782 0 : r->subnetname = NULL;
9783 : }
9784 72 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9785 : }
9786 72 : if (ndr_flags & NDR_BUFFERS) {
9787 72 : if (r->sitename) {
9788 72 : _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr);
9789 72 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
9790 72 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename));
9791 72 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sitename, &size_sitename_1));
9792 72 : NDR_PULL_ALLOC_N(ndr, r->sitename, size_sitename_1);
9793 72 : _mem_save_sitename_1 = NDR_PULL_GET_MEM_CTX(ndr);
9794 72 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
9795 504 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9796 432 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
9797 : }
9798 504 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9799 432 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
9800 : }
9801 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_1, 0);
9802 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0);
9803 : }
9804 72 : if (r->subnetname) {
9805 72 : _mem_save_subnetname_0 = NDR_PULL_GET_MEM_CTX(ndr);
9806 72 : NDR_PULL_SET_MEM_CTX(ndr, r->subnetname, 0);
9807 72 : NDR_CHECK(ndr_pull_array_size(ndr, &r->subnetname));
9808 72 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->subnetname, &size_subnetname_1));
9809 72 : NDR_PULL_ALLOC_N(ndr, r->subnetname, size_subnetname_1);
9810 72 : _mem_save_subnetname_1 = NDR_PULL_GET_MEM_CTX(ndr);
9811 72 : NDR_PULL_SET_MEM_CTX(ndr, r->subnetname, 0);
9812 504 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (size_subnetname_1); cntr_subnetname_1++) {
9813 432 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->subnetname[cntr_subnetname_1]));
9814 : }
9815 504 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (size_subnetname_1); cntr_subnetname_1++) {
9816 432 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->subnetname[cntr_subnetname_1]));
9817 : }
9818 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subnetname_1, 0);
9819 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subnetname_0, 0);
9820 : }
9821 72 : if (r->sitename) {
9822 72 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sitename, r->count));
9823 : }
9824 504 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9825 72 : }
9826 72 : if (r->subnetname) {
9827 72 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->subnetname, r->count));
9828 : }
9829 504 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (size_subnetname_1); cntr_subnetname_1++) {
9830 72 : }
9831 : }
9832 60 : return NDR_ERR_SUCCESS;
9833 : }
9834 :
9835 36 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesExWCtr *r)
9836 : {
9837 6 : uint32_t cntr_sitename_1;
9838 6 : uint32_t cntr_subnetname_1;
9839 36 : ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesExWCtr");
9840 36 : if (r == NULL) { ndr_print_null(ndr); return; }
9841 36 : ndr->depth++;
9842 36 : ndr_print_uint32(ndr, "count", r->count);
9843 36 : ndr_print_ptr(ndr, "sitename", r->sitename);
9844 36 : ndr->depth++;
9845 36 : if (r->sitename) {
9846 36 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sitename", (uint32_t)(r->count));
9847 36 : ndr->depth++;
9848 252 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9849 216 : ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
9850 : }
9851 36 : ndr->depth--;
9852 : }
9853 36 : ndr->depth--;
9854 36 : ndr_print_ptr(ndr, "subnetname", r->subnetname);
9855 36 : ndr->depth++;
9856 36 : if (r->subnetname) {
9857 36 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "subnetname", (uint32_t)(r->count));
9858 36 : ndr->depth++;
9859 252 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (r->count); cntr_subnetname_1++) {
9860 216 : ndr_print_lsa_String(ndr, "subnetname", &r->subnetname[cntr_subnetname_1]);
9861 : }
9862 36 : ndr->depth--;
9863 : }
9864 36 : ndr->depth--;
9865 36 : ndr->depth--;
9866 : }
9867 :
9868 35 : static enum ndr_err_code ndr_push_DcSitesCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DcSitesCtr *r)
9869 : {
9870 5 : uint32_t cntr_sites_1;
9871 35 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9872 35 : if (ndr_flags & NDR_SCALARS) {
9873 35 : NDR_CHECK(ndr_push_align(ndr, 5));
9874 35 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sites));
9875 35 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sites));
9876 35 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9877 : }
9878 35 : if (ndr_flags & NDR_BUFFERS) {
9879 35 : if (r->sites) {
9880 35 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sites));
9881 70 : for (cntr_sites_1 = 0; cntr_sites_1 < (r->num_sites); cntr_sites_1++) {
9882 35 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sites[cntr_sites_1]));
9883 : }
9884 70 : for (cntr_sites_1 = 0; cntr_sites_1 < (r->num_sites); cntr_sites_1++) {
9885 35 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sites[cntr_sites_1]));
9886 : }
9887 : }
9888 : }
9889 30 : return NDR_ERR_SUCCESS;
9890 : }
9891 :
9892 29 : static enum ndr_err_code ndr_pull_DcSitesCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DcSitesCtr *r)
9893 : {
9894 4 : uint32_t _ptr_sites;
9895 29 : uint32_t size_sites_1 = 0;
9896 4 : uint32_t cntr_sites_1;
9897 29 : TALLOC_CTX *_mem_save_sites_0 = NULL;
9898 29 : TALLOC_CTX *_mem_save_sites_1 = NULL;
9899 29 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9900 29 : if (ndr_flags & NDR_SCALARS) {
9901 29 : NDR_CHECK(ndr_pull_align(ndr, 5));
9902 29 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sites));
9903 29 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sites));
9904 29 : if (_ptr_sites) {
9905 29 : NDR_PULL_ALLOC(ndr, r->sites);
9906 : } else {
9907 0 : r->sites = NULL;
9908 : }
9909 29 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9910 : }
9911 29 : if (ndr_flags & NDR_BUFFERS) {
9912 29 : if (r->sites) {
9913 29 : _mem_save_sites_0 = NDR_PULL_GET_MEM_CTX(ndr);
9914 29 : NDR_PULL_SET_MEM_CTX(ndr, r->sites, 0);
9915 29 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sites));
9916 29 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sites, &size_sites_1));
9917 29 : NDR_PULL_ALLOC_N(ndr, r->sites, size_sites_1);
9918 29 : _mem_save_sites_1 = NDR_PULL_GET_MEM_CTX(ndr);
9919 29 : NDR_PULL_SET_MEM_CTX(ndr, r->sites, 0);
9920 58 : for (cntr_sites_1 = 0; cntr_sites_1 < (size_sites_1); cntr_sites_1++) {
9921 29 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sites[cntr_sites_1]));
9922 : }
9923 58 : for (cntr_sites_1 = 0; cntr_sites_1 < (size_sites_1); cntr_sites_1++) {
9924 29 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sites[cntr_sites_1]));
9925 : }
9926 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sites_1, 0);
9927 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sites_0, 0);
9928 : }
9929 29 : if (r->sites) {
9930 29 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sites, r->num_sites));
9931 : }
9932 58 : for (cntr_sites_1 = 0; cntr_sites_1 < (size_sites_1); cntr_sites_1++) {
9933 4 : }
9934 : }
9935 25 : return NDR_ERR_SUCCESS;
9936 : }
9937 :
9938 12 : _PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, const struct DcSitesCtr *r)
9939 : {
9940 2 : uint32_t cntr_sites_1;
9941 12 : ndr_print_struct(ndr, name, "DcSitesCtr");
9942 12 : if (r == NULL) { ndr_print_null(ndr); return; }
9943 12 : ndr->depth++;
9944 12 : ndr_print_uint32(ndr, "num_sites", r->num_sites);
9945 12 : ndr_print_ptr(ndr, "sites", r->sites);
9946 12 : ndr->depth++;
9947 12 : if (r->sites) {
9948 12 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sites", (uint32_t)(r->num_sites));
9949 12 : ndr->depth++;
9950 24 : for (cntr_sites_1 = 0; cntr_sites_1 < (r->num_sites); cntr_sites_1++) {
9951 12 : ndr_print_lsa_String(ndr, "sites", &r->sites[cntr_sites_1]);
9952 : }
9953 12 : ndr->depth--;
9954 : }
9955 12 : ndr->depth--;
9956 12 : ndr->depth--;
9957 : }
9958 :
9959 18340 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonSamLogon_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
9960 : {
9961 18340 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
9962 17130 : return NDR_ERR_SUCCESS;
9963 : }
9964 :
9965 17680 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonSamLogon_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
9966 : {
9967 1100 : uint32_t v;
9968 17680 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
9969 17680 : *r = v;
9970 17680 : return NDR_ERR_SUCCESS;
9971 : }
9972 :
9973 1320 : _PUBLIC_ void ndr_print_netr_LogonSamLogon_flags(struct ndr_print *ndr, const char *name, uint32_t r)
9974 : {
9975 1320 : ndr_print_uint32(ndr, name, r);
9976 1320 : ndr->depth++;
9977 1320 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT", NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT, r);
9978 1320 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP", NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP, r);
9979 1320 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN", NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN, r);
9980 1320 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST", NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST, r);
9981 1320 : ndr->depth--;
9982 1320 : }
9983 :
9984 52 : static enum ndr_err_code ndr_push_netr_TrustInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_TrustInfo *r)
9985 : {
9986 0 : uint32_t cntr_data_1;
9987 0 : uint32_t cntr_entries_1;
9988 52 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9989 52 : if (ndr_flags & NDR_SCALARS) {
9990 52 : NDR_CHECK(ndr_push_align(ndr, 5));
9991 52 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
9992 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
9993 52 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entry_count));
9994 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
9995 52 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9996 : }
9997 52 : if (ndr_flags & NDR_BUFFERS) {
9998 52 : if (r->data) {
9999 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
10000 104 : for (cntr_data_1 = 0; cntr_data_1 < (r->count); cntr_data_1++) {
10001 52 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data[cntr_data_1]));
10002 : }
10003 : }
10004 52 : if (r->entries) {
10005 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
10006 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
10007 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
10008 : }
10009 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
10010 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
10011 : }
10012 : }
10013 : }
10014 52 : return NDR_ERR_SUCCESS;
10015 : }
10016 :
10017 4 : static enum ndr_err_code ndr_pull_netr_TrustInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_TrustInfo *r)
10018 : {
10019 0 : uint32_t _ptr_data;
10020 4 : uint32_t size_data_1 = 0;
10021 0 : uint32_t cntr_data_1;
10022 4 : TALLOC_CTX *_mem_save_data_0 = NULL;
10023 4 : TALLOC_CTX *_mem_save_data_1 = NULL;
10024 0 : uint32_t _ptr_entries;
10025 4 : uint32_t size_entries_1 = 0;
10026 0 : uint32_t cntr_entries_1;
10027 4 : TALLOC_CTX *_mem_save_entries_0 = NULL;
10028 4 : TALLOC_CTX *_mem_save_entries_1 = NULL;
10029 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10030 4 : if (ndr_flags & NDR_SCALARS) {
10031 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
10032 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
10033 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
10034 4 : if (_ptr_data) {
10035 4 : NDR_PULL_ALLOC(ndr, r->data);
10036 : } else {
10037 0 : r->data = NULL;
10038 : }
10039 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entry_count));
10040 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
10041 4 : if (_ptr_entries) {
10042 0 : NDR_PULL_ALLOC(ndr, r->entries);
10043 : } else {
10044 4 : r->entries = NULL;
10045 : }
10046 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10047 : }
10048 4 : if (ndr_flags & NDR_BUFFERS) {
10049 4 : if (r->data) {
10050 4 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
10051 4 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
10052 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
10053 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
10054 4 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
10055 4 : _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
10056 4 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
10057 8 : for (cntr_data_1 = 0; cntr_data_1 < (size_data_1); cntr_data_1++) {
10058 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data[cntr_data_1]));
10059 : }
10060 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
10061 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
10062 : }
10063 4 : if (r->entries) {
10064 0 : _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
10065 0 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
10066 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
10067 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
10068 0 : NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
10069 0 : _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
10070 0 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
10071 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
10072 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
10073 : }
10074 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
10075 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
10076 : }
10077 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
10078 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
10079 : }
10080 4 : if (r->data) {
10081 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->count));
10082 : }
10083 4 : if (r->entries) {
10084 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
10085 : }
10086 4 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
10087 0 : }
10088 : }
10089 4 : return NDR_ERR_SUCCESS;
10090 : }
10091 :
10092 2 : _PUBLIC_ void ndr_print_netr_TrustInfo(struct ndr_print *ndr, const char *name, const struct netr_TrustInfo *r)
10093 : {
10094 0 : uint32_t cntr_data_1;
10095 0 : uint32_t cntr_entries_1;
10096 2 : ndr_print_struct(ndr, name, "netr_TrustInfo");
10097 2 : if (r == NULL) { ndr_print_null(ndr); return; }
10098 2 : ndr->depth++;
10099 2 : ndr_print_uint32(ndr, "count", r->count);
10100 2 : ndr_print_ptr(ndr, "data", r->data);
10101 2 : ndr->depth++;
10102 2 : if (r->data) {
10103 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "data", (uint32_t)(r->count));
10104 2 : ndr->depth++;
10105 4 : for (cntr_data_1 = 0; cntr_data_1 < (r->count); cntr_data_1++) {
10106 2 : ndr_print_uint32(ndr, "data", r->data[cntr_data_1]);
10107 : }
10108 2 : ndr->depth--;
10109 : }
10110 2 : ndr->depth--;
10111 2 : ndr_print_uint32(ndr, "entry_count", r->entry_count);
10112 2 : ndr_print_ptr(ndr, "entries", r->entries);
10113 2 : ndr->depth++;
10114 2 : if (r->entries) {
10115 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "entries", (uint32_t)(r->count));
10116 0 : ndr->depth++;
10117 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
10118 0 : ndr_print_lsa_String(ndr, "entries", &r->entries[cntr_entries_1]);
10119 : }
10120 0 : ndr->depth--;
10121 : }
10122 2 : ndr->depth--;
10123 2 : ndr->depth--;
10124 : }
10125 :
10126 20 : static enum ndr_err_code ndr_push_netr_DnsType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_DnsType r)
10127 : {
10128 20 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
10129 20 : return NDR_ERR_SUCCESS;
10130 : }
10131 :
10132 20 : static enum ndr_err_code ndr_pull_netr_DnsType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_DnsType *r)
10133 : {
10134 0 : uint16_t v;
10135 20 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
10136 20 : *r = v;
10137 20 : return NDR_ERR_SUCCESS;
10138 : }
10139 :
10140 0 : _PUBLIC_ void ndr_print_netr_DnsType(struct ndr_print *ndr, const char *name, enum netr_DnsType r)
10141 : {
10142 0 : const char *val = NULL;
10143 :
10144 0 : switch (r) {
10145 0 : case NlDnsLdapAtSite: val = "NlDnsLdapAtSite"; break;
10146 0 : case NlDnsGcAtSite: val = "NlDnsGcAtSite"; break;
10147 0 : case NlDnsDsaCname: val = "NlDnsDsaCname"; break;
10148 0 : case NlDnsKdcAtSite: val = "NlDnsKdcAtSite"; break;
10149 0 : case NlDnsDcAtSite: val = "NlDnsDcAtSite"; break;
10150 0 : case NlDnsRfc1510KdcAtSite: val = "NlDnsRfc1510KdcAtSite"; break;
10151 0 : case NlDnsGenericGcAtSite: val = "NlDnsGenericGcAtSite"; break;
10152 : }
10153 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
10154 0 : }
10155 :
10156 20 : static enum ndr_err_code ndr_push_netr_DnsDomainInfoType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_DnsDomainInfoType r)
10157 : {
10158 20 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
10159 20 : return NDR_ERR_SUCCESS;
10160 : }
10161 :
10162 20 : static enum ndr_err_code ndr_pull_netr_DnsDomainInfoType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_DnsDomainInfoType *r)
10163 : {
10164 0 : uint16_t v;
10165 20 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
10166 20 : *r = v;
10167 20 : return NDR_ERR_SUCCESS;
10168 : }
10169 :
10170 0 : _PUBLIC_ void ndr_print_netr_DnsDomainInfoType(struct ndr_print *ndr, const char *name, enum netr_DnsDomainInfoType r)
10171 : {
10172 0 : const char *val = NULL;
10173 :
10174 0 : switch (r) {
10175 0 : case NlDnsInfoTypeNone: val = "NlDnsInfoTypeNone"; break;
10176 0 : case NlDnsDomainName: val = "NlDnsDomainName"; break;
10177 0 : case NlDnsDomainNameAlias: val = "NlDnsDomainNameAlias"; break;
10178 0 : case NlDnsForestName: val = "NlDnsForestName"; break;
10179 0 : case NlDnsForestNameAlias: val = "NlDnsForestNameAlias"; break;
10180 0 : case NlDnsNdncDomainName: val = "NlDnsNdncDomainName"; break;
10181 0 : case NlDnsRecordName: val = "NlDnsRecordName"; break;
10182 : }
10183 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
10184 0 : }
10185 :
10186 40 : static enum ndr_err_code ndr_push_NL_DNS_NAME_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NL_DNS_NAME_INFO *r)
10187 : {
10188 40 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10189 40 : if (ndr_flags & NDR_SCALARS) {
10190 20 : NDR_CHECK(ndr_push_align(ndr, 5));
10191 20 : NDR_CHECK(ndr_push_netr_DnsType(ndr, NDR_SCALARS, r->type));
10192 20 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain_info));
10193 20 : NDR_CHECK(ndr_push_netr_DnsDomainInfoType(ndr, NDR_SCALARS, r->dns_domain_info_type));
10194 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
10195 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weight));
10196 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port));
10197 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dns_register));
10198 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
10199 20 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10200 : }
10201 40 : if (ndr_flags & NDR_BUFFERS) {
10202 20 : if (r->dns_domain_info) {
10203 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_info, CH_UTF16)));
10204 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10205 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_info, CH_UTF16)));
10206 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_domain_info, ndr_charset_length(r->dns_domain_info, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10207 : }
10208 : }
10209 40 : return NDR_ERR_SUCCESS;
10210 : }
10211 :
10212 40 : static enum ndr_err_code ndr_pull_NL_DNS_NAME_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NL_DNS_NAME_INFO *r)
10213 : {
10214 0 : uint32_t _ptr_dns_domain_info;
10215 40 : uint32_t size_dns_domain_info_1 = 0;
10216 40 : uint32_t length_dns_domain_info_1 = 0;
10217 40 : TALLOC_CTX *_mem_save_dns_domain_info_0 = NULL;
10218 40 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10219 40 : if (ndr_flags & NDR_SCALARS) {
10220 20 : NDR_CHECK(ndr_pull_align(ndr, 5));
10221 20 : NDR_CHECK(ndr_pull_netr_DnsType(ndr, NDR_SCALARS, &r->type));
10222 20 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain_info));
10223 20 : if (_ptr_dns_domain_info) {
10224 0 : NDR_PULL_ALLOC(ndr, r->dns_domain_info);
10225 : } else {
10226 20 : r->dns_domain_info = NULL;
10227 : }
10228 20 : NDR_CHECK(ndr_pull_netr_DnsDomainInfoType(ndr, NDR_SCALARS, &r->dns_domain_info_type));
10229 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
10230 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weight));
10231 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port));
10232 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dns_register));
10233 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
10234 20 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10235 : }
10236 40 : if (ndr_flags & NDR_BUFFERS) {
10237 20 : if (r->dns_domain_info) {
10238 0 : _mem_save_dns_domain_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10239 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain_info, 0);
10240 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain_info));
10241 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain_info));
10242 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_domain_info, &size_dns_domain_info_1));
10243 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_domain_info, &length_dns_domain_info_1));
10244 0 : if (length_dns_domain_info_1 > size_dns_domain_info_1) {
10245 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_domain_info_1, length_dns_domain_info_1);
10246 : }
10247 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_domain_info_1, sizeof(uint16_t)));
10248 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain_info, length_dns_domain_info_1, sizeof(uint16_t), CH_UTF16));
10249 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_info_0, 0);
10250 : }
10251 : }
10252 40 : return NDR_ERR_SUCCESS;
10253 : }
10254 :
10255 0 : _PUBLIC_ void ndr_print_NL_DNS_NAME_INFO(struct ndr_print *ndr, const char *name, const struct NL_DNS_NAME_INFO *r)
10256 : {
10257 0 : ndr_print_struct(ndr, name, "NL_DNS_NAME_INFO");
10258 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10259 0 : ndr->depth++;
10260 0 : ndr_print_netr_DnsType(ndr, "type", r->type);
10261 0 : ndr_print_ptr(ndr, "dns_domain_info", r->dns_domain_info);
10262 0 : ndr->depth++;
10263 0 : if (r->dns_domain_info) {
10264 0 : ndr_print_string(ndr, "dns_domain_info", r->dns_domain_info);
10265 : }
10266 0 : ndr->depth--;
10267 0 : ndr_print_netr_DnsDomainInfoType(ndr, "dns_domain_info_type", r->dns_domain_info_type);
10268 0 : ndr_print_uint32(ndr, "priority", r->priority);
10269 0 : ndr_print_uint32(ndr, "weight", r->weight);
10270 0 : ndr_print_uint32(ndr, "port", r->port);
10271 0 : ndr_print_uint32(ndr, "dns_register", r->dns_register);
10272 0 : ndr_print_uint32(ndr, "status", r->status);
10273 0 : ndr->depth--;
10274 : }
10275 :
10276 20 : _PUBLIC_ enum ndr_err_code ndr_push_NL_DNS_NAME_INFO_ARRAY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NL_DNS_NAME_INFO_ARRAY *r)
10277 : {
10278 0 : uint32_t cntr_names_1;
10279 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10280 20 : if (ndr_flags & NDR_SCALARS) {
10281 20 : NDR_CHECK(ndr_push_align(ndr, 5));
10282 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
10283 20 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
10284 20 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10285 : }
10286 20 : if (ndr_flags & NDR_BUFFERS) {
10287 20 : if (r->names) {
10288 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
10289 40 : for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
10290 20 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
10291 : }
10292 40 : for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
10293 20 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
10294 : }
10295 : }
10296 : }
10297 20 : return NDR_ERR_SUCCESS;
10298 : }
10299 :
10300 20 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_DNS_NAME_INFO_ARRAY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NL_DNS_NAME_INFO_ARRAY *r)
10301 : {
10302 0 : uint32_t _ptr_names;
10303 20 : uint32_t size_names_1 = 0;
10304 0 : uint32_t cntr_names_1;
10305 20 : TALLOC_CTX *_mem_save_names_0 = NULL;
10306 20 : TALLOC_CTX *_mem_save_names_1 = NULL;
10307 20 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10308 20 : if (ndr_flags & NDR_SCALARS) {
10309 20 : NDR_CHECK(ndr_pull_align(ndr, 5));
10310 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
10311 20 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
10312 20 : if (_ptr_names) {
10313 20 : NDR_PULL_ALLOC(ndr, r->names);
10314 : } else {
10315 0 : r->names = NULL;
10316 : }
10317 20 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10318 : }
10319 20 : if (ndr_flags & NDR_BUFFERS) {
10320 20 : if (r->names) {
10321 20 : _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10322 20 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
10323 20 : NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
10324 20 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
10325 20 : NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
10326 20 : _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
10327 20 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
10328 40 : for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
10329 20 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
10330 : }
10331 40 : for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
10332 20 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
10333 : }
10334 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
10335 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
10336 : }
10337 20 : if (r->names) {
10338 20 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
10339 : }
10340 40 : for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
10341 0 : }
10342 : }
10343 20 : return NDR_ERR_SUCCESS;
10344 : }
10345 :
10346 0 : static void ndr_print_flags_NL_DNS_NAME_INFO_ARRAY(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NL_DNS_NAME_INFO_ARRAY *r)
10347 : {
10348 0 : ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, name, r);
10349 0 : }
10350 :
10351 0 : _PUBLIC_ void ndr_print_NL_DNS_NAME_INFO_ARRAY(struct ndr_print *ndr, const char *name, const struct NL_DNS_NAME_INFO_ARRAY *r)
10352 : {
10353 0 : uint32_t cntr_names_1;
10354 0 : ndr_print_struct(ndr, name, "NL_DNS_NAME_INFO_ARRAY");
10355 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10356 0 : ndr->depth++;
10357 0 : ndr_print_uint32(ndr, "count", r->count);
10358 0 : ndr_print_ptr(ndr, "names", r->names);
10359 0 : ndr->depth++;
10360 0 : if (r->names) {
10361 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "names", (uint32_t)(r->count));
10362 0 : ndr->depth++;
10363 0 : for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
10364 0 : ndr_print_NL_DNS_NAME_INFO(ndr, "names", &r->names[cntr_names_1]);
10365 : }
10366 0 : ndr->depth--;
10367 : }
10368 0 : ndr->depth--;
10369 0 : ndr->depth--;
10370 : }
10371 :
10372 24 : static enum ndr_err_code ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonUasLogon *r)
10373 : {
10374 24 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10375 24 : if (flags & NDR_IN) {
10376 24 : if (r->in.account_name == NULL) {
10377 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10378 : }
10379 24 : if (r->in.workstation == NULL) {
10380 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10381 : }
10382 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10383 24 : if (r->in.server_name) {
10384 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10385 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10386 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10387 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10388 : }
10389 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
10390 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10391 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
10392 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10393 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
10394 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10395 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
10396 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.workstation, ndr_charset_length(r->in.workstation, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10397 : }
10398 24 : if (flags & NDR_OUT) {
10399 0 : if (r->out.info == NULL) {
10400 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10401 : }
10402 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10403 0 : if (*r->out.info) {
10404 0 : NDR_CHECK(ndr_push_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10405 : }
10406 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10407 : }
10408 20 : return NDR_ERR_SUCCESS;
10409 : }
10410 :
10411 24 : static enum ndr_err_code ndr_pull_netr_LogonUasLogon(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonUasLogon *r)
10412 : {
10413 4 : uint32_t _ptr_server_name;
10414 24 : uint32_t size_server_name_1 = 0;
10415 24 : uint32_t length_server_name_1 = 0;
10416 24 : uint32_t size_account_name_1 = 0;
10417 24 : uint32_t length_account_name_1 = 0;
10418 24 : uint32_t size_workstation_1 = 0;
10419 24 : uint32_t length_workstation_1 = 0;
10420 4 : uint32_t _ptr_info;
10421 24 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10422 24 : TALLOC_CTX *_mem_save_info_0 = NULL;
10423 24 : TALLOC_CTX *_mem_save_info_1 = NULL;
10424 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10425 24 : if (flags & NDR_IN) {
10426 24 : NDR_ZERO_STRUCT(r->out);
10427 :
10428 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10429 24 : if (_ptr_server_name) {
10430 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10431 : } else {
10432 24 : r->in.server_name = NULL;
10433 : }
10434 24 : if (r->in.server_name) {
10435 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10436 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10437 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10438 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10439 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10440 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10441 0 : if (length_server_name_1 > size_server_name_1) {
10442 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
10443 : }
10444 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10445 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10446 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10447 : }
10448 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
10449 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
10450 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
10451 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
10452 24 : if (length_account_name_1 > size_account_name_1) {
10453 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
10454 : }
10455 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
10456 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
10457 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.workstation));
10458 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.workstation));
10459 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.workstation, &size_workstation_1));
10460 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.workstation, &length_workstation_1));
10461 24 : if (length_workstation_1 > size_workstation_1) {
10462 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_workstation_1, length_workstation_1);
10463 : }
10464 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_workstation_1, sizeof(uint16_t)));
10465 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.workstation, length_workstation_1, sizeof(uint16_t), CH_UTF16));
10466 24 : NDR_PULL_ALLOC(ndr, r->out.info);
10467 24 : NDR_ZERO_STRUCTP(r->out.info);
10468 : }
10469 24 : if (flags & NDR_OUT) {
10470 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10471 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10472 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10473 0 : NDR_PULL_ALLOC(ndr, r->out.info);
10474 : }
10475 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10476 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10477 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10478 0 : if (_ptr_info) {
10479 0 : NDR_PULL_ALLOC(ndr, *r->out.info);
10480 : } else {
10481 0 : *r->out.info = NULL;
10482 : }
10483 0 : if (*r->out.info) {
10484 0 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10485 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10486 0 : NDR_CHECK(ndr_pull_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10487 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10488 : }
10489 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10490 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10491 : }
10492 20 : return NDR_ERR_SUCCESS;
10493 : }
10494 :
10495 0 : _PUBLIC_ void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonUasLogon *r)
10496 : {
10497 0 : ndr_print_struct(ndr, name, "netr_LogonUasLogon");
10498 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10499 0 : ndr->depth++;
10500 0 : if (flags & NDR_SET_VALUES) {
10501 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10502 : }
10503 0 : if (flags & NDR_IN) {
10504 0 : ndr_print_struct(ndr, "in", "netr_LogonUasLogon");
10505 0 : ndr->depth++;
10506 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10507 0 : ndr->depth++;
10508 0 : if (r->in.server_name) {
10509 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10510 : }
10511 0 : ndr->depth--;
10512 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
10513 0 : ndr->depth++;
10514 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
10515 0 : ndr->depth--;
10516 0 : ndr_print_ptr(ndr, "workstation", r->in.workstation);
10517 0 : ndr->depth++;
10518 0 : ndr_print_string(ndr, "workstation", r->in.workstation);
10519 0 : ndr->depth--;
10520 0 : ndr->depth--;
10521 : }
10522 0 : if (flags & NDR_OUT) {
10523 0 : ndr_print_struct(ndr, "out", "netr_LogonUasLogon");
10524 0 : ndr->depth++;
10525 0 : ndr_print_ptr(ndr, "info", r->out.info);
10526 0 : ndr->depth++;
10527 0 : ndr_print_ptr(ndr, "info", *r->out.info);
10528 0 : ndr->depth++;
10529 0 : if (*r->out.info) {
10530 0 : ndr_print_netr_UasInfo(ndr, "info", *r->out.info);
10531 : }
10532 0 : ndr->depth--;
10533 0 : ndr->depth--;
10534 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10535 0 : ndr->depth--;
10536 : }
10537 0 : ndr->depth--;
10538 : }
10539 :
10540 24 : static enum ndr_err_code ndr_push_netr_LogonUasLogoff(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonUasLogoff *r)
10541 : {
10542 24 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10543 24 : if (flags & NDR_IN) {
10544 24 : if (r->in.account_name == NULL) {
10545 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10546 : }
10547 24 : if (r->in.workstation == NULL) {
10548 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10549 : }
10550 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10551 24 : if (r->in.server_name) {
10552 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10553 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10554 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10555 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10556 : }
10557 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
10558 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10559 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
10560 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10561 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
10562 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10563 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
10564 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.workstation, ndr_charset_length(r->in.workstation, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10565 : }
10566 24 : if (flags & NDR_OUT) {
10567 0 : if (r->out.info == NULL) {
10568 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10569 : }
10570 0 : NDR_CHECK(ndr_push_netr_UasLogoffInfo(ndr, NDR_SCALARS, r->out.info));
10571 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10572 : }
10573 20 : return NDR_ERR_SUCCESS;
10574 : }
10575 :
10576 24 : static enum ndr_err_code ndr_pull_netr_LogonUasLogoff(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonUasLogoff *r)
10577 : {
10578 4 : uint32_t _ptr_server_name;
10579 24 : uint32_t size_server_name_1 = 0;
10580 24 : uint32_t length_server_name_1 = 0;
10581 24 : uint32_t size_account_name_1 = 0;
10582 24 : uint32_t length_account_name_1 = 0;
10583 24 : uint32_t size_workstation_1 = 0;
10584 24 : uint32_t length_workstation_1 = 0;
10585 24 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10586 24 : TALLOC_CTX *_mem_save_info_0 = NULL;
10587 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10588 24 : if (flags & NDR_IN) {
10589 24 : NDR_ZERO_STRUCT(r->out);
10590 :
10591 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10592 24 : if (_ptr_server_name) {
10593 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10594 : } else {
10595 24 : r->in.server_name = NULL;
10596 : }
10597 24 : if (r->in.server_name) {
10598 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10599 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10600 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10601 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10602 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10603 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10604 0 : if (length_server_name_1 > size_server_name_1) {
10605 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
10606 : }
10607 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10608 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10609 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10610 : }
10611 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
10612 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
10613 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
10614 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
10615 24 : if (length_account_name_1 > size_account_name_1) {
10616 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
10617 : }
10618 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
10619 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
10620 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.workstation));
10621 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.workstation));
10622 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.workstation, &size_workstation_1));
10623 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.workstation, &length_workstation_1));
10624 24 : if (length_workstation_1 > size_workstation_1) {
10625 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_workstation_1, length_workstation_1);
10626 : }
10627 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_workstation_1, sizeof(uint16_t)));
10628 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.workstation, length_workstation_1, sizeof(uint16_t), CH_UTF16));
10629 24 : NDR_PULL_ALLOC(ndr, r->out.info);
10630 24 : NDR_ZERO_STRUCTP(r->out.info);
10631 : }
10632 24 : if (flags & NDR_OUT) {
10633 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10634 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10635 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10636 0 : NDR_PULL_ALLOC(ndr, r->out.info);
10637 : }
10638 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10639 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10640 0 : NDR_CHECK(ndr_pull_netr_UasLogoffInfo(ndr, NDR_SCALARS, r->out.info));
10641 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10642 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10643 : }
10644 20 : return NDR_ERR_SUCCESS;
10645 : }
10646 :
10647 0 : _PUBLIC_ void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonUasLogoff *r)
10648 : {
10649 0 : ndr_print_struct(ndr, name, "netr_LogonUasLogoff");
10650 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10651 0 : ndr->depth++;
10652 0 : if (flags & NDR_SET_VALUES) {
10653 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10654 : }
10655 0 : if (flags & NDR_IN) {
10656 0 : ndr_print_struct(ndr, "in", "netr_LogonUasLogoff");
10657 0 : ndr->depth++;
10658 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10659 0 : ndr->depth++;
10660 0 : if (r->in.server_name) {
10661 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10662 : }
10663 0 : ndr->depth--;
10664 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
10665 0 : ndr->depth++;
10666 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
10667 0 : ndr->depth--;
10668 0 : ndr_print_ptr(ndr, "workstation", r->in.workstation);
10669 0 : ndr->depth++;
10670 0 : ndr_print_string(ndr, "workstation", r->in.workstation);
10671 0 : ndr->depth--;
10672 0 : ndr->depth--;
10673 : }
10674 0 : if (flags & NDR_OUT) {
10675 0 : ndr_print_struct(ndr, "out", "netr_LogonUasLogoff");
10676 0 : ndr->depth++;
10677 0 : ndr_print_ptr(ndr, "info", r->out.info);
10678 0 : ndr->depth++;
10679 0 : ndr_print_netr_UasLogoffInfo(ndr, "info", r->out.info);
10680 0 : ndr->depth--;
10681 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10682 0 : ndr->depth--;
10683 : }
10684 0 : ndr->depth--;
10685 : }
10686 :
10687 30466 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonSamLogon *r)
10688 : {
10689 30466 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10690 30466 : if (flags & NDR_IN) {
10691 14210 : if (r->in.logon == NULL) {
10692 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10693 : }
10694 14210 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10695 14210 : if (r->in.server_name) {
10696 14210 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10697 14210 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10698 14210 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10699 14210 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10700 : }
10701 14210 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
10702 14210 : if (r->in.computer_name) {
10703 14210 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
10704 14210 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10705 14210 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
10706 14210 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10707 : }
10708 14210 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
10709 14210 : if (r->in.credential) {
10710 12058 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
10711 : }
10712 14210 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
10713 14210 : if (r->in.return_authenticator) {
10714 14210 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
10715 : }
10716 14210 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
10717 14210 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
10718 14210 : NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
10719 14210 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
10720 : }
10721 30466 : if (flags & NDR_OUT) {
10722 16256 : if (r->out.validation == NULL) {
10723 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10724 : }
10725 16256 : if (r->out.authoritative == NULL) {
10726 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10727 : }
10728 16256 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
10729 16256 : if (r->out.return_authenticator) {
10730 10116 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
10731 : }
10732 16256 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
10733 16256 : NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
10734 16256 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
10735 16256 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10736 : }
10737 26011 : return NDR_ERR_SUCCESS;
10738 : }
10739 :
10740 28004 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonSamLogon *r)
10741 : {
10742 4050 : uint32_t _ptr_server_name;
10743 28004 : uint32_t size_server_name_1 = 0;
10744 28004 : uint32_t length_server_name_1 = 0;
10745 4050 : uint32_t _ptr_computer_name;
10746 28004 : uint32_t size_computer_name_1 = 0;
10747 28004 : uint32_t length_computer_name_1 = 0;
10748 4050 : uint32_t _ptr_credential;
10749 4050 : uint32_t _ptr_return_authenticator;
10750 28004 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10751 28004 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
10752 28004 : TALLOC_CTX *_mem_save_credential_0 = NULL;
10753 28004 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
10754 28004 : TALLOC_CTX *_mem_save_logon_0 = NULL;
10755 28004 : TALLOC_CTX *_mem_save_validation_0 = NULL;
10756 28004 : TALLOC_CTX *_mem_save_authoritative_0 = NULL;
10757 28004 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10758 28004 : if (flags & NDR_IN) {
10759 13794 : NDR_ZERO_STRUCT(r->out);
10760 :
10761 13794 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10762 13794 : if (_ptr_server_name) {
10763 13794 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10764 : } else {
10765 0 : r->in.server_name = NULL;
10766 : }
10767 13794 : if (r->in.server_name) {
10768 13794 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10769 13794 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10770 13794 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10771 13794 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10772 13794 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10773 13794 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10774 13794 : if (length_server_name_1 > size_server_name_1) {
10775 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
10776 : }
10777 13794 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10778 13794 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10779 13794 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10780 : }
10781 13794 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
10782 13794 : if (_ptr_computer_name) {
10783 13794 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
10784 : } else {
10785 0 : r->in.computer_name = NULL;
10786 : }
10787 13794 : if (r->in.computer_name) {
10788 13794 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10789 13794 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
10790 13794 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
10791 13794 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
10792 13794 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
10793 13794 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
10794 13794 : if (length_computer_name_1 > size_computer_name_1) {
10795 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
10796 : }
10797 13794 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
10798 13794 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
10799 13794 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
10800 : }
10801 13794 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
10802 13794 : if (_ptr_credential) {
10803 11718 : NDR_PULL_ALLOC(ndr, r->in.credential);
10804 : } else {
10805 2076 : r->in.credential = NULL;
10806 : }
10807 13794 : if (r->in.credential) {
10808 11718 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
10809 11718 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
10810 11718 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
10811 11718 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
10812 : }
10813 13794 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
10814 13794 : if (_ptr_return_authenticator) {
10815 13794 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
10816 : } else {
10817 0 : r->in.return_authenticator = NULL;
10818 : }
10819 13794 : if (r->in.return_authenticator) {
10820 13794 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
10821 13794 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
10822 13794 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
10823 13794 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
10824 : }
10825 13794 : NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
10826 13794 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10827 13794 : NDR_PULL_ALLOC(ndr, r->in.logon);
10828 : }
10829 13794 : _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
10830 13794 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
10831 13794 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
10832 13794 : NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
10833 13794 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
10834 13794 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
10835 13794 : NDR_PULL_ALLOC(ndr, r->out.validation);
10836 13794 : NDR_ZERO_STRUCTP(r->out.validation);
10837 13794 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
10838 13794 : NDR_ZERO_STRUCTP(r->out.authoritative);
10839 : }
10840 28004 : if (flags & NDR_OUT) {
10841 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10842 : if (r->in.logon == NULL) {
10843 : NDR_PULL_ALLOC(ndr, r->in.logon);
10844 : NDR_ZERO_STRUCTP(r->in.logon);
10845 : }
10846 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10847 14210 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
10848 14210 : if (_ptr_return_authenticator) {
10849 9190 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
10850 : } else {
10851 5020 : r->out.return_authenticator = NULL;
10852 : }
10853 14210 : if (r->out.return_authenticator) {
10854 9190 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
10855 9190 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
10856 9190 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
10857 9190 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
10858 : }
10859 14210 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10860 2464 : NDR_PULL_ALLOC(ndr, r->out.validation);
10861 : }
10862 14210 : _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
10863 14210 : NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
10864 14210 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
10865 14210 : NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
10866 14210 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
10867 14210 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10868 2464 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
10869 : }
10870 14210 : _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
10871 14210 : NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
10872 14210 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
10873 14210 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
10874 14210 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10875 : }
10876 23954 : return NDR_ERR_SUCCESS;
10877 : }
10878 :
10879 4930 : _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonSamLogon *r)
10880 : {
10881 4930 : ndr_print_struct(ndr, name, "netr_LogonSamLogon");
10882 4930 : if (r == NULL) { ndr_print_null(ndr); return; }
10883 4930 : ndr->depth++;
10884 4930 : if (flags & NDR_SET_VALUES) {
10885 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10886 : }
10887 4930 : if (flags & NDR_IN) {
10888 2 : ndr_print_struct(ndr, "in", "netr_LogonSamLogon");
10889 2 : ndr->depth++;
10890 2 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10891 2 : ndr->depth++;
10892 2 : if (r->in.server_name) {
10893 2 : ndr_print_string(ndr, "server_name", r->in.server_name);
10894 : }
10895 2 : ndr->depth--;
10896 2 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
10897 2 : ndr->depth++;
10898 2 : if (r->in.computer_name) {
10899 2 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
10900 : }
10901 2 : ndr->depth--;
10902 2 : ndr_print_ptr(ndr, "credential", r->in.credential);
10903 2 : ndr->depth++;
10904 2 : if (r->in.credential) {
10905 2 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
10906 : }
10907 2 : ndr->depth--;
10908 2 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
10909 2 : ndr->depth++;
10910 2 : if (r->in.return_authenticator) {
10911 2 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
10912 : }
10913 2 : ndr->depth--;
10914 2 : ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
10915 2 : ndr_print_ptr(ndr, "logon", r->in.logon);
10916 2 : ndr->depth++;
10917 2 : ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
10918 2 : ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
10919 2 : ndr->depth--;
10920 2 : ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
10921 2 : ndr->depth--;
10922 : }
10923 4930 : if (flags & NDR_OUT) {
10924 4928 : ndr_print_struct(ndr, "out", "netr_LogonSamLogon");
10925 4928 : ndr->depth++;
10926 4928 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
10927 4928 : ndr->depth++;
10928 4928 : if (r->out.return_authenticator) {
10929 2688 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
10930 : }
10931 4928 : ndr->depth--;
10932 4928 : ndr_print_ptr(ndr, "validation", r->out.validation);
10933 4928 : ndr->depth++;
10934 4928 : ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
10935 4928 : ndr_print_netr_Validation(ndr, "validation", r->out.validation);
10936 4928 : ndr->depth--;
10937 4928 : ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
10938 4928 : ndr->depth++;
10939 4928 : ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
10940 4928 : ndr->depth--;
10941 4928 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10942 4928 : ndr->depth--;
10943 : }
10944 4930 : ndr->depth--;
10945 : }
10946 :
10947 0 : static enum ndr_err_code ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonSamLogoff *r)
10948 : {
10949 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10950 0 : if (flags & NDR_IN) {
10951 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10952 0 : if (r->in.server_name) {
10953 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10954 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10955 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10956 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10957 : }
10958 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
10959 0 : if (r->in.computer_name) {
10960 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
10961 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10962 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
10963 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10964 : }
10965 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
10966 0 : if (r->in.credential) {
10967 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
10968 : }
10969 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
10970 0 : if (r->in.return_authenticator) {
10971 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
10972 : }
10973 0 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
10974 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
10975 0 : NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
10976 : }
10977 0 : if (flags & NDR_OUT) {
10978 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
10979 0 : if (r->out.return_authenticator) {
10980 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
10981 : }
10982 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10983 : }
10984 0 : return NDR_ERR_SUCCESS;
10985 : }
10986 :
10987 0 : static enum ndr_err_code ndr_pull_netr_LogonSamLogoff(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonSamLogoff *r)
10988 : {
10989 0 : uint32_t _ptr_server_name;
10990 0 : uint32_t size_server_name_1 = 0;
10991 0 : uint32_t length_server_name_1 = 0;
10992 0 : uint32_t _ptr_computer_name;
10993 0 : uint32_t size_computer_name_1 = 0;
10994 0 : uint32_t length_computer_name_1 = 0;
10995 0 : uint32_t _ptr_credential;
10996 0 : uint32_t _ptr_return_authenticator;
10997 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10998 0 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
10999 0 : TALLOC_CTX *_mem_save_credential_0 = NULL;
11000 0 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
11001 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11002 0 : if (flags & NDR_IN) {
11003 0 : NDR_ZERO_STRUCT(r->out);
11004 :
11005 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11006 0 : if (_ptr_server_name) {
11007 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11008 : } else {
11009 0 : r->in.server_name = NULL;
11010 : }
11011 0 : if (r->in.server_name) {
11012 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11013 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11014 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11015 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11016 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11017 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11018 0 : if (length_server_name_1 > size_server_name_1) {
11019 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
11020 : }
11021 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11022 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11023 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11024 : }
11025 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
11026 0 : if (_ptr_computer_name) {
11027 0 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
11028 : } else {
11029 0 : r->in.computer_name = NULL;
11030 : }
11031 0 : if (r->in.computer_name) {
11032 0 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11033 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
11034 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
11035 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
11036 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
11037 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
11038 0 : if (length_computer_name_1 > size_computer_name_1) {
11039 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
11040 : }
11041 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
11042 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
11043 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
11044 : }
11045 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
11046 0 : if (_ptr_credential) {
11047 0 : NDR_PULL_ALLOC(ndr, r->in.credential);
11048 : } else {
11049 0 : r->in.credential = NULL;
11050 : }
11051 0 : if (r->in.credential) {
11052 0 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
11053 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
11054 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11055 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
11056 : }
11057 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
11058 0 : if (_ptr_return_authenticator) {
11059 0 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
11060 : } else {
11061 0 : r->in.return_authenticator = NULL;
11062 : }
11063 0 : if (r->in.return_authenticator) {
11064 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11065 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
11066 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11067 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
11068 : }
11069 0 : NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
11070 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
11071 0 : NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
11072 : }
11073 0 : if (flags & NDR_OUT) {
11074 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11075 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11076 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
11077 0 : if (_ptr_return_authenticator) {
11078 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11079 : } else {
11080 0 : r->out.return_authenticator = NULL;
11081 : }
11082 0 : if (r->out.return_authenticator) {
11083 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11084 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
11085 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11086 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
11087 : }
11088 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11089 : }
11090 0 : return NDR_ERR_SUCCESS;
11091 : }
11092 :
11093 0 : _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonSamLogoff *r)
11094 : {
11095 0 : ndr_print_struct(ndr, name, "netr_LogonSamLogoff");
11096 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11097 0 : ndr->depth++;
11098 0 : if (flags & NDR_SET_VALUES) {
11099 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11100 : }
11101 0 : if (flags & NDR_IN) {
11102 0 : ndr_print_struct(ndr, "in", "netr_LogonSamLogoff");
11103 0 : ndr->depth++;
11104 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11105 0 : ndr->depth++;
11106 0 : if (r->in.server_name) {
11107 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11108 : }
11109 0 : ndr->depth--;
11110 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
11111 0 : ndr->depth++;
11112 0 : if (r->in.computer_name) {
11113 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
11114 : }
11115 0 : ndr->depth--;
11116 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
11117 0 : ndr->depth++;
11118 0 : if (r->in.credential) {
11119 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
11120 : }
11121 0 : ndr->depth--;
11122 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
11123 0 : ndr->depth++;
11124 0 : if (r->in.return_authenticator) {
11125 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
11126 : }
11127 0 : ndr->depth--;
11128 0 : ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
11129 0 : ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
11130 0 : ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
11131 0 : ndr->depth--;
11132 : }
11133 0 : if (flags & NDR_OUT) {
11134 0 : ndr_print_struct(ndr, "out", "netr_LogonSamLogoff");
11135 0 : ndr->depth++;
11136 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
11137 0 : ndr->depth++;
11138 0 : if (r->out.return_authenticator) {
11139 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
11140 : }
11141 0 : ndr->depth--;
11142 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11143 0 : ndr->depth--;
11144 : }
11145 0 : ndr->depth--;
11146 : }
11147 :
11148 32088 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerReqChallenge *r)
11149 : {
11150 32088 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11151 32088 : if (flags & NDR_IN) {
11152 14255 : if (r->in.computer_name == NULL) {
11153 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11154 : }
11155 14255 : if (r->in.credentials == NULL) {
11156 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11157 : }
11158 14255 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
11159 14255 : if (r->in.server_name) {
11160 1147 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11161 1147 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11162 1147 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11163 1147 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11164 : }
11165 14255 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11166 14255 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11167 14255 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11168 14255 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11169 14255 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
11170 : }
11171 32088 : if (flags & NDR_OUT) {
11172 17833 : if (r->out.return_credentials == NULL) {
11173 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11174 : }
11175 17833 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
11176 17833 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11177 : }
11178 30712 : return NDR_ERR_SUCCESS;
11179 : }
11180 :
11181 28578 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerReqChallenge *r)
11182 : {
11183 1314 : uint32_t _ptr_server_name;
11184 28578 : uint32_t size_server_name_1 = 0;
11185 28578 : uint32_t length_server_name_1 = 0;
11186 28578 : uint32_t size_computer_name_1 = 0;
11187 28578 : uint32_t length_computer_name_1 = 0;
11188 28578 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
11189 28578 : TALLOC_CTX *_mem_save_credentials_0 = NULL;
11190 28578 : TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
11191 28578 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11192 28578 : if (flags & NDR_IN) {
11193 14321 : NDR_ZERO_STRUCT(r->out);
11194 :
11195 14321 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11196 14321 : if (_ptr_server_name) {
11197 1213 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11198 : } else {
11199 13108 : r->in.server_name = NULL;
11200 : }
11201 14321 : if (r->in.server_name) {
11202 1213 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11203 1213 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11204 1213 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11205 1213 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11206 1213 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11207 1213 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11208 1213 : if (length_server_name_1 > size_server_name_1) {
11209 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
11210 : }
11211 1213 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11212 1213 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11213 1213 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11214 : }
11215 14321 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
11216 14321 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
11217 14321 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
11218 14321 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
11219 14321 : if (length_computer_name_1 > size_computer_name_1) {
11220 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
11221 : }
11222 14321 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
11223 14321 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
11224 14321 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11225 14321 : NDR_PULL_ALLOC(ndr, r->in.credentials);
11226 : }
11227 14321 : _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
11228 14321 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
11229 14321 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
11230 14321 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
11231 14321 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
11232 14321 : NDR_ZERO_STRUCTP(r->out.return_credentials);
11233 : }
11234 28578 : if (flags & NDR_OUT) {
11235 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11236 : if (r->in.credentials == NULL) {
11237 : NDR_PULL_ALLOC(ndr, r->in.credentials);
11238 : NDR_ZERO_STRUCTP(r->in.credentials);
11239 : }
11240 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11241 14257 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11242 3638 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
11243 : }
11244 14257 : _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
11245 14257 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
11246 14257 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
11247 14257 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
11248 14257 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11249 : }
11250 27264 : return NDR_ERR_SUCCESS;
11251 : }
11252 :
11253 7032 : _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerReqChallenge *r)
11254 : {
11255 7032 : ndr_print_struct(ndr, name, "netr_ServerReqChallenge");
11256 7032 : if (r == NULL) { ndr_print_null(ndr); return; }
11257 7032 : ndr->depth++;
11258 7032 : if (flags & NDR_SET_VALUES) {
11259 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11260 : }
11261 7032 : if (flags & NDR_IN) {
11262 2 : ndr_print_struct(ndr, "in", "netr_ServerReqChallenge");
11263 2 : ndr->depth++;
11264 2 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11265 2 : ndr->depth++;
11266 2 : if (r->in.server_name) {
11267 2 : ndr_print_string(ndr, "server_name", r->in.server_name);
11268 : }
11269 2 : ndr->depth--;
11270 2 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
11271 2 : ndr->depth++;
11272 2 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
11273 2 : ndr->depth--;
11274 2 : ndr_print_ptr(ndr, "credentials", r->in.credentials);
11275 2 : ndr->depth++;
11276 2 : ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
11277 2 : ndr->depth--;
11278 2 : ndr->depth--;
11279 : }
11280 7032 : if (flags & NDR_OUT) {
11281 7030 : ndr_print_struct(ndr, "out", "netr_ServerReqChallenge");
11282 7030 : ndr->depth++;
11283 7030 : ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
11284 7030 : ndr->depth++;
11285 7030 : ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
11286 7030 : ndr->depth--;
11287 7030 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11288 7030 : ndr->depth--;
11289 : }
11290 7032 : ndr->depth--;
11291 : }
11292 :
11293 828 : static enum ndr_err_code ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerAuthenticate *r)
11294 : {
11295 828 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11296 828 : if (flags & NDR_IN) {
11297 368 : if (r->in.account_name == NULL) {
11298 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11299 : }
11300 368 : if (r->in.computer_name == NULL) {
11301 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11302 : }
11303 368 : if (r->in.credentials == NULL) {
11304 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11305 : }
11306 368 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
11307 368 : if (r->in.server_name) {
11308 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11309 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11310 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11311 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11312 : }
11313 368 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
11314 368 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11315 368 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
11316 368 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11317 368 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
11318 368 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11319 368 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11320 368 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11321 368 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11322 368 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
11323 : }
11324 828 : if (flags & NDR_OUT) {
11325 460 : if (r->out.return_credentials == NULL) {
11326 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11327 : }
11328 460 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
11329 460 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11330 : }
11331 702 : return NDR_ERR_SUCCESS;
11332 : }
11333 :
11334 736 : static enum ndr_err_code ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerAuthenticate *r)
11335 : {
11336 112 : uint32_t _ptr_server_name;
11337 736 : uint32_t size_server_name_1 = 0;
11338 736 : uint32_t length_server_name_1 = 0;
11339 736 : uint32_t size_account_name_1 = 0;
11340 736 : uint32_t length_account_name_1 = 0;
11341 736 : uint32_t size_computer_name_1 = 0;
11342 736 : uint32_t length_computer_name_1 = 0;
11343 736 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
11344 736 : TALLOC_CTX *_mem_save_credentials_0 = NULL;
11345 736 : TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
11346 736 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11347 736 : if (flags & NDR_IN) {
11348 368 : NDR_ZERO_STRUCT(r->out);
11349 :
11350 368 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11351 368 : if (_ptr_server_name) {
11352 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11353 : } else {
11354 368 : r->in.server_name = NULL;
11355 : }
11356 368 : if (r->in.server_name) {
11357 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11358 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11359 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11360 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11361 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11362 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11363 0 : if (length_server_name_1 > size_server_name_1) {
11364 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
11365 : }
11366 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11367 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11368 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11369 : }
11370 368 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
11371 368 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
11372 368 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
11373 368 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
11374 368 : if (length_account_name_1 > size_account_name_1) {
11375 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
11376 : }
11377 368 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
11378 368 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
11379 368 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
11380 368 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
11381 368 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
11382 368 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
11383 368 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
11384 368 : if (length_computer_name_1 > size_computer_name_1) {
11385 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
11386 : }
11387 368 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
11388 368 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
11389 368 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11390 368 : NDR_PULL_ALLOC(ndr, r->in.credentials);
11391 : }
11392 368 : _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
11393 368 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
11394 368 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
11395 368 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
11396 368 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
11397 368 : NDR_ZERO_STRUCTP(r->out.return_credentials);
11398 : }
11399 736 : if (flags & NDR_OUT) {
11400 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11401 : if (r->in.credentials == NULL) {
11402 : NDR_PULL_ALLOC(ndr, r->in.credentials);
11403 : NDR_ZERO_STRUCTP(r->in.credentials);
11404 : }
11405 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11406 368 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11407 92 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
11408 : }
11409 368 : _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
11410 368 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
11411 368 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
11412 368 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
11413 368 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11414 : }
11415 624 : return NDR_ERR_SUCCESS;
11416 : }
11417 :
11418 184 : _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerAuthenticate *r)
11419 : {
11420 184 : ndr_print_struct(ndr, name, "netr_ServerAuthenticate");
11421 184 : if (r == NULL) { ndr_print_null(ndr); return; }
11422 184 : ndr->depth++;
11423 184 : if (flags & NDR_SET_VALUES) {
11424 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11425 : }
11426 184 : if (flags & NDR_IN) {
11427 0 : ndr_print_struct(ndr, "in", "netr_ServerAuthenticate");
11428 0 : ndr->depth++;
11429 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11430 0 : ndr->depth++;
11431 0 : if (r->in.server_name) {
11432 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11433 : }
11434 0 : ndr->depth--;
11435 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
11436 0 : ndr->depth++;
11437 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
11438 0 : ndr->depth--;
11439 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
11440 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
11441 0 : ndr->depth++;
11442 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
11443 0 : ndr->depth--;
11444 0 : ndr_print_ptr(ndr, "credentials", r->in.credentials);
11445 0 : ndr->depth++;
11446 0 : ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
11447 0 : ndr->depth--;
11448 0 : ndr->depth--;
11449 : }
11450 184 : if (flags & NDR_OUT) {
11451 184 : ndr_print_struct(ndr, "out", "netr_ServerAuthenticate");
11452 184 : ndr->depth++;
11453 184 : ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
11454 184 : ndr->depth++;
11455 184 : ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
11456 184 : ndr->depth--;
11457 184 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11458 184 : ndr->depth--;
11459 : }
11460 184 : ndr->depth--;
11461 : }
11462 :
11463 181 : static enum ndr_err_code ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerPasswordSet *r)
11464 : {
11465 181 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11466 181 : if (flags & NDR_IN) {
11467 83 : if (r->in.account_name == NULL) {
11468 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11469 : }
11470 83 : if (r->in.computer_name == NULL) {
11471 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11472 : }
11473 83 : if (r->in.credential == NULL) {
11474 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11475 : }
11476 83 : if (r->in.new_password == NULL) {
11477 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11478 : }
11479 83 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
11480 83 : if (r->in.server_name) {
11481 83 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11482 83 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11483 83 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11484 83 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11485 : }
11486 83 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
11487 83 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11488 83 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
11489 83 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11490 83 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
11491 83 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11492 83 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11493 83 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11494 83 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11495 83 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11496 83 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_password));
11497 : }
11498 181 : if (flags & NDR_OUT) {
11499 98 : if (r->out.return_authenticator == NULL) {
11500 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11501 : }
11502 98 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11503 98 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11504 : }
11505 161 : return NDR_ERR_SUCCESS;
11506 : }
11507 :
11508 166 : static enum ndr_err_code ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerPasswordSet *r)
11509 : {
11510 18 : uint32_t _ptr_server_name;
11511 166 : uint32_t size_server_name_1 = 0;
11512 166 : uint32_t length_server_name_1 = 0;
11513 166 : uint32_t size_account_name_1 = 0;
11514 166 : uint32_t length_account_name_1 = 0;
11515 166 : uint32_t size_computer_name_1 = 0;
11516 166 : uint32_t length_computer_name_1 = 0;
11517 166 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
11518 166 : TALLOC_CTX *_mem_save_credential_0 = NULL;
11519 166 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
11520 166 : TALLOC_CTX *_mem_save_new_password_0 = NULL;
11521 166 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11522 166 : if (flags & NDR_IN) {
11523 83 : NDR_ZERO_STRUCT(r->out);
11524 :
11525 83 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11526 83 : if (_ptr_server_name) {
11527 83 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11528 : } else {
11529 0 : r->in.server_name = NULL;
11530 : }
11531 83 : if (r->in.server_name) {
11532 83 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11533 83 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11534 83 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11535 83 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11536 83 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11537 83 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11538 83 : if (length_server_name_1 > size_server_name_1) {
11539 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
11540 : }
11541 83 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11542 83 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11543 83 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11544 : }
11545 83 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
11546 83 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
11547 83 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
11548 83 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
11549 83 : if (length_account_name_1 > size_account_name_1) {
11550 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
11551 : }
11552 83 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
11553 83 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
11554 83 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
11555 83 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
11556 83 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
11557 83 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
11558 83 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
11559 83 : if (length_computer_name_1 > size_computer_name_1) {
11560 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
11561 : }
11562 83 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
11563 83 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
11564 83 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11565 83 : NDR_PULL_ALLOC(ndr, r->in.credential);
11566 : }
11567 83 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
11568 83 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
11569 83 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11570 83 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
11571 83 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11572 83 : NDR_PULL_ALLOC(ndr, r->in.new_password);
11573 : }
11574 83 : _mem_save_new_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11575 83 : NDR_PULL_SET_MEM_CTX(ndr, r->in.new_password, LIBNDR_FLAG_REF_ALLOC);
11576 83 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_password));
11577 83 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_password_0, LIBNDR_FLAG_REF_ALLOC);
11578 83 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11579 83 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
11580 : }
11581 166 : if (flags & NDR_OUT) {
11582 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11583 : if (r->in.credential == NULL) {
11584 : NDR_PULL_ALLOC(ndr, r->in.credential);
11585 : NDR_ZERO_STRUCTP(r->in.credential);
11586 : }
11587 : if (r->in.new_password == NULL) {
11588 : NDR_PULL_ALLOC(ndr, r->in.new_password);
11589 : NDR_ZERO_STRUCTP(r->in.new_password);
11590 : }
11591 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11592 83 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11593 15 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11594 : }
11595 83 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11596 83 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
11597 83 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11598 83 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
11599 83 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11600 : }
11601 148 : return NDR_ERR_SUCCESS;
11602 : }
11603 :
11604 30 : _PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerPasswordSet *r)
11605 : {
11606 30 : ndr_print_struct(ndr, name, "netr_ServerPasswordSet");
11607 30 : if (r == NULL) { ndr_print_null(ndr); return; }
11608 30 : ndr->depth++;
11609 30 : if (flags & NDR_SET_VALUES) {
11610 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11611 : }
11612 30 : if (flags & NDR_IN) {
11613 0 : ndr_print_struct(ndr, "in", "netr_ServerPasswordSet");
11614 0 : ndr->depth++;
11615 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11616 0 : ndr->depth++;
11617 0 : if (r->in.server_name) {
11618 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11619 : }
11620 0 : ndr->depth--;
11621 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
11622 0 : ndr->depth++;
11623 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
11624 0 : ndr->depth--;
11625 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
11626 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
11627 0 : ndr->depth++;
11628 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
11629 0 : ndr->depth--;
11630 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
11631 0 : ndr->depth++;
11632 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
11633 0 : ndr->depth--;
11634 0 : ndr_print_ptr(ndr, "new_password", r->in.new_password);
11635 0 : ndr->depth++;
11636 0 : ndr_print_samr_Password(ndr, "new_password", r->in.new_password);
11637 0 : ndr->depth--;
11638 0 : ndr->depth--;
11639 : }
11640 30 : if (flags & NDR_OUT) {
11641 30 : ndr_print_struct(ndr, "out", "netr_ServerPasswordSet");
11642 30 : ndr->depth++;
11643 30 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
11644 30 : ndr->depth++;
11645 30 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
11646 30 : ndr->depth--;
11647 30 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11648 30 : ndr->depth--;
11649 : }
11650 30 : ndr->depth--;
11651 : }
11652 :
11653 0 : static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DatabaseDeltas *r)
11654 : {
11655 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11656 0 : if (flags & NDR_IN) {
11657 0 : if (r->in.logon_server == NULL) {
11658 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11659 : }
11660 0 : if (r->in.computername == NULL) {
11661 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11662 : }
11663 0 : if (r->in.credential == NULL) {
11664 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11665 : }
11666 0 : if (r->in.return_authenticator == NULL) {
11667 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11668 : }
11669 0 : if (r->in.sequence_num == NULL) {
11670 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11671 : }
11672 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
11673 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11674 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
11675 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11676 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
11677 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11678 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
11679 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11680 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11681 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11682 0 : NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
11683 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->in.sequence_num));
11684 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
11685 : }
11686 0 : if (flags & NDR_OUT) {
11687 0 : if (r->out.return_authenticator == NULL) {
11688 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11689 : }
11690 0 : if (r->out.sequence_num == NULL) {
11691 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11692 : }
11693 0 : if (r->out.delta_enum_array == NULL) {
11694 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11695 : }
11696 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11697 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->out.sequence_num));
11698 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
11699 0 : if (*r->out.delta_enum_array) {
11700 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
11701 : }
11702 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11703 : }
11704 0 : return NDR_ERR_SUCCESS;
11705 : }
11706 :
11707 0 : static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DatabaseDeltas *r)
11708 : {
11709 0 : uint32_t size_logon_server_1 = 0;
11710 0 : uint32_t length_logon_server_1 = 0;
11711 0 : uint32_t size_computername_1 = 0;
11712 0 : uint32_t length_computername_1 = 0;
11713 0 : uint32_t _ptr_delta_enum_array;
11714 0 : TALLOC_CTX *_mem_save_credential_0 = NULL;
11715 0 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
11716 0 : TALLOC_CTX *_mem_save_sequence_num_0 = NULL;
11717 0 : TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
11718 0 : TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
11719 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11720 0 : if (flags & NDR_IN) {
11721 0 : NDR_ZERO_STRUCT(r->out);
11722 :
11723 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
11724 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
11725 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
11726 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
11727 0 : if (length_logon_server_1 > size_logon_server_1) {
11728 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
11729 : }
11730 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
11731 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
11732 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
11733 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
11734 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
11735 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
11736 0 : if (length_computername_1 > size_computername_1) {
11737 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
11738 : }
11739 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
11740 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
11741 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11742 0 : NDR_PULL_ALLOC(ndr, r->in.credential);
11743 : }
11744 0 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
11745 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
11746 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11747 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
11748 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11749 0 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
11750 : }
11751 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11752 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
11753 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11754 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
11755 0 : NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
11756 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11757 0 : NDR_PULL_ALLOC(ndr, r->in.sequence_num);
11758 : }
11759 0 : _mem_save_sequence_num_0 = NDR_PULL_GET_MEM_CTX(ndr);
11760 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sequence_num, LIBNDR_FLAG_REF_ALLOC);
11761 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->in.sequence_num));
11762 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_num_0, LIBNDR_FLAG_REF_ALLOC);
11763 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
11764 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11765 0 : *r->out.return_authenticator = *r->in.return_authenticator;
11766 0 : NDR_PULL_ALLOC(ndr, r->out.sequence_num);
11767 0 : *r->out.sequence_num = *r->in.sequence_num;
11768 0 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
11769 0 : NDR_ZERO_STRUCTP(r->out.delta_enum_array);
11770 : }
11771 0 : if (flags & NDR_OUT) {
11772 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11773 : if (r->in.credential == NULL) {
11774 : NDR_PULL_ALLOC(ndr, r->in.credential);
11775 : NDR_ZERO_STRUCTP(r->in.credential);
11776 : }
11777 : if (r->in.return_authenticator == NULL) {
11778 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
11779 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
11780 : }
11781 : if (r->in.sequence_num == NULL) {
11782 : NDR_PULL_ALLOC(ndr, r->in.sequence_num);
11783 : NDR_ZERO_STRUCTP(r->in.sequence_num);
11784 : }
11785 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11786 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11787 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11788 : }
11789 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11790 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
11791 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11792 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
11793 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11794 0 : NDR_PULL_ALLOC(ndr, r->out.sequence_num);
11795 : }
11796 0 : _mem_save_sequence_num_0 = NDR_PULL_GET_MEM_CTX(ndr);
11797 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sequence_num, LIBNDR_FLAG_REF_ALLOC);
11798 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->out.sequence_num));
11799 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_num_0, LIBNDR_FLAG_REF_ALLOC);
11800 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11801 0 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
11802 : }
11803 0 : _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
11804 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
11805 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
11806 0 : if (_ptr_delta_enum_array) {
11807 0 : NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
11808 : } else {
11809 0 : *r->out.delta_enum_array = NULL;
11810 : }
11811 0 : if (*r->out.delta_enum_array) {
11812 0 : _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
11813 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
11814 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
11815 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
11816 : }
11817 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
11818 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11819 : }
11820 0 : return NDR_ERR_SUCCESS;
11821 : }
11822 :
11823 0 : _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DatabaseDeltas *r)
11824 : {
11825 0 : ndr_print_struct(ndr, name, "netr_DatabaseDeltas");
11826 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11827 0 : ndr->depth++;
11828 0 : if (flags & NDR_SET_VALUES) {
11829 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11830 : }
11831 0 : if (flags & NDR_IN) {
11832 0 : ndr_print_struct(ndr, "in", "netr_DatabaseDeltas");
11833 0 : ndr->depth++;
11834 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
11835 0 : ndr->depth++;
11836 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
11837 0 : ndr->depth--;
11838 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
11839 0 : ndr->depth++;
11840 0 : ndr_print_string(ndr, "computername", r->in.computername);
11841 0 : ndr->depth--;
11842 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
11843 0 : ndr->depth++;
11844 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
11845 0 : ndr->depth--;
11846 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
11847 0 : ndr->depth++;
11848 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
11849 0 : ndr->depth--;
11850 0 : ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
11851 0 : ndr_print_ptr(ndr, "sequence_num", r->in.sequence_num);
11852 0 : ndr->depth++;
11853 0 : ndr_print_udlong(ndr, "sequence_num", *r->in.sequence_num);
11854 0 : ndr->depth--;
11855 0 : ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
11856 0 : ndr->depth--;
11857 : }
11858 0 : if (flags & NDR_OUT) {
11859 0 : ndr_print_struct(ndr, "out", "netr_DatabaseDeltas");
11860 0 : ndr->depth++;
11861 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
11862 0 : ndr->depth++;
11863 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
11864 0 : ndr->depth--;
11865 0 : ndr_print_ptr(ndr, "sequence_num", r->out.sequence_num);
11866 0 : ndr->depth++;
11867 0 : ndr_print_udlong(ndr, "sequence_num", *r->out.sequence_num);
11868 0 : ndr->depth--;
11869 0 : ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
11870 0 : ndr->depth++;
11871 0 : ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
11872 0 : ndr->depth++;
11873 0 : if (*r->out.delta_enum_array) {
11874 0 : ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
11875 : }
11876 0 : ndr->depth--;
11877 0 : ndr->depth--;
11878 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11879 0 : ndr->depth--;
11880 : }
11881 0 : ndr->depth--;
11882 : }
11883 :
11884 54 : static enum ndr_err_code ndr_push_netr_DatabaseSync(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DatabaseSync *r)
11885 : {
11886 54 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11887 54 : if (flags & NDR_IN) {
11888 24 : if (r->in.logon_server == NULL) {
11889 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11890 : }
11891 24 : if (r->in.computername == NULL) {
11892 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11893 : }
11894 24 : if (r->in.credential == NULL) {
11895 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11896 : }
11897 24 : if (r->in.return_authenticator == NULL) {
11898 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11899 : }
11900 24 : if (r->in.sync_context == NULL) {
11901 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11902 : }
11903 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
11904 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11905 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
11906 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11907 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
11908 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11909 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
11910 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11911 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11912 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11913 24 : NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
11914 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.sync_context));
11915 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
11916 : }
11917 54 : if (flags & NDR_OUT) {
11918 30 : if (r->out.return_authenticator == NULL) {
11919 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11920 : }
11921 30 : if (r->out.sync_context == NULL) {
11922 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11923 : }
11924 30 : if (r->out.delta_enum_array == NULL) {
11925 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11926 : }
11927 30 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11928 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context));
11929 30 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
11930 30 : if (*r->out.delta_enum_array) {
11931 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
11932 : }
11933 30 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11934 : }
11935 45 : return NDR_ERR_SUCCESS;
11936 : }
11937 :
11938 48 : static enum ndr_err_code ndr_pull_netr_DatabaseSync(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DatabaseSync *r)
11939 : {
11940 48 : uint32_t size_logon_server_1 = 0;
11941 48 : uint32_t length_logon_server_1 = 0;
11942 48 : uint32_t size_computername_1 = 0;
11943 48 : uint32_t length_computername_1 = 0;
11944 8 : uint32_t _ptr_delta_enum_array;
11945 48 : TALLOC_CTX *_mem_save_credential_0 = NULL;
11946 48 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
11947 48 : TALLOC_CTX *_mem_save_sync_context_0 = NULL;
11948 48 : TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
11949 48 : TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
11950 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11951 48 : if (flags & NDR_IN) {
11952 24 : NDR_ZERO_STRUCT(r->out);
11953 :
11954 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
11955 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
11956 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
11957 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
11958 24 : if (length_logon_server_1 > size_logon_server_1) {
11959 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
11960 : }
11961 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
11962 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
11963 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
11964 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
11965 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
11966 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
11967 24 : if (length_computername_1 > size_computername_1) {
11968 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
11969 : }
11970 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
11971 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
11972 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11973 24 : NDR_PULL_ALLOC(ndr, r->in.credential);
11974 : }
11975 24 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
11976 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
11977 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11978 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
11979 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11980 24 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
11981 : }
11982 24 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11983 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
11984 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11985 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
11986 24 : NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
11987 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11988 24 : NDR_PULL_ALLOC(ndr, r->in.sync_context);
11989 : }
11990 24 : _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
11991 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sync_context, LIBNDR_FLAG_REF_ALLOC);
11992 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.sync_context));
11993 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
11994 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
11995 24 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11996 24 : *r->out.return_authenticator = *r->in.return_authenticator;
11997 24 : NDR_PULL_ALLOC(ndr, r->out.sync_context);
11998 24 : *r->out.sync_context = *r->in.sync_context;
11999 24 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
12000 24 : NDR_ZERO_STRUCTP(r->out.delta_enum_array);
12001 : }
12002 48 : if (flags & NDR_OUT) {
12003 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12004 : if (r->in.credential == NULL) {
12005 : NDR_PULL_ALLOC(ndr, r->in.credential);
12006 : NDR_ZERO_STRUCTP(r->in.credential);
12007 : }
12008 : if (r->in.return_authenticator == NULL) {
12009 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12010 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
12011 : }
12012 : if (r->in.sync_context == NULL) {
12013 : NDR_PULL_ALLOC(ndr, r->in.sync_context);
12014 : NDR_ZERO_STRUCTP(r->in.sync_context);
12015 : }
12016 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12017 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12018 6 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12019 : }
12020 24 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12021 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12022 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12023 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12024 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12025 6 : NDR_PULL_ALLOC(ndr, r->out.sync_context);
12026 : }
12027 24 : _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
12028 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC);
12029 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context));
12030 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
12031 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12032 6 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
12033 : }
12034 24 : _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12035 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
12036 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
12037 24 : if (_ptr_delta_enum_array) {
12038 0 : NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
12039 : } else {
12040 24 : *r->out.delta_enum_array = NULL;
12041 : }
12042 24 : if (*r->out.delta_enum_array) {
12043 0 : _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12044 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
12045 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
12046 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
12047 : }
12048 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
12049 24 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12050 : }
12051 40 : return NDR_ERR_SUCCESS;
12052 : }
12053 :
12054 12 : _PUBLIC_ void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DatabaseSync *r)
12055 : {
12056 12 : ndr_print_struct(ndr, name, "netr_DatabaseSync");
12057 12 : if (r == NULL) { ndr_print_null(ndr); return; }
12058 12 : ndr->depth++;
12059 12 : if (flags & NDR_SET_VALUES) {
12060 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12061 : }
12062 12 : if (flags & NDR_IN) {
12063 0 : ndr_print_struct(ndr, "in", "netr_DatabaseSync");
12064 0 : ndr->depth++;
12065 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12066 0 : ndr->depth++;
12067 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12068 0 : ndr->depth--;
12069 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
12070 0 : ndr->depth++;
12071 0 : ndr_print_string(ndr, "computername", r->in.computername);
12072 0 : ndr->depth--;
12073 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
12074 0 : ndr->depth++;
12075 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
12076 0 : ndr->depth--;
12077 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
12078 0 : ndr->depth++;
12079 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
12080 0 : ndr->depth--;
12081 0 : ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
12082 0 : ndr_print_ptr(ndr, "sync_context", r->in.sync_context);
12083 0 : ndr->depth++;
12084 0 : ndr_print_uint32(ndr, "sync_context", *r->in.sync_context);
12085 0 : ndr->depth--;
12086 0 : ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
12087 0 : ndr->depth--;
12088 : }
12089 12 : if (flags & NDR_OUT) {
12090 12 : ndr_print_struct(ndr, "out", "netr_DatabaseSync");
12091 12 : ndr->depth++;
12092 12 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
12093 12 : ndr->depth++;
12094 12 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
12095 12 : ndr->depth--;
12096 12 : ndr_print_ptr(ndr, "sync_context", r->out.sync_context);
12097 12 : ndr->depth++;
12098 12 : ndr_print_uint32(ndr, "sync_context", *r->out.sync_context);
12099 12 : ndr->depth--;
12100 12 : ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
12101 12 : ndr->depth++;
12102 12 : ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
12103 12 : ndr->depth++;
12104 12 : if (*r->out.delta_enum_array) {
12105 0 : ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
12106 : }
12107 12 : ndr->depth--;
12108 12 : ndr->depth--;
12109 12 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12110 12 : ndr->depth--;
12111 : }
12112 12 : ndr->depth--;
12113 : }
12114 :
12115 54 : static enum ndr_err_code ndr_push_netr_AccountDeltas(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_AccountDeltas *r)
12116 : {
12117 54 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12118 54 : if (flags & NDR_IN) {
12119 24 : if (r->in.computername == NULL) {
12120 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12121 : }
12122 24 : if (r->in.return_authenticator == NULL) {
12123 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12124 : }
12125 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
12126 24 : if (r->in.logon_server) {
12127 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12128 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12129 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12130 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12131 : }
12132 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
12133 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12134 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
12135 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12136 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
12137 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
12138 24 : NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, &r->in.uas));
12139 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
12140 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
12141 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffersize));
12142 : }
12143 54 : if (flags & NDR_OUT) {
12144 30 : if (r->out.return_authenticator == NULL) {
12145 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12146 : }
12147 30 : if (r->out.buffer == NULL) {
12148 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12149 : }
12150 30 : if (r->out.count_returned == NULL) {
12151 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12152 : }
12153 30 : if (r->out.total_entries == NULL) {
12154 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12155 : }
12156 30 : if (r->out.recordid == NULL) {
12157 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12158 : }
12159 30 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12160 : {
12161 5 : struct ndr_push *_ndr_buffer;
12162 30 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_buffer, 4, -1));
12163 30 : NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
12164 30 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_buffer, 4, -1));
12165 : }
12166 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count_returned));
12167 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
12168 30 : NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
12169 30 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12170 : }
12171 45 : return NDR_ERR_SUCCESS;
12172 : }
12173 :
12174 48 : static enum ndr_err_code ndr_pull_netr_AccountDeltas(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_AccountDeltas *r)
12175 : {
12176 8 : uint32_t _ptr_logon_server;
12177 48 : uint32_t size_logon_server_1 = 0;
12178 48 : uint32_t length_logon_server_1 = 0;
12179 48 : uint32_t size_computername_1 = 0;
12180 48 : uint32_t length_computername_1 = 0;
12181 48 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
12182 48 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
12183 48 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
12184 48 : TALLOC_CTX *_mem_save_count_returned_0 = NULL;
12185 48 : TALLOC_CTX *_mem_save_total_entries_0 = NULL;
12186 48 : TALLOC_CTX *_mem_save_recordid_0 = NULL;
12187 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12188 48 : if (flags & NDR_IN) {
12189 24 : NDR_ZERO_STRUCT(r->out);
12190 :
12191 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
12192 24 : if (_ptr_logon_server) {
12193 24 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
12194 : } else {
12195 0 : r->in.logon_server = NULL;
12196 : }
12197 24 : if (r->in.logon_server) {
12198 24 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
12199 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
12200 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
12201 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
12202 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
12203 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
12204 24 : if (length_logon_server_1 > size_logon_server_1) {
12205 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
12206 : }
12207 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12208 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12209 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
12210 : }
12211 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
12212 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
12213 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
12214 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
12215 24 : if (length_computername_1 > size_computername_1) {
12216 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
12217 : }
12218 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
12219 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
12220 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
12221 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12222 24 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12223 : }
12224 24 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12225 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12226 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
12227 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12228 24 : NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, &r->in.uas));
12229 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
12230 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
12231 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffersize));
12232 24 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12233 24 : *r->out.return_authenticator = *r->in.return_authenticator;
12234 24 : NDR_PULL_ALLOC(ndr, r->out.buffer);
12235 24 : NDR_ZERO_STRUCTP(r->out.buffer);
12236 24 : NDR_PULL_ALLOC(ndr, r->out.count_returned);
12237 24 : NDR_ZERO_STRUCTP(r->out.count_returned);
12238 24 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
12239 24 : NDR_ZERO_STRUCTP(r->out.total_entries);
12240 24 : NDR_PULL_ALLOC(ndr, r->out.recordid);
12241 24 : NDR_ZERO_STRUCTP(r->out.recordid);
12242 : }
12243 48 : if (flags & NDR_OUT) {
12244 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12245 : if (r->in.return_authenticator == NULL) {
12246 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12247 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
12248 : }
12249 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12250 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12251 6 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12252 : }
12253 24 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12254 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12255 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12256 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12257 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12258 6 : NDR_PULL_ALLOC(ndr, r->out.buffer);
12259 : }
12260 24 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
12261 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, LIBNDR_FLAG_REF_ALLOC);
12262 : {
12263 4 : struct ndr_pull *_ndr_buffer;
12264 24 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 4, -1));
12265 24 : NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
12266 24 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 4, -1));
12267 : }
12268 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, LIBNDR_FLAG_REF_ALLOC);
12269 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12270 6 : NDR_PULL_ALLOC(ndr, r->out.count_returned);
12271 : }
12272 24 : _mem_save_count_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
12273 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count_returned, LIBNDR_FLAG_REF_ALLOC);
12274 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count_returned));
12275 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_returned_0, LIBNDR_FLAG_REF_ALLOC);
12276 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12277 6 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
12278 : }
12279 24 : _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
12280 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
12281 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
12282 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
12283 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12284 6 : NDR_PULL_ALLOC(ndr, r->out.recordid);
12285 : }
12286 24 : _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
12287 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.recordid, LIBNDR_FLAG_REF_ALLOC);
12288 24 : NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
12289 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
12290 24 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12291 : }
12292 40 : return NDR_ERR_SUCCESS;
12293 : }
12294 :
12295 12 : _PUBLIC_ void ndr_print_netr_AccountDeltas(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_AccountDeltas *r)
12296 : {
12297 12 : ndr_print_struct(ndr, name, "netr_AccountDeltas");
12298 12 : if (r == NULL) { ndr_print_null(ndr); return; }
12299 12 : ndr->depth++;
12300 12 : if (flags & NDR_SET_VALUES) {
12301 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12302 : }
12303 12 : if (flags & NDR_IN) {
12304 0 : ndr_print_struct(ndr, "in", "netr_AccountDeltas");
12305 0 : ndr->depth++;
12306 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12307 0 : ndr->depth++;
12308 0 : if (r->in.logon_server) {
12309 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12310 : }
12311 0 : ndr->depth--;
12312 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
12313 0 : ndr->depth++;
12314 0 : ndr_print_string(ndr, "computername", r->in.computername);
12315 0 : ndr->depth--;
12316 0 : ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
12317 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
12318 0 : ndr->depth++;
12319 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
12320 0 : ndr->depth--;
12321 0 : ndr_print_netr_UAS_INFO_0(ndr, "uas", &r->in.uas);
12322 0 : ndr_print_uint32(ndr, "count", r->in.count);
12323 0 : ndr_print_uint32(ndr, "level", r->in.level);
12324 0 : ndr_print_uint32(ndr, "buffersize", r->in.buffersize);
12325 0 : ndr->depth--;
12326 : }
12327 12 : if (flags & NDR_OUT) {
12328 12 : ndr_print_struct(ndr, "out", "netr_AccountDeltas");
12329 12 : ndr->depth++;
12330 12 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
12331 12 : ndr->depth++;
12332 12 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
12333 12 : ndr->depth--;
12334 12 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
12335 12 : ndr->depth++;
12336 12 : ndr_print_netr_AccountBuffer(ndr, "buffer", r->out.buffer);
12337 12 : ndr->depth--;
12338 12 : ndr_print_ptr(ndr, "count_returned", r->out.count_returned);
12339 12 : ndr->depth++;
12340 12 : ndr_print_uint32(ndr, "count_returned", *r->out.count_returned);
12341 12 : ndr->depth--;
12342 12 : ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
12343 12 : ndr->depth++;
12344 12 : ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
12345 12 : ndr->depth--;
12346 12 : ndr_print_ptr(ndr, "recordid", r->out.recordid);
12347 12 : ndr->depth++;
12348 12 : ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->out.recordid);
12349 12 : ndr->depth--;
12350 12 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12351 12 : ndr->depth--;
12352 : }
12353 12 : ndr->depth--;
12354 : }
12355 :
12356 54 : static enum ndr_err_code ndr_push_netr_AccountSync(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_AccountSync *r)
12357 : {
12358 54 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12359 54 : if (flags & NDR_IN) {
12360 24 : if (r->in.computername == NULL) {
12361 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12362 : }
12363 24 : if (r->in.return_authenticator == NULL) {
12364 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12365 : }
12366 24 : if (r->in.recordid == NULL) {
12367 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12368 : }
12369 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
12370 24 : if (r->in.logon_server) {
12371 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12372 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12373 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12374 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12375 : }
12376 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
12377 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12378 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
12379 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12380 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
12381 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
12382 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reference));
12383 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
12384 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffersize));
12385 24 : NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->in.recordid));
12386 : }
12387 54 : if (flags & NDR_OUT) {
12388 30 : if (r->out.return_authenticator == NULL) {
12389 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12390 : }
12391 30 : if (r->out.buffer == NULL) {
12392 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12393 : }
12394 30 : if (r->out.count_returned == NULL) {
12395 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12396 : }
12397 30 : if (r->out.total_entries == NULL) {
12398 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12399 : }
12400 30 : if (r->out.next_reference == NULL) {
12401 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12402 : }
12403 30 : if (r->out.recordid == NULL) {
12404 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12405 : }
12406 30 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12407 : {
12408 5 : struct ndr_push *_ndr_buffer;
12409 30 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_buffer, 4, -1));
12410 30 : NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
12411 30 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_buffer, 4, -1));
12412 : }
12413 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count_returned));
12414 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
12415 30 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.next_reference));
12416 30 : NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
12417 30 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12418 : }
12419 45 : return NDR_ERR_SUCCESS;
12420 : }
12421 :
12422 48 : static enum ndr_err_code ndr_pull_netr_AccountSync(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_AccountSync *r)
12423 : {
12424 8 : uint32_t _ptr_logon_server;
12425 48 : uint32_t size_logon_server_1 = 0;
12426 48 : uint32_t length_logon_server_1 = 0;
12427 48 : uint32_t size_computername_1 = 0;
12428 48 : uint32_t length_computername_1 = 0;
12429 48 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
12430 48 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
12431 48 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
12432 48 : TALLOC_CTX *_mem_save_count_returned_0 = NULL;
12433 48 : TALLOC_CTX *_mem_save_total_entries_0 = NULL;
12434 48 : TALLOC_CTX *_mem_save_next_reference_0 = NULL;
12435 48 : TALLOC_CTX *_mem_save_recordid_0 = NULL;
12436 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12437 48 : if (flags & NDR_IN) {
12438 24 : NDR_ZERO_STRUCT(r->out);
12439 :
12440 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
12441 24 : if (_ptr_logon_server) {
12442 24 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
12443 : } else {
12444 0 : r->in.logon_server = NULL;
12445 : }
12446 24 : if (r->in.logon_server) {
12447 24 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
12448 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
12449 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
12450 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
12451 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
12452 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
12453 24 : if (length_logon_server_1 > size_logon_server_1) {
12454 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
12455 : }
12456 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12457 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12458 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
12459 : }
12460 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
12461 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
12462 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
12463 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
12464 24 : if (length_computername_1 > size_computername_1) {
12465 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
12466 : }
12467 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
12468 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
12469 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
12470 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12471 24 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12472 : }
12473 24 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12474 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12475 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
12476 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12477 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reference));
12478 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
12479 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffersize));
12480 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12481 24 : NDR_PULL_ALLOC(ndr, r->in.recordid);
12482 : }
12483 24 : _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
12484 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.recordid, LIBNDR_FLAG_REF_ALLOC);
12485 24 : NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->in.recordid));
12486 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
12487 24 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12488 24 : *r->out.return_authenticator = *r->in.return_authenticator;
12489 24 : NDR_PULL_ALLOC(ndr, r->out.buffer);
12490 24 : NDR_ZERO_STRUCTP(r->out.buffer);
12491 24 : NDR_PULL_ALLOC(ndr, r->out.count_returned);
12492 24 : NDR_ZERO_STRUCTP(r->out.count_returned);
12493 24 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
12494 24 : NDR_ZERO_STRUCTP(r->out.total_entries);
12495 24 : NDR_PULL_ALLOC(ndr, r->out.next_reference);
12496 24 : NDR_ZERO_STRUCTP(r->out.next_reference);
12497 24 : NDR_PULL_ALLOC(ndr, r->out.recordid);
12498 24 : *r->out.recordid = *r->in.recordid;
12499 : }
12500 48 : if (flags & NDR_OUT) {
12501 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12502 : if (r->in.return_authenticator == NULL) {
12503 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12504 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
12505 : }
12506 : if (r->in.recordid == NULL) {
12507 : NDR_PULL_ALLOC(ndr, r->in.recordid);
12508 : NDR_ZERO_STRUCTP(r->in.recordid);
12509 : }
12510 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12511 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12512 6 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12513 : }
12514 24 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12515 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12516 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12517 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12518 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12519 6 : NDR_PULL_ALLOC(ndr, r->out.buffer);
12520 : }
12521 24 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
12522 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, LIBNDR_FLAG_REF_ALLOC);
12523 : {
12524 4 : struct ndr_pull *_ndr_buffer;
12525 24 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 4, -1));
12526 24 : NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
12527 24 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 4, -1));
12528 : }
12529 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, LIBNDR_FLAG_REF_ALLOC);
12530 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12531 6 : NDR_PULL_ALLOC(ndr, r->out.count_returned);
12532 : }
12533 24 : _mem_save_count_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
12534 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count_returned, LIBNDR_FLAG_REF_ALLOC);
12535 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count_returned));
12536 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_returned_0, LIBNDR_FLAG_REF_ALLOC);
12537 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12538 6 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
12539 : }
12540 24 : _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
12541 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
12542 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
12543 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
12544 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12545 6 : NDR_PULL_ALLOC(ndr, r->out.next_reference);
12546 : }
12547 24 : _mem_save_next_reference_0 = NDR_PULL_GET_MEM_CTX(ndr);
12548 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.next_reference, LIBNDR_FLAG_REF_ALLOC);
12549 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.next_reference));
12550 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_reference_0, LIBNDR_FLAG_REF_ALLOC);
12551 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12552 6 : NDR_PULL_ALLOC(ndr, r->out.recordid);
12553 : }
12554 24 : _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
12555 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.recordid, LIBNDR_FLAG_REF_ALLOC);
12556 24 : NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
12557 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
12558 24 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12559 : }
12560 40 : return NDR_ERR_SUCCESS;
12561 : }
12562 :
12563 12 : _PUBLIC_ void ndr_print_netr_AccountSync(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_AccountSync *r)
12564 : {
12565 12 : ndr_print_struct(ndr, name, "netr_AccountSync");
12566 12 : if (r == NULL) { ndr_print_null(ndr); return; }
12567 12 : ndr->depth++;
12568 12 : if (flags & NDR_SET_VALUES) {
12569 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12570 : }
12571 12 : if (flags & NDR_IN) {
12572 0 : ndr_print_struct(ndr, "in", "netr_AccountSync");
12573 0 : ndr->depth++;
12574 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12575 0 : ndr->depth++;
12576 0 : if (r->in.logon_server) {
12577 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12578 : }
12579 0 : ndr->depth--;
12580 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
12581 0 : ndr->depth++;
12582 0 : ndr_print_string(ndr, "computername", r->in.computername);
12583 0 : ndr->depth--;
12584 0 : ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
12585 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
12586 0 : ndr->depth++;
12587 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
12588 0 : ndr->depth--;
12589 0 : ndr_print_uint32(ndr, "reference", r->in.reference);
12590 0 : ndr_print_uint32(ndr, "level", r->in.level);
12591 0 : ndr_print_uint32(ndr, "buffersize", r->in.buffersize);
12592 0 : ndr_print_ptr(ndr, "recordid", r->in.recordid);
12593 0 : ndr->depth++;
12594 0 : ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->in.recordid);
12595 0 : ndr->depth--;
12596 0 : ndr->depth--;
12597 : }
12598 12 : if (flags & NDR_OUT) {
12599 12 : ndr_print_struct(ndr, "out", "netr_AccountSync");
12600 12 : ndr->depth++;
12601 12 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
12602 12 : ndr->depth++;
12603 12 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
12604 12 : ndr->depth--;
12605 12 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
12606 12 : ndr->depth++;
12607 12 : ndr_print_netr_AccountBuffer(ndr, "buffer", r->out.buffer);
12608 12 : ndr->depth--;
12609 12 : ndr_print_ptr(ndr, "count_returned", r->out.count_returned);
12610 12 : ndr->depth++;
12611 12 : ndr_print_uint32(ndr, "count_returned", *r->out.count_returned);
12612 12 : ndr->depth--;
12613 12 : ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
12614 12 : ndr->depth++;
12615 12 : ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
12616 12 : ndr->depth--;
12617 12 : ndr_print_ptr(ndr, "next_reference", r->out.next_reference);
12618 12 : ndr->depth++;
12619 12 : ndr_print_uint32(ndr, "next_reference", *r->out.next_reference);
12620 12 : ndr->depth--;
12621 12 : ndr_print_ptr(ndr, "recordid", r->out.recordid);
12622 12 : ndr->depth++;
12623 12 : ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->out.recordid);
12624 12 : ndr->depth--;
12625 12 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12626 12 : ndr->depth--;
12627 : }
12628 12 : ndr->depth--;
12629 : }
12630 :
12631 54 : static enum ndr_err_code ndr_push_netr_GetDcName(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_GetDcName *r)
12632 : {
12633 54 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12634 54 : if (flags & NDR_IN) {
12635 24 : if (r->in.logon_server == NULL) {
12636 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12637 : }
12638 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12639 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12640 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12641 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12642 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domainname));
12643 24 : if (r->in.domainname) {
12644 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
12645 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12646 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
12647 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domainname, ndr_charset_length(r->in.domainname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12648 : }
12649 : }
12650 54 : if (flags & NDR_OUT) {
12651 30 : if (r->out.dcname == NULL) {
12652 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12653 : }
12654 30 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dcname));
12655 30 : if (*r->out.dcname) {
12656 30 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
12657 30 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12658 30 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
12659 30 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12660 : }
12661 30 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
12662 : }
12663 45 : return NDR_ERR_SUCCESS;
12664 : }
12665 :
12666 48 : static enum ndr_err_code ndr_pull_netr_GetDcName(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_GetDcName *r)
12667 : {
12668 48 : uint32_t size_logon_server_1 = 0;
12669 48 : uint32_t length_logon_server_1 = 0;
12670 8 : uint32_t _ptr_domainname;
12671 48 : uint32_t size_domainname_1 = 0;
12672 48 : uint32_t length_domainname_1 = 0;
12673 8 : uint32_t _ptr_dcname;
12674 48 : uint32_t size_dcname_2 = 0;
12675 48 : uint32_t length_dcname_2 = 0;
12676 48 : TALLOC_CTX *_mem_save_domainname_0 = NULL;
12677 48 : TALLOC_CTX *_mem_save_dcname_0 = NULL;
12678 48 : TALLOC_CTX *_mem_save_dcname_1 = NULL;
12679 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12680 48 : if (flags & NDR_IN) {
12681 24 : NDR_ZERO_STRUCT(r->out);
12682 :
12683 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
12684 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
12685 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
12686 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
12687 24 : if (length_logon_server_1 > size_logon_server_1) {
12688 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
12689 : }
12690 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12691 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12692 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domainname));
12693 24 : if (_ptr_domainname) {
12694 24 : NDR_PULL_ALLOC(ndr, r->in.domainname);
12695 : } else {
12696 0 : r->in.domainname = NULL;
12697 : }
12698 24 : if (r->in.domainname) {
12699 24 : _mem_save_domainname_0 = NDR_PULL_GET_MEM_CTX(ndr);
12700 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domainname, 0);
12701 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domainname));
12702 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domainname));
12703 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domainname, &size_domainname_1));
12704 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domainname, &length_domainname_1));
12705 24 : if (length_domainname_1 > size_domainname_1) {
12706 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domainname_1, length_domainname_1);
12707 : }
12708 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domainname_1, sizeof(uint16_t)));
12709 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domainname, length_domainname_1, sizeof(uint16_t), CH_UTF16));
12710 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domainname_0, 0);
12711 : }
12712 24 : NDR_PULL_ALLOC(ndr, r->out.dcname);
12713 24 : NDR_ZERO_STRUCTP(r->out.dcname);
12714 : }
12715 48 : if (flags & NDR_OUT) {
12716 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12717 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12718 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12719 6 : NDR_PULL_ALLOC(ndr, r->out.dcname);
12720 : }
12721 24 : _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr);
12722 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC);
12723 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dcname));
12724 24 : if (_ptr_dcname) {
12725 24 : NDR_PULL_ALLOC(ndr, *r->out.dcname);
12726 : } else {
12727 0 : *r->out.dcname = NULL;
12728 : }
12729 24 : if (*r->out.dcname) {
12730 24 : _mem_save_dcname_1 = NDR_PULL_GET_MEM_CTX(ndr);
12731 24 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.dcname, 0);
12732 24 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname));
12733 24 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname));
12734 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.dcname, &size_dcname_2));
12735 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.dcname, &length_dcname_2));
12736 24 : if (length_dcname_2 > size_dcname_2) {
12737 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dcname_2, length_dcname_2);
12738 : }
12739 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dcname_2, sizeof(uint16_t)));
12740 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, length_dcname_2, sizeof(uint16_t), CH_UTF16));
12741 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_1, 0);
12742 : }
12743 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC);
12744 24 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
12745 : }
12746 40 : return NDR_ERR_SUCCESS;
12747 : }
12748 :
12749 12 : _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_GetDcName *r)
12750 : {
12751 12 : ndr_print_struct(ndr, name, "netr_GetDcName");
12752 12 : if (r == NULL) { ndr_print_null(ndr); return; }
12753 12 : ndr->depth++;
12754 12 : if (flags & NDR_SET_VALUES) {
12755 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12756 : }
12757 12 : if (flags & NDR_IN) {
12758 0 : ndr_print_struct(ndr, "in", "netr_GetDcName");
12759 0 : ndr->depth++;
12760 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12761 0 : ndr->depth++;
12762 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12763 0 : ndr->depth--;
12764 0 : ndr_print_ptr(ndr, "domainname", r->in.domainname);
12765 0 : ndr->depth++;
12766 0 : if (r->in.domainname) {
12767 0 : ndr_print_string(ndr, "domainname", r->in.domainname);
12768 : }
12769 0 : ndr->depth--;
12770 0 : ndr->depth--;
12771 : }
12772 12 : if (flags & NDR_OUT) {
12773 12 : ndr_print_struct(ndr, "out", "netr_GetDcName");
12774 12 : ndr->depth++;
12775 12 : ndr_print_ptr(ndr, "dcname", r->out.dcname);
12776 12 : ndr->depth++;
12777 12 : ndr_print_ptr(ndr, "dcname", *r->out.dcname);
12778 12 : ndr->depth++;
12779 12 : if (*r->out.dcname) {
12780 12 : ndr_print_string(ndr, "dcname", *r->out.dcname);
12781 : }
12782 12 : ndr->depth--;
12783 12 : ndr->depth--;
12784 12 : ndr_print_WERROR(ndr, "result", r->out.result);
12785 12 : ndr->depth--;
12786 : }
12787 12 : ndr->depth--;
12788 : }
12789 :
12790 12408 : static enum ndr_err_code ndr_push_netr_LogonControl(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonControl *r)
12791 : {
12792 12408 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12793 12408 : if (flags & NDR_IN) {
12794 5655 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
12795 5655 : if (r->in.logon_server) {
12796 5655 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12797 5655 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12798 5655 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12799 5655 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12800 : }
12801 5655 : NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
12802 5655 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
12803 : }
12804 12408 : if (flags & NDR_OUT) {
12805 6753 : if (r->out.query == NULL) {
12806 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12807 : }
12808 6753 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
12809 6753 : NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
12810 6753 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
12811 : }
12812 10263 : return NDR_ERR_SUCCESS;
12813 : }
12814 :
12815 11238 : static enum ndr_err_code ndr_pull_netr_LogonControl(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonControl *r)
12816 : {
12817 1950 : uint32_t _ptr_logon_server;
12818 11238 : uint32_t size_logon_server_1 = 0;
12819 11238 : uint32_t length_logon_server_1 = 0;
12820 11238 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
12821 11238 : TALLOC_CTX *_mem_save_query_0 = NULL;
12822 11238 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12823 11238 : if (flags & NDR_IN) {
12824 5583 : NDR_ZERO_STRUCT(r->out);
12825 :
12826 5583 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
12827 5583 : if (_ptr_logon_server) {
12828 5583 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
12829 : } else {
12830 0 : r->in.logon_server = NULL;
12831 : }
12832 5583 : if (r->in.logon_server) {
12833 5583 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
12834 5583 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
12835 5583 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
12836 5583 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
12837 5583 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
12838 5583 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
12839 5583 : if (length_logon_server_1 > size_logon_server_1) {
12840 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
12841 : }
12842 5583 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12843 5583 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12844 5583 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
12845 : }
12846 5583 : NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
12847 5583 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
12848 5583 : NDR_PULL_ALLOC(ndr, r->out.query);
12849 5583 : NDR_ZERO_STRUCTP(r->out.query);
12850 : }
12851 11238 : if (flags & NDR_OUT) {
12852 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12853 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12854 5655 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12855 1170 : NDR_PULL_ALLOC(ndr, r->out.query);
12856 : }
12857 5655 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
12858 5655 : NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
12859 5655 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level));
12860 5655 : NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
12861 5655 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
12862 5655 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
12863 : }
12864 9288 : return NDR_ERR_SUCCESS;
12865 : }
12866 :
12867 2340 : _PUBLIC_ void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonControl *r)
12868 : {
12869 2340 : ndr_print_struct(ndr, name, "netr_LogonControl");
12870 2340 : if (r == NULL) { ndr_print_null(ndr); return; }
12871 2340 : ndr->depth++;
12872 2340 : if (flags & NDR_SET_VALUES) {
12873 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12874 : }
12875 2340 : if (flags & NDR_IN) {
12876 0 : ndr_print_struct(ndr, "in", "netr_LogonControl");
12877 0 : ndr->depth++;
12878 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12879 0 : ndr->depth++;
12880 0 : if (r->in.logon_server) {
12881 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12882 : }
12883 0 : ndr->depth--;
12884 0 : ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
12885 0 : ndr_print_uint32(ndr, "level", r->in.level);
12886 0 : ndr->depth--;
12887 : }
12888 2340 : if (flags & NDR_OUT) {
12889 2340 : ndr_print_struct(ndr, "out", "netr_LogonControl");
12890 2340 : ndr->depth++;
12891 2340 : ndr_print_ptr(ndr, "query", r->out.query);
12892 2340 : ndr->depth++;
12893 2340 : ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
12894 2340 : ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
12895 2340 : ndr->depth--;
12896 2340 : ndr_print_WERROR(ndr, "result", r->out.result);
12897 2340 : ndr->depth--;
12898 : }
12899 2340 : ndr->depth--;
12900 : }
12901 :
12902 162 : static enum ndr_err_code ndr_push_netr_GetAnyDCName(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_GetAnyDCName *r)
12903 : {
12904 162 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12905 162 : if (flags & NDR_IN) {
12906 72 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
12907 72 : if (r->in.logon_server) {
12908 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12909 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12910 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12911 72 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12912 : }
12913 72 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domainname));
12914 72 : if (r->in.domainname) {
12915 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
12916 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12917 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
12918 48 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domainname, ndr_charset_length(r->in.domainname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12919 : }
12920 : }
12921 162 : if (flags & NDR_OUT) {
12922 90 : if (r->out.dcname == NULL) {
12923 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12924 : }
12925 90 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dcname));
12926 90 : if (*r->out.dcname) {
12927 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
12928 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12929 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
12930 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12931 : }
12932 90 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
12933 : }
12934 135 : return NDR_ERR_SUCCESS;
12935 : }
12936 :
12937 144 : static enum ndr_err_code ndr_pull_netr_GetAnyDCName(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_GetAnyDCName *r)
12938 : {
12939 24 : uint32_t _ptr_logon_server;
12940 144 : uint32_t size_logon_server_1 = 0;
12941 144 : uint32_t length_logon_server_1 = 0;
12942 24 : uint32_t _ptr_domainname;
12943 144 : uint32_t size_domainname_1 = 0;
12944 144 : uint32_t length_domainname_1 = 0;
12945 24 : uint32_t _ptr_dcname;
12946 144 : uint32_t size_dcname_2 = 0;
12947 144 : uint32_t length_dcname_2 = 0;
12948 144 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
12949 144 : TALLOC_CTX *_mem_save_domainname_0 = NULL;
12950 144 : TALLOC_CTX *_mem_save_dcname_0 = NULL;
12951 144 : TALLOC_CTX *_mem_save_dcname_1 = NULL;
12952 144 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12953 144 : if (flags & NDR_IN) {
12954 72 : NDR_ZERO_STRUCT(r->out);
12955 :
12956 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
12957 72 : if (_ptr_logon_server) {
12958 72 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
12959 : } else {
12960 0 : r->in.logon_server = NULL;
12961 : }
12962 72 : if (r->in.logon_server) {
12963 72 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
12964 72 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
12965 72 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
12966 72 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
12967 72 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
12968 72 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
12969 72 : if (length_logon_server_1 > size_logon_server_1) {
12970 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
12971 : }
12972 72 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12973 72 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12974 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
12975 : }
12976 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domainname));
12977 72 : if (_ptr_domainname) {
12978 48 : NDR_PULL_ALLOC(ndr, r->in.domainname);
12979 : } else {
12980 24 : r->in.domainname = NULL;
12981 : }
12982 72 : if (r->in.domainname) {
12983 48 : _mem_save_domainname_0 = NDR_PULL_GET_MEM_CTX(ndr);
12984 48 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domainname, 0);
12985 48 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domainname));
12986 48 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domainname));
12987 48 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domainname, &size_domainname_1));
12988 48 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domainname, &length_domainname_1));
12989 48 : if (length_domainname_1 > size_domainname_1) {
12990 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domainname_1, length_domainname_1);
12991 : }
12992 48 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domainname_1, sizeof(uint16_t)));
12993 48 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domainname, length_domainname_1, sizeof(uint16_t), CH_UTF16));
12994 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domainname_0, 0);
12995 : }
12996 72 : NDR_PULL_ALLOC(ndr, r->out.dcname);
12997 72 : NDR_ZERO_STRUCTP(r->out.dcname);
12998 : }
12999 144 : if (flags & NDR_OUT) {
13000 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13001 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13002 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13003 18 : NDR_PULL_ALLOC(ndr, r->out.dcname);
13004 : }
13005 72 : _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr);
13006 72 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC);
13007 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dcname));
13008 72 : if (_ptr_dcname) {
13009 0 : NDR_PULL_ALLOC(ndr, *r->out.dcname);
13010 : } else {
13011 72 : *r->out.dcname = NULL;
13012 : }
13013 72 : if (*r->out.dcname) {
13014 0 : _mem_save_dcname_1 = NDR_PULL_GET_MEM_CTX(ndr);
13015 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.dcname, 0);
13016 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname));
13017 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname));
13018 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.dcname, &size_dcname_2));
13019 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.dcname, &length_dcname_2));
13020 0 : if (length_dcname_2 > size_dcname_2) {
13021 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dcname_2, length_dcname_2);
13022 : }
13023 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dcname_2, sizeof(uint16_t)));
13024 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, length_dcname_2, sizeof(uint16_t), CH_UTF16));
13025 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_1, 0);
13026 : }
13027 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC);
13028 72 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13029 : }
13030 120 : return NDR_ERR_SUCCESS;
13031 : }
13032 :
13033 36 : _PUBLIC_ void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_GetAnyDCName *r)
13034 : {
13035 36 : ndr_print_struct(ndr, name, "netr_GetAnyDCName");
13036 36 : if (r == NULL) { ndr_print_null(ndr); return; }
13037 36 : ndr->depth++;
13038 36 : if (flags & NDR_SET_VALUES) {
13039 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13040 : }
13041 36 : if (flags & NDR_IN) {
13042 0 : ndr_print_struct(ndr, "in", "netr_GetAnyDCName");
13043 0 : ndr->depth++;
13044 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
13045 0 : ndr->depth++;
13046 0 : if (r->in.logon_server) {
13047 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
13048 : }
13049 0 : ndr->depth--;
13050 0 : ndr_print_ptr(ndr, "domainname", r->in.domainname);
13051 0 : ndr->depth++;
13052 0 : if (r->in.domainname) {
13053 0 : ndr_print_string(ndr, "domainname", r->in.domainname);
13054 : }
13055 0 : ndr->depth--;
13056 0 : ndr->depth--;
13057 : }
13058 36 : if (flags & NDR_OUT) {
13059 36 : ndr_print_struct(ndr, "out", "netr_GetAnyDCName");
13060 36 : ndr->depth++;
13061 36 : ndr_print_ptr(ndr, "dcname", r->out.dcname);
13062 36 : ndr->depth++;
13063 36 : ndr_print_ptr(ndr, "dcname", *r->out.dcname);
13064 36 : ndr->depth++;
13065 36 : if (*r->out.dcname) {
13066 0 : ndr_print_string(ndr, "dcname", *r->out.dcname);
13067 : }
13068 36 : ndr->depth--;
13069 36 : ndr->depth--;
13070 36 : ndr_print_WERROR(ndr, "result", r->out.result);
13071 36 : ndr->depth--;
13072 : }
13073 36 : ndr->depth--;
13074 : }
13075 :
13076 2660 : static enum ndr_err_code ndr_push_netr_LogonControl2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonControl2 *r)
13077 : {
13078 2660 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13079 2660 : if (flags & NDR_IN) {
13080 1218 : if (r->in.data == NULL) {
13081 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13082 : }
13083 1218 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
13084 1218 : if (r->in.logon_server) {
13085 1218 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13086 1218 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13087 1218 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13088 1218 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13089 : }
13090 1218 : NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
13091 1218 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13092 1218 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.data, r->in.function_code));
13093 1218 : NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
13094 : }
13095 2660 : if (flags & NDR_OUT) {
13096 1442 : if (r->out.query == NULL) {
13097 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13098 : }
13099 1442 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
13100 1442 : NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
13101 1442 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13102 : }
13103 2198 : return NDR_ERR_SUCCESS;
13104 : }
13105 :
13106 2408 : static enum ndr_err_code ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonControl2 *r)
13107 : {
13108 420 : uint32_t _ptr_logon_server;
13109 2408 : uint32_t size_logon_server_1 = 0;
13110 2408 : uint32_t length_logon_server_1 = 0;
13111 2408 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
13112 2408 : TALLOC_CTX *_mem_save_data_0 = NULL;
13113 2408 : TALLOC_CTX *_mem_save_query_0 = NULL;
13114 2408 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13115 2408 : if (flags & NDR_IN) {
13116 1190 : NDR_ZERO_STRUCT(r->out);
13117 :
13118 1190 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
13119 1190 : if (_ptr_logon_server) {
13120 1190 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
13121 : } else {
13122 0 : r->in.logon_server = NULL;
13123 : }
13124 1190 : if (r->in.logon_server) {
13125 1190 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
13126 1190 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
13127 1190 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
13128 1190 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
13129 1190 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
13130 1190 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
13131 1190 : if (length_logon_server_1 > size_logon_server_1) {
13132 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
13133 : }
13134 1190 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
13135 1190 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
13136 1190 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
13137 : }
13138 1190 : NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
13139 1190 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13140 1190 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13141 1190 : NDR_PULL_ALLOC(ndr, r->in.data);
13142 : }
13143 1190 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
13144 1190 : NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
13145 1190 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.data, r->in.function_code));
13146 1190 : NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
13147 1190 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
13148 1190 : NDR_PULL_ALLOC(ndr, r->out.query);
13149 1190 : NDR_ZERO_STRUCTP(r->out.query);
13150 : }
13151 2408 : if (flags & NDR_OUT) {
13152 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13153 : if (r->in.data == NULL) {
13154 : NDR_PULL_ALLOC(ndr, r->in.data);
13155 : NDR_ZERO_STRUCTP(r->in.data);
13156 : }
13157 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13158 1218 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13159 252 : NDR_PULL_ALLOC(ndr, r->out.query);
13160 : }
13161 1218 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
13162 1218 : NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
13163 1218 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level));
13164 1218 : NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
13165 1218 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
13166 1218 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13167 : }
13168 1988 : return NDR_ERR_SUCCESS;
13169 : }
13170 :
13171 504 : _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonControl2 *r)
13172 : {
13173 504 : ndr_print_struct(ndr, name, "netr_LogonControl2");
13174 504 : if (r == NULL) { ndr_print_null(ndr); return; }
13175 504 : ndr->depth++;
13176 504 : if (flags & NDR_SET_VALUES) {
13177 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13178 : }
13179 504 : if (flags & NDR_IN) {
13180 0 : ndr_print_struct(ndr, "in", "netr_LogonControl2");
13181 0 : ndr->depth++;
13182 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
13183 0 : ndr->depth++;
13184 0 : if (r->in.logon_server) {
13185 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
13186 : }
13187 0 : ndr->depth--;
13188 0 : ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
13189 0 : ndr_print_uint32(ndr, "level", r->in.level);
13190 0 : ndr_print_ptr(ndr, "data", r->in.data);
13191 0 : ndr->depth++;
13192 0 : ndr_print_set_switch_value(ndr, r->in.data, r->in.function_code);
13193 0 : ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", r->in.data);
13194 0 : ndr->depth--;
13195 0 : ndr->depth--;
13196 : }
13197 504 : if (flags & NDR_OUT) {
13198 504 : ndr_print_struct(ndr, "out", "netr_LogonControl2");
13199 504 : ndr->depth++;
13200 504 : ndr_print_ptr(ndr, "query", r->out.query);
13201 504 : ndr->depth++;
13202 504 : ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
13203 504 : ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
13204 504 : ndr->depth--;
13205 504 : ndr_print_WERROR(ndr, "result", r->out.result);
13206 504 : ndr->depth--;
13207 : }
13208 504 : ndr->depth--;
13209 : }
13210 :
13211 2427 : static enum ndr_err_code ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerAuthenticate2 *r)
13212 : {
13213 2427 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13214 2427 : if (flags & NDR_IN) {
13215 1125 : if (r->in.account_name == NULL) {
13216 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13217 : }
13218 1125 : if (r->in.computer_name == NULL) {
13219 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13220 : }
13221 1125 : if (r->in.credentials == NULL) {
13222 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13223 : }
13224 1125 : if (r->in.negotiate_flags == NULL) {
13225 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13226 : }
13227 1125 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
13228 1125 : if (r->in.server_name) {
13229 569 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
13230 569 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13231 569 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
13232 569 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13233 : }
13234 1125 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
13235 1125 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13236 1125 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
13237 1125 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13238 1125 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
13239 1125 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
13240 1125 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13241 1125 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
13242 1125 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13243 1125 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
13244 1125 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->in.negotiate_flags));
13245 : }
13246 2427 : if (flags & NDR_OUT) {
13247 1302 : if (r->out.return_credentials == NULL) {
13248 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13249 : }
13250 1302 : if (r->out.negotiate_flags == NULL) {
13251 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13252 : }
13253 1302 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
13254 1302 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->out.negotiate_flags));
13255 1302 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13256 : }
13257 2073 : return NDR_ERR_SUCCESS;
13258 : }
13259 :
13260 2234 : static enum ndr_err_code ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerAuthenticate2 *r)
13261 : {
13262 320 : uint32_t _ptr_server_name;
13263 2234 : uint32_t size_server_name_1 = 0;
13264 2234 : uint32_t length_server_name_1 = 0;
13265 2234 : uint32_t size_account_name_1 = 0;
13266 2234 : uint32_t length_account_name_1 = 0;
13267 2234 : uint32_t size_computer_name_1 = 0;
13268 2234 : uint32_t length_computer_name_1 = 0;
13269 2234 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
13270 2234 : TALLOC_CTX *_mem_save_credentials_0 = NULL;
13271 2234 : TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
13272 2234 : TALLOC_CTX *_mem_save_negotiate_flags_0 = NULL;
13273 2234 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13274 2234 : if (flags & NDR_IN) {
13275 1109 : NDR_ZERO_STRUCT(r->out);
13276 :
13277 1109 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
13278 1109 : if (_ptr_server_name) {
13279 553 : NDR_PULL_ALLOC(ndr, r->in.server_name);
13280 : } else {
13281 556 : r->in.server_name = NULL;
13282 : }
13283 1109 : if (r->in.server_name) {
13284 553 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13285 553 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
13286 553 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
13287 553 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
13288 553 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
13289 553 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
13290 553 : if (length_server_name_1 > size_server_name_1) {
13291 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
13292 : }
13293 553 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
13294 553 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
13295 553 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
13296 : }
13297 1109 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
13298 1109 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
13299 1109 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
13300 1109 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
13301 1109 : if (length_account_name_1 > size_account_name_1) {
13302 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
13303 : }
13304 1109 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
13305 1109 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
13306 1109 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
13307 1109 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
13308 1109 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
13309 1109 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
13310 1109 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
13311 1109 : if (length_computer_name_1 > size_computer_name_1) {
13312 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
13313 : }
13314 1109 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
13315 1109 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
13316 1109 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13317 1109 : NDR_PULL_ALLOC(ndr, r->in.credentials);
13318 : }
13319 1109 : _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
13320 1109 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
13321 1109 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
13322 1109 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
13323 1109 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13324 1109 : NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
13325 : }
13326 1109 : _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
13327 1109 : NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
13328 1109 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->in.negotiate_flags));
13329 1109 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
13330 1109 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
13331 1109 : NDR_ZERO_STRUCTP(r->out.return_credentials);
13332 1109 : NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
13333 1109 : *r->out.negotiate_flags = *r->in.negotiate_flags;
13334 : }
13335 2234 : if (flags & NDR_OUT) {
13336 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13337 : if (r->in.credentials == NULL) {
13338 : NDR_PULL_ALLOC(ndr, r->in.credentials);
13339 : NDR_ZERO_STRUCTP(r->in.credentials);
13340 : }
13341 : if (r->in.negotiate_flags == NULL) {
13342 : NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
13343 : NDR_ZERO_STRUCTP(r->in.negotiate_flags);
13344 : }
13345 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13346 1125 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13347 193 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
13348 : }
13349 1125 : _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
13350 1125 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
13351 1125 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
13352 1125 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
13353 1125 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13354 193 : NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
13355 : }
13356 1125 : _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
13357 1125 : NDR_PULL_SET_MEM_CTX(ndr, r->out.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
13358 1125 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->out.negotiate_flags));
13359 1125 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
13360 1125 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13361 : }
13362 1914 : return NDR_ERR_SUCCESS;
13363 : }
13364 :
13365 386 : _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerAuthenticate2 *r)
13366 : {
13367 386 : ndr_print_struct(ndr, name, "netr_ServerAuthenticate2");
13368 386 : if (r == NULL) { ndr_print_null(ndr); return; }
13369 386 : ndr->depth++;
13370 386 : if (flags & NDR_SET_VALUES) {
13371 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13372 : }
13373 386 : if (flags & NDR_IN) {
13374 0 : ndr_print_struct(ndr, "in", "netr_ServerAuthenticate2");
13375 0 : ndr->depth++;
13376 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
13377 0 : ndr->depth++;
13378 0 : if (r->in.server_name) {
13379 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
13380 : }
13381 0 : ndr->depth--;
13382 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
13383 0 : ndr->depth++;
13384 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
13385 0 : ndr->depth--;
13386 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
13387 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
13388 0 : ndr->depth++;
13389 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
13390 0 : ndr->depth--;
13391 0 : ndr_print_ptr(ndr, "credentials", r->in.credentials);
13392 0 : ndr->depth++;
13393 0 : ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
13394 0 : ndr->depth--;
13395 0 : ndr_print_ptr(ndr, "negotiate_flags", r->in.negotiate_flags);
13396 0 : ndr->depth++;
13397 0 : ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->in.negotiate_flags);
13398 0 : ndr->depth--;
13399 0 : ndr->depth--;
13400 : }
13401 386 : if (flags & NDR_OUT) {
13402 386 : ndr_print_struct(ndr, "out", "netr_ServerAuthenticate2");
13403 386 : ndr->depth++;
13404 386 : ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
13405 386 : ndr->depth++;
13406 386 : ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
13407 386 : ndr->depth--;
13408 386 : ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
13409 386 : ndr->depth++;
13410 386 : ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->out.negotiate_flags);
13411 386 : ndr->depth--;
13412 386 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13413 386 : ndr->depth--;
13414 : }
13415 386 : ndr->depth--;
13416 : }
13417 :
13418 27 : static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DatabaseSync2 *r)
13419 : {
13420 27 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13421 27 : if (flags & NDR_IN) {
13422 12 : if (r->in.logon_server == NULL) {
13423 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13424 : }
13425 12 : if (r->in.computername == NULL) {
13426 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13427 : }
13428 12 : if (r->in.credential == NULL) {
13429 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13430 : }
13431 12 : if (r->in.return_authenticator == NULL) {
13432 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13433 : }
13434 12 : if (r->in.sync_context == NULL) {
13435 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13436 : }
13437 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13438 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13439 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13440 12 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13441 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
13442 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13443 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
13444 12 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13445 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
13446 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
13447 12 : NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
13448 12 : NDR_CHECK(ndr_push_SyncStateEnum(ndr, NDR_SCALARS, r->in.restart_state));
13449 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.sync_context));
13450 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
13451 : }
13452 27 : if (flags & NDR_OUT) {
13453 15 : if (r->out.return_authenticator == NULL) {
13454 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13455 : }
13456 15 : if (r->out.sync_context == NULL) {
13457 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13458 : }
13459 15 : if (r->out.delta_enum_array == NULL) {
13460 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13461 : }
13462 15 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
13463 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context));
13464 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
13465 15 : if (*r->out.delta_enum_array) {
13466 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
13467 : }
13468 15 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13469 : }
13470 27 : return NDR_ERR_SUCCESS;
13471 : }
13472 :
13473 24 : static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DatabaseSync2 *r)
13474 : {
13475 24 : uint32_t size_logon_server_1 = 0;
13476 24 : uint32_t length_logon_server_1 = 0;
13477 24 : uint32_t size_computername_1 = 0;
13478 24 : uint32_t length_computername_1 = 0;
13479 0 : uint32_t _ptr_delta_enum_array;
13480 24 : TALLOC_CTX *_mem_save_credential_0 = NULL;
13481 24 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
13482 24 : TALLOC_CTX *_mem_save_sync_context_0 = NULL;
13483 24 : TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
13484 24 : TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
13485 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13486 24 : if (flags & NDR_IN) {
13487 12 : NDR_ZERO_STRUCT(r->out);
13488 :
13489 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
13490 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
13491 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
13492 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
13493 12 : if (length_logon_server_1 > size_logon_server_1) {
13494 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
13495 : }
13496 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
13497 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
13498 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
13499 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
13500 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
13501 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
13502 12 : if (length_computername_1 > size_computername_1) {
13503 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
13504 : }
13505 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
13506 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
13507 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13508 12 : NDR_PULL_ALLOC(ndr, r->in.credential);
13509 : }
13510 12 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
13511 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
13512 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
13513 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
13514 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13515 12 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
13516 : }
13517 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
13518 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
13519 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
13520 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
13521 12 : NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
13522 12 : NDR_CHECK(ndr_pull_SyncStateEnum(ndr, NDR_SCALARS, &r->in.restart_state));
13523 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13524 12 : NDR_PULL_ALLOC(ndr, r->in.sync_context);
13525 : }
13526 12 : _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
13527 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sync_context, LIBNDR_FLAG_REF_ALLOC);
13528 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.sync_context));
13529 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
13530 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
13531 12 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
13532 12 : *r->out.return_authenticator = *r->in.return_authenticator;
13533 12 : NDR_PULL_ALLOC(ndr, r->out.sync_context);
13534 12 : *r->out.sync_context = *r->in.sync_context;
13535 12 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
13536 12 : NDR_ZERO_STRUCTP(r->out.delta_enum_array);
13537 : }
13538 24 : if (flags & NDR_OUT) {
13539 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13540 : if (r->in.credential == NULL) {
13541 : NDR_PULL_ALLOC(ndr, r->in.credential);
13542 : NDR_ZERO_STRUCTP(r->in.credential);
13543 : }
13544 : if (r->in.return_authenticator == NULL) {
13545 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
13546 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
13547 : }
13548 : if (r->in.sync_context == NULL) {
13549 : NDR_PULL_ALLOC(ndr, r->in.sync_context);
13550 : NDR_ZERO_STRUCTP(r->in.sync_context);
13551 : }
13552 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13553 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13554 3 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
13555 : }
13556 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
13557 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
13558 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
13559 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
13560 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13561 3 : NDR_PULL_ALLOC(ndr, r->out.sync_context);
13562 : }
13563 12 : _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
13564 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC);
13565 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context));
13566 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
13567 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13568 3 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
13569 : }
13570 12 : _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13571 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
13572 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
13573 12 : if (_ptr_delta_enum_array) {
13574 0 : NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
13575 : } else {
13576 12 : *r->out.delta_enum_array = NULL;
13577 : }
13578 12 : if (*r->out.delta_enum_array) {
13579 0 : _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
13580 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
13581 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
13582 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
13583 : }
13584 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
13585 12 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13586 : }
13587 24 : return NDR_ERR_SUCCESS;
13588 : }
13589 :
13590 6 : _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DatabaseSync2 *r)
13591 : {
13592 6 : ndr_print_struct(ndr, name, "netr_DatabaseSync2");
13593 6 : if (r == NULL) { ndr_print_null(ndr); return; }
13594 6 : ndr->depth++;
13595 6 : if (flags & NDR_SET_VALUES) {
13596 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13597 : }
13598 6 : if (flags & NDR_IN) {
13599 0 : ndr_print_struct(ndr, "in", "netr_DatabaseSync2");
13600 0 : ndr->depth++;
13601 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
13602 0 : ndr->depth++;
13603 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
13604 0 : ndr->depth--;
13605 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
13606 0 : ndr->depth++;
13607 0 : ndr_print_string(ndr, "computername", r->in.computername);
13608 0 : ndr->depth--;
13609 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
13610 0 : ndr->depth++;
13611 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
13612 0 : ndr->depth--;
13613 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
13614 0 : ndr->depth++;
13615 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
13616 0 : ndr->depth--;
13617 0 : ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
13618 0 : ndr_print_SyncStateEnum(ndr, "restart_state", r->in.restart_state);
13619 0 : ndr_print_ptr(ndr, "sync_context", r->in.sync_context);
13620 0 : ndr->depth++;
13621 0 : ndr_print_uint32(ndr, "sync_context", *r->in.sync_context);
13622 0 : ndr->depth--;
13623 0 : ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
13624 0 : ndr->depth--;
13625 : }
13626 6 : if (flags & NDR_OUT) {
13627 6 : ndr_print_struct(ndr, "out", "netr_DatabaseSync2");
13628 6 : ndr->depth++;
13629 6 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
13630 6 : ndr->depth++;
13631 6 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
13632 6 : ndr->depth--;
13633 6 : ndr_print_ptr(ndr, "sync_context", r->out.sync_context);
13634 6 : ndr->depth++;
13635 6 : ndr_print_uint32(ndr, "sync_context", *r->out.sync_context);
13636 6 : ndr->depth--;
13637 6 : ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
13638 6 : ndr->depth++;
13639 6 : ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
13640 6 : ndr->depth++;
13641 6 : if (*r->out.delta_enum_array) {
13642 0 : ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
13643 : }
13644 6 : ndr->depth--;
13645 6 : ndr->depth--;
13646 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13647 6 : ndr->depth--;
13648 : }
13649 6 : ndr->depth--;
13650 : }
13651 :
13652 24 : static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DatabaseRedo *r)
13653 : {
13654 24 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13655 24 : if (flags & NDR_IN) {
13656 24 : if (r->in.logon_server == NULL) {
13657 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13658 : }
13659 24 : if (r->in.computername == NULL) {
13660 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13661 : }
13662 24 : if (r->in.credential == NULL) {
13663 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13664 : }
13665 24 : if (r->in.return_authenticator == NULL) {
13666 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13667 : }
13668 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13669 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13670 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13671 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13672 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
13673 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13674 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
13675 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13676 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
13677 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
13678 : {
13679 4 : struct ndr_push *_ndr_change_log_entry;
13680 24 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_change_log_entry, 4, -1));
13681 24 : NDR_CHECK(ndr_push_netr_ChangeLogEntry(_ndr_change_log_entry, NDR_SCALARS|NDR_BUFFERS, &r->in.change_log_entry));
13682 24 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_change_log_entry, 4, -1));
13683 : }
13684 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags)));
13685 : }
13686 24 : if (flags & NDR_OUT) {
13687 0 : if (r->out.return_authenticator == NULL) {
13688 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13689 : }
13690 0 : if (r->out.delta_enum_array == NULL) {
13691 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13692 : }
13693 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
13694 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
13695 0 : if (*r->out.delta_enum_array) {
13696 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
13697 : }
13698 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13699 : }
13700 20 : return NDR_ERR_SUCCESS;
13701 : }
13702 :
13703 24 : static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DatabaseRedo *r)
13704 : {
13705 24 : uint32_t size_logon_server_1 = 0;
13706 24 : uint32_t length_logon_server_1 = 0;
13707 24 : uint32_t size_computername_1 = 0;
13708 24 : uint32_t length_computername_1 = 0;
13709 4 : uint32_t _ptr_delta_enum_array;
13710 24 : TALLOC_CTX *_mem_save_credential_0 = NULL;
13711 24 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
13712 24 : TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
13713 24 : TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
13714 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13715 24 : if (flags & NDR_IN) {
13716 24 : NDR_ZERO_STRUCT(r->out);
13717 :
13718 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
13719 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
13720 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
13721 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
13722 24 : if (length_logon_server_1 > size_logon_server_1) {
13723 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
13724 : }
13725 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
13726 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
13727 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
13728 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
13729 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
13730 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
13731 24 : if (length_computername_1 > size_computername_1) {
13732 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
13733 : }
13734 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
13735 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
13736 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13737 24 : NDR_PULL_ALLOC(ndr, r->in.credential);
13738 : }
13739 24 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
13740 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
13741 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
13742 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
13743 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13744 24 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
13745 : }
13746 24 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
13747 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
13748 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
13749 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
13750 : {
13751 4 : struct ndr_pull *_ndr_change_log_entry;
13752 24 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_change_log_entry, 4, -1));
13753 24 : NDR_CHECK(ndr_pull_netr_ChangeLogEntry(_ndr_change_log_entry, NDR_SCALARS|NDR_BUFFERS, &r->in.change_log_entry));
13754 24 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_change_log_entry, 4, -1));
13755 : }
13756 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.change_log_entry_size));
13757 24 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
13758 24 : *r->out.return_authenticator = *r->in.return_authenticator;
13759 24 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
13760 24 : NDR_ZERO_STRUCTP(r->out.delta_enum_array);
13761 : }
13762 24 : if (flags & NDR_OUT) {
13763 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13764 : if (r->in.credential == NULL) {
13765 : NDR_PULL_ALLOC(ndr, r->in.credential);
13766 : NDR_ZERO_STRUCTP(r->in.credential);
13767 : }
13768 : if (r->in.return_authenticator == NULL) {
13769 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
13770 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
13771 : }
13772 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13773 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13774 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
13775 : }
13776 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
13777 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
13778 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
13779 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
13780 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13781 0 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
13782 : }
13783 0 : _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13784 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
13785 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
13786 0 : if (_ptr_delta_enum_array) {
13787 0 : NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
13788 : } else {
13789 0 : *r->out.delta_enum_array = NULL;
13790 : }
13791 0 : if (*r->out.delta_enum_array) {
13792 0 : _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
13793 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
13794 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
13795 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
13796 : }
13797 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
13798 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13799 : }
13800 20 : return NDR_ERR_SUCCESS;
13801 : }
13802 :
13803 0 : _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DatabaseRedo *r)
13804 : {
13805 0 : ndr_print_struct(ndr, name, "netr_DatabaseRedo");
13806 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13807 0 : ndr->depth++;
13808 0 : if (flags & NDR_SET_VALUES) {
13809 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13810 : }
13811 0 : if (flags & NDR_IN) {
13812 0 : ndr_print_struct(ndr, "in", "netr_DatabaseRedo");
13813 0 : ndr->depth++;
13814 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
13815 0 : ndr->depth++;
13816 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
13817 0 : ndr->depth--;
13818 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
13819 0 : ndr->depth++;
13820 0 : ndr_print_string(ndr, "computername", r->in.computername);
13821 0 : ndr->depth--;
13822 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
13823 0 : ndr->depth++;
13824 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
13825 0 : ndr->depth--;
13826 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
13827 0 : ndr->depth++;
13828 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
13829 0 : ndr->depth--;
13830 0 : ndr_print_netr_ChangeLogEntry(ndr, "change_log_entry", &r->in.change_log_entry);
13831 0 : ndr_print_uint32(ndr, "change_log_entry_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags):r->in.change_log_entry_size);
13832 0 : ndr->depth--;
13833 : }
13834 0 : if (flags & NDR_OUT) {
13835 0 : ndr_print_struct(ndr, "out", "netr_DatabaseRedo");
13836 0 : ndr->depth++;
13837 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
13838 0 : ndr->depth++;
13839 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
13840 0 : ndr->depth--;
13841 0 : ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
13842 0 : ndr->depth++;
13843 0 : ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
13844 0 : ndr->depth++;
13845 0 : if (*r->out.delta_enum_array) {
13846 0 : ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
13847 : }
13848 0 : ndr->depth--;
13849 0 : ndr->depth--;
13850 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13851 0 : ndr->depth--;
13852 : }
13853 0 : ndr->depth--;
13854 : }
13855 :
13856 2822 : static enum ndr_err_code ndr_push_netr_LogonControl2Ex(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonControl2Ex *r)
13857 : {
13858 2822 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13859 2822 : if (flags & NDR_IN) {
13860 1299 : if (r->in.data == NULL) {
13861 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13862 : }
13863 1299 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
13864 1299 : if (r->in.logon_server) {
13865 1299 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13866 1299 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13867 1299 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13868 1299 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13869 : }
13870 1299 : NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
13871 1299 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13872 1299 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.data, r->in.function_code));
13873 1299 : NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
13874 : }
13875 2822 : if (flags & NDR_OUT) {
13876 1523 : if (r->out.query == NULL) {
13877 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13878 : }
13879 1523 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
13880 1523 : NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
13881 1523 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13882 : }
13883 2360 : return NDR_ERR_SUCCESS;
13884 : }
13885 :
13886 2570 : static enum ndr_err_code ndr_pull_netr_LogonControl2Ex(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonControl2Ex *r)
13887 : {
13888 420 : uint32_t _ptr_logon_server;
13889 2570 : uint32_t size_logon_server_1 = 0;
13890 2570 : uint32_t length_logon_server_1 = 0;
13891 2570 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
13892 2570 : TALLOC_CTX *_mem_save_data_0 = NULL;
13893 2570 : TALLOC_CTX *_mem_save_query_0 = NULL;
13894 2570 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13895 2570 : if (flags & NDR_IN) {
13896 1271 : NDR_ZERO_STRUCT(r->out);
13897 :
13898 1271 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
13899 1271 : if (_ptr_logon_server) {
13900 1271 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
13901 : } else {
13902 0 : r->in.logon_server = NULL;
13903 : }
13904 1271 : if (r->in.logon_server) {
13905 1271 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
13906 1271 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
13907 1271 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
13908 1271 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
13909 1271 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
13910 1271 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
13911 1271 : if (length_logon_server_1 > size_logon_server_1) {
13912 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
13913 : }
13914 1271 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
13915 1271 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
13916 1271 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
13917 : }
13918 1271 : NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
13919 1271 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13920 1271 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13921 1271 : NDR_PULL_ALLOC(ndr, r->in.data);
13922 : }
13923 1271 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
13924 1271 : NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
13925 1271 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.data, r->in.function_code));
13926 1271 : NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
13927 1271 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
13928 1271 : NDR_PULL_ALLOC(ndr, r->out.query);
13929 1271 : NDR_ZERO_STRUCTP(r->out.query);
13930 : }
13931 2570 : if (flags & NDR_OUT) {
13932 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13933 : if (r->in.data == NULL) {
13934 : NDR_PULL_ALLOC(ndr, r->in.data);
13935 : NDR_ZERO_STRUCTP(r->in.data);
13936 : }
13937 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13938 1299 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13939 333 : NDR_PULL_ALLOC(ndr, r->out.query);
13940 : }
13941 1299 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
13942 1299 : NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
13943 1299 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level));
13944 1299 : NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
13945 1299 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
13946 1299 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13947 : }
13948 2150 : return NDR_ERR_SUCCESS;
13949 : }
13950 :
13951 504 : _PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonControl2Ex *r)
13952 : {
13953 504 : ndr_print_struct(ndr, name, "netr_LogonControl2Ex");
13954 504 : if (r == NULL) { ndr_print_null(ndr); return; }
13955 504 : ndr->depth++;
13956 504 : if (flags & NDR_SET_VALUES) {
13957 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13958 : }
13959 504 : if (flags & NDR_IN) {
13960 0 : ndr_print_struct(ndr, "in", "netr_LogonControl2Ex");
13961 0 : ndr->depth++;
13962 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
13963 0 : ndr->depth++;
13964 0 : if (r->in.logon_server) {
13965 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
13966 : }
13967 0 : ndr->depth--;
13968 0 : ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
13969 0 : ndr_print_uint32(ndr, "level", r->in.level);
13970 0 : ndr_print_ptr(ndr, "data", r->in.data);
13971 0 : ndr->depth++;
13972 0 : ndr_print_set_switch_value(ndr, r->in.data, r->in.function_code);
13973 0 : ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", r->in.data);
13974 0 : ndr->depth--;
13975 0 : ndr->depth--;
13976 : }
13977 504 : if (flags & NDR_OUT) {
13978 504 : ndr_print_struct(ndr, "out", "netr_LogonControl2Ex");
13979 504 : ndr->depth++;
13980 504 : ndr_print_ptr(ndr, "query", r->out.query);
13981 504 : ndr->depth++;
13982 504 : ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
13983 504 : ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
13984 504 : ndr->depth--;
13985 504 : ndr_print_WERROR(ndr, "result", r->out.result);
13986 504 : ndr->depth--;
13987 : }
13988 504 : ndr->depth--;
13989 : }
13990 :
13991 28 : static enum ndr_err_code ndr_push_netr_NetrEnumerateTrustedDomains(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NetrEnumerateTrustedDomains *r)
13992 : {
13993 28 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13994 28 : if (flags & NDR_IN) {
13995 28 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
13996 28 : if (r->in.server_name) {
13997 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
13998 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13999 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14000 28 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14001 : }
14002 : }
14003 28 : if (flags & NDR_OUT) {
14004 0 : if (r->out.trusted_domains_blob == NULL) {
14005 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14006 : }
14007 0 : NDR_CHECK(ndr_push_netr_Blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusted_domains_blob));
14008 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
14009 : }
14010 24 : return NDR_ERR_SUCCESS;
14011 : }
14012 :
14013 28 : static enum ndr_err_code ndr_pull_netr_NetrEnumerateTrustedDomains(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NetrEnumerateTrustedDomains *r)
14014 : {
14015 4 : uint32_t _ptr_server_name;
14016 28 : uint32_t size_server_name_1 = 0;
14017 28 : uint32_t length_server_name_1 = 0;
14018 28 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
14019 28 : TALLOC_CTX *_mem_save_trusted_domains_blob_0 = NULL;
14020 28 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14021 28 : if (flags & NDR_IN) {
14022 28 : NDR_ZERO_STRUCT(r->out);
14023 :
14024 28 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
14025 28 : if (_ptr_server_name) {
14026 28 : NDR_PULL_ALLOC(ndr, r->in.server_name);
14027 : } else {
14028 0 : r->in.server_name = NULL;
14029 : }
14030 28 : if (r->in.server_name) {
14031 28 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14032 28 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
14033 28 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
14034 28 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
14035 28 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
14036 28 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
14037 28 : if (length_server_name_1 > size_server_name_1) {
14038 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
14039 : }
14040 28 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
14041 28 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
14042 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
14043 : }
14044 28 : NDR_PULL_ALLOC(ndr, r->out.trusted_domains_blob);
14045 28 : NDR_ZERO_STRUCTP(r->out.trusted_domains_blob);
14046 : }
14047 28 : if (flags & NDR_OUT) {
14048 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14049 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14050 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14051 0 : NDR_PULL_ALLOC(ndr, r->out.trusted_domains_blob);
14052 : }
14053 0 : _mem_save_trusted_domains_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
14054 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.trusted_domains_blob, LIBNDR_FLAG_REF_ALLOC);
14055 0 : NDR_CHECK(ndr_pull_netr_Blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusted_domains_blob));
14056 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_blob_0, LIBNDR_FLAG_REF_ALLOC);
14057 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
14058 : }
14059 24 : return NDR_ERR_SUCCESS;
14060 : }
14061 :
14062 0 : _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NetrEnumerateTrustedDomains *r)
14063 : {
14064 0 : ndr_print_struct(ndr, name, "netr_NetrEnumerateTrustedDomains");
14065 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14066 0 : ndr->depth++;
14067 0 : if (flags & NDR_SET_VALUES) {
14068 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14069 : }
14070 0 : if (flags & NDR_IN) {
14071 0 : ndr_print_struct(ndr, "in", "netr_NetrEnumerateTrustedDomains");
14072 0 : ndr->depth++;
14073 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
14074 0 : ndr->depth++;
14075 0 : if (r->in.server_name) {
14076 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
14077 : }
14078 0 : ndr->depth--;
14079 0 : ndr->depth--;
14080 : }
14081 0 : if (flags & NDR_OUT) {
14082 0 : ndr_print_struct(ndr, "out", "netr_NetrEnumerateTrustedDomains");
14083 0 : ndr->depth++;
14084 0 : ndr_print_ptr(ndr, "trusted_domains_blob", r->out.trusted_domains_blob);
14085 0 : ndr->depth++;
14086 0 : ndr_print_netr_Blob(ndr, "trusted_domains_blob", r->out.trusted_domains_blob);
14087 0 : ndr->depth--;
14088 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
14089 0 : ndr->depth--;
14090 : }
14091 0 : ndr->depth--;
14092 : }
14093 :
14094 128 : static enum ndr_err_code ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetDCName *r)
14095 : {
14096 128 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14097 128 : if (flags & NDR_IN) {
14098 50 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14099 50 : if (r->in.server_unc) {
14100 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14101 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14102 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14103 50 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14104 : }
14105 50 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
14106 50 : if (r->in.domain_name) {
14107 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
14108 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14109 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
14110 50 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14111 : }
14112 50 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
14113 50 : if (r->in.domain_guid) {
14114 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
14115 : }
14116 50 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_guid));
14117 50 : if (r->in.site_guid) {
14118 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.site_guid));
14119 : }
14120 58 : NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags));
14121 : }
14122 128 : if (flags & NDR_OUT) {
14123 78 : if (r->out.info == NULL) {
14124 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14125 : }
14126 78 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
14127 78 : if (*r->out.info) {
14128 78 : NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
14129 : }
14130 78 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14131 : }
14132 110 : return NDR_ERR_SUCCESS;
14133 : }
14134 :
14135 116 : static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetDCName *r)
14136 : {
14137 16 : uint32_t _ptr_server_unc;
14138 116 : uint32_t size_server_unc_1 = 0;
14139 116 : uint32_t length_server_unc_1 = 0;
14140 16 : uint32_t _ptr_domain_name;
14141 116 : uint32_t size_domain_name_1 = 0;
14142 116 : uint32_t length_domain_name_1 = 0;
14143 16 : uint32_t _ptr_domain_guid;
14144 16 : uint32_t _ptr_site_guid;
14145 16 : uint32_t _ptr_info;
14146 116 : TALLOC_CTX *_mem_save_server_unc_0 = NULL;
14147 116 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
14148 116 : TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
14149 116 : TALLOC_CTX *_mem_save_site_guid_0 = NULL;
14150 116 : TALLOC_CTX *_mem_save_info_0 = NULL;
14151 116 : TALLOC_CTX *_mem_save_info_1 = NULL;
14152 116 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14153 116 : if (flags & NDR_IN) {
14154 66 : NDR_ZERO_STRUCT(r->out);
14155 :
14156 66 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14157 66 : if (_ptr_server_unc) {
14158 66 : NDR_PULL_ALLOC(ndr, r->in.server_unc);
14159 : } else {
14160 0 : r->in.server_unc = NULL;
14161 : }
14162 66 : if (r->in.server_unc) {
14163 66 : _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14164 66 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14165 66 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14166 66 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14167 66 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_unc, &size_server_unc_1));
14168 66 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_unc, &length_server_unc_1));
14169 66 : if (length_server_unc_1 > size_server_unc_1) {
14170 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_unc_1, length_server_unc_1);
14171 : }
14172 66 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14173 66 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14174 66 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14175 : }
14176 66 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
14177 66 : if (_ptr_domain_name) {
14178 66 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
14179 : } else {
14180 0 : r->in.domain_name = NULL;
14181 : }
14182 66 : if (r->in.domain_name) {
14183 66 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14184 66 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
14185 66 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
14186 66 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
14187 66 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
14188 66 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
14189 66 : if (length_domain_name_1 > size_domain_name_1) {
14190 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
14191 : }
14192 66 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
14193 66 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
14194 66 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
14195 : }
14196 66 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
14197 66 : if (_ptr_domain_guid) {
14198 0 : NDR_PULL_ALLOC(ndr, r->in.domain_guid);
14199 : } else {
14200 66 : r->in.domain_guid = NULL;
14201 : }
14202 66 : if (r->in.domain_guid) {
14203 0 : _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
14204 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
14205 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
14206 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
14207 : }
14208 66 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_guid));
14209 66 : if (_ptr_site_guid) {
14210 0 : NDR_PULL_ALLOC(ndr, r->in.site_guid);
14211 : } else {
14212 66 : r->in.site_guid = NULL;
14213 : }
14214 66 : if (r->in.site_guid) {
14215 0 : _mem_save_site_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
14216 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.site_guid, 0);
14217 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.site_guid));
14218 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_guid_0, 0);
14219 : }
14220 74 : NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags));
14221 66 : NDR_PULL_ALLOC(ndr, r->out.info);
14222 66 : NDR_ZERO_STRUCTP(r->out.info);
14223 : }
14224 116 : if (flags & NDR_OUT) {
14225 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14226 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14227 50 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14228 14 : NDR_PULL_ALLOC(ndr, r->out.info);
14229 : }
14230 50 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14231 50 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
14232 50 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
14233 50 : if (_ptr_info) {
14234 50 : NDR_PULL_ALLOC(ndr, *r->out.info);
14235 : } else {
14236 0 : *r->out.info = NULL;
14237 : }
14238 50 : if (*r->out.info) {
14239 50 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
14240 50 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
14241 50 : NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
14242 50 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
14243 : }
14244 50 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
14245 50 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14246 : }
14247 100 : return NDR_ERR_SUCCESS;
14248 : }
14249 :
14250 24 : _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetDCName *r)
14251 : {
14252 24 : ndr_print_struct(ndr, name, "netr_DsRGetDCName");
14253 24 : if (r == NULL) { ndr_print_null(ndr); return; }
14254 24 : ndr->depth++;
14255 24 : if (flags & NDR_SET_VALUES) {
14256 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14257 : }
14258 24 : if (flags & NDR_IN) {
14259 0 : ndr_print_struct(ndr, "in", "netr_DsRGetDCName");
14260 0 : ndr->depth++;
14261 0 : ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14262 0 : ndr->depth++;
14263 0 : if (r->in.server_unc) {
14264 0 : ndr_print_string(ndr, "server_unc", r->in.server_unc);
14265 : }
14266 0 : ndr->depth--;
14267 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
14268 0 : ndr->depth++;
14269 0 : if (r->in.domain_name) {
14270 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
14271 : }
14272 0 : ndr->depth--;
14273 0 : ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
14274 0 : ndr->depth++;
14275 0 : if (r->in.domain_guid) {
14276 0 : ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
14277 : }
14278 0 : ndr->depth--;
14279 0 : ndr_print_ptr(ndr, "site_guid", r->in.site_guid);
14280 0 : ndr->depth++;
14281 0 : if (r->in.site_guid) {
14282 0 : ndr_print_GUID(ndr, "site_guid", r->in.site_guid);
14283 : }
14284 0 : ndr->depth--;
14285 0 : ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags);
14286 0 : ndr->depth--;
14287 : }
14288 24 : if (flags & NDR_OUT) {
14289 24 : ndr_print_struct(ndr, "out", "netr_DsRGetDCName");
14290 24 : ndr->depth++;
14291 24 : ndr_print_ptr(ndr, "info", r->out.info);
14292 24 : ndr->depth++;
14293 24 : ndr_print_ptr(ndr, "info", *r->out.info);
14294 24 : ndr->depth++;
14295 24 : if (*r->out.info) {
14296 24 : ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
14297 : }
14298 24 : ndr->depth--;
14299 24 : ndr->depth--;
14300 24 : ndr_print_WERROR(ndr, "result", r->out.result);
14301 24 : ndr->depth--;
14302 : }
14303 24 : ndr->depth--;
14304 : }
14305 :
14306 4266 : static enum ndr_err_code ndr_push_netr_LogonGetCapabilities(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonGetCapabilities *r)
14307 : {
14308 4266 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14309 4266 : if (flags & NDR_IN) {
14310 3082 : if (r->in.server_name == NULL) {
14311 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14312 : }
14313 3082 : if (r->in.credential == NULL) {
14314 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14315 : }
14316 3082 : if (r->in.return_authenticator == NULL) {
14317 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14318 : }
14319 3082 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14320 3082 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14321 3082 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14322 3082 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14323 3082 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
14324 3082 : if (r->in.computer_name) {
14325 3082 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14326 3082 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14327 3082 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14328 3082 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14329 : }
14330 3082 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
14331 3082 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
14332 3082 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.query_level));
14333 : }
14334 4266 : if (flags & NDR_OUT) {
14335 1184 : if (r->out.return_authenticator == NULL) {
14336 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14337 : }
14338 1184 : if (r->out.capabilities == NULL) {
14339 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14340 : }
14341 1184 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
14342 1184 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.capabilities, r->in.query_level));
14343 1184 : NDR_CHECK(ndr_push_netr_Capabilities(ndr, NDR_SCALARS, r->out.capabilities));
14344 1184 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
14345 : }
14346 3620 : return NDR_ERR_SUCCESS;
14347 : }
14348 :
14349 4032 : static enum ndr_err_code ndr_pull_netr_LogonGetCapabilities(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonGetCapabilities *r)
14350 : {
14351 4032 : uint32_t size_server_name_1 = 0;
14352 4032 : uint32_t length_server_name_1 = 0;
14353 620 : uint32_t _ptr_computer_name;
14354 4032 : uint32_t size_computer_name_1 = 0;
14355 4032 : uint32_t length_computer_name_1 = 0;
14356 4032 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
14357 4032 : TALLOC_CTX *_mem_save_credential_0 = NULL;
14358 4032 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
14359 4032 : TALLOC_CTX *_mem_save_capabilities_0 = NULL;
14360 4032 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14361 4032 : if (flags & NDR_IN) {
14362 3038 : NDR_ZERO_STRUCT(r->out);
14363 :
14364 3038 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
14365 3038 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
14366 3038 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
14367 3038 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
14368 3038 : if (length_server_name_1 > size_server_name_1) {
14369 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
14370 : }
14371 3038 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
14372 3038 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
14373 3038 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
14374 3038 : if (_ptr_computer_name) {
14375 3038 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
14376 : } else {
14377 0 : r->in.computer_name = NULL;
14378 : }
14379 3038 : if (r->in.computer_name) {
14380 3038 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14381 3038 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
14382 3038 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
14383 3038 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
14384 3038 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
14385 3038 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
14386 3038 : if (length_computer_name_1 > size_computer_name_1) {
14387 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
14388 : }
14389 3038 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
14390 3038 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
14391 3038 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
14392 : }
14393 3038 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14394 3038 : NDR_PULL_ALLOC(ndr, r->in.credential);
14395 : }
14396 3038 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
14397 3038 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
14398 3038 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
14399 3038 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
14400 3038 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14401 3038 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
14402 : }
14403 3038 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
14404 3038 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
14405 3038 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
14406 3038 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
14407 3038 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.query_level));
14408 3038 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
14409 3038 : *r->out.return_authenticator = *r->in.return_authenticator;
14410 3038 : NDR_PULL_ALLOC(ndr, r->out.capabilities);
14411 3038 : NDR_ZERO_STRUCTP(r->out.capabilities);
14412 : }
14413 4032 : if (flags & NDR_OUT) {
14414 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14415 : if (r->in.credential == NULL) {
14416 : NDR_PULL_ALLOC(ndr, r->in.credential);
14417 : NDR_ZERO_STRUCTP(r->in.credential);
14418 : }
14419 : if (r->in.return_authenticator == NULL) {
14420 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
14421 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
14422 : }
14423 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14424 994 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14425 259 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
14426 : }
14427 994 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
14428 994 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
14429 994 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
14430 994 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
14431 994 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14432 259 : NDR_PULL_ALLOC(ndr, r->out.capabilities);
14433 : }
14434 994 : _mem_save_capabilities_0 = NDR_PULL_GET_MEM_CTX(ndr);
14435 994 : NDR_PULL_SET_MEM_CTX(ndr, r->out.capabilities, LIBNDR_FLAG_REF_ALLOC);
14436 994 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.capabilities, r->in.query_level));
14437 994 : NDR_CHECK(ndr_pull_netr_Capabilities(ndr, NDR_SCALARS, r->out.capabilities));
14438 994 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_capabilities_0, LIBNDR_FLAG_REF_ALLOC);
14439 994 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
14440 : }
14441 3412 : return NDR_ERR_SUCCESS;
14442 : }
14443 :
14444 312 : _PUBLIC_ void ndr_print_netr_LogonGetCapabilities(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonGetCapabilities *r)
14445 : {
14446 312 : ndr_print_struct(ndr, name, "netr_LogonGetCapabilities");
14447 312 : if (r == NULL) { ndr_print_null(ndr); return; }
14448 312 : ndr->depth++;
14449 312 : if (flags & NDR_SET_VALUES) {
14450 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14451 : }
14452 312 : if (flags & NDR_IN) {
14453 0 : ndr_print_struct(ndr, "in", "netr_LogonGetCapabilities");
14454 0 : ndr->depth++;
14455 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
14456 0 : ndr->depth++;
14457 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
14458 0 : ndr->depth--;
14459 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
14460 0 : ndr->depth++;
14461 0 : if (r->in.computer_name) {
14462 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
14463 : }
14464 0 : ndr->depth--;
14465 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
14466 0 : ndr->depth++;
14467 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
14468 0 : ndr->depth--;
14469 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
14470 0 : ndr->depth++;
14471 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
14472 0 : ndr->depth--;
14473 0 : ndr_print_uint32(ndr, "query_level", r->in.query_level);
14474 0 : ndr->depth--;
14475 : }
14476 312 : if (flags & NDR_OUT) {
14477 312 : ndr_print_struct(ndr, "out", "netr_LogonGetCapabilities");
14478 312 : ndr->depth++;
14479 312 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
14480 312 : ndr->depth++;
14481 312 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
14482 312 : ndr->depth--;
14483 312 : ndr_print_ptr(ndr, "capabilities", r->out.capabilities);
14484 312 : ndr->depth++;
14485 312 : ndr_print_set_switch_value(ndr, r->out.capabilities, r->in.query_level);
14486 312 : ndr_print_netr_Capabilities(ndr, "capabilities", r->out.capabilities);
14487 312 : ndr->depth--;
14488 312 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
14489 312 : ndr->depth--;
14490 : }
14491 312 : ndr->depth--;
14492 : }
14493 :
14494 0 : static enum ndr_err_code ndr_push_netr_NETRLOGONSETSERVICEBITS(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
14495 : {
14496 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14497 0 : if (flags & NDR_IN) {
14498 0 : }
14499 0 : if (flags & NDR_OUT) {
14500 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14501 : }
14502 0 : return NDR_ERR_SUCCESS;
14503 : }
14504 :
14505 0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONSETSERVICEBITS(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NETRLOGONSETSERVICEBITS *r)
14506 : {
14507 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14508 0 : if (flags & NDR_IN) {
14509 0 : }
14510 0 : if (flags & NDR_OUT) {
14511 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14512 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14513 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14514 : }
14515 0 : return NDR_ERR_SUCCESS;
14516 : }
14517 :
14518 0 : _PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
14519 : {
14520 0 : ndr_print_struct(ndr, name, "netr_NETRLOGONSETSERVICEBITS");
14521 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14522 0 : ndr->depth++;
14523 0 : if (flags & NDR_SET_VALUES) {
14524 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14525 : }
14526 0 : if (flags & NDR_IN) {
14527 0 : ndr_print_struct(ndr, "in", "netr_NETRLOGONSETSERVICEBITS");
14528 0 : ndr->depth++;
14529 0 : ndr->depth--;
14530 : }
14531 0 : if (flags & NDR_OUT) {
14532 0 : ndr_print_struct(ndr, "out", "netr_NETRLOGONSETSERVICEBITS");
14533 0 : ndr->depth++;
14534 0 : ndr_print_WERROR(ndr, "result", r->out.result);
14535 0 : ndr->depth--;
14536 : }
14537 0 : ndr->depth--;
14538 : }
14539 :
14540 0 : static enum ndr_err_code ndr_push_netr_LogonGetTrustRid(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonGetTrustRid *r)
14541 : {
14542 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14543 0 : if (flags & NDR_IN) {
14544 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
14545 0 : if (r->in.server_name) {
14546 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14547 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14548 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14549 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14550 : }
14551 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
14552 0 : if (r->in.domain_name) {
14553 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
14554 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14555 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
14556 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14557 : }
14558 : }
14559 0 : if (flags & NDR_OUT) {
14560 0 : if (r->out.rid == NULL) {
14561 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14562 : }
14563 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
14564 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14565 : }
14566 0 : return NDR_ERR_SUCCESS;
14567 : }
14568 :
14569 0 : static enum ndr_err_code ndr_pull_netr_LogonGetTrustRid(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonGetTrustRid *r)
14570 : {
14571 0 : uint32_t _ptr_server_name;
14572 0 : uint32_t size_server_name_1 = 0;
14573 0 : uint32_t length_server_name_1 = 0;
14574 0 : uint32_t _ptr_domain_name;
14575 0 : uint32_t size_domain_name_1 = 0;
14576 0 : uint32_t length_domain_name_1 = 0;
14577 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
14578 0 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
14579 0 : TALLOC_CTX *_mem_save_rid_0 = NULL;
14580 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14581 0 : if (flags & NDR_IN) {
14582 0 : NDR_ZERO_STRUCT(r->out);
14583 :
14584 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
14585 0 : if (_ptr_server_name) {
14586 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
14587 : } else {
14588 0 : r->in.server_name = NULL;
14589 : }
14590 0 : if (r->in.server_name) {
14591 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14592 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
14593 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
14594 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
14595 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
14596 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
14597 0 : if (length_server_name_1 > size_server_name_1) {
14598 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
14599 : }
14600 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
14601 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
14602 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
14603 : }
14604 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
14605 0 : if (_ptr_domain_name) {
14606 0 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
14607 : } else {
14608 0 : r->in.domain_name = NULL;
14609 : }
14610 0 : if (r->in.domain_name) {
14611 0 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14612 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
14613 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
14614 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
14615 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
14616 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
14617 0 : if (length_domain_name_1 > size_domain_name_1) {
14618 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
14619 : }
14620 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
14621 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
14622 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
14623 : }
14624 0 : NDR_PULL_ALLOC(ndr, r->out.rid);
14625 0 : NDR_ZERO_STRUCTP(r->out.rid);
14626 : }
14627 0 : if (flags & NDR_OUT) {
14628 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14629 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14630 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14631 0 : NDR_PULL_ALLOC(ndr, r->out.rid);
14632 : }
14633 0 : _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
14634 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
14635 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
14636 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
14637 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14638 : }
14639 0 : return NDR_ERR_SUCCESS;
14640 : }
14641 :
14642 0 : _PUBLIC_ void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonGetTrustRid *r)
14643 : {
14644 0 : ndr_print_struct(ndr, name, "netr_LogonGetTrustRid");
14645 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14646 0 : ndr->depth++;
14647 0 : if (flags & NDR_SET_VALUES) {
14648 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14649 : }
14650 0 : if (flags & NDR_IN) {
14651 0 : ndr_print_struct(ndr, "in", "netr_LogonGetTrustRid");
14652 0 : ndr->depth++;
14653 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
14654 0 : ndr->depth++;
14655 0 : if (r->in.server_name) {
14656 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
14657 : }
14658 0 : ndr->depth--;
14659 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
14660 0 : ndr->depth++;
14661 0 : if (r->in.domain_name) {
14662 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
14663 : }
14664 0 : ndr->depth--;
14665 0 : ndr->depth--;
14666 : }
14667 0 : if (flags & NDR_OUT) {
14668 0 : ndr_print_struct(ndr, "out", "netr_LogonGetTrustRid");
14669 0 : ndr->depth++;
14670 0 : ndr_print_ptr(ndr, "rid", r->out.rid);
14671 0 : ndr->depth++;
14672 0 : ndr_print_uint32(ndr, "rid", *r->out.rid);
14673 0 : ndr->depth--;
14674 0 : ndr_print_WERROR(ndr, "result", r->out.result);
14675 0 : ndr->depth--;
14676 : }
14677 0 : ndr->depth--;
14678 : }
14679 :
14680 0 : static enum ndr_err_code ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
14681 : {
14682 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14683 0 : if (flags & NDR_IN) {
14684 0 : }
14685 0 : if (flags & NDR_OUT) {
14686 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14687 : }
14688 0 : return NDR_ERR_SUCCESS;
14689 : }
14690 :
14691 0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
14692 : {
14693 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14694 0 : if (flags & NDR_IN) {
14695 0 : }
14696 0 : if (flags & NDR_OUT) {
14697 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14698 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14699 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14700 : }
14701 0 : return NDR_ERR_SUCCESS;
14702 : }
14703 :
14704 0 : _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
14705 : {
14706 0 : ndr_print_struct(ndr, name, "netr_NETRLOGONCOMPUTESERVERDIGEST");
14707 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14708 0 : ndr->depth++;
14709 0 : if (flags & NDR_SET_VALUES) {
14710 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14711 : }
14712 0 : if (flags & NDR_IN) {
14713 0 : ndr_print_struct(ndr, "in", "netr_NETRLOGONCOMPUTESERVERDIGEST");
14714 0 : ndr->depth++;
14715 0 : ndr->depth--;
14716 : }
14717 0 : if (flags & NDR_OUT) {
14718 0 : ndr_print_struct(ndr, "out", "netr_NETRLOGONCOMPUTESERVERDIGEST");
14719 0 : ndr->depth++;
14720 0 : ndr_print_WERROR(ndr, "result", r->out.result);
14721 0 : ndr->depth--;
14722 : }
14723 0 : ndr->depth--;
14724 : }
14725 :
14726 0 : static enum ndr_err_code ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
14727 : {
14728 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14729 0 : if (flags & NDR_IN) {
14730 0 : }
14731 0 : if (flags & NDR_OUT) {
14732 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14733 : }
14734 0 : return NDR_ERR_SUCCESS;
14735 : }
14736 :
14737 0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
14738 : {
14739 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14740 0 : if (flags & NDR_IN) {
14741 0 : }
14742 0 : if (flags & NDR_OUT) {
14743 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14744 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14745 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14746 : }
14747 0 : return NDR_ERR_SUCCESS;
14748 : }
14749 :
14750 0 : _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
14751 : {
14752 0 : ndr_print_struct(ndr, name, "netr_NETRLOGONCOMPUTECLIENTDIGEST");
14753 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14754 0 : ndr->depth++;
14755 0 : if (flags & NDR_SET_VALUES) {
14756 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14757 : }
14758 0 : if (flags & NDR_IN) {
14759 0 : ndr_print_struct(ndr, "in", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
14760 0 : ndr->depth++;
14761 0 : ndr->depth--;
14762 : }
14763 0 : if (flags & NDR_OUT) {
14764 0 : ndr_print_struct(ndr, "out", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
14765 0 : ndr->depth++;
14766 0 : ndr_print_WERROR(ndr, "result", r->out.result);
14767 0 : ndr->depth--;
14768 : }
14769 0 : ndr->depth--;
14770 : }
14771 :
14772 1977 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ServerAuthenticate3(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerAuthenticate3 *r)
14773 : {
14774 1977 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14775 1977 : if (flags & NDR_IN) {
14776 859 : if (r->in.account_name == NULL) {
14777 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14778 : }
14779 859 : if (r->in.computer_name == NULL) {
14780 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14781 : }
14782 859 : if (r->in.credentials == NULL) {
14783 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14784 : }
14785 859 : if (r->in.negotiate_flags == NULL) {
14786 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14787 : }
14788 859 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
14789 859 : if (r->in.server_name) {
14790 434 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14791 434 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14792 434 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14793 434 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14794 : }
14795 859 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
14796 859 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14797 859 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
14798 859 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14799 859 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
14800 859 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14801 859 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14802 859 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14803 859 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14804 859 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
14805 859 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->in.negotiate_flags));
14806 : }
14807 1977 : if (flags & NDR_OUT) {
14808 1118 : if (r->out.return_credentials == NULL) {
14809 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14810 : }
14811 1118 : if (r->out.negotiate_flags == NULL) {
14812 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14813 : }
14814 1118 : if (r->out.rid == NULL) {
14815 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14816 : }
14817 1118 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
14818 1118 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->out.negotiate_flags));
14819 1118 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
14820 1118 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
14821 : }
14822 1815 : return NDR_ERR_SUCCESS;
14823 : }
14824 :
14825 1797 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ServerAuthenticate3(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerAuthenticate3 *r)
14826 : {
14827 148 : uint32_t _ptr_server_name;
14828 1797 : uint32_t size_server_name_1 = 0;
14829 1797 : uint32_t length_server_name_1 = 0;
14830 1797 : uint32_t size_account_name_1 = 0;
14831 1797 : uint32_t length_account_name_1 = 0;
14832 1797 : uint32_t size_computer_name_1 = 0;
14833 1797 : uint32_t length_computer_name_1 = 0;
14834 1797 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
14835 1797 : TALLOC_CTX *_mem_save_credentials_0 = NULL;
14836 1797 : TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
14837 1797 : TALLOC_CTX *_mem_save_negotiate_flags_0 = NULL;
14838 1797 : TALLOC_CTX *_mem_save_rid_0 = NULL;
14839 1797 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14840 1797 : if (flags & NDR_IN) {
14841 936 : NDR_ZERO_STRUCT(r->out);
14842 :
14843 936 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
14844 936 : if (_ptr_server_name) {
14845 511 : NDR_PULL_ALLOC(ndr, r->in.server_name);
14846 : } else {
14847 425 : r->in.server_name = NULL;
14848 : }
14849 936 : if (r->in.server_name) {
14850 511 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14851 511 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
14852 511 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
14853 511 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
14854 511 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
14855 511 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
14856 511 : if (length_server_name_1 > size_server_name_1) {
14857 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
14858 : }
14859 511 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
14860 511 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
14861 511 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
14862 : }
14863 936 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
14864 936 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
14865 936 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
14866 936 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
14867 936 : if (length_account_name_1 > size_account_name_1) {
14868 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
14869 : }
14870 936 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
14871 936 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
14872 936 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
14873 936 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
14874 936 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
14875 936 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
14876 936 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
14877 936 : if (length_computer_name_1 > size_computer_name_1) {
14878 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
14879 : }
14880 936 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
14881 936 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
14882 936 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14883 936 : NDR_PULL_ALLOC(ndr, r->in.credentials);
14884 : }
14885 936 : _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
14886 936 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
14887 936 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
14888 936 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
14889 936 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14890 936 : NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
14891 : }
14892 936 : _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
14893 936 : NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
14894 936 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->in.negotiate_flags));
14895 936 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
14896 936 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
14897 936 : NDR_ZERO_STRUCTP(r->out.return_credentials);
14898 936 : NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
14899 936 : *r->out.negotiate_flags = *r->in.negotiate_flags;
14900 936 : NDR_PULL_ALLOC(ndr, r->out.rid);
14901 936 : NDR_ZERO_STRUCTP(r->out.rid);
14902 : }
14903 1797 : if (flags & NDR_OUT) {
14904 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14905 : if (r->in.credentials == NULL) {
14906 : NDR_PULL_ALLOC(ndr, r->in.credentials);
14907 : NDR_ZERO_STRUCTP(r->in.credentials);
14908 : }
14909 : if (r->in.negotiate_flags == NULL) {
14910 : NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
14911 : NDR_ZERO_STRUCTP(r->in.negotiate_flags);
14912 : }
14913 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14914 861 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14915 308 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
14916 : }
14917 861 : _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
14918 861 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
14919 861 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
14920 861 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
14921 861 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14922 308 : NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
14923 : }
14924 861 : _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
14925 861 : NDR_PULL_SET_MEM_CTX(ndr, r->out.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
14926 861 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->out.negotiate_flags));
14927 861 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
14928 861 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14929 308 : NDR_PULL_ALLOC(ndr, r->out.rid);
14930 : }
14931 861 : _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
14932 861 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
14933 861 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
14934 861 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
14935 861 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
14936 : }
14937 1649 : return NDR_ERR_SUCCESS;
14938 : }
14939 :
14940 372 : _PUBLIC_ void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerAuthenticate3 *r)
14941 : {
14942 372 : ndr_print_struct(ndr, name, "netr_ServerAuthenticate3");
14943 372 : if (r == NULL) { ndr_print_null(ndr); return; }
14944 372 : ndr->depth++;
14945 372 : if (flags & NDR_SET_VALUES) {
14946 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14947 : }
14948 372 : if (flags & NDR_IN) {
14949 2 : ndr_print_struct(ndr, "in", "netr_ServerAuthenticate3");
14950 2 : ndr->depth++;
14951 2 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
14952 2 : ndr->depth++;
14953 2 : if (r->in.server_name) {
14954 2 : ndr_print_string(ndr, "server_name", r->in.server_name);
14955 : }
14956 2 : ndr->depth--;
14957 2 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
14958 2 : ndr->depth++;
14959 2 : ndr_print_string(ndr, "account_name", r->in.account_name);
14960 2 : ndr->depth--;
14961 2 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
14962 2 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
14963 2 : ndr->depth++;
14964 2 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
14965 2 : ndr->depth--;
14966 2 : ndr_print_ptr(ndr, "credentials", r->in.credentials);
14967 2 : ndr->depth++;
14968 2 : ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
14969 2 : ndr->depth--;
14970 2 : ndr_print_ptr(ndr, "negotiate_flags", r->in.negotiate_flags);
14971 2 : ndr->depth++;
14972 2 : ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->in.negotiate_flags);
14973 2 : ndr->depth--;
14974 2 : ndr->depth--;
14975 : }
14976 372 : if (flags & NDR_OUT) {
14977 370 : ndr_print_struct(ndr, "out", "netr_ServerAuthenticate3");
14978 370 : ndr->depth++;
14979 370 : ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
14980 370 : ndr->depth++;
14981 370 : ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
14982 370 : ndr->depth--;
14983 370 : ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
14984 370 : ndr->depth++;
14985 370 : ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->out.negotiate_flags);
14986 370 : ndr->depth--;
14987 370 : ndr_print_ptr(ndr, "rid", r->out.rid);
14988 370 : ndr->depth++;
14989 370 : ndr_print_uint32(ndr, "rid", *r->out.rid);
14990 370 : ndr->depth--;
14991 370 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
14992 370 : ndr->depth--;
14993 : }
14994 372 : ndr->depth--;
14995 : }
14996 :
14997 204 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetDCNameEx *r)
14998 : {
14999 204 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15000 204 : if (flags & NDR_IN) {
15001 96 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15002 96 : if (r->in.server_unc) {
15003 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15004 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15005 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15006 96 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15007 : }
15008 96 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
15009 96 : if (r->in.domain_name) {
15010 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
15011 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15012 96 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
15013 96 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15014 : }
15015 96 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
15016 96 : if (r->in.domain_guid) {
15017 4 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
15018 : }
15019 96 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
15020 96 : if (r->in.site_name) {
15021 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
15022 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15023 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
15024 16 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15025 : }
15026 104 : NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags));
15027 : }
15028 204 : if (flags & NDR_OUT) {
15029 108 : if (r->out.info == NULL) {
15030 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15031 : }
15032 108 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
15033 108 : if (*r->out.info) {
15034 96 : NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
15035 : }
15036 108 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15037 : }
15038 186 : return NDR_ERR_SUCCESS;
15039 : }
15040 :
15041 192 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetDCNameEx *r)
15042 : {
15043 16 : uint32_t _ptr_server_unc;
15044 192 : uint32_t size_server_unc_1 = 0;
15045 192 : uint32_t length_server_unc_1 = 0;
15046 16 : uint32_t _ptr_domain_name;
15047 192 : uint32_t size_domain_name_1 = 0;
15048 192 : uint32_t length_domain_name_1 = 0;
15049 16 : uint32_t _ptr_domain_guid;
15050 16 : uint32_t _ptr_site_name;
15051 192 : uint32_t size_site_name_1 = 0;
15052 192 : uint32_t length_site_name_1 = 0;
15053 16 : uint32_t _ptr_info;
15054 192 : TALLOC_CTX *_mem_save_server_unc_0 = NULL;
15055 192 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
15056 192 : TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
15057 192 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
15058 192 : TALLOC_CTX *_mem_save_info_0 = NULL;
15059 192 : TALLOC_CTX *_mem_save_info_1 = NULL;
15060 192 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15061 192 : if (flags & NDR_IN) {
15062 96 : NDR_ZERO_STRUCT(r->out);
15063 :
15064 96 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15065 96 : if (_ptr_server_unc) {
15066 96 : NDR_PULL_ALLOC(ndr, r->in.server_unc);
15067 : } else {
15068 0 : r->in.server_unc = NULL;
15069 : }
15070 96 : if (r->in.server_unc) {
15071 96 : _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15072 96 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15073 96 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15074 96 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15075 96 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_unc, &size_server_unc_1));
15076 96 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_unc, &length_server_unc_1));
15077 96 : if (length_server_unc_1 > size_server_unc_1) {
15078 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_unc_1, length_server_unc_1);
15079 : }
15080 96 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15081 96 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15082 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15083 : }
15084 96 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
15085 96 : if (_ptr_domain_name) {
15086 96 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
15087 : } else {
15088 0 : r->in.domain_name = NULL;
15089 : }
15090 96 : if (r->in.domain_name) {
15091 96 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15092 96 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
15093 96 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
15094 96 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
15095 96 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
15096 96 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
15097 96 : if (length_domain_name_1 > size_domain_name_1) {
15098 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
15099 : }
15100 96 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
15101 96 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
15102 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
15103 : }
15104 96 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
15105 96 : if (_ptr_domain_guid) {
15106 4 : NDR_PULL_ALLOC(ndr, r->in.domain_guid);
15107 : } else {
15108 92 : r->in.domain_guid = NULL;
15109 : }
15110 96 : if (r->in.domain_guid) {
15111 4 : _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
15112 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
15113 4 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
15114 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
15115 : }
15116 96 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
15117 96 : if (_ptr_site_name) {
15118 16 : NDR_PULL_ALLOC(ndr, r->in.site_name);
15119 : } else {
15120 80 : r->in.site_name = NULL;
15121 : }
15122 96 : if (r->in.site_name) {
15123 16 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15124 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
15125 16 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
15126 16 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
15127 16 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
15128 16 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
15129 16 : if (length_site_name_1 > size_site_name_1) {
15130 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
15131 : }
15132 16 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
15133 16 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
15134 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
15135 : }
15136 104 : NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags));
15137 96 : NDR_PULL_ALLOC(ndr, r->out.info);
15138 96 : NDR_ZERO_STRUCTP(r->out.info);
15139 : }
15140 192 : if (flags & NDR_OUT) {
15141 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15142 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15143 96 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15144 60 : NDR_PULL_ALLOC(ndr, r->out.info);
15145 : }
15146 96 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15147 96 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
15148 96 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
15149 96 : if (_ptr_info) {
15150 84 : NDR_PULL_ALLOC(ndr, *r->out.info);
15151 : } else {
15152 12 : *r->out.info = NULL;
15153 : }
15154 96 : if (*r->out.info) {
15155 84 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
15156 84 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
15157 84 : NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
15158 84 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
15159 : }
15160 96 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15161 96 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15162 : }
15163 176 : return NDR_ERR_SUCCESS;
15164 : }
15165 :
15166 24 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetDCNameEx *r)
15167 : {
15168 24 : ndr_print_struct(ndr, name, "netr_DsRGetDCNameEx");
15169 24 : if (r == NULL) { ndr_print_null(ndr); return; }
15170 24 : ndr->depth++;
15171 24 : if (flags & NDR_SET_VALUES) {
15172 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15173 : }
15174 24 : if (flags & NDR_IN) {
15175 0 : ndr_print_struct(ndr, "in", "netr_DsRGetDCNameEx");
15176 0 : ndr->depth++;
15177 0 : ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15178 0 : ndr->depth++;
15179 0 : if (r->in.server_unc) {
15180 0 : ndr_print_string(ndr, "server_unc", r->in.server_unc);
15181 : }
15182 0 : ndr->depth--;
15183 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
15184 0 : ndr->depth++;
15185 0 : if (r->in.domain_name) {
15186 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
15187 : }
15188 0 : ndr->depth--;
15189 0 : ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
15190 0 : ndr->depth++;
15191 0 : if (r->in.domain_guid) {
15192 0 : ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
15193 : }
15194 0 : ndr->depth--;
15195 0 : ndr_print_ptr(ndr, "site_name", r->in.site_name);
15196 0 : ndr->depth++;
15197 0 : if (r->in.site_name) {
15198 0 : ndr_print_string(ndr, "site_name", r->in.site_name);
15199 : }
15200 0 : ndr->depth--;
15201 0 : ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags);
15202 0 : ndr->depth--;
15203 : }
15204 24 : if (flags & NDR_OUT) {
15205 24 : ndr_print_struct(ndr, "out", "netr_DsRGetDCNameEx");
15206 24 : ndr->depth++;
15207 24 : ndr_print_ptr(ndr, "info", r->out.info);
15208 24 : ndr->depth++;
15209 24 : ndr_print_ptr(ndr, "info", *r->out.info);
15210 24 : ndr->depth++;
15211 24 : if (*r->out.info) {
15212 24 : ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
15213 : }
15214 24 : ndr->depth--;
15215 24 : ndr->depth--;
15216 24 : ndr_print_WERROR(ndr, "result", r->out.result);
15217 24 : ndr->depth--;
15218 : }
15219 24 : ndr->depth--;
15220 : }
15221 :
15222 508 : static enum ndr_err_code ndr_push_netr_DsRGetSiteName(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetSiteName *r)
15223 : {
15224 508 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15225 508 : if (flags & NDR_IN) {
15226 242 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
15227 242 : if (r->in.computer_name) {
15228 242 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15229 242 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15230 242 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15231 242 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15232 : }
15233 : }
15234 508 : if (flags & NDR_OUT) {
15235 266 : if (r->out.site == NULL) {
15236 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15237 : }
15238 266 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.site));
15239 266 : if (*r->out.site) {
15240 266 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16)));
15241 266 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15242 266 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16)));
15243 266 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.site, ndr_charset_length(*r->out.site, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15244 : }
15245 266 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15246 : }
15247 472 : return NDR_ERR_SUCCESS;
15248 : }
15249 :
15250 484 : static enum ndr_err_code ndr_pull_netr_DsRGetSiteName(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetSiteName *r)
15251 : {
15252 32 : uint32_t _ptr_computer_name;
15253 484 : uint32_t size_computer_name_1 = 0;
15254 484 : uint32_t length_computer_name_1 = 0;
15255 32 : uint32_t _ptr_site;
15256 484 : uint32_t size_site_2 = 0;
15257 484 : uint32_t length_site_2 = 0;
15258 484 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
15259 484 : TALLOC_CTX *_mem_save_site_0 = NULL;
15260 484 : TALLOC_CTX *_mem_save_site_1 = NULL;
15261 484 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15262 484 : if (flags & NDR_IN) {
15263 242 : NDR_ZERO_STRUCT(r->out);
15264 :
15265 242 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
15266 242 : if (_ptr_computer_name) {
15267 242 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
15268 : } else {
15269 0 : r->in.computer_name = NULL;
15270 : }
15271 242 : if (r->in.computer_name) {
15272 242 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15273 242 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
15274 242 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
15275 242 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
15276 242 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
15277 242 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
15278 242 : if (length_computer_name_1 > size_computer_name_1) {
15279 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
15280 : }
15281 242 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
15282 242 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
15283 242 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
15284 : }
15285 242 : NDR_PULL_ALLOC(ndr, r->out.site);
15286 242 : NDR_ZERO_STRUCTP(r->out.site);
15287 : }
15288 484 : if (flags & NDR_OUT) {
15289 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15290 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15291 242 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15292 170 : NDR_PULL_ALLOC(ndr, r->out.site);
15293 : }
15294 242 : _mem_save_site_0 = NDR_PULL_GET_MEM_CTX(ndr);
15295 242 : NDR_PULL_SET_MEM_CTX(ndr, r->out.site, LIBNDR_FLAG_REF_ALLOC);
15296 242 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site));
15297 242 : if (_ptr_site) {
15298 242 : NDR_PULL_ALLOC(ndr, *r->out.site);
15299 : } else {
15300 0 : *r->out.site = NULL;
15301 : }
15302 242 : if (*r->out.site) {
15303 242 : _mem_save_site_1 = NDR_PULL_GET_MEM_CTX(ndr);
15304 242 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.site, 0);
15305 242 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.site));
15306 242 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.site));
15307 242 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.site, &size_site_2));
15308 242 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.site, &length_site_2));
15309 242 : if (length_site_2 > size_site_2) {
15310 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_2, length_site_2);
15311 : }
15312 242 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_2, sizeof(uint16_t)));
15313 242 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.site, length_site_2, sizeof(uint16_t), CH_UTF16));
15314 242 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_1, 0);
15315 : }
15316 242 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_0, LIBNDR_FLAG_REF_ALLOC);
15317 242 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15318 : }
15319 452 : return NDR_ERR_SUCCESS;
15320 : }
15321 :
15322 48 : _PUBLIC_ void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetSiteName *r)
15323 : {
15324 48 : ndr_print_struct(ndr, name, "netr_DsRGetSiteName");
15325 48 : if (r == NULL) { ndr_print_null(ndr); return; }
15326 48 : ndr->depth++;
15327 48 : if (flags & NDR_SET_VALUES) {
15328 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15329 : }
15330 48 : if (flags & NDR_IN) {
15331 0 : ndr_print_struct(ndr, "in", "netr_DsRGetSiteName");
15332 0 : ndr->depth++;
15333 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
15334 0 : ndr->depth++;
15335 0 : if (r->in.computer_name) {
15336 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
15337 : }
15338 0 : ndr->depth--;
15339 0 : ndr->depth--;
15340 : }
15341 48 : if (flags & NDR_OUT) {
15342 48 : ndr_print_struct(ndr, "out", "netr_DsRGetSiteName");
15343 48 : ndr->depth++;
15344 48 : ndr_print_ptr(ndr, "site", r->out.site);
15345 48 : ndr->depth++;
15346 48 : ndr_print_ptr(ndr, "site", *r->out.site);
15347 48 : ndr->depth++;
15348 48 : if (*r->out.site) {
15349 48 : ndr_print_string(ndr, "site", *r->out.site);
15350 : }
15351 48 : ndr->depth--;
15352 48 : ndr->depth--;
15353 48 : ndr_print_WERROR(ndr, "result", r->out.result);
15354 48 : ndr->depth--;
15355 : }
15356 48 : ndr->depth--;
15357 : }
15358 :
15359 444 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonGetDomainInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonGetDomainInfo *r)
15360 : {
15361 444 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15362 444 : if (flags & NDR_IN) {
15363 199 : if (r->in.server_name == NULL) {
15364 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15365 : }
15366 199 : if (r->in.credential == NULL) {
15367 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15368 : }
15369 199 : if (r->in.return_authenticator == NULL) {
15370 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15371 : }
15372 199 : if (r->in.query == NULL) {
15373 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15374 : }
15375 199 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15376 199 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15377 199 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15378 199 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15379 199 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
15380 199 : if (r->in.computer_name) {
15381 199 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15382 199 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15383 199 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15384 199 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15385 : }
15386 199 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15387 199 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
15388 199 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15389 199 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.query, r->in.level));
15390 199 : NDR_CHECK(ndr_push_netr_WorkstationInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.query));
15391 : }
15392 444 : if (flags & NDR_OUT) {
15393 245 : if (r->out.return_authenticator == NULL) {
15394 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15395 : }
15396 245 : if (r->out.info == NULL) {
15397 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15398 : }
15399 245 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15400 245 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
15401 245 : NDR_CHECK(ndr_push_netr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15402 245 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
15403 : }
15404 381 : return NDR_ERR_SUCCESS;
15405 : }
15406 :
15407 416 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonGetDomainInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonGetDomainInfo *r)
15408 : {
15409 416 : uint32_t size_server_name_1 = 0;
15410 416 : uint32_t length_server_name_1 = 0;
15411 70 : uint32_t _ptr_computer_name;
15412 416 : uint32_t size_computer_name_1 = 0;
15413 416 : uint32_t length_computer_name_1 = 0;
15414 416 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
15415 416 : TALLOC_CTX *_mem_save_credential_0 = NULL;
15416 416 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
15417 416 : TALLOC_CTX *_mem_save_query_0 = NULL;
15418 416 : TALLOC_CTX *_mem_save_info_0 = NULL;
15419 416 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15420 416 : if (flags & NDR_IN) {
15421 213 : NDR_ZERO_STRUCT(r->out);
15422 :
15423 213 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
15424 213 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
15425 213 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
15426 213 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
15427 213 : if (length_server_name_1 > size_server_name_1) {
15428 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
15429 : }
15430 213 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
15431 213 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
15432 213 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
15433 213 : if (_ptr_computer_name) {
15434 213 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
15435 : } else {
15436 0 : r->in.computer_name = NULL;
15437 : }
15438 213 : if (r->in.computer_name) {
15439 213 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15440 213 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
15441 213 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
15442 213 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
15443 213 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
15444 213 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
15445 213 : if (length_computer_name_1 > size_computer_name_1) {
15446 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
15447 : }
15448 213 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
15449 213 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
15450 213 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
15451 : }
15452 213 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15453 213 : NDR_PULL_ALLOC(ndr, r->in.credential);
15454 : }
15455 213 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
15456 213 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
15457 213 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15458 213 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
15459 213 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15460 213 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
15461 : }
15462 213 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
15463 213 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
15464 213 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
15465 213 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
15466 213 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15467 213 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15468 213 : NDR_PULL_ALLOC(ndr, r->in.query);
15469 : }
15470 213 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
15471 213 : NDR_PULL_SET_MEM_CTX(ndr, r->in.query, LIBNDR_FLAG_REF_ALLOC);
15472 213 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.query, r->in.level));
15473 213 : NDR_CHECK(ndr_pull_netr_WorkstationInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.query));
15474 213 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
15475 213 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15476 213 : *r->out.return_authenticator = *r->in.return_authenticator;
15477 213 : NDR_PULL_ALLOC(ndr, r->out.info);
15478 213 : NDR_ZERO_STRUCTP(r->out.info);
15479 : }
15480 416 : if (flags & NDR_OUT) {
15481 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15482 : if (r->in.credential == NULL) {
15483 : NDR_PULL_ALLOC(ndr, r->in.credential);
15484 : NDR_ZERO_STRUCTP(r->in.credential);
15485 : }
15486 : if (r->in.return_authenticator == NULL) {
15487 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
15488 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
15489 : }
15490 : if (r->in.query == NULL) {
15491 : NDR_PULL_ALLOC(ndr, r->in.query);
15492 : NDR_ZERO_STRUCTP(r->in.query);
15493 : }
15494 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15495 203 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15496 77 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15497 : }
15498 203 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
15499 203 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
15500 203 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15501 203 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
15502 203 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15503 77 : NDR_PULL_ALLOC(ndr, r->out.info);
15504 : }
15505 203 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15506 203 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
15507 203 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
15508 203 : NDR_CHECK(ndr_pull_netr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15509 203 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15510 203 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
15511 : }
15512 346 : return NDR_ERR_SUCCESS;
15513 : }
15514 :
15515 98 : _PUBLIC_ void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonGetDomainInfo *r)
15516 : {
15517 98 : ndr_print_struct(ndr, name, "netr_LogonGetDomainInfo");
15518 98 : if (r == NULL) { ndr_print_null(ndr); return; }
15519 98 : ndr->depth++;
15520 98 : if (flags & NDR_SET_VALUES) {
15521 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15522 : }
15523 98 : if (flags & NDR_IN) {
15524 10 : ndr_print_struct(ndr, "in", "netr_LogonGetDomainInfo");
15525 10 : ndr->depth++;
15526 10 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
15527 10 : ndr->depth++;
15528 10 : ndr_print_string(ndr, "server_name", r->in.server_name);
15529 10 : ndr->depth--;
15530 10 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
15531 10 : ndr->depth++;
15532 10 : if (r->in.computer_name) {
15533 10 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
15534 : }
15535 10 : ndr->depth--;
15536 10 : ndr_print_ptr(ndr, "credential", r->in.credential);
15537 10 : ndr->depth++;
15538 10 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
15539 10 : ndr->depth--;
15540 10 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
15541 10 : ndr->depth++;
15542 10 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
15543 10 : ndr->depth--;
15544 10 : ndr_print_uint32(ndr, "level", r->in.level);
15545 10 : ndr_print_ptr(ndr, "query", r->in.query);
15546 10 : ndr->depth++;
15547 10 : ndr_print_set_switch_value(ndr, r->in.query, r->in.level);
15548 10 : ndr_print_netr_WorkstationInfo(ndr, "query", r->in.query);
15549 10 : ndr->depth--;
15550 10 : ndr->depth--;
15551 : }
15552 98 : if (flags & NDR_OUT) {
15553 88 : ndr_print_struct(ndr, "out", "netr_LogonGetDomainInfo");
15554 88 : ndr->depth++;
15555 88 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
15556 88 : ndr->depth++;
15557 88 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
15558 88 : ndr->depth--;
15559 88 : ndr_print_ptr(ndr, "info", r->out.info);
15560 88 : ndr->depth++;
15561 88 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
15562 88 : ndr_print_netr_DomainInfo(ndr, "info", r->out.info);
15563 88 : ndr->depth--;
15564 88 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
15565 88 : ndr->depth--;
15566 : }
15567 98 : ndr->depth--;
15568 : }
15569 :
15570 1013 : static enum ndr_err_code ndr_push_netr_ServerPasswordSet2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerPasswordSet2 *r)
15571 : {
15572 1013 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15573 1013 : if (flags & NDR_IN) {
15574 453 : if (r->in.account_name == NULL) {
15575 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15576 : }
15577 453 : if (r->in.computer_name == NULL) {
15578 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15579 : }
15580 453 : if (r->in.credential == NULL) {
15581 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15582 : }
15583 453 : if (r->in.new_password == NULL) {
15584 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15585 : }
15586 453 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
15587 453 : if (r->in.server_name) {
15588 453 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15589 453 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15590 453 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15591 453 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15592 : }
15593 453 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
15594 453 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15595 453 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
15596 453 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15597 453 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
15598 453 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15599 453 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15600 453 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15601 453 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15602 453 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15603 453 : NDR_CHECK(ndr_push_netr_CryptPassword(ndr, NDR_SCALARS, r->in.new_password));
15604 : }
15605 1013 : if (flags & NDR_OUT) {
15606 560 : if (r->out.return_authenticator == NULL) {
15607 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15608 : }
15609 560 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15610 560 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
15611 : }
15612 909 : return NDR_ERR_SUCCESS;
15613 : }
15614 :
15615 912 : static enum ndr_err_code ndr_pull_netr_ServerPasswordSet2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerPasswordSet2 *r)
15616 : {
15617 94 : uint32_t _ptr_server_name;
15618 912 : uint32_t size_server_name_1 = 0;
15619 912 : uint32_t length_server_name_1 = 0;
15620 912 : uint32_t size_account_name_1 = 0;
15621 912 : uint32_t length_account_name_1 = 0;
15622 912 : uint32_t size_computer_name_1 = 0;
15623 912 : uint32_t length_computer_name_1 = 0;
15624 912 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
15625 912 : TALLOC_CTX *_mem_save_credential_0 = NULL;
15626 912 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
15627 912 : TALLOC_CTX *_mem_save_new_password_0 = NULL;
15628 912 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15629 912 : if (flags & NDR_IN) {
15630 459 : NDR_ZERO_STRUCT(r->out);
15631 :
15632 459 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
15633 459 : if (_ptr_server_name) {
15634 459 : NDR_PULL_ALLOC(ndr, r->in.server_name);
15635 : } else {
15636 0 : r->in.server_name = NULL;
15637 : }
15638 459 : if (r->in.server_name) {
15639 459 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15640 459 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
15641 459 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
15642 459 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
15643 459 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
15644 459 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
15645 459 : if (length_server_name_1 > size_server_name_1) {
15646 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
15647 : }
15648 459 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
15649 459 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
15650 459 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
15651 : }
15652 459 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
15653 459 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
15654 459 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
15655 459 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
15656 459 : if (length_account_name_1 > size_account_name_1) {
15657 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
15658 : }
15659 459 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
15660 459 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
15661 459 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
15662 459 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
15663 459 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
15664 459 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
15665 459 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
15666 459 : if (length_computer_name_1 > size_computer_name_1) {
15667 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
15668 : }
15669 459 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
15670 459 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
15671 459 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15672 459 : NDR_PULL_ALLOC(ndr, r->in.credential);
15673 : }
15674 459 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
15675 459 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
15676 459 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15677 459 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
15678 459 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15679 459 : NDR_PULL_ALLOC(ndr, r->in.new_password);
15680 : }
15681 459 : _mem_save_new_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
15682 459 : NDR_PULL_SET_MEM_CTX(ndr, r->in.new_password, LIBNDR_FLAG_REF_ALLOC);
15683 459 : NDR_CHECK(ndr_pull_netr_CryptPassword(ndr, NDR_SCALARS, r->in.new_password));
15684 459 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_password_0, LIBNDR_FLAG_REF_ALLOC);
15685 459 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15686 459 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
15687 : }
15688 912 : if (flags & NDR_OUT) {
15689 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15690 : if (r->in.credential == NULL) {
15691 : NDR_PULL_ALLOC(ndr, r->in.credential);
15692 : NDR_ZERO_STRUCTP(r->in.credential);
15693 : }
15694 : if (r->in.new_password == NULL) {
15695 : NDR_PULL_ALLOC(ndr, r->in.new_password);
15696 : NDR_ZERO_STRUCTP(r->in.new_password);
15697 : }
15698 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15699 453 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15700 113 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15701 : }
15702 453 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
15703 453 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
15704 453 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15705 453 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
15706 453 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
15707 : }
15708 818 : return NDR_ERR_SUCCESS;
15709 : }
15710 :
15711 202 : _PUBLIC_ void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerPasswordSet2 *r)
15712 : {
15713 202 : ndr_print_struct(ndr, name, "netr_ServerPasswordSet2");
15714 202 : if (r == NULL) { ndr_print_null(ndr); return; }
15715 202 : ndr->depth++;
15716 202 : if (flags & NDR_SET_VALUES) {
15717 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15718 : }
15719 202 : if (flags & NDR_IN) {
15720 0 : ndr_print_struct(ndr, "in", "netr_ServerPasswordSet2");
15721 0 : ndr->depth++;
15722 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
15723 0 : ndr->depth++;
15724 0 : if (r->in.server_name) {
15725 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
15726 : }
15727 0 : ndr->depth--;
15728 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
15729 0 : ndr->depth++;
15730 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
15731 0 : ndr->depth--;
15732 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
15733 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
15734 0 : ndr->depth++;
15735 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
15736 0 : ndr->depth--;
15737 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
15738 0 : ndr->depth++;
15739 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
15740 0 : ndr->depth--;
15741 0 : ndr_print_ptr(ndr, "new_password", r->in.new_password);
15742 0 : ndr->depth++;
15743 0 : ndr_print_netr_CryptPassword(ndr, "new_password", r->in.new_password);
15744 0 : ndr->depth--;
15745 0 : ndr->depth--;
15746 : }
15747 202 : if (flags & NDR_OUT) {
15748 202 : ndr_print_struct(ndr, "out", "netr_ServerPasswordSet2");
15749 202 : ndr->depth++;
15750 202 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
15751 202 : ndr->depth++;
15752 202 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
15753 202 : ndr->depth--;
15754 202 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
15755 202 : ndr->depth--;
15756 : }
15757 202 : ndr->depth--;
15758 : }
15759 :
15760 24 : static enum ndr_err_code ndr_push_netr_ServerPasswordGet(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerPasswordGet *r)
15761 : {
15762 24 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15763 24 : if (flags & NDR_IN) {
15764 24 : if (r->in.account_name == NULL) {
15765 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15766 : }
15767 24 : if (r->in.computer_name == NULL) {
15768 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15769 : }
15770 24 : if (r->in.credential == NULL) {
15771 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15772 : }
15773 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
15774 24 : if (r->in.server_name) {
15775 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15776 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15777 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15778 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15779 : }
15780 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
15781 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15782 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
15783 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15784 24 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
15785 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15786 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15787 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15788 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15789 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15790 : }
15791 24 : if (flags & NDR_OUT) {
15792 0 : if (r->out.return_authenticator == NULL) {
15793 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15794 : }
15795 0 : if (r->out.password == NULL) {
15796 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15797 : }
15798 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15799 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.password));
15800 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
15801 : }
15802 20 : return NDR_ERR_SUCCESS;
15803 : }
15804 :
15805 24 : static enum ndr_err_code ndr_pull_netr_ServerPasswordGet(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerPasswordGet *r)
15806 : {
15807 4 : uint32_t _ptr_server_name;
15808 24 : uint32_t size_server_name_1 = 0;
15809 24 : uint32_t length_server_name_1 = 0;
15810 24 : uint32_t size_account_name_1 = 0;
15811 24 : uint32_t length_account_name_1 = 0;
15812 24 : uint32_t size_computer_name_1 = 0;
15813 24 : uint32_t length_computer_name_1 = 0;
15814 24 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
15815 24 : TALLOC_CTX *_mem_save_credential_0 = NULL;
15816 24 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
15817 24 : TALLOC_CTX *_mem_save_password_0 = NULL;
15818 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15819 24 : if (flags & NDR_IN) {
15820 24 : NDR_ZERO_STRUCT(r->out);
15821 :
15822 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
15823 24 : if (_ptr_server_name) {
15824 24 : NDR_PULL_ALLOC(ndr, r->in.server_name);
15825 : } else {
15826 0 : r->in.server_name = NULL;
15827 : }
15828 24 : if (r->in.server_name) {
15829 24 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15830 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
15831 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
15832 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
15833 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
15834 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
15835 24 : if (length_server_name_1 > size_server_name_1) {
15836 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
15837 : }
15838 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
15839 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
15840 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
15841 : }
15842 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
15843 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
15844 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
15845 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
15846 24 : if (length_account_name_1 > size_account_name_1) {
15847 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
15848 : }
15849 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
15850 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
15851 24 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
15852 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
15853 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
15854 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
15855 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
15856 24 : if (length_computer_name_1 > size_computer_name_1) {
15857 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
15858 : }
15859 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
15860 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
15861 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15862 24 : NDR_PULL_ALLOC(ndr, r->in.credential);
15863 : }
15864 24 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
15865 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
15866 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15867 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
15868 24 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15869 24 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
15870 24 : NDR_PULL_ALLOC(ndr, r->out.password);
15871 24 : NDR_ZERO_STRUCTP(r->out.password);
15872 : }
15873 24 : if (flags & NDR_OUT) {
15874 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15875 : if (r->in.credential == NULL) {
15876 : NDR_PULL_ALLOC(ndr, r->in.credential);
15877 : NDR_ZERO_STRUCTP(r->in.credential);
15878 : }
15879 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15880 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15881 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15882 : }
15883 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
15884 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
15885 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15886 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
15887 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15888 0 : NDR_PULL_ALLOC(ndr, r->out.password);
15889 : }
15890 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
15891 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.password, LIBNDR_FLAG_REF_ALLOC);
15892 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.password));
15893 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, LIBNDR_FLAG_REF_ALLOC);
15894 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
15895 : }
15896 20 : return NDR_ERR_SUCCESS;
15897 : }
15898 :
15899 0 : _PUBLIC_ void ndr_print_netr_ServerPasswordGet(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerPasswordGet *r)
15900 : {
15901 0 : ndr_print_struct(ndr, name, "netr_ServerPasswordGet");
15902 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15903 0 : ndr->depth++;
15904 0 : if (flags & NDR_SET_VALUES) {
15905 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15906 : }
15907 0 : if (flags & NDR_IN) {
15908 0 : ndr_print_struct(ndr, "in", "netr_ServerPasswordGet");
15909 0 : ndr->depth++;
15910 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
15911 0 : ndr->depth++;
15912 0 : if (r->in.server_name) {
15913 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
15914 : }
15915 0 : ndr->depth--;
15916 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
15917 0 : ndr->depth++;
15918 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
15919 0 : ndr->depth--;
15920 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
15921 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
15922 0 : ndr->depth++;
15923 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
15924 0 : ndr->depth--;
15925 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
15926 0 : ndr->depth++;
15927 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
15928 0 : ndr->depth--;
15929 0 : ndr->depth--;
15930 : }
15931 0 : if (flags & NDR_OUT) {
15932 0 : ndr_print_struct(ndr, "out", "netr_ServerPasswordGet");
15933 0 : ndr->depth++;
15934 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
15935 0 : ndr->depth++;
15936 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
15937 0 : ndr->depth--;
15938 0 : ndr_print_ptr(ndr, "password", r->out.password);
15939 0 : ndr->depth++;
15940 0 : ndr_print_samr_Password(ndr, "password", r->out.password);
15941 0 : ndr->depth--;
15942 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
15943 0 : ndr->depth--;
15944 : }
15945 0 : ndr->depth--;
15946 : }
15947 :
15948 17 : static enum ndr_err_code ndr_push_netr_NetrLogonSendToSam(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NetrLogonSendToSam *r)
15949 : {
15950 17 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15951 17 : if (flags & NDR_IN) {
15952 0 : if (r->in.computer_name == NULL) {
15953 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15954 : }
15955 0 : if (r->in.credential == NULL) {
15956 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15957 : }
15958 0 : if (r->in.opaque_buffer == NULL) {
15959 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15960 : }
15961 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
15962 0 : if (r->in.server_name) {
15963 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15964 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15965 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15966 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15967 : }
15968 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15969 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15970 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15971 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15972 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15973 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.buffer_len));
15974 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.opaque_buffer, r->in.buffer_len));
15975 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_len));
15976 : }
15977 17 : if (flags & NDR_OUT) {
15978 17 : if (r->out.return_authenticator == NULL) {
15979 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15980 : }
15981 17 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15982 17 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
15983 : }
15984 17 : return NDR_ERR_SUCCESS;
15985 : }
15986 :
15987 17 : static enum ndr_err_code ndr_pull_netr_NetrLogonSendToSam(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NetrLogonSendToSam *r)
15988 : {
15989 0 : uint32_t _ptr_server_name;
15990 17 : uint32_t size_server_name_1 = 0;
15991 17 : uint32_t length_server_name_1 = 0;
15992 17 : uint32_t size_computer_name_1 = 0;
15993 17 : uint32_t length_computer_name_1 = 0;
15994 17 : uint32_t size_opaque_buffer_1 = 0;
15995 17 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
15996 17 : TALLOC_CTX *_mem_save_credential_0 = NULL;
15997 17 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
15998 17 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15999 17 : if (flags & NDR_IN) {
16000 17 : NDR_ZERO_STRUCT(r->out);
16001 :
16002 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16003 17 : if (_ptr_server_name) {
16004 17 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16005 : } else {
16006 0 : r->in.server_name = NULL;
16007 : }
16008 17 : if (r->in.server_name) {
16009 17 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16010 17 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16011 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16012 17 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16013 17 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16014 17 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16015 17 : if (length_server_name_1 > size_server_name_1) {
16016 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
16017 : }
16018 17 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16019 17 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16020 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16021 : }
16022 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
16023 17 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
16024 17 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
16025 17 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
16026 17 : if (length_computer_name_1 > size_computer_name_1) {
16027 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
16028 : }
16029 17 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
16030 17 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
16031 17 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16032 17 : NDR_PULL_ALLOC(ndr, r->in.credential);
16033 : }
16034 17 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
16035 17 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
16036 17 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
16037 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
16038 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.opaque_buffer));
16039 17 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.opaque_buffer, &size_opaque_buffer_1));
16040 17 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16041 17 : NDR_PULL_ALLOC_N(ndr, r->in.opaque_buffer, size_opaque_buffer_1);
16042 : }
16043 17 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.opaque_buffer, size_opaque_buffer_1));
16044 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_len));
16045 17 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
16046 17 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
16047 17 : if (r->in.opaque_buffer) {
16048 17 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.opaque_buffer, r->in.buffer_len));
16049 : }
16050 : }
16051 17 : if (flags & NDR_OUT) {
16052 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16053 : if (r->in.credential == NULL) {
16054 : NDR_PULL_ALLOC(ndr, r->in.credential);
16055 : NDR_ZERO_STRUCTP(r->in.credential);
16056 : }
16057 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16058 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16059 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
16060 : }
16061 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
16062 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
16063 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
16064 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
16065 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
16066 : }
16067 17 : return NDR_ERR_SUCCESS;
16068 : }
16069 :
16070 0 : _PUBLIC_ void ndr_print_netr_NetrLogonSendToSam(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NetrLogonSendToSam *r)
16071 : {
16072 0 : ndr_print_struct(ndr, name, "netr_NetrLogonSendToSam");
16073 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16074 0 : ndr->depth++;
16075 0 : if (flags & NDR_SET_VALUES) {
16076 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16077 : }
16078 0 : if (flags & NDR_IN) {
16079 0 : ndr_print_struct(ndr, "in", "netr_NetrLogonSendToSam");
16080 0 : ndr->depth++;
16081 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
16082 0 : ndr->depth++;
16083 0 : if (r->in.server_name) {
16084 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
16085 : }
16086 0 : ndr->depth--;
16087 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
16088 0 : ndr->depth++;
16089 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
16090 0 : ndr->depth--;
16091 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
16092 0 : ndr->depth++;
16093 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
16094 0 : ndr->depth--;
16095 0 : ndr_print_ptr(ndr, "opaque_buffer", r->in.opaque_buffer);
16096 0 : ndr->depth++;
16097 0 : ndr_print_array_uint8(ndr, "opaque_buffer", r->in.opaque_buffer, r->in.buffer_len);
16098 0 : ndr->depth--;
16099 0 : ndr_print_uint32(ndr, "buffer_len", r->in.buffer_len);
16100 0 : ndr->depth--;
16101 : }
16102 0 : if (flags & NDR_OUT) {
16103 0 : ndr_print_struct(ndr, "out", "netr_NetrLogonSendToSam");
16104 0 : ndr->depth++;
16105 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
16106 0 : ndr->depth++;
16107 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
16108 0 : ndr->depth--;
16109 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
16110 0 : ndr->depth--;
16111 : }
16112 0 : ndr->depth--;
16113 : }
16114 :
16115 162 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesW(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRAddressToSitenamesW *r)
16116 : {
16117 27 : uint32_t cntr_addresses_1;
16118 162 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16119 162 : if (flags & NDR_IN) {
16120 72 : if (r->in.addresses == NULL) {
16121 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16122 : }
16123 72 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
16124 72 : if (r->in.server_name) {
16125 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16126 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16127 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16128 72 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16129 : }
16130 72 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
16131 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.count));
16132 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16133 432 : NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
16134 : }
16135 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16136 432 : NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
16137 : }
16138 : }
16139 162 : if (flags & NDR_OUT) {
16140 90 : if (r->out.ctr == NULL) {
16141 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16142 : }
16143 90 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
16144 90 : if (*r->out.ctr) {
16145 90 : NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16146 : }
16147 90 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16148 : }
16149 135 : return NDR_ERR_SUCCESS;
16150 : }
16151 :
16152 144 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesW(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRAddressToSitenamesW *r)
16153 : {
16154 24 : uint32_t _ptr_server_name;
16155 144 : uint32_t size_server_name_1 = 0;
16156 144 : uint32_t length_server_name_1 = 0;
16157 144 : uint32_t size_addresses_1 = 0;
16158 24 : uint32_t cntr_addresses_1;
16159 24 : uint32_t _ptr_ctr;
16160 144 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
16161 144 : TALLOC_CTX *_mem_save_addresses_1 = NULL;
16162 144 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
16163 144 : TALLOC_CTX *_mem_save_ctr_1 = NULL;
16164 144 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16165 144 : if (flags & NDR_IN) {
16166 72 : NDR_ZERO_STRUCT(r->out);
16167 :
16168 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16169 72 : if (_ptr_server_name) {
16170 72 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16171 : } else {
16172 0 : r->in.server_name = NULL;
16173 : }
16174 72 : if (r->in.server_name) {
16175 72 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16176 72 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16177 72 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16178 72 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16179 72 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16180 72 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16181 72 : if (length_server_name_1 > size_server_name_1) {
16182 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
16183 : }
16184 72 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16185 72 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16186 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16187 : }
16188 72 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
16189 72 : if (r->in.count > 32000) {
16190 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.count), (uint32_t)(0), (uint32_t)(32000));
16191 : }
16192 72 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses));
16193 72 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.addresses, &size_addresses_1));
16194 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16195 72 : NDR_PULL_ALLOC_N(ndr, r->in.addresses, size_addresses_1);
16196 : }
16197 72 : _mem_save_addresses_1 = NDR_PULL_GET_MEM_CTX(ndr);
16198 72 : NDR_PULL_SET_MEM_CTX(ndr, r->in.addresses, 0);
16199 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16200 432 : NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
16201 : }
16202 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16203 432 : NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
16204 : }
16205 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_1, 0);
16206 72 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16207 72 : NDR_ZERO_STRUCTP(r->out.ctr);
16208 72 : if (r->in.addresses) {
16209 72 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.addresses, r->in.count));
16210 : }
16211 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16212 72 : }
16213 : }
16214 144 : if (flags & NDR_OUT) {
16215 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16216 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16217 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16218 18 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16219 : }
16220 72 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16221 72 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16222 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
16223 72 : if (_ptr_ctr) {
16224 72 : NDR_PULL_ALLOC(ndr, *r->out.ctr);
16225 : } else {
16226 0 : *r->out.ctr = NULL;
16227 : }
16228 72 : if (*r->out.ctr) {
16229 72 : _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
16230 72 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
16231 72 : NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16232 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
16233 : }
16234 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16235 72 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16236 : }
16237 120 : return NDR_ERR_SUCCESS;
16238 : }
16239 :
16240 36 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRAddressToSitenamesW *r)
16241 : {
16242 6 : uint32_t cntr_addresses_1;
16243 36 : ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesW");
16244 36 : if (r == NULL) { ndr_print_null(ndr); return; }
16245 36 : ndr->depth++;
16246 36 : if (flags & NDR_SET_VALUES) {
16247 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16248 : }
16249 36 : if (flags & NDR_IN) {
16250 0 : ndr_print_struct(ndr, "in", "netr_DsRAddressToSitenamesW");
16251 0 : ndr->depth++;
16252 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
16253 0 : ndr->depth++;
16254 0 : if (r->in.server_name) {
16255 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
16256 : }
16257 0 : ndr->depth--;
16258 0 : ndr_print_uint32(ndr, "count", r->in.count);
16259 0 : ndr_print_ptr(ndr, "addresses", r->in.addresses);
16260 0 : ndr->depth++;
16261 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "addresses", (uint32_t)(r->in.count));
16262 0 : ndr->depth++;
16263 0 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16264 0 : ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
16265 : }
16266 0 : ndr->depth--;
16267 0 : ndr->depth--;
16268 0 : ndr->depth--;
16269 : }
16270 36 : if (flags & NDR_OUT) {
16271 36 : ndr_print_struct(ndr, "out", "netr_DsRAddressToSitenamesW");
16272 36 : ndr->depth++;
16273 36 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
16274 36 : ndr->depth++;
16275 36 : ndr_print_ptr(ndr, "ctr", *r->out.ctr);
16276 36 : ndr->depth++;
16277 36 : if (*r->out.ctr) {
16278 36 : ndr_print_netr_DsRAddressToSitenamesWCtr(ndr, "ctr", *r->out.ctr);
16279 : }
16280 36 : ndr->depth--;
16281 36 : ndr->depth--;
16282 36 : ndr_print_WERROR(ndr, "result", r->out.result);
16283 36 : ndr->depth--;
16284 : }
16285 36 : ndr->depth--;
16286 : }
16287 :
16288 482 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetDCNameEx2 *r)
16289 : {
16290 482 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16291 482 : if (flags & NDR_IN) {
16292 229 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16293 229 : if (r->in.server_unc) {
16294 205 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16295 205 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16296 205 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16297 205 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16298 : }
16299 229 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client_account));
16300 229 : if (r->in.client_account) {
16301 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client_account, CH_UTF16)));
16302 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16303 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client_account, CH_UTF16)));
16304 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client_account, ndr_charset_length(r->in.client_account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16305 : }
16306 229 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.mask));
16307 229 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
16308 229 : if (r->in.domain_name) {
16309 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
16310 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16311 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
16312 84 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16313 : }
16314 229 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
16315 229 : if (r->in.domain_guid) {
16316 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
16317 : }
16318 229 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
16319 229 : if (r->in.site_name) {
16320 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
16321 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16322 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
16323 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16324 : }
16325 247 : NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags));
16326 : }
16327 482 : if (flags & NDR_OUT) {
16328 253 : if (r->out.info == NULL) {
16329 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16330 : }
16331 253 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
16332 253 : if (*r->out.info) {
16333 253 : NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
16334 : }
16335 253 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16336 : }
16337 442 : return NDR_ERR_SUCCESS;
16338 : }
16339 :
16340 458 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetDCNameEx2 *r)
16341 : {
16342 36 : uint32_t _ptr_server_unc;
16343 458 : uint32_t size_server_unc_1 = 0;
16344 458 : uint32_t length_server_unc_1 = 0;
16345 36 : uint32_t _ptr_client_account;
16346 458 : uint32_t size_client_account_1 = 0;
16347 458 : uint32_t length_client_account_1 = 0;
16348 36 : uint32_t _ptr_domain_name;
16349 458 : uint32_t size_domain_name_1 = 0;
16350 458 : uint32_t length_domain_name_1 = 0;
16351 36 : uint32_t _ptr_domain_guid;
16352 36 : uint32_t _ptr_site_name;
16353 458 : uint32_t size_site_name_1 = 0;
16354 458 : uint32_t length_site_name_1 = 0;
16355 36 : uint32_t _ptr_info;
16356 458 : TALLOC_CTX *_mem_save_server_unc_0 = NULL;
16357 458 : TALLOC_CTX *_mem_save_client_account_0 = NULL;
16358 458 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
16359 458 : TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
16360 458 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
16361 458 : TALLOC_CTX *_mem_save_info_0 = NULL;
16362 458 : TALLOC_CTX *_mem_save_info_1 = NULL;
16363 458 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16364 458 : if (flags & NDR_IN) {
16365 229 : NDR_ZERO_STRUCT(r->out);
16366 :
16367 229 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16368 229 : if (_ptr_server_unc) {
16369 205 : NDR_PULL_ALLOC(ndr, r->in.server_unc);
16370 : } else {
16371 24 : r->in.server_unc = NULL;
16372 : }
16373 229 : if (r->in.server_unc) {
16374 205 : _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16375 205 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16376 205 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16377 205 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16378 205 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_unc, &size_server_unc_1));
16379 205 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_unc, &length_server_unc_1));
16380 205 : if (length_server_unc_1 > size_server_unc_1) {
16381 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_unc_1, length_server_unc_1);
16382 : }
16383 205 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16384 205 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16385 205 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16386 : }
16387 229 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_account));
16388 229 : if (_ptr_client_account) {
16389 24 : NDR_PULL_ALLOC(ndr, r->in.client_account);
16390 : } else {
16391 205 : r->in.client_account = NULL;
16392 : }
16393 229 : if (r->in.client_account) {
16394 24 : _mem_save_client_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
16395 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.client_account, 0);
16396 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client_account));
16397 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client_account));
16398 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.client_account, &size_client_account_1));
16399 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.client_account, &length_client_account_1));
16400 24 : if (length_client_account_1 > size_client_account_1) {
16401 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_client_account_1, length_client_account_1);
16402 : }
16403 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_client_account_1, sizeof(uint16_t)));
16404 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client_account, length_client_account_1, sizeof(uint16_t), CH_UTF16));
16405 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_account_0, 0);
16406 : }
16407 229 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.mask));
16408 229 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
16409 229 : if (_ptr_domain_name) {
16410 84 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
16411 : } else {
16412 145 : r->in.domain_name = NULL;
16413 : }
16414 229 : if (r->in.domain_name) {
16415 84 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16416 84 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
16417 84 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
16418 84 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
16419 84 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
16420 84 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
16421 84 : if (length_domain_name_1 > size_domain_name_1) {
16422 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
16423 : }
16424 84 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
16425 84 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
16426 84 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
16427 : }
16428 229 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
16429 229 : if (_ptr_domain_guid) {
16430 0 : NDR_PULL_ALLOC(ndr, r->in.domain_guid);
16431 : } else {
16432 229 : r->in.domain_guid = NULL;
16433 : }
16434 229 : if (r->in.domain_guid) {
16435 0 : _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
16436 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
16437 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
16438 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
16439 : }
16440 229 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
16441 229 : if (_ptr_site_name) {
16442 4 : NDR_PULL_ALLOC(ndr, r->in.site_name);
16443 : } else {
16444 225 : r->in.site_name = NULL;
16445 : }
16446 229 : if (r->in.site_name) {
16447 4 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16448 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
16449 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
16450 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
16451 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
16452 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
16453 4 : if (length_site_name_1 > size_site_name_1) {
16454 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
16455 : }
16456 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
16457 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
16458 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
16459 : }
16460 247 : NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags));
16461 229 : NDR_PULL_ALLOC(ndr, r->out.info);
16462 229 : NDR_ZERO_STRUCTP(r->out.info);
16463 : }
16464 458 : if (flags & NDR_OUT) {
16465 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16466 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16467 229 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16468 157 : NDR_PULL_ALLOC(ndr, r->out.info);
16469 : }
16470 229 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16471 229 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16472 229 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
16473 229 : if (_ptr_info) {
16474 229 : NDR_PULL_ALLOC(ndr, *r->out.info);
16475 : } else {
16476 0 : *r->out.info = NULL;
16477 : }
16478 229 : if (*r->out.info) {
16479 229 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
16480 229 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
16481 229 : NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
16482 229 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
16483 : }
16484 229 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16485 229 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16486 : }
16487 422 : return NDR_ERR_SUCCESS;
16488 : }
16489 :
16490 48 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetDCNameEx2 *r)
16491 : {
16492 48 : ndr_print_struct(ndr, name, "netr_DsRGetDCNameEx2");
16493 48 : if (r == NULL) { ndr_print_null(ndr); return; }
16494 48 : ndr->depth++;
16495 48 : if (flags & NDR_SET_VALUES) {
16496 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16497 : }
16498 48 : if (flags & NDR_IN) {
16499 0 : ndr_print_struct(ndr, "in", "netr_DsRGetDCNameEx2");
16500 0 : ndr->depth++;
16501 0 : ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16502 0 : ndr->depth++;
16503 0 : if (r->in.server_unc) {
16504 0 : ndr_print_string(ndr, "server_unc", r->in.server_unc);
16505 : }
16506 0 : ndr->depth--;
16507 0 : ndr_print_ptr(ndr, "client_account", r->in.client_account);
16508 0 : ndr->depth++;
16509 0 : if (r->in.client_account) {
16510 0 : ndr_print_string(ndr, "client_account", r->in.client_account);
16511 : }
16512 0 : ndr->depth--;
16513 0 : ndr_print_samr_AcctFlags(ndr, "mask", r->in.mask);
16514 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
16515 0 : ndr->depth++;
16516 0 : if (r->in.domain_name) {
16517 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
16518 : }
16519 0 : ndr->depth--;
16520 0 : ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
16521 0 : ndr->depth++;
16522 0 : if (r->in.domain_guid) {
16523 0 : ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
16524 : }
16525 0 : ndr->depth--;
16526 0 : ndr_print_ptr(ndr, "site_name", r->in.site_name);
16527 0 : ndr->depth++;
16528 0 : if (r->in.site_name) {
16529 0 : ndr_print_string(ndr, "site_name", r->in.site_name);
16530 : }
16531 0 : ndr->depth--;
16532 0 : ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags);
16533 0 : ndr->depth--;
16534 : }
16535 48 : if (flags & NDR_OUT) {
16536 48 : ndr_print_struct(ndr, "out", "netr_DsRGetDCNameEx2");
16537 48 : ndr->depth++;
16538 48 : ndr_print_ptr(ndr, "info", r->out.info);
16539 48 : ndr->depth++;
16540 48 : ndr_print_ptr(ndr, "info", *r->out.info);
16541 48 : ndr->depth++;
16542 48 : if (*r->out.info) {
16543 48 : ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
16544 : }
16545 48 : ndr->depth--;
16546 48 : ndr->depth--;
16547 48 : ndr_print_WERROR(ndr, "result", r->out.result);
16548 48 : ndr->depth--;
16549 : }
16550 48 : ndr->depth--;
16551 : }
16552 :
16553 0 : static enum ndr_err_code ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
16554 : {
16555 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16556 0 : if (flags & NDR_IN) {
16557 0 : }
16558 0 : if (flags & NDR_OUT) {
16559 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16560 : }
16561 0 : return NDR_ERR_SUCCESS;
16562 : }
16563 :
16564 0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
16565 : {
16566 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16567 0 : if (flags & NDR_IN) {
16568 0 : }
16569 0 : if (flags & NDR_OUT) {
16570 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16571 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16572 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16573 : }
16574 0 : return NDR_ERR_SUCCESS;
16575 : }
16576 :
16577 0 : _PUBLIC_ void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
16578 : {
16579 0 : ndr_print_struct(ndr, name, "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
16580 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16581 0 : ndr->depth++;
16582 0 : if (flags & NDR_SET_VALUES) {
16583 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16584 : }
16585 0 : if (flags & NDR_IN) {
16586 0 : ndr_print_struct(ndr, "in", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
16587 0 : ndr->depth++;
16588 0 : ndr->depth--;
16589 : }
16590 0 : if (flags & NDR_OUT) {
16591 0 : ndr_print_struct(ndr, "out", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
16592 0 : ndr->depth++;
16593 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16594 0 : ndr->depth--;
16595 : }
16596 0 : ndr->depth--;
16597 : }
16598 :
16599 24 : static enum ndr_err_code ndr_push_netr_NetrEnumerateTrustedDomainsEx(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NetrEnumerateTrustedDomainsEx *r)
16600 : {
16601 24 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16602 24 : if (flags & NDR_IN) {
16603 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
16604 24 : if (r->in.server_name) {
16605 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16606 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16607 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16608 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16609 : }
16610 : }
16611 24 : if (flags & NDR_OUT) {
16612 0 : if (r->out.dom_trust_list == NULL) {
16613 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16614 : }
16615 0 : NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dom_trust_list));
16616 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16617 : }
16618 20 : return NDR_ERR_SUCCESS;
16619 : }
16620 :
16621 24 : static enum ndr_err_code ndr_pull_netr_NetrEnumerateTrustedDomainsEx(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NetrEnumerateTrustedDomainsEx *r)
16622 : {
16623 4 : uint32_t _ptr_server_name;
16624 24 : uint32_t size_server_name_1 = 0;
16625 24 : uint32_t length_server_name_1 = 0;
16626 24 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
16627 24 : TALLOC_CTX *_mem_save_dom_trust_list_0 = NULL;
16628 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16629 24 : if (flags & NDR_IN) {
16630 24 : NDR_ZERO_STRUCT(r->out);
16631 :
16632 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16633 24 : if (_ptr_server_name) {
16634 24 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16635 : } else {
16636 0 : r->in.server_name = NULL;
16637 : }
16638 24 : if (r->in.server_name) {
16639 24 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16640 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16641 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16642 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16643 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16644 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16645 24 : if (length_server_name_1 > size_server_name_1) {
16646 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
16647 : }
16648 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16649 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16650 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16651 : }
16652 24 : NDR_PULL_ALLOC(ndr, r->out.dom_trust_list);
16653 24 : NDR_ZERO_STRUCTP(r->out.dom_trust_list);
16654 : }
16655 24 : if (flags & NDR_OUT) {
16656 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16657 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16658 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16659 0 : NDR_PULL_ALLOC(ndr, r->out.dom_trust_list);
16660 : }
16661 0 : _mem_save_dom_trust_list_0 = NDR_PULL_GET_MEM_CTX(ndr);
16662 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dom_trust_list, LIBNDR_FLAG_REF_ALLOC);
16663 0 : NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dom_trust_list));
16664 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_trust_list_0, LIBNDR_FLAG_REF_ALLOC);
16665 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16666 : }
16667 20 : return NDR_ERR_SUCCESS;
16668 : }
16669 :
16670 0 : _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomainsEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NetrEnumerateTrustedDomainsEx *r)
16671 : {
16672 0 : ndr_print_struct(ndr, name, "netr_NetrEnumerateTrustedDomainsEx");
16673 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16674 0 : ndr->depth++;
16675 0 : if (flags & NDR_SET_VALUES) {
16676 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16677 : }
16678 0 : if (flags & NDR_IN) {
16679 0 : ndr_print_struct(ndr, "in", "netr_NetrEnumerateTrustedDomainsEx");
16680 0 : ndr->depth++;
16681 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
16682 0 : ndr->depth++;
16683 0 : if (r->in.server_name) {
16684 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
16685 : }
16686 0 : ndr->depth--;
16687 0 : ndr->depth--;
16688 : }
16689 0 : if (flags & NDR_OUT) {
16690 0 : ndr_print_struct(ndr, "out", "netr_NetrEnumerateTrustedDomainsEx");
16691 0 : ndr->depth++;
16692 0 : ndr_print_ptr(ndr, "dom_trust_list", r->out.dom_trust_list);
16693 0 : ndr->depth++;
16694 0 : ndr_print_netr_DomainTrustList(ndr, "dom_trust_list", r->out.dom_trust_list);
16695 0 : ndr->depth--;
16696 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16697 0 : ndr->depth--;
16698 : }
16699 0 : ndr->depth--;
16700 : }
16701 :
16702 162 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExW(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRAddressToSitenamesExW *r)
16703 : {
16704 27 : uint32_t cntr_addresses_1;
16705 162 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16706 162 : if (flags & NDR_IN) {
16707 72 : if (r->in.addresses == NULL) {
16708 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16709 : }
16710 72 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
16711 72 : if (r->in.server_name) {
16712 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16713 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16714 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16715 72 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16716 : }
16717 72 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
16718 72 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.count));
16719 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16720 432 : NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
16721 : }
16722 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16723 432 : NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
16724 : }
16725 : }
16726 162 : if (flags & NDR_OUT) {
16727 90 : if (r->out.ctr == NULL) {
16728 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16729 : }
16730 90 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
16731 90 : if (*r->out.ctr) {
16732 90 : NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16733 : }
16734 90 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16735 : }
16736 135 : return NDR_ERR_SUCCESS;
16737 : }
16738 :
16739 144 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExW(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRAddressToSitenamesExW *r)
16740 : {
16741 24 : uint32_t _ptr_server_name;
16742 144 : uint32_t size_server_name_1 = 0;
16743 144 : uint32_t length_server_name_1 = 0;
16744 144 : uint32_t size_addresses_1 = 0;
16745 24 : uint32_t cntr_addresses_1;
16746 24 : uint32_t _ptr_ctr;
16747 144 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
16748 144 : TALLOC_CTX *_mem_save_addresses_1 = NULL;
16749 144 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
16750 144 : TALLOC_CTX *_mem_save_ctr_1 = NULL;
16751 144 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16752 144 : if (flags & NDR_IN) {
16753 72 : NDR_ZERO_STRUCT(r->out);
16754 :
16755 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16756 72 : if (_ptr_server_name) {
16757 72 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16758 : } else {
16759 0 : r->in.server_name = NULL;
16760 : }
16761 72 : if (r->in.server_name) {
16762 72 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16763 72 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16764 72 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16765 72 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16766 72 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16767 72 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16768 72 : if (length_server_name_1 > size_server_name_1) {
16769 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
16770 : }
16771 72 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16772 72 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16773 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16774 : }
16775 72 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
16776 72 : if (r->in.count > 32000) {
16777 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.count), (uint32_t)(0), (uint32_t)(32000));
16778 : }
16779 72 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses));
16780 72 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.addresses, &size_addresses_1));
16781 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16782 72 : NDR_PULL_ALLOC_N(ndr, r->in.addresses, size_addresses_1);
16783 : }
16784 72 : _mem_save_addresses_1 = NDR_PULL_GET_MEM_CTX(ndr);
16785 72 : NDR_PULL_SET_MEM_CTX(ndr, r->in.addresses, 0);
16786 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16787 432 : NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
16788 : }
16789 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16790 432 : NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
16791 : }
16792 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_1, 0);
16793 72 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16794 72 : NDR_ZERO_STRUCTP(r->out.ctr);
16795 72 : if (r->in.addresses) {
16796 72 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.addresses, r->in.count));
16797 : }
16798 504 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16799 72 : }
16800 : }
16801 144 : if (flags & NDR_OUT) {
16802 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16803 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16804 72 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16805 18 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16806 : }
16807 72 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16808 72 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16809 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
16810 72 : if (_ptr_ctr) {
16811 72 : NDR_PULL_ALLOC(ndr, *r->out.ctr);
16812 : } else {
16813 0 : *r->out.ctr = NULL;
16814 : }
16815 72 : if (*r->out.ctr) {
16816 72 : _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
16817 72 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
16818 72 : NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16819 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
16820 : }
16821 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16822 72 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16823 : }
16824 120 : return NDR_ERR_SUCCESS;
16825 : }
16826 :
16827 36 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRAddressToSitenamesExW *r)
16828 : {
16829 6 : uint32_t cntr_addresses_1;
16830 36 : ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesExW");
16831 36 : if (r == NULL) { ndr_print_null(ndr); return; }
16832 36 : ndr->depth++;
16833 36 : if (flags & NDR_SET_VALUES) {
16834 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16835 : }
16836 36 : if (flags & NDR_IN) {
16837 0 : ndr_print_struct(ndr, "in", "netr_DsRAddressToSitenamesExW");
16838 0 : ndr->depth++;
16839 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
16840 0 : ndr->depth++;
16841 0 : if (r->in.server_name) {
16842 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
16843 : }
16844 0 : ndr->depth--;
16845 0 : ndr_print_uint32(ndr, "count", r->in.count);
16846 0 : ndr_print_ptr(ndr, "addresses", r->in.addresses);
16847 0 : ndr->depth++;
16848 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "addresses", (uint32_t)(r->in.count));
16849 0 : ndr->depth++;
16850 0 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16851 0 : ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
16852 : }
16853 0 : ndr->depth--;
16854 0 : ndr->depth--;
16855 0 : ndr->depth--;
16856 : }
16857 36 : if (flags & NDR_OUT) {
16858 36 : ndr_print_struct(ndr, "out", "netr_DsRAddressToSitenamesExW");
16859 36 : ndr->depth++;
16860 36 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
16861 36 : ndr->depth++;
16862 36 : ndr_print_ptr(ndr, "ctr", *r->out.ctr);
16863 36 : ndr->depth++;
16864 36 : if (*r->out.ctr) {
16865 36 : ndr_print_netr_DsRAddressToSitenamesExWCtr(ndr, "ctr", *r->out.ctr);
16866 : }
16867 36 : ndr->depth--;
16868 36 : ndr->depth--;
16869 36 : ndr_print_WERROR(ndr, "result", r->out.result);
16870 36 : ndr->depth--;
16871 : }
16872 36 : ndr->depth--;
16873 : }
16874 :
16875 64 : static enum ndr_err_code ndr_push_netr_DsrGetDcSiteCoverageW(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsrGetDcSiteCoverageW *r)
16876 : {
16877 64 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16878 64 : if (flags & NDR_IN) {
16879 29 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
16880 29 : if (r->in.server_name) {
16881 29 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16882 29 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16883 29 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16884 29 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16885 : }
16886 : }
16887 64 : if (flags & NDR_OUT) {
16888 35 : if (r->out.ctr == NULL) {
16889 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16890 : }
16891 35 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
16892 35 : if (*r->out.ctr) {
16893 35 : NDR_CHECK(ndr_push_DcSitesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16894 : }
16895 35 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16896 : }
16897 55 : return NDR_ERR_SUCCESS;
16898 : }
16899 :
16900 58 : static enum ndr_err_code ndr_pull_netr_DsrGetDcSiteCoverageW(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsrGetDcSiteCoverageW *r)
16901 : {
16902 8 : uint32_t _ptr_server_name;
16903 58 : uint32_t size_server_name_1 = 0;
16904 58 : uint32_t length_server_name_1 = 0;
16905 8 : uint32_t _ptr_ctr;
16906 58 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
16907 58 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
16908 58 : TALLOC_CTX *_mem_save_ctr_1 = NULL;
16909 58 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16910 58 : if (flags & NDR_IN) {
16911 29 : NDR_ZERO_STRUCT(r->out);
16912 :
16913 29 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16914 29 : if (_ptr_server_name) {
16915 29 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16916 : } else {
16917 0 : r->in.server_name = NULL;
16918 : }
16919 29 : if (r->in.server_name) {
16920 29 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16921 29 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16922 29 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16923 29 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16924 29 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16925 29 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16926 29 : if (length_server_name_1 > size_server_name_1) {
16927 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
16928 : }
16929 29 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16930 29 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16931 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16932 : }
16933 29 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16934 29 : NDR_ZERO_STRUCTP(r->out.ctr);
16935 : }
16936 58 : if (flags & NDR_OUT) {
16937 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16938 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16939 29 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16940 11 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16941 : }
16942 29 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16943 29 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16944 29 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
16945 29 : if (_ptr_ctr) {
16946 29 : NDR_PULL_ALLOC(ndr, *r->out.ctr);
16947 : } else {
16948 0 : *r->out.ctr = NULL;
16949 : }
16950 29 : if (*r->out.ctr) {
16951 29 : _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
16952 29 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
16953 29 : NDR_CHECK(ndr_pull_DcSitesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16954 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
16955 : }
16956 29 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16957 29 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16958 : }
16959 50 : return NDR_ERR_SUCCESS;
16960 : }
16961 :
16962 12 : _PUBLIC_ void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsrGetDcSiteCoverageW *r)
16963 : {
16964 12 : ndr_print_struct(ndr, name, "netr_DsrGetDcSiteCoverageW");
16965 12 : if (r == NULL) { ndr_print_null(ndr); return; }
16966 12 : ndr->depth++;
16967 12 : if (flags & NDR_SET_VALUES) {
16968 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16969 : }
16970 12 : if (flags & NDR_IN) {
16971 0 : ndr_print_struct(ndr, "in", "netr_DsrGetDcSiteCoverageW");
16972 0 : ndr->depth++;
16973 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
16974 0 : ndr->depth++;
16975 0 : if (r->in.server_name) {
16976 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
16977 : }
16978 0 : ndr->depth--;
16979 0 : ndr->depth--;
16980 : }
16981 12 : if (flags & NDR_OUT) {
16982 12 : ndr_print_struct(ndr, "out", "netr_DsrGetDcSiteCoverageW");
16983 12 : ndr->depth++;
16984 12 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
16985 12 : ndr->depth++;
16986 12 : ndr_print_ptr(ndr, "ctr", *r->out.ctr);
16987 12 : ndr->depth++;
16988 12 : if (*r->out.ctr) {
16989 12 : ndr_print_DcSitesCtr(ndr, "ctr", *r->out.ctr);
16990 : }
16991 12 : ndr->depth--;
16992 12 : ndr->depth--;
16993 12 : ndr_print_WERROR(ndr, "result", r->out.result);
16994 12 : ndr->depth--;
16995 : }
16996 12 : ndr->depth--;
16997 : }
16998 :
16999 14178 : static enum ndr_err_code ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonSamLogonEx *r)
17000 : {
17001 14178 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17002 14178 : if (flags & NDR_IN) {
17003 6577 : if (r->in.logon == NULL) {
17004 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17005 : }
17006 6577 : if (r->in.flags == NULL) {
17007 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17008 : }
17009 6577 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17010 6577 : if (r->in.server_name) {
17011 6577 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17012 6577 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17013 6577 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17014 6577 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17015 : }
17016 6577 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
17017 6577 : if (r->in.computer_name) {
17018 6577 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17019 6577 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17020 6577 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17021 6577 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17022 : }
17023 6577 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
17024 6577 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
17025 6577 : NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
17026 6577 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
17027 6577 : NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->in.flags));
17028 : }
17029 14178 : if (flags & NDR_OUT) {
17030 7601 : if (r->out.validation == NULL) {
17031 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17032 : }
17033 7601 : if (r->out.authoritative == NULL) {
17034 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17035 : }
17036 7601 : if (r->out.flags == NULL) {
17037 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17038 : }
17039 7601 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
17040 7601 : NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
17041 7601 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
17042 7601 : NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->out.flags));
17043 7601 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
17044 : }
17045 12968 : return NDR_ERR_SUCCESS;
17046 : }
17047 :
17048 13518 : static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonSamLogonEx *r)
17049 : {
17050 1100 : uint32_t _ptr_server_name;
17051 13518 : uint32_t size_server_name_1 = 0;
17052 13518 : uint32_t length_server_name_1 = 0;
17053 1100 : uint32_t _ptr_computer_name;
17054 13518 : uint32_t size_computer_name_1 = 0;
17055 13518 : uint32_t length_computer_name_1 = 0;
17056 13518 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17057 13518 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
17058 13518 : TALLOC_CTX *_mem_save_logon_0 = NULL;
17059 13518 : TALLOC_CTX *_mem_save_validation_0 = NULL;
17060 13518 : TALLOC_CTX *_mem_save_authoritative_0 = NULL;
17061 13518 : TALLOC_CTX *_mem_save_flags_0 = NULL;
17062 13518 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17063 13518 : if (flags & NDR_IN) {
17064 6941 : NDR_ZERO_STRUCT(r->out);
17065 :
17066 6941 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17067 6941 : if (_ptr_server_name) {
17068 6941 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17069 : } else {
17070 0 : r->in.server_name = NULL;
17071 : }
17072 6941 : if (r->in.server_name) {
17073 6941 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17074 6941 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17075 6941 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17076 6941 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17077 6941 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17078 6941 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17079 6941 : if (length_server_name_1 > size_server_name_1) {
17080 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
17081 : }
17082 6941 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17083 6941 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17084 6941 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17085 : }
17086 6941 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
17087 6941 : if (_ptr_computer_name) {
17088 6941 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
17089 : } else {
17090 0 : r->in.computer_name = NULL;
17091 : }
17092 6941 : if (r->in.computer_name) {
17093 6941 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17094 6941 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
17095 6941 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
17096 6941 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
17097 6941 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
17098 6941 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
17099 6941 : if (length_computer_name_1 > size_computer_name_1) {
17100 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
17101 : }
17102 6941 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
17103 6941 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
17104 6941 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
17105 : }
17106 6941 : NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
17107 6941 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17108 6941 : NDR_PULL_ALLOC(ndr, r->in.logon);
17109 : }
17110 6941 : _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
17111 6941 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
17112 6941 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
17113 6941 : NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
17114 6941 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
17115 6941 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
17116 6941 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17117 6941 : NDR_PULL_ALLOC(ndr, r->in.flags);
17118 : }
17119 6941 : _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
17120 6941 : NDR_PULL_SET_MEM_CTX(ndr, r->in.flags, LIBNDR_FLAG_REF_ALLOC);
17121 6941 : NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->in.flags));
17122 6941 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
17123 6941 : NDR_PULL_ALLOC(ndr, r->out.validation);
17124 6941 : NDR_ZERO_STRUCTP(r->out.validation);
17125 6941 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
17126 6941 : NDR_ZERO_STRUCTP(r->out.authoritative);
17127 6941 : NDR_PULL_ALLOC(ndr, r->out.flags);
17128 6941 : *r->out.flags = *r->in.flags;
17129 : }
17130 13518 : if (flags & NDR_OUT) {
17131 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17132 : if (r->in.logon == NULL) {
17133 : NDR_PULL_ALLOC(ndr, r->in.logon);
17134 : NDR_ZERO_STRUCTP(r->in.logon);
17135 : }
17136 : if (r->in.flags == NULL) {
17137 : NDR_PULL_ALLOC(ndr, r->in.flags);
17138 : NDR_ZERO_STRUCTP(r->in.flags);
17139 : }
17140 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17141 6577 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17142 879 : NDR_PULL_ALLOC(ndr, r->out.validation);
17143 : }
17144 6577 : _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
17145 6577 : NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
17146 6577 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
17147 6577 : NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
17148 6577 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
17149 6577 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17150 879 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
17151 : }
17152 6577 : _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
17153 6577 : NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
17154 6577 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
17155 6577 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
17156 6577 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17157 879 : NDR_PULL_ALLOC(ndr, r->out.flags);
17158 : }
17159 6577 : _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
17160 6577 : NDR_PULL_SET_MEM_CTX(ndr, r->out.flags, LIBNDR_FLAG_REF_ALLOC);
17161 6577 : NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->out.flags));
17162 6577 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
17163 6577 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
17164 : }
17165 12418 : return NDR_ERR_SUCCESS;
17166 : }
17167 :
17168 1320 : _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonSamLogonEx *r)
17169 : {
17170 1320 : ndr_print_struct(ndr, name, "netr_LogonSamLogonEx");
17171 1320 : if (r == NULL) { ndr_print_null(ndr); return; }
17172 1320 : ndr->depth++;
17173 1320 : if (flags & NDR_SET_VALUES) {
17174 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17175 : }
17176 1320 : if (flags & NDR_IN) {
17177 0 : ndr_print_struct(ndr, "in", "netr_LogonSamLogonEx");
17178 0 : ndr->depth++;
17179 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17180 0 : ndr->depth++;
17181 0 : if (r->in.server_name) {
17182 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17183 : }
17184 0 : ndr->depth--;
17185 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
17186 0 : ndr->depth++;
17187 0 : if (r->in.computer_name) {
17188 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
17189 : }
17190 0 : ndr->depth--;
17191 0 : ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
17192 0 : ndr_print_ptr(ndr, "logon", r->in.logon);
17193 0 : ndr->depth++;
17194 0 : ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
17195 0 : ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
17196 0 : ndr->depth--;
17197 0 : ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
17198 0 : ndr_print_ptr(ndr, "flags", r->in.flags);
17199 0 : ndr->depth++;
17200 0 : ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->in.flags);
17201 0 : ndr->depth--;
17202 0 : ndr->depth--;
17203 : }
17204 1320 : if (flags & NDR_OUT) {
17205 1320 : ndr_print_struct(ndr, "out", "netr_LogonSamLogonEx");
17206 1320 : ndr->depth++;
17207 1320 : ndr_print_ptr(ndr, "validation", r->out.validation);
17208 1320 : ndr->depth++;
17209 1320 : ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
17210 1320 : ndr_print_netr_Validation(ndr, "validation", r->out.validation);
17211 1320 : ndr->depth--;
17212 1320 : ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
17213 1320 : ndr->depth++;
17214 1320 : ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
17215 1320 : ndr->depth--;
17216 1320 : ndr_print_ptr(ndr, "flags", r->out.flags);
17217 1320 : ndr->depth++;
17218 1320 : ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->out.flags);
17219 1320 : ndr->depth--;
17220 1320 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
17221 1320 : ndr->depth--;
17222 : }
17223 1320 : ndr->depth--;
17224 : }
17225 :
17226 110 : static enum ndr_err_code ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsrEnumerateDomainTrusts *r)
17227 : {
17228 110 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17229 110 : if (flags & NDR_IN) {
17230 50 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17231 50 : if (r->in.server_name) {
17232 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17233 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17234 50 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17235 50 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17236 : }
17237 50 : NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->in.trust_flags));
17238 : }
17239 110 : if (flags & NDR_OUT) {
17240 60 : if (r->out.trusts == NULL) {
17241 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17242 : }
17243 60 : NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts));
17244 60 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17245 : }
17246 101 : return NDR_ERR_SUCCESS;
17247 : }
17248 :
17249 104 : static enum ndr_err_code ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsrEnumerateDomainTrusts *r)
17250 : {
17251 8 : uint32_t _ptr_server_name;
17252 104 : uint32_t size_server_name_1 = 0;
17253 104 : uint32_t length_server_name_1 = 0;
17254 104 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17255 104 : TALLOC_CTX *_mem_save_trusts_0 = NULL;
17256 104 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17257 104 : if (flags & NDR_IN) {
17258 54 : NDR_ZERO_STRUCT(r->out);
17259 :
17260 54 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17261 54 : if (_ptr_server_name) {
17262 54 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17263 : } else {
17264 0 : r->in.server_name = NULL;
17265 : }
17266 54 : if (r->in.server_name) {
17267 54 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17268 54 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17269 54 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17270 54 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17271 54 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17272 54 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17273 54 : if (length_server_name_1 > size_server_name_1) {
17274 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
17275 : }
17276 54 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17277 54 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17278 54 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17279 : }
17280 54 : NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->in.trust_flags));
17281 54 : NDR_PULL_ALLOC(ndr, r->out.trusts);
17282 54 : NDR_ZERO_STRUCTP(r->out.trusts);
17283 : }
17284 104 : if (flags & NDR_OUT) {
17285 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17286 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17287 50 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17288 32 : NDR_PULL_ALLOC(ndr, r->out.trusts);
17289 : }
17290 50 : _mem_save_trusts_0 = NDR_PULL_GET_MEM_CTX(ndr);
17291 50 : NDR_PULL_SET_MEM_CTX(ndr, r->out.trusts, LIBNDR_FLAG_REF_ALLOC);
17292 50 : NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts));
17293 50 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_0, LIBNDR_FLAG_REF_ALLOC);
17294 50 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17295 : }
17296 96 : return NDR_ERR_SUCCESS;
17297 : }
17298 :
17299 12 : _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsrEnumerateDomainTrusts *r)
17300 : {
17301 12 : ndr_print_struct(ndr, name, "netr_DsrEnumerateDomainTrusts");
17302 12 : if (r == NULL) { ndr_print_null(ndr); return; }
17303 12 : ndr->depth++;
17304 12 : if (flags & NDR_SET_VALUES) {
17305 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17306 : }
17307 12 : if (flags & NDR_IN) {
17308 0 : ndr_print_struct(ndr, "in", "netr_DsrEnumerateDomainTrusts");
17309 0 : ndr->depth++;
17310 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17311 0 : ndr->depth++;
17312 0 : if (r->in.server_name) {
17313 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17314 : }
17315 0 : ndr->depth--;
17316 0 : ndr_print_netr_TrustFlags(ndr, "trust_flags", r->in.trust_flags);
17317 0 : ndr->depth--;
17318 : }
17319 12 : if (flags & NDR_OUT) {
17320 12 : ndr_print_struct(ndr, "out", "netr_DsrEnumerateDomainTrusts");
17321 12 : ndr->depth++;
17322 12 : ndr_print_ptr(ndr, "trusts", r->out.trusts);
17323 12 : ndr->depth++;
17324 12 : ndr_print_netr_DomainTrustList(ndr, "trusts", r->out.trusts);
17325 12 : ndr->depth--;
17326 12 : ndr_print_WERROR(ndr, "result", r->out.result);
17327 12 : ndr->depth--;
17328 : }
17329 12 : ndr->depth--;
17330 : }
17331 :
17332 0 : static enum ndr_err_code ndr_push_netr_DsrDeregisterDNSHostRecords(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsrDeregisterDNSHostRecords *r)
17333 : {
17334 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17335 0 : if (flags & NDR_IN) {
17336 0 : if (r->in.dns_host == NULL) {
17337 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17338 : }
17339 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17340 0 : if (r->in.server_name) {
17341 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17342 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17343 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17344 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17345 : }
17346 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain));
17347 0 : if (r->in.domain) {
17348 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF16)));
17349 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17350 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF16)));
17351 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain, ndr_charset_length(r->in.domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17352 : }
17353 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
17354 0 : if (r->in.domain_guid) {
17355 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
17356 : }
17357 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dsa_guid));
17358 0 : if (r->in.dsa_guid) {
17359 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.dsa_guid));
17360 : }
17361 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_host, CH_UTF16)));
17362 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17363 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_host, CH_UTF16)));
17364 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dns_host, ndr_charset_length(r->in.dns_host, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17365 : }
17366 0 : if (flags & NDR_OUT) {
17367 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17368 : }
17369 0 : return NDR_ERR_SUCCESS;
17370 : }
17371 :
17372 0 : static enum ndr_err_code ndr_pull_netr_DsrDeregisterDNSHostRecords(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsrDeregisterDNSHostRecords *r)
17373 : {
17374 0 : uint32_t _ptr_server_name;
17375 0 : uint32_t size_server_name_1 = 0;
17376 0 : uint32_t length_server_name_1 = 0;
17377 0 : uint32_t _ptr_domain;
17378 0 : uint32_t size_domain_1 = 0;
17379 0 : uint32_t length_domain_1 = 0;
17380 0 : uint32_t _ptr_domain_guid;
17381 0 : uint32_t _ptr_dsa_guid;
17382 0 : uint32_t size_dns_host_1 = 0;
17383 0 : uint32_t length_dns_host_1 = 0;
17384 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17385 0 : TALLOC_CTX *_mem_save_domain_0 = NULL;
17386 0 : TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
17387 0 : TALLOC_CTX *_mem_save_dsa_guid_0 = NULL;
17388 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17389 0 : if (flags & NDR_IN) {
17390 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17391 0 : if (_ptr_server_name) {
17392 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17393 : } else {
17394 0 : r->in.server_name = NULL;
17395 : }
17396 0 : if (r->in.server_name) {
17397 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17398 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17399 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17400 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17401 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17402 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17403 0 : if (length_server_name_1 > size_server_name_1) {
17404 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
17405 : }
17406 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17407 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17408 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17409 : }
17410 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
17411 0 : if (_ptr_domain) {
17412 0 : NDR_PULL_ALLOC(ndr, r->in.domain);
17413 : } else {
17414 0 : r->in.domain = NULL;
17415 : }
17416 0 : if (r->in.domain) {
17417 0 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
17418 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain, 0);
17419 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain));
17420 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain));
17421 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain, &size_domain_1));
17422 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain, &length_domain_1));
17423 0 : if (length_domain_1 > size_domain_1) {
17424 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
17425 : }
17426 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
17427 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
17428 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
17429 : }
17430 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
17431 0 : if (_ptr_domain_guid) {
17432 0 : NDR_PULL_ALLOC(ndr, r->in.domain_guid);
17433 : } else {
17434 0 : r->in.domain_guid = NULL;
17435 : }
17436 0 : if (r->in.domain_guid) {
17437 0 : _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
17438 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
17439 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
17440 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
17441 : }
17442 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dsa_guid));
17443 0 : if (_ptr_dsa_guid) {
17444 0 : NDR_PULL_ALLOC(ndr, r->in.dsa_guid);
17445 : } else {
17446 0 : r->in.dsa_guid = NULL;
17447 : }
17448 0 : if (r->in.dsa_guid) {
17449 0 : _mem_save_dsa_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
17450 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dsa_guid, 0);
17451 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.dsa_guid));
17452 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dsa_guid_0, 0);
17453 : }
17454 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_host));
17455 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_host));
17456 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.dns_host, &size_dns_host_1));
17457 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.dns_host, &length_dns_host_1));
17458 0 : if (length_dns_host_1 > size_dns_host_1) {
17459 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_host_1, length_dns_host_1);
17460 : }
17461 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_host_1, sizeof(uint16_t)));
17462 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_host, length_dns_host_1, sizeof(uint16_t), CH_UTF16));
17463 : }
17464 0 : if (flags & NDR_OUT) {
17465 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17466 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17467 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17468 : }
17469 0 : return NDR_ERR_SUCCESS;
17470 : }
17471 :
17472 0 : _PUBLIC_ void ndr_print_netr_DsrDeregisterDNSHostRecords(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsrDeregisterDNSHostRecords *r)
17473 : {
17474 0 : ndr_print_struct(ndr, name, "netr_DsrDeregisterDNSHostRecords");
17475 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17476 0 : ndr->depth++;
17477 0 : if (flags & NDR_SET_VALUES) {
17478 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17479 : }
17480 0 : if (flags & NDR_IN) {
17481 0 : ndr_print_struct(ndr, "in", "netr_DsrDeregisterDNSHostRecords");
17482 0 : ndr->depth++;
17483 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17484 0 : ndr->depth++;
17485 0 : if (r->in.server_name) {
17486 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17487 : }
17488 0 : ndr->depth--;
17489 0 : ndr_print_ptr(ndr, "domain", r->in.domain);
17490 0 : ndr->depth++;
17491 0 : if (r->in.domain) {
17492 0 : ndr_print_string(ndr, "domain", r->in.domain);
17493 : }
17494 0 : ndr->depth--;
17495 0 : ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
17496 0 : ndr->depth++;
17497 0 : if (r->in.domain_guid) {
17498 0 : ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
17499 : }
17500 0 : ndr->depth--;
17501 0 : ndr_print_ptr(ndr, "dsa_guid", r->in.dsa_guid);
17502 0 : ndr->depth++;
17503 0 : if (r->in.dsa_guid) {
17504 0 : ndr_print_GUID(ndr, "dsa_guid", r->in.dsa_guid);
17505 : }
17506 0 : ndr->depth--;
17507 0 : ndr_print_ptr(ndr, "dns_host", r->in.dns_host);
17508 0 : ndr->depth++;
17509 0 : ndr_print_string(ndr, "dns_host", r->in.dns_host);
17510 0 : ndr->depth--;
17511 0 : ndr->depth--;
17512 : }
17513 0 : if (flags & NDR_OUT) {
17514 0 : ndr_print_struct(ndr, "out", "netr_DsrDeregisterDNSHostRecords");
17515 0 : ndr->depth++;
17516 0 : ndr_print_WERROR(ndr, "result", r->out.result);
17517 0 : ndr->depth--;
17518 : }
17519 0 : ndr->depth--;
17520 : }
17521 :
17522 54 : static enum ndr_err_code ndr_push_netr_ServerTrustPasswordsGet(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerTrustPasswordsGet *r)
17523 : {
17524 54 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17525 54 : if (flags & NDR_IN) {
17526 24 : if (r->in.account_name == NULL) {
17527 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17528 : }
17529 24 : if (r->in.computer_name == NULL) {
17530 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17531 : }
17532 24 : if (r->in.credential == NULL) {
17533 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17534 : }
17535 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17536 24 : if (r->in.server_name) {
17537 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17538 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17539 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17540 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17541 : }
17542 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
17543 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17544 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
17545 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17546 24 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
17547 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17548 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17549 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17550 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17551 24 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
17552 : }
17553 54 : if (flags & NDR_OUT) {
17554 30 : if (r->out.return_authenticator == NULL) {
17555 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17556 : }
17557 30 : if (r->out.new_owf_password == NULL) {
17558 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17559 : }
17560 30 : if (r->out.old_owf_password == NULL) {
17561 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17562 : }
17563 30 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
17564 30 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
17565 30 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
17566 30 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
17567 : }
17568 45 : return NDR_ERR_SUCCESS;
17569 : }
17570 :
17571 48 : static enum ndr_err_code ndr_pull_netr_ServerTrustPasswordsGet(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerTrustPasswordsGet *r)
17572 : {
17573 8 : uint32_t _ptr_server_name;
17574 48 : uint32_t size_server_name_1 = 0;
17575 48 : uint32_t length_server_name_1 = 0;
17576 48 : uint32_t size_account_name_1 = 0;
17577 48 : uint32_t length_account_name_1 = 0;
17578 48 : uint32_t size_computer_name_1 = 0;
17579 48 : uint32_t length_computer_name_1 = 0;
17580 48 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17581 48 : TALLOC_CTX *_mem_save_credential_0 = NULL;
17582 48 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
17583 48 : TALLOC_CTX *_mem_save_new_owf_password_0 = NULL;
17584 48 : TALLOC_CTX *_mem_save_old_owf_password_0 = NULL;
17585 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17586 48 : if (flags & NDR_IN) {
17587 24 : NDR_ZERO_STRUCT(r->out);
17588 :
17589 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17590 24 : if (_ptr_server_name) {
17591 24 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17592 : } else {
17593 0 : r->in.server_name = NULL;
17594 : }
17595 24 : if (r->in.server_name) {
17596 24 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17597 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17598 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17599 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17600 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17601 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17602 24 : if (length_server_name_1 > size_server_name_1) {
17603 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
17604 : }
17605 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17606 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17607 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17608 : }
17609 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
17610 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
17611 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
17612 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
17613 24 : if (length_account_name_1 > size_account_name_1) {
17614 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
17615 : }
17616 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
17617 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
17618 24 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
17619 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
17620 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
17621 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
17622 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
17623 24 : if (length_computer_name_1 > size_computer_name_1) {
17624 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
17625 : }
17626 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
17627 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
17628 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17629 24 : NDR_PULL_ALLOC(ndr, r->in.credential);
17630 : }
17631 24 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
17632 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
17633 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
17634 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
17635 24 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
17636 24 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
17637 24 : NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
17638 24 : NDR_ZERO_STRUCTP(r->out.new_owf_password);
17639 24 : NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
17640 24 : NDR_ZERO_STRUCTP(r->out.old_owf_password);
17641 : }
17642 48 : if (flags & NDR_OUT) {
17643 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17644 : if (r->in.credential == NULL) {
17645 : NDR_PULL_ALLOC(ndr, r->in.credential);
17646 : NDR_ZERO_STRUCTP(r->in.credential);
17647 : }
17648 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17649 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17650 6 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
17651 : }
17652 24 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
17653 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
17654 24 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
17655 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
17656 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17657 6 : NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
17658 : }
17659 24 : _mem_save_new_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
17660 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.new_owf_password, LIBNDR_FLAG_REF_ALLOC);
17661 24 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
17662 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
17663 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17664 6 : NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
17665 : }
17666 24 : _mem_save_old_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
17667 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.old_owf_password, LIBNDR_FLAG_REF_ALLOC);
17668 24 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
17669 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
17670 24 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
17671 : }
17672 40 : return NDR_ERR_SUCCESS;
17673 : }
17674 :
17675 12 : _PUBLIC_ void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerTrustPasswordsGet *r)
17676 : {
17677 12 : ndr_print_struct(ndr, name, "netr_ServerTrustPasswordsGet");
17678 12 : if (r == NULL) { ndr_print_null(ndr); return; }
17679 12 : ndr->depth++;
17680 12 : if (flags & NDR_SET_VALUES) {
17681 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17682 : }
17683 12 : if (flags & NDR_IN) {
17684 0 : ndr_print_struct(ndr, "in", "netr_ServerTrustPasswordsGet");
17685 0 : ndr->depth++;
17686 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17687 0 : ndr->depth++;
17688 0 : if (r->in.server_name) {
17689 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17690 : }
17691 0 : ndr->depth--;
17692 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
17693 0 : ndr->depth++;
17694 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
17695 0 : ndr->depth--;
17696 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
17697 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
17698 0 : ndr->depth++;
17699 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
17700 0 : ndr->depth--;
17701 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
17702 0 : ndr->depth++;
17703 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
17704 0 : ndr->depth--;
17705 0 : ndr->depth--;
17706 : }
17707 12 : if (flags & NDR_OUT) {
17708 12 : ndr_print_struct(ndr, "out", "netr_ServerTrustPasswordsGet");
17709 12 : ndr->depth++;
17710 12 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
17711 12 : ndr->depth++;
17712 12 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
17713 12 : ndr->depth--;
17714 12 : ndr_print_ptr(ndr, "new_owf_password", r->out.new_owf_password);
17715 12 : ndr->depth++;
17716 12 : ndr_print_samr_Password(ndr, "new_owf_password", r->out.new_owf_password);
17717 12 : ndr->depth--;
17718 12 : ndr_print_ptr(ndr, "old_owf_password", r->out.old_owf_password);
17719 12 : ndr->depth++;
17720 12 : ndr_print_samr_Password(ndr, "old_owf_password", r->out.old_owf_password);
17721 12 : ndr->depth--;
17722 12 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
17723 12 : ndr->depth--;
17724 : }
17725 12 : ndr->depth--;
17726 : }
17727 :
17728 370 : static enum ndr_err_code ndr_push_netr_DsRGetForestTrustInformation(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetForestTrustInformation *r)
17729 : {
17730 370 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17731 370 : if (flags & NDR_IN) {
17732 182 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17733 182 : if (r->in.server_name) {
17734 182 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17735 182 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17736 182 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17737 182 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17738 : }
17739 182 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.trusted_domain_name));
17740 182 : if (r->in.trusted_domain_name) {
17741 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16)));
17742 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17743 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16)));
17744 20 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.trusted_domain_name, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17745 : }
17746 182 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
17747 : }
17748 370 : if (flags & NDR_OUT) {
17749 188 : if (r->out.forest_trust_info == NULL) {
17750 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17751 : }
17752 188 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
17753 188 : if (*r->out.forest_trust_info) {
17754 184 : NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
17755 : }
17756 188 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17757 : }
17758 353 : return NDR_ERR_SUCCESS;
17759 : }
17760 :
17761 364 : static enum ndr_err_code ndr_pull_netr_DsRGetForestTrustInformation(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetForestTrustInformation *r)
17762 : {
17763 16 : uint32_t _ptr_server_name;
17764 364 : uint32_t size_server_name_1 = 0;
17765 364 : uint32_t length_server_name_1 = 0;
17766 16 : uint32_t _ptr_trusted_domain_name;
17767 364 : uint32_t size_trusted_domain_name_1 = 0;
17768 364 : uint32_t length_trusted_domain_name_1 = 0;
17769 16 : uint32_t _ptr_forest_trust_info;
17770 364 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17771 364 : TALLOC_CTX *_mem_save_trusted_domain_name_0 = NULL;
17772 364 : TALLOC_CTX *_mem_save_forest_trust_info_0 = NULL;
17773 364 : TALLOC_CTX *_mem_save_forest_trust_info_1 = NULL;
17774 364 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17775 364 : if (flags & NDR_IN) {
17776 182 : NDR_ZERO_STRUCT(r->out);
17777 :
17778 182 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17779 182 : if (_ptr_server_name) {
17780 182 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17781 : } else {
17782 0 : r->in.server_name = NULL;
17783 : }
17784 182 : if (r->in.server_name) {
17785 182 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17786 182 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17787 182 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17788 182 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17789 182 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17790 182 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17791 182 : if (length_server_name_1 > size_server_name_1) {
17792 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
17793 : }
17794 182 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17795 182 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17796 182 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17797 : }
17798 182 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain_name));
17799 182 : if (_ptr_trusted_domain_name) {
17800 20 : NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name);
17801 : } else {
17802 162 : r->in.trusted_domain_name = NULL;
17803 : }
17804 182 : if (r->in.trusted_domain_name) {
17805 20 : _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17806 20 : NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain_name, 0);
17807 20 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.trusted_domain_name));
17808 20 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.trusted_domain_name));
17809 20 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.trusted_domain_name, &size_trusted_domain_name_1));
17810 20 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.trusted_domain_name, &length_trusted_domain_name_1));
17811 20 : if (length_trusted_domain_name_1 > size_trusted_domain_name_1) {
17812 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_trusted_domain_name_1, length_trusted_domain_name_1);
17813 : }
17814 20 : NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_domain_name_1, sizeof(uint16_t)));
17815 20 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.trusted_domain_name, length_trusted_domain_name_1, sizeof(uint16_t), CH_UTF16));
17816 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, 0);
17817 : }
17818 182 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
17819 182 : NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
17820 182 : NDR_ZERO_STRUCTP(r->out.forest_trust_info);
17821 : }
17822 364 : if (flags & NDR_OUT) {
17823 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17824 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17825 182 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17826 164 : NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
17827 : }
17828 182 : _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17829 182 : NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
17830 182 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
17831 182 : if (_ptr_forest_trust_info) {
17832 178 : NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
17833 : } else {
17834 4 : *r->out.forest_trust_info = NULL;
17835 : }
17836 182 : if (*r->out.forest_trust_info) {
17837 178 : _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
17838 178 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
17839 178 : NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
17840 178 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
17841 : }
17842 182 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
17843 182 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17844 : }
17845 348 : return NDR_ERR_SUCCESS;
17846 : }
17847 :
17848 12 : _PUBLIC_ void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetForestTrustInformation *r)
17849 : {
17850 12 : ndr_print_struct(ndr, name, "netr_DsRGetForestTrustInformation");
17851 12 : if (r == NULL) { ndr_print_null(ndr); return; }
17852 12 : ndr->depth++;
17853 12 : if (flags & NDR_SET_VALUES) {
17854 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17855 : }
17856 12 : if (flags & NDR_IN) {
17857 0 : ndr_print_struct(ndr, "in", "netr_DsRGetForestTrustInformation");
17858 0 : ndr->depth++;
17859 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17860 0 : ndr->depth++;
17861 0 : if (r->in.server_name) {
17862 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17863 : }
17864 0 : ndr->depth--;
17865 0 : ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name);
17866 0 : ndr->depth++;
17867 0 : if (r->in.trusted_domain_name) {
17868 0 : ndr_print_string(ndr, "trusted_domain_name", r->in.trusted_domain_name);
17869 : }
17870 0 : ndr->depth--;
17871 0 : ndr_print_uint32(ndr, "flags", r->in.flags);
17872 0 : ndr->depth--;
17873 : }
17874 12 : if (flags & NDR_OUT) {
17875 12 : ndr_print_struct(ndr, "out", "netr_DsRGetForestTrustInformation");
17876 12 : ndr->depth++;
17877 12 : ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
17878 12 : ndr->depth++;
17879 12 : ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
17880 12 : ndr->depth++;
17881 12 : if (*r->out.forest_trust_info) {
17882 12 : ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
17883 : }
17884 12 : ndr->depth--;
17885 12 : ndr->depth--;
17886 12 : ndr_print_WERROR(ndr, "result", r->out.result);
17887 12 : ndr->depth--;
17888 : }
17889 12 : ndr->depth--;
17890 : }
17891 :
17892 83 : static enum ndr_err_code ndr_push_netr_GetForestTrustInformation(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_GetForestTrustInformation *r)
17893 : {
17894 83 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17895 83 : if (flags & NDR_IN) {
17896 28 : if (r->in.computer_name == NULL) {
17897 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17898 : }
17899 28 : if (r->in.credential == NULL) {
17900 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17901 : }
17902 28 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17903 28 : if (r->in.server_name) {
17904 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17905 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17906 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17907 28 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17908 : }
17909 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17910 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17911 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17912 28 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17913 28 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
17914 28 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
17915 : }
17916 83 : if (flags & NDR_OUT) {
17917 55 : if (r->out.return_authenticator == NULL) {
17918 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17919 : }
17920 55 : if (r->out.forest_trust_info == NULL) {
17921 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17922 : }
17923 55 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
17924 55 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
17925 55 : if (*r->out.forest_trust_info) {
17926 25 : NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
17927 : }
17928 55 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
17929 : }
17930 74 : return NDR_ERR_SUCCESS;
17931 : }
17932 :
17933 76 : static enum ndr_err_code ndr_pull_netr_GetForestTrustInformation(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_GetForestTrustInformation *r)
17934 : {
17935 8 : uint32_t _ptr_server_name;
17936 76 : uint32_t size_server_name_1 = 0;
17937 76 : uint32_t length_server_name_1 = 0;
17938 76 : uint32_t size_computer_name_1 = 0;
17939 76 : uint32_t length_computer_name_1 = 0;
17940 8 : uint32_t _ptr_forest_trust_info;
17941 76 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17942 76 : TALLOC_CTX *_mem_save_credential_0 = NULL;
17943 76 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
17944 76 : TALLOC_CTX *_mem_save_forest_trust_info_0 = NULL;
17945 76 : TALLOC_CTX *_mem_save_forest_trust_info_1 = NULL;
17946 76 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17947 76 : if (flags & NDR_IN) {
17948 48 : NDR_ZERO_STRUCT(r->out);
17949 :
17950 48 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17951 48 : if (_ptr_server_name) {
17952 48 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17953 : } else {
17954 0 : r->in.server_name = NULL;
17955 : }
17956 48 : if (r->in.server_name) {
17957 48 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17958 48 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17959 48 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17960 48 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17961 48 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17962 48 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17963 48 : if (length_server_name_1 > size_server_name_1) {
17964 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
17965 : }
17966 48 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17967 48 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17968 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17969 : }
17970 48 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
17971 48 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
17972 48 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
17973 48 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
17974 48 : if (length_computer_name_1 > size_computer_name_1) {
17975 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
17976 : }
17977 48 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
17978 48 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
17979 48 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17980 48 : NDR_PULL_ALLOC(ndr, r->in.credential);
17981 : }
17982 48 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
17983 48 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
17984 48 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
17985 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
17986 48 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
17987 48 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
17988 48 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
17989 48 : NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
17990 48 : NDR_ZERO_STRUCTP(r->out.forest_trust_info);
17991 : }
17992 76 : if (flags & NDR_OUT) {
17993 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17994 : if (r->in.credential == NULL) {
17995 : NDR_PULL_ALLOC(ndr, r->in.credential);
17996 : NDR_ZERO_STRUCTP(r->in.credential);
17997 : }
17998 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17999 28 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18000 7 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18001 : }
18002 28 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18003 28 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
18004 28 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18005 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
18006 28 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18007 7 : NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
18008 : }
18009 28 : _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
18010 28 : NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
18011 28 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
18012 28 : if (_ptr_forest_trust_info) {
18013 4 : NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
18014 : } else {
18015 24 : *r->out.forest_trust_info = NULL;
18016 : }
18017 28 : if (*r->out.forest_trust_info) {
18018 4 : _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
18019 4 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
18020 4 : NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
18021 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
18022 : }
18023 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
18024 28 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18025 : }
18026 68 : return NDR_ERR_SUCCESS;
18027 : }
18028 :
18029 14 : _PUBLIC_ void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_GetForestTrustInformation *r)
18030 : {
18031 14 : ndr_print_struct(ndr, name, "netr_GetForestTrustInformation");
18032 14 : if (r == NULL) { ndr_print_null(ndr); return; }
18033 14 : ndr->depth++;
18034 14 : if (flags & NDR_SET_VALUES) {
18035 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18036 : }
18037 14 : if (flags & NDR_IN) {
18038 0 : ndr_print_struct(ndr, "in", "netr_GetForestTrustInformation");
18039 0 : ndr->depth++;
18040 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
18041 0 : ndr->depth++;
18042 0 : if (r->in.server_name) {
18043 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
18044 : }
18045 0 : ndr->depth--;
18046 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
18047 0 : ndr->depth++;
18048 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
18049 0 : ndr->depth--;
18050 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
18051 0 : ndr->depth++;
18052 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
18053 0 : ndr->depth--;
18054 0 : ndr_print_uint32(ndr, "flags", r->in.flags);
18055 0 : ndr->depth--;
18056 : }
18057 14 : if (flags & NDR_OUT) {
18058 14 : ndr_print_struct(ndr, "out", "netr_GetForestTrustInformation");
18059 14 : ndr->depth++;
18060 14 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
18061 14 : ndr->depth++;
18062 14 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
18063 14 : ndr->depth--;
18064 14 : ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
18065 14 : ndr->depth++;
18066 14 : ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
18067 14 : ndr->depth++;
18068 14 : if (*r->out.forest_trust_info) {
18069 2 : ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
18070 : }
18071 14 : ndr->depth--;
18072 14 : ndr->depth--;
18073 14 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18074 14 : ndr->depth--;
18075 : }
18076 14 : ndr->depth--;
18077 : }
18078 :
18079 4162 : static enum ndr_err_code ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonSamLogonWithFlags *r)
18080 : {
18081 4162 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
18082 4162 : if (flags & NDR_IN) {
18083 2081 : if (r->in.logon == NULL) {
18084 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18085 : }
18086 2081 : if (r->in.flags == NULL) {
18087 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18088 : }
18089 2081 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
18090 2081 : if (r->in.server_name) {
18091 2081 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18092 2081 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18093 2081 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18094 2081 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18095 : }
18096 2081 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
18097 2081 : if (r->in.computer_name) {
18098 2081 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18099 2081 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18100 2081 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18101 2081 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18102 : }
18103 2081 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
18104 2081 : if (r->in.credential) {
18105 2081 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18106 : }
18107 2081 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
18108 2081 : if (r->in.return_authenticator) {
18109 2081 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
18110 : }
18111 2081 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
18112 2081 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
18113 2081 : NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
18114 2081 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
18115 2081 : NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->in.flags));
18116 : }
18117 4162 : if (flags & NDR_OUT) {
18118 2081 : if (r->out.validation == NULL) {
18119 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18120 : }
18121 2081 : if (r->out.authoritative == NULL) {
18122 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18123 : }
18124 2081 : if (r->out.flags == NULL) {
18125 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18126 : }
18127 2081 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
18128 2081 : if (r->out.return_authenticator) {
18129 2081 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18130 : }
18131 2081 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
18132 2081 : NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
18133 2081 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
18134 2081 : NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->out.flags));
18135 2081 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
18136 : }
18137 4162 : return NDR_ERR_SUCCESS;
18138 : }
18139 :
18140 4162 : static enum ndr_err_code ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonSamLogonWithFlags *r)
18141 : {
18142 0 : uint32_t _ptr_server_name;
18143 4162 : uint32_t size_server_name_1 = 0;
18144 4162 : uint32_t length_server_name_1 = 0;
18145 0 : uint32_t _ptr_computer_name;
18146 4162 : uint32_t size_computer_name_1 = 0;
18147 4162 : uint32_t length_computer_name_1 = 0;
18148 0 : uint32_t _ptr_credential;
18149 0 : uint32_t _ptr_return_authenticator;
18150 4162 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
18151 4162 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
18152 4162 : TALLOC_CTX *_mem_save_credential_0 = NULL;
18153 4162 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
18154 4162 : TALLOC_CTX *_mem_save_logon_0 = NULL;
18155 4162 : TALLOC_CTX *_mem_save_validation_0 = NULL;
18156 4162 : TALLOC_CTX *_mem_save_authoritative_0 = NULL;
18157 4162 : TALLOC_CTX *_mem_save_flags_0 = NULL;
18158 4162 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
18159 4162 : if (flags & NDR_IN) {
18160 2081 : NDR_ZERO_STRUCT(r->out);
18161 :
18162 2081 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
18163 2081 : if (_ptr_server_name) {
18164 2081 : NDR_PULL_ALLOC(ndr, r->in.server_name);
18165 : } else {
18166 0 : r->in.server_name = NULL;
18167 : }
18168 2081 : if (r->in.server_name) {
18169 2081 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18170 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
18171 2081 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
18172 2081 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
18173 2081 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
18174 2081 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
18175 2081 : if (length_server_name_1 > size_server_name_1) {
18176 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
18177 : }
18178 2081 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
18179 2081 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
18180 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
18181 : }
18182 2081 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
18183 2081 : if (_ptr_computer_name) {
18184 2081 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
18185 : } else {
18186 0 : r->in.computer_name = NULL;
18187 : }
18188 2081 : if (r->in.computer_name) {
18189 2081 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18190 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
18191 2081 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
18192 2081 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
18193 2081 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
18194 2081 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
18195 2081 : if (length_computer_name_1 > size_computer_name_1) {
18196 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
18197 : }
18198 2081 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
18199 2081 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
18200 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
18201 : }
18202 2081 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
18203 2081 : if (_ptr_credential) {
18204 2081 : NDR_PULL_ALLOC(ndr, r->in.credential);
18205 : } else {
18206 0 : r->in.credential = NULL;
18207 : }
18208 2081 : if (r->in.credential) {
18209 2081 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
18210 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
18211 2081 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18212 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
18213 : }
18214 2081 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
18215 2081 : if (_ptr_return_authenticator) {
18216 2081 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
18217 : } else {
18218 0 : r->in.return_authenticator = NULL;
18219 : }
18220 2081 : if (r->in.return_authenticator) {
18221 2081 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18222 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
18223 2081 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
18224 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
18225 : }
18226 2081 : NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
18227 2081 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18228 2081 : NDR_PULL_ALLOC(ndr, r->in.logon);
18229 : }
18230 2081 : _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
18231 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
18232 2081 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
18233 2081 : NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
18234 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
18235 2081 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
18236 2081 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18237 2081 : NDR_PULL_ALLOC(ndr, r->in.flags);
18238 : }
18239 2081 : _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
18240 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->in.flags, LIBNDR_FLAG_REF_ALLOC);
18241 2081 : NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->in.flags));
18242 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
18243 2081 : NDR_PULL_ALLOC(ndr, r->out.validation);
18244 2081 : NDR_ZERO_STRUCTP(r->out.validation);
18245 2081 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
18246 2081 : NDR_ZERO_STRUCTP(r->out.authoritative);
18247 2081 : NDR_PULL_ALLOC(ndr, r->out.flags);
18248 2081 : *r->out.flags = *r->in.flags;
18249 : }
18250 4162 : if (flags & NDR_OUT) {
18251 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
18252 : if (r->in.logon == NULL) {
18253 : NDR_PULL_ALLOC(ndr, r->in.logon);
18254 : NDR_ZERO_STRUCTP(r->in.logon);
18255 : }
18256 : if (r->in.flags == NULL) {
18257 : NDR_PULL_ALLOC(ndr, r->in.flags);
18258 : NDR_ZERO_STRUCTP(r->in.flags);
18259 : }
18260 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
18261 2081 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
18262 2081 : if (_ptr_return_authenticator) {
18263 2081 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18264 : } else {
18265 0 : r->out.return_authenticator = NULL;
18266 : }
18267 2081 : if (r->out.return_authenticator) {
18268 2081 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18269 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
18270 2081 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18271 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
18272 : }
18273 2081 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18274 22 : NDR_PULL_ALLOC(ndr, r->out.validation);
18275 : }
18276 2081 : _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
18277 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
18278 2081 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
18279 2081 : NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
18280 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
18281 2081 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18282 22 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
18283 : }
18284 2081 : _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
18285 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
18286 2081 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
18287 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
18288 2081 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18289 22 : NDR_PULL_ALLOC(ndr, r->out.flags);
18290 : }
18291 2081 : _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
18292 2081 : NDR_PULL_SET_MEM_CTX(ndr, r->out.flags, LIBNDR_FLAG_REF_ALLOC);
18293 2081 : NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->out.flags));
18294 2081 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
18295 2081 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18296 : }
18297 4162 : return NDR_ERR_SUCCESS;
18298 : }
18299 :
18300 0 : _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonSamLogonWithFlags *r)
18301 : {
18302 0 : ndr_print_struct(ndr, name, "netr_LogonSamLogonWithFlags");
18303 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18304 0 : ndr->depth++;
18305 0 : if (flags & NDR_SET_VALUES) {
18306 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18307 : }
18308 0 : if (flags & NDR_IN) {
18309 0 : ndr_print_struct(ndr, "in", "netr_LogonSamLogonWithFlags");
18310 0 : ndr->depth++;
18311 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
18312 0 : ndr->depth++;
18313 0 : if (r->in.server_name) {
18314 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
18315 : }
18316 0 : ndr->depth--;
18317 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
18318 0 : ndr->depth++;
18319 0 : if (r->in.computer_name) {
18320 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
18321 : }
18322 0 : ndr->depth--;
18323 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
18324 0 : ndr->depth++;
18325 0 : if (r->in.credential) {
18326 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
18327 : }
18328 0 : ndr->depth--;
18329 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
18330 0 : ndr->depth++;
18331 0 : if (r->in.return_authenticator) {
18332 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
18333 : }
18334 0 : ndr->depth--;
18335 0 : ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
18336 0 : ndr_print_ptr(ndr, "logon", r->in.logon);
18337 0 : ndr->depth++;
18338 0 : ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
18339 0 : ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
18340 0 : ndr->depth--;
18341 0 : ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
18342 0 : ndr_print_ptr(ndr, "flags", r->in.flags);
18343 0 : ndr->depth++;
18344 0 : ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->in.flags);
18345 0 : ndr->depth--;
18346 0 : ndr->depth--;
18347 : }
18348 0 : if (flags & NDR_OUT) {
18349 0 : ndr_print_struct(ndr, "out", "netr_LogonSamLogonWithFlags");
18350 0 : ndr->depth++;
18351 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
18352 0 : ndr->depth++;
18353 0 : if (r->out.return_authenticator) {
18354 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
18355 : }
18356 0 : ndr->depth--;
18357 0 : ndr_print_ptr(ndr, "validation", r->out.validation);
18358 0 : ndr->depth++;
18359 0 : ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
18360 0 : ndr_print_netr_Validation(ndr, "validation", r->out.validation);
18361 0 : ndr->depth--;
18362 0 : ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
18363 0 : ndr->depth++;
18364 0 : ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
18365 0 : ndr->depth--;
18366 0 : ndr_print_ptr(ndr, "flags", r->out.flags);
18367 0 : ndr->depth++;
18368 0 : ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->out.flags);
18369 0 : ndr->depth--;
18370 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18371 0 : ndr->depth--;
18372 : }
18373 0 : ndr->depth--;
18374 : }
18375 :
18376 164 : static enum ndr_err_code ndr_push_netr_ServerGetTrustInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerGetTrustInfo *r)
18377 : {
18378 164 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
18379 164 : if (flags & NDR_IN) {
18380 52 : if (r->in.account_name == NULL) {
18381 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18382 : }
18383 52 : if (r->in.computer_name == NULL) {
18384 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18385 : }
18386 52 : if (r->in.credential == NULL) {
18387 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18388 : }
18389 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
18390 52 : if (r->in.server_name) {
18391 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18392 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18393 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18394 52 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18395 : }
18396 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
18397 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18398 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
18399 52 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18400 52 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
18401 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18402 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18403 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18404 52 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18405 52 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18406 : }
18407 164 : if (flags & NDR_OUT) {
18408 112 : if (r->out.return_authenticator == NULL) {
18409 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18410 : }
18411 112 : if (r->out.new_owf_password == NULL) {
18412 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18413 : }
18414 112 : if (r->out.old_owf_password == NULL) {
18415 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18416 : }
18417 112 : if (r->out.trust_info == NULL) {
18418 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18419 : }
18420 112 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18421 112 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
18422 112 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
18423 112 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.trust_info));
18424 112 : if (*r->out.trust_info) {
18425 52 : NDR_CHECK(ndr_push_netr_TrustInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trust_info));
18426 : }
18427 112 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
18428 : }
18429 146 : return NDR_ERR_SUCCESS;
18430 : }
18431 :
18432 151 : static enum ndr_err_code ndr_pull_netr_ServerGetTrustInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerGetTrustInfo *r)
18433 : {
18434 16 : uint32_t _ptr_server_name;
18435 151 : uint32_t size_server_name_1 = 0;
18436 151 : uint32_t length_server_name_1 = 0;
18437 151 : uint32_t size_account_name_1 = 0;
18438 151 : uint32_t length_account_name_1 = 0;
18439 151 : uint32_t size_computer_name_1 = 0;
18440 151 : uint32_t length_computer_name_1 = 0;
18441 16 : uint32_t _ptr_trust_info;
18442 151 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
18443 151 : TALLOC_CTX *_mem_save_credential_0 = NULL;
18444 151 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
18445 151 : TALLOC_CTX *_mem_save_new_owf_password_0 = NULL;
18446 151 : TALLOC_CTX *_mem_save_old_owf_password_0 = NULL;
18447 151 : TALLOC_CTX *_mem_save_trust_info_0 = NULL;
18448 151 : TALLOC_CTX *_mem_save_trust_info_1 = NULL;
18449 151 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
18450 151 : if (flags & NDR_IN) {
18451 99 : NDR_ZERO_STRUCT(r->out);
18452 :
18453 99 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
18454 99 : if (_ptr_server_name) {
18455 99 : NDR_PULL_ALLOC(ndr, r->in.server_name);
18456 : } else {
18457 0 : r->in.server_name = NULL;
18458 : }
18459 99 : if (r->in.server_name) {
18460 99 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18461 99 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
18462 99 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
18463 99 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
18464 99 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
18465 99 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
18466 99 : if (length_server_name_1 > size_server_name_1) {
18467 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
18468 : }
18469 99 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
18470 99 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
18471 99 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
18472 : }
18473 99 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
18474 99 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
18475 99 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
18476 99 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
18477 99 : if (length_account_name_1 > size_account_name_1) {
18478 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
18479 : }
18480 99 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
18481 99 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
18482 99 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
18483 99 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
18484 99 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
18485 99 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
18486 99 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
18487 99 : if (length_computer_name_1 > size_computer_name_1) {
18488 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
18489 : }
18490 99 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
18491 99 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
18492 99 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18493 99 : NDR_PULL_ALLOC(ndr, r->in.credential);
18494 : }
18495 99 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
18496 99 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
18497 99 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18498 99 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
18499 99 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18500 99 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
18501 99 : NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
18502 99 : NDR_ZERO_STRUCTP(r->out.new_owf_password);
18503 99 : NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
18504 99 : NDR_ZERO_STRUCTP(r->out.old_owf_password);
18505 99 : NDR_PULL_ALLOC(ndr, r->out.trust_info);
18506 99 : NDR_ZERO_STRUCTP(r->out.trust_info);
18507 : }
18508 151 : if (flags & NDR_OUT) {
18509 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
18510 : if (r->in.credential == NULL) {
18511 : NDR_PULL_ALLOC(ndr, r->in.credential);
18512 : NDR_ZERO_STRUCTP(r->in.credential);
18513 : }
18514 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
18515 52 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18516 13 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18517 : }
18518 52 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18519 52 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
18520 52 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18521 52 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
18522 52 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18523 13 : NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
18524 : }
18525 52 : _mem_save_new_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
18526 52 : NDR_PULL_SET_MEM_CTX(ndr, r->out.new_owf_password, LIBNDR_FLAG_REF_ALLOC);
18527 52 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
18528 52 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
18529 52 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18530 13 : NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
18531 : }
18532 52 : _mem_save_old_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
18533 52 : NDR_PULL_SET_MEM_CTX(ndr, r->out.old_owf_password, LIBNDR_FLAG_REF_ALLOC);
18534 52 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
18535 52 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
18536 52 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18537 13 : NDR_PULL_ALLOC(ndr, r->out.trust_info);
18538 : }
18539 52 : _mem_save_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
18540 52 : NDR_PULL_SET_MEM_CTX(ndr, r->out.trust_info, LIBNDR_FLAG_REF_ALLOC);
18541 52 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trust_info));
18542 52 : if (_ptr_trust_info) {
18543 4 : NDR_PULL_ALLOC(ndr, *r->out.trust_info);
18544 : } else {
18545 48 : *r->out.trust_info = NULL;
18546 : }
18547 52 : if (*r->out.trust_info) {
18548 4 : _mem_save_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
18549 4 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.trust_info, 0);
18550 4 : NDR_CHECK(ndr_pull_netr_TrustInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trust_info));
18551 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trust_info_1, 0);
18552 : }
18553 52 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
18554 52 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18555 : }
18556 135 : return NDR_ERR_SUCCESS;
18557 : }
18558 :
18559 26 : _PUBLIC_ void ndr_print_netr_ServerGetTrustInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerGetTrustInfo *r)
18560 : {
18561 26 : ndr_print_struct(ndr, name, "netr_ServerGetTrustInfo");
18562 26 : if (r == NULL) { ndr_print_null(ndr); return; }
18563 26 : ndr->depth++;
18564 26 : if (flags & NDR_SET_VALUES) {
18565 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18566 : }
18567 26 : if (flags & NDR_IN) {
18568 0 : ndr_print_struct(ndr, "in", "netr_ServerGetTrustInfo");
18569 0 : ndr->depth++;
18570 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
18571 0 : ndr->depth++;
18572 0 : if (r->in.server_name) {
18573 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
18574 : }
18575 0 : ndr->depth--;
18576 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
18577 0 : ndr->depth++;
18578 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
18579 0 : ndr->depth--;
18580 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
18581 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
18582 0 : ndr->depth++;
18583 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
18584 0 : ndr->depth--;
18585 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
18586 0 : ndr->depth++;
18587 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
18588 0 : ndr->depth--;
18589 0 : ndr->depth--;
18590 : }
18591 26 : if (flags & NDR_OUT) {
18592 26 : ndr_print_struct(ndr, "out", "netr_ServerGetTrustInfo");
18593 26 : ndr->depth++;
18594 26 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
18595 26 : ndr->depth++;
18596 26 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
18597 26 : ndr->depth--;
18598 26 : ndr_print_ptr(ndr, "new_owf_password", r->out.new_owf_password);
18599 26 : ndr->depth++;
18600 26 : ndr_print_samr_Password(ndr, "new_owf_password", r->out.new_owf_password);
18601 26 : ndr->depth--;
18602 26 : ndr_print_ptr(ndr, "old_owf_password", r->out.old_owf_password);
18603 26 : ndr->depth++;
18604 26 : ndr_print_samr_Password(ndr, "old_owf_password", r->out.old_owf_password);
18605 26 : ndr->depth--;
18606 26 : ndr_print_ptr(ndr, "trust_info", r->out.trust_info);
18607 26 : ndr->depth++;
18608 26 : ndr_print_ptr(ndr, "trust_info", *r->out.trust_info);
18609 26 : ndr->depth++;
18610 26 : if (*r->out.trust_info) {
18611 2 : ndr_print_netr_TrustInfo(ndr, "trust_info", *r->out.trust_info);
18612 : }
18613 26 : ndr->depth--;
18614 26 : ndr->depth--;
18615 26 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18616 26 : ndr->depth--;
18617 : }
18618 26 : ndr->depth--;
18619 : }
18620 :
18621 0 : static enum ndr_err_code ndr_push_netr_Unused47(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_Unused47 *r)
18622 : {
18623 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
18624 0 : if (flags & NDR_IN) {
18625 0 : }
18626 0 : if (flags & NDR_OUT) {
18627 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
18628 : }
18629 0 : return NDR_ERR_SUCCESS;
18630 : }
18631 :
18632 0 : static enum ndr_err_code ndr_pull_netr_Unused47(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_Unused47 *r)
18633 : {
18634 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
18635 0 : if (flags & NDR_IN) {
18636 0 : }
18637 0 : if (flags & NDR_OUT) {
18638 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
18639 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
18640 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18641 : }
18642 0 : return NDR_ERR_SUCCESS;
18643 : }
18644 :
18645 0 : _PUBLIC_ void ndr_print_netr_Unused47(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_Unused47 *r)
18646 : {
18647 0 : ndr_print_struct(ndr, name, "netr_Unused47");
18648 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18649 0 : ndr->depth++;
18650 0 : if (flags & NDR_SET_VALUES) {
18651 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18652 : }
18653 0 : if (flags & NDR_IN) {
18654 0 : ndr_print_struct(ndr, "in", "netr_Unused47");
18655 0 : ndr->depth++;
18656 0 : ndr->depth--;
18657 : }
18658 0 : if (flags & NDR_OUT) {
18659 0 : ndr_print_struct(ndr, "out", "netr_Unused47");
18660 0 : ndr->depth++;
18661 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18662 0 : ndr->depth--;
18663 : }
18664 0 : ndr->depth--;
18665 : }
18666 :
18667 5 : static enum ndr_err_code ndr_push_netr_DsrUpdateReadOnlyServerDnsRecords(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
18668 : {
18669 5 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
18670 5 : if (flags & NDR_IN) {
18671 0 : if (r->in.computer_name == NULL) {
18672 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18673 : }
18674 0 : if (r->in.credential == NULL) {
18675 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18676 : }
18677 0 : if (r->in.dns_names == NULL) {
18678 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18679 : }
18680 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
18681 0 : if (r->in.server_name) {
18682 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18683 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18684 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18685 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18686 : }
18687 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18688 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18689 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18690 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18691 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18692 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
18693 0 : if (r->in.site_name) {
18694 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
18695 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18696 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
18697 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18698 : }
18699 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dns_ttl));
18700 0 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dns_names));
18701 : }
18702 5 : if (flags & NDR_OUT) {
18703 5 : if (r->out.return_authenticator == NULL) {
18704 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18705 : }
18706 5 : if (r->out.dns_names == NULL) {
18707 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18708 : }
18709 5 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18710 5 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dns_names));
18711 5 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
18712 : }
18713 5 : return NDR_ERR_SUCCESS;
18714 : }
18715 :
18716 5 : static enum ndr_err_code ndr_pull_netr_DsrUpdateReadOnlyServerDnsRecords(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
18717 : {
18718 0 : uint32_t _ptr_server_name;
18719 5 : uint32_t size_server_name_1 = 0;
18720 5 : uint32_t length_server_name_1 = 0;
18721 5 : uint32_t size_computer_name_1 = 0;
18722 5 : uint32_t length_computer_name_1 = 0;
18723 0 : uint32_t _ptr_site_name;
18724 5 : uint32_t size_site_name_1 = 0;
18725 5 : uint32_t length_site_name_1 = 0;
18726 5 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
18727 5 : TALLOC_CTX *_mem_save_credential_0 = NULL;
18728 5 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
18729 5 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
18730 5 : TALLOC_CTX *_mem_save_dns_names_0 = NULL;
18731 5 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
18732 5 : if (flags & NDR_IN) {
18733 5 : NDR_ZERO_STRUCT(r->out);
18734 :
18735 5 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
18736 5 : if (_ptr_server_name) {
18737 5 : NDR_PULL_ALLOC(ndr, r->in.server_name);
18738 : } else {
18739 0 : r->in.server_name = NULL;
18740 : }
18741 5 : if (r->in.server_name) {
18742 5 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18743 5 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
18744 5 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
18745 5 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
18746 5 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
18747 5 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
18748 5 : if (length_server_name_1 > size_server_name_1) {
18749 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
18750 : }
18751 5 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
18752 5 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
18753 5 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
18754 : }
18755 5 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
18756 5 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
18757 5 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
18758 5 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
18759 5 : if (length_computer_name_1 > size_computer_name_1) {
18760 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
18761 : }
18762 5 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
18763 5 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
18764 5 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18765 5 : NDR_PULL_ALLOC(ndr, r->in.credential);
18766 : }
18767 5 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
18768 5 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
18769 5 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18770 5 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
18771 5 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
18772 5 : if (_ptr_site_name) {
18773 5 : NDR_PULL_ALLOC(ndr, r->in.site_name);
18774 : } else {
18775 0 : r->in.site_name = NULL;
18776 : }
18777 5 : if (r->in.site_name) {
18778 5 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18779 5 : NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
18780 5 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
18781 5 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
18782 5 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
18783 5 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
18784 5 : if (length_site_name_1 > size_site_name_1) {
18785 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
18786 : }
18787 5 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
18788 5 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
18789 5 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
18790 : }
18791 5 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dns_ttl));
18792 5 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18793 5 : NDR_PULL_ALLOC(ndr, r->in.dns_names);
18794 : }
18795 5 : _mem_save_dns_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
18796 5 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dns_names, LIBNDR_FLAG_REF_ALLOC);
18797 5 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dns_names));
18798 5 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_names_0, LIBNDR_FLAG_REF_ALLOC);
18799 5 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18800 5 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
18801 5 : NDR_PULL_ALLOC(ndr, r->out.dns_names);
18802 5 : *r->out.dns_names = *r->in.dns_names;
18803 : }
18804 5 : if (flags & NDR_OUT) {
18805 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
18806 : if (r->in.credential == NULL) {
18807 : NDR_PULL_ALLOC(ndr, r->in.credential);
18808 : NDR_ZERO_STRUCTP(r->in.credential);
18809 : }
18810 : if (r->in.dns_names == NULL) {
18811 : NDR_PULL_ALLOC(ndr, r->in.dns_names);
18812 : NDR_ZERO_STRUCTP(r->in.dns_names);
18813 : }
18814 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
18815 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18816 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18817 : }
18818 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18819 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
18820 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18821 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
18822 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18823 0 : NDR_PULL_ALLOC(ndr, r->out.dns_names);
18824 : }
18825 0 : _mem_save_dns_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
18826 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dns_names, LIBNDR_FLAG_REF_ALLOC);
18827 0 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dns_names));
18828 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_names_0, LIBNDR_FLAG_REF_ALLOC);
18829 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18830 : }
18831 5 : return NDR_ERR_SUCCESS;
18832 : }
18833 :
18834 0 : _PUBLIC_ void ndr_print_netr_DsrUpdateReadOnlyServerDnsRecords(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
18835 : {
18836 0 : ndr_print_struct(ndr, name, "netr_DsrUpdateReadOnlyServerDnsRecords");
18837 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18838 0 : ndr->depth++;
18839 0 : if (flags & NDR_SET_VALUES) {
18840 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18841 : }
18842 0 : if (flags & NDR_IN) {
18843 0 : ndr_print_struct(ndr, "in", "netr_DsrUpdateReadOnlyServerDnsRecords");
18844 0 : ndr->depth++;
18845 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
18846 0 : ndr->depth++;
18847 0 : if (r->in.server_name) {
18848 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
18849 : }
18850 0 : ndr->depth--;
18851 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
18852 0 : ndr->depth++;
18853 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
18854 0 : ndr->depth--;
18855 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
18856 0 : ndr->depth++;
18857 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
18858 0 : ndr->depth--;
18859 0 : ndr_print_ptr(ndr, "site_name", r->in.site_name);
18860 0 : ndr->depth++;
18861 0 : if (r->in.site_name) {
18862 0 : ndr_print_string(ndr, "site_name", r->in.site_name);
18863 : }
18864 0 : ndr->depth--;
18865 0 : ndr_print_uint32(ndr, "dns_ttl", r->in.dns_ttl);
18866 0 : ndr_print_ptr(ndr, "dns_names", r->in.dns_names);
18867 0 : ndr->depth++;
18868 0 : ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, "dns_names", r->in.dns_names);
18869 0 : ndr->depth--;
18870 0 : ndr->depth--;
18871 : }
18872 0 : if (flags & NDR_OUT) {
18873 0 : ndr_print_struct(ndr, "out", "netr_DsrUpdateReadOnlyServerDnsRecords");
18874 0 : ndr->depth++;
18875 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
18876 0 : ndr->depth++;
18877 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
18878 0 : ndr->depth--;
18879 0 : ndr_print_ptr(ndr, "dns_names", r->out.dns_names);
18880 0 : ndr->depth++;
18881 0 : ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, "dns_names", r->out.dns_names);
18882 0 : ndr->depth--;
18883 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18884 0 : ndr->depth--;
18885 : }
18886 0 : ndr->depth--;
18887 : }
18888 :
18889 : #ifndef SKIP_NDR_TABLE_netlogon
18890 : static const struct ndr_interface_public_struct netlogon_public_structs[] = {
18891 : {
18892 : .name = "netr_AcctLockStr",
18893 : .struct_size = sizeof(struct netr_AcctLockStr ),
18894 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_AcctLockStr,
18895 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_AcctLockStr,
18896 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_AcctLockStr,
18897 : },
18898 : {
18899 : .name = "netr_UserSessionKey",
18900 : .struct_size = sizeof(struct netr_UserSessionKey ),
18901 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_UserSessionKey,
18902 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_UserSessionKey,
18903 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_UserSessionKey,
18904 : },
18905 : {
18906 : .name = "netr_LMSessionKey",
18907 : .struct_size = sizeof(struct netr_LMSessionKey ),
18908 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_LMSessionKey,
18909 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_LMSessionKey,
18910 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_LMSessionKey,
18911 : },
18912 : {
18913 : .name = "netr_SidAttr",
18914 : .struct_size = sizeof(struct netr_SidAttr ),
18915 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SidAttr,
18916 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_SidAttr,
18917 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_SidAttr,
18918 : },
18919 : {
18920 : .name = "netr_SamInfo3",
18921 : .struct_size = sizeof(struct netr_SamInfo3 ),
18922 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SamInfo3,
18923 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_SamInfo3,
18924 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_SamInfo3,
18925 : },
18926 : {
18927 : .name = "netr_Credential",
18928 : .struct_size = sizeof(struct netr_Credential ),
18929 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_Credential,
18930 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_Credential,
18931 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_Credential,
18932 : },
18933 : {
18934 : .name = "netlogon_server_pipe_state",
18935 : .struct_size = sizeof(struct netlogon_server_pipe_state ),
18936 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netlogon_server_pipe_state,
18937 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netlogon_server_pipe_state,
18938 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netlogon_server_pipe_state,
18939 : },
18940 : {
18941 : .name = "netr_Authenticator",
18942 : .struct_size = sizeof(struct netr_Authenticator ),
18943 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_Authenticator,
18944 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_Authenticator,
18945 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_Authenticator,
18946 : },
18947 : {
18948 : .name = "netr_USER_KEYS",
18949 : .struct_size = sizeof(struct netr_USER_KEYS ),
18950 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_USER_KEYS,
18951 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_USER_KEYS,
18952 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_USER_KEYS,
18953 : },
18954 : {
18955 : .name = "netr_ChangeLogEntry",
18956 : .struct_size = sizeof(struct netr_ChangeLogEntry ),
18957 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_ChangeLogEntry,
18958 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_ChangeLogEntry,
18959 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_ChangeLogEntry,
18960 : },
18961 : {
18962 : .name = "netr_DsRGetDCNameInfo",
18963 : .struct_size = sizeof(struct netr_DsRGetDCNameInfo ),
18964 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameInfo,
18965 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameInfo,
18966 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_DsRGetDCNameInfo,
18967 : },
18968 : {
18969 : .name = "netr_SendToSamBase",
18970 : .struct_size = sizeof(struct netr_SendToSamBase ),
18971 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SendToSamBase,
18972 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_SendToSamBase,
18973 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_SendToSamBase,
18974 : },
18975 : {
18976 : .name = "netr_DomainTrust",
18977 : .struct_size = sizeof(struct netr_DomainTrust ),
18978 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_DomainTrust,
18979 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_DomainTrust,
18980 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_DomainTrust,
18981 : },
18982 : {
18983 : .name = "netr_DomainTrustList",
18984 : .struct_size = sizeof(struct netr_DomainTrustList ),
18985 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_DomainTrustList,
18986 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_DomainTrustList,
18987 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_DomainTrustList,
18988 : },
18989 : {
18990 : .name = "NL_DNS_NAME_INFO_ARRAY",
18991 : .struct_size = sizeof(struct NL_DNS_NAME_INFO_ARRAY ),
18992 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_NL_DNS_NAME_INFO_ARRAY,
18993 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NL_DNS_NAME_INFO_ARRAY,
18994 : .ndr_print = (ndr_print_function_t) ndr_print_flags_NL_DNS_NAME_INFO_ARRAY,
18995 : },
18996 : { .name = NULL }
18997 : };
18998 :
18999 : static const struct ndr_interface_call netlogon_calls[] = {
19000 : {
19001 : "netr_LogonUasLogon",
19002 : sizeof(struct netr_LogonUasLogon),
19003 : (ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogon,
19004 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogon,
19005 : (ndr_print_function_t) ndr_print_netr_LogonUasLogon,
19006 : { 0, NULL },
19007 : { 0, NULL },
19008 : },
19009 : {
19010 : "netr_LogonUasLogoff",
19011 : sizeof(struct netr_LogonUasLogoff),
19012 : (ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogoff,
19013 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogoff,
19014 : (ndr_print_function_t) ndr_print_netr_LogonUasLogoff,
19015 : { 0, NULL },
19016 : { 0, NULL },
19017 : },
19018 : {
19019 : "netr_LogonSamLogon",
19020 : sizeof(struct netr_LogonSamLogon),
19021 : (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogon,
19022 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogon,
19023 : (ndr_print_function_t) ndr_print_netr_LogonSamLogon,
19024 : { 0, NULL },
19025 : { 0, NULL },
19026 : },
19027 : {
19028 : "netr_LogonSamLogoff",
19029 : sizeof(struct netr_LogonSamLogoff),
19030 : (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogoff,
19031 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogoff,
19032 : (ndr_print_function_t) ndr_print_netr_LogonSamLogoff,
19033 : { 0, NULL },
19034 : { 0, NULL },
19035 : },
19036 : {
19037 : "netr_ServerReqChallenge",
19038 : sizeof(struct netr_ServerReqChallenge),
19039 : (ndr_push_flags_fn_t) ndr_push_netr_ServerReqChallenge,
19040 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerReqChallenge,
19041 : (ndr_print_function_t) ndr_print_netr_ServerReqChallenge,
19042 : { 0, NULL },
19043 : { 0, NULL },
19044 : },
19045 : {
19046 : "netr_ServerAuthenticate",
19047 : sizeof(struct netr_ServerAuthenticate),
19048 : (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate,
19049 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate,
19050 : (ndr_print_function_t) ndr_print_netr_ServerAuthenticate,
19051 : { 0, NULL },
19052 : { 0, NULL },
19053 : },
19054 : {
19055 : "netr_ServerPasswordSet",
19056 : sizeof(struct netr_ServerPasswordSet),
19057 : (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet,
19058 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet,
19059 : (ndr_print_function_t) ndr_print_netr_ServerPasswordSet,
19060 : { 0, NULL },
19061 : { 0, NULL },
19062 : },
19063 : {
19064 : "netr_DatabaseDeltas",
19065 : sizeof(struct netr_DatabaseDeltas),
19066 : (ndr_push_flags_fn_t) ndr_push_netr_DatabaseDeltas,
19067 : (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseDeltas,
19068 : (ndr_print_function_t) ndr_print_netr_DatabaseDeltas,
19069 : { 0, NULL },
19070 : { 0, NULL },
19071 : },
19072 : {
19073 : "netr_DatabaseSync",
19074 : sizeof(struct netr_DatabaseSync),
19075 : (ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync,
19076 : (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync,
19077 : (ndr_print_function_t) ndr_print_netr_DatabaseSync,
19078 : { 0, NULL },
19079 : { 0, NULL },
19080 : },
19081 : {
19082 : "netr_AccountDeltas",
19083 : sizeof(struct netr_AccountDeltas),
19084 : (ndr_push_flags_fn_t) ndr_push_netr_AccountDeltas,
19085 : (ndr_pull_flags_fn_t) ndr_pull_netr_AccountDeltas,
19086 : (ndr_print_function_t) ndr_print_netr_AccountDeltas,
19087 : { 0, NULL },
19088 : { 0, NULL },
19089 : },
19090 : {
19091 : "netr_AccountSync",
19092 : sizeof(struct netr_AccountSync),
19093 : (ndr_push_flags_fn_t) ndr_push_netr_AccountSync,
19094 : (ndr_pull_flags_fn_t) ndr_pull_netr_AccountSync,
19095 : (ndr_print_function_t) ndr_print_netr_AccountSync,
19096 : { 0, NULL },
19097 : { 0, NULL },
19098 : },
19099 : {
19100 : "netr_GetDcName",
19101 : sizeof(struct netr_GetDcName),
19102 : (ndr_push_flags_fn_t) ndr_push_netr_GetDcName,
19103 : (ndr_pull_flags_fn_t) ndr_pull_netr_GetDcName,
19104 : (ndr_print_function_t) ndr_print_netr_GetDcName,
19105 : { 0, NULL },
19106 : { 0, NULL },
19107 : },
19108 : {
19109 : "netr_LogonControl",
19110 : sizeof(struct netr_LogonControl),
19111 : (ndr_push_flags_fn_t) ndr_push_netr_LogonControl,
19112 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl,
19113 : (ndr_print_function_t) ndr_print_netr_LogonControl,
19114 : { 0, NULL },
19115 : { 0, NULL },
19116 : },
19117 : {
19118 : "netr_GetAnyDCName",
19119 : sizeof(struct netr_GetAnyDCName),
19120 : (ndr_push_flags_fn_t) ndr_push_netr_GetAnyDCName,
19121 : (ndr_pull_flags_fn_t) ndr_pull_netr_GetAnyDCName,
19122 : (ndr_print_function_t) ndr_print_netr_GetAnyDCName,
19123 : { 0, NULL },
19124 : { 0, NULL },
19125 : },
19126 : {
19127 : "netr_LogonControl2",
19128 : sizeof(struct netr_LogonControl2),
19129 : (ndr_push_flags_fn_t) ndr_push_netr_LogonControl2,
19130 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2,
19131 : (ndr_print_function_t) ndr_print_netr_LogonControl2,
19132 : { 0, NULL },
19133 : { 0, NULL },
19134 : },
19135 : {
19136 : "netr_ServerAuthenticate2",
19137 : sizeof(struct netr_ServerAuthenticate2),
19138 : (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate2,
19139 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate2,
19140 : (ndr_print_function_t) ndr_print_netr_ServerAuthenticate2,
19141 : { 0, NULL },
19142 : { 0, NULL },
19143 : },
19144 : {
19145 : "netr_DatabaseSync2",
19146 : sizeof(struct netr_DatabaseSync2),
19147 : (ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync2,
19148 : (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync2,
19149 : (ndr_print_function_t) ndr_print_netr_DatabaseSync2,
19150 : { 0, NULL },
19151 : { 0, NULL },
19152 : },
19153 : {
19154 : "netr_DatabaseRedo",
19155 : sizeof(struct netr_DatabaseRedo),
19156 : (ndr_push_flags_fn_t) ndr_push_netr_DatabaseRedo,
19157 : (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseRedo,
19158 : (ndr_print_function_t) ndr_print_netr_DatabaseRedo,
19159 : { 0, NULL },
19160 : { 0, NULL },
19161 : },
19162 : {
19163 : "netr_LogonControl2Ex",
19164 : sizeof(struct netr_LogonControl2Ex),
19165 : (ndr_push_flags_fn_t) ndr_push_netr_LogonControl2Ex,
19166 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2Ex,
19167 : (ndr_print_function_t) ndr_print_netr_LogonControl2Ex,
19168 : { 0, NULL },
19169 : { 0, NULL },
19170 : },
19171 : {
19172 : "netr_NetrEnumerateTrustedDomains",
19173 : sizeof(struct netr_NetrEnumerateTrustedDomains),
19174 : (ndr_push_flags_fn_t) ndr_push_netr_NetrEnumerateTrustedDomains,
19175 : (ndr_pull_flags_fn_t) ndr_pull_netr_NetrEnumerateTrustedDomains,
19176 : (ndr_print_function_t) ndr_print_netr_NetrEnumerateTrustedDomains,
19177 : { 0, NULL },
19178 : { 0, NULL },
19179 : },
19180 : {
19181 : "netr_DsRGetDCName",
19182 : sizeof(struct netr_DsRGetDCName),
19183 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCName,
19184 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCName,
19185 : (ndr_print_function_t) ndr_print_netr_DsRGetDCName,
19186 : { 0, NULL },
19187 : { 0, NULL },
19188 : },
19189 : {
19190 : "netr_LogonGetCapabilities",
19191 : sizeof(struct netr_LogonGetCapabilities),
19192 : (ndr_push_flags_fn_t) ndr_push_netr_LogonGetCapabilities,
19193 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetCapabilities,
19194 : (ndr_print_function_t) ndr_print_netr_LogonGetCapabilities,
19195 : { 0, NULL },
19196 : { 0, NULL },
19197 : },
19198 : {
19199 : "netr_NETRLOGONSETSERVICEBITS",
19200 : sizeof(struct netr_NETRLOGONSETSERVICEBITS),
19201 : (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONSETSERVICEBITS,
19202 : (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONSETSERVICEBITS,
19203 : (ndr_print_function_t) ndr_print_netr_NETRLOGONSETSERVICEBITS,
19204 : { 0, NULL },
19205 : { 0, NULL },
19206 : },
19207 : {
19208 : "netr_LogonGetTrustRid",
19209 : sizeof(struct netr_LogonGetTrustRid),
19210 : (ndr_push_flags_fn_t) ndr_push_netr_LogonGetTrustRid,
19211 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetTrustRid,
19212 : (ndr_print_function_t) ndr_print_netr_LogonGetTrustRid,
19213 : { 0, NULL },
19214 : { 0, NULL },
19215 : },
19216 : {
19217 : "netr_NETRLOGONCOMPUTESERVERDIGEST",
19218 : sizeof(struct netr_NETRLOGONCOMPUTESERVERDIGEST),
19219 : (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST,
19220 : (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST,
19221 : (ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST,
19222 : { 0, NULL },
19223 : { 0, NULL },
19224 : },
19225 : {
19226 : "netr_NETRLOGONCOMPUTECLIENTDIGEST",
19227 : sizeof(struct netr_NETRLOGONCOMPUTECLIENTDIGEST),
19228 : (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST,
19229 : (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST,
19230 : (ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST,
19231 : { 0, NULL },
19232 : { 0, NULL },
19233 : },
19234 : {
19235 : "netr_ServerAuthenticate3",
19236 : sizeof(struct netr_ServerAuthenticate3),
19237 : (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate3,
19238 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate3,
19239 : (ndr_print_function_t) ndr_print_netr_ServerAuthenticate3,
19240 : { 0, NULL },
19241 : { 0, NULL },
19242 : },
19243 : {
19244 : "netr_DsRGetDCNameEx",
19245 : sizeof(struct netr_DsRGetDCNameEx),
19246 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx,
19247 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx,
19248 : (ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx,
19249 : { 0, NULL },
19250 : { 0, NULL },
19251 : },
19252 : {
19253 : "netr_DsRGetSiteName",
19254 : sizeof(struct netr_DsRGetSiteName),
19255 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetSiteName,
19256 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetSiteName,
19257 : (ndr_print_function_t) ndr_print_netr_DsRGetSiteName,
19258 : { 0, NULL },
19259 : { 0, NULL },
19260 : },
19261 : {
19262 : "netr_LogonGetDomainInfo",
19263 : sizeof(struct netr_LogonGetDomainInfo),
19264 : (ndr_push_flags_fn_t) ndr_push_netr_LogonGetDomainInfo,
19265 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetDomainInfo,
19266 : (ndr_print_function_t) ndr_print_netr_LogonGetDomainInfo,
19267 : { 0, NULL },
19268 : { 0, NULL },
19269 : },
19270 : {
19271 : "netr_ServerPasswordSet2",
19272 : sizeof(struct netr_ServerPasswordSet2),
19273 : (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet2,
19274 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet2,
19275 : (ndr_print_function_t) ndr_print_netr_ServerPasswordSet2,
19276 : { 0, NULL },
19277 : { 0, NULL },
19278 : },
19279 : {
19280 : "netr_ServerPasswordGet",
19281 : sizeof(struct netr_ServerPasswordGet),
19282 : (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordGet,
19283 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordGet,
19284 : (ndr_print_function_t) ndr_print_netr_ServerPasswordGet,
19285 : { 0, NULL },
19286 : { 0, NULL },
19287 : },
19288 : {
19289 : "netr_NetrLogonSendToSam",
19290 : sizeof(struct netr_NetrLogonSendToSam),
19291 : (ndr_push_flags_fn_t) ndr_push_netr_NetrLogonSendToSam,
19292 : (ndr_pull_flags_fn_t) ndr_pull_netr_NetrLogonSendToSam,
19293 : (ndr_print_function_t) ndr_print_netr_NetrLogonSendToSam,
19294 : { 0, NULL },
19295 : { 0, NULL },
19296 : },
19297 : {
19298 : "netr_DsRAddressToSitenamesW",
19299 : sizeof(struct netr_DsRAddressToSitenamesW),
19300 : (ndr_push_flags_fn_t) ndr_push_netr_DsRAddressToSitenamesW,
19301 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRAddressToSitenamesW,
19302 : (ndr_print_function_t) ndr_print_netr_DsRAddressToSitenamesW,
19303 : { 0, NULL },
19304 : { 0, NULL },
19305 : },
19306 : {
19307 : "netr_DsRGetDCNameEx2",
19308 : sizeof(struct netr_DsRGetDCNameEx2),
19309 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx2,
19310 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx2,
19311 : (ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx2,
19312 : { 0, NULL },
19313 : { 0, NULL },
19314 : },
19315 : {
19316 : "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN",
19317 : sizeof(struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN),
19318 : (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
19319 : (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
19320 : (ndr_print_function_t) ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
19321 : { 0, NULL },
19322 : { 0, NULL },
19323 : },
19324 : {
19325 : "netr_NetrEnumerateTrustedDomainsEx",
19326 : sizeof(struct netr_NetrEnumerateTrustedDomainsEx),
19327 : (ndr_push_flags_fn_t) ndr_push_netr_NetrEnumerateTrustedDomainsEx,
19328 : (ndr_pull_flags_fn_t) ndr_pull_netr_NetrEnumerateTrustedDomainsEx,
19329 : (ndr_print_function_t) ndr_print_netr_NetrEnumerateTrustedDomainsEx,
19330 : { 0, NULL },
19331 : { 0, NULL },
19332 : },
19333 : {
19334 : "netr_DsRAddressToSitenamesExW",
19335 : sizeof(struct netr_DsRAddressToSitenamesExW),
19336 : (ndr_push_flags_fn_t) ndr_push_netr_DsRAddressToSitenamesExW,
19337 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRAddressToSitenamesExW,
19338 : (ndr_print_function_t) ndr_print_netr_DsRAddressToSitenamesExW,
19339 : { 0, NULL },
19340 : { 0, NULL },
19341 : },
19342 : {
19343 : "netr_DsrGetDcSiteCoverageW",
19344 : sizeof(struct netr_DsrGetDcSiteCoverageW),
19345 : (ndr_push_flags_fn_t) ndr_push_netr_DsrGetDcSiteCoverageW,
19346 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsrGetDcSiteCoverageW,
19347 : (ndr_print_function_t) ndr_print_netr_DsrGetDcSiteCoverageW,
19348 : { 0, NULL },
19349 : { 0, NULL },
19350 : },
19351 : {
19352 : "netr_LogonSamLogonEx",
19353 : sizeof(struct netr_LogonSamLogonEx),
19354 : (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonEx,
19355 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonEx,
19356 : (ndr_print_function_t) ndr_print_netr_LogonSamLogonEx,
19357 : { 0, NULL },
19358 : { 0, NULL },
19359 : },
19360 : {
19361 : "netr_DsrEnumerateDomainTrusts",
19362 : sizeof(struct netr_DsrEnumerateDomainTrusts),
19363 : (ndr_push_flags_fn_t) ndr_push_netr_DsrEnumerateDomainTrusts,
19364 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsrEnumerateDomainTrusts,
19365 : (ndr_print_function_t) ndr_print_netr_DsrEnumerateDomainTrusts,
19366 : { 0, NULL },
19367 : { 0, NULL },
19368 : },
19369 : {
19370 : "netr_DsrDeregisterDNSHostRecords",
19371 : sizeof(struct netr_DsrDeregisterDNSHostRecords),
19372 : (ndr_push_flags_fn_t) ndr_push_netr_DsrDeregisterDNSHostRecords,
19373 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsrDeregisterDNSHostRecords,
19374 : (ndr_print_function_t) ndr_print_netr_DsrDeregisterDNSHostRecords,
19375 : { 0, NULL },
19376 : { 0, NULL },
19377 : },
19378 : {
19379 : "netr_ServerTrustPasswordsGet",
19380 : sizeof(struct netr_ServerTrustPasswordsGet),
19381 : (ndr_push_flags_fn_t) ndr_push_netr_ServerTrustPasswordsGet,
19382 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerTrustPasswordsGet,
19383 : (ndr_print_function_t) ndr_print_netr_ServerTrustPasswordsGet,
19384 : { 0, NULL },
19385 : { 0, NULL },
19386 : },
19387 : {
19388 : "netr_DsRGetForestTrustInformation",
19389 : sizeof(struct netr_DsRGetForestTrustInformation),
19390 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetForestTrustInformation,
19391 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetForestTrustInformation,
19392 : (ndr_print_function_t) ndr_print_netr_DsRGetForestTrustInformation,
19393 : { 0, NULL },
19394 : { 0, NULL },
19395 : },
19396 : {
19397 : "netr_GetForestTrustInformation",
19398 : sizeof(struct netr_GetForestTrustInformation),
19399 : (ndr_push_flags_fn_t) ndr_push_netr_GetForestTrustInformation,
19400 : (ndr_pull_flags_fn_t) ndr_pull_netr_GetForestTrustInformation,
19401 : (ndr_print_function_t) ndr_print_netr_GetForestTrustInformation,
19402 : { 0, NULL },
19403 : { 0, NULL },
19404 : },
19405 : {
19406 : "netr_LogonSamLogonWithFlags",
19407 : sizeof(struct netr_LogonSamLogonWithFlags),
19408 : (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonWithFlags,
19409 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonWithFlags,
19410 : (ndr_print_function_t) ndr_print_netr_LogonSamLogonWithFlags,
19411 : { 0, NULL },
19412 : { 0, NULL },
19413 : },
19414 : {
19415 : "netr_ServerGetTrustInfo",
19416 : sizeof(struct netr_ServerGetTrustInfo),
19417 : (ndr_push_flags_fn_t) ndr_push_netr_ServerGetTrustInfo,
19418 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerGetTrustInfo,
19419 : (ndr_print_function_t) ndr_print_netr_ServerGetTrustInfo,
19420 : { 0, NULL },
19421 : { 0, NULL },
19422 : },
19423 : {
19424 : "netr_Unused47",
19425 : sizeof(struct netr_Unused47),
19426 : (ndr_push_flags_fn_t) ndr_push_netr_Unused47,
19427 : (ndr_pull_flags_fn_t) ndr_pull_netr_Unused47,
19428 : (ndr_print_function_t) ndr_print_netr_Unused47,
19429 : { 0, NULL },
19430 : { 0, NULL },
19431 : },
19432 : {
19433 : "netr_DsrUpdateReadOnlyServerDnsRecords",
19434 : sizeof(struct netr_DsrUpdateReadOnlyServerDnsRecords),
19435 : (ndr_push_flags_fn_t) ndr_push_netr_DsrUpdateReadOnlyServerDnsRecords,
19436 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsrUpdateReadOnlyServerDnsRecords,
19437 : (ndr_print_function_t) ndr_print_netr_DsrUpdateReadOnlyServerDnsRecords,
19438 : { 0, NULL },
19439 : { 0, NULL },
19440 : },
19441 : { .name = NULL }
19442 : };
19443 :
19444 : static const char * const netlogon_endpoint_strings[] = {
19445 : "ncacn_np:[\\pipe\\netlogon]",
19446 : "ncacn_ip_tcp:",
19447 : "ncalrpc:",
19448 : };
19449 :
19450 : static const struct ndr_interface_string_array netlogon_endpoints = {
19451 : .count = 3,
19452 : .names = netlogon_endpoint_strings
19453 : };
19454 :
19455 : static const char * const netlogon_authservice_strings[] = {
19456 : "host",
19457 : };
19458 :
19459 : static const struct ndr_interface_string_array netlogon_authservices = {
19460 : .count = 1,
19461 : .names = netlogon_authservice_strings
19462 : };
19463 :
19464 :
19465 : const struct ndr_interface_table ndr_table_netlogon = {
19466 : .name = "netlogon",
19467 : .syntax_id = {
19468 : {0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0xcf,0xfb}},
19469 : NDR_NETLOGON_VERSION
19470 : },
19471 : .helpstring = NDR_NETLOGON_HELPSTRING,
19472 : .num_calls = 49,
19473 : .calls = netlogon_calls,
19474 : .num_public_structs = 15,
19475 : .public_structs = netlogon_public_structs,
19476 : .endpoints = &netlogon_endpoints,
19477 : .authservices = &netlogon_authservices
19478 : };
19479 :
19480 : #endif /* SKIP_NDR_TABLE_netlogon */
|