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 0 : static enum ndr_err_code ndr_push_netr_UasInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasInfo *r)
11 : {
12 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13 0 : if (ndr_flags & NDR_SCALARS) {
14 0 : NDR_CHECK(ndr_push_align(ndr, 5));
15 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
16 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priv));
17 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_flags));
18 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_count));
19 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pw_count));
20 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logon));
21 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logoff));
22 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->logoff_time));
23 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->kickoff_time));
24 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->password_age));
25 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_can_change));
26 0 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_must_change));
27 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer));
28 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
29 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->script_path));
30 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
31 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
32 : }
33 0 : if (ndr_flags & NDR_BUFFERS) {
34 0 : if (r->account_name) {
35 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
36 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
37 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
38 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));
39 : }
40 0 : if (r->computer) {
41 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
42 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
43 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
44 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer, ndr_charset_length(r->computer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
45 : }
46 0 : if (r->domain) {
47 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
48 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
49 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
50 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
51 : }
52 0 : if (r->script_path) {
53 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
54 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
55 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
56 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));
57 : }
58 : }
59 0 : return NDR_ERR_SUCCESS;
60 : }
61 :
62 0 : static enum ndr_err_code ndr_pull_netr_UasInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasInfo *r)
63 : {
64 : uint32_t _ptr_account_name;
65 0 : uint32_t size_account_name_1 = 0;
66 0 : uint32_t length_account_name_1 = 0;
67 0 : TALLOC_CTX *_mem_save_account_name_0 = NULL;
68 : uint32_t _ptr_computer;
69 0 : uint32_t size_computer_1 = 0;
70 0 : uint32_t length_computer_1 = 0;
71 0 : TALLOC_CTX *_mem_save_computer_0 = NULL;
72 : uint32_t _ptr_domain;
73 0 : uint32_t size_domain_1 = 0;
74 0 : uint32_t length_domain_1 = 0;
75 0 : TALLOC_CTX *_mem_save_domain_0 = NULL;
76 : uint32_t _ptr_script_path;
77 0 : uint32_t size_script_path_1 = 0;
78 0 : uint32_t length_script_path_1 = 0;
79 0 : TALLOC_CTX *_mem_save_script_path_0 = NULL;
80 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
81 0 : if (ndr_flags & NDR_SCALARS) {
82 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
83 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
84 0 : if (_ptr_account_name) {
85 0 : NDR_PULL_ALLOC(ndr, r->account_name);
86 : } else {
87 0 : r->account_name = NULL;
88 : }
89 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priv));
90 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_flags));
91 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_count));
92 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_pw_count));
93 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logon));
94 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logoff));
95 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->logoff_time));
96 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->kickoff_time));
97 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->password_age));
98 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_can_change));
99 0 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_must_change));
100 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer));
101 0 : if (_ptr_computer) {
102 0 : NDR_PULL_ALLOC(ndr, r->computer);
103 : } else {
104 0 : r->computer = NULL;
105 : }
106 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
107 0 : if (_ptr_domain) {
108 0 : NDR_PULL_ALLOC(ndr, r->domain);
109 : } else {
110 0 : r->domain = NULL;
111 : }
112 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_script_path));
113 0 : if (_ptr_script_path) {
114 0 : NDR_PULL_ALLOC(ndr, r->script_path);
115 : } else {
116 0 : r->script_path = NULL;
117 : }
118 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
119 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
120 : }
121 0 : if (ndr_flags & NDR_BUFFERS) {
122 0 : if (r->account_name) {
123 0 : _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
124 0 : NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
125 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
126 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
127 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_1));
128 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_1));
129 0 : if (length_account_name_1 > size_account_name_1) {
130 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
131 : }
132 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
133 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
134 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
135 : }
136 0 : if (r->computer) {
137 0 : _mem_save_computer_0 = NDR_PULL_GET_MEM_CTX(ndr);
138 0 : NDR_PULL_SET_MEM_CTX(ndr, r->computer, 0);
139 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer));
140 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->computer));
141 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer, &size_computer_1));
142 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer, &length_computer_1));
143 0 : if (length_computer_1 > size_computer_1) {
144 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_1, length_computer_1);
145 : }
146 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_1, sizeof(uint16_t)));
147 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer, length_computer_1, sizeof(uint16_t), CH_UTF16));
148 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_0, 0);
149 : }
150 0 : if (r->domain) {
151 0 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
152 0 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
153 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
154 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
155 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
156 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
157 0 : if (length_domain_1 > size_domain_1) {
158 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
159 : }
160 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
161 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
162 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
163 : }
164 0 : if (r->script_path) {
165 0 : _mem_save_script_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
166 0 : NDR_PULL_SET_MEM_CTX(ndr, r->script_path, 0);
167 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->script_path));
168 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->script_path));
169 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->script_path, &size_script_path_1));
170 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->script_path, &length_script_path_1));
171 0 : if (length_script_path_1 > size_script_path_1) {
172 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_script_path_1, length_script_path_1);
173 : }
174 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_script_path_1, sizeof(uint16_t)));
175 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->script_path, length_script_path_1, sizeof(uint16_t), CH_UTF16));
176 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_script_path_0, 0);
177 : }
178 : }
179 0 : return NDR_ERR_SUCCESS;
180 : }
181 :
182 0 : _PUBLIC_ void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r)
183 : {
184 0 : ndr_print_struct(ndr, name, "netr_UasInfo");
185 0 : if (r == NULL) { ndr_print_null(ndr); return; }
186 0 : ndr->depth++;
187 0 : ndr_print_ptr(ndr, "account_name", r->account_name);
188 0 : ndr->depth++;
189 0 : if (r->account_name) {
190 0 : ndr_print_string(ndr, "account_name", r->account_name);
191 : }
192 0 : ndr->depth--;
193 0 : ndr_print_uint32(ndr, "priv", r->priv);
194 0 : ndr_print_uint32(ndr, "auth_flags", r->auth_flags);
195 0 : ndr_print_uint32(ndr, "logon_count", r->logon_count);
196 0 : ndr_print_uint32(ndr, "bad_pw_count", r->bad_pw_count);
197 0 : ndr_print_time_t(ndr, "last_logon", r->last_logon);
198 0 : ndr_print_time_t(ndr, "last_logoff", r->last_logoff);
199 0 : ndr_print_time_t(ndr, "logoff_time", r->logoff_time);
200 0 : ndr_print_time_t(ndr, "kickoff_time", r->kickoff_time);
201 0 : ndr_print_uint32(ndr, "password_age", r->password_age);
202 0 : ndr_print_time_t(ndr, "pw_can_change", r->pw_can_change);
203 0 : ndr_print_time_t(ndr, "pw_must_change", r->pw_must_change);
204 0 : ndr_print_ptr(ndr, "computer", r->computer);
205 0 : ndr->depth++;
206 0 : if (r->computer) {
207 0 : ndr_print_string(ndr, "computer", r->computer);
208 : }
209 0 : ndr->depth--;
210 0 : ndr_print_ptr(ndr, "domain", r->domain);
211 0 : ndr->depth++;
212 0 : if (r->domain) {
213 0 : ndr_print_string(ndr, "domain", r->domain);
214 : }
215 0 : ndr->depth--;
216 0 : ndr_print_ptr(ndr, "script_path", r->script_path);
217 0 : ndr->depth++;
218 0 : if (r->script_path) {
219 0 : ndr_print_string(ndr, "script_path", r->script_path);
220 : }
221 0 : ndr->depth--;
222 0 : ndr_print_uint32(ndr, "unknown", r->unknown);
223 0 : ndr->depth--;
224 : }
225 :
226 0 : static enum ndr_err_code ndr_push_netr_UasLogoffInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasLogoffInfo *r)
227 : {
228 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
229 0 : if (ndr_flags & NDR_SCALARS) {
230 0 : NDR_CHECK(ndr_push_align(ndr, 4));
231 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->duration));
232 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
233 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
234 : }
235 0 : if (ndr_flags & NDR_BUFFERS) {
236 : }
237 0 : return NDR_ERR_SUCCESS;
238 : }
239 :
240 0 : static enum ndr_err_code ndr_pull_netr_UasLogoffInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasLogoffInfo *r)
241 : {
242 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
243 0 : if (ndr_flags & NDR_SCALARS) {
244 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
245 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->duration));
246 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
247 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
248 : }
249 0 : if (ndr_flags & NDR_BUFFERS) {
250 : }
251 0 : return NDR_ERR_SUCCESS;
252 : }
253 :
254 0 : _PUBLIC_ void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r)
255 : {
256 0 : ndr_print_struct(ndr, name, "netr_UasLogoffInfo");
257 0 : if (r == NULL) { ndr_print_null(ndr); return; }
258 0 : ndr->depth++;
259 0 : ndr_print_uint32(ndr, "duration", r->duration);
260 0 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
261 0 : ndr->depth--;
262 : }
263 :
264 0 : _PUBLIC_ enum ndr_err_code ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const struct netr_AcctLockStr *r)
265 : {
266 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
267 0 : if (ndr_flags & NDR_SCALARS) {
268 0 : NDR_CHECK(ndr_push_align(ndr, 4));
269 0 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->lockout_duration));
270 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->reset_count));
271 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_attempt_lockout));
272 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy));
273 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
274 : }
275 0 : if (ndr_flags & NDR_BUFFERS) {
276 : }
277 0 : return NDR_ERR_SUCCESS;
278 : }
279 :
280 0 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int ndr_flags, struct netr_AcctLockStr *r)
281 : {
282 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
283 0 : if (ndr_flags & NDR_SCALARS) {
284 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
285 0 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->lockout_duration));
286 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->reset_count));
287 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_attempt_lockout));
288 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy));
289 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
290 : }
291 0 : if (ndr_flags & NDR_BUFFERS) {
292 : }
293 0 : return NDR_ERR_SUCCESS;
294 : }
295 :
296 0 : static void ndr_print_flags_netr_AcctLockStr(struct ndr_print *ndr, const char *name, int unused, const struct netr_AcctLockStr *r)
297 : {
298 0 : ndr_print_netr_AcctLockStr(ndr, name, r);
299 0 : }
300 :
301 0 : _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r)
302 : {
303 0 : ndr_print_struct(ndr, name, "netr_AcctLockStr");
304 0 : if (r == NULL) { ndr_print_null(ndr); return; }
305 0 : ndr->depth++;
306 0 : ndr_print_dlong(ndr, "lockout_duration", r->lockout_duration);
307 0 : ndr_print_udlong(ndr, "reset_count", r->reset_count);
308 0 : ndr_print_uint32(ndr, "bad_attempt_lockout", r->bad_attempt_lockout);
309 0 : ndr_print_uint32(ndr, "dummy", r->dummy);
310 0 : ndr->depth--;
311 : }
312 :
313 12136 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonParameterControl(struct ndr_push *ndr, int ndr_flags, uint32_t r)
314 : {
315 12136 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
316 12136 : return NDR_ERR_SUCCESS;
317 : }
318 :
319 12781 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonParameterControl(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
320 : {
321 : uint32_t v;
322 12781 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
323 12781 : *r = v;
324 12781 : return NDR_ERR_SUCCESS;
325 : }
326 :
327 0 : _PUBLIC_ void ndr_print_netr_LogonParameterControl(struct ndr_print *ndr, const char *name, uint32_t r)
328 : {
329 0 : ndr_print_uint32(ndr, name, r);
330 0 : ndr->depth++;
331 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", MSV1_0_CLEARTEXT_PASSWORD_ALLOWED, r);
332 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_UPDATE_LOGON_STATISTICS", MSV1_0_UPDATE_LOGON_STATISTICS, r);
333 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_USER_PARAMETERS", MSV1_0_RETURN_USER_PARAMETERS, r);
334 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_DONT_TRY_GUEST_ACCOUNT", MSV1_0_DONT_TRY_GUEST_ACCOUNT, r);
335 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT, r);
336 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_PASSWORD_EXPIRY", MSV1_0_RETURN_PASSWORD_EXPIRY, r);
337 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_USE_CLIENT_CHALLENGE", MSV1_0_USE_CLIENT_CHALLENGE, r);
338 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_TRY_GUEST_ACCOUNT_ONLY", MSV1_0_TRY_GUEST_ACCOUNT_ONLY, r);
339 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_PROFILE_PATH", MSV1_0_RETURN_PROFILE_PATH, r);
340 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY", MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY, r);
341 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT, r);
342 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_DISABLE_PERSONAL_FALLBACK", MSV1_0_DISABLE_PERSONAL_FALLBACK, r);
343 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_FORCE_GUEST", MSV1_0_ALLOW_FORCE_GUEST, r);
344 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED", MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED, r);
345 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY", MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY, r);
346 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_MSVCHAPV2", MSV1_0_ALLOW_MSVCHAPV2, r);
347 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_S4U2SELF", MSV1_0_S4U2SELF, r);
348 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CHECK_LOGONHOURS_FOR_S4U", MSV1_0_CHECK_LOGONHOURS_FOR_S4U, r);
349 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_SUBAUTHENTICATION_DLL_EX", MSV1_0_SUBAUTHENTICATION_DLL_EX, r);
350 0 : ndr->depth--;
351 0 : }
352 :
353 24272 : static enum ndr_err_code ndr_push_netr_IdentityInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_IdentityInfo *r)
354 : {
355 24272 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
356 24272 : if (ndr_flags & NDR_SCALARS) {
357 12136 : NDR_CHECK(ndr_push_align(ndr, 5));
358 12136 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
359 12136 : NDR_CHECK(ndr_push_netr_LogonParameterControl(ndr, NDR_SCALARS, r->parameter_control));
360 12136 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->logon_id));
361 12136 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
362 12136 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstation));
363 12136 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
364 : }
365 24272 : if (ndr_flags & NDR_BUFFERS) {
366 12136 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
367 12136 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
368 12136 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
369 : }
370 24272 : return NDR_ERR_SUCCESS;
371 : }
372 :
373 25562 : static enum ndr_err_code ndr_pull_netr_IdentityInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_IdentityInfo *r)
374 : {
375 25562 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
376 25562 : if (ndr_flags & NDR_SCALARS) {
377 12781 : NDR_CHECK(ndr_pull_align(ndr, 5));
378 12781 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
379 12781 : NDR_CHECK(ndr_pull_netr_LogonParameterControl(ndr, NDR_SCALARS, &r->parameter_control));
380 12781 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->logon_id));
381 12781 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
382 12781 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstation));
383 12781 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
384 : }
385 25562 : if (ndr_flags & NDR_BUFFERS) {
386 12781 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
387 12781 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
388 12781 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
389 : }
390 25562 : return NDR_ERR_SUCCESS;
391 : }
392 :
393 0 : _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r)
394 : {
395 0 : ndr_print_struct(ndr, name, "netr_IdentityInfo");
396 0 : if (r == NULL) { ndr_print_null(ndr); return; }
397 0 : ndr->depth++;
398 0 : ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
399 0 : ndr_print_netr_LogonParameterControl(ndr, "parameter_control", r->parameter_control);
400 0 : ndr_print_udlong(ndr, "logon_id", r->logon_id);
401 0 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
402 0 : ndr_print_lsa_String(ndr, "workstation", &r->workstation);
403 0 : ndr->depth--;
404 : }
405 :
406 352 : static enum ndr_err_code ndr_push_netr_PasswordInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordInfo *r)
407 : {
408 352 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
409 352 : if (ndr_flags & NDR_SCALARS) {
410 352 : NDR_CHECK(ndr_push_align(ndr, 5));
411 352 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
412 352 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
413 352 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
414 352 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
415 : }
416 352 : if (ndr_flags & NDR_BUFFERS) {
417 352 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
418 : }
419 352 : return NDR_ERR_SUCCESS;
420 : }
421 :
422 614 : static enum ndr_err_code ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordInfo *r)
423 : {
424 614 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
425 614 : if (ndr_flags & NDR_SCALARS) {
426 614 : NDR_CHECK(ndr_pull_align(ndr, 5));
427 614 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
428 614 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
429 614 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
430 614 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
431 : }
432 614 : if (ndr_flags & NDR_BUFFERS) {
433 614 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
434 : }
435 614 : return NDR_ERR_SUCCESS;
436 : }
437 :
438 0 : _PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r)
439 : {
440 0 : ndr_print_struct(ndr, name, "netr_PasswordInfo");
441 0 : if (r == NULL) { ndr_print_null(ndr); return; }
442 0 : ndr->depth++;
443 0 : ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
444 0 : ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
445 0 : ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
446 0 : ndr->depth--;
447 : }
448 :
449 46656 : static enum ndr_err_code ndr_push_netr_ChallengeResponse(struct ndr_push *ndr, int ndr_flags, const struct netr_ChallengeResponse *r)
450 : {
451 : {
452 46656 : uint32_t _flags_save_STRUCT = ndr->flags;
453 46656 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
454 46656 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
455 46656 : if (ndr_flags & NDR_SCALARS) {
456 23328 : NDR_CHECK(ndr_push_align(ndr, 5));
457 23328 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
458 23328 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
459 23328 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
460 23328 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
461 : }
462 46656 : if (ndr_flags & NDR_BUFFERS) {
463 23328 : if (r->data) {
464 21234 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
465 21234 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
466 21234 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
467 21234 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
468 : }
469 : }
470 46656 : ndr->flags = _flags_save_STRUCT;
471 : }
472 46656 : return NDR_ERR_SUCCESS;
473 : }
474 :
475 48188 : static enum ndr_err_code ndr_pull_netr_ChallengeResponse(struct ndr_pull *ndr, int ndr_flags, struct netr_ChallengeResponse *r)
476 : {
477 : uint32_t _ptr_data;
478 48188 : uint32_t size_data_1 = 0;
479 48188 : uint32_t length_data_1 = 0;
480 48188 : TALLOC_CTX *_mem_save_data_0 = NULL;
481 : {
482 48188 : uint32_t _flags_save_STRUCT = ndr->flags;
483 48188 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
484 48188 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
485 48188 : if (ndr_flags & NDR_SCALARS) {
486 24094 : NDR_CHECK(ndr_pull_align(ndr, 5));
487 24094 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
488 24094 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
489 24094 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
490 24094 : if (_ptr_data) {
491 22000 : NDR_PULL_ALLOC(ndr, r->data);
492 : } else {
493 2094 : r->data = NULL;
494 : }
495 24094 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
496 : }
497 48188 : if (ndr_flags & NDR_BUFFERS) {
498 24094 : if (r->data) {
499 22000 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
500 22000 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
501 22000 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
502 22000 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
503 22000 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
504 22000 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->data, &length_data_1));
505 22000 : if (length_data_1 > size_data_1) {
506 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_data_1, length_data_1);
507 : }
508 22000 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
509 22000 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, length_data_1));
510 22000 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
511 : }
512 24094 : if (r->data) {
513 22000 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
514 : }
515 24094 : if (r->data) {
516 22000 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->data, r->length));
517 : }
518 : }
519 48188 : ndr->flags = _flags_save_STRUCT;
520 : }
521 48188 : return NDR_ERR_SUCCESS;
522 : }
523 :
524 0 : _PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r)
525 : {
526 0 : ndr_print_struct(ndr, name, "netr_ChallengeResponse");
527 0 : if (r == NULL) { ndr_print_null(ndr); return; }
528 : {
529 0 : uint32_t _flags_save_STRUCT = ndr->flags;
530 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
531 0 : ndr->depth++;
532 0 : ndr_print_uint16(ndr, "length", r->length);
533 0 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size);
534 0 : ndr_print_ptr(ndr, "data", r->data);
535 0 : ndr->depth++;
536 0 : if (r->data) {
537 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
538 : }
539 0 : ndr->depth--;
540 0 : ndr->depth--;
541 0 : ndr->flags = _flags_save_STRUCT;
542 : }
543 : }
544 :
545 11664 : static enum ndr_err_code ndr_push_netr_NetworkInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_NetworkInfo *r)
546 : {
547 : {
548 11664 : uint32_t _flags_save_STRUCT = ndr->flags;
549 11664 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
550 11664 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
551 11664 : if (ndr_flags & NDR_SCALARS) {
552 11664 : NDR_CHECK(ndr_push_align(ndr, 5));
553 11664 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
554 11664 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->challenge, 8));
555 11664 : NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
556 11664 : NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
557 11664 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
558 : }
559 11664 : if (ndr_flags & NDR_BUFFERS) {
560 11664 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
561 11664 : NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
562 11664 : NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
563 : }
564 11664 : ndr->flags = _flags_save_STRUCT;
565 : }
566 11664 : return NDR_ERR_SUCCESS;
567 : }
568 :
569 12047 : static enum ndr_err_code ndr_pull_netr_NetworkInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_NetworkInfo *r)
570 : {
571 12047 : uint32_t size_challenge_0 = 0;
572 : {
573 12047 : uint32_t _flags_save_STRUCT = ndr->flags;
574 12047 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
575 12047 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
576 12047 : if (ndr_flags & NDR_SCALARS) {
577 12047 : NDR_CHECK(ndr_pull_align(ndr, 5));
578 12047 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
579 12047 : size_challenge_0 = 8;
580 12047 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->challenge, size_challenge_0));
581 12047 : NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
582 12047 : NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
583 12047 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
584 : }
585 12047 : if (ndr_flags & NDR_BUFFERS) {
586 12047 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
587 12047 : NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
588 12047 : NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
589 : }
590 12047 : ndr->flags = _flags_save_STRUCT;
591 : }
592 12047 : return NDR_ERR_SUCCESS;
593 : }
594 :
595 0 : _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r)
596 : {
597 0 : ndr_print_struct(ndr, name, "netr_NetworkInfo");
598 0 : if (r == NULL) { ndr_print_null(ndr); return; }
599 : {
600 0 : uint32_t _flags_save_STRUCT = ndr->flags;
601 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
602 0 : ndr->depth++;
603 0 : ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
604 0 : ndr_print_array_uint8(ndr, "challenge", r->challenge, 8);
605 0 : ndr_print_netr_ChallengeResponse(ndr, "nt", &r->nt);
606 0 : ndr_print_netr_ChallengeResponse(ndr, "lm", &r->lm);
607 0 : ndr->depth--;
608 0 : ndr->flags = _flags_save_STRUCT;
609 : }
610 : }
611 :
612 120 : static enum ndr_err_code ndr_push_netr_GenericInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_GenericInfo *r)
613 : {
614 : {
615 120 : uint32_t _flags_save_STRUCT = ndr->flags;
616 120 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
617 120 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
618 120 : if (ndr_flags & NDR_SCALARS) {
619 120 : NDR_CHECK(ndr_push_align(ndr, 5));
620 120 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
621 120 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->package_name));
622 120 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
623 120 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
624 120 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
625 : }
626 120 : if (ndr_flags & NDR_BUFFERS) {
627 120 : NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
628 120 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
629 120 : if (r->data) {
630 120 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
631 120 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
632 : }
633 : }
634 120 : ndr->flags = _flags_save_STRUCT;
635 : }
636 120 : return NDR_ERR_SUCCESS;
637 : }
638 :
639 120 : static enum ndr_err_code ndr_pull_netr_GenericInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_GenericInfo *r)
640 : {
641 : uint32_t _ptr_data;
642 120 : uint32_t size_data_1 = 0;
643 120 : TALLOC_CTX *_mem_save_data_0 = NULL;
644 : {
645 120 : uint32_t _flags_save_STRUCT = ndr->flags;
646 120 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
647 120 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
648 120 : if (ndr_flags & NDR_SCALARS) {
649 120 : NDR_CHECK(ndr_pull_align(ndr, 5));
650 120 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
651 120 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->package_name));
652 120 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
653 120 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
654 120 : if (_ptr_data) {
655 120 : NDR_PULL_ALLOC(ndr, r->data);
656 : } else {
657 0 : r->data = NULL;
658 : }
659 120 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
660 : }
661 120 : if (ndr_flags & NDR_BUFFERS) {
662 120 : NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
663 120 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
664 120 : if (r->data) {
665 120 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
666 120 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
667 120 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
668 120 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
669 120 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
670 120 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
671 120 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
672 : }
673 120 : if (r->data) {
674 120 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
675 : }
676 : }
677 120 : ndr->flags = _flags_save_STRUCT;
678 : }
679 120 : return NDR_ERR_SUCCESS;
680 : }
681 :
682 0 : _PUBLIC_ void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo *r)
683 : {
684 0 : ndr_print_struct(ndr, name, "netr_GenericInfo");
685 0 : if (r == NULL) { ndr_print_null(ndr); return; }
686 : {
687 0 : uint32_t _flags_save_STRUCT = ndr->flags;
688 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
689 0 : ndr->depth++;
690 0 : ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
691 0 : ndr_print_lsa_String(ndr, "package_name", &r->package_name);
692 0 : ndr_print_uint32(ndr, "length", r->length);
693 0 : ndr_print_ptr(ndr, "data", r->data);
694 0 : ndr->depth++;
695 0 : if (r->data) {
696 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
697 : }
698 0 : ndr->depth--;
699 0 : ndr->depth--;
700 0 : ndr->flags = _flags_save_STRUCT;
701 : }
702 : }
703 :
704 27108 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfoClass(struct ndr_push *ndr, int ndr_flags, enum netr_LogonInfoClass r)
705 : {
706 27108 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
707 27108 : return NDR_ERR_SUCCESS;
708 : }
709 :
710 14206 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfoClass(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonInfoClass *r)
711 : {
712 : uint16_t v;
713 14206 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
714 14206 : *r = v;
715 14206 : return NDR_ERR_SUCCESS;
716 : }
717 :
718 0 : _PUBLIC_ void ndr_print_netr_LogonInfoClass(struct ndr_print *ndr, const char *name, enum netr_LogonInfoClass r)
719 : {
720 0 : const char *val = NULL;
721 :
722 0 : switch (r) {
723 0 : case NetlogonInteractiveInformation: val = "NetlogonInteractiveInformation"; break;
724 0 : case NetlogonNetworkInformation: val = "NetlogonNetworkInformation"; break;
725 0 : case NetlogonServiceInformation: val = "NetlogonServiceInformation"; break;
726 0 : case NetlogonGenericInformation: val = "NetlogonGenericInformation"; break;
727 0 : case NetlogonInteractiveTransitiveInformation: val = "NetlogonInteractiveTransitiveInformation"; break;
728 0 : case NetlogonNetworkTransitiveInformation: val = "NetlogonNetworkTransitiveInformation"; break;
729 0 : case NetlogonServiceTransitiveInformation: val = "NetlogonServiceTransitiveInformation"; break;
730 : }
731 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
732 0 : }
733 :
734 13944 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r)
735 : {
736 : uint32_t level;
737 13944 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
738 13944 : if (ndr_flags & NDR_SCALARS) {
739 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
740 13944 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
741 13944 : NDR_CHECK(ndr_push_union_align(ndr, 5));
742 13944 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, level));
743 : /* ms_union is always aligned to the largest union arm*/
744 13944 : NDR_CHECK(ndr_push_align(ndr, 5));
745 13944 : switch (level) {
746 333 : case NetlogonInteractiveInformation: {
747 333 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
748 333 : break; }
749 :
750 8586 : case NetlogonNetworkInformation: {
751 8586 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
752 8586 : break; }
753 :
754 0 : case NetlogonServiceInformation: {
755 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
756 0 : break; }
757 :
758 120 : case NetlogonGenericInformation: {
759 120 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
760 120 : break; }
761 :
762 19 : case NetlogonInteractiveTransitiveInformation: {
763 19 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
764 19 : break; }
765 :
766 3078 : case NetlogonNetworkTransitiveInformation: {
767 3078 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
768 3078 : break; }
769 :
770 0 : case NetlogonServiceTransitiveInformation: {
771 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
772 0 : break; }
773 :
774 1808 : default: {
775 1808 : break; }
776 :
777 : }
778 0 : }
779 13944 : if (ndr_flags & NDR_BUFFERS) {
780 13944 : if (!(ndr_flags & NDR_SCALARS)) {
781 : /* We didn't get it above, and the token is not needed after this. */
782 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
783 : }
784 13944 : switch (level) {
785 333 : case NetlogonInteractiveInformation:
786 333 : if (r->password) {
787 333 : NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
788 : }
789 333 : break;
790 :
791 8586 : case NetlogonNetworkInformation:
792 8586 : if (r->network) {
793 8586 : NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
794 : }
795 8586 : break;
796 :
797 0 : case NetlogonServiceInformation:
798 0 : if (r->password) {
799 0 : NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
800 : }
801 0 : break;
802 :
803 120 : case NetlogonGenericInformation:
804 120 : if (r->generic) {
805 120 : NDR_CHECK(ndr_push_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
806 : }
807 120 : break;
808 :
809 19 : case NetlogonInteractiveTransitiveInformation:
810 19 : if (r->password) {
811 19 : NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
812 : }
813 19 : break;
814 :
815 3078 : case NetlogonNetworkTransitiveInformation:
816 3078 : if (r->network) {
817 3078 : NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
818 : }
819 3078 : break;
820 :
821 0 : case NetlogonServiceTransitiveInformation:
822 0 : if (r->password) {
823 0 : NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
824 : }
825 0 : break;
826 :
827 1808 : default:
828 1808 : break;
829 :
830 : }
831 0 : }
832 13944 : return NDR_ERR_SUCCESS;
833 : }
834 :
835 14589 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, union netr_LogonLevel *r)
836 : {
837 : uint32_t level;
838 : uint16_t _level;
839 14589 : TALLOC_CTX *_mem_save_password_0 = NULL;
840 : uint32_t _ptr_password;
841 14589 : TALLOC_CTX *_mem_save_network_0 = NULL;
842 : uint32_t _ptr_network;
843 14589 : TALLOC_CTX *_mem_save_generic_0 = NULL;
844 : uint32_t _ptr_generic;
845 14589 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
846 14589 : if (ndr_flags & NDR_SCALARS) {
847 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
848 14589 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
849 14589 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
850 14589 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
851 14589 : if (_level != level) {
852 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
853 : }
854 : /* ms_union is always aligned to the largest union arm*/
855 14589 : NDR_CHECK(ndr_pull_align(ndr, 5));
856 14589 : switch (level) {
857 520 : case NetlogonInteractiveInformation: {
858 520 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
859 520 : if (_ptr_password) {
860 520 : NDR_PULL_ALLOC(ndr, r->password);
861 : } else {
862 0 : r->password = NULL;
863 : }
864 520 : break; }
865 :
866 8734 : case NetlogonNetworkInformation: {
867 8734 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
868 8734 : if (_ptr_network) {
869 8734 : NDR_PULL_ALLOC(ndr, r->network);
870 : } else {
871 0 : r->network = NULL;
872 : }
873 8734 : break; }
874 :
875 0 : case NetlogonServiceInformation: {
876 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
877 0 : if (_ptr_password) {
878 0 : NDR_PULL_ALLOC(ndr, r->password);
879 : } else {
880 0 : r->password = NULL;
881 : }
882 0 : break; }
883 :
884 120 : case NetlogonGenericInformation: {
885 120 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
886 120 : if (_ptr_generic) {
887 120 : NDR_PULL_ALLOC(ndr, r->generic);
888 : } else {
889 0 : r->generic = NULL;
890 : }
891 120 : break; }
892 :
893 94 : case NetlogonInteractiveTransitiveInformation: {
894 94 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
895 94 : if (_ptr_password) {
896 94 : NDR_PULL_ALLOC(ndr, r->password);
897 : } else {
898 0 : r->password = NULL;
899 : }
900 94 : break; }
901 :
902 3313 : case NetlogonNetworkTransitiveInformation: {
903 3313 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
904 3313 : if (_ptr_network) {
905 3313 : NDR_PULL_ALLOC(ndr, r->network);
906 : } else {
907 0 : r->network = NULL;
908 : }
909 3313 : break; }
910 :
911 0 : case NetlogonServiceTransitiveInformation: {
912 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
913 0 : if (_ptr_password) {
914 0 : NDR_PULL_ALLOC(ndr, r->password);
915 : } else {
916 0 : r->password = NULL;
917 : }
918 0 : break; }
919 :
920 1808 : default: {
921 1808 : break; }
922 :
923 : }
924 0 : }
925 14589 : if (ndr_flags & NDR_BUFFERS) {
926 14589 : if (!(ndr_flags & NDR_SCALARS)) {
927 : /* We didn't get it above, and the token is not needed after this. */
928 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
929 : }
930 14589 : switch (level) {
931 520 : case NetlogonInteractiveInformation:
932 520 : if (r->password) {
933 520 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
934 520 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
935 520 : NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
936 520 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
937 : }
938 520 : break;
939 :
940 8734 : case NetlogonNetworkInformation:
941 8734 : if (r->network) {
942 8734 : _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
943 8734 : NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
944 8734 : NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
945 8734 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
946 : }
947 8734 : break;
948 :
949 0 : case NetlogonServiceInformation:
950 0 : if (r->password) {
951 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
952 0 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
953 0 : NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
954 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
955 : }
956 0 : break;
957 :
958 120 : case NetlogonGenericInformation:
959 120 : if (r->generic) {
960 120 : _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
961 120 : NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
962 120 : NDR_CHECK(ndr_pull_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
963 120 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
964 : }
965 120 : break;
966 :
967 94 : case NetlogonInteractiveTransitiveInformation:
968 94 : if (r->password) {
969 94 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
970 94 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
971 94 : NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
972 94 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
973 : }
974 94 : break;
975 :
976 3313 : case NetlogonNetworkTransitiveInformation:
977 3313 : if (r->network) {
978 3313 : _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
979 3313 : NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
980 3313 : NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
981 3313 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
982 : }
983 3313 : break;
984 :
985 0 : case NetlogonServiceTransitiveInformation:
986 0 : if (r->password) {
987 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
988 0 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
989 0 : NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
990 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
991 : }
992 0 : break;
993 :
994 1808 : default:
995 1808 : break;
996 :
997 : }
998 0 : }
999 14589 : return NDR_ERR_SUCCESS;
1000 : }
1001 :
1002 0 : _PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r)
1003 : {
1004 : uint32_t level;
1005 0 : level = ndr_print_steal_switch_value(ndr, r);
1006 0 : ndr_print_union(ndr, name, level, "netr_LogonLevel");
1007 0 : switch (level) {
1008 0 : case NetlogonInteractiveInformation:
1009 0 : ndr_print_ptr(ndr, "password", r->password);
1010 0 : ndr->depth++;
1011 0 : if (r->password) {
1012 0 : ndr_print_netr_PasswordInfo(ndr, "password", r->password);
1013 : }
1014 0 : ndr->depth--;
1015 0 : break;
1016 :
1017 0 : case NetlogonNetworkInformation:
1018 0 : ndr_print_ptr(ndr, "network", r->network);
1019 0 : ndr->depth++;
1020 0 : if (r->network) {
1021 0 : ndr_print_netr_NetworkInfo(ndr, "network", r->network);
1022 : }
1023 0 : ndr->depth--;
1024 0 : break;
1025 :
1026 0 : case NetlogonServiceInformation:
1027 0 : ndr_print_ptr(ndr, "password", r->password);
1028 0 : ndr->depth++;
1029 0 : if (r->password) {
1030 0 : ndr_print_netr_PasswordInfo(ndr, "password", r->password);
1031 : }
1032 0 : ndr->depth--;
1033 0 : break;
1034 :
1035 0 : case NetlogonGenericInformation:
1036 0 : ndr_print_ptr(ndr, "generic", r->generic);
1037 0 : ndr->depth++;
1038 0 : if (r->generic) {
1039 0 : ndr_print_netr_GenericInfo(ndr, "generic", r->generic);
1040 : }
1041 0 : ndr->depth--;
1042 0 : break;
1043 :
1044 0 : case NetlogonInteractiveTransitiveInformation:
1045 0 : ndr_print_ptr(ndr, "password", r->password);
1046 0 : ndr->depth++;
1047 0 : if (r->password) {
1048 0 : ndr_print_netr_PasswordInfo(ndr, "password", r->password);
1049 : }
1050 0 : ndr->depth--;
1051 0 : break;
1052 :
1053 0 : case NetlogonNetworkTransitiveInformation:
1054 0 : ndr_print_ptr(ndr, "network", r->network);
1055 0 : ndr->depth++;
1056 0 : if (r->network) {
1057 0 : ndr_print_netr_NetworkInfo(ndr, "network", r->network);
1058 : }
1059 0 : ndr->depth--;
1060 0 : break;
1061 :
1062 0 : case NetlogonServiceTransitiveInformation:
1063 0 : ndr_print_ptr(ndr, "password", r->password);
1064 0 : ndr->depth++;
1065 0 : if (r->password) {
1066 0 : ndr_print_netr_PasswordInfo(ndr, "password", r->password);
1067 : }
1068 0 : ndr->depth--;
1069 0 : break;
1070 :
1071 0 : default:
1072 0 : break;
1073 :
1074 : }
1075 0 : }
1076 :
1077 65774 : _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r)
1078 : {
1079 : {
1080 65774 : uint32_t _flags_save_STRUCT = ndr->flags;
1081 65774 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1082 65774 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1083 65774 : if (ndr_flags & NDR_SCALARS) {
1084 65774 : NDR_CHECK(ndr_push_align(ndr, 1));
1085 65774 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 16));
1086 65774 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1087 : }
1088 65774 : if (ndr_flags & NDR_BUFFERS) {
1089 : }
1090 65774 : ndr->flags = _flags_save_STRUCT;
1091 : }
1092 65774 : return NDR_ERR_SUCCESS;
1093 : }
1094 :
1095 78379 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r)
1096 : {
1097 78379 : uint32_t size_key_0 = 0;
1098 : {
1099 78379 : uint32_t _flags_save_STRUCT = ndr->flags;
1100 78379 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1101 78379 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1102 78379 : if (ndr_flags & NDR_SCALARS) {
1103 78379 : NDR_CHECK(ndr_pull_align(ndr, 1));
1104 78379 : size_key_0 = 16;
1105 78379 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, size_key_0));
1106 78379 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1107 : }
1108 78379 : if (ndr_flags & NDR_BUFFERS) {
1109 : }
1110 78379 : ndr->flags = _flags_save_STRUCT;
1111 : }
1112 78379 : return NDR_ERR_SUCCESS;
1113 : }
1114 :
1115 0 : static void ndr_print_flags_netr_UserSessionKey(struct ndr_print *ndr, const char *name, int unused, const struct netr_UserSessionKey *r)
1116 : {
1117 0 : ndr_print_netr_UserSessionKey(ndr, name, r);
1118 0 : }
1119 :
1120 1948 : _PUBLIC_ void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r)
1121 : {
1122 1948 : ndr_print_struct(ndr, name, "netr_UserSessionKey");
1123 1948 : if (r == NULL) { ndr_print_null(ndr); return; }
1124 : {
1125 1948 : uint32_t _flags_save_STRUCT = ndr->flags;
1126 1948 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1127 1948 : ndr->depth++;
1128 1948 : ndr_print_array_uint8(ndr, "key", r->key, 16);
1129 1948 : ndr->depth--;
1130 1948 : ndr->flags = _flags_save_STRUCT;
1131 : }
1132 : }
1133 :
1134 65774 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LMSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_LMSessionKey *r)
1135 : {
1136 : {
1137 65774 : uint32_t _flags_save_STRUCT = ndr->flags;
1138 65774 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1139 65774 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1140 65774 : if (ndr_flags & NDR_SCALARS) {
1141 65774 : NDR_CHECK(ndr_push_align(ndr, 1));
1142 65774 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 8));
1143 65774 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1144 : }
1145 65774 : if (ndr_flags & NDR_BUFFERS) {
1146 : }
1147 65774 : ndr->flags = _flags_save_STRUCT;
1148 : }
1149 65774 : return NDR_ERR_SUCCESS;
1150 : }
1151 :
1152 78379 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_LMSessionKey *r)
1153 : {
1154 78379 : uint32_t size_key_0 = 0;
1155 : {
1156 78379 : uint32_t _flags_save_STRUCT = ndr->flags;
1157 78379 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1158 78379 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1159 78379 : if (ndr_flags & NDR_SCALARS) {
1160 78379 : NDR_CHECK(ndr_pull_align(ndr, 1));
1161 78379 : size_key_0 = 8;
1162 78379 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, size_key_0));
1163 78379 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1164 : }
1165 78379 : if (ndr_flags & NDR_BUFFERS) {
1166 : }
1167 78379 : ndr->flags = _flags_save_STRUCT;
1168 : }
1169 78379 : return NDR_ERR_SUCCESS;
1170 : }
1171 :
1172 0 : static void ndr_print_flags_netr_LMSessionKey(struct ndr_print *ndr, const char *name, int unused, const struct netr_LMSessionKey *r)
1173 : {
1174 0 : ndr_print_netr_LMSessionKey(ndr, name, r);
1175 0 : }
1176 :
1177 1948 : _PUBLIC_ void ndr_print_netr_LMSessionKey(struct ndr_print *ndr, const char *name, const struct netr_LMSessionKey *r)
1178 : {
1179 1948 : ndr_print_struct(ndr, name, "netr_LMSessionKey");
1180 1948 : if (r == NULL) { ndr_print_null(ndr); return; }
1181 : {
1182 1948 : uint32_t _flags_save_STRUCT = ndr->flags;
1183 1948 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1184 1948 : ndr->depth++;
1185 1948 : ndr_print_array_uint8(ndr, "key", r->key, 8);
1186 1948 : ndr->depth--;
1187 1948 : ndr->flags = _flags_save_STRUCT;
1188 : }
1189 : }
1190 :
1191 65774 : _PUBLIC_ enum ndr_err_code ndr_push_netr_UserFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
1192 : {
1193 65774 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1194 65774 : return NDR_ERR_SUCCESS;
1195 : }
1196 :
1197 78379 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
1198 : {
1199 : uint32_t v;
1200 78379 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1201 78379 : *r = v;
1202 78379 : return NDR_ERR_SUCCESS;
1203 : }
1204 :
1205 1948 : _PUBLIC_ void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name, uint32_t r)
1206 : {
1207 1948 : ndr_print_uint32(ndr, name, r);
1208 1948 : ndr->depth++;
1209 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_GUEST", NETLOGON_GUEST, r);
1210 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NOENCRYPTION", NETLOGON_NOENCRYPTION, r);
1211 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_CACHED_ACCOUNT", NETLOGON_CACHED_ACCOUNT, r);
1212 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_USED_LM_PASSWORD", NETLOGON_USED_LM_PASSWORD, r);
1213 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_EXTRA_SIDS", NETLOGON_EXTRA_SIDS, r);
1214 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SUBAUTH_SESSION_KEY", NETLOGON_SUBAUTH_SESSION_KEY, r);
1215 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SERVER_TRUST_ACCOUNT", NETLOGON_SERVER_TRUST_ACCOUNT, r);
1216 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NTLMV2_ENABLED", NETLOGON_NTLMV2_ENABLED, r);
1217 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_RESOURCE_GROUPS", NETLOGON_RESOURCE_GROUPS, r);
1218 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_PROFILE_PATH_RETURNED", NETLOGON_PROFILE_PATH_RETURNED, r);
1219 1948 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_GRACE_LOGON", NETLOGON_GRACE_LOGON, r);
1220 1948 : ndr->depth--;
1221 1948 : }
1222 :
1223 131548 : static enum ndr_err_code ndr_push_netr_SamBaseInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_SamBaseInfo *r)
1224 : {
1225 131548 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1226 131548 : if (ndr_flags & NDR_SCALARS) {
1227 65774 : NDR_CHECK(ndr_push_align(ndr, 5));
1228 65774 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logon_time));
1229 65774 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logoff_time));
1230 65774 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->kickoff_time));
1231 65774 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
1232 65774 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
1233 65774 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
1234 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
1235 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
1236 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
1237 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
1238 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
1239 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
1240 65774 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
1241 65774 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
1242 65774 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
1243 65774 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
1244 65774 : NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
1245 65774 : NDR_CHECK(ndr_push_netr_UserFlags(ndr, NDR_SCALARS, r->user_flags));
1246 : {
1247 65774 : uint32_t _flags_save_netr_UserSessionKey = ndr->flags;
1248 65774 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1249 65774 : NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
1250 65774 : ndr->flags = _flags_save_netr_UserSessionKey;
1251 : }
1252 65774 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
1253 65774 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_domain));
1254 65774 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
1255 : {
1256 65774 : uint32_t _flags_save_netr_LMSessionKey = ndr->flags;
1257 65774 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1258 65774 : NDR_CHECK(ndr_push_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
1259 65774 : ndr->flags = _flags_save_netr_LMSessionKey;
1260 : }
1261 65774 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
1262 65774 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sub_auth_status));
1263 65774 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_successful_logon));
1264 65774 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_failed_logon));
1265 65774 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->failed_logon_count));
1266 65774 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
1267 65774 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1268 : }
1269 131548 : if (ndr_flags & NDR_BUFFERS) {
1270 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
1271 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
1272 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
1273 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
1274 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
1275 65774 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
1276 65774 : NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
1277 65774 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
1278 65774 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_domain));
1279 65774 : if (r->domain_sid) {
1280 65774 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
1281 : }
1282 : }
1283 131548 : return NDR_ERR_SUCCESS;
1284 : }
1285 :
1286 156758 : static enum ndr_err_code ndr_pull_netr_SamBaseInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_SamBaseInfo *r)
1287 : {
1288 : uint32_t _ptr_domain_sid;
1289 156758 : TALLOC_CTX *_mem_save_domain_sid_0 = NULL;
1290 156758 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1291 156758 : if (ndr_flags & NDR_SCALARS) {
1292 78379 : NDR_CHECK(ndr_pull_align(ndr, 5));
1293 78379 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logon_time));
1294 78379 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logoff_time));
1295 78379 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->kickoff_time));
1296 78379 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
1297 78379 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
1298 78379 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
1299 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
1300 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
1301 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
1302 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
1303 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
1304 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
1305 78379 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
1306 78379 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
1307 78379 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
1308 78379 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
1309 78379 : NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
1310 78379 : NDR_CHECK(ndr_pull_netr_UserFlags(ndr, NDR_SCALARS, &r->user_flags));
1311 : {
1312 78379 : uint32_t _flags_save_netr_UserSessionKey = ndr->flags;
1313 78379 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1314 78379 : NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
1315 78379 : ndr->flags = _flags_save_netr_UserSessionKey;
1316 : }
1317 78379 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
1318 78379 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_domain));
1319 78379 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
1320 78379 : if (_ptr_domain_sid) {
1321 78379 : NDR_PULL_ALLOC(ndr, r->domain_sid);
1322 : } else {
1323 0 : r->domain_sid = NULL;
1324 : }
1325 : {
1326 78379 : uint32_t _flags_save_netr_LMSessionKey = ndr->flags;
1327 78379 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1328 78379 : NDR_CHECK(ndr_pull_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
1329 78379 : ndr->flags = _flags_save_netr_LMSessionKey;
1330 : }
1331 78379 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
1332 78379 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_auth_status));
1333 78379 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_successful_logon));
1334 78379 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_failed_logon));
1335 78379 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->failed_logon_count));
1336 78379 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1337 78379 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1338 : }
1339 156758 : if (ndr_flags & NDR_BUFFERS) {
1340 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
1341 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
1342 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
1343 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
1344 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
1345 78379 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
1346 78379 : NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
1347 78379 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
1348 78379 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_domain));
1349 78379 : if (r->domain_sid) {
1350 78379 : _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1351 78379 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
1352 78379 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
1353 78379 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
1354 : }
1355 : }
1356 156758 : return NDR_ERR_SUCCESS;
1357 : }
1358 :
1359 1948 : _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name, const struct netr_SamBaseInfo *r)
1360 : {
1361 1948 : ndr_print_struct(ndr, name, "netr_SamBaseInfo");
1362 1948 : if (r == NULL) { ndr_print_null(ndr); return; }
1363 1948 : ndr->depth++;
1364 1948 : ndr_print_NTTIME(ndr, "logon_time", r->logon_time);
1365 1948 : ndr_print_NTTIME(ndr, "logoff_time", r->logoff_time);
1366 1948 : ndr_print_NTTIME(ndr, "kickoff_time", r->kickoff_time);
1367 1948 : ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
1368 1948 : ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
1369 1948 : ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
1370 1948 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
1371 1948 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
1372 1948 : ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
1373 1948 : ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
1374 1948 : ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
1375 1948 : ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
1376 1948 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
1377 1948 : ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
1378 1948 : ndr_print_uint32(ndr, "rid", r->rid);
1379 1948 : ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
1380 1948 : ndr_print_samr_RidWithAttributeArray(ndr, "groups", &r->groups);
1381 1948 : ndr_print_netr_UserFlags(ndr, "user_flags", r->user_flags);
1382 : {
1383 1948 : uint32_t _flags_save_netr_UserSessionKey = ndr->flags;
1384 1948 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1385 1948 : ndr_print_netr_UserSessionKey(ndr, "key", &r->key);
1386 1948 : ndr->flags = _flags_save_netr_UserSessionKey;
1387 : }
1388 1948 : ndr_print_lsa_StringLarge(ndr, "logon_server", &r->logon_server);
1389 1948 : ndr_print_lsa_StringLarge(ndr, "logon_domain", &r->logon_domain);
1390 1948 : ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
1391 1948 : ndr->depth++;
1392 1948 : if (r->domain_sid) {
1393 1948 : ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
1394 : }
1395 1948 : ndr->depth--;
1396 : {
1397 1948 : uint32_t _flags_save_netr_LMSessionKey = ndr->flags;
1398 1948 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
1399 1948 : ndr_print_netr_LMSessionKey(ndr, "LMSessKey", &r->LMSessKey);
1400 1948 : ndr->flags = _flags_save_netr_LMSessionKey;
1401 : }
1402 1948 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
1403 1948 : ndr_print_uint32(ndr, "sub_auth_status", r->sub_auth_status);
1404 1948 : ndr_print_NTTIME(ndr, "last_successful_logon", r->last_successful_logon);
1405 1948 : ndr_print_NTTIME(ndr, "last_failed_logon", r->last_failed_logon);
1406 1948 : ndr_print_uint32(ndr, "failed_logon_count", r->failed_logon_count);
1407 1948 : ndr_print_uint32(ndr, "reserved", r->reserved);
1408 1948 : ndr->depth--;
1409 : }
1410 :
1411 3351 : static enum ndr_err_code ndr_push_netr_SamInfo2(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo2 *r)
1412 : {
1413 3351 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1414 3351 : if (ndr_flags & NDR_SCALARS) {
1415 3351 : NDR_CHECK(ndr_push_align(ndr, 5));
1416 3351 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1417 3351 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1418 : }
1419 3351 : if (ndr_flags & NDR_BUFFERS) {
1420 3351 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1421 : }
1422 3351 : return NDR_ERR_SUCCESS;
1423 : }
1424 :
1425 2892 : static enum ndr_err_code ndr_pull_netr_SamInfo2(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo2 *r)
1426 : {
1427 2892 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1428 2892 : if (ndr_flags & NDR_SCALARS) {
1429 2892 : NDR_CHECK(ndr_pull_align(ndr, 5));
1430 2892 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1431 2892 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1432 : }
1433 2892 : if (ndr_flags & NDR_BUFFERS) {
1434 2892 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1435 : }
1436 2892 : return NDR_ERR_SUCCESS;
1437 : }
1438 :
1439 918 : _PUBLIC_ void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, const struct netr_SamInfo2 *r)
1440 : {
1441 918 : ndr_print_struct(ndr, name, "netr_SamInfo2");
1442 918 : if (r == NULL) { ndr_print_null(ndr); return; }
1443 918 : ndr->depth++;
1444 918 : ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
1445 918 : ndr->depth--;
1446 : }
1447 :
1448 124830 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SidAttr(struct ndr_push *ndr, int ndr_flags, const struct netr_SidAttr *r)
1449 : {
1450 124830 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1451 124830 : if (ndr_flags & NDR_SCALARS) {
1452 62415 : NDR_CHECK(ndr_push_align(ndr, 5));
1453 62415 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1454 62415 : NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
1455 62415 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1456 : }
1457 124830 : if (ndr_flags & NDR_BUFFERS) {
1458 62415 : if (r->sid) {
1459 62415 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1460 : }
1461 : }
1462 124830 : return NDR_ERR_SUCCESS;
1463 : }
1464 :
1465 150440 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SidAttr(struct ndr_pull *ndr, int ndr_flags, struct netr_SidAttr *r)
1466 : {
1467 : uint32_t _ptr_sid;
1468 150440 : TALLOC_CTX *_mem_save_sid_0 = NULL;
1469 150440 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1470 150440 : if (ndr_flags & NDR_SCALARS) {
1471 75220 : NDR_CHECK(ndr_pull_align(ndr, 5));
1472 75220 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1473 75220 : if (_ptr_sid) {
1474 75220 : NDR_PULL_ALLOC(ndr, r->sid);
1475 : } else {
1476 0 : r->sid = NULL;
1477 : }
1478 75220 : NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
1479 75220 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1480 : }
1481 150440 : if (ndr_flags & NDR_BUFFERS) {
1482 75220 : if (r->sid) {
1483 75220 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1484 75220 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1485 75220 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1486 75220 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1487 : }
1488 : }
1489 150440 : return NDR_ERR_SUCCESS;
1490 : }
1491 :
1492 0 : static void ndr_print_flags_netr_SidAttr(struct ndr_print *ndr, const char *name, int unused, const struct netr_SidAttr *r)
1493 : {
1494 0 : ndr_print_netr_SidAttr(ndr, name, r);
1495 0 : }
1496 :
1497 0 : _PUBLIC_ void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, const struct netr_SidAttr *r)
1498 : {
1499 0 : ndr_print_struct(ndr, name, "netr_SidAttr");
1500 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1501 0 : ndr->depth++;
1502 0 : ndr_print_ptr(ndr, "sid", r->sid);
1503 0 : ndr->depth++;
1504 0 : if (r->sid) {
1505 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
1506 : }
1507 0 : ndr->depth--;
1508 0 : ndr_print_security_GroupAttrs(ndr, "attributes", r->attributes);
1509 0 : ndr->depth--;
1510 : }
1511 :
1512 116506 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SamInfo3(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo3 *r)
1513 : {
1514 : uint32_t cntr_sids_1;
1515 116506 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1516 116506 : if (ndr_flags & NDR_SCALARS) {
1517 59938 : NDR_CHECK(ndr_push_align(ndr, 5));
1518 59938 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1519 59938 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
1520 59938 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
1521 59938 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1522 : }
1523 116506 : if (ndr_flags & NDR_BUFFERS) {
1524 59938 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1525 59938 : if (r->sids) {
1526 56485 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->sidcount));
1527 118884 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1528 62399 : NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1529 : }
1530 118884 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1531 62399 : NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1532 : }
1533 : }
1534 : }
1535 116506 : return NDR_ERR_SUCCESS;
1536 : }
1537 :
1538 143102 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo3 *r)
1539 : {
1540 : uint32_t _ptr_sids;
1541 143102 : uint32_t size_sids_1 = 0;
1542 : uint32_t cntr_sids_1;
1543 143102 : TALLOC_CTX *_mem_save_sids_0 = NULL;
1544 143102 : TALLOC_CTX *_mem_save_sids_1 = NULL;
1545 143102 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1546 143102 : if (ndr_flags & NDR_SCALARS) {
1547 73053 : NDR_CHECK(ndr_pull_align(ndr, 5));
1548 73053 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1549 73053 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
1550 73053 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
1551 73053 : if (_ptr_sids) {
1552 68871 : NDR_PULL_ALLOC(ndr, r->sids);
1553 : } else {
1554 4182 : r->sids = NULL;
1555 : }
1556 73053 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1557 : }
1558 143102 : if (ndr_flags & NDR_BUFFERS) {
1559 73053 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1560 73053 : if (r->sids) {
1561 68871 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1562 68871 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1563 68871 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
1564 68871 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
1565 68871 : NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
1566 68871 : _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1567 68871 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1568 144018 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1569 75147 : NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1570 : }
1571 144018 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1572 75147 : NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1573 : }
1574 68871 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
1575 68871 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
1576 : }
1577 73053 : if (r->sids) {
1578 68871 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
1579 : }
1580 79671 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1581 : }
1582 : }
1583 143102 : return NDR_ERR_SUCCESS;
1584 : }
1585 :
1586 0 : static void ndr_print_flags_netr_SamInfo3(struct ndr_print *ndr, const char *name, int unused, const struct netr_SamInfo3 *r)
1587 : {
1588 0 : ndr_print_netr_SamInfo3(ndr, name, r);
1589 0 : }
1590 :
1591 922 : _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r)
1592 : {
1593 : uint32_t cntr_sids_1;
1594 922 : ndr_print_struct(ndr, name, "netr_SamInfo3");
1595 922 : if (r == NULL) { ndr_print_null(ndr); return; }
1596 922 : ndr->depth++;
1597 922 : ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
1598 922 : ndr_print_uint32(ndr, "sidcount", r->sidcount);
1599 922 : ndr_print_ptr(ndr, "sids", r->sids);
1600 922 : ndr->depth++;
1601 922 : if (r->sids) {
1602 0 : ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->sidcount);
1603 0 : ndr->depth++;
1604 0 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1605 0 : ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
1606 : }
1607 0 : ndr->depth--;
1608 : }
1609 922 : ndr->depth--;
1610 922 : ndr->depth--;
1611 : }
1612 :
1613 2485 : static enum ndr_err_code ndr_push_netr_SamInfo6(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo6 *r)
1614 : {
1615 : uint32_t cntr_sids_1;
1616 : uint32_t cntr_unknown4_0;
1617 2485 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1618 2485 : if (ndr_flags & NDR_SCALARS) {
1619 2485 : NDR_CHECK(ndr_push_align(ndr, 5));
1620 2485 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1621 2485 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
1622 2485 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
1623 2485 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
1624 2485 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
1625 52185 : for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (20); cntr_unknown4_0++) {
1626 49700 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4[cntr_unknown4_0]));
1627 : }
1628 2485 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1629 : }
1630 2485 : if (ndr_flags & NDR_BUFFERS) {
1631 2485 : NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1632 2485 : if (r->sids) {
1633 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->sidcount));
1634 32 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1635 16 : NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1636 : }
1637 32 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1638 16 : NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1639 : }
1640 : }
1641 2485 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
1642 2485 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
1643 : }
1644 2485 : return NDR_ERR_SUCCESS;
1645 : }
1646 :
1647 2434 : static enum ndr_err_code ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo6 *r)
1648 : {
1649 : uint32_t _ptr_sids;
1650 2434 : uint32_t size_sids_1 = 0;
1651 : uint32_t cntr_sids_1;
1652 2434 : TALLOC_CTX *_mem_save_sids_0 = NULL;
1653 2434 : TALLOC_CTX *_mem_save_sids_1 = NULL;
1654 2434 : uint32_t size_unknown4_0 = 0;
1655 : uint32_t cntr_unknown4_0;
1656 2434 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1657 2434 : if (ndr_flags & NDR_SCALARS) {
1658 2434 : NDR_CHECK(ndr_pull_align(ndr, 5));
1659 2434 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
1660 2434 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
1661 2434 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
1662 2434 : if (_ptr_sids) {
1663 63 : NDR_PULL_ALLOC(ndr, r->sids);
1664 : } else {
1665 2371 : r->sids = NULL;
1666 : }
1667 2434 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
1668 2434 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
1669 2434 : size_unknown4_0 = 20;
1670 51114 : for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (size_unknown4_0); cntr_unknown4_0++) {
1671 48680 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4[cntr_unknown4_0]));
1672 : }
1673 2434 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1674 : }
1675 2434 : if (ndr_flags & NDR_BUFFERS) {
1676 2434 : NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
1677 2434 : if (r->sids) {
1678 63 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1679 63 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1680 63 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
1681 63 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
1682 63 : NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
1683 63 : _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1684 63 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1685 136 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1686 73 : NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1687 : }
1688 136 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1689 73 : NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1690 : }
1691 63 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
1692 63 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
1693 : }
1694 2434 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
1695 2434 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
1696 2434 : if (r->sids) {
1697 63 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
1698 : }
1699 2477 : for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
1700 : }
1701 : }
1702 2434 : return NDR_ERR_SUCCESS;
1703 : }
1704 :
1705 108 : _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r)
1706 : {
1707 : uint32_t cntr_sids_1;
1708 : uint32_t cntr_unknown4_0;
1709 108 : ndr_print_struct(ndr, name, "netr_SamInfo6");
1710 108 : if (r == NULL) { ndr_print_null(ndr); return; }
1711 108 : ndr->depth++;
1712 108 : ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
1713 108 : ndr_print_uint32(ndr, "sidcount", r->sidcount);
1714 108 : ndr_print_ptr(ndr, "sids", r->sids);
1715 108 : ndr->depth++;
1716 108 : if (r->sids) {
1717 0 : ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->sidcount);
1718 0 : ndr->depth++;
1719 0 : for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
1720 0 : ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
1721 : }
1722 0 : ndr->depth--;
1723 : }
1724 108 : ndr->depth--;
1725 108 : ndr_print_lsa_String(ndr, "dns_domainname", &r->dns_domainname);
1726 108 : ndr_print_lsa_String(ndr, "principal_name", &r->principal_name);
1727 108 : ndr->print(ndr, "%s: ARRAY(%d)", "unknown4", (int)20);
1728 108 : ndr->depth++;
1729 2268 : for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (20); cntr_unknown4_0++) {
1730 2160 : ndr_print_uint32(ndr, "unknown4", r->unknown4[cntr_unknown4_0]);
1731 : }
1732 108 : ndr->depth--;
1733 108 : ndr->depth--;
1734 : }
1735 :
1736 0 : static enum ndr_err_code ndr_push_netr_PacInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PacInfo *r)
1737 : {
1738 : uint32_t cntr_expansionroom_0;
1739 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1740 0 : if (ndr_flags & NDR_SCALARS) {
1741 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1742 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pac_size));
1743 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
1744 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
1745 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
1746 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
1747 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_size));
1748 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->auth));
1749 0 : NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
1750 0 : for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (10); cntr_expansionroom_0++) {
1751 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->expansionroom[cntr_expansionroom_0]));
1752 : }
1753 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
1754 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
1755 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
1756 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
1757 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1758 : }
1759 0 : if (ndr_flags & NDR_BUFFERS) {
1760 0 : if (r->pac) {
1761 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->pac_size));
1762 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pac, r->pac_size));
1763 : }
1764 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
1765 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
1766 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
1767 0 : if (r->auth) {
1768 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->auth_size));
1769 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->auth, r->auth_size));
1770 : }
1771 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
1772 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
1773 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
1774 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
1775 : }
1776 0 : return NDR_ERR_SUCCESS;
1777 : }
1778 :
1779 0 : static enum ndr_err_code ndr_pull_netr_PacInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PacInfo *r)
1780 : {
1781 : uint32_t _ptr_pac;
1782 0 : uint32_t size_pac_1 = 0;
1783 0 : TALLOC_CTX *_mem_save_pac_0 = NULL;
1784 : uint32_t _ptr_auth;
1785 0 : uint32_t size_auth_1 = 0;
1786 0 : TALLOC_CTX *_mem_save_auth_0 = NULL;
1787 0 : uint32_t size_expansionroom_0 = 0;
1788 : uint32_t cntr_expansionroom_0;
1789 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1790 0 : if (ndr_flags & NDR_SCALARS) {
1791 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1792 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pac_size));
1793 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
1794 0 : if (_ptr_pac) {
1795 0 : NDR_PULL_ALLOC(ndr, r->pac);
1796 : } else {
1797 0 : r->pac = NULL;
1798 : }
1799 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
1800 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
1801 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
1802 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_size));
1803 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_auth));
1804 0 : if (_ptr_auth) {
1805 0 : NDR_PULL_ALLOC(ndr, r->auth);
1806 : } else {
1807 0 : r->auth = NULL;
1808 : }
1809 0 : NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
1810 0 : size_expansionroom_0 = 10;
1811 0 : for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (size_expansionroom_0); cntr_expansionroom_0++) {
1812 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->expansionroom[cntr_expansionroom_0]));
1813 : }
1814 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
1815 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
1816 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
1817 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
1818 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1819 : }
1820 0 : if (ndr_flags & NDR_BUFFERS) {
1821 0 : if (r->pac) {
1822 0 : _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr);
1823 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0);
1824 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pac));
1825 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pac, &size_pac_1));
1826 0 : NDR_PULL_ALLOC_N(ndr, r->pac, size_pac_1);
1827 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pac, size_pac_1));
1828 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
1829 : }
1830 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
1831 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
1832 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
1833 0 : if (r->auth) {
1834 0 : _mem_save_auth_0 = NDR_PULL_GET_MEM_CTX(ndr);
1835 0 : NDR_PULL_SET_MEM_CTX(ndr, r->auth, 0);
1836 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->auth));
1837 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->auth, &size_auth_1));
1838 0 : NDR_PULL_ALLOC_N(ndr, r->auth, size_auth_1);
1839 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->auth, size_auth_1));
1840 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_0, 0);
1841 : }
1842 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
1843 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
1844 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
1845 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
1846 0 : if (r->pac) {
1847 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->pac, r->pac_size));
1848 : }
1849 0 : if (r->auth) {
1850 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->auth, r->auth_size));
1851 : }
1852 : }
1853 0 : return NDR_ERR_SUCCESS;
1854 : }
1855 :
1856 0 : _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r)
1857 : {
1858 : uint32_t cntr_expansionroom_0;
1859 0 : ndr_print_struct(ndr, name, "netr_PacInfo");
1860 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1861 0 : ndr->depth++;
1862 0 : ndr_print_uint32(ndr, "pac_size", r->pac_size);
1863 0 : ndr_print_ptr(ndr, "pac", r->pac);
1864 0 : ndr->depth++;
1865 0 : if (r->pac) {
1866 0 : ndr_print_array_uint8(ndr, "pac", r->pac, r->pac_size);
1867 : }
1868 0 : ndr->depth--;
1869 0 : ndr_print_lsa_String(ndr, "logon_domain", &r->logon_domain);
1870 0 : ndr_print_lsa_String(ndr, "logon_server", &r->logon_server);
1871 0 : ndr_print_lsa_String(ndr, "principal_name", &r->principal_name);
1872 0 : ndr_print_uint32(ndr, "auth_size", r->auth_size);
1873 0 : ndr_print_ptr(ndr, "auth", r->auth);
1874 0 : ndr->depth++;
1875 0 : if (r->auth) {
1876 0 : ndr_print_array_uint8(ndr, "auth", r->auth, r->auth_size);
1877 : }
1878 0 : ndr->depth--;
1879 0 : ndr_print_netr_UserSessionKey(ndr, "user_session_key", &r->user_session_key);
1880 0 : ndr->print(ndr, "%s: ARRAY(%d)", "expansionroom", (int)10);
1881 0 : ndr->depth++;
1882 0 : for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (10); cntr_expansionroom_0++) {
1883 0 : ndr_print_uint32(ndr, "expansionroom", r->expansionroom[cntr_expansionroom_0]);
1884 : }
1885 0 : ndr->depth--;
1886 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
1887 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
1888 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
1889 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
1890 0 : ndr->depth--;
1891 : }
1892 :
1893 120 : static enum ndr_err_code ndr_push_netr_GenericInfo2(struct ndr_push *ndr, int ndr_flags, const struct netr_GenericInfo2 *r)
1894 : {
1895 : {
1896 120 : uint32_t _flags_save_STRUCT = ndr->flags;
1897 120 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1898 120 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1899 120 : if (ndr_flags & NDR_SCALARS) {
1900 120 : NDR_CHECK(ndr_push_align(ndr, 5));
1901 120 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
1902 120 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
1903 120 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1904 : }
1905 120 : if (ndr_flags & NDR_BUFFERS) {
1906 120 : if (r->data) {
1907 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
1908 24 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
1909 : }
1910 : }
1911 120 : ndr->flags = _flags_save_STRUCT;
1912 : }
1913 120 : return NDR_ERR_SUCCESS;
1914 : }
1915 :
1916 120 : static enum ndr_err_code ndr_pull_netr_GenericInfo2(struct ndr_pull *ndr, int ndr_flags, struct netr_GenericInfo2 *r)
1917 : {
1918 : uint32_t _ptr_data;
1919 120 : uint32_t size_data_1 = 0;
1920 120 : TALLOC_CTX *_mem_save_data_0 = NULL;
1921 : {
1922 120 : uint32_t _flags_save_STRUCT = ndr->flags;
1923 120 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1924 120 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1925 120 : if (ndr_flags & NDR_SCALARS) {
1926 120 : NDR_CHECK(ndr_pull_align(ndr, 5));
1927 120 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
1928 120 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
1929 120 : if (_ptr_data) {
1930 24 : NDR_PULL_ALLOC(ndr, r->data);
1931 : } else {
1932 96 : r->data = NULL;
1933 : }
1934 120 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1935 : }
1936 120 : if (ndr_flags & NDR_BUFFERS) {
1937 120 : if (r->data) {
1938 24 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1939 24 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
1940 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
1941 24 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
1942 24 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
1943 24 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
1944 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
1945 : }
1946 120 : if (r->data) {
1947 24 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
1948 : }
1949 : }
1950 120 : ndr->flags = _flags_save_STRUCT;
1951 : }
1952 120 : return NDR_ERR_SUCCESS;
1953 : }
1954 :
1955 0 : _PUBLIC_ void ndr_print_netr_GenericInfo2(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo2 *r)
1956 : {
1957 0 : ndr_print_struct(ndr, name, "netr_GenericInfo2");
1958 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1959 : {
1960 0 : uint32_t _flags_save_STRUCT = ndr->flags;
1961 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1962 0 : ndr->depth++;
1963 0 : ndr_print_uint32(ndr, "length", r->length);
1964 0 : ndr_print_ptr(ndr, "data", r->data);
1965 0 : ndr->depth++;
1966 0 : if (r->data) {
1967 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
1968 : }
1969 0 : ndr->depth--;
1970 0 : ndr->depth--;
1971 0 : ndr->flags = _flags_save_STRUCT;
1972 : }
1973 : }
1974 :
1975 16162 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r)
1976 : {
1977 : uint32_t level;
1978 16162 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1979 16162 : if (ndr_flags & NDR_SCALARS) {
1980 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1981 16162 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1982 16162 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1983 16162 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
1984 : /* ms_union is always aligned to the largest union arm*/
1985 16162 : NDR_CHECK(ndr_push_align(ndr, 5));
1986 16162 : switch (level) {
1987 5645 : case NetlogonValidationSamInfo: {
1988 5645 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam2));
1989 5645 : break; }
1990 :
1991 5490 : case NetlogonValidationSamInfo2: {
1992 5490 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam3));
1993 5490 : break; }
1994 :
1995 0 : case 4: {
1996 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
1997 0 : break; }
1998 :
1999 120 : case NetlogonValidationGenericInfo2: {
2000 120 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
2001 120 : break; }
2002 :
2003 4342 : case NetlogonValidationSamInfo4: {
2004 4342 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam6));
2005 4342 : break; }
2006 :
2007 565 : default: {
2008 565 : break; }
2009 :
2010 : }
2011 0 : }
2012 16162 : if (ndr_flags & NDR_BUFFERS) {
2013 16162 : if (!(ndr_flags & NDR_SCALARS)) {
2014 : /* We didn't get it above, and the token is not needed after this. */
2015 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2016 : }
2017 16162 : switch (level) {
2018 5645 : case NetlogonValidationSamInfo:
2019 5645 : if (r->sam2) {
2020 3351 : NDR_CHECK(ndr_push_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
2021 : }
2022 5645 : break;
2023 :
2024 5490 : case NetlogonValidationSamInfo2:
2025 5490 : if (r->sam3) {
2026 3370 : NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
2027 : }
2028 5490 : break;
2029 :
2030 0 : case 4:
2031 0 : if (r->pac) {
2032 0 : NDR_CHECK(ndr_push_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
2033 : }
2034 0 : break;
2035 :
2036 120 : case NetlogonValidationGenericInfo2:
2037 120 : if (r->generic) {
2038 120 : NDR_CHECK(ndr_push_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
2039 : }
2040 120 : break;
2041 :
2042 4342 : case NetlogonValidationSamInfo4:
2043 4342 : if (r->sam6) {
2044 2485 : NDR_CHECK(ndr_push_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
2045 : }
2046 4342 : break;
2047 :
2048 565 : default:
2049 565 : break;
2050 :
2051 : }
2052 0 : }
2053 16162 : return NDR_ERR_SUCCESS;
2054 : }
2055 :
2056 14565 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int ndr_flags, union netr_Validation *r)
2057 : {
2058 : uint32_t level;
2059 : uint16_t _level;
2060 14565 : TALLOC_CTX *_mem_save_sam2_0 = NULL;
2061 : uint32_t _ptr_sam2;
2062 14565 : TALLOC_CTX *_mem_save_sam3_0 = NULL;
2063 : uint32_t _ptr_sam3;
2064 14565 : TALLOC_CTX *_mem_save_pac_0 = NULL;
2065 : uint32_t _ptr_pac;
2066 14565 : TALLOC_CTX *_mem_save_generic_0 = NULL;
2067 : uint32_t _ptr_generic;
2068 14565 : TALLOC_CTX *_mem_save_sam6_0 = NULL;
2069 : uint32_t _ptr_sam6;
2070 14565 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2071 14565 : if (ndr_flags & NDR_SCALARS) {
2072 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2073 14565 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2074 14565 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2075 14565 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
2076 14565 : if (_level != level) {
2077 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
2078 : }
2079 : /* ms_union is always aligned to the largest union arm*/
2080 14565 : NDR_CHECK(ndr_pull_align(ndr, 5));
2081 14565 : switch (level) {
2082 4924 : case NetlogonValidationSamInfo: {
2083 4924 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam2));
2084 4924 : if (_ptr_sam2) {
2085 2892 : NDR_PULL_ALLOC(ndr, r->sam2);
2086 : } else {
2087 2032 : r->sam2 = NULL;
2088 : }
2089 4924 : break; }
2090 :
2091 4898 : case NetlogonValidationSamInfo2: {
2092 4898 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam3));
2093 4898 : if (_ptr_sam3) {
2094 3004 : NDR_PULL_ALLOC(ndr, r->sam3);
2095 : } else {
2096 1894 : r->sam3 = NULL;
2097 : }
2098 4898 : break; }
2099 :
2100 0 : case 4: {
2101 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
2102 0 : if (_ptr_pac) {
2103 0 : NDR_PULL_ALLOC(ndr, r->pac);
2104 : } else {
2105 0 : r->pac = NULL;
2106 : }
2107 0 : break; }
2108 :
2109 120 : case NetlogonValidationGenericInfo2: {
2110 120 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
2111 120 : if (_ptr_generic) {
2112 120 : NDR_PULL_ALLOC(ndr, r->generic);
2113 : } else {
2114 0 : r->generic = NULL;
2115 : }
2116 120 : break; }
2117 :
2118 4171 : case NetlogonValidationSamInfo4: {
2119 4171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam6));
2120 4171 : if (_ptr_sam6) {
2121 2434 : NDR_PULL_ALLOC(ndr, r->sam6);
2122 : } else {
2123 1737 : r->sam6 = NULL;
2124 : }
2125 4171 : break; }
2126 :
2127 452 : default: {
2128 452 : break; }
2129 :
2130 : }
2131 0 : }
2132 14565 : if (ndr_flags & NDR_BUFFERS) {
2133 14565 : if (!(ndr_flags & NDR_SCALARS)) {
2134 : /* We didn't get it above, and the token is not needed after this. */
2135 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2136 : }
2137 14565 : switch (level) {
2138 4924 : case NetlogonValidationSamInfo:
2139 4924 : if (r->sam2) {
2140 2892 : _mem_save_sam2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2141 2892 : NDR_PULL_SET_MEM_CTX(ndr, r->sam2, 0);
2142 2892 : NDR_CHECK(ndr_pull_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
2143 2892 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam2_0, 0);
2144 : }
2145 4924 : break;
2146 :
2147 4898 : case NetlogonValidationSamInfo2:
2148 4898 : if (r->sam3) {
2149 3004 : _mem_save_sam3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2150 3004 : NDR_PULL_SET_MEM_CTX(ndr, r->sam3, 0);
2151 3004 : NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
2152 3004 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam3_0, 0);
2153 : }
2154 4898 : break;
2155 :
2156 0 : case 4:
2157 0 : if (r->pac) {
2158 0 : _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr);
2159 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0);
2160 0 : NDR_CHECK(ndr_pull_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
2161 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
2162 : }
2163 0 : break;
2164 :
2165 120 : case NetlogonValidationGenericInfo2:
2166 120 : if (r->generic) {
2167 120 : _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
2168 120 : NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
2169 120 : NDR_CHECK(ndr_pull_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
2170 120 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
2171 : }
2172 120 : break;
2173 :
2174 4171 : case NetlogonValidationSamInfo4:
2175 4171 : if (r->sam6) {
2176 2434 : _mem_save_sam6_0 = NDR_PULL_GET_MEM_CTX(ndr);
2177 2434 : NDR_PULL_SET_MEM_CTX(ndr, r->sam6, 0);
2178 2434 : NDR_CHECK(ndr_pull_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
2179 2434 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam6_0, 0);
2180 : }
2181 4171 : break;
2182 :
2183 452 : default:
2184 452 : break;
2185 :
2186 : }
2187 0 : }
2188 14565 : return NDR_ERR_SUCCESS;
2189 : }
2190 :
2191 3146 : _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r)
2192 : {
2193 : uint32_t level;
2194 3146 : level = ndr_print_steal_switch_value(ndr, r);
2195 3146 : ndr_print_union(ndr, name, level, "netr_Validation");
2196 3146 : switch (level) {
2197 1442 : case NetlogonValidationSamInfo:
2198 1442 : ndr_print_ptr(ndr, "sam2", r->sam2);
2199 1442 : ndr->depth++;
2200 1442 : if (r->sam2) {
2201 918 : ndr_print_netr_SamInfo2(ndr, "sam2", r->sam2);
2202 : }
2203 1442 : ndr->depth--;
2204 1442 : break;
2205 :
2206 1370 : case NetlogonValidationSamInfo2:
2207 1370 : ndr_print_ptr(ndr, "sam3", r->sam3);
2208 1370 : ndr->depth++;
2209 1370 : if (r->sam3) {
2210 918 : ndr_print_netr_SamInfo3(ndr, "sam3", r->sam3);
2211 : }
2212 1370 : ndr->depth--;
2213 1370 : break;
2214 :
2215 0 : case 4:
2216 0 : ndr_print_ptr(ndr, "pac", r->pac);
2217 0 : ndr->depth++;
2218 0 : if (r->pac) {
2219 0 : ndr_print_netr_PacInfo(ndr, "pac", r->pac);
2220 : }
2221 0 : ndr->depth--;
2222 0 : break;
2223 :
2224 0 : case NetlogonValidationGenericInfo2:
2225 0 : ndr_print_ptr(ndr, "generic", r->generic);
2226 0 : ndr->depth++;
2227 0 : if (r->generic) {
2228 0 : ndr_print_netr_GenericInfo2(ndr, "generic", r->generic);
2229 : }
2230 0 : ndr->depth--;
2231 0 : break;
2232 :
2233 108 : case NetlogonValidationSamInfo4:
2234 108 : ndr_print_ptr(ndr, "sam6", r->sam6);
2235 108 : ndr->depth++;
2236 108 : if (r->sam6) {
2237 108 : ndr_print_netr_SamInfo6(ndr, "sam6", r->sam6);
2238 : }
2239 108 : ndr->depth--;
2240 108 : break;
2241 :
2242 226 : default:
2243 226 : break;
2244 :
2245 : }
2246 3146 : }
2247 :
2248 82343 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Credential(struct ndr_push *ndr, int ndr_flags, const struct netr_Credential *r)
2249 : {
2250 : {
2251 82343 : uint32_t _flags_save_STRUCT = ndr->flags;
2252 82343 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2253 82343 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2254 82343 : if (ndr_flags & NDR_SCALARS) {
2255 82343 : NDR_CHECK(ndr_push_align(ndr, 1));
2256 82343 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 8));
2257 82343 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2258 : }
2259 82343 : if (ndr_flags & NDR_BUFFERS) {
2260 : }
2261 82343 : ndr->flags = _flags_save_STRUCT;
2262 : }
2263 82343 : return NDR_ERR_SUCCESS;
2264 : }
2265 :
2266 84480 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Credential(struct ndr_pull *ndr, int ndr_flags, struct netr_Credential *r)
2267 : {
2268 84480 : uint32_t size_data_0 = 0;
2269 : {
2270 84480 : uint32_t _flags_save_STRUCT = ndr->flags;
2271 84480 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2272 84480 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2273 84480 : if (ndr_flags & NDR_SCALARS) {
2274 84480 : NDR_CHECK(ndr_pull_align(ndr, 1));
2275 84480 : size_data_0 = 8;
2276 84480 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
2277 84480 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2278 : }
2279 84480 : if (ndr_flags & NDR_BUFFERS) {
2280 : }
2281 84480 : ndr->flags = _flags_save_STRUCT;
2282 : }
2283 84480 : return NDR_ERR_SUCCESS;
2284 : }
2285 :
2286 0 : static void ndr_print_flags_netr_Credential(struct ndr_print *ndr, const char *name, int unused, const struct netr_Credential *r)
2287 : {
2288 0 : ndr_print_netr_Credential(ndr, name, r);
2289 0 : }
2290 :
2291 5450 : _PUBLIC_ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const struct netr_Credential *r)
2292 : {
2293 5450 : ndr_print_struct(ndr, name, "netr_Credential");
2294 5450 : if (r == NULL) { ndr_print_null(ndr); return; }
2295 : {
2296 5450 : uint32_t _flags_save_STRUCT = ndr->flags;
2297 5450 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2298 5450 : ndr->depth++;
2299 5450 : ndr_print_array_uint8(ndr, "data", r->data, 8);
2300 5450 : ndr->depth--;
2301 5450 : ndr->flags = _flags_save_STRUCT;
2302 : }
2303 : }
2304 :
2305 0 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_server_pipe_state(struct ndr_push *ndr, int ndr_flags, const struct netlogon_server_pipe_state *r)
2306 : {
2307 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2308 0 : if (ndr_flags & NDR_SCALARS) {
2309 0 : NDR_CHECK(ndr_push_align(ndr, 1));
2310 0 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
2311 0 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
2312 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2313 : }
2314 0 : if (ndr_flags & NDR_BUFFERS) {
2315 : }
2316 0 : return NDR_ERR_SUCCESS;
2317 : }
2318 :
2319 0 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_server_pipe_state(struct ndr_pull *ndr, int ndr_flags, struct netlogon_server_pipe_state *r)
2320 : {
2321 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2322 0 : if (ndr_flags & NDR_SCALARS) {
2323 0 : NDR_CHECK(ndr_pull_align(ndr, 1));
2324 0 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
2325 0 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
2326 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2327 : }
2328 0 : if (ndr_flags & NDR_BUFFERS) {
2329 : }
2330 0 : return NDR_ERR_SUCCESS;
2331 : }
2332 :
2333 0 : static void ndr_print_flags_netlogon_server_pipe_state(struct ndr_print *ndr, const char *name, int unused, const struct netlogon_server_pipe_state *r)
2334 : {
2335 0 : ndr_print_netlogon_server_pipe_state(ndr, name, r);
2336 0 : }
2337 :
2338 0 : _PUBLIC_ void ndr_print_netlogon_server_pipe_state(struct ndr_print *ndr, const char *name, const struct netlogon_server_pipe_state *r)
2339 : {
2340 0 : ndr_print_struct(ndr, name, "netlogon_server_pipe_state");
2341 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2342 0 : ndr->depth++;
2343 0 : ndr_print_netr_Credential(ndr, "client_challenge", &r->client_challenge);
2344 0 : ndr_print_netr_Credential(ndr, "server_challenge", &r->server_challenge);
2345 0 : ndr->depth--;
2346 : }
2347 :
2348 29847 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r)
2349 : {
2350 29847 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2351 29847 : if (ndr_flags & NDR_SCALARS) {
2352 29847 : NDR_CHECK(ndr_push_align(ndr, 4));
2353 29847 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->cred));
2354 29847 : NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
2355 29847 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2356 : }
2357 29847 : if (ndr_flags & NDR_BUFFERS) {
2358 : }
2359 29847 : return NDR_ERR_SUCCESS;
2360 : }
2361 :
2362 29053 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r)
2363 : {
2364 29053 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2365 29053 : if (ndr_flags & NDR_SCALARS) {
2366 29053 : NDR_CHECK(ndr_pull_align(ndr, 4));
2367 29053 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->cred));
2368 29053 : NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
2369 29053 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2370 : }
2371 29053 : if (ndr_flags & NDR_BUFFERS) {
2372 : }
2373 29053 : return NDR_ERR_SUCCESS;
2374 : }
2375 :
2376 0 : static void ndr_print_flags_netr_Authenticator(struct ndr_print *ndr, const char *name, int unused, const struct netr_Authenticator *r)
2377 : {
2378 0 : ndr_print_netr_Authenticator(ndr, name, r);
2379 0 : }
2380 :
2381 1766 : _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r)
2382 : {
2383 1766 : ndr_print_struct(ndr, name, "netr_Authenticator");
2384 1766 : if (r == NULL) { ndr_print_null(ndr); return; }
2385 1766 : ndr->depth++;
2386 1766 : ndr_print_netr_Credential(ndr, "cred", &r->cred);
2387 1766 : ndr_print_time_t(ndr, "timestamp", r->timestamp);
2388 1766 : ndr->depth--;
2389 : }
2390 :
2391 0 : static enum ndr_err_code ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_USER *r)
2392 : {
2393 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2394 0 : if (ndr_flags & NDR_SCALARS) {
2395 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2396 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
2397 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
2398 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
2399 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2400 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
2401 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
2402 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
2403 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
2404 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
2405 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2406 : }
2407 0 : if (ndr_flags & NDR_BUFFERS) {
2408 0 : if (r->account_name) {
2409 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
2410 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2411 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
2412 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));
2413 : }
2414 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
2415 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
2416 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2417 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
2418 : }
2419 0 : return NDR_ERR_SUCCESS;
2420 : }
2421 :
2422 0 : static enum ndr_err_code ndr_pull_netr_DELTA_DELETE_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_USER *r)
2423 : {
2424 : uint32_t _ptr_account_name;
2425 0 : uint32_t size_account_name_1 = 0;
2426 0 : uint32_t length_account_name_1 = 0;
2427 0 : TALLOC_CTX *_mem_save_account_name_0 = NULL;
2428 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2429 0 : if (ndr_flags & NDR_SCALARS) {
2430 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2431 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
2432 0 : if (_ptr_account_name) {
2433 0 : NDR_PULL_ALLOC(ndr, r->account_name);
2434 : } else {
2435 0 : r->account_name = NULL;
2436 : }
2437 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
2438 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
2439 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2440 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
2441 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
2442 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
2443 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
2444 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
2445 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2446 : }
2447 0 : if (ndr_flags & NDR_BUFFERS) {
2448 0 : if (r->account_name) {
2449 0 : _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2450 0 : NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
2451 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
2452 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
2453 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_1));
2454 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_1));
2455 0 : if (length_account_name_1 > size_account_name_1) {
2456 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
2457 : }
2458 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
2459 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
2460 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
2461 : }
2462 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
2463 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
2464 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2465 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
2466 : }
2467 0 : return NDR_ERR_SUCCESS;
2468 : }
2469 :
2470 0 : _PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r)
2471 : {
2472 0 : ndr_print_struct(ndr, name, "netr_DELTA_DELETE_USER");
2473 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2474 0 : ndr->depth++;
2475 0 : ndr_print_ptr(ndr, "account_name", r->account_name);
2476 0 : ndr->depth++;
2477 0 : if (r->account_name) {
2478 0 : ndr_print_string(ndr, "account_name", r->account_name);
2479 : }
2480 0 : ndr->depth--;
2481 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
2482 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
2483 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
2484 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
2485 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
2486 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
2487 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
2488 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
2489 0 : ndr->depth--;
2490 : }
2491 :
2492 0 : static enum ndr_err_code ndr_push_netr_USER_KEY16(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY16 *r)
2493 : {
2494 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2495 0 : if (ndr_flags & NDR_SCALARS) {
2496 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2497 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
2498 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
2499 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
2500 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->pwd));
2501 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2502 : }
2503 0 : if (ndr_flags & NDR_BUFFERS) {
2504 : }
2505 0 : return NDR_ERR_SUCCESS;
2506 : }
2507 :
2508 0 : static enum ndr_err_code ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY16 *r)
2509 : {
2510 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2511 0 : if (ndr_flags & NDR_SCALARS) {
2512 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2513 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
2514 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
2515 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
2516 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->pwd));
2517 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2518 : }
2519 0 : if (ndr_flags & NDR_BUFFERS) {
2520 : }
2521 0 : return NDR_ERR_SUCCESS;
2522 : }
2523 :
2524 0 : _PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r)
2525 : {
2526 0 : ndr_print_struct(ndr, name, "netr_USER_KEY16");
2527 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2528 0 : ndr->depth++;
2529 0 : ndr_print_uint16(ndr, "length", r->length);
2530 0 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size);
2531 0 : ndr_print_uint32(ndr, "flags", r->flags);
2532 0 : ndr_print_samr_Password(ndr, "pwd", &r->pwd);
2533 0 : ndr->depth--;
2534 : }
2535 :
2536 0 : static enum ndr_err_code ndr_push_netr_PasswordHistory(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordHistory *r)
2537 : {
2538 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2539 0 : if (ndr_flags & NDR_SCALARS) {
2540 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2541 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length));
2542 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length));
2543 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nt_flags));
2544 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length));
2545 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length));
2546 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lm_flags));
2547 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->nt_history, r->nt_length));
2548 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->lm_history, r->lm_length));
2549 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2550 : }
2551 0 : if (ndr_flags & NDR_BUFFERS) {
2552 : }
2553 0 : return NDR_ERR_SUCCESS;
2554 : }
2555 :
2556 0 : static enum ndr_err_code ndr_pull_netr_PasswordHistory(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordHistory *r)
2557 : {
2558 0 : uint32_t size_nt_history_0 = 0;
2559 0 : uint32_t size_lm_history_0 = 0;
2560 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2561 0 : if (ndr_flags & NDR_SCALARS) {
2562 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2563 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_length));
2564 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_size));
2565 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nt_flags));
2566 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_length));
2567 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_size));
2568 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lm_flags));
2569 0 : size_nt_history_0 = r->nt_length;
2570 0 : NDR_PULL_ALLOC_N(ndr, r->nt_history, size_nt_history_0);
2571 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->nt_history, size_nt_history_0));
2572 0 : size_lm_history_0 = r->lm_length;
2573 0 : NDR_PULL_ALLOC_N(ndr, r->lm_history, size_lm_history_0);
2574 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->lm_history, size_lm_history_0));
2575 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2576 : }
2577 0 : if (ndr_flags & NDR_BUFFERS) {
2578 : }
2579 0 : return NDR_ERR_SUCCESS;
2580 : }
2581 :
2582 0 : _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r)
2583 : {
2584 0 : ndr_print_struct(ndr, name, "netr_PasswordHistory");
2585 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2586 0 : ndr->depth++;
2587 0 : ndr_print_uint16(ndr, "nt_length", r->nt_length);
2588 0 : ndr_print_uint16(ndr, "nt_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->nt_length:r->nt_size);
2589 0 : ndr_print_uint32(ndr, "nt_flags", r->nt_flags);
2590 0 : ndr_print_uint16(ndr, "lm_length", r->lm_length);
2591 0 : ndr_print_uint16(ndr, "lm_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->lm_length:r->lm_size);
2592 0 : ndr_print_uint32(ndr, "lm_flags", r->lm_flags);
2593 0 : ndr_print_array_uint8(ndr, "nt_history", r->nt_history, r->nt_length);
2594 0 : ndr_print_array_uint8(ndr, "lm_history", r->lm_history, r->lm_length);
2595 0 : ndr->depth--;
2596 : }
2597 :
2598 0 : static enum ndr_err_code ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS2 *r)
2599 : {
2600 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2601 0 : if (ndr_flags & NDR_SCALARS) {
2602 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2603 0 : NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
2604 0 : NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
2605 0 : NDR_CHECK(ndr_push_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
2606 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2607 : }
2608 0 : if (ndr_flags & NDR_BUFFERS) {
2609 : }
2610 0 : return NDR_ERR_SUCCESS;
2611 : }
2612 :
2613 0 : static enum ndr_err_code ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS2 *r)
2614 : {
2615 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2616 0 : if (ndr_flags & NDR_SCALARS) {
2617 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2618 0 : NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
2619 0 : NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
2620 0 : NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
2621 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2622 : }
2623 0 : if (ndr_flags & NDR_BUFFERS) {
2624 : }
2625 0 : return NDR_ERR_SUCCESS;
2626 : }
2627 :
2628 0 : _PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS2 *r)
2629 : {
2630 0 : ndr_print_struct(ndr, name, "netr_USER_KEYS2");
2631 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2632 0 : ndr->depth++;
2633 0 : ndr_print_netr_USER_KEY16(ndr, "lmpassword", &r->lmpassword);
2634 0 : ndr_print_netr_USER_KEY16(ndr, "ntpassword", &r->ntpassword);
2635 0 : ndr_print_netr_PasswordHistory(ndr, "history", &r->history);
2636 0 : ndr->depth--;
2637 : }
2638 :
2639 0 : static enum ndr_err_code ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY_UNION *r)
2640 : {
2641 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2642 0 : if (ndr_flags & NDR_SCALARS) {
2643 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2644 0 : NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
2645 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2646 : }
2647 0 : if (ndr_flags & NDR_BUFFERS) {
2648 : }
2649 0 : return NDR_ERR_SUCCESS;
2650 : }
2651 :
2652 0 : static enum ndr_err_code ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY_UNION *r)
2653 : {
2654 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2655 0 : if (ndr_flags & NDR_SCALARS) {
2656 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2657 0 : NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
2658 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2659 : }
2660 0 : if (ndr_flags & NDR_BUFFERS) {
2661 : }
2662 0 : return NDR_ERR_SUCCESS;
2663 : }
2664 :
2665 0 : _PUBLIC_ void ndr_print_netr_USER_KEY_UNION(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY_UNION *r)
2666 : {
2667 0 : ndr_print_struct(ndr, name, "netr_USER_KEY_UNION");
2668 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2669 0 : ndr->depth++;
2670 0 : ndr_print_netr_USER_KEYS2(ndr, "keys2", &r->keys2);
2671 0 : ndr->depth--;
2672 : }
2673 :
2674 0 : _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS *r)
2675 : {
2676 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2677 0 : if (ndr_flags & NDR_SCALARS) {
2678 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2679 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2680 0 : NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
2681 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2682 : }
2683 0 : if (ndr_flags & NDR_BUFFERS) {
2684 : }
2685 0 : return NDR_ERR_SUCCESS;
2686 : }
2687 :
2688 0 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS *r)
2689 : {
2690 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2691 0 : if (ndr_flags & NDR_SCALARS) {
2692 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2693 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2694 0 : NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
2695 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2696 : }
2697 0 : if (ndr_flags & NDR_BUFFERS) {
2698 : }
2699 0 : return NDR_ERR_SUCCESS;
2700 : }
2701 :
2702 0 : static void ndr_print_flags_netr_USER_KEYS(struct ndr_print *ndr, const char *name, int unused, const struct netr_USER_KEYS *r)
2703 : {
2704 0 : ndr_print_netr_USER_KEYS(ndr, name, r);
2705 0 : }
2706 :
2707 0 : _PUBLIC_ void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS *r)
2708 : {
2709 0 : ndr_print_struct(ndr, name, "netr_USER_KEYS");
2710 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2711 0 : ndr->depth++;
2712 0 : ndr_print_uint32(ndr, "version", r->version);
2713 0 : ndr_print_netr_USER_KEY_UNION(ndr, "keys", &r->keys);
2714 0 : ndr->depth--;
2715 : }
2716 :
2717 0 : static enum ndr_err_code ndr_push_netr_USER_PRIVATE_INFO(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_PRIVATE_INFO *r)
2718 : {
2719 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2720 0 : if (ndr_flags & NDR_SCALARS) {
2721 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2722 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->SensitiveDataFlag));
2723 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DataLength));
2724 : {
2725 0 : uint32_t _flags_save_uint8 = ndr->flags;
2726 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2727 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->SensitiveData));
2728 0 : ndr->flags = _flags_save_uint8;
2729 : }
2730 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2731 : }
2732 0 : if (ndr_flags & NDR_BUFFERS) {
2733 : {
2734 0 : uint32_t _flags_save_uint8 = ndr->flags;
2735 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2736 0 : if (r->SensitiveData) {
2737 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->DataLength));
2738 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, r->DataLength));
2739 : }
2740 0 : ndr->flags = _flags_save_uint8;
2741 : }
2742 : }
2743 0 : return NDR_ERR_SUCCESS;
2744 : }
2745 :
2746 0 : static enum ndr_err_code ndr_pull_netr_USER_PRIVATE_INFO(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_PRIVATE_INFO *r)
2747 : {
2748 : uint32_t _ptr_SensitiveData;
2749 0 : uint32_t size_SensitiveData_1 = 0;
2750 0 : TALLOC_CTX *_mem_save_SensitiveData_0 = NULL;
2751 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2752 0 : if (ndr_flags & NDR_SCALARS) {
2753 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2754 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->SensitiveDataFlag));
2755 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataLength));
2756 : {
2757 0 : uint32_t _flags_save_uint8 = ndr->flags;
2758 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2759 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_SensitiveData));
2760 0 : if (_ptr_SensitiveData) {
2761 0 : NDR_PULL_ALLOC(ndr, r->SensitiveData);
2762 : } else {
2763 0 : r->SensitiveData = NULL;
2764 : }
2765 0 : ndr->flags = _flags_save_uint8;
2766 : }
2767 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2768 : }
2769 0 : if (ndr_flags & NDR_BUFFERS) {
2770 : {
2771 0 : uint32_t _flags_save_uint8 = ndr->flags;
2772 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2773 0 : if (r->SensitiveData) {
2774 0 : _mem_save_SensitiveData_0 = NDR_PULL_GET_MEM_CTX(ndr);
2775 0 : NDR_PULL_SET_MEM_CTX(ndr, r->SensitiveData, 0);
2776 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->SensitiveData));
2777 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->SensitiveData, &size_SensitiveData_1));
2778 0 : NDR_PULL_ALLOC_N(ndr, r->SensitiveData, size_SensitiveData_1);
2779 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, size_SensitiveData_1));
2780 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SensitiveData_0, 0);
2781 : }
2782 0 : ndr->flags = _flags_save_uint8;
2783 : }
2784 0 : if (r->SensitiveData) {
2785 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->SensitiveData, r->DataLength));
2786 : }
2787 : }
2788 0 : return NDR_ERR_SUCCESS;
2789 : }
2790 :
2791 0 : _PUBLIC_ void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char *name, const struct netr_USER_PRIVATE_INFO *r)
2792 : {
2793 0 : ndr_print_struct(ndr, name, "netr_USER_PRIVATE_INFO");
2794 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2795 0 : ndr->depth++;
2796 0 : ndr_print_uint8(ndr, "SensitiveDataFlag", r->SensitiveDataFlag);
2797 0 : ndr_print_uint32(ndr, "DataLength", r->DataLength);
2798 : {
2799 0 : uint32_t _flags_save_uint8 = ndr->flags;
2800 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2801 0 : ndr_print_ptr(ndr, "SensitiveData", r->SensitiveData);
2802 0 : ndr->depth++;
2803 0 : if (r->SensitiveData) {
2804 0 : ndr_print_array_uint8(ndr, "SensitiveData", r->SensitiveData, r->DataLength);
2805 : }
2806 0 : ndr->depth--;
2807 0 : ndr->flags = _flags_save_uint8;
2808 : }
2809 0 : ndr->depth--;
2810 : }
2811 :
2812 0 : static enum ndr_err_code ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_USER *r)
2813 : {
2814 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2815 0 : if (ndr_flags & NDR_SCALARS) {
2816 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2817 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2818 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2819 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2820 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
2821 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2822 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2823 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2824 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
2825 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2826 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
2827 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
2828 0 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2829 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
2830 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
2831 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
2832 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
2833 0 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
2834 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
2835 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
2836 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_present));
2837 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_present));
2838 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
2839 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
2840 0 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2841 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
2842 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
2843 0 : NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
2844 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
2845 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
2846 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2847 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
2848 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2849 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
2850 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
2851 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
2852 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
2853 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
2854 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2855 : }
2856 0 : if (ndr_flags & NDR_BUFFERS) {
2857 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2858 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2859 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2860 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2861 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2862 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
2863 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2864 0 : NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2865 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2866 0 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2867 0 : NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
2868 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
2869 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2870 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
2871 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2872 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
2873 : }
2874 0 : return NDR_ERR_SUCCESS;
2875 : }
2876 :
2877 0 : static enum ndr_err_code ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_USER *r)
2878 : {
2879 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2880 0 : if (ndr_flags & NDR_SCALARS) {
2881 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2882 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
2883 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
2884 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2885 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
2886 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
2887 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
2888 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
2889 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
2890 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
2891 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
2892 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
2893 0 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
2894 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
2895 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
2896 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
2897 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
2898 0 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
2899 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
2900 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
2901 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_present));
2902 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_present));
2903 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
2904 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
2905 0 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
2906 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
2907 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
2908 0 : NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
2909 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
2910 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
2911 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
2912 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
2913 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
2914 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
2915 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
2916 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
2917 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
2918 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
2919 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2920 : }
2921 0 : if (ndr_flags & NDR_BUFFERS) {
2922 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
2923 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
2924 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
2925 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
2926 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
2927 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
2928 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
2929 0 : NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
2930 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
2931 0 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
2932 0 : NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
2933 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
2934 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
2935 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
2936 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
2937 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
2938 : }
2939 0 : return NDR_ERR_SUCCESS;
2940 : }
2941 :
2942 0 : _PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_USER *r)
2943 : {
2944 0 : ndr_print_struct(ndr, name, "netr_DELTA_USER");
2945 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2946 0 : ndr->depth++;
2947 0 : ndr_print_lsa_String(ndr, "account_name", &r->account_name);
2948 0 : ndr_print_lsa_String(ndr, "full_name", &r->full_name);
2949 0 : ndr_print_uint32(ndr, "rid", r->rid);
2950 0 : ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
2951 0 : ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
2952 0 : ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
2953 0 : ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
2954 0 : ndr_print_lsa_String(ndr, "description", &r->description);
2955 0 : ndr_print_lsa_String(ndr, "workstations", &r->workstations);
2956 0 : ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
2957 0 : ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
2958 0 : ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
2959 0 : ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
2960 0 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
2961 0 : ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
2962 0 : ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
2963 0 : ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
2964 0 : ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
2965 0 : ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
2966 0 : ndr_print_uint8(ndr, "nt_password_present", r->nt_password_present);
2967 0 : ndr_print_uint8(ndr, "lm_password_present", r->lm_password_present);
2968 0 : ndr_print_uint8(ndr, "password_expired", r->password_expired);
2969 0 : ndr_print_lsa_String(ndr, "comment", &r->comment);
2970 0 : ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
2971 0 : ndr_print_uint16(ndr, "country_code", r->country_code);
2972 0 : ndr_print_uint16(ndr, "code_page", r->code_page);
2973 0 : ndr_print_netr_USER_PRIVATE_INFO(ndr, "user_private_info", &r->user_private_info);
2974 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
2975 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
2976 0 : ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
2977 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
2978 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
2979 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
2980 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
2981 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
2982 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
2983 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
2984 0 : ndr->depth--;
2985 : }
2986 :
2987 0 : static enum ndr_err_code ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DOMAIN *r)
2988 : {
2989 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2990 0 : if (ndr_flags & NDR_SCALARS) {
2991 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2992 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
2993 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
2994 0 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->force_logoff_time));
2995 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
2996 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length));
2997 0 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age));
2998 0 : NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age));
2999 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
3000 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
3001 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3002 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3003 0 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->account_lockout));
3004 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3005 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3006 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3007 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_to_chgpass));
3008 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3009 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3010 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3011 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3012 : }
3013 0 : if (ndr_flags & NDR_BUFFERS) {
3014 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
3015 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
3016 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3017 0 : NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
3018 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3019 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3020 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3021 : }
3022 0 : return NDR_ERR_SUCCESS;
3023 : }
3024 :
3025 0 : static enum ndr_err_code ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DOMAIN *r)
3026 : {
3027 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3028 0 : if (ndr_flags & NDR_SCALARS) {
3029 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3030 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
3031 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
3032 0 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->force_logoff_time));
3033 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
3034 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length));
3035 0 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age));
3036 0 : NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age));
3037 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
3038 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
3039 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3040 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3041 0 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->account_lockout));
3042 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3043 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3044 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3045 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_to_chgpass));
3046 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3047 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3048 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3049 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3050 : }
3051 0 : if (ndr_flags & NDR_BUFFERS) {
3052 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
3053 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
3054 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3055 0 : NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
3056 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3057 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3058 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3059 : }
3060 0 : return NDR_ERR_SUCCESS;
3061 : }
3062 :
3063 0 : _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DOMAIN *r)
3064 : {
3065 0 : ndr_print_struct(ndr, name, "netr_DELTA_DOMAIN");
3066 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3067 0 : ndr->depth++;
3068 0 : ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
3069 0 : ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
3070 0 : ndr_print_dlong(ndr, "force_logoff_time", r->force_logoff_time);
3071 0 : ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
3072 0 : ndr_print_uint16(ndr, "password_history_length", r->password_history_length);
3073 0 : ndr_print_dlong(ndr, "max_password_age", r->max_password_age);
3074 0 : ndr_print_dlong(ndr, "min_password_age", r->min_password_age);
3075 0 : ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
3076 0 : ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
3077 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3078 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3079 0 : ndr_print_lsa_BinaryString(ndr, "account_lockout", &r->account_lockout);
3080 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3081 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3082 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3083 0 : ndr_print_uint32(ndr, "logon_to_chgpass", r->logon_to_chgpass);
3084 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3085 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3086 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3087 0 : ndr->depth--;
3088 : }
3089 :
3090 0 : static enum ndr_err_code ndr_push_netr_DELTA_GROUP(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP *r)
3091 : {
3092 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3093 0 : if (ndr_flags & NDR_SCALARS) {
3094 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3095 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->group_name));
3096 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
3097 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
3098 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
3099 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3100 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3101 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3102 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3103 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3104 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3105 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3106 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3107 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3108 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3109 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3110 : }
3111 0 : if (ndr_flags & NDR_BUFFERS) {
3112 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
3113 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
3114 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3115 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3116 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3117 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3118 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3119 : }
3120 0 : return NDR_ERR_SUCCESS;
3121 : }
3122 :
3123 0 : static enum ndr_err_code ndr_pull_netr_DELTA_GROUP(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP *r)
3124 : {
3125 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3126 0 : if (ndr_flags & NDR_SCALARS) {
3127 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3128 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->group_name));
3129 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3130 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
3131 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
3132 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3133 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3134 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3135 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3136 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3137 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3138 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3139 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3140 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3141 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3142 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3143 : }
3144 0 : if (ndr_flags & NDR_BUFFERS) {
3145 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
3146 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
3147 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3148 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3149 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3150 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3151 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3152 : }
3153 0 : return NDR_ERR_SUCCESS;
3154 : }
3155 :
3156 0 : _PUBLIC_ void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP *r)
3157 : {
3158 0 : ndr_print_struct(ndr, name, "netr_DELTA_GROUP");
3159 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3160 0 : ndr->depth++;
3161 0 : ndr_print_lsa_String(ndr, "group_name", &r->group_name);
3162 0 : ndr_print_uint32(ndr, "rid", r->rid);
3163 0 : ndr_print_uint32(ndr, "attributes", r->attributes);
3164 0 : ndr_print_lsa_String(ndr, "description", &r->description);
3165 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3166 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3167 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
3168 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3169 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3170 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3171 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
3172 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3173 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3174 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3175 0 : ndr->depth--;
3176 : }
3177 :
3178 0 : static enum ndr_err_code ndr_push_netr_DELTA_RENAME(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_RENAME *r)
3179 : {
3180 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3181 0 : if (ndr_flags & NDR_SCALARS) {
3182 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3183 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->OldName));
3184 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->NewName));
3185 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3186 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3187 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3188 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3189 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3190 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3191 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3192 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3193 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3194 : }
3195 0 : if (ndr_flags & NDR_BUFFERS) {
3196 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
3197 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
3198 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3199 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3200 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3201 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3202 : }
3203 0 : return NDR_ERR_SUCCESS;
3204 : }
3205 :
3206 0 : static enum ndr_err_code ndr_pull_netr_DELTA_RENAME(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_RENAME *r)
3207 : {
3208 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3209 0 : if (ndr_flags & NDR_SCALARS) {
3210 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3211 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->OldName));
3212 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->NewName));
3213 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3214 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3215 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3216 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3217 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3218 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3219 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3220 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3221 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3222 : }
3223 0 : if (ndr_flags & NDR_BUFFERS) {
3224 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
3225 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
3226 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3227 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3228 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3229 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3230 : }
3231 0 : return NDR_ERR_SUCCESS;
3232 : }
3233 :
3234 0 : _PUBLIC_ void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *name, const struct netr_DELTA_RENAME *r)
3235 : {
3236 0 : ndr_print_struct(ndr, name, "netr_DELTA_RENAME");
3237 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3238 0 : ndr->depth++;
3239 0 : ndr_print_lsa_String(ndr, "OldName", &r->OldName);
3240 0 : ndr_print_lsa_String(ndr, "NewName", &r->NewName);
3241 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
3242 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3243 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3244 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3245 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
3246 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3247 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3248 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3249 0 : ndr->depth--;
3250 : }
3251 :
3252 0 : static enum ndr_err_code ndr_push_netr_DELTA_GROUP_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP_MEMBER *r)
3253 : {
3254 : uint32_t cntr_rids_1;
3255 : uint32_t cntr_attribs_1;
3256 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3257 0 : if (ndr_flags & NDR_SCALARS) {
3258 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3259 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
3260 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribs));
3261 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
3262 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3263 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
3264 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
3265 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
3266 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3267 : }
3268 0 : if (ndr_flags & NDR_BUFFERS) {
3269 0 : if (r->rids) {
3270 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
3271 0 : for (cntr_rids_1 = 0; cntr_rids_1 < (r->num_rids); cntr_rids_1++) {
3272 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_1]));
3273 : }
3274 : }
3275 0 : if (r->attribs) {
3276 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
3277 0 : for (cntr_attribs_1 = 0; cntr_attribs_1 < (r->num_rids); cntr_attribs_1++) {
3278 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribs[cntr_attribs_1]));
3279 : }
3280 : }
3281 : }
3282 0 : return NDR_ERR_SUCCESS;
3283 : }
3284 :
3285 0 : static enum ndr_err_code ndr_pull_netr_DELTA_GROUP_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP_MEMBER *r)
3286 : {
3287 : uint32_t _ptr_rids;
3288 0 : uint32_t size_rids_1 = 0;
3289 : uint32_t cntr_rids_1;
3290 0 : TALLOC_CTX *_mem_save_rids_0 = NULL;
3291 0 : TALLOC_CTX *_mem_save_rids_1 = NULL;
3292 : uint32_t _ptr_attribs;
3293 0 : uint32_t size_attribs_1 = 0;
3294 : uint32_t cntr_attribs_1;
3295 0 : TALLOC_CTX *_mem_save_attribs_0 = NULL;
3296 0 : TALLOC_CTX *_mem_save_attribs_1 = NULL;
3297 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3298 0 : if (ndr_flags & NDR_SCALARS) {
3299 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3300 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
3301 0 : if (_ptr_rids) {
3302 0 : NDR_PULL_ALLOC(ndr, r->rids);
3303 : } else {
3304 0 : r->rids = NULL;
3305 : }
3306 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribs));
3307 0 : if (_ptr_attribs) {
3308 0 : NDR_PULL_ALLOC(ndr, r->attribs);
3309 : } else {
3310 0 : r->attribs = NULL;
3311 : }
3312 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_rids));
3313 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3314 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
3315 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
3316 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
3317 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3318 : }
3319 0 : if (ndr_flags & NDR_BUFFERS) {
3320 0 : if (r->rids) {
3321 0 : _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
3322 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
3323 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
3324 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->rids, &size_rids_1));
3325 0 : NDR_PULL_ALLOC_N(ndr, r->rids, size_rids_1);
3326 0 : _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
3327 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
3328 0 : for (cntr_rids_1 = 0; cntr_rids_1 < (size_rids_1); cntr_rids_1++) {
3329 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
3330 : }
3331 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
3332 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
3333 : }
3334 0 : if (r->attribs) {
3335 0 : _mem_save_attribs_0 = NDR_PULL_GET_MEM_CTX(ndr);
3336 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
3337 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->attribs));
3338 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attribs, &size_attribs_1));
3339 0 : NDR_PULL_ALLOC_N(ndr, r->attribs, size_attribs_1);
3340 0 : _mem_save_attribs_1 = NDR_PULL_GET_MEM_CTX(ndr);
3341 0 : NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
3342 0 : for (cntr_attribs_1 = 0; cntr_attribs_1 < (size_attribs_1); cntr_attribs_1++) {
3343 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribs[cntr_attribs_1]));
3344 : }
3345 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_1, 0);
3346 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_0, 0);
3347 : }
3348 0 : if (r->rids) {
3349 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->rids, r->num_rids));
3350 : }
3351 0 : if (r->attribs) {
3352 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->attribs, r->num_rids));
3353 : }
3354 : }
3355 0 : return NDR_ERR_SUCCESS;
3356 : }
3357 :
3358 0 : _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP_MEMBER *r)
3359 : {
3360 : uint32_t cntr_rids_1;
3361 : uint32_t cntr_attribs_1;
3362 0 : ndr_print_struct(ndr, name, "netr_DELTA_GROUP_MEMBER");
3363 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3364 0 : ndr->depth++;
3365 0 : ndr_print_ptr(ndr, "rids", r->rids);
3366 0 : ndr->depth++;
3367 0 : if (r->rids) {
3368 0 : ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->num_rids);
3369 0 : ndr->depth++;
3370 0 : for (cntr_rids_1 = 0; cntr_rids_1 < (r->num_rids); cntr_rids_1++) {
3371 0 : ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
3372 : }
3373 0 : ndr->depth--;
3374 : }
3375 0 : ndr->depth--;
3376 0 : ndr_print_ptr(ndr, "attribs", r->attribs);
3377 0 : ndr->depth++;
3378 0 : if (r->attribs) {
3379 0 : ndr->print(ndr, "%s: ARRAY(%d)", "attribs", (int)r->num_rids);
3380 0 : ndr->depth++;
3381 0 : for (cntr_attribs_1 = 0; cntr_attribs_1 < (r->num_rids); cntr_attribs_1++) {
3382 0 : ndr_print_uint32(ndr, "attribs", r->attribs[cntr_attribs_1]);
3383 : }
3384 0 : ndr->depth--;
3385 : }
3386 0 : ndr->depth--;
3387 0 : ndr_print_uint32(ndr, "num_rids", r->num_rids);
3388 0 : ndr_print_uint32(ndr, "unknown1", r->unknown1);
3389 0 : ndr_print_uint32(ndr, "unknown2", r->unknown2);
3390 0 : ndr_print_uint32(ndr, "unknown3", r->unknown3);
3391 0 : ndr_print_uint32(ndr, "unknown4", r->unknown4);
3392 0 : ndr->depth--;
3393 : }
3394 :
3395 0 : static enum ndr_err_code ndr_push_netr_DELTA_ALIAS(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS *r)
3396 : {
3397 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3398 0 : if (ndr_flags & NDR_SCALARS) {
3399 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3400 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
3401 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
3402 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3403 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3404 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
3405 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3406 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3407 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3408 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3409 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3410 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3411 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3412 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3413 : }
3414 0 : if (ndr_flags & NDR_BUFFERS) {
3415 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
3416 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3417 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
3418 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3419 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3420 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3421 : }
3422 0 : return NDR_ERR_SUCCESS;
3423 : }
3424 :
3425 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS *r)
3426 : {
3427 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3428 0 : if (ndr_flags & NDR_SCALARS) {
3429 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3430 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
3431 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
3432 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3433 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3434 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
3435 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3436 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3437 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3438 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3439 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3440 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3441 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3442 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3443 : }
3444 0 : if (ndr_flags & NDR_BUFFERS) {
3445 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
3446 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3447 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
3448 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3449 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3450 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3451 : }
3452 0 : return NDR_ERR_SUCCESS;
3453 : }
3454 :
3455 0 : _PUBLIC_ void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS *r)
3456 : {
3457 0 : ndr_print_struct(ndr, name, "netr_DELTA_ALIAS");
3458 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3459 0 : ndr->depth++;
3460 0 : ndr_print_lsa_String(ndr, "alias_name", &r->alias_name);
3461 0 : ndr_print_uint32(ndr, "rid", r->rid);
3462 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3463 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3464 0 : ndr_print_lsa_String(ndr, "description", &r->description);
3465 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3466 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3467 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3468 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
3469 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3470 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3471 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3472 0 : ndr->depth--;
3473 : }
3474 :
3475 0 : static enum ndr_err_code ndr_push_netr_DELTA_ALIAS_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS_MEMBER *r)
3476 : {
3477 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3478 0 : if (ndr_flags & NDR_SCALARS) {
3479 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3480 0 : NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
3481 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3482 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
3483 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
3484 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
3485 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3486 : }
3487 0 : if (ndr_flags & NDR_BUFFERS) {
3488 0 : NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
3489 : }
3490 0 : return NDR_ERR_SUCCESS;
3491 : }
3492 :
3493 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS_MEMBER *r)
3494 : {
3495 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3496 0 : if (ndr_flags & NDR_SCALARS) {
3497 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3498 0 : NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
3499 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3500 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
3501 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
3502 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
3503 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3504 : }
3505 0 : if (ndr_flags & NDR_BUFFERS) {
3506 0 : NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
3507 : }
3508 0 : return NDR_ERR_SUCCESS;
3509 : }
3510 :
3511 0 : _PUBLIC_ void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS_MEMBER *r)
3512 : {
3513 0 : ndr_print_struct(ndr, name, "netr_DELTA_ALIAS_MEMBER");
3514 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3515 0 : ndr->depth++;
3516 0 : ndr_print_lsa_SidArray(ndr, "sids", &r->sids);
3517 0 : ndr_print_uint32(ndr, "unknown1", r->unknown1);
3518 0 : ndr_print_uint32(ndr, "unknown2", r->unknown2);
3519 0 : ndr_print_uint32(ndr, "unknown3", r->unknown3);
3520 0 : ndr_print_uint32(ndr, "unknown4", r->unknown4);
3521 0 : ndr->depth--;
3522 : }
3523 :
3524 0 : static enum ndr_err_code ndr_push_netr_QUOTA_LIMITS(struct ndr_push *ndr, int ndr_flags, const struct netr_QUOTA_LIMITS *r)
3525 : {
3526 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3527 0 : if (ndr_flags & NDR_SCALARS) {
3528 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3529 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagedpoollimit));
3530 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nonpagedpoollimit));
3531 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minimumworkingsetsize));
3532 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximumworkingsetsize));
3533 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefilelimit));
3534 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timelimit));
3535 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3536 : }
3537 0 : if (ndr_flags & NDR_BUFFERS) {
3538 : }
3539 0 : return NDR_ERR_SUCCESS;
3540 : }
3541 :
3542 0 : static enum ndr_err_code ndr_pull_netr_QUOTA_LIMITS(struct ndr_pull *ndr, int ndr_flags, struct netr_QUOTA_LIMITS *r)
3543 : {
3544 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3545 0 : if (ndr_flags & NDR_SCALARS) {
3546 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
3547 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagedpoollimit));
3548 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nonpagedpoollimit));
3549 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minimumworkingsetsize));
3550 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximumworkingsetsize));
3551 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefilelimit));
3552 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timelimit));
3553 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3554 : }
3555 0 : if (ndr_flags & NDR_BUFFERS) {
3556 : }
3557 0 : return NDR_ERR_SUCCESS;
3558 : }
3559 :
3560 0 : _PUBLIC_ void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *name, const struct netr_QUOTA_LIMITS *r)
3561 : {
3562 0 : ndr_print_struct(ndr, name, "netr_QUOTA_LIMITS");
3563 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3564 0 : ndr->depth++;
3565 0 : ndr_print_uint32(ndr, "pagedpoollimit", r->pagedpoollimit);
3566 0 : ndr_print_uint32(ndr, "nonpagedpoollimit", r->nonpagedpoollimit);
3567 0 : ndr_print_uint32(ndr, "minimumworkingsetsize", r->minimumworkingsetsize);
3568 0 : ndr_print_uint32(ndr, "maximumworkingsetsize", r->maximumworkingsetsize);
3569 0 : ndr_print_uint32(ndr, "pagefilelimit", r->pagefilelimit);
3570 0 : ndr_print_NTTIME(ndr, "timelimit", r->timelimit);
3571 0 : ndr->depth--;
3572 : }
3573 :
3574 0 : static enum ndr_err_code ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_POLICY *r)
3575 : {
3576 : uint32_t cntr_eventauditoptions_1;
3577 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3578 0 : if (ndr_flags & NDR_SCALARS) {
3579 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3580 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlogsize));
3581 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->auditretentionperiod));
3582 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->auditingmode));
3583 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxauditeventcount));
3584 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->eventauditoptions));
3585 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
3586 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
3587 0 : NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
3588 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
3589 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->db_create_time));
3590 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3591 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3592 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3593 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3594 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3595 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3596 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3597 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3598 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3599 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3600 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3601 : }
3602 0 : if (ndr_flags & NDR_BUFFERS) {
3603 0 : if (r->eventauditoptions) {
3604 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->maxauditeventcount + 1));
3605 0 : for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (r->maxauditeventcount + 1); cntr_eventauditoptions_1++) {
3606 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->eventauditoptions[cntr_eventauditoptions_1]));
3607 : }
3608 : }
3609 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
3610 0 : if (r->sid) {
3611 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3612 : }
3613 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3614 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3615 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3616 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3617 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3618 : }
3619 0 : return NDR_ERR_SUCCESS;
3620 : }
3621 :
3622 0 : static enum ndr_err_code ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_POLICY *r)
3623 : {
3624 : uint32_t _ptr_eventauditoptions;
3625 0 : uint32_t size_eventauditoptions_1 = 0;
3626 : uint32_t cntr_eventauditoptions_1;
3627 0 : TALLOC_CTX *_mem_save_eventauditoptions_0 = NULL;
3628 0 : TALLOC_CTX *_mem_save_eventauditoptions_1 = NULL;
3629 : uint32_t _ptr_sid;
3630 0 : TALLOC_CTX *_mem_save_sid_0 = NULL;
3631 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3632 0 : if (ndr_flags & NDR_SCALARS) {
3633 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3634 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlogsize));
3635 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->auditretentionperiod));
3636 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->auditingmode));
3637 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxauditeventcount));
3638 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventauditoptions));
3639 0 : if (_ptr_eventauditoptions) {
3640 0 : NDR_PULL_ALLOC(ndr, r->eventauditoptions);
3641 : } else {
3642 0 : r->eventauditoptions = NULL;
3643 : }
3644 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
3645 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
3646 0 : if (_ptr_sid) {
3647 0 : NDR_PULL_ALLOC(ndr, r->sid);
3648 : } else {
3649 0 : r->sid = NULL;
3650 : }
3651 0 : NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
3652 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
3653 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->db_create_time));
3654 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3655 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3656 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3657 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3658 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3659 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3660 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3661 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3662 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3663 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3664 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3665 : }
3666 0 : if (ndr_flags & NDR_BUFFERS) {
3667 0 : if (r->eventauditoptions) {
3668 0 : _mem_save_eventauditoptions_0 = NDR_PULL_GET_MEM_CTX(ndr);
3669 0 : NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
3670 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->eventauditoptions));
3671 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->eventauditoptions, &size_eventauditoptions_1));
3672 0 : NDR_PULL_ALLOC_N(ndr, r->eventauditoptions, size_eventauditoptions_1);
3673 0 : _mem_save_eventauditoptions_1 = NDR_PULL_GET_MEM_CTX(ndr);
3674 0 : NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
3675 0 : for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (size_eventauditoptions_1); cntr_eventauditoptions_1++) {
3676 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->eventauditoptions[cntr_eventauditoptions_1]));
3677 : }
3678 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_1, 0);
3679 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_0, 0);
3680 : }
3681 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
3682 0 : if (r->sid) {
3683 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3684 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3685 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3686 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3687 : }
3688 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3689 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3690 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3691 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3692 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3693 0 : if (r->eventauditoptions) {
3694 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->eventauditoptions, r->maxauditeventcount + 1));
3695 : }
3696 : }
3697 0 : return NDR_ERR_SUCCESS;
3698 : }
3699 :
3700 0 : _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_POLICY *r)
3701 : {
3702 : uint32_t cntr_eventauditoptions_1;
3703 0 : ndr_print_struct(ndr, name, "netr_DELTA_POLICY");
3704 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3705 0 : ndr->depth++;
3706 0 : ndr_print_uint32(ndr, "maxlogsize", r->maxlogsize);
3707 0 : ndr_print_NTTIME(ndr, "auditretentionperiod", r->auditretentionperiod);
3708 0 : ndr_print_uint8(ndr, "auditingmode", r->auditingmode);
3709 0 : ndr_print_uint32(ndr, "maxauditeventcount", r->maxauditeventcount);
3710 0 : ndr_print_ptr(ndr, "eventauditoptions", r->eventauditoptions);
3711 0 : ndr->depth++;
3712 0 : if (r->eventauditoptions) {
3713 0 : ndr->print(ndr, "%s: ARRAY(%d)", "eventauditoptions", (int)r->maxauditeventcount + 1);
3714 0 : ndr->depth++;
3715 0 : for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (r->maxauditeventcount + 1); cntr_eventauditoptions_1++) {
3716 0 : ndr_print_uint32(ndr, "eventauditoptions", r->eventauditoptions[cntr_eventauditoptions_1]);
3717 : }
3718 0 : ndr->depth--;
3719 : }
3720 0 : ndr->depth--;
3721 0 : ndr_print_lsa_String(ndr, "primary_domain_name", &r->primary_domain_name);
3722 0 : ndr_print_ptr(ndr, "sid", r->sid);
3723 0 : ndr->depth++;
3724 0 : if (r->sid) {
3725 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
3726 : }
3727 0 : ndr->depth--;
3728 0 : ndr_print_netr_QUOTA_LIMITS(ndr, "quota_limits", &r->quota_limits);
3729 0 : ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
3730 0 : ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time);
3731 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3732 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3733 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
3734 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3735 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3736 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3737 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
3738 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3739 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3740 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3741 0 : ndr->depth--;
3742 : }
3743 :
3744 0 : static enum ndr_err_code ndr_push_netr_DELTA_TRUSTED_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_TRUSTED_DOMAIN *r)
3745 : {
3746 : uint32_t cntr_controller_names_1;
3747 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3748 0 : if (ndr_flags & NDR_SCALARS) {
3749 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3750 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
3751 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_controllers));
3752 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->controller_names));
3753 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3754 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3755 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3756 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3757 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3758 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3759 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
3760 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3761 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3762 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3763 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3764 : }
3765 0 : if (ndr_flags & NDR_BUFFERS) {
3766 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
3767 0 : if (r->controller_names) {
3768 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_controllers));
3769 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
3770 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
3771 : }
3772 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
3773 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
3774 : }
3775 : }
3776 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3777 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3778 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3779 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3780 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3781 : }
3782 0 : return NDR_ERR_SUCCESS;
3783 : }
3784 :
3785 0 : static enum ndr_err_code ndr_pull_netr_DELTA_TRUSTED_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_TRUSTED_DOMAIN *r)
3786 : {
3787 : uint32_t _ptr_controller_names;
3788 0 : uint32_t size_controller_names_1 = 0;
3789 : uint32_t cntr_controller_names_1;
3790 0 : TALLOC_CTX *_mem_save_controller_names_0 = NULL;
3791 0 : TALLOC_CTX *_mem_save_controller_names_1 = NULL;
3792 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3793 0 : if (ndr_flags & NDR_SCALARS) {
3794 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3795 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
3796 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_controllers));
3797 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_controller_names));
3798 0 : if (_ptr_controller_names) {
3799 0 : NDR_PULL_ALLOC(ndr, r->controller_names);
3800 : } else {
3801 0 : r->controller_names = NULL;
3802 : }
3803 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3804 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3805 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3806 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3807 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3808 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3809 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
3810 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3811 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3812 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3813 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3814 : }
3815 0 : if (ndr_flags & NDR_BUFFERS) {
3816 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
3817 0 : if (r->controller_names) {
3818 0 : _mem_save_controller_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
3819 0 : NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
3820 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->controller_names));
3821 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->controller_names, &size_controller_names_1));
3822 0 : NDR_PULL_ALLOC_N(ndr, r->controller_names, size_controller_names_1);
3823 0 : _mem_save_controller_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
3824 0 : NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
3825 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
3826 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
3827 : }
3828 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
3829 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
3830 : }
3831 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_1, 0);
3832 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_0, 0);
3833 : }
3834 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3835 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3836 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3837 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3838 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3839 0 : if (r->controller_names) {
3840 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->controller_names, r->num_controllers));
3841 : }
3842 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
3843 : }
3844 : }
3845 0 : return NDR_ERR_SUCCESS;
3846 : }
3847 :
3848 0 : _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_TRUSTED_DOMAIN *r)
3849 : {
3850 : uint32_t cntr_controller_names_1;
3851 0 : ndr_print_struct(ndr, name, "netr_DELTA_TRUSTED_DOMAIN");
3852 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3853 0 : ndr->depth++;
3854 0 : ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
3855 0 : ndr_print_uint32(ndr, "num_controllers", r->num_controllers);
3856 0 : ndr_print_ptr(ndr, "controller_names", r->controller_names);
3857 0 : ndr->depth++;
3858 0 : if (r->controller_names) {
3859 0 : ndr->print(ndr, "%s: ARRAY(%d)", "controller_names", (int)r->num_controllers);
3860 0 : ndr->depth++;
3861 0 : for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
3862 0 : ndr_print_lsa_String(ndr, "controller_names", &r->controller_names[cntr_controller_names_1]);
3863 : }
3864 0 : ndr->depth--;
3865 : }
3866 0 : ndr->depth--;
3867 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
3868 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
3869 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
3870 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
3871 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
3872 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
3873 0 : ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
3874 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
3875 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
3876 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
3877 0 : ndr->depth--;
3878 : }
3879 :
3880 0 : static enum ndr_err_code ndr_push_netr_DELTA_ACCOUNT(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ACCOUNT *r)
3881 : {
3882 : uint32_t cntr_privilege_attrib_1;
3883 : uint32_t cntr_privilege_name_1;
3884 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3885 0 : if (ndr_flags & NDR_SCALARS) {
3886 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3887 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_entries));
3888 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_control));
3889 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_attrib));
3890 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_name));
3891 0 : NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
3892 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->system_flags));
3893 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
3894 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3895 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3896 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3897 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3898 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3899 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
3900 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
3901 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
3902 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
3903 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3904 : }
3905 0 : if (ndr_flags & NDR_BUFFERS) {
3906 0 : if (r->privilege_attrib) {
3907 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->privilege_entries));
3908 0 : for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (r->privilege_entries); cntr_privilege_attrib_1++) {
3909 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_attrib[cntr_privilege_attrib_1]));
3910 : }
3911 : }
3912 0 : if (r->privilege_name) {
3913 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->privilege_entries));
3914 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
3915 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
3916 : }
3917 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
3918 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
3919 : }
3920 : }
3921 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
3922 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
3923 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
3924 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
3925 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
3926 : }
3927 0 : return NDR_ERR_SUCCESS;
3928 : }
3929 :
3930 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ACCOUNT(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ACCOUNT *r)
3931 : {
3932 : uint32_t _ptr_privilege_attrib;
3933 0 : uint32_t size_privilege_attrib_1 = 0;
3934 : uint32_t cntr_privilege_attrib_1;
3935 0 : TALLOC_CTX *_mem_save_privilege_attrib_0 = NULL;
3936 0 : TALLOC_CTX *_mem_save_privilege_attrib_1 = NULL;
3937 : uint32_t _ptr_privilege_name;
3938 0 : uint32_t size_privilege_name_1 = 0;
3939 : uint32_t cntr_privilege_name_1;
3940 0 : TALLOC_CTX *_mem_save_privilege_name_0 = NULL;
3941 0 : TALLOC_CTX *_mem_save_privilege_name_1 = NULL;
3942 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3943 0 : if (ndr_flags & NDR_SCALARS) {
3944 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3945 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_entries));
3946 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_control));
3947 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_attrib));
3948 0 : if (_ptr_privilege_attrib) {
3949 0 : NDR_PULL_ALLOC(ndr, r->privilege_attrib);
3950 : } else {
3951 0 : r->privilege_attrib = NULL;
3952 : }
3953 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_name));
3954 0 : if (_ptr_privilege_name) {
3955 0 : NDR_PULL_ALLOC(ndr, r->privilege_name);
3956 : } else {
3957 0 : r->privilege_name = NULL;
3958 : }
3959 0 : NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
3960 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->system_flags));
3961 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
3962 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
3963 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
3964 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
3965 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
3966 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
3967 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
3968 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
3969 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
3970 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
3971 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3972 : }
3973 0 : if (ndr_flags & NDR_BUFFERS) {
3974 0 : if (r->privilege_attrib) {
3975 0 : _mem_save_privilege_attrib_0 = NDR_PULL_GET_MEM_CTX(ndr);
3976 0 : NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
3977 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_attrib));
3978 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->privilege_attrib, &size_privilege_attrib_1));
3979 0 : NDR_PULL_ALLOC_N(ndr, r->privilege_attrib, size_privilege_attrib_1);
3980 0 : _mem_save_privilege_attrib_1 = NDR_PULL_GET_MEM_CTX(ndr);
3981 0 : NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
3982 0 : for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (size_privilege_attrib_1); cntr_privilege_attrib_1++) {
3983 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_attrib[cntr_privilege_attrib_1]));
3984 : }
3985 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_1, 0);
3986 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_0, 0);
3987 : }
3988 0 : if (r->privilege_name) {
3989 0 : _mem_save_privilege_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3990 0 : NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
3991 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_name));
3992 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->privilege_name, &size_privilege_name_1));
3993 0 : NDR_PULL_ALLOC_N(ndr, r->privilege_name, size_privilege_name_1);
3994 0 : _mem_save_privilege_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3995 0 : NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
3996 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
3997 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
3998 : }
3999 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
4000 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
4001 : }
4002 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_1, 0);
4003 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_0, 0);
4004 : }
4005 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
4006 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
4007 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
4008 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
4009 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
4010 0 : if (r->privilege_attrib) {
4011 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->privilege_attrib, r->privilege_entries));
4012 : }
4013 0 : if (r->privilege_name) {
4014 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privilege_name, r->privilege_entries));
4015 : }
4016 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
4017 : }
4018 : }
4019 0 : return NDR_ERR_SUCCESS;
4020 : }
4021 :
4022 0 : _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ACCOUNT *r)
4023 : {
4024 : uint32_t cntr_privilege_attrib_1;
4025 : uint32_t cntr_privilege_name_1;
4026 0 : ndr_print_struct(ndr, name, "netr_DELTA_ACCOUNT");
4027 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4028 0 : ndr->depth++;
4029 0 : ndr_print_uint32(ndr, "privilege_entries", r->privilege_entries);
4030 0 : ndr_print_uint32(ndr, "privilege_control", r->privilege_control);
4031 0 : ndr_print_ptr(ndr, "privilege_attrib", r->privilege_attrib);
4032 0 : ndr->depth++;
4033 0 : if (r->privilege_attrib) {
4034 0 : ndr->print(ndr, "%s: ARRAY(%d)", "privilege_attrib", (int)r->privilege_entries);
4035 0 : ndr->depth++;
4036 0 : for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (r->privilege_entries); cntr_privilege_attrib_1++) {
4037 0 : ndr_print_uint32(ndr, "privilege_attrib", r->privilege_attrib[cntr_privilege_attrib_1]);
4038 : }
4039 0 : ndr->depth--;
4040 : }
4041 0 : ndr->depth--;
4042 0 : ndr_print_ptr(ndr, "privilege_name", r->privilege_name);
4043 0 : ndr->depth++;
4044 0 : if (r->privilege_name) {
4045 0 : ndr->print(ndr, "%s: ARRAY(%d)", "privilege_name", (int)r->privilege_entries);
4046 0 : ndr->depth++;
4047 0 : for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
4048 0 : ndr_print_lsa_String(ndr, "privilege_name", &r->privilege_name[cntr_privilege_name_1]);
4049 : }
4050 0 : ndr->depth--;
4051 : }
4052 0 : ndr->depth--;
4053 0 : ndr_print_netr_QUOTA_LIMITS(ndr, "quotalimits", &r->quotalimits);
4054 0 : ndr_print_uint32(ndr, "system_flags", r->system_flags);
4055 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
4056 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
4057 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
4058 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
4059 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
4060 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
4061 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
4062 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
4063 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
4064 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
4065 0 : ndr->depth--;
4066 : }
4067 :
4068 0 : static enum ndr_err_code ndr_push_netr_CIPHER_VALUE(struct ndr_push *ndr, int ndr_flags, const struct netr_CIPHER_VALUE *r)
4069 : {
4070 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4071 0 : if (ndr_flags & NDR_SCALARS) {
4072 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4073 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
4074 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlen));
4075 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->cipher_data));
4076 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4077 : }
4078 0 : if (ndr_flags & NDR_BUFFERS) {
4079 0 : if (r->cipher_data) {
4080 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->maxlen));
4081 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4082 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->len));
4083 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->cipher_data, r->len));
4084 : }
4085 : }
4086 0 : return NDR_ERR_SUCCESS;
4087 : }
4088 :
4089 0 : static enum ndr_err_code ndr_pull_netr_CIPHER_VALUE(struct ndr_pull *ndr, int ndr_flags, struct netr_CIPHER_VALUE *r)
4090 : {
4091 : uint32_t _ptr_cipher_data;
4092 0 : uint32_t size_cipher_data_1 = 0;
4093 0 : uint32_t length_cipher_data_1 = 0;
4094 0 : TALLOC_CTX *_mem_save_cipher_data_0 = NULL;
4095 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4096 0 : if (ndr_flags & NDR_SCALARS) {
4097 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4098 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
4099 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlen));
4100 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cipher_data));
4101 0 : if (_ptr_cipher_data) {
4102 0 : NDR_PULL_ALLOC(ndr, r->cipher_data);
4103 : } else {
4104 0 : r->cipher_data = NULL;
4105 : }
4106 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4107 : }
4108 0 : if (ndr_flags & NDR_BUFFERS) {
4109 0 : if (r->cipher_data) {
4110 0 : _mem_save_cipher_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
4111 0 : NDR_PULL_SET_MEM_CTX(ndr, r->cipher_data, 0);
4112 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->cipher_data));
4113 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->cipher_data));
4114 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cipher_data, &size_cipher_data_1));
4115 0 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->cipher_data, &length_cipher_data_1));
4116 0 : if (length_cipher_data_1 > size_cipher_data_1) {
4117 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_cipher_data_1, length_cipher_data_1);
4118 : }
4119 0 : NDR_PULL_ALLOC_N(ndr, r->cipher_data, size_cipher_data_1);
4120 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->cipher_data, length_cipher_data_1));
4121 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cipher_data_0, 0);
4122 : }
4123 0 : if (r->cipher_data) {
4124 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cipher_data, r->maxlen));
4125 : }
4126 0 : if (r->cipher_data) {
4127 0 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->cipher_data, r->len));
4128 : }
4129 : }
4130 0 : return NDR_ERR_SUCCESS;
4131 : }
4132 :
4133 0 : _PUBLIC_ void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *name, const struct netr_CIPHER_VALUE *r)
4134 : {
4135 0 : ndr_print_struct(ndr, name, "netr_CIPHER_VALUE");
4136 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4137 0 : ndr->depth++;
4138 0 : ndr_print_uint32(ndr, "len", r->len);
4139 0 : ndr_print_uint32(ndr, "maxlen", r->maxlen);
4140 0 : ndr_print_ptr(ndr, "cipher_data", r->cipher_data);
4141 0 : ndr->depth++;
4142 0 : if (r->cipher_data) {
4143 0 : ndr_print_array_uint8(ndr, "cipher_data", r->cipher_data, r->len);
4144 : }
4145 0 : ndr->depth--;
4146 0 : ndr->depth--;
4147 : }
4148 :
4149 0 : static enum ndr_err_code ndr_push_netr_DELTA_SECRET(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_SECRET *r)
4150 : {
4151 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4152 0 : if (ndr_flags & NDR_SCALARS) {
4153 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4154 0 : NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
4155 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->current_cipher_set_time));
4156 0 : NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
4157 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->old_cipher_set_time));
4158 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
4159 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
4160 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
4161 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
4162 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
4163 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
4164 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
4165 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
4166 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
4167 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
4168 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4169 : }
4170 0 : if (ndr_flags & NDR_BUFFERS) {
4171 0 : NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
4172 0 : NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
4173 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
4174 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
4175 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
4176 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
4177 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
4178 : }
4179 0 : return NDR_ERR_SUCCESS;
4180 : }
4181 :
4182 0 : static enum ndr_err_code ndr_pull_netr_DELTA_SECRET(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_SECRET *r)
4183 : {
4184 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4185 0 : if (ndr_flags & NDR_SCALARS) {
4186 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4187 0 : NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
4188 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->current_cipher_set_time));
4189 0 : NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
4190 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->old_cipher_set_time));
4191 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
4192 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
4193 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
4194 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
4195 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
4196 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
4197 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
4198 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
4199 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
4200 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
4201 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4202 : }
4203 0 : if (ndr_flags & NDR_BUFFERS) {
4204 0 : NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
4205 0 : NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
4206 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
4207 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
4208 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
4209 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
4210 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
4211 : }
4212 0 : return NDR_ERR_SUCCESS;
4213 : }
4214 :
4215 0 : _PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_SECRET *r)
4216 : {
4217 0 : ndr_print_struct(ndr, name, "netr_DELTA_SECRET");
4218 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4219 0 : ndr->depth++;
4220 0 : ndr_print_netr_CIPHER_VALUE(ndr, "current_cipher", &r->current_cipher);
4221 0 : ndr_print_NTTIME(ndr, "current_cipher_set_time", r->current_cipher_set_time);
4222 0 : ndr_print_netr_CIPHER_VALUE(ndr, "old_cipher", &r->old_cipher);
4223 0 : ndr_print_NTTIME(ndr, "old_cipher_set_time", r->old_cipher_set_time);
4224 0 : ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
4225 0 : ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
4226 0 : ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
4227 0 : ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
4228 0 : ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
4229 0 : ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
4230 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
4231 0 : ndr_print_uint32(ndr, "unknown6", r->unknown6);
4232 0 : ndr_print_uint32(ndr, "unknown7", r->unknown7);
4233 0 : ndr_print_uint32(ndr, "unknown8", r->unknown8);
4234 0 : ndr->depth--;
4235 : }
4236 :
4237 0 : static enum ndr_err_code ndr_push_netr_DeltaEnum(struct ndr_push *ndr, int ndr_flags, enum netr_DeltaEnum r)
4238 : {
4239 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
4240 0 : return NDR_ERR_SUCCESS;
4241 : }
4242 :
4243 0 : static enum ndr_err_code ndr_pull_netr_DeltaEnum(struct ndr_pull *ndr, int ndr_flags, enum netr_DeltaEnum *r)
4244 : {
4245 : uint16_t v;
4246 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
4247 0 : *r = v;
4248 0 : return NDR_ERR_SUCCESS;
4249 : }
4250 :
4251 0 : _PUBLIC_ void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum r)
4252 : {
4253 0 : const char *val = NULL;
4254 :
4255 0 : switch (r) {
4256 0 : case NETR_DELTA_DOMAIN: val = "NETR_DELTA_DOMAIN"; break;
4257 0 : case NETR_DELTA_GROUP: val = "NETR_DELTA_GROUP"; break;
4258 0 : case NETR_DELTA_DELETE_GROUP: val = "NETR_DELTA_DELETE_GROUP"; break;
4259 0 : case NETR_DELTA_RENAME_GROUP: val = "NETR_DELTA_RENAME_GROUP"; break;
4260 0 : case NETR_DELTA_USER: val = "NETR_DELTA_USER"; break;
4261 0 : case NETR_DELTA_DELETE_USER: val = "NETR_DELTA_DELETE_USER"; break;
4262 0 : case NETR_DELTA_RENAME_USER: val = "NETR_DELTA_RENAME_USER"; break;
4263 0 : case NETR_DELTA_GROUP_MEMBER: val = "NETR_DELTA_GROUP_MEMBER"; break;
4264 0 : case NETR_DELTA_ALIAS: val = "NETR_DELTA_ALIAS"; break;
4265 0 : case NETR_DELTA_DELETE_ALIAS: val = "NETR_DELTA_DELETE_ALIAS"; break;
4266 0 : case NETR_DELTA_RENAME_ALIAS: val = "NETR_DELTA_RENAME_ALIAS"; break;
4267 0 : case NETR_DELTA_ALIAS_MEMBER: val = "NETR_DELTA_ALIAS_MEMBER"; break;
4268 0 : case NETR_DELTA_POLICY: val = "NETR_DELTA_POLICY"; break;
4269 0 : case NETR_DELTA_TRUSTED_DOMAIN: val = "NETR_DELTA_TRUSTED_DOMAIN"; break;
4270 0 : case NETR_DELTA_DELETE_TRUST: val = "NETR_DELTA_DELETE_TRUST"; break;
4271 0 : case NETR_DELTA_ACCOUNT: val = "NETR_DELTA_ACCOUNT"; break;
4272 0 : case NETR_DELTA_DELETE_ACCOUNT: val = "NETR_DELTA_DELETE_ACCOUNT"; break;
4273 0 : case NETR_DELTA_SECRET: val = "NETR_DELTA_SECRET"; break;
4274 0 : case NETR_DELTA_DELETE_SECRET: val = "NETR_DELTA_DELETE_SECRET"; break;
4275 0 : case NETR_DELTA_DELETE_GROUP2: val = "NETR_DELTA_DELETE_GROUP2"; break;
4276 0 : case NETR_DELTA_DELETE_USER2: val = "NETR_DELTA_DELETE_USER2"; break;
4277 0 : case NETR_DELTA_MODIFY_COUNT: val = "NETR_DELTA_MODIFY_COUNT"; break;
4278 : }
4279 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
4280 0 : }
4281 :
4282 0 : static enum ndr_err_code ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_UNION *r)
4283 : {
4284 : uint32_t level;
4285 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4286 0 : if (ndr_flags & NDR_SCALARS) {
4287 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4288 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4289 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4290 0 : NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
4291 : /* ms_union is always aligned to the largest union arm*/
4292 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4293 0 : switch (level) {
4294 0 : case NETR_DELTA_DOMAIN: {
4295 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
4296 0 : break; }
4297 :
4298 0 : case NETR_DELTA_GROUP: {
4299 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->group));
4300 0 : break; }
4301 :
4302 0 : case NETR_DELTA_DELETE_GROUP: {
4303 0 : break; }
4304 :
4305 0 : case NETR_DELTA_RENAME_GROUP: {
4306 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_group));
4307 0 : break; }
4308 :
4309 0 : case NETR_DELTA_USER: {
4310 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
4311 0 : break; }
4312 :
4313 0 : case NETR_DELTA_DELETE_USER: {
4314 0 : break; }
4315 :
4316 0 : case NETR_DELTA_RENAME_USER: {
4317 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_user));
4318 0 : break; }
4319 :
4320 0 : case NETR_DELTA_GROUP_MEMBER: {
4321 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_member));
4322 0 : break; }
4323 :
4324 0 : case NETR_DELTA_ALIAS: {
4325 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias));
4326 0 : break; }
4327 :
4328 0 : case NETR_DELTA_DELETE_ALIAS: {
4329 0 : break; }
4330 :
4331 0 : case NETR_DELTA_RENAME_ALIAS: {
4332 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_alias));
4333 0 : break; }
4334 :
4335 0 : case NETR_DELTA_ALIAS_MEMBER: {
4336 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias_member));
4337 0 : break; }
4338 :
4339 0 : case NETR_DELTA_POLICY: {
4340 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
4341 0 : break; }
4342 :
4343 0 : case NETR_DELTA_TRUSTED_DOMAIN: {
4344 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain));
4345 0 : break; }
4346 :
4347 0 : case NETR_DELTA_DELETE_TRUST: {
4348 0 : break; }
4349 :
4350 0 : case NETR_DELTA_ACCOUNT: {
4351 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->account));
4352 0 : break; }
4353 :
4354 0 : case NETR_DELTA_DELETE_ACCOUNT: {
4355 0 : break; }
4356 :
4357 0 : case NETR_DELTA_SECRET: {
4358 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->secret));
4359 0 : break; }
4360 :
4361 0 : case NETR_DELTA_DELETE_SECRET: {
4362 0 : break; }
4363 :
4364 0 : case NETR_DELTA_DELETE_GROUP2: {
4365 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_group));
4366 0 : break; }
4367 :
4368 0 : case NETR_DELTA_DELETE_USER2: {
4369 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_user));
4370 0 : break; }
4371 :
4372 0 : case NETR_DELTA_MODIFY_COUNT: {
4373 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->modified_count));
4374 0 : break; }
4375 :
4376 0 : default: {
4377 0 : break; }
4378 :
4379 : }
4380 0 : }
4381 0 : if (ndr_flags & NDR_BUFFERS) {
4382 0 : if (!(ndr_flags & NDR_SCALARS)) {
4383 : /* We didn't get it above, and the token is not needed after this. */
4384 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4385 : }
4386 0 : switch (level) {
4387 0 : case NETR_DELTA_DOMAIN:
4388 0 : if (r->domain) {
4389 0 : NDR_CHECK(ndr_push_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
4390 : }
4391 0 : break;
4392 :
4393 0 : case NETR_DELTA_GROUP:
4394 0 : if (r->group) {
4395 0 : NDR_CHECK(ndr_push_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
4396 : }
4397 0 : break;
4398 :
4399 0 : case NETR_DELTA_DELETE_GROUP:
4400 0 : break;
4401 :
4402 0 : case NETR_DELTA_RENAME_GROUP:
4403 0 : if (r->rename_group) {
4404 0 : NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
4405 : }
4406 0 : break;
4407 :
4408 0 : case NETR_DELTA_USER:
4409 0 : if (r->user) {
4410 0 : NDR_CHECK(ndr_push_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
4411 : }
4412 0 : break;
4413 :
4414 0 : case NETR_DELTA_DELETE_USER:
4415 0 : break;
4416 :
4417 0 : case NETR_DELTA_RENAME_USER:
4418 0 : if (r->rename_user) {
4419 0 : NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
4420 : }
4421 0 : break;
4422 :
4423 0 : case NETR_DELTA_GROUP_MEMBER:
4424 0 : if (r->group_member) {
4425 0 : NDR_CHECK(ndr_push_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
4426 : }
4427 0 : break;
4428 :
4429 0 : case NETR_DELTA_ALIAS:
4430 0 : if (r->alias) {
4431 0 : NDR_CHECK(ndr_push_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
4432 : }
4433 0 : break;
4434 :
4435 0 : case NETR_DELTA_DELETE_ALIAS:
4436 0 : break;
4437 :
4438 0 : case NETR_DELTA_RENAME_ALIAS:
4439 0 : if (r->rename_alias) {
4440 0 : NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
4441 : }
4442 0 : break;
4443 :
4444 0 : case NETR_DELTA_ALIAS_MEMBER:
4445 0 : if (r->alias_member) {
4446 0 : NDR_CHECK(ndr_push_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
4447 : }
4448 0 : break;
4449 :
4450 0 : case NETR_DELTA_POLICY:
4451 0 : if (r->policy) {
4452 0 : NDR_CHECK(ndr_push_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
4453 : }
4454 0 : break;
4455 :
4456 0 : case NETR_DELTA_TRUSTED_DOMAIN:
4457 0 : if (r->trusted_domain) {
4458 0 : NDR_CHECK(ndr_push_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
4459 : }
4460 0 : break;
4461 :
4462 0 : case NETR_DELTA_DELETE_TRUST:
4463 0 : break;
4464 :
4465 0 : case NETR_DELTA_ACCOUNT:
4466 0 : if (r->account) {
4467 0 : NDR_CHECK(ndr_push_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
4468 : }
4469 0 : break;
4470 :
4471 0 : case NETR_DELTA_DELETE_ACCOUNT:
4472 0 : break;
4473 :
4474 0 : case NETR_DELTA_SECRET:
4475 0 : if (r->secret) {
4476 0 : NDR_CHECK(ndr_push_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
4477 : }
4478 0 : break;
4479 :
4480 0 : case NETR_DELTA_DELETE_SECRET:
4481 0 : break;
4482 :
4483 0 : case NETR_DELTA_DELETE_GROUP2:
4484 0 : if (r->delete_group) {
4485 0 : NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
4486 : }
4487 0 : break;
4488 :
4489 0 : case NETR_DELTA_DELETE_USER2:
4490 0 : if (r->delete_user) {
4491 0 : NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
4492 : }
4493 0 : break;
4494 :
4495 0 : case NETR_DELTA_MODIFY_COUNT:
4496 0 : if (r->modified_count) {
4497 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->modified_count));
4498 : }
4499 0 : break;
4500 :
4501 0 : default:
4502 0 : break;
4503 :
4504 : }
4505 0 : }
4506 0 : return NDR_ERR_SUCCESS;
4507 : }
4508 :
4509 0 : static enum ndr_err_code ndr_pull_netr_DELTA_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_UNION *r)
4510 : {
4511 : uint32_t level;
4512 : uint16_t _level;
4513 0 : TALLOC_CTX *_mem_save_domain_0 = NULL;
4514 : uint32_t _ptr_domain;
4515 0 : TALLOC_CTX *_mem_save_group_0 = NULL;
4516 : uint32_t _ptr_group;
4517 0 : TALLOC_CTX *_mem_save_rename_group_0 = NULL;
4518 : uint32_t _ptr_rename_group;
4519 0 : TALLOC_CTX *_mem_save_user_0 = NULL;
4520 : uint32_t _ptr_user;
4521 0 : TALLOC_CTX *_mem_save_rename_user_0 = NULL;
4522 : uint32_t _ptr_rename_user;
4523 0 : TALLOC_CTX *_mem_save_group_member_0 = NULL;
4524 : uint32_t _ptr_group_member;
4525 0 : TALLOC_CTX *_mem_save_alias_0 = NULL;
4526 : uint32_t _ptr_alias;
4527 0 : TALLOC_CTX *_mem_save_rename_alias_0 = NULL;
4528 : uint32_t _ptr_rename_alias;
4529 0 : TALLOC_CTX *_mem_save_alias_member_0 = NULL;
4530 : uint32_t _ptr_alias_member;
4531 0 : TALLOC_CTX *_mem_save_policy_0 = NULL;
4532 : uint32_t _ptr_policy;
4533 0 : TALLOC_CTX *_mem_save_trusted_domain_0 = NULL;
4534 : uint32_t _ptr_trusted_domain;
4535 0 : TALLOC_CTX *_mem_save_account_0 = NULL;
4536 : uint32_t _ptr_account;
4537 0 : TALLOC_CTX *_mem_save_secret_0 = NULL;
4538 : uint32_t _ptr_secret;
4539 0 : TALLOC_CTX *_mem_save_delete_group_0 = NULL;
4540 : uint32_t _ptr_delete_group;
4541 0 : TALLOC_CTX *_mem_save_delete_user_0 = NULL;
4542 : uint32_t _ptr_delete_user;
4543 0 : TALLOC_CTX *_mem_save_modified_count_0 = NULL;
4544 : uint32_t _ptr_modified_count;
4545 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4546 0 : if (ndr_flags & NDR_SCALARS) {
4547 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4548 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4549 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4550 0 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
4551 0 : if (_level != level) {
4552 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
4553 : }
4554 : /* ms_union is always aligned to the largest union arm*/
4555 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4556 0 : switch (level) {
4557 0 : case NETR_DELTA_DOMAIN: {
4558 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
4559 0 : if (_ptr_domain) {
4560 0 : NDR_PULL_ALLOC(ndr, r->domain);
4561 : } else {
4562 0 : r->domain = NULL;
4563 : }
4564 0 : break; }
4565 :
4566 0 : case NETR_DELTA_GROUP: {
4567 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group));
4568 0 : if (_ptr_group) {
4569 0 : NDR_PULL_ALLOC(ndr, r->group);
4570 : } else {
4571 0 : r->group = NULL;
4572 : }
4573 0 : break; }
4574 :
4575 0 : case NETR_DELTA_DELETE_GROUP: {
4576 0 : break; }
4577 :
4578 0 : case NETR_DELTA_RENAME_GROUP: {
4579 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_group));
4580 0 : if (_ptr_rename_group) {
4581 0 : NDR_PULL_ALLOC(ndr, r->rename_group);
4582 : } else {
4583 0 : r->rename_group = NULL;
4584 : }
4585 0 : break; }
4586 :
4587 0 : case NETR_DELTA_USER: {
4588 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
4589 0 : if (_ptr_user) {
4590 0 : NDR_PULL_ALLOC(ndr, r->user);
4591 : } else {
4592 0 : r->user = NULL;
4593 : }
4594 0 : break; }
4595 :
4596 0 : case NETR_DELTA_DELETE_USER: {
4597 0 : break; }
4598 :
4599 0 : case NETR_DELTA_RENAME_USER: {
4600 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_user));
4601 0 : if (_ptr_rename_user) {
4602 0 : NDR_PULL_ALLOC(ndr, r->rename_user);
4603 : } else {
4604 0 : r->rename_user = NULL;
4605 : }
4606 0 : break; }
4607 :
4608 0 : case NETR_DELTA_GROUP_MEMBER: {
4609 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_member));
4610 0 : if (_ptr_group_member) {
4611 0 : NDR_PULL_ALLOC(ndr, r->group_member);
4612 : } else {
4613 0 : r->group_member = NULL;
4614 : }
4615 0 : break; }
4616 :
4617 0 : case NETR_DELTA_ALIAS: {
4618 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias));
4619 0 : if (_ptr_alias) {
4620 0 : NDR_PULL_ALLOC(ndr, r->alias);
4621 : } else {
4622 0 : r->alias = NULL;
4623 : }
4624 0 : break; }
4625 :
4626 0 : case NETR_DELTA_DELETE_ALIAS: {
4627 0 : break; }
4628 :
4629 0 : case NETR_DELTA_RENAME_ALIAS: {
4630 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_alias));
4631 0 : if (_ptr_rename_alias) {
4632 0 : NDR_PULL_ALLOC(ndr, r->rename_alias);
4633 : } else {
4634 0 : r->rename_alias = NULL;
4635 : }
4636 0 : break; }
4637 :
4638 0 : case NETR_DELTA_ALIAS_MEMBER: {
4639 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias_member));
4640 0 : if (_ptr_alias_member) {
4641 0 : NDR_PULL_ALLOC(ndr, r->alias_member);
4642 : } else {
4643 0 : r->alias_member = NULL;
4644 : }
4645 0 : break; }
4646 :
4647 0 : case NETR_DELTA_POLICY: {
4648 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
4649 0 : if (_ptr_policy) {
4650 0 : NDR_PULL_ALLOC(ndr, r->policy);
4651 : } else {
4652 0 : r->policy = NULL;
4653 : }
4654 0 : break; }
4655 :
4656 0 : case NETR_DELTA_TRUSTED_DOMAIN: {
4657 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain));
4658 0 : if (_ptr_trusted_domain) {
4659 0 : NDR_PULL_ALLOC(ndr, r->trusted_domain);
4660 : } else {
4661 0 : r->trusted_domain = NULL;
4662 : }
4663 0 : break; }
4664 :
4665 0 : case NETR_DELTA_DELETE_TRUST: {
4666 0 : break; }
4667 :
4668 0 : case NETR_DELTA_ACCOUNT: {
4669 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account));
4670 0 : if (_ptr_account) {
4671 0 : NDR_PULL_ALLOC(ndr, r->account);
4672 : } else {
4673 0 : r->account = NULL;
4674 : }
4675 0 : break; }
4676 :
4677 0 : case NETR_DELTA_DELETE_ACCOUNT: {
4678 0 : break; }
4679 :
4680 0 : case NETR_DELTA_SECRET: {
4681 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secret));
4682 0 : if (_ptr_secret) {
4683 0 : NDR_PULL_ALLOC(ndr, r->secret);
4684 : } else {
4685 0 : r->secret = NULL;
4686 : }
4687 0 : break; }
4688 :
4689 0 : case NETR_DELTA_DELETE_SECRET: {
4690 0 : break; }
4691 :
4692 0 : case NETR_DELTA_DELETE_GROUP2: {
4693 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_group));
4694 0 : if (_ptr_delete_group) {
4695 0 : NDR_PULL_ALLOC(ndr, r->delete_group);
4696 : } else {
4697 0 : r->delete_group = NULL;
4698 : }
4699 0 : break; }
4700 :
4701 0 : case NETR_DELTA_DELETE_USER2: {
4702 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_user));
4703 0 : if (_ptr_delete_user) {
4704 0 : NDR_PULL_ALLOC(ndr, r->delete_user);
4705 : } else {
4706 0 : r->delete_user = NULL;
4707 : }
4708 0 : break; }
4709 :
4710 0 : case NETR_DELTA_MODIFY_COUNT: {
4711 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_modified_count));
4712 0 : if (_ptr_modified_count) {
4713 0 : NDR_PULL_ALLOC(ndr, r->modified_count);
4714 : } else {
4715 0 : r->modified_count = NULL;
4716 : }
4717 0 : break; }
4718 :
4719 0 : default: {
4720 0 : break; }
4721 :
4722 : }
4723 0 : }
4724 0 : if (ndr_flags & NDR_BUFFERS) {
4725 0 : if (!(ndr_flags & NDR_SCALARS)) {
4726 : /* We didn't get it above, and the token is not needed after this. */
4727 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4728 : }
4729 0 : switch (level) {
4730 0 : case NETR_DELTA_DOMAIN:
4731 0 : if (r->domain) {
4732 0 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
4733 0 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
4734 0 : NDR_CHECK(ndr_pull_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
4735 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
4736 : }
4737 0 : break;
4738 :
4739 0 : case NETR_DELTA_GROUP:
4740 0 : if (r->group) {
4741 0 : _mem_save_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4742 0 : NDR_PULL_SET_MEM_CTX(ndr, r->group, 0);
4743 0 : NDR_CHECK(ndr_pull_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
4744 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_0, 0);
4745 : }
4746 0 : break;
4747 :
4748 0 : case NETR_DELTA_DELETE_GROUP:
4749 0 : break;
4750 :
4751 0 : case NETR_DELTA_RENAME_GROUP:
4752 0 : if (r->rename_group) {
4753 0 : _mem_save_rename_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4754 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rename_group, 0);
4755 0 : NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
4756 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_group_0, 0);
4757 : }
4758 0 : break;
4759 :
4760 0 : case NETR_DELTA_USER:
4761 0 : if (r->user) {
4762 0 : _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
4763 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
4764 0 : NDR_CHECK(ndr_pull_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
4765 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
4766 : }
4767 0 : break;
4768 :
4769 0 : case NETR_DELTA_DELETE_USER:
4770 0 : break;
4771 :
4772 0 : case NETR_DELTA_RENAME_USER:
4773 0 : if (r->rename_user) {
4774 0 : _mem_save_rename_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
4775 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rename_user, 0);
4776 0 : NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
4777 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_user_0, 0);
4778 : }
4779 0 : break;
4780 :
4781 0 : case NETR_DELTA_GROUP_MEMBER:
4782 0 : if (r->group_member) {
4783 0 : _mem_save_group_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
4784 0 : NDR_PULL_SET_MEM_CTX(ndr, r->group_member, 0);
4785 0 : NDR_CHECK(ndr_pull_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
4786 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_member_0, 0);
4787 : }
4788 0 : break;
4789 :
4790 0 : case NETR_DELTA_ALIAS:
4791 0 : if (r->alias) {
4792 0 : _mem_save_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
4793 0 : NDR_PULL_SET_MEM_CTX(ndr, r->alias, 0);
4794 0 : NDR_CHECK(ndr_pull_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
4795 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_0, 0);
4796 : }
4797 0 : break;
4798 :
4799 0 : case NETR_DELTA_DELETE_ALIAS:
4800 0 : break;
4801 :
4802 0 : case NETR_DELTA_RENAME_ALIAS:
4803 0 : if (r->rename_alias) {
4804 0 : _mem_save_rename_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
4805 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rename_alias, 0);
4806 0 : NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
4807 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_alias_0, 0);
4808 : }
4809 0 : break;
4810 :
4811 0 : case NETR_DELTA_ALIAS_MEMBER:
4812 0 : if (r->alias_member) {
4813 0 : _mem_save_alias_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
4814 0 : NDR_PULL_SET_MEM_CTX(ndr, r->alias_member, 0);
4815 0 : NDR_CHECK(ndr_pull_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
4816 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_member_0, 0);
4817 : }
4818 0 : break;
4819 :
4820 0 : case NETR_DELTA_POLICY:
4821 0 : if (r->policy) {
4822 0 : _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr);
4823 0 : NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0);
4824 0 : NDR_CHECK(ndr_pull_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
4825 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
4826 : }
4827 0 : break;
4828 :
4829 0 : case NETR_DELTA_TRUSTED_DOMAIN:
4830 0 : if (r->trusted_domain) {
4831 0 : _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
4832 0 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domain, 0);
4833 0 : NDR_CHECK(ndr_pull_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
4834 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, 0);
4835 : }
4836 0 : break;
4837 :
4838 0 : case NETR_DELTA_DELETE_TRUST:
4839 0 : break;
4840 :
4841 0 : case NETR_DELTA_ACCOUNT:
4842 0 : if (r->account) {
4843 0 : _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
4844 0 : NDR_PULL_SET_MEM_CTX(ndr, r->account, 0);
4845 0 : NDR_CHECK(ndr_pull_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
4846 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, 0);
4847 : }
4848 0 : break;
4849 :
4850 0 : case NETR_DELTA_DELETE_ACCOUNT:
4851 0 : break;
4852 :
4853 0 : case NETR_DELTA_SECRET:
4854 0 : if (r->secret) {
4855 0 : _mem_save_secret_0 = NDR_PULL_GET_MEM_CTX(ndr);
4856 0 : NDR_PULL_SET_MEM_CTX(ndr, r->secret, 0);
4857 0 : NDR_CHECK(ndr_pull_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
4858 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secret_0, 0);
4859 : }
4860 0 : break;
4861 :
4862 0 : case NETR_DELTA_DELETE_SECRET:
4863 0 : break;
4864 :
4865 0 : case NETR_DELTA_DELETE_GROUP2:
4866 0 : if (r->delete_group) {
4867 0 : _mem_save_delete_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4868 0 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_group, 0);
4869 0 : NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
4870 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_group_0, 0);
4871 : }
4872 0 : break;
4873 :
4874 0 : case NETR_DELTA_DELETE_USER2:
4875 0 : if (r->delete_user) {
4876 0 : _mem_save_delete_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
4877 0 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_user, 0);
4878 0 : NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
4879 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_user_0, 0);
4880 : }
4881 0 : break;
4882 :
4883 0 : case NETR_DELTA_MODIFY_COUNT:
4884 0 : if (r->modified_count) {
4885 0 : _mem_save_modified_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
4886 0 : NDR_PULL_SET_MEM_CTX(ndr, r->modified_count, 0);
4887 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->modified_count));
4888 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_modified_count_0, 0);
4889 : }
4890 0 : break;
4891 :
4892 0 : default:
4893 0 : break;
4894 :
4895 : }
4896 0 : }
4897 0 : return NDR_ERR_SUCCESS;
4898 : }
4899 :
4900 0 : _PUBLIC_ void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_UNION *r)
4901 : {
4902 : uint32_t level;
4903 0 : level = ndr_print_steal_switch_value(ndr, r);
4904 0 : ndr_print_union(ndr, name, level, "netr_DELTA_UNION");
4905 0 : switch (level) {
4906 0 : case NETR_DELTA_DOMAIN:
4907 0 : ndr_print_ptr(ndr, "domain", r->domain);
4908 0 : ndr->depth++;
4909 0 : if (r->domain) {
4910 0 : ndr_print_netr_DELTA_DOMAIN(ndr, "domain", r->domain);
4911 : }
4912 0 : ndr->depth--;
4913 0 : break;
4914 :
4915 0 : case NETR_DELTA_GROUP:
4916 0 : ndr_print_ptr(ndr, "group", r->group);
4917 0 : ndr->depth++;
4918 0 : if (r->group) {
4919 0 : ndr_print_netr_DELTA_GROUP(ndr, "group", r->group);
4920 : }
4921 0 : ndr->depth--;
4922 0 : break;
4923 :
4924 0 : case NETR_DELTA_DELETE_GROUP:
4925 0 : break;
4926 :
4927 0 : case NETR_DELTA_RENAME_GROUP:
4928 0 : ndr_print_ptr(ndr, "rename_group", r->rename_group);
4929 0 : ndr->depth++;
4930 0 : if (r->rename_group) {
4931 0 : ndr_print_netr_DELTA_RENAME(ndr, "rename_group", r->rename_group);
4932 : }
4933 0 : ndr->depth--;
4934 0 : break;
4935 :
4936 0 : case NETR_DELTA_USER:
4937 0 : ndr_print_ptr(ndr, "user", r->user);
4938 0 : ndr->depth++;
4939 0 : if (r->user) {
4940 0 : ndr_print_netr_DELTA_USER(ndr, "user", r->user);
4941 : }
4942 0 : ndr->depth--;
4943 0 : break;
4944 :
4945 0 : case NETR_DELTA_DELETE_USER:
4946 0 : break;
4947 :
4948 0 : case NETR_DELTA_RENAME_USER:
4949 0 : ndr_print_ptr(ndr, "rename_user", r->rename_user);
4950 0 : ndr->depth++;
4951 0 : if (r->rename_user) {
4952 0 : ndr_print_netr_DELTA_RENAME(ndr, "rename_user", r->rename_user);
4953 : }
4954 0 : ndr->depth--;
4955 0 : break;
4956 :
4957 0 : case NETR_DELTA_GROUP_MEMBER:
4958 0 : ndr_print_ptr(ndr, "group_member", r->group_member);
4959 0 : ndr->depth++;
4960 0 : if (r->group_member) {
4961 0 : ndr_print_netr_DELTA_GROUP_MEMBER(ndr, "group_member", r->group_member);
4962 : }
4963 0 : ndr->depth--;
4964 0 : break;
4965 :
4966 0 : case NETR_DELTA_ALIAS:
4967 0 : ndr_print_ptr(ndr, "alias", r->alias);
4968 0 : ndr->depth++;
4969 0 : if (r->alias) {
4970 0 : ndr_print_netr_DELTA_ALIAS(ndr, "alias", r->alias);
4971 : }
4972 0 : ndr->depth--;
4973 0 : break;
4974 :
4975 0 : case NETR_DELTA_DELETE_ALIAS:
4976 0 : break;
4977 :
4978 0 : case NETR_DELTA_RENAME_ALIAS:
4979 0 : ndr_print_ptr(ndr, "rename_alias", r->rename_alias);
4980 0 : ndr->depth++;
4981 0 : if (r->rename_alias) {
4982 0 : ndr_print_netr_DELTA_RENAME(ndr, "rename_alias", r->rename_alias);
4983 : }
4984 0 : ndr->depth--;
4985 0 : break;
4986 :
4987 0 : case NETR_DELTA_ALIAS_MEMBER:
4988 0 : ndr_print_ptr(ndr, "alias_member", r->alias_member);
4989 0 : ndr->depth++;
4990 0 : if (r->alias_member) {
4991 0 : ndr_print_netr_DELTA_ALIAS_MEMBER(ndr, "alias_member", r->alias_member);
4992 : }
4993 0 : ndr->depth--;
4994 0 : break;
4995 :
4996 0 : case NETR_DELTA_POLICY:
4997 0 : ndr_print_ptr(ndr, "policy", r->policy);
4998 0 : ndr->depth++;
4999 0 : if (r->policy) {
5000 0 : ndr_print_netr_DELTA_POLICY(ndr, "policy", r->policy);
5001 : }
5002 0 : ndr->depth--;
5003 0 : break;
5004 :
5005 0 : case NETR_DELTA_TRUSTED_DOMAIN:
5006 0 : ndr_print_ptr(ndr, "trusted_domain", r->trusted_domain);
5007 0 : ndr->depth++;
5008 0 : if (r->trusted_domain) {
5009 0 : ndr_print_netr_DELTA_TRUSTED_DOMAIN(ndr, "trusted_domain", r->trusted_domain);
5010 : }
5011 0 : ndr->depth--;
5012 0 : break;
5013 :
5014 0 : case NETR_DELTA_DELETE_TRUST:
5015 0 : break;
5016 :
5017 0 : case NETR_DELTA_ACCOUNT:
5018 0 : ndr_print_ptr(ndr, "account", r->account);
5019 0 : ndr->depth++;
5020 0 : if (r->account) {
5021 0 : ndr_print_netr_DELTA_ACCOUNT(ndr, "account", r->account);
5022 : }
5023 0 : ndr->depth--;
5024 0 : break;
5025 :
5026 0 : case NETR_DELTA_DELETE_ACCOUNT:
5027 0 : break;
5028 :
5029 0 : case NETR_DELTA_SECRET:
5030 0 : ndr_print_ptr(ndr, "secret", r->secret);
5031 0 : ndr->depth++;
5032 0 : if (r->secret) {
5033 0 : ndr_print_netr_DELTA_SECRET(ndr, "secret", r->secret);
5034 : }
5035 0 : ndr->depth--;
5036 0 : break;
5037 :
5038 0 : case NETR_DELTA_DELETE_SECRET:
5039 0 : break;
5040 :
5041 0 : case NETR_DELTA_DELETE_GROUP2:
5042 0 : ndr_print_ptr(ndr, "delete_group", r->delete_group);
5043 0 : ndr->depth++;
5044 0 : if (r->delete_group) {
5045 0 : ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_group", r->delete_group);
5046 : }
5047 0 : ndr->depth--;
5048 0 : break;
5049 :
5050 0 : case NETR_DELTA_DELETE_USER2:
5051 0 : ndr_print_ptr(ndr, "delete_user", r->delete_user);
5052 0 : ndr->depth++;
5053 0 : if (r->delete_user) {
5054 0 : ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_user", r->delete_user);
5055 : }
5056 0 : ndr->depth--;
5057 0 : break;
5058 :
5059 0 : case NETR_DELTA_MODIFY_COUNT:
5060 0 : ndr_print_ptr(ndr, "modified_count", r->modified_count);
5061 0 : ndr->depth++;
5062 0 : if (r->modified_count) {
5063 0 : ndr_print_udlong(ndr, "modified_count", *r->modified_count);
5064 : }
5065 0 : ndr->depth--;
5066 0 : break;
5067 :
5068 0 : default:
5069 0 : break;
5070 :
5071 : }
5072 0 : }
5073 :
5074 0 : static enum ndr_err_code ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_ID_UNION *r)
5075 : {
5076 : uint32_t level;
5077 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5078 0 : if (ndr_flags & NDR_SCALARS) {
5079 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5080 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5081 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5082 0 : NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
5083 : /* ms_union is always aligned to the largest union arm*/
5084 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5085 0 : switch (level) {
5086 0 : case NETR_DELTA_DOMAIN: {
5087 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5088 0 : break; }
5089 :
5090 0 : case NETR_DELTA_GROUP: {
5091 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5092 0 : break; }
5093 :
5094 0 : case NETR_DELTA_DELETE_GROUP: {
5095 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5096 0 : break; }
5097 :
5098 0 : case NETR_DELTA_RENAME_GROUP: {
5099 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5100 0 : break; }
5101 :
5102 0 : case NETR_DELTA_USER: {
5103 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5104 0 : break; }
5105 :
5106 0 : case NETR_DELTA_DELETE_USER: {
5107 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5108 0 : break; }
5109 :
5110 0 : case NETR_DELTA_RENAME_USER: {
5111 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5112 0 : break; }
5113 :
5114 0 : case NETR_DELTA_GROUP_MEMBER: {
5115 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5116 0 : break; }
5117 :
5118 0 : case NETR_DELTA_ALIAS: {
5119 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5120 0 : break; }
5121 :
5122 0 : case NETR_DELTA_DELETE_ALIAS: {
5123 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5124 0 : break; }
5125 :
5126 0 : case NETR_DELTA_RENAME_ALIAS: {
5127 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5128 0 : break; }
5129 :
5130 0 : case NETR_DELTA_ALIAS_MEMBER: {
5131 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5132 0 : break; }
5133 :
5134 0 : case NETR_DELTA_POLICY: {
5135 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5136 0 : break; }
5137 :
5138 0 : case NETR_DELTA_TRUSTED_DOMAIN: {
5139 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5140 0 : break; }
5141 :
5142 0 : case NETR_DELTA_DELETE_TRUST: {
5143 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5144 0 : break; }
5145 :
5146 0 : case NETR_DELTA_ACCOUNT: {
5147 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5148 0 : break; }
5149 :
5150 0 : case NETR_DELTA_DELETE_ACCOUNT: {
5151 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
5152 0 : break; }
5153 :
5154 0 : case NETR_DELTA_SECRET: {
5155 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
5156 0 : break; }
5157 :
5158 0 : case NETR_DELTA_DELETE_SECRET: {
5159 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
5160 0 : break; }
5161 :
5162 0 : case NETR_DELTA_DELETE_GROUP2: {
5163 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5164 0 : break; }
5165 :
5166 0 : case NETR_DELTA_DELETE_USER2: {
5167 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
5168 0 : break; }
5169 :
5170 0 : case NETR_DELTA_MODIFY_COUNT: {
5171 0 : break; }
5172 :
5173 0 : default: {
5174 0 : break; }
5175 :
5176 : }
5177 0 : }
5178 0 : if (ndr_flags & NDR_BUFFERS) {
5179 0 : if (!(ndr_flags & NDR_SCALARS)) {
5180 : /* We didn't get it above, and the token is not needed after this. */
5181 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5182 : }
5183 0 : switch (level) {
5184 0 : case NETR_DELTA_DOMAIN:
5185 0 : break;
5186 :
5187 0 : case NETR_DELTA_GROUP:
5188 0 : break;
5189 :
5190 0 : case NETR_DELTA_DELETE_GROUP:
5191 0 : break;
5192 :
5193 0 : case NETR_DELTA_RENAME_GROUP:
5194 0 : break;
5195 :
5196 0 : case NETR_DELTA_USER:
5197 0 : break;
5198 :
5199 0 : case NETR_DELTA_DELETE_USER:
5200 0 : break;
5201 :
5202 0 : case NETR_DELTA_RENAME_USER:
5203 0 : break;
5204 :
5205 0 : case NETR_DELTA_GROUP_MEMBER:
5206 0 : break;
5207 :
5208 0 : case NETR_DELTA_ALIAS:
5209 0 : break;
5210 :
5211 0 : case NETR_DELTA_DELETE_ALIAS:
5212 0 : break;
5213 :
5214 0 : case NETR_DELTA_RENAME_ALIAS:
5215 0 : break;
5216 :
5217 0 : case NETR_DELTA_ALIAS_MEMBER:
5218 0 : break;
5219 :
5220 0 : case NETR_DELTA_POLICY:
5221 0 : if (r->sid) {
5222 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5223 : }
5224 0 : break;
5225 :
5226 0 : case NETR_DELTA_TRUSTED_DOMAIN:
5227 0 : if (r->sid) {
5228 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5229 : }
5230 0 : break;
5231 :
5232 0 : case NETR_DELTA_DELETE_TRUST:
5233 0 : if (r->sid) {
5234 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5235 : }
5236 0 : break;
5237 :
5238 0 : case NETR_DELTA_ACCOUNT:
5239 0 : if (r->sid) {
5240 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5241 : }
5242 0 : break;
5243 :
5244 0 : case NETR_DELTA_DELETE_ACCOUNT:
5245 0 : if (r->sid) {
5246 0 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5247 : }
5248 0 : break;
5249 :
5250 0 : case NETR_DELTA_SECRET:
5251 0 : if (r->name) {
5252 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
5253 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5254 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
5255 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5256 : }
5257 0 : break;
5258 :
5259 0 : case NETR_DELTA_DELETE_SECRET:
5260 0 : if (r->name) {
5261 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
5262 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5263 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
5264 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5265 : }
5266 0 : break;
5267 :
5268 0 : case NETR_DELTA_DELETE_GROUP2:
5269 0 : break;
5270 :
5271 0 : case NETR_DELTA_DELETE_USER2:
5272 0 : break;
5273 :
5274 0 : case NETR_DELTA_MODIFY_COUNT:
5275 0 : break;
5276 :
5277 0 : default:
5278 0 : break;
5279 :
5280 : }
5281 0 : }
5282 0 : return NDR_ERR_SUCCESS;
5283 : }
5284 :
5285 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ID_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_ID_UNION *r)
5286 : {
5287 : uint32_t level;
5288 : uint16_t _level;
5289 0 : TALLOC_CTX *_mem_save_sid_0 = NULL;
5290 : uint32_t _ptr_sid;
5291 0 : TALLOC_CTX *_mem_save_name_0 = NULL;
5292 : uint32_t _ptr_name;
5293 0 : uint32_t size_name_1 = 0;
5294 0 : uint32_t length_name_1 = 0;
5295 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5296 0 : if (ndr_flags & NDR_SCALARS) {
5297 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5298 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5299 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5300 0 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
5301 0 : if (_level != level) {
5302 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5303 : }
5304 : /* ms_union is always aligned to the largest union arm*/
5305 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5306 0 : switch (level) {
5307 0 : case NETR_DELTA_DOMAIN: {
5308 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5309 0 : break; }
5310 :
5311 0 : case NETR_DELTA_GROUP: {
5312 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5313 0 : break; }
5314 :
5315 0 : case NETR_DELTA_DELETE_GROUP: {
5316 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5317 0 : break; }
5318 :
5319 0 : case NETR_DELTA_RENAME_GROUP: {
5320 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5321 0 : break; }
5322 :
5323 0 : case NETR_DELTA_USER: {
5324 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5325 0 : break; }
5326 :
5327 0 : case NETR_DELTA_DELETE_USER: {
5328 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5329 0 : break; }
5330 :
5331 0 : case NETR_DELTA_RENAME_USER: {
5332 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5333 0 : break; }
5334 :
5335 0 : case NETR_DELTA_GROUP_MEMBER: {
5336 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5337 0 : break; }
5338 :
5339 0 : case NETR_DELTA_ALIAS: {
5340 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5341 0 : break; }
5342 :
5343 0 : case NETR_DELTA_DELETE_ALIAS: {
5344 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5345 0 : break; }
5346 :
5347 0 : case NETR_DELTA_RENAME_ALIAS: {
5348 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5349 0 : break; }
5350 :
5351 0 : case NETR_DELTA_ALIAS_MEMBER: {
5352 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5353 0 : break; }
5354 :
5355 0 : case NETR_DELTA_POLICY: {
5356 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5357 0 : if (_ptr_sid) {
5358 0 : NDR_PULL_ALLOC(ndr, r->sid);
5359 : } else {
5360 0 : r->sid = NULL;
5361 : }
5362 0 : break; }
5363 :
5364 0 : case NETR_DELTA_TRUSTED_DOMAIN: {
5365 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5366 0 : if (_ptr_sid) {
5367 0 : NDR_PULL_ALLOC(ndr, r->sid);
5368 : } else {
5369 0 : r->sid = NULL;
5370 : }
5371 0 : break; }
5372 :
5373 0 : case NETR_DELTA_DELETE_TRUST: {
5374 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5375 0 : if (_ptr_sid) {
5376 0 : NDR_PULL_ALLOC(ndr, r->sid);
5377 : } else {
5378 0 : r->sid = NULL;
5379 : }
5380 0 : break; }
5381 :
5382 0 : case NETR_DELTA_ACCOUNT: {
5383 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5384 0 : if (_ptr_sid) {
5385 0 : NDR_PULL_ALLOC(ndr, r->sid);
5386 : } else {
5387 0 : r->sid = NULL;
5388 : }
5389 0 : break; }
5390 :
5391 0 : case NETR_DELTA_DELETE_ACCOUNT: {
5392 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
5393 0 : if (_ptr_sid) {
5394 0 : NDR_PULL_ALLOC(ndr, r->sid);
5395 : } else {
5396 0 : r->sid = NULL;
5397 : }
5398 0 : break; }
5399 :
5400 0 : case NETR_DELTA_SECRET: {
5401 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
5402 0 : if (_ptr_name) {
5403 0 : NDR_PULL_ALLOC(ndr, r->name);
5404 : } else {
5405 0 : r->name = NULL;
5406 : }
5407 0 : break; }
5408 :
5409 0 : case NETR_DELTA_DELETE_SECRET: {
5410 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
5411 0 : if (_ptr_name) {
5412 0 : NDR_PULL_ALLOC(ndr, r->name);
5413 : } else {
5414 0 : r->name = NULL;
5415 : }
5416 0 : break; }
5417 :
5418 0 : case NETR_DELTA_DELETE_GROUP2: {
5419 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5420 0 : break; }
5421 :
5422 0 : case NETR_DELTA_DELETE_USER2: {
5423 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
5424 0 : break; }
5425 :
5426 0 : case NETR_DELTA_MODIFY_COUNT: {
5427 0 : break; }
5428 :
5429 0 : default: {
5430 0 : break; }
5431 :
5432 : }
5433 0 : }
5434 0 : if (ndr_flags & NDR_BUFFERS) {
5435 0 : if (!(ndr_flags & NDR_SCALARS)) {
5436 : /* We didn't get it above, and the token is not needed after this. */
5437 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5438 : }
5439 0 : switch (level) {
5440 0 : case NETR_DELTA_DOMAIN:
5441 0 : break;
5442 :
5443 0 : case NETR_DELTA_GROUP:
5444 0 : break;
5445 :
5446 0 : case NETR_DELTA_DELETE_GROUP:
5447 0 : break;
5448 :
5449 0 : case NETR_DELTA_RENAME_GROUP:
5450 0 : break;
5451 :
5452 0 : case NETR_DELTA_USER:
5453 0 : break;
5454 :
5455 0 : case NETR_DELTA_DELETE_USER:
5456 0 : break;
5457 :
5458 0 : case NETR_DELTA_RENAME_USER:
5459 0 : break;
5460 :
5461 0 : case NETR_DELTA_GROUP_MEMBER:
5462 0 : break;
5463 :
5464 0 : case NETR_DELTA_ALIAS:
5465 0 : break;
5466 :
5467 0 : case NETR_DELTA_DELETE_ALIAS:
5468 0 : break;
5469 :
5470 0 : case NETR_DELTA_RENAME_ALIAS:
5471 0 : break;
5472 :
5473 0 : case NETR_DELTA_ALIAS_MEMBER:
5474 0 : break;
5475 :
5476 0 : case NETR_DELTA_POLICY:
5477 0 : if (r->sid) {
5478 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5479 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5480 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5481 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5482 : }
5483 0 : break;
5484 :
5485 0 : case NETR_DELTA_TRUSTED_DOMAIN:
5486 0 : if (r->sid) {
5487 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5488 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5489 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5490 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5491 : }
5492 0 : break;
5493 :
5494 0 : case NETR_DELTA_DELETE_TRUST:
5495 0 : if (r->sid) {
5496 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5497 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5498 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5499 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5500 : }
5501 0 : break;
5502 :
5503 0 : case NETR_DELTA_ACCOUNT:
5504 0 : if (r->sid) {
5505 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5506 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5507 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5508 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5509 : }
5510 0 : break;
5511 :
5512 0 : case NETR_DELTA_DELETE_ACCOUNT:
5513 0 : if (r->sid) {
5514 0 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5515 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
5516 0 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
5517 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
5518 : }
5519 0 : break;
5520 :
5521 0 : case NETR_DELTA_SECRET:
5522 0 : if (r->name) {
5523 0 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5524 0 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
5525 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
5526 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
5527 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
5528 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
5529 0 : if (length_name_1 > size_name_1) {
5530 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
5531 : }
5532 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
5533 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
5534 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
5535 : }
5536 0 : break;
5537 :
5538 0 : case NETR_DELTA_DELETE_SECRET:
5539 0 : if (r->name) {
5540 0 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5541 0 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
5542 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
5543 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
5544 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
5545 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
5546 0 : if (length_name_1 > size_name_1) {
5547 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
5548 : }
5549 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
5550 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
5551 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
5552 : }
5553 0 : break;
5554 :
5555 0 : case NETR_DELTA_DELETE_GROUP2:
5556 0 : break;
5557 :
5558 0 : case NETR_DELTA_DELETE_USER2:
5559 0 : break;
5560 :
5561 0 : case NETR_DELTA_MODIFY_COUNT:
5562 0 : break;
5563 :
5564 0 : default:
5565 0 : break;
5566 :
5567 : }
5568 0 : }
5569 0 : return NDR_ERR_SUCCESS;
5570 : }
5571 :
5572 0 : _PUBLIC_ void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_ID_UNION *r)
5573 : {
5574 : uint32_t level;
5575 0 : level = ndr_print_steal_switch_value(ndr, r);
5576 0 : ndr_print_union(ndr, name, level, "netr_DELTA_ID_UNION");
5577 0 : switch (level) {
5578 0 : case NETR_DELTA_DOMAIN:
5579 0 : ndr_print_uint32(ndr, "rid", r->rid);
5580 0 : break;
5581 :
5582 0 : case NETR_DELTA_GROUP:
5583 0 : ndr_print_uint32(ndr, "rid", r->rid);
5584 0 : break;
5585 :
5586 0 : case NETR_DELTA_DELETE_GROUP:
5587 0 : ndr_print_uint32(ndr, "rid", r->rid);
5588 0 : break;
5589 :
5590 0 : case NETR_DELTA_RENAME_GROUP:
5591 0 : ndr_print_uint32(ndr, "rid", r->rid);
5592 0 : break;
5593 :
5594 0 : case NETR_DELTA_USER:
5595 0 : ndr_print_uint32(ndr, "rid", r->rid);
5596 0 : break;
5597 :
5598 0 : case NETR_DELTA_DELETE_USER:
5599 0 : ndr_print_uint32(ndr, "rid", r->rid);
5600 0 : break;
5601 :
5602 0 : case NETR_DELTA_RENAME_USER:
5603 0 : ndr_print_uint32(ndr, "rid", r->rid);
5604 0 : break;
5605 :
5606 0 : case NETR_DELTA_GROUP_MEMBER:
5607 0 : ndr_print_uint32(ndr, "rid", r->rid);
5608 0 : break;
5609 :
5610 0 : case NETR_DELTA_ALIAS:
5611 0 : ndr_print_uint32(ndr, "rid", r->rid);
5612 0 : break;
5613 :
5614 0 : case NETR_DELTA_DELETE_ALIAS:
5615 0 : ndr_print_uint32(ndr, "rid", r->rid);
5616 0 : break;
5617 :
5618 0 : case NETR_DELTA_RENAME_ALIAS:
5619 0 : ndr_print_uint32(ndr, "rid", r->rid);
5620 0 : break;
5621 :
5622 0 : case NETR_DELTA_ALIAS_MEMBER:
5623 0 : ndr_print_uint32(ndr, "rid", r->rid);
5624 0 : break;
5625 :
5626 0 : case NETR_DELTA_POLICY:
5627 0 : ndr_print_ptr(ndr, "sid", r->sid);
5628 0 : ndr->depth++;
5629 0 : if (r->sid) {
5630 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5631 : }
5632 0 : ndr->depth--;
5633 0 : break;
5634 :
5635 0 : case NETR_DELTA_TRUSTED_DOMAIN:
5636 0 : ndr_print_ptr(ndr, "sid", r->sid);
5637 0 : ndr->depth++;
5638 0 : if (r->sid) {
5639 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5640 : }
5641 0 : ndr->depth--;
5642 0 : break;
5643 :
5644 0 : case NETR_DELTA_DELETE_TRUST:
5645 0 : ndr_print_ptr(ndr, "sid", r->sid);
5646 0 : ndr->depth++;
5647 0 : if (r->sid) {
5648 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5649 : }
5650 0 : ndr->depth--;
5651 0 : break;
5652 :
5653 0 : case NETR_DELTA_ACCOUNT:
5654 0 : ndr_print_ptr(ndr, "sid", r->sid);
5655 0 : ndr->depth++;
5656 0 : if (r->sid) {
5657 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5658 : }
5659 0 : ndr->depth--;
5660 0 : break;
5661 :
5662 0 : case NETR_DELTA_DELETE_ACCOUNT:
5663 0 : ndr_print_ptr(ndr, "sid", r->sid);
5664 0 : ndr->depth++;
5665 0 : if (r->sid) {
5666 0 : ndr_print_dom_sid2(ndr, "sid", r->sid);
5667 : }
5668 0 : ndr->depth--;
5669 0 : break;
5670 :
5671 0 : case NETR_DELTA_SECRET:
5672 0 : ndr_print_ptr(ndr, "name", r->name);
5673 0 : ndr->depth++;
5674 0 : if (r->name) {
5675 0 : ndr_print_string(ndr, "name", r->name);
5676 : }
5677 0 : ndr->depth--;
5678 0 : break;
5679 :
5680 0 : case NETR_DELTA_DELETE_SECRET:
5681 0 : ndr_print_ptr(ndr, "name", r->name);
5682 0 : ndr->depth++;
5683 0 : if (r->name) {
5684 0 : ndr_print_string(ndr, "name", r->name);
5685 : }
5686 0 : ndr->depth--;
5687 0 : break;
5688 :
5689 0 : case NETR_DELTA_DELETE_GROUP2:
5690 0 : ndr_print_uint32(ndr, "rid", r->rid);
5691 0 : break;
5692 :
5693 0 : case NETR_DELTA_DELETE_USER2:
5694 0 : ndr_print_uint32(ndr, "rid", r->rid);
5695 0 : break;
5696 :
5697 0 : case NETR_DELTA_MODIFY_COUNT:
5698 0 : break;
5699 :
5700 0 : default:
5701 0 : break;
5702 :
5703 : }
5704 0 : }
5705 :
5706 0 : static enum ndr_err_code ndr_push_netr_DELTA_ENUM(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM *r)
5707 : {
5708 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5709 0 : if (ndr_flags & NDR_SCALARS) {
5710 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5711 0 : NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, r->delta_type));
5712 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
5713 0 : NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
5714 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type));
5715 0 : NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
5716 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5717 : }
5718 0 : if (ndr_flags & NDR_BUFFERS) {
5719 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
5720 0 : NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
5721 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type));
5722 0 : NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
5723 : }
5724 0 : return NDR_ERR_SUCCESS;
5725 : }
5726 :
5727 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ENUM(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM *r)
5728 : {
5729 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5730 0 : if (ndr_flags & NDR_SCALARS) {
5731 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5732 0 : NDR_CHECK(ndr_pull_netr_DeltaEnum(ndr, NDR_SCALARS, &r->delta_type));
5733 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
5734 0 : NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
5735 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type));
5736 0 : NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
5737 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5738 : }
5739 0 : if (ndr_flags & NDR_BUFFERS) {
5740 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
5741 0 : NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
5742 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type));
5743 0 : NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
5744 : }
5745 0 : return NDR_ERR_SUCCESS;
5746 : }
5747 :
5748 0 : _PUBLIC_ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM *r)
5749 : {
5750 0 : ndr_print_struct(ndr, name, "netr_DELTA_ENUM");
5751 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5752 0 : ndr->depth++;
5753 0 : ndr_print_netr_DeltaEnum(ndr, "delta_type", r->delta_type);
5754 0 : ndr_print_set_switch_value(ndr, &r->delta_id_union, r->delta_type);
5755 0 : ndr_print_netr_DELTA_ID_UNION(ndr, "delta_id_union", &r->delta_id_union);
5756 0 : ndr_print_set_switch_value(ndr, &r->delta_union, r->delta_type);
5757 0 : ndr_print_netr_DELTA_UNION(ndr, "delta_union", &r->delta_union);
5758 0 : ndr->depth--;
5759 : }
5760 :
5761 0 : static enum ndr_err_code ndr_push_netr_DELTA_ENUM_ARRAY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM_ARRAY *r)
5762 : {
5763 : uint32_t cntr_delta_enum_1;
5764 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5765 0 : if (ndr_flags & NDR_SCALARS) {
5766 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5767 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_deltas));
5768 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delta_enum));
5769 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5770 : }
5771 0 : if (ndr_flags & NDR_BUFFERS) {
5772 0 : if (r->delta_enum) {
5773 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_deltas));
5774 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
5775 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
5776 : }
5777 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
5778 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
5779 : }
5780 : }
5781 : }
5782 0 : return NDR_ERR_SUCCESS;
5783 : }
5784 :
5785 0 : static enum ndr_err_code ndr_pull_netr_DELTA_ENUM_ARRAY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM_ARRAY *r)
5786 : {
5787 : uint32_t _ptr_delta_enum;
5788 0 : uint32_t size_delta_enum_1 = 0;
5789 : uint32_t cntr_delta_enum_1;
5790 0 : TALLOC_CTX *_mem_save_delta_enum_0 = NULL;
5791 0 : TALLOC_CTX *_mem_save_delta_enum_1 = NULL;
5792 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5793 0 : if (ndr_flags & NDR_SCALARS) {
5794 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5795 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_deltas));
5796 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum));
5797 0 : if (_ptr_delta_enum) {
5798 0 : NDR_PULL_ALLOC(ndr, r->delta_enum);
5799 : } else {
5800 0 : r->delta_enum = NULL;
5801 : }
5802 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5803 : }
5804 0 : if (ndr_flags & NDR_BUFFERS) {
5805 0 : if (r->delta_enum) {
5806 0 : _mem_save_delta_enum_0 = NDR_PULL_GET_MEM_CTX(ndr);
5807 0 : NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
5808 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->delta_enum));
5809 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->delta_enum, &size_delta_enum_1));
5810 0 : NDR_PULL_ALLOC_N(ndr, r->delta_enum, size_delta_enum_1);
5811 0 : _mem_save_delta_enum_1 = NDR_PULL_GET_MEM_CTX(ndr);
5812 0 : NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
5813 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
5814 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
5815 : }
5816 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
5817 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
5818 : }
5819 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_1, 0);
5820 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_0, 0);
5821 : }
5822 0 : if (r->delta_enum) {
5823 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->delta_enum, r->num_deltas));
5824 : }
5825 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
5826 : }
5827 : }
5828 0 : return NDR_ERR_SUCCESS;
5829 : }
5830 :
5831 0 : _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r)
5832 : {
5833 : uint32_t cntr_delta_enum_1;
5834 0 : ndr_print_struct(ndr, name, "netr_DELTA_ENUM_ARRAY");
5835 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5836 0 : ndr->depth++;
5837 0 : ndr_print_uint32(ndr, "num_deltas", r->num_deltas);
5838 0 : ndr_print_ptr(ndr, "delta_enum", r->delta_enum);
5839 0 : ndr->depth++;
5840 0 : if (r->delta_enum) {
5841 0 : ndr->print(ndr, "%s: ARRAY(%d)", "delta_enum", (int)r->num_deltas);
5842 0 : ndr->depth++;
5843 0 : for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
5844 0 : ndr_print_netr_DELTA_ENUM(ndr, "delta_enum", &r->delta_enum[cntr_delta_enum_1]);
5845 : }
5846 0 : ndr->depth--;
5847 : }
5848 0 : ndr->depth--;
5849 0 : ndr->depth--;
5850 : }
5851 :
5852 54 : static enum ndr_err_code ndr_push_netr_UAS_INFO_0(struct ndr_push *ndr, int ndr_flags, const struct netr_UAS_INFO_0 *r)
5853 : {
5854 : {
5855 54 : uint32_t _flags_save_STRUCT = ndr->flags;
5856 54 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
5857 54 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5858 54 : if (ndr_flags & NDR_SCALARS) {
5859 54 : NDR_CHECK(ndr_push_align(ndr, 4));
5860 54 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->computer_name, 16));
5861 54 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timecreated));
5862 54 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number));
5863 54 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5864 : }
5865 54 : if (ndr_flags & NDR_BUFFERS) {
5866 : }
5867 54 : ndr->flags = _flags_save_STRUCT;
5868 : }
5869 54 : return NDR_ERR_SUCCESS;
5870 : }
5871 :
5872 48 : static enum ndr_err_code ndr_pull_netr_UAS_INFO_0(struct ndr_pull *ndr, int ndr_flags, struct netr_UAS_INFO_0 *r)
5873 : {
5874 48 : uint32_t size_computer_name_0 = 0;
5875 : {
5876 48 : uint32_t _flags_save_STRUCT = ndr->flags;
5877 48 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
5878 48 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5879 48 : if (ndr_flags & NDR_SCALARS) {
5880 48 : NDR_CHECK(ndr_pull_align(ndr, 4));
5881 48 : size_computer_name_0 = 16;
5882 48 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->computer_name, size_computer_name_0));
5883 48 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timecreated));
5884 48 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number));
5885 48 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5886 : }
5887 48 : if (ndr_flags & NDR_BUFFERS) {
5888 : }
5889 48 : ndr->flags = _flags_save_STRUCT;
5890 : }
5891 48 : return NDR_ERR_SUCCESS;
5892 : }
5893 :
5894 12 : _PUBLIC_ void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r)
5895 : {
5896 12 : ndr_print_struct(ndr, name, "netr_UAS_INFO_0");
5897 12 : if (r == NULL) { ndr_print_null(ndr); return; }
5898 : {
5899 12 : uint32_t _flags_save_STRUCT = ndr->flags;
5900 12 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
5901 12 : ndr->depth++;
5902 12 : ndr_print_array_uint8(ndr, "computer_name", r->computer_name, 16);
5903 12 : ndr_print_uint32(ndr, "timecreated", r->timecreated);
5904 12 : ndr_print_uint32(ndr, "serial_number", r->serial_number);
5905 12 : ndr->depth--;
5906 12 : ndr->flags = _flags_save_STRUCT;
5907 : }
5908 : }
5909 :
5910 30 : static enum ndr_err_code ndr_push_netr_AccountBuffer(struct ndr_push *ndr, int ndr_flags, const struct netr_AccountBuffer *r)
5911 : {
5912 30 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5913 30 : if (ndr_flags & NDR_SCALARS) {
5914 30 : NDR_CHECK(ndr_push_align(ndr, 4));
5915 : {
5916 30 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
5917 30 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
5918 30 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
5919 30 : ndr->flags = _flags_save_DATA_BLOB;
5920 : }
5921 30 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5922 : }
5923 30 : if (ndr_flags & NDR_BUFFERS) {
5924 : }
5925 30 : return NDR_ERR_SUCCESS;
5926 : }
5927 :
5928 24 : static enum ndr_err_code ndr_pull_netr_AccountBuffer(struct ndr_pull *ndr, int ndr_flags, struct netr_AccountBuffer *r)
5929 : {
5930 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5931 24 : if (ndr_flags & NDR_SCALARS) {
5932 24 : NDR_CHECK(ndr_pull_align(ndr, 4));
5933 : {
5934 24 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
5935 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
5936 24 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->blob));
5937 24 : ndr->flags = _flags_save_DATA_BLOB;
5938 : }
5939 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5940 : }
5941 24 : if (ndr_flags & NDR_BUFFERS) {
5942 : }
5943 24 : return NDR_ERR_SUCCESS;
5944 : }
5945 :
5946 12 : _PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r)
5947 : {
5948 12 : ndr_print_struct(ndr, name, "netr_AccountBuffer");
5949 12 : if (r == NULL) { ndr_print_null(ndr); return; }
5950 12 : ndr->depth++;
5951 : {
5952 12 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
5953 12 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
5954 12 : ndr_print_DATA_BLOB(ndr, "blob", r->blob);
5955 12 : ndr->flags = _flags_save_DATA_BLOB;
5956 : }
5957 12 : ndr->depth--;
5958 : }
5959 :
5960 262 : static enum ndr_err_code ndr_push_netr_InfoFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
5961 : {
5962 262 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
5963 262 : return NDR_ERR_SUCCESS;
5964 : }
5965 :
5966 358 : static enum ndr_err_code ndr_pull_netr_InfoFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
5967 : {
5968 : uint32_t v;
5969 358 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
5970 358 : *r = v;
5971 358 : return NDR_ERR_SUCCESS;
5972 : }
5973 :
5974 42 : _PUBLIC_ void ndr_print_netr_InfoFlags(struct ndr_print *ndr, const char *name, uint32_t r)
5975 : {
5976 42 : ndr_print_uint32(ndr, name, r);
5977 42 : ndr->depth++;
5978 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REPLICATION_NEEDED", NETLOGON_REPLICATION_NEEDED, r);
5979 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REPLICATION_IN_PROGRESS", NETLOGON_REPLICATION_IN_PROGRESS, r);
5980 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_FULL_SYNC_REPLICATION", NETLOGON_FULL_SYNC_REPLICATION, r);
5981 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REDO_NEEDED", NETLOGON_REDO_NEEDED, r);
5982 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_HAS_IP", NETLOGON_HAS_IP, r);
5983 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_HAS_TIMESERV", NETLOGON_HAS_TIMESERV, r);
5984 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_DNS_UPDATE_FAILURE", NETLOGON_DNS_UPDATE_FAILURE, r);
5985 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERIFY_STATUS_RETURNED", NETLOGON_VERIFY_STATUS_RETURNED, r);
5986 42 : ndr->depth--;
5987 42 : }
5988 :
5989 45 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_1 *r)
5990 : {
5991 45 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5992 45 : if (ndr_flags & NDR_SCALARS) {
5993 45 : NDR_CHECK(ndr_push_align(ndr, 4));
5994 45 : NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
5995 45 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status));
5996 45 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5997 : }
5998 45 : if (ndr_flags & NDR_BUFFERS) {
5999 : }
6000 45 : return NDR_ERR_SUCCESS;
6001 : }
6002 :
6003 36 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_1 *r)
6004 : {
6005 36 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6006 36 : if (ndr_flags & NDR_SCALARS) {
6007 36 : NDR_CHECK(ndr_pull_align(ndr, 4));
6008 36 : NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
6009 36 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->pdc_connection_status));
6010 36 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
6011 : }
6012 36 : if (ndr_flags & NDR_BUFFERS) {
6013 : }
6014 36 : return NDR_ERR_SUCCESS;
6015 : }
6016 :
6017 18 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r)
6018 : {
6019 18 : ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_1");
6020 18 : if (r == NULL) { ndr_print_null(ndr); return; }
6021 18 : ndr->depth++;
6022 18 : ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
6023 18 : ndr_print_WERROR(ndr, "pdc_connection_status", r->pdc_connection_status);
6024 18 : ndr->depth--;
6025 : }
6026 :
6027 217 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_2 *r)
6028 : {
6029 217 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6030 217 : if (ndr_flags & NDR_SCALARS) {
6031 217 : NDR_CHECK(ndr_push_align(ndr, 5));
6032 217 : NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
6033 217 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status));
6034 217 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name));
6035 217 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->tc_connection_status));
6036 217 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6037 : }
6038 217 : if (ndr_flags & NDR_BUFFERS) {
6039 217 : if (r->trusted_dc_name) {
6040 217 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
6041 217 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6042 217 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
6043 217 : 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));
6044 : }
6045 : }
6046 217 : return NDR_ERR_SUCCESS;
6047 : }
6048 :
6049 322 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_2 *r)
6050 : {
6051 : uint32_t _ptr_trusted_dc_name;
6052 322 : uint32_t size_trusted_dc_name_1 = 0;
6053 322 : uint32_t length_trusted_dc_name_1 = 0;
6054 322 : TALLOC_CTX *_mem_save_trusted_dc_name_0 = NULL;
6055 322 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6056 322 : if (ndr_flags & NDR_SCALARS) {
6057 322 : NDR_CHECK(ndr_pull_align(ndr, 5));
6058 322 : NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
6059 322 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->pdc_connection_status));
6060 322 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_dc_name));
6061 322 : if (_ptr_trusted_dc_name) {
6062 322 : NDR_PULL_ALLOC(ndr, r->trusted_dc_name);
6063 : } else {
6064 0 : r->trusted_dc_name = NULL;
6065 : }
6066 322 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->tc_connection_status));
6067 322 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6068 : }
6069 322 : if (ndr_flags & NDR_BUFFERS) {
6070 322 : if (r->trusted_dc_name) {
6071 322 : _mem_save_trusted_dc_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6072 322 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_dc_name, 0);
6073 322 : NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_dc_name));
6074 322 : NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_dc_name));
6075 322 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_dc_name, &size_trusted_dc_name_1));
6076 322 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_dc_name, &length_trusted_dc_name_1));
6077 322 : if (length_trusted_dc_name_1 > size_trusted_dc_name_1) {
6078 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_trusted_dc_name_1, length_trusted_dc_name_1);
6079 : }
6080 322 : NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_dc_name_1, sizeof(uint16_t)));
6081 322 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_dc_name, length_trusted_dc_name_1, sizeof(uint16_t), CH_UTF16));
6082 322 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_dc_name_0, 0);
6083 : }
6084 : }
6085 322 : return NDR_ERR_SUCCESS;
6086 : }
6087 :
6088 24 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r)
6089 : {
6090 24 : ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_2");
6091 24 : if (r == NULL) { ndr_print_null(ndr); return; }
6092 24 : ndr->depth++;
6093 24 : ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
6094 24 : ndr_print_WERROR(ndr, "pdc_connection_status", r->pdc_connection_status);
6095 24 : ndr_print_ptr(ndr, "trusted_dc_name", r->trusted_dc_name);
6096 24 : ndr->depth++;
6097 24 : if (r->trusted_dc_name) {
6098 24 : ndr_print_string(ndr, "trusted_dc_name", r->trusted_dc_name);
6099 : }
6100 24 : ndr->depth--;
6101 24 : ndr_print_WERROR(ndr, "tc_connection_status", r->tc_connection_status);
6102 24 : ndr->depth--;
6103 : }
6104 :
6105 0 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_3 *r)
6106 : {
6107 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6108 0 : if (ndr_flags & NDR_SCALARS) {
6109 0 : NDR_CHECK(ndr_push_align(ndr, 4));
6110 0 : NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
6111 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_attempts));
6112 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
6113 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
6114 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
6115 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
6116 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
6117 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
6118 : }
6119 0 : if (ndr_flags & NDR_BUFFERS) {
6120 : }
6121 0 : return NDR_ERR_SUCCESS;
6122 : }
6123 :
6124 0 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_3 *r)
6125 : {
6126 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6127 0 : if (ndr_flags & NDR_SCALARS) {
6128 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
6129 0 : NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
6130 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_attempts));
6131 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
6132 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
6133 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
6134 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
6135 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
6136 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
6137 : }
6138 0 : if (ndr_flags & NDR_BUFFERS) {
6139 : }
6140 0 : return NDR_ERR_SUCCESS;
6141 : }
6142 :
6143 0 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r)
6144 : {
6145 0 : ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_3");
6146 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6147 0 : ndr->depth++;
6148 0 : ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
6149 0 : ndr_print_uint32(ndr, "logon_attempts", r->logon_attempts);
6150 0 : ndr_print_uint32(ndr, "unknown1", r->unknown1);
6151 0 : ndr_print_uint32(ndr, "unknown2", r->unknown2);
6152 0 : ndr_print_uint32(ndr, "unknown3", r->unknown3);
6153 0 : ndr_print_uint32(ndr, "unknown4", r->unknown4);
6154 0 : ndr_print_uint32(ndr, "unknown5", r->unknown5);
6155 0 : ndr->depth--;
6156 : }
6157 :
6158 0 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_4(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_4 *r)
6159 : {
6160 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6161 0 : if (ndr_flags & NDR_SCALARS) {
6162 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6163 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name));
6164 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain_name));
6165 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6166 : }
6167 0 : if (ndr_flags & NDR_BUFFERS) {
6168 0 : if (r->trusted_dc_name) {
6169 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
6170 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6171 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
6172 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));
6173 : }
6174 0 : if (r->trusted_domain_name) {
6175 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_domain_name, CH_UTF16)));
6176 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6177 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_domain_name, CH_UTF16)));
6178 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));
6179 : }
6180 : }
6181 0 : return NDR_ERR_SUCCESS;
6182 : }
6183 :
6184 0 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_4(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_4 *r)
6185 : {
6186 : uint32_t _ptr_trusted_dc_name;
6187 0 : uint32_t size_trusted_dc_name_1 = 0;
6188 0 : uint32_t length_trusted_dc_name_1 = 0;
6189 0 : TALLOC_CTX *_mem_save_trusted_dc_name_0 = NULL;
6190 : uint32_t _ptr_trusted_domain_name;
6191 0 : uint32_t size_trusted_domain_name_1 = 0;
6192 0 : uint32_t length_trusted_domain_name_1 = 0;
6193 0 : TALLOC_CTX *_mem_save_trusted_domain_name_0 = NULL;
6194 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6195 0 : if (ndr_flags & NDR_SCALARS) {
6196 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6197 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_dc_name));
6198 0 : if (_ptr_trusted_dc_name) {
6199 0 : NDR_PULL_ALLOC(ndr, r->trusted_dc_name);
6200 : } else {
6201 0 : r->trusted_dc_name = NULL;
6202 : }
6203 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain_name));
6204 0 : if (_ptr_trusted_domain_name) {
6205 0 : NDR_PULL_ALLOC(ndr, r->trusted_domain_name);
6206 : } else {
6207 0 : r->trusted_domain_name = NULL;
6208 : }
6209 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6210 : }
6211 0 : if (ndr_flags & NDR_BUFFERS) {
6212 0 : if (r->trusted_dc_name) {
6213 0 : _mem_save_trusted_dc_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6214 0 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_dc_name, 0);
6215 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_dc_name));
6216 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_dc_name));
6217 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_dc_name, &size_trusted_dc_name_1));
6218 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_dc_name, &length_trusted_dc_name_1));
6219 0 : if (length_trusted_dc_name_1 > size_trusted_dc_name_1) {
6220 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_trusted_dc_name_1, length_trusted_dc_name_1);
6221 : }
6222 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_dc_name_1, sizeof(uint16_t)));
6223 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_dc_name, length_trusted_dc_name_1, sizeof(uint16_t), CH_UTF16));
6224 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_dc_name_0, 0);
6225 : }
6226 0 : if (r->trusted_domain_name) {
6227 0 : _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6228 0 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domain_name, 0);
6229 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_domain_name));
6230 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_domain_name));
6231 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_domain_name, &size_trusted_domain_name_1));
6232 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_domain_name, &length_trusted_domain_name_1));
6233 0 : if (length_trusted_domain_name_1 > size_trusted_domain_name_1) {
6234 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_trusted_domain_name_1, length_trusted_domain_name_1);
6235 : }
6236 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_domain_name_1, sizeof(uint16_t)));
6237 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_domain_name, length_trusted_domain_name_1, sizeof(uint16_t), CH_UTF16));
6238 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, 0);
6239 : }
6240 : }
6241 0 : return NDR_ERR_SUCCESS;
6242 : }
6243 :
6244 0 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_4(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_4 *r)
6245 : {
6246 0 : ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_4");
6247 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6248 0 : ndr->depth++;
6249 0 : ndr_print_ptr(ndr, "trusted_dc_name", r->trusted_dc_name);
6250 0 : ndr->depth++;
6251 0 : if (r->trusted_dc_name) {
6252 0 : ndr_print_string(ndr, "trusted_dc_name", r->trusted_dc_name);
6253 : }
6254 0 : ndr->depth--;
6255 0 : ndr_print_ptr(ndr, "trusted_domain_name", r->trusted_domain_name);
6256 0 : ndr->depth++;
6257 0 : if (r->trusted_domain_name) {
6258 0 : ndr_print_string(ndr, "trusted_domain_name", r->trusted_domain_name);
6259 : }
6260 0 : ndr->depth--;
6261 0 : ndr->depth--;
6262 : }
6263 :
6264 4400 : _PUBLIC_ enum ndr_err_code ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_QUERY_INFORMATION *r)
6265 : {
6266 : uint32_t level;
6267 4400 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6268 4400 : if (ndr_flags & NDR_SCALARS) {
6269 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6270 4400 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6271 4400 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6272 4400 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
6273 : /* ms_union is always aligned to the largest union arm*/
6274 4400 : NDR_CHECK(ndr_push_align(ndr, 5));
6275 4400 : switch (level) {
6276 1080 : case 1: {
6277 1080 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
6278 1080 : break; }
6279 :
6280 1295 : case 2: {
6281 1295 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
6282 1295 : break; }
6283 :
6284 1170 : case 3: {
6285 1170 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
6286 1170 : break; }
6287 :
6288 720 : case 4: {
6289 720 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
6290 720 : break; }
6291 :
6292 135 : default: {
6293 135 : break; }
6294 :
6295 : }
6296 0 : }
6297 4400 : if (ndr_flags & NDR_BUFFERS) {
6298 4400 : if (!(ndr_flags & NDR_SCALARS)) {
6299 : /* We didn't get it above, and the token is not needed after this. */
6300 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6301 : }
6302 4400 : switch (level) {
6303 1080 : case 1:
6304 1080 : if (r->info1) {
6305 45 : NDR_CHECK(ndr_push_netr_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
6306 : }
6307 1080 : break;
6308 :
6309 1295 : case 2:
6310 1295 : if (r->info2) {
6311 217 : NDR_CHECK(ndr_push_netr_NETLOGON_INFO_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
6312 : }
6313 1295 : break;
6314 :
6315 1170 : case 3:
6316 1170 : if (r->info3) {
6317 0 : NDR_CHECK(ndr_push_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
6318 : }
6319 1170 : break;
6320 :
6321 720 : case 4:
6322 720 : if (r->info4) {
6323 0 : NDR_CHECK(ndr_push_netr_NETLOGON_INFO_4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
6324 : }
6325 720 : break;
6326 :
6327 135 : default:
6328 135 : break;
6329 :
6330 : }
6331 0 : }
6332 4400 : return NDR_ERR_SUCCESS;
6333 : }
6334 :
6335 3622 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_CONTROL_QUERY_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_QUERY_INFORMATION *r)
6336 : {
6337 : uint32_t level;
6338 : uint32_t _level;
6339 3622 : TALLOC_CTX *_mem_save_info1_0 = NULL;
6340 : uint32_t _ptr_info1;
6341 3622 : TALLOC_CTX *_mem_save_info2_0 = NULL;
6342 : uint32_t _ptr_info2;
6343 3622 : TALLOC_CTX *_mem_save_info3_0 = NULL;
6344 : uint32_t _ptr_info3;
6345 3622 : TALLOC_CTX *_mem_save_info4_0 = NULL;
6346 : uint32_t _ptr_info4;
6347 3622 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6348 3622 : if (ndr_flags & NDR_SCALARS) {
6349 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6350 3622 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6351 3622 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6352 3622 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6353 3622 : if (_level != level) {
6354 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
6355 : }
6356 : /* ms_union is always aligned to the largest union arm*/
6357 3622 : NDR_CHECK(ndr_pull_align(ndr, 5));
6358 3622 : switch (level) {
6359 864 : case 1: {
6360 864 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
6361 864 : if (_ptr_info1) {
6362 36 : NDR_PULL_ALLOC(ndr, r->info1);
6363 : } else {
6364 828 : r->info1 = NULL;
6365 : }
6366 864 : break; }
6367 :
6368 1138 : case 2: {
6369 1138 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
6370 1138 : if (_ptr_info2) {
6371 322 : NDR_PULL_ALLOC(ndr, r->info2);
6372 : } else {
6373 816 : r->info2 = NULL;
6374 : }
6375 1138 : break; }
6376 :
6377 936 : case 3: {
6378 936 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
6379 936 : if (_ptr_info3) {
6380 0 : NDR_PULL_ALLOC(ndr, r->info3);
6381 : } else {
6382 936 : r->info3 = NULL;
6383 : }
6384 936 : break; }
6385 :
6386 576 : case 4: {
6387 576 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
6388 576 : if (_ptr_info4) {
6389 0 : NDR_PULL_ALLOC(ndr, r->info4);
6390 : } else {
6391 576 : r->info4 = NULL;
6392 : }
6393 576 : break; }
6394 :
6395 108 : default: {
6396 108 : break; }
6397 :
6398 : }
6399 0 : }
6400 3622 : if (ndr_flags & NDR_BUFFERS) {
6401 3622 : if (!(ndr_flags & NDR_SCALARS)) {
6402 : /* We didn't get it above, and the token is not needed after this. */
6403 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6404 : }
6405 3622 : switch (level) {
6406 864 : case 1:
6407 864 : if (r->info1) {
6408 36 : _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6409 36 : NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
6410 36 : NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
6411 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
6412 : }
6413 864 : break;
6414 :
6415 1138 : case 2:
6416 1138 : if (r->info2) {
6417 322 : _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
6418 322 : NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
6419 322 : NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
6420 322 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
6421 : }
6422 1138 : break;
6423 :
6424 936 : case 3:
6425 936 : if (r->info3) {
6426 0 : _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
6427 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
6428 0 : NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
6429 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
6430 : }
6431 936 : break;
6432 :
6433 576 : case 4:
6434 576 : if (r->info4) {
6435 0 : _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
6436 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
6437 0 : NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
6438 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
6439 : }
6440 576 : break;
6441 :
6442 108 : default:
6443 108 : break;
6444 :
6445 : }
6446 0 : }
6447 3622 : return NDR_ERR_SUCCESS;
6448 : }
6449 :
6450 1674 : _PUBLIC_ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r)
6451 : {
6452 : uint32_t level;
6453 1674 : level = ndr_print_steal_switch_value(ndr, r);
6454 1674 : ndr_print_union(ndr, name, level, "netr_CONTROL_QUERY_INFORMATION");
6455 1674 : switch (level) {
6456 432 : case 1:
6457 432 : ndr_print_ptr(ndr, "info1", r->info1);
6458 432 : ndr->depth++;
6459 432 : if (r->info1) {
6460 18 : ndr_print_netr_NETLOGON_INFO_1(ndr, "info1", r->info1);
6461 : }
6462 432 : ndr->depth--;
6463 432 : break;
6464 :
6465 432 : case 2:
6466 432 : ndr_print_ptr(ndr, "info2", r->info2);
6467 432 : ndr->depth++;
6468 432 : if (r->info2) {
6469 24 : ndr_print_netr_NETLOGON_INFO_2(ndr, "info2", r->info2);
6470 : }
6471 432 : ndr->depth--;
6472 432 : break;
6473 :
6474 468 : case 3:
6475 468 : ndr_print_ptr(ndr, "info3", r->info3);
6476 468 : ndr->depth++;
6477 468 : if (r->info3) {
6478 0 : ndr_print_netr_NETLOGON_INFO_3(ndr, "info3", r->info3);
6479 : }
6480 468 : ndr->depth--;
6481 468 : break;
6482 :
6483 288 : case 4:
6484 288 : ndr_print_ptr(ndr, "info4", r->info4);
6485 288 : ndr->depth++;
6486 288 : if (r->info4) {
6487 0 : ndr_print_netr_NETLOGON_INFO_4(ndr, "info4", r->info4);
6488 : }
6489 288 : ndr->depth--;
6490 288 : break;
6491 :
6492 54 : default:
6493 54 : break;
6494 :
6495 : }
6496 1674 : }
6497 :
6498 4906 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonControlCode(struct ndr_push *ndr, int ndr_flags, enum netr_LogonControlCode r)
6499 : {
6500 4906 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
6501 4906 : return NDR_ERR_SUCCESS;
6502 : }
6503 :
6504 3564 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonControlCode(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonControlCode *r)
6505 : {
6506 : uint32_t v;
6507 3564 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
6508 3564 : *r = v;
6509 3564 : return NDR_ERR_SUCCESS;
6510 : }
6511 :
6512 0 : _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r)
6513 : {
6514 0 : const char *val = NULL;
6515 :
6516 0 : switch (r) {
6517 0 : case NETLOGON_CONTROL_QUERY: val = "NETLOGON_CONTROL_QUERY"; break;
6518 0 : case NETLOGON_CONTROL_REPLICATE: val = "NETLOGON_CONTROL_REPLICATE"; break;
6519 0 : case NETLOGON_CONTROL_SYNCHRONIZE: val = "NETLOGON_CONTROL_SYNCHRONIZE"; break;
6520 0 : case NETLOGON_CONTROL_PDC_REPLICATE: val = "NETLOGON_CONTROL_PDC_REPLICATE"; break;
6521 0 : case NETLOGON_CONTROL_REDISCOVER: val = "NETLOGON_CONTROL_REDISCOVER"; break;
6522 0 : case NETLOGON_CONTROL_TC_QUERY: val = "NETLOGON_CONTROL_TC_QUERY"; break;
6523 0 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY: val = "NETLOGON_CONTROL_TRANSPORT_NOTIFY"; break;
6524 0 : case NETLOGON_CONTROL_FIND_USER: val = "NETLOGON_CONTROL_FIND_USER"; break;
6525 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD: val = "NETLOGON_CONTROL_CHANGE_PASSWORD"; break;
6526 0 : case NETLOGON_CONTROL_TC_VERIFY: val = "NETLOGON_CONTROL_TC_VERIFY"; break;
6527 0 : case NETLOGON_CONTROL_FORCE_DNS_REG: val = "NETLOGON_CONTROL_FORCE_DNS_REG"; break;
6528 0 : case NETLOGON_CONTROL_QUERY_DNS_REG: val = "NETLOGON_CONTROL_QUERY_DNS_REG"; break;
6529 0 : case NETLOGON_CONTROL_BACKUP_CHANGE_LOG: val = "NETLOGON_CONTROL_BACKUP_CHANGE_LOG"; break;
6530 0 : case NETLOGON_CONTROL_TRUNCATE_LOG: val = "NETLOGON_CONTROL_TRUNCATE_LOG"; break;
6531 0 : case NETLOGON_CONTROL_SET_DBFLAG: val = "NETLOGON_CONTROL_SET_DBFLAG"; break;
6532 0 : case NETLOGON_CONTROL_BREAKPOINT: val = "NETLOGON_CONTROL_BREAKPOINT"; break;
6533 : }
6534 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
6535 0 : }
6536 :
6537 1283 : _PUBLIC_ enum ndr_err_code ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_DATA_INFORMATION *r)
6538 : {
6539 : uint32_t level;
6540 1283 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6541 1283 : if (ndr_flags & NDR_SCALARS) {
6542 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6543 1283 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6544 1283 : NDR_CHECK(ndr_push_union_align(ndr, 5));
6545 1283 : NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, level));
6546 : /* ms_union is always aligned to the largest union arm*/
6547 1283 : NDR_CHECK(ndr_push_align(ndr, 5));
6548 1283 : switch (level) {
6549 322 : case NETLOGON_CONTROL_REDISCOVER: {
6550 322 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6551 322 : break; }
6552 :
6553 252 : case NETLOGON_CONTROL_TC_QUERY: {
6554 252 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6555 252 : break; }
6556 :
6557 216 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY: {
6558 216 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6559 216 : break; }
6560 :
6561 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD: {
6562 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6563 0 : break; }
6564 :
6565 133 : case NETLOGON_CONTROL_TC_VERIFY: {
6566 133 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
6567 133 : break; }
6568 :
6569 0 : case NETLOGON_CONTROL_FIND_USER: {
6570 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
6571 0 : break; }
6572 :
6573 288 : case NETLOGON_CONTROL_SET_DBFLAG: {
6574 288 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->debug_level));
6575 288 : break; }
6576 :
6577 72 : default: {
6578 72 : break; }
6579 :
6580 : }
6581 0 : }
6582 1283 : if (ndr_flags & NDR_BUFFERS) {
6583 1283 : if (!(ndr_flags & NDR_SCALARS)) {
6584 : /* We didn't get it above, and the token is not needed after this. */
6585 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
6586 : }
6587 1283 : switch (level) {
6588 322 : case NETLOGON_CONTROL_REDISCOVER:
6589 322 : if (r->domain) {
6590 322 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6591 322 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6592 322 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6593 322 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6594 : }
6595 322 : break;
6596 :
6597 252 : case NETLOGON_CONTROL_TC_QUERY:
6598 252 : if (r->domain) {
6599 252 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6600 252 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6601 252 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6602 252 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6603 : }
6604 252 : break;
6605 :
6606 216 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
6607 216 : if (r->domain) {
6608 216 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6609 216 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6610 216 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6611 216 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6612 : }
6613 216 : break;
6614 :
6615 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD:
6616 0 : if (r->domain) {
6617 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6618 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6619 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6620 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6621 : }
6622 0 : break;
6623 :
6624 133 : case NETLOGON_CONTROL_TC_VERIFY:
6625 133 : if (r->domain) {
6626 133 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6627 133 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6628 133 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
6629 133 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6630 : }
6631 133 : break;
6632 :
6633 0 : case NETLOGON_CONTROL_FIND_USER:
6634 0 : if (r->user) {
6635 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
6636 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6637 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
6638 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6639 : }
6640 0 : break;
6641 :
6642 288 : case NETLOGON_CONTROL_SET_DBFLAG:
6643 288 : break;
6644 :
6645 72 : default:
6646 72 : break;
6647 :
6648 : }
6649 0 : }
6650 1283 : return NDR_ERR_SUCCESS;
6651 : }
6652 :
6653 1166 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_CONTROL_DATA_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_DATA_INFORMATION *r)
6654 : {
6655 : uint32_t level;
6656 : uint32_t _level;
6657 1166 : TALLOC_CTX *_mem_save_domain_0 = NULL;
6658 : uint32_t _ptr_domain;
6659 1166 : uint32_t size_domain_1 = 0;
6660 1166 : uint32_t length_domain_1 = 0;
6661 1166 : TALLOC_CTX *_mem_save_user_0 = NULL;
6662 : uint32_t _ptr_user;
6663 1166 : uint32_t size_user_1 = 0;
6664 1166 : uint32_t length_user_1 = 0;
6665 1166 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6666 1166 : if (ndr_flags & NDR_SCALARS) {
6667 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
6668 1166 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6669 1166 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
6670 1166 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6671 1166 : if (_level != level) {
6672 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
6673 : }
6674 : /* ms_union is always aligned to the largest union arm*/
6675 1166 : NDR_CHECK(ndr_pull_align(ndr, 5));
6676 1166 : switch (level) {
6677 276 : case NETLOGON_CONTROL_REDISCOVER: {
6678 276 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6679 276 : if (_ptr_domain) {
6680 276 : NDR_PULL_ALLOC(ndr, r->domain);
6681 : } else {
6682 0 : r->domain = NULL;
6683 : }
6684 276 : break; }
6685 :
6686 234 : case NETLOGON_CONTROL_TC_QUERY: {
6687 234 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6688 234 : if (_ptr_domain) {
6689 234 : NDR_PULL_ALLOC(ndr, r->domain);
6690 : } else {
6691 0 : r->domain = NULL;
6692 : }
6693 234 : break; }
6694 :
6695 216 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY: {
6696 216 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6697 216 : if (_ptr_domain) {
6698 216 : NDR_PULL_ALLOC(ndr, r->domain);
6699 : } else {
6700 0 : r->domain = NULL;
6701 : }
6702 216 : break; }
6703 :
6704 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD: {
6705 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6706 0 : if (_ptr_domain) {
6707 0 : NDR_PULL_ALLOC(ndr, r->domain);
6708 : } else {
6709 0 : r->domain = NULL;
6710 : }
6711 0 : break; }
6712 :
6713 80 : case NETLOGON_CONTROL_TC_VERIFY: {
6714 80 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
6715 80 : if (_ptr_domain) {
6716 80 : NDR_PULL_ALLOC(ndr, r->domain);
6717 : } else {
6718 0 : r->domain = NULL;
6719 : }
6720 80 : break; }
6721 :
6722 0 : case NETLOGON_CONTROL_FIND_USER: {
6723 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
6724 0 : if (_ptr_user) {
6725 0 : NDR_PULL_ALLOC(ndr, r->user);
6726 : } else {
6727 0 : r->user = NULL;
6728 : }
6729 0 : break; }
6730 :
6731 288 : case NETLOGON_CONTROL_SET_DBFLAG: {
6732 288 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->debug_level));
6733 288 : break; }
6734 :
6735 72 : default: {
6736 72 : break; }
6737 :
6738 : }
6739 0 : }
6740 1166 : if (ndr_flags & NDR_BUFFERS) {
6741 1166 : if (!(ndr_flags & NDR_SCALARS)) {
6742 : /* We didn't get it above, and the token is not needed after this. */
6743 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
6744 : }
6745 1166 : switch (level) {
6746 276 : case NETLOGON_CONTROL_REDISCOVER:
6747 276 : if (r->domain) {
6748 276 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6749 276 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6750 276 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6751 276 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6752 276 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6753 276 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6754 276 : if (length_domain_1 > size_domain_1) {
6755 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
6756 : }
6757 276 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6758 276 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6759 276 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6760 : }
6761 276 : break;
6762 :
6763 234 : case NETLOGON_CONTROL_TC_QUERY:
6764 234 : if (r->domain) {
6765 234 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6766 234 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6767 234 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6768 234 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6769 234 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6770 234 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6771 234 : if (length_domain_1 > size_domain_1) {
6772 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
6773 : }
6774 234 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6775 234 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6776 234 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6777 : }
6778 234 : break;
6779 :
6780 216 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
6781 216 : if (r->domain) {
6782 216 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6783 216 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6784 216 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6785 216 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6786 216 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6787 216 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6788 216 : if (length_domain_1 > size_domain_1) {
6789 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
6790 : }
6791 216 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6792 216 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6793 216 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6794 : }
6795 216 : break;
6796 :
6797 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD:
6798 0 : if (r->domain) {
6799 0 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6800 0 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6801 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6802 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6803 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6804 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6805 0 : if (length_domain_1 > size_domain_1) {
6806 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
6807 : }
6808 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6809 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6810 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6811 : }
6812 0 : break;
6813 :
6814 80 : case NETLOGON_CONTROL_TC_VERIFY:
6815 80 : if (r->domain) {
6816 80 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
6817 80 : NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
6818 80 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
6819 80 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
6820 80 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
6821 80 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
6822 80 : if (length_domain_1 > size_domain_1) {
6823 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
6824 : }
6825 80 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
6826 80 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
6827 80 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
6828 : }
6829 80 : break;
6830 :
6831 0 : case NETLOGON_CONTROL_FIND_USER:
6832 0 : if (r->user) {
6833 0 : _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
6834 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
6835 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
6836 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
6837 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
6838 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
6839 0 : if (length_user_1 > size_user_1) {
6840 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
6841 : }
6842 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
6843 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
6844 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
6845 : }
6846 0 : break;
6847 :
6848 288 : case NETLOGON_CONTROL_SET_DBFLAG:
6849 288 : break;
6850 :
6851 72 : default:
6852 72 : break;
6853 :
6854 : }
6855 0 : }
6856 1166 : return NDR_ERR_SUCCESS;
6857 : }
6858 :
6859 0 : _PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r)
6860 : {
6861 : uint32_t level;
6862 0 : level = ndr_print_steal_switch_value(ndr, r);
6863 0 : ndr_print_union(ndr, name, level, "netr_CONTROL_DATA_INFORMATION");
6864 0 : switch (level) {
6865 0 : case NETLOGON_CONTROL_REDISCOVER:
6866 0 : ndr_print_ptr(ndr, "domain", r->domain);
6867 0 : ndr->depth++;
6868 0 : if (r->domain) {
6869 0 : ndr_print_string(ndr, "domain", r->domain);
6870 : }
6871 0 : ndr->depth--;
6872 0 : break;
6873 :
6874 0 : case NETLOGON_CONTROL_TC_QUERY:
6875 0 : ndr_print_ptr(ndr, "domain", r->domain);
6876 0 : ndr->depth++;
6877 0 : if (r->domain) {
6878 0 : ndr_print_string(ndr, "domain", r->domain);
6879 : }
6880 0 : ndr->depth--;
6881 0 : break;
6882 :
6883 0 : case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
6884 0 : ndr_print_ptr(ndr, "domain", r->domain);
6885 0 : ndr->depth++;
6886 0 : if (r->domain) {
6887 0 : ndr_print_string(ndr, "domain", r->domain);
6888 : }
6889 0 : ndr->depth--;
6890 0 : break;
6891 :
6892 0 : case NETLOGON_CONTROL_CHANGE_PASSWORD:
6893 0 : ndr_print_ptr(ndr, "domain", r->domain);
6894 0 : ndr->depth++;
6895 0 : if (r->domain) {
6896 0 : ndr_print_string(ndr, "domain", r->domain);
6897 : }
6898 0 : ndr->depth--;
6899 0 : break;
6900 :
6901 0 : case NETLOGON_CONTROL_TC_VERIFY:
6902 0 : ndr_print_ptr(ndr, "domain", r->domain);
6903 0 : ndr->depth++;
6904 0 : if (r->domain) {
6905 0 : ndr_print_string(ndr, "domain", r->domain);
6906 : }
6907 0 : ndr->depth--;
6908 0 : break;
6909 :
6910 0 : case NETLOGON_CONTROL_FIND_USER:
6911 0 : ndr_print_ptr(ndr, "user", r->user);
6912 0 : ndr->depth++;
6913 0 : if (r->user) {
6914 0 : ndr_print_string(ndr, "user", r->user);
6915 : }
6916 0 : ndr->depth--;
6917 0 : break;
6918 :
6919 0 : case NETLOGON_CONTROL_SET_DBFLAG:
6920 0 : ndr_print_uint32(ndr, "debug_level", r->debug_level);
6921 0 : break;
6922 :
6923 0 : default:
6924 0 : break;
6925 :
6926 : }
6927 0 : }
6928 :
6929 11221 : _PUBLIC_ enum ndr_err_code ndr_push_netr_NegotiateFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
6930 : {
6931 11221 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
6932 11221 : return NDR_ERR_SUCCESS;
6933 : }
6934 :
6935 15790 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_NegotiateFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
6936 : {
6937 : uint32_t v;
6938 15790 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
6939 15790 : *r = v;
6940 15790 : return NDR_ERR_SUCCESS;
6941 : }
6942 :
6943 598 : _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *name, uint32_t r)
6944 : {
6945 598 : ndr_print_uint32(ndr, name, r);
6946 598 : ndr->depth++;
6947 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_ACCOUNT_LOCKOUT", NETLOGON_NEG_ACCOUNT_LOCKOUT, r);
6948 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PERSISTENT_SAMREPL", NETLOGON_NEG_PERSISTENT_SAMREPL, r);
6949 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_ARCFOUR", NETLOGON_NEG_ARCFOUR, r);
6950 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PROMOTION_COUNT", NETLOGON_NEG_PROMOTION_COUNT, r);
6951 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CHANGELOG_BDC", NETLOGON_NEG_CHANGELOG_BDC, r);
6952 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_FULL_SYNC_REPL", NETLOGON_NEG_FULL_SYNC_REPL, r);
6953 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_MULTIPLE_SIDS", NETLOGON_NEG_MULTIPLE_SIDS, r);
6954 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_REDO", NETLOGON_NEG_REDO, r);
6955 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL", NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL, r);
6956 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SEND_PASSWORD_INFO_PDC", NETLOGON_NEG_SEND_PASSWORD_INFO_PDC, r);
6957 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_GENERIC_PASSTHROUGH", NETLOGON_NEG_GENERIC_PASSTHROUGH, r);
6958 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CONCURRENT_RPC", NETLOGON_NEG_CONCURRENT_RPC, r);
6959 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL", NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL, r);
6960 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL", NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL, r);
6961 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_STRONG_KEYS", NETLOGON_NEG_STRONG_KEYS, r);
6962 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_TRANSITIVE_TRUSTS", NETLOGON_NEG_TRANSITIVE_TRUSTS, r);
6963 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_DNS_DOMAIN_TRUSTS", NETLOGON_NEG_DNS_DOMAIN_TRUSTS, r);
6964 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_SET2", NETLOGON_NEG_PASSWORD_SET2, r);
6965 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_GETDOMAININFO", NETLOGON_NEG_GETDOMAININFO, r);
6966 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CROSS_FOREST_TRUSTS", NETLOGON_NEG_CROSS_FOREST_TRUSTS, r);
6967 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION", NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION, r);
6968 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_RODC_PASSTHROUGH", NETLOGON_NEG_RODC_PASSTHROUGH, r);
6969 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SUPPORTS_AES_SHA2", NETLOGON_NEG_SUPPORTS_AES_SHA2, r);
6970 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SUPPORTS_AES", NETLOGON_NEG_SUPPORTS_AES, r);
6971 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AUTHENTICATED_RPC_LSASS", NETLOGON_NEG_AUTHENTICATED_RPC_LSASS, r);
6972 598 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AUTHENTICATED_RPC", NETLOGON_NEG_AUTHENTICATED_RPC, r);
6973 598 : ndr->depth--;
6974 598 : }
6975 :
6976 12 : static enum ndr_err_code ndr_push_SyncStateEnum(struct ndr_push *ndr, int ndr_flags, enum SyncStateEnum r)
6977 : {
6978 12 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
6979 12 : return NDR_ERR_SUCCESS;
6980 : }
6981 :
6982 12 : static enum ndr_err_code ndr_pull_SyncStateEnum(struct ndr_pull *ndr, int ndr_flags, enum SyncStateEnum *r)
6983 : {
6984 : uint16_t v;
6985 12 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
6986 12 : *r = v;
6987 12 : return NDR_ERR_SUCCESS;
6988 : }
6989 :
6990 0 : _PUBLIC_ void ndr_print_SyncStateEnum(struct ndr_print *ndr, const char *name, enum SyncStateEnum r)
6991 : {
6992 0 : const char *val = NULL;
6993 :
6994 0 : switch (r) {
6995 0 : case SYNCSTATE_NORMAL_STATE: val = "SYNCSTATE_NORMAL_STATE"; break;
6996 0 : case SYNCSTATE_DOMAIN_STATE: val = "SYNCSTATE_DOMAIN_STATE"; break;
6997 0 : case SYNCSTATE_GROUP_STATE: val = "SYNCSTATE_GROUP_STATE"; break;
6998 0 : case SYNCSTATE_UAS_BUILT_IN_GROUP_STATE: val = "SYNCSTATE_UAS_BUILT_IN_GROUP_STATE"; break;
6999 0 : case SYNCSTATE_USER_STATE: val = "SYNCSTATE_USER_STATE"; break;
7000 0 : case SYNCSTATE_GROUP_MEMBER_STATE: val = "SYNCSTATE_GROUP_MEMBER_STATE"; break;
7001 0 : case SYNCSTATE_ALIAS_STATE: val = "SYNCSTATE_ALIAS_STATE"; break;
7002 0 : case SYNCSTATE_ALIAS_MEMBER_STATE: val = "SYNCSTATE_ALIAS_MEMBER_STATE"; break;
7003 0 : case SYNCSTATE_SAM_DONE_STATE: val = "SYNCSTATE_SAM_DONE_STATE"; break;
7004 : }
7005 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
7006 0 : }
7007 :
7008 24 : static enum ndr_err_code ndr_push_netr_ChangeLogFlags(struct ndr_push *ndr, int ndr_flags, uint16_t r)
7009 : {
7010 24 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
7011 24 : return NDR_ERR_SUCCESS;
7012 : }
7013 :
7014 12 : static enum ndr_err_code ndr_pull_netr_ChangeLogFlags(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
7015 : {
7016 : uint16_t v;
7017 12 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
7018 12 : *r = v;
7019 12 : return NDR_ERR_SUCCESS;
7020 : }
7021 :
7022 0 : _PUBLIC_ void ndr_print_netr_ChangeLogFlags(struct ndr_print *ndr, const char *name, uint16_t r)
7023 : {
7024 0 : ndr_print_uint16(ndr, name, r);
7025 0 : ndr->depth++;
7026 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED", NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED, r);
7027 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_CHANGED_PASSWORD", NETR_CHANGELOG_CHANGED_PASSWORD, r);
7028 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_SID_INCLUDED", NETR_CHANGELOG_SID_INCLUDED, r);
7029 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_NAME_INCLUDED", NETR_CHANGELOG_NAME_INCLUDED, r);
7030 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_FIRST_PROMOTION_OBJ", NETR_CHANGELOG_FIRST_PROMOTION_OBJ, r);
7031 0 : ndr->depth--;
7032 0 : }
7033 :
7034 48 : static enum ndr_err_code ndr_push_netr_ChangeLogObject(struct ndr_push *ndr, int ndr_flags, const union netr_ChangeLogObject *r)
7035 : {
7036 : uint32_t level;
7037 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7038 48 : if (ndr_flags & NDR_SCALARS) {
7039 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7040 24 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7041 : /* ms_union is always aligned to the largest union arm*/
7042 24 : NDR_CHECK(ndr_push_align(ndr, 4));
7043 24 : switch (level) {
7044 0 : case NETR_CHANGELOG_SID_INCLUDED: {
7045 0 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
7046 0 : break; }
7047 :
7048 0 : case NETR_CHANGELOG_NAME_INCLUDED: {
7049 : {
7050 0 : uint32_t _flags_save_string = ndr->flags;
7051 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7052 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->object_name));
7053 0 : ndr->flags = _flags_save_string;
7054 : }
7055 0 : break; }
7056 :
7057 24 : default: {
7058 24 : break; }
7059 :
7060 : }
7061 24 : }
7062 48 : return NDR_ERR_SUCCESS;
7063 : }
7064 :
7065 24 : static enum ndr_err_code ndr_pull_netr_ChangeLogObject(struct ndr_pull *ndr, int ndr_flags, union netr_ChangeLogObject *r)
7066 : {
7067 : uint32_t level;
7068 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7069 24 : if (ndr_flags & NDR_SCALARS) {
7070 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7071 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7072 : /* ms_union is always aligned to the largest union arm*/
7073 12 : NDR_CHECK(ndr_pull_align(ndr, 4));
7074 12 : switch (level) {
7075 0 : case NETR_CHANGELOG_SID_INCLUDED: {
7076 0 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
7077 0 : break; }
7078 :
7079 0 : case NETR_CHANGELOG_NAME_INCLUDED: {
7080 : {
7081 0 : uint32_t _flags_save_string = ndr->flags;
7082 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7083 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->object_name));
7084 0 : ndr->flags = _flags_save_string;
7085 : }
7086 0 : break; }
7087 :
7088 12 : default: {
7089 12 : break; }
7090 :
7091 : }
7092 12 : }
7093 24 : return NDR_ERR_SUCCESS;
7094 : }
7095 :
7096 0 : _PUBLIC_ void ndr_print_netr_ChangeLogObject(struct ndr_print *ndr, const char *name, const union netr_ChangeLogObject *r)
7097 : {
7098 : uint32_t level;
7099 0 : level = ndr_print_steal_switch_value(ndr, r);
7100 0 : ndr_print_union(ndr, name, level, "netr_ChangeLogObject");
7101 0 : switch (level) {
7102 0 : case NETR_CHANGELOG_SID_INCLUDED:
7103 0 : ndr_print_dom_sid(ndr, "object_sid", &r->object_sid);
7104 0 : break;
7105 :
7106 0 : case NETR_CHANGELOG_NAME_INCLUDED:
7107 : {
7108 0 : uint32_t _flags_save_string = ndr->flags;
7109 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7110 0 : ndr_print_string(ndr, "object_name", r->object_name);
7111 0 : ndr->flags = _flags_save_string;
7112 : }
7113 0 : break;
7114 :
7115 0 : default:
7116 0 : break;
7117 :
7118 : }
7119 0 : }
7120 :
7121 24 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ChangeLogEntry(struct ndr_push *ndr, int ndr_flags, const struct netr_ChangeLogEntry *r)
7122 : {
7123 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7124 24 : if (ndr_flags & NDR_SCALARS) {
7125 24 : NDR_CHECK(ndr_push_align(ndr, 4));
7126 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number1));
7127 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number2));
7128 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_rid));
7129 24 : NDR_CHECK(ndr_push_netr_ChangeLogFlags(ndr, NDR_SCALARS, r->flags));
7130 24 : NDR_CHECK(ndr_push_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, r->db_index));
7131 24 : NDR_CHECK(ndr_push_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, r->delta_type));
7132 24 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
7133 24 : NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
7134 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7135 : }
7136 24 : if (ndr_flags & NDR_BUFFERS) {
7137 24 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
7138 24 : NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
7139 : }
7140 24 : return NDR_ERR_SUCCESS;
7141 : }
7142 :
7143 12 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ChangeLogEntry(struct ndr_pull *ndr, int ndr_flags, struct netr_ChangeLogEntry *r)
7144 : {
7145 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7146 12 : if (ndr_flags & NDR_SCALARS) {
7147 12 : NDR_CHECK(ndr_pull_align(ndr, 4));
7148 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number1));
7149 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number2));
7150 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_rid));
7151 12 : NDR_CHECK(ndr_pull_netr_ChangeLogFlags(ndr, NDR_SCALARS, &r->flags));
7152 12 : NDR_CHECK(ndr_pull_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, &r->db_index));
7153 12 : NDR_CHECK(ndr_pull_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, &r->delta_type));
7154 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
7155 12 : NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
7156 12 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7157 : }
7158 12 : if (ndr_flags & NDR_BUFFERS) {
7159 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
7160 12 : NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
7161 : }
7162 12 : return NDR_ERR_SUCCESS;
7163 : }
7164 :
7165 0 : static void ndr_print_flags_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, int unused, const struct netr_ChangeLogEntry *r)
7166 : {
7167 0 : ndr_print_netr_ChangeLogEntry(ndr, name, r);
7168 0 : }
7169 :
7170 0 : _PUBLIC_ void ndr_print_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, const struct netr_ChangeLogEntry *r)
7171 : {
7172 0 : ndr_print_struct(ndr, name, "netr_ChangeLogEntry");
7173 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7174 0 : ndr->depth++;
7175 0 : ndr_print_uint32(ndr, "serial_number1", r->serial_number1);
7176 0 : ndr_print_uint32(ndr, "serial_number2", r->serial_number2);
7177 0 : ndr_print_uint32(ndr, "object_rid", r->object_rid);
7178 0 : ndr_print_netr_ChangeLogFlags(ndr, "flags", r->flags);
7179 0 : ndr_print_netr_SamDatabaseID8Bit(ndr, "db_index", r->db_index);
7180 0 : ndr_print_netr_DeltaEnum8Bit(ndr, "delta_type", r->delta_type);
7181 0 : ndr_print_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED));
7182 0 : ndr_print_netr_ChangeLogObject(ndr, "object", &r->object);
7183 0 : ndr->depth--;
7184 : }
7185 :
7186 12 : _PUBLIC_ size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, int flags)
7187 : {
7188 12 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
7189 : }
7190 :
7191 0 : static enum ndr_err_code ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct netr_Blob *r)
7192 : {
7193 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7194 0 : if (ndr_flags & NDR_SCALARS) {
7195 0 : NDR_CHECK(ndr_push_align(ndr, 5));
7196 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
7197 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
7198 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7199 : }
7200 0 : if (ndr_flags & NDR_BUFFERS) {
7201 0 : if (r->data) {
7202 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
7203 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
7204 : }
7205 : }
7206 0 : return NDR_ERR_SUCCESS;
7207 : }
7208 :
7209 0 : static enum ndr_err_code ndr_pull_netr_Blob(struct ndr_pull *ndr, int ndr_flags, struct netr_Blob *r)
7210 : {
7211 : uint32_t _ptr_data;
7212 0 : uint32_t size_data_1 = 0;
7213 0 : TALLOC_CTX *_mem_save_data_0 = NULL;
7214 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7215 0 : if (ndr_flags & NDR_SCALARS) {
7216 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
7217 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
7218 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
7219 0 : if (_ptr_data) {
7220 0 : NDR_PULL_ALLOC(ndr, r->data);
7221 : } else {
7222 0 : r->data = NULL;
7223 : }
7224 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7225 : }
7226 0 : if (ndr_flags & NDR_BUFFERS) {
7227 0 : if (r->data) {
7228 0 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
7229 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
7230 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
7231 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
7232 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
7233 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
7234 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
7235 : }
7236 0 : if (r->data) {
7237 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
7238 : }
7239 : }
7240 0 : return NDR_ERR_SUCCESS;
7241 : }
7242 :
7243 0 : _PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r)
7244 : {
7245 0 : ndr_print_struct(ndr, name, "netr_Blob");
7246 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7247 0 : ndr->depth++;
7248 0 : ndr_print_uint32(ndr, "length", r->length);
7249 0 : ndr_print_ptr(ndr, "data", r->data);
7250 0 : ndr->depth++;
7251 0 : if (r->data) {
7252 0 : ndr_print_array_uint8(ndr, "data", r->data, r->length);
7253 : }
7254 0 : ndr->depth--;
7255 0 : ndr->depth--;
7256 : }
7257 :
7258 249 : static enum ndr_err_code ndr_push_netr_DsRGetDCName_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
7259 : {
7260 249 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7261 249 : return NDR_ERR_SUCCESS;
7262 : }
7263 :
7264 265 : static enum ndr_err_code ndr_pull_netr_DsRGetDCName_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
7265 : {
7266 : uint32_t v;
7267 265 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7268 265 : *r = v;
7269 265 : return NDR_ERR_SUCCESS;
7270 : }
7271 :
7272 0 : _PUBLIC_ void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r)
7273 : {
7274 0 : ndr_print_uint32(ndr, name, r);
7275 0 : ndr->depth++;
7276 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_FORCE_REDISCOVERY", DS_FORCE_REDISCOVERY, r);
7277 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_REQUIRED", DS_DIRECTORY_SERVICE_REQUIRED, r);
7278 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_PREFERRED", DS_DIRECTORY_SERVICE_PREFERRED, r);
7279 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GC_SERVER_REQUIRED", DS_GC_SERVER_REQUIRED, r);
7280 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_PDC_REQUIRED", DS_PDC_REQUIRED, r);
7281 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_BACKGROUND_ONLY", DS_BACKGROUND_ONLY, r);
7282 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IP_REQUIRED", DS_IP_REQUIRED, r);
7283 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_KDC_REQUIRED", DS_KDC_REQUIRED, r);
7284 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TIMESERV_REQUIRED", DS_TIMESERV_REQUIRED, r);
7285 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_WRITABLE_REQUIRED", DS_WRITABLE_REQUIRED, r);
7286 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GOOD_TIMESERV_PREFERRED", DS_GOOD_TIMESERV_PREFERRED, r);
7287 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_AVOID_SELF", DS_AVOID_SELF, r);
7288 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED, r);
7289 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_FLAT_NAME", DS_IS_FLAT_NAME, r);
7290 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_DNS_NAME", DS_IS_DNS_NAME, r);
7291 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TRY_NEXTCLOSEST_SITE", DS_TRY_NEXTCLOSEST_SITE, r);
7292 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_6_REQUIRED", DS_DIRECTORY_SERVICE_6_REQUIRED, r);
7293 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_WEB_SERVICE_REQUIRED", DS_WEB_SERVICE_REQUIRED, r);
7294 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_8_REQUIRED", DS_DIRECTORY_SERVICE_8_REQUIRED, r);
7295 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_9_REQUIRED", DS_DIRECTORY_SERVICE_9_REQUIRED, r);
7296 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_10_REQUIRED", DS_DIRECTORY_SERVICE_10_REQUIRED, r);
7297 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_DNS_NAME", DS_RETURN_DNS_NAME, r);
7298 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME, r);
7299 0 : ndr->depth--;
7300 0 : }
7301 :
7302 307 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo_AddressType(struct ndr_push *ndr, int ndr_flags, enum netr_DsRGetDCNameInfo_AddressType r)
7303 : {
7304 307 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
7305 307 : return NDR_ERR_SUCCESS;
7306 : }
7307 :
7308 317 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo_AddressType(struct ndr_pull *ndr, int ndr_flags, enum netr_DsRGetDCNameInfo_AddressType *r)
7309 : {
7310 : uint32_t v;
7311 317 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
7312 317 : *r = v;
7313 317 : return NDR_ERR_SUCCESS;
7314 : }
7315 :
7316 70 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r)
7317 : {
7318 70 : const char *val = NULL;
7319 :
7320 70 : switch (r) {
7321 70 : case DS_ADDRESS_TYPE_INET: val = "DS_ADDRESS_TYPE_INET"; break;
7322 0 : case DS_ADDRESS_TYPE_NETBIOS: val = "DS_ADDRESS_TYPE_NETBIOS"; break;
7323 : }
7324 70 : ndr_print_enum(ndr, name, "ENUM", val, r);
7325 70 : }
7326 :
7327 307 : static enum ndr_err_code ndr_push_netr_DsR_DcFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
7328 : {
7329 307 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7330 307 : return NDR_ERR_SUCCESS;
7331 : }
7332 :
7333 317 : static enum ndr_err_code ndr_pull_netr_DsR_DcFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
7334 : {
7335 : uint32_t v;
7336 317 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7337 317 : *r = v;
7338 317 : return NDR_ERR_SUCCESS;
7339 : }
7340 :
7341 70 : _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, uint32_t r)
7342 : {
7343 70 : ndr_print_uint32(ndr, name, r);
7344 70 : ndr->depth++;
7345 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_PDC", DS_SERVER_PDC, r);
7346 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_GC", DS_SERVER_GC, r);
7347 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_LDAP", DS_SERVER_LDAP, r);
7348 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_DS", DS_SERVER_DS, r);
7349 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_KDC", DS_SERVER_KDC, r);
7350 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_TIMESERV", DS_SERVER_TIMESERV, r);
7351 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_CLOSEST", DS_SERVER_CLOSEST, r);
7352 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_WRITABLE", DS_SERVER_WRITABLE, r);
7353 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_GOOD_TIMESERV", DS_SERVER_GOOD_TIMESERV, r);
7354 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_NDNC", DS_SERVER_NDNC, r);
7355 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_SELECT_SECRET_DOMAIN_6", DS_SERVER_SELECT_SECRET_DOMAIN_6, r);
7356 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_FULL_SECRET_DOMAIN_6", DS_SERVER_FULL_SECRET_DOMAIN_6, r);
7357 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_WEBSERV", DS_SERVER_WEBSERV, r);
7358 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_DS_8", DS_SERVER_DS_8, r);
7359 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_DS_9", DS_SERVER_DS_9, r);
7360 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_DS_10", DS_SERVER_DS_10, r);
7361 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_CONTROLLER", DS_DNS_CONTROLLER, r);
7362 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_DOMAIN", DS_DNS_DOMAIN, r);
7363 70 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_FOREST_ROOT", DS_DNS_FOREST_ROOT, r);
7364 70 : ndr->depth--;
7365 70 : }
7366 :
7367 307 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r)
7368 : {
7369 307 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7370 307 : if (ndr_flags & NDR_SCALARS) {
7371 307 : NDR_CHECK(ndr_push_align(ndr, 5));
7372 307 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_unc));
7373 307 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_address));
7374 307 : NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, r->dc_address_type));
7375 307 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
7376 307 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
7377 307 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_name));
7378 307 : NDR_CHECK(ndr_push_netr_DsR_DcFlags(ndr, NDR_SCALARS, r->dc_flags));
7379 307 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_site_name));
7380 307 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_site_name));
7381 307 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7382 : }
7383 307 : if (ndr_flags & NDR_BUFFERS) {
7384 307 : if (r->dc_unc) {
7385 307 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
7386 307 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7387 307 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
7388 307 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_unc, ndr_charset_length(r->dc_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7389 : }
7390 307 : if (r->dc_address) {
7391 307 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16)));
7392 307 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7393 307 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16)));
7394 307 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_address, ndr_charset_length(r->dc_address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7395 : }
7396 307 : if (r->domain_name) {
7397 307 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
7398 307 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7399 307 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
7400 307 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7401 : }
7402 307 : if (r->forest_name) {
7403 293 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
7404 293 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7405 293 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
7406 293 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->forest_name, ndr_charset_length(r->forest_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7407 : }
7408 307 : if (r->dc_site_name) {
7409 293 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
7410 293 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7411 293 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
7412 293 : 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));
7413 : }
7414 307 : if (r->client_site_name) {
7415 293 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
7416 293 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7417 293 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
7418 293 : 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));
7419 : }
7420 : }
7421 307 : return NDR_ERR_SUCCESS;
7422 : }
7423 :
7424 317 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r)
7425 : {
7426 : uint32_t _ptr_dc_unc;
7427 317 : uint32_t size_dc_unc_1 = 0;
7428 317 : uint32_t length_dc_unc_1 = 0;
7429 317 : TALLOC_CTX *_mem_save_dc_unc_0 = NULL;
7430 : uint32_t _ptr_dc_address;
7431 317 : uint32_t size_dc_address_1 = 0;
7432 317 : uint32_t length_dc_address_1 = 0;
7433 317 : TALLOC_CTX *_mem_save_dc_address_0 = NULL;
7434 : uint32_t _ptr_domain_name;
7435 317 : uint32_t size_domain_name_1 = 0;
7436 317 : uint32_t length_domain_name_1 = 0;
7437 317 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
7438 : uint32_t _ptr_forest_name;
7439 317 : uint32_t size_forest_name_1 = 0;
7440 317 : uint32_t length_forest_name_1 = 0;
7441 317 : TALLOC_CTX *_mem_save_forest_name_0 = NULL;
7442 : uint32_t _ptr_dc_site_name;
7443 317 : uint32_t size_dc_site_name_1 = 0;
7444 317 : uint32_t length_dc_site_name_1 = 0;
7445 317 : TALLOC_CTX *_mem_save_dc_site_name_0 = NULL;
7446 : uint32_t _ptr_client_site_name;
7447 317 : uint32_t size_client_site_name_1 = 0;
7448 317 : uint32_t length_client_site_name_1 = 0;
7449 317 : TALLOC_CTX *_mem_save_client_site_name_0 = NULL;
7450 317 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7451 317 : if (ndr_flags & NDR_SCALARS) {
7452 317 : NDR_CHECK(ndr_pull_align(ndr, 5));
7453 317 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_unc));
7454 317 : if (_ptr_dc_unc) {
7455 317 : NDR_PULL_ALLOC(ndr, r->dc_unc);
7456 : } else {
7457 0 : r->dc_unc = NULL;
7458 : }
7459 317 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_address));
7460 317 : if (_ptr_dc_address) {
7461 317 : NDR_PULL_ALLOC(ndr, r->dc_address);
7462 : } else {
7463 0 : r->dc_address = NULL;
7464 : }
7465 317 : NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, &r->dc_address_type));
7466 317 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
7467 317 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
7468 317 : if (_ptr_domain_name) {
7469 317 : NDR_PULL_ALLOC(ndr, r->domain_name);
7470 : } else {
7471 0 : r->domain_name = NULL;
7472 : }
7473 317 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_name));
7474 317 : if (_ptr_forest_name) {
7475 293 : NDR_PULL_ALLOC(ndr, r->forest_name);
7476 : } else {
7477 24 : r->forest_name = NULL;
7478 : }
7479 317 : NDR_CHECK(ndr_pull_netr_DsR_DcFlags(ndr, NDR_SCALARS, &r->dc_flags));
7480 317 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_site_name));
7481 317 : if (_ptr_dc_site_name) {
7482 293 : NDR_PULL_ALLOC(ndr, r->dc_site_name);
7483 : } else {
7484 24 : r->dc_site_name = NULL;
7485 : }
7486 317 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_site_name));
7487 317 : if (_ptr_client_site_name) {
7488 293 : NDR_PULL_ALLOC(ndr, r->client_site_name);
7489 : } else {
7490 24 : r->client_site_name = NULL;
7491 : }
7492 317 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7493 : }
7494 317 : if (ndr_flags & NDR_BUFFERS) {
7495 317 : if (r->dc_unc) {
7496 317 : _mem_save_dc_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
7497 317 : NDR_PULL_SET_MEM_CTX(ndr, r->dc_unc, 0);
7498 317 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_unc));
7499 317 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_unc));
7500 317 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_unc, &size_dc_unc_1));
7501 317 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_unc, &length_dc_unc_1));
7502 317 : if (length_dc_unc_1 > size_dc_unc_1) {
7503 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dc_unc_1, length_dc_unc_1);
7504 : }
7505 317 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_unc_1, sizeof(uint16_t)));
7506 317 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_unc, length_dc_unc_1, sizeof(uint16_t), CH_UTF16));
7507 317 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_unc_0, 0);
7508 : }
7509 317 : if (r->dc_address) {
7510 317 : _mem_save_dc_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
7511 317 : NDR_PULL_SET_MEM_CTX(ndr, r->dc_address, 0);
7512 317 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_address));
7513 317 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_address));
7514 317 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_address, &size_dc_address_1));
7515 317 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_address, &length_dc_address_1));
7516 317 : if (length_dc_address_1 > size_dc_address_1) {
7517 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dc_address_1, length_dc_address_1);
7518 : }
7519 317 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_address_1, sizeof(uint16_t)));
7520 317 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_address, length_dc_address_1, sizeof(uint16_t), CH_UTF16));
7521 317 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_address_0, 0);
7522 : }
7523 317 : if (r->domain_name) {
7524 317 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7525 317 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
7526 317 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
7527 317 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
7528 317 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
7529 317 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
7530 317 : if (length_domain_name_1 > size_domain_name_1) {
7531 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_name_1, length_domain_name_1);
7532 : }
7533 317 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
7534 317 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
7535 317 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
7536 : }
7537 317 : if (r->forest_name) {
7538 293 : _mem_save_forest_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7539 293 : NDR_PULL_SET_MEM_CTX(ndr, r->forest_name, 0);
7540 293 : NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_name));
7541 293 : NDR_CHECK(ndr_pull_array_length(ndr, &r->forest_name));
7542 293 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->forest_name, &size_forest_name_1));
7543 293 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->forest_name, &length_forest_name_1));
7544 293 : if (length_forest_name_1 > size_forest_name_1) {
7545 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_forest_name_1, length_forest_name_1);
7546 : }
7547 293 : NDR_CHECK(ndr_check_string_terminator(ndr, length_forest_name_1, sizeof(uint16_t)));
7548 293 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest_name, length_forest_name_1, sizeof(uint16_t), CH_UTF16));
7549 293 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_name_0, 0);
7550 : }
7551 317 : if (r->dc_site_name) {
7552 293 : _mem_save_dc_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7553 293 : NDR_PULL_SET_MEM_CTX(ndr, r->dc_site_name, 0);
7554 293 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_site_name));
7555 293 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_site_name));
7556 293 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_site_name, &size_dc_site_name_1));
7557 293 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_site_name, &length_dc_site_name_1));
7558 293 : if (length_dc_site_name_1 > size_dc_site_name_1) {
7559 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dc_site_name_1, length_dc_site_name_1);
7560 : }
7561 293 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_site_name_1, sizeof(uint16_t)));
7562 293 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_site_name, length_dc_site_name_1, sizeof(uint16_t), CH_UTF16));
7563 293 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_site_name_0, 0);
7564 : }
7565 317 : if (r->client_site_name) {
7566 293 : _mem_save_client_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7567 293 : NDR_PULL_SET_MEM_CTX(ndr, r->client_site_name, 0);
7568 293 : NDR_CHECK(ndr_pull_array_size(ndr, &r->client_site_name));
7569 293 : NDR_CHECK(ndr_pull_array_length(ndr, &r->client_site_name));
7570 293 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client_site_name, &size_client_site_name_1));
7571 293 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client_site_name, &length_client_site_name_1));
7572 293 : if (length_client_site_name_1 > size_client_site_name_1) {
7573 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_site_name_1, length_client_site_name_1);
7574 : }
7575 293 : NDR_CHECK(ndr_check_string_terminator(ndr, length_client_site_name_1, sizeof(uint16_t)));
7576 293 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_site_name, length_client_site_name_1, sizeof(uint16_t), CH_UTF16));
7577 293 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_site_name_0, 0);
7578 : }
7579 : }
7580 317 : return NDR_ERR_SUCCESS;
7581 : }
7582 :
7583 0 : static void ndr_print_flags_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, int unused, const struct netr_DsRGetDCNameInfo *r)
7584 : {
7585 0 : ndr_print_netr_DsRGetDCNameInfo(ndr, name, r);
7586 0 : }
7587 :
7588 70 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r)
7589 : {
7590 70 : ndr_print_struct(ndr, name, "netr_DsRGetDCNameInfo");
7591 70 : if (r == NULL) { ndr_print_null(ndr); return; }
7592 70 : ndr->depth++;
7593 70 : ndr_print_ptr(ndr, "dc_unc", r->dc_unc);
7594 70 : ndr->depth++;
7595 70 : if (r->dc_unc) {
7596 70 : ndr_print_string(ndr, "dc_unc", r->dc_unc);
7597 : }
7598 70 : ndr->depth--;
7599 70 : ndr_print_ptr(ndr, "dc_address", r->dc_address);
7600 70 : ndr->depth++;
7601 70 : if (r->dc_address) {
7602 70 : ndr_print_string(ndr, "dc_address", r->dc_address);
7603 : }
7604 70 : ndr->depth--;
7605 70 : ndr_print_netr_DsRGetDCNameInfo_AddressType(ndr, "dc_address_type", r->dc_address_type);
7606 70 : ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
7607 70 : ndr_print_ptr(ndr, "domain_name", r->domain_name);
7608 70 : ndr->depth++;
7609 70 : if (r->domain_name) {
7610 70 : ndr_print_string(ndr, "domain_name", r->domain_name);
7611 : }
7612 70 : ndr->depth--;
7613 70 : ndr_print_ptr(ndr, "forest_name", r->forest_name);
7614 70 : ndr->depth++;
7615 70 : if (r->forest_name) {
7616 67 : ndr_print_string(ndr, "forest_name", r->forest_name);
7617 : }
7618 70 : ndr->depth--;
7619 70 : ndr_print_netr_DsR_DcFlags(ndr, "dc_flags", r->dc_flags);
7620 70 : ndr_print_ptr(ndr, "dc_site_name", r->dc_site_name);
7621 70 : ndr->depth++;
7622 70 : if (r->dc_site_name) {
7623 67 : ndr_print_string(ndr, "dc_site_name", r->dc_site_name);
7624 : }
7625 70 : ndr->depth--;
7626 70 : ndr_print_ptr(ndr, "client_site_name", r->client_site_name);
7627 70 : ndr->depth++;
7628 70 : if (r->client_site_name) {
7629 67 : ndr_print_string(ndr, "client_site_name", r->client_site_name);
7630 : }
7631 70 : ndr->depth--;
7632 70 : ndr->depth--;
7633 : }
7634 :
7635 585 : static enum ndr_err_code ndr_push_netr_Capabilities(struct ndr_push *ndr, int ndr_flags, const union netr_Capabilities *r)
7636 : {
7637 : uint32_t level;
7638 585 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7639 585 : if (ndr_flags & NDR_SCALARS) {
7640 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7641 585 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7642 585 : NDR_CHECK(ndr_push_union_align(ndr, 4));
7643 585 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
7644 : /* ms_union is always aligned to the largest union arm*/
7645 585 : NDR_CHECK(ndr_push_align(ndr, 4));
7646 585 : switch (level) {
7647 585 : case 1: {
7648 585 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->server_capabilities));
7649 585 : break; }
7650 :
7651 0 : case 2: {
7652 0 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->server_capabilities));
7653 0 : break; }
7654 :
7655 0 : default:
7656 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
7657 : }
7658 0 : }
7659 585 : if (ndr_flags & NDR_BUFFERS) {
7660 0 : if (!(ndr_flags & NDR_SCALARS)) {
7661 : /* We didn't get it above, and the token is not needed after this. */
7662 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
7663 : }
7664 0 : switch (level) {
7665 0 : case 1:
7666 0 : break;
7667 :
7668 0 : case 2:
7669 0 : break;
7670 :
7671 0 : default:
7672 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
7673 : }
7674 525 : }
7675 585 : return NDR_ERR_SUCCESS;
7676 : }
7677 :
7678 418 : static enum ndr_err_code ndr_pull_netr_Capabilities(struct ndr_pull *ndr, int ndr_flags, union netr_Capabilities *r)
7679 : {
7680 : uint32_t level;
7681 : uint32_t _level;
7682 418 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7683 418 : if (ndr_flags & NDR_SCALARS) {
7684 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
7685 418 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7686 418 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
7687 418 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
7688 418 : if (_level != level) {
7689 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
7690 : }
7691 : /* ms_union is always aligned to the largest union arm*/
7692 418 : NDR_CHECK(ndr_pull_align(ndr, 4));
7693 418 : switch (level) {
7694 418 : case 1: {
7695 418 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->server_capabilities));
7696 418 : break; }
7697 :
7698 0 : case 2: {
7699 0 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->server_capabilities));
7700 0 : break; }
7701 :
7702 0 : default:
7703 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
7704 : }
7705 0 : }
7706 418 : if (ndr_flags & NDR_BUFFERS) {
7707 0 : if (!(ndr_flags & NDR_SCALARS)) {
7708 : /* We didn't get it above, and the token is not needed after this. */
7709 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
7710 : }
7711 0 : switch (level) {
7712 0 : case 1:
7713 0 : break;
7714 :
7715 0 : case 2:
7716 0 : break;
7717 :
7718 0 : default:
7719 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
7720 : }
7721 403 : }
7722 418 : return NDR_ERR_SUCCESS;
7723 : }
7724 :
7725 156 : _PUBLIC_ void ndr_print_netr_Capabilities(struct ndr_print *ndr, const char *name, const union netr_Capabilities *r)
7726 : {
7727 : uint32_t level;
7728 156 : level = ndr_print_steal_switch_value(ndr, r);
7729 156 : ndr_print_union(ndr, name, level, "netr_Capabilities");
7730 156 : switch (level) {
7731 156 : case 1:
7732 156 : ndr_print_netr_NegotiateFlags(ndr, "server_capabilities", r->server_capabilities);
7733 156 : break;
7734 :
7735 0 : case 2:
7736 0 : ndr_print_netr_NegotiateFlags(ndr, "server_capabilities", r->server_capabilities);
7737 0 : break;
7738 :
7739 0 : default:
7740 0 : ndr_print_bad_level(ndr, name, level);
7741 : }
7742 156 : }
7743 :
7744 276 : _PUBLIC_ enum ndr_err_code ndr_push_netr_TrustFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
7745 : {
7746 276 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7747 276 : return NDR_ERR_SUCCESS;
7748 : }
7749 :
7750 3545 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_TrustFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
7751 : {
7752 : uint32_t v;
7753 3545 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7754 3545 : *r = v;
7755 3545 : return NDR_ERR_SUCCESS;
7756 : }
7757 :
7758 49 : _PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r)
7759 : {
7760 49 : ndr_print_uint32(ndr, name, r);
7761 49 : ndr->depth++;
7762 49 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_IN_FOREST", NETR_TRUST_FLAG_IN_FOREST, r);
7763 49 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_OUTBOUND", NETR_TRUST_FLAG_OUTBOUND, r);
7764 49 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_TREEROOT", NETR_TRUST_FLAG_TREEROOT, r);
7765 49 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_PRIMARY", NETR_TRUST_FLAG_PRIMARY, r);
7766 49 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_NATIVE", NETR_TRUST_FLAG_NATIVE, r);
7767 49 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_INBOUND", NETR_TRUST_FLAG_INBOUND, r);
7768 49 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_MIT_KRB5", NETR_TRUST_FLAG_MIT_KRB5, r);
7769 49 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_AES", NETR_TRUST_FLAG_AES, r);
7770 49 : ndr->depth--;
7771 49 : }
7772 :
7773 245 : static enum ndr_err_code ndr_push_netr_WorkstationFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
7774 : {
7775 245 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7776 245 : return NDR_ERR_SUCCESS;
7777 : }
7778 :
7779 224 : static enum ndr_err_code ndr_pull_netr_WorkstationFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
7780 : {
7781 : uint32_t v;
7782 224 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7783 224 : *r = v;
7784 224 : return NDR_ERR_SUCCESS;
7785 : }
7786 :
7787 42 : _PUBLIC_ void ndr_print_netr_WorkstationFlags(struct ndr_print *ndr, const char *name, uint32_t r)
7788 : {
7789 42 : ndr_print_uint32(ndr, name, r);
7790 42 : ndr->depth++;
7791 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS, r);
7792 42 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_SPN_UPDATE", NETR_WS_FLAG_HANDLES_SPN_UPDATE, r);
7793 42 : ndr->depth--;
7794 42 : }
7795 :
7796 24 : static enum ndr_err_code ndr_push_netr_SuiteMask(struct ndr_push *ndr, int ndr_flags, uint16_t r)
7797 : {
7798 24 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
7799 24 : return NDR_ERR_SUCCESS;
7800 : }
7801 :
7802 24 : static enum ndr_err_code ndr_pull_netr_SuiteMask(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
7803 : {
7804 : uint16_t v;
7805 24 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
7806 24 : *r = v;
7807 24 : return NDR_ERR_SUCCESS;
7808 : }
7809 :
7810 0 : _PUBLIC_ void ndr_print_netr_SuiteMask(struct ndr_print *ndr, const char *name, uint16_t r)
7811 : {
7812 0 : ndr_print_uint16(ndr, name, r);
7813 0 : ndr->depth++;
7814 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_BACKOFFICE", NETR_VER_SUITE_BACKOFFICE, r);
7815 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_BLADE", NETR_VER_SUITE_BLADE, r);
7816 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_COMPUTE_SERVER", NETR_VER_SUITE_COMPUTE_SERVER, r);
7817 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_DATACENTER", NETR_VER_SUITE_DATACENTER, r);
7818 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_ENTERPRISE", NETR_VER_SUITE_ENTERPRISE, r);
7819 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_EMBEDDEDNT", NETR_VER_SUITE_EMBEDDEDNT, r);
7820 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_PERSONAL", NETR_VER_SUITE_PERSONAL, r);
7821 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SINGLEUSERTS", NETR_VER_SUITE_SINGLEUSERTS, r);
7822 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SMALLBUSINESS", NETR_VER_SUITE_SMALLBUSINESS, r);
7823 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED", NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED, r);
7824 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_STORAGE_SERVER", NETR_VER_SUITE_STORAGE_SERVER, r);
7825 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_TERMINAL", NETR_VER_SUITE_TERMINAL, r);
7826 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_WH_SERVER", NETR_VER_SUITE_WH_SERVER, r);
7827 0 : ndr->depth--;
7828 0 : }
7829 :
7830 24 : static enum ndr_err_code ndr_push_netr_ProductType(struct ndr_push *ndr, int ndr_flags, uint8_t r)
7831 : {
7832 24 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
7833 24 : return NDR_ERR_SUCCESS;
7834 : }
7835 :
7836 24 : static enum ndr_err_code ndr_pull_netr_ProductType(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
7837 : {
7838 : uint8_t v;
7839 24 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
7840 24 : *r = v;
7841 24 : return NDR_ERR_SUCCESS;
7842 : }
7843 :
7844 0 : _PUBLIC_ void ndr_print_netr_ProductType(struct ndr_print *ndr, const char *name, uint8_t r)
7845 : {
7846 0 : ndr_print_uint8(ndr, name, r);
7847 0 : ndr->depth++;
7848 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_DOMAIN_CONTROLLER", NETR_VER_NT_DOMAIN_CONTROLLER, r);
7849 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_SERVER", NETR_VER_NT_SERVER, r);
7850 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_WORKSTATION", NETR_VER_NT_WORKSTATION, r);
7851 0 : ndr->depth--;
7852 0 : }
7853 :
7854 504 : static enum ndr_err_code ndr_push_netr_LsaPolicyInformation(struct ndr_push *ndr, int ndr_flags, const struct netr_LsaPolicyInformation *r)
7855 : {
7856 504 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7857 504 : if (ndr_flags & NDR_SCALARS) {
7858 259 : NDR_CHECK(ndr_push_align(ndr, 5));
7859 259 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->policy_size));
7860 259 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
7861 259 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7862 : }
7863 504 : if (ndr_flags & NDR_BUFFERS) {
7864 259 : if (r->policy) {
7865 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->policy_size));
7866 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->policy, r->policy_size));
7867 : }
7868 : }
7869 504 : return NDR_ERR_SUCCESS;
7870 : }
7871 :
7872 462 : static enum ndr_err_code ndr_pull_netr_LsaPolicyInformation(struct ndr_pull *ndr, int ndr_flags, struct netr_LsaPolicyInformation *r)
7873 : {
7874 : uint32_t _ptr_policy;
7875 462 : uint32_t size_policy_1 = 0;
7876 462 : TALLOC_CTX *_mem_save_policy_0 = NULL;
7877 462 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7878 462 : if (ndr_flags & NDR_SCALARS) {
7879 238 : NDR_CHECK(ndr_pull_align(ndr, 5));
7880 238 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->policy_size));
7881 238 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
7882 238 : if (_ptr_policy) {
7883 0 : NDR_PULL_ALLOC(ndr, r->policy);
7884 : } else {
7885 238 : r->policy = NULL;
7886 : }
7887 238 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7888 : }
7889 462 : if (ndr_flags & NDR_BUFFERS) {
7890 238 : if (r->policy) {
7891 0 : _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr);
7892 0 : NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0);
7893 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->policy));
7894 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->policy, &size_policy_1));
7895 0 : NDR_PULL_ALLOC_N(ndr, r->policy, size_policy_1);
7896 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->policy, size_policy_1));
7897 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
7898 : }
7899 238 : if (r->policy) {
7900 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->policy, r->policy_size));
7901 : }
7902 : }
7903 462 : return NDR_ERR_SUCCESS;
7904 : }
7905 :
7906 42 : _PUBLIC_ void ndr_print_netr_LsaPolicyInformation(struct ndr_print *ndr, const char *name, const struct netr_LsaPolicyInformation *r)
7907 : {
7908 42 : ndr_print_struct(ndr, name, "netr_LsaPolicyInformation");
7909 42 : if (r == NULL) { ndr_print_null(ndr); return; }
7910 42 : ndr->depth++;
7911 42 : ndr_print_uint32(ndr, "policy_size", r->policy_size);
7912 42 : ndr_print_ptr(ndr, "policy", r->policy);
7913 42 : ndr->depth++;
7914 42 : if (r->policy) {
7915 0 : ndr_print_array_uint8(ndr, "policy", r->policy, r->policy_size);
7916 : }
7917 42 : ndr->depth--;
7918 42 : ndr->depth--;
7919 : }
7920 :
7921 24 : static enum ndr_err_code ndr_push_netr_OsVersionInfoEx(struct ndr_push *ndr, int ndr_flags, const struct netr_OsVersionInfoEx *r)
7922 : {
7923 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
7924 24 : if (ndr_flags & NDR_SCALARS) {
7925 24 : NDR_CHECK(ndr_push_align(ndr, 4));
7926 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 284));
7927 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MajorVersion));
7928 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MinorVersion));
7929 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->BuildNumber));
7930 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->PlatformId));
7931 : {
7932 24 : uint32_t _flags_save_string = ndr->flags;
7933 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7934 : {
7935 : struct ndr_push *_ndr_CSDVersion;
7936 24 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_CSDVersion, 0, 256));
7937 24 : NDR_CHECK(ndr_push_string(_ndr_CSDVersion, NDR_SCALARS, r->CSDVersion));
7938 24 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_CSDVersion, 0, 256));
7939 : }
7940 24 : ndr->flags = _flags_save_string;
7941 : }
7942 24 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ServicePackMajor));
7943 24 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ServicePackMinor));
7944 24 : NDR_CHECK(ndr_push_netr_SuiteMask(ndr, NDR_SCALARS, r->SuiteMask));
7945 24 : NDR_CHECK(ndr_push_netr_ProductType(ndr, NDR_SCALARS, r->ProductType));
7946 24 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Reserved));
7947 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7948 : }
7949 24 : if (ndr_flags & NDR_BUFFERS) {
7950 : }
7951 24 : return NDR_ERR_SUCCESS;
7952 : }
7953 :
7954 24 : static enum ndr_err_code ndr_pull_netr_OsVersionInfoEx(struct ndr_pull *ndr, int ndr_flags, struct netr_OsVersionInfoEx *r)
7955 : {
7956 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
7957 24 : if (ndr_flags & NDR_SCALARS) {
7958 24 : NDR_CHECK(ndr_pull_align(ndr, 4));
7959 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OSVersionInfoSize));
7960 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MajorVersion));
7961 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MinorVersion));
7962 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->BuildNumber));
7963 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->PlatformId));
7964 : {
7965 24 : uint32_t _flags_save_string = ndr->flags;
7966 24 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
7967 : {
7968 : struct ndr_pull *_ndr_CSDVersion;
7969 24 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_CSDVersion, 0, 256));
7970 24 : NDR_CHECK(ndr_pull_string(_ndr_CSDVersion, NDR_SCALARS, &r->CSDVersion));
7971 24 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_CSDVersion, 0, 256));
7972 : }
7973 24 : ndr->flags = _flags_save_string;
7974 : }
7975 24 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ServicePackMajor));
7976 24 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ServicePackMinor));
7977 24 : NDR_CHECK(ndr_pull_netr_SuiteMask(ndr, NDR_SCALARS, &r->SuiteMask));
7978 24 : NDR_CHECK(ndr_pull_netr_ProductType(ndr, NDR_SCALARS, &r->ProductType));
7979 24 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Reserved));
7980 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7981 : }
7982 24 : if (ndr_flags & NDR_BUFFERS) {
7983 : }
7984 24 : return NDR_ERR_SUCCESS;
7985 : }
7986 :
7987 0 : _PUBLIC_ void ndr_print_netr_OsVersionInfoEx(struct ndr_print *ndr, const char *name, const struct netr_OsVersionInfoEx *r)
7988 : {
7989 0 : ndr_print_struct(ndr, name, "netr_OsVersionInfoEx");
7990 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7991 0 : ndr->depth++;
7992 0 : ndr_print_uint32(ndr, "OSVersionInfoSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?284:r->OSVersionInfoSize);
7993 0 : ndr_print_uint32(ndr, "MajorVersion", r->MajorVersion);
7994 0 : ndr_print_uint32(ndr, "MinorVersion", r->MinorVersion);
7995 0 : ndr_print_uint32(ndr, "BuildNumber", r->BuildNumber);
7996 0 : ndr_print_uint32(ndr, "PlatformId", r->PlatformId);
7997 : {
7998 0 : uint32_t _flags_save_string = ndr->flags;
7999 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
8000 0 : ndr_print_string(ndr, "CSDVersion", r->CSDVersion);
8001 0 : ndr->flags = _flags_save_string;
8002 : }
8003 0 : ndr_print_uint16(ndr, "ServicePackMajor", r->ServicePackMajor);
8004 0 : ndr_print_uint16(ndr, "ServicePackMinor", r->ServicePackMinor);
8005 0 : ndr_print_netr_SuiteMask(ndr, "SuiteMask", r->SuiteMask);
8006 0 : ndr_print_netr_ProductType(ndr, "ProductType", r->ProductType);
8007 0 : ndr_print_uint8(ndr, "Reserved", r->Reserved);
8008 0 : ndr->depth--;
8009 : }
8010 :
8011 24 : static enum ndr_err_code ndr_push_netr_OsVersion(struct ndr_push *ndr, int ndr_flags, const struct netr_OsVersion *r)
8012 : {
8013 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8014 24 : if (ndr_flags & NDR_SCALARS) {
8015 24 : NDR_CHECK(ndr_push_align(ndr, 5));
8016 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 142));
8017 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8018 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 142));
8019 : {
8020 : struct ndr_push *_ndr_os;
8021 24 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_os, 0, 142 * 2));
8022 24 : NDR_CHECK(ndr_push_netr_OsVersionInfoEx(_ndr_os, NDR_SCALARS, &r->os));
8023 24 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_os, 0, 142 * 2));
8024 : }
8025 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8026 : }
8027 24 : if (ndr_flags & NDR_BUFFERS) {
8028 : }
8029 24 : return NDR_ERR_SUCCESS;
8030 : }
8031 :
8032 24 : static enum ndr_err_code ndr_pull_netr_OsVersion(struct ndr_pull *ndr, int ndr_flags, struct netr_OsVersion *r)
8033 : {
8034 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8035 24 : if (ndr_flags & NDR_SCALARS) {
8036 24 : NDR_CHECK(ndr_pull_align(ndr, 5));
8037 24 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
8038 24 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->dummy));
8039 24 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->size));
8040 : {
8041 : struct ndr_pull *_ndr_os;
8042 24 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_os, 0, r->size * 2));
8043 24 : NDR_CHECK(ndr_pull_netr_OsVersionInfoEx(_ndr_os, NDR_SCALARS, &r->os));
8044 24 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_os, 0, r->size * 2));
8045 : }
8046 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8047 : }
8048 24 : if (ndr_flags & NDR_BUFFERS) {
8049 : }
8050 24 : return NDR_ERR_SUCCESS;
8051 : }
8052 :
8053 0 : _PUBLIC_ void ndr_print_netr_OsVersion(struct ndr_print *ndr, const char *name, const struct netr_OsVersion *r)
8054 : {
8055 0 : ndr_print_struct(ndr, name, "netr_OsVersion");
8056 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8057 0 : ndr->depth++;
8058 0 : ndr_print_uint3264(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?142:r->length);
8059 0 : ndr_print_uint3264(ndr, "dummy", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->dummy);
8060 0 : ndr_print_uint3264(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?142:r->size);
8061 0 : ndr_print_netr_OsVersionInfoEx(ndr, "os", &r->os);
8062 0 : ndr->depth--;
8063 : }
8064 :
8065 238 : static enum ndr_err_code ndr_push_netr_OsVersionContainer(struct ndr_push *ndr, int ndr_flags, const struct netr_OsVersionContainer *r)
8066 : {
8067 238 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8068 238 : if (ndr_flags & NDR_SCALARS) {
8069 119 : NDR_CHECK(ndr_push_align(ndr, 5));
8070 119 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284));
8071 119 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284));
8072 119 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->os));
8073 119 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8074 : }
8075 238 : if (ndr_flags & NDR_BUFFERS) {
8076 119 : if (r->os) {
8077 24 : NDR_CHECK(ndr_push_netr_OsVersion(ndr, NDR_SCALARS, r->os));
8078 : }
8079 : }
8080 238 : return NDR_ERR_SUCCESS;
8081 : }
8082 :
8083 238 : static enum ndr_err_code ndr_pull_netr_OsVersionContainer(struct ndr_pull *ndr, int ndr_flags, struct netr_OsVersionContainer *r)
8084 : {
8085 : uint32_t _ptr_os;
8086 238 : TALLOC_CTX *_mem_save_os_0 = NULL;
8087 238 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8088 238 : if (ndr_flags & NDR_SCALARS) {
8089 119 : NDR_CHECK(ndr_pull_align(ndr, 5));
8090 119 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
8091 119 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
8092 119 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_os));
8093 119 : if (_ptr_os) {
8094 24 : NDR_PULL_ALLOC(ndr, r->os);
8095 : } else {
8096 95 : r->os = NULL;
8097 : }
8098 119 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8099 : }
8100 238 : if (ndr_flags & NDR_BUFFERS) {
8101 119 : if (r->os) {
8102 24 : _mem_save_os_0 = NDR_PULL_GET_MEM_CTX(ndr);
8103 24 : NDR_PULL_SET_MEM_CTX(ndr, r->os, 0);
8104 24 : NDR_CHECK(ndr_pull_netr_OsVersion(ndr, NDR_SCALARS, r->os));
8105 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_os_0, 0);
8106 : }
8107 : }
8108 238 : return NDR_ERR_SUCCESS;
8109 : }
8110 :
8111 0 : _PUBLIC_ void ndr_print_netr_OsVersionContainer(struct ndr_print *ndr, const char *name, const struct netr_OsVersionContainer *r)
8112 : {
8113 0 : ndr_print_struct(ndr, name, "netr_OsVersionContainer");
8114 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8115 0 : ndr->depth++;
8116 0 : ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->os == NULL?0:284:r->length);
8117 0 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->os == NULL?0:284:r->size);
8118 0 : ndr_print_ptr(ndr, "os", r->os);
8119 0 : ndr->depth++;
8120 0 : if (r->os) {
8121 0 : ndr_print_netr_OsVersion(ndr, "os", r->os);
8122 : }
8123 0 : ndr->depth--;
8124 0 : ndr->depth--;
8125 : }
8126 :
8127 119 : static enum ndr_err_code ndr_push_netr_WorkstationInformation(struct ndr_push *ndr, int ndr_flags, const struct netr_WorkstationInformation *r)
8128 : {
8129 119 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8130 119 : if (ndr_flags & NDR_SCALARS) {
8131 119 : NDR_CHECK(ndr_push_align(ndr, 5));
8132 119 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
8133 119 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_hostname));
8134 119 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
8135 119 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy1));
8136 119 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy2));
8137 119 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy3));
8138 119 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy4));
8139 119 : NDR_CHECK(ndr_push_netr_OsVersionContainer(ndr, NDR_SCALARS, &r->os_version));
8140 119 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->os_name));
8141 119 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummy_string3));
8142 119 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummy_string4));
8143 119 : NDR_CHECK(ndr_push_netr_WorkstationFlags(ndr, NDR_SCALARS, r->workstation_flags));
8144 119 : NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->supported_enc_types));
8145 119 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
8146 119 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
8147 119 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8148 : }
8149 119 : if (ndr_flags & NDR_BUFFERS) {
8150 119 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
8151 119 : if (r->dns_hostname) {
8152 93 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_hostname, CH_UTF16)));
8153 93 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8154 93 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_hostname, CH_UTF16)));
8155 93 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_hostname, ndr_charset_length(r->dns_hostname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8156 : }
8157 119 : if (r->sitename) {
8158 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sitename, CH_UTF16)));
8159 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8160 84 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sitename, CH_UTF16)));
8161 84 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sitename, ndr_charset_length(r->sitename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8162 : }
8163 119 : if (r->dummy1) {
8164 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy1, CH_UTF16)));
8165 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8166 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy1, CH_UTF16)));
8167 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy1, ndr_charset_length(r->dummy1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8168 : }
8169 119 : if (r->dummy2) {
8170 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy2, CH_UTF16)));
8171 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8172 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy2, CH_UTF16)));
8173 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy2, ndr_charset_length(r->dummy2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8174 : }
8175 119 : if (r->dummy3) {
8176 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy3, CH_UTF16)));
8177 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8178 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy3, CH_UTF16)));
8179 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy3, ndr_charset_length(r->dummy3, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8180 : }
8181 119 : if (r->dummy4) {
8182 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy4, CH_UTF16)));
8183 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8184 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy4, CH_UTF16)));
8185 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy4, ndr_charset_length(r->dummy4, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8186 : }
8187 119 : NDR_CHECK(ndr_push_netr_OsVersionContainer(ndr, NDR_BUFFERS, &r->os_version));
8188 119 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->os_name));
8189 119 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string3));
8190 119 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string4));
8191 : }
8192 119 : return NDR_ERR_SUCCESS;
8193 : }
8194 :
8195 119 : static enum ndr_err_code ndr_pull_netr_WorkstationInformation(struct ndr_pull *ndr, int ndr_flags, struct netr_WorkstationInformation *r)
8196 : {
8197 : uint32_t _ptr_dns_hostname;
8198 119 : uint32_t size_dns_hostname_1 = 0;
8199 119 : uint32_t length_dns_hostname_1 = 0;
8200 119 : TALLOC_CTX *_mem_save_dns_hostname_0 = NULL;
8201 : uint32_t _ptr_sitename;
8202 119 : uint32_t size_sitename_1 = 0;
8203 119 : uint32_t length_sitename_1 = 0;
8204 119 : TALLOC_CTX *_mem_save_sitename_0 = NULL;
8205 : uint32_t _ptr_dummy1;
8206 119 : uint32_t size_dummy1_1 = 0;
8207 119 : uint32_t length_dummy1_1 = 0;
8208 119 : TALLOC_CTX *_mem_save_dummy1_0 = NULL;
8209 : uint32_t _ptr_dummy2;
8210 119 : uint32_t size_dummy2_1 = 0;
8211 119 : uint32_t length_dummy2_1 = 0;
8212 119 : TALLOC_CTX *_mem_save_dummy2_0 = NULL;
8213 : uint32_t _ptr_dummy3;
8214 119 : uint32_t size_dummy3_1 = 0;
8215 119 : uint32_t length_dummy3_1 = 0;
8216 119 : TALLOC_CTX *_mem_save_dummy3_0 = NULL;
8217 : uint32_t _ptr_dummy4;
8218 119 : uint32_t size_dummy4_1 = 0;
8219 119 : uint32_t length_dummy4_1 = 0;
8220 119 : TALLOC_CTX *_mem_save_dummy4_0 = NULL;
8221 119 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8222 119 : if (ndr_flags & NDR_SCALARS) {
8223 119 : NDR_CHECK(ndr_pull_align(ndr, 5));
8224 119 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
8225 119 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_hostname));
8226 119 : if (_ptr_dns_hostname) {
8227 93 : NDR_PULL_ALLOC(ndr, r->dns_hostname);
8228 : } else {
8229 26 : r->dns_hostname = NULL;
8230 : }
8231 119 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename));
8232 119 : if (_ptr_sitename) {
8233 84 : NDR_PULL_ALLOC(ndr, r->sitename);
8234 : } else {
8235 35 : r->sitename = NULL;
8236 : }
8237 119 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy1));
8238 119 : if (_ptr_dummy1) {
8239 0 : NDR_PULL_ALLOC(ndr, r->dummy1);
8240 : } else {
8241 119 : r->dummy1 = NULL;
8242 : }
8243 119 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy2));
8244 119 : if (_ptr_dummy2) {
8245 0 : NDR_PULL_ALLOC(ndr, r->dummy2);
8246 : } else {
8247 119 : r->dummy2 = NULL;
8248 : }
8249 119 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy3));
8250 119 : if (_ptr_dummy3) {
8251 0 : NDR_PULL_ALLOC(ndr, r->dummy3);
8252 : } else {
8253 119 : r->dummy3 = NULL;
8254 : }
8255 119 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy4));
8256 119 : if (_ptr_dummy4) {
8257 0 : NDR_PULL_ALLOC(ndr, r->dummy4);
8258 : } else {
8259 119 : r->dummy4 = NULL;
8260 : }
8261 119 : NDR_CHECK(ndr_pull_netr_OsVersionContainer(ndr, NDR_SCALARS, &r->os_version));
8262 119 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->os_name));
8263 119 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummy_string3));
8264 119 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummy_string4));
8265 119 : NDR_CHECK(ndr_pull_netr_WorkstationFlags(ndr, NDR_SCALARS, &r->workstation_flags));
8266 119 : NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->supported_enc_types));
8267 119 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3));
8268 119 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4));
8269 119 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8270 : }
8271 119 : if (ndr_flags & NDR_BUFFERS) {
8272 119 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
8273 119 : if (r->dns_hostname) {
8274 93 : _mem_save_dns_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
8275 93 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_hostname, 0);
8276 93 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_hostname));
8277 93 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_hostname));
8278 93 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_hostname, &size_dns_hostname_1));
8279 93 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_hostname, &length_dns_hostname_1));
8280 93 : if (length_dns_hostname_1 > size_dns_hostname_1) {
8281 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_hostname_1, length_dns_hostname_1);
8282 : }
8283 93 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_hostname_1, sizeof(uint16_t)));
8284 93 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_hostname, length_dns_hostname_1, sizeof(uint16_t), CH_UTF16));
8285 93 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_hostname_0, 0);
8286 : }
8287 119 : if (r->sitename) {
8288 84 : _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr);
8289 84 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
8290 84 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename));
8291 84 : NDR_CHECK(ndr_pull_array_length(ndr, &r->sitename));
8292 84 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->sitename, &size_sitename_1));
8293 84 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->sitename, &length_sitename_1));
8294 84 : if (length_sitename_1 > size_sitename_1) {
8295 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_sitename_1, length_sitename_1);
8296 : }
8297 84 : NDR_CHECK(ndr_check_string_terminator(ndr, length_sitename_1, sizeof(uint16_t)));
8298 84 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sitename, length_sitename_1, sizeof(uint16_t), CH_UTF16));
8299 84 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0);
8300 : }
8301 119 : if (r->dummy1) {
8302 0 : _mem_save_dummy1_0 = NDR_PULL_GET_MEM_CTX(ndr);
8303 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy1, 0);
8304 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy1));
8305 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy1));
8306 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy1, &size_dummy1_1));
8307 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy1, &length_dummy1_1));
8308 0 : if (length_dummy1_1 > size_dummy1_1) {
8309 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dummy1_1, length_dummy1_1);
8310 : }
8311 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy1_1, sizeof(uint16_t)));
8312 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy1, length_dummy1_1, sizeof(uint16_t), CH_UTF16));
8313 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy1_0, 0);
8314 : }
8315 119 : if (r->dummy2) {
8316 0 : _mem_save_dummy2_0 = NDR_PULL_GET_MEM_CTX(ndr);
8317 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy2, 0);
8318 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy2));
8319 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy2));
8320 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy2, &size_dummy2_1));
8321 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy2, &length_dummy2_1));
8322 0 : if (length_dummy2_1 > size_dummy2_1) {
8323 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dummy2_1, length_dummy2_1);
8324 : }
8325 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy2_1, sizeof(uint16_t)));
8326 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy2, length_dummy2_1, sizeof(uint16_t), CH_UTF16));
8327 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy2_0, 0);
8328 : }
8329 119 : if (r->dummy3) {
8330 0 : _mem_save_dummy3_0 = NDR_PULL_GET_MEM_CTX(ndr);
8331 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy3, 0);
8332 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy3));
8333 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy3));
8334 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy3, &size_dummy3_1));
8335 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy3, &length_dummy3_1));
8336 0 : if (length_dummy3_1 > size_dummy3_1) {
8337 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dummy3_1, length_dummy3_1);
8338 : }
8339 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy3_1, sizeof(uint16_t)));
8340 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy3, length_dummy3_1, sizeof(uint16_t), CH_UTF16));
8341 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy3_0, 0);
8342 : }
8343 119 : if (r->dummy4) {
8344 0 : _mem_save_dummy4_0 = NDR_PULL_GET_MEM_CTX(ndr);
8345 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy4, 0);
8346 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy4));
8347 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy4));
8348 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy4, &size_dummy4_1));
8349 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy4, &length_dummy4_1));
8350 0 : if (length_dummy4_1 > size_dummy4_1) {
8351 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dummy4_1, length_dummy4_1);
8352 : }
8353 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy4_1, sizeof(uint16_t)));
8354 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy4, length_dummy4_1, sizeof(uint16_t), CH_UTF16));
8355 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy4_0, 0);
8356 : }
8357 119 : NDR_CHECK(ndr_pull_netr_OsVersionContainer(ndr, NDR_BUFFERS, &r->os_version));
8358 119 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->os_name));
8359 119 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string3));
8360 119 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string4));
8361 : }
8362 119 : return NDR_ERR_SUCCESS;
8363 : }
8364 :
8365 0 : _PUBLIC_ void ndr_print_netr_WorkstationInformation(struct ndr_print *ndr, const char *name, const struct netr_WorkstationInformation *r)
8366 : {
8367 0 : ndr_print_struct(ndr, name, "netr_WorkstationInformation");
8368 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8369 0 : ndr->depth++;
8370 0 : ndr_print_netr_LsaPolicyInformation(ndr, "lsa_policy", &r->lsa_policy);
8371 0 : ndr_print_ptr(ndr, "dns_hostname", r->dns_hostname);
8372 0 : ndr->depth++;
8373 0 : if (r->dns_hostname) {
8374 0 : ndr_print_string(ndr, "dns_hostname", r->dns_hostname);
8375 : }
8376 0 : ndr->depth--;
8377 0 : ndr_print_ptr(ndr, "sitename", r->sitename);
8378 0 : ndr->depth++;
8379 0 : if (r->sitename) {
8380 0 : ndr_print_string(ndr, "sitename", r->sitename);
8381 : }
8382 0 : ndr->depth--;
8383 0 : ndr_print_ptr(ndr, "dummy1", r->dummy1);
8384 0 : ndr->depth++;
8385 0 : if (r->dummy1) {
8386 0 : ndr_print_string(ndr, "dummy1", r->dummy1);
8387 : }
8388 0 : ndr->depth--;
8389 0 : ndr_print_ptr(ndr, "dummy2", r->dummy2);
8390 0 : ndr->depth++;
8391 0 : if (r->dummy2) {
8392 0 : ndr_print_string(ndr, "dummy2", r->dummy2);
8393 : }
8394 0 : ndr->depth--;
8395 0 : ndr_print_ptr(ndr, "dummy3", r->dummy3);
8396 0 : ndr->depth++;
8397 0 : if (r->dummy3) {
8398 0 : ndr_print_string(ndr, "dummy3", r->dummy3);
8399 : }
8400 0 : ndr->depth--;
8401 0 : ndr_print_ptr(ndr, "dummy4", r->dummy4);
8402 0 : ndr->depth++;
8403 0 : if (r->dummy4) {
8404 0 : ndr_print_string(ndr, "dummy4", r->dummy4);
8405 : }
8406 0 : ndr->depth--;
8407 0 : ndr_print_netr_OsVersionContainer(ndr, "os_version", &r->os_version);
8408 0 : ndr_print_lsa_String(ndr, "os_name", &r->os_name);
8409 0 : ndr_print_lsa_String(ndr, "dummy_string3", &r->dummy_string3);
8410 0 : ndr_print_lsa_String(ndr, "dummy_string4", &r->dummy_string4);
8411 0 : ndr_print_netr_WorkstationFlags(ndr, "workstation_flags", r->workstation_flags);
8412 0 : ndr_print_kerb_EncTypes(ndr, "supported_enc_types", r->supported_enc_types);
8413 0 : ndr_print_uint32(ndr, "dummy_long3", r->dummy_long3);
8414 0 : ndr_print_uint32(ndr, "dummy_long4", r->dummy_long4);
8415 0 : ndr->depth--;
8416 : }
8417 :
8418 119 : static enum ndr_err_code ndr_push_netr_WorkstationInfo(struct ndr_push *ndr, int ndr_flags, const union netr_WorkstationInfo *r)
8419 : {
8420 : uint32_t level;
8421 119 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8422 119 : if (ndr_flags & NDR_SCALARS) {
8423 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8424 119 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8425 119 : NDR_CHECK(ndr_push_union_align(ndr, 5));
8426 119 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
8427 : /* ms_union is always aligned to the largest union arm*/
8428 119 : NDR_CHECK(ndr_push_align(ndr, 5));
8429 119 : switch (level) {
8430 105 : case 1: {
8431 105 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->workstation_info));
8432 105 : break; }
8433 :
8434 14 : case 2: {
8435 14 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->lsa_policy_info));
8436 14 : break; }
8437 :
8438 0 : default:
8439 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
8440 : }
8441 0 : }
8442 119 : if (ndr_flags & NDR_BUFFERS) {
8443 119 : if (!(ndr_flags & NDR_SCALARS)) {
8444 : /* We didn't get it above, and the token is not needed after this. */
8445 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8446 : }
8447 119 : switch (level) {
8448 105 : case 1:
8449 105 : if (r->workstation_info) {
8450 105 : NDR_CHECK(ndr_push_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->workstation_info));
8451 : }
8452 105 : break;
8453 :
8454 14 : case 2:
8455 14 : if (r->lsa_policy_info) {
8456 14 : NDR_CHECK(ndr_push_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
8457 : }
8458 14 : break;
8459 :
8460 0 : default:
8461 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
8462 : }
8463 0 : }
8464 119 : return NDR_ERR_SUCCESS;
8465 : }
8466 :
8467 119 : static enum ndr_err_code ndr_pull_netr_WorkstationInfo(struct ndr_pull *ndr, int ndr_flags, union netr_WorkstationInfo *r)
8468 : {
8469 : uint32_t level;
8470 : uint32_t _level;
8471 119 : TALLOC_CTX *_mem_save_workstation_info_0 = NULL;
8472 : uint32_t _ptr_workstation_info;
8473 119 : TALLOC_CTX *_mem_save_lsa_policy_info_0 = NULL;
8474 : uint32_t _ptr_lsa_policy_info;
8475 119 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8476 119 : if (ndr_flags & NDR_SCALARS) {
8477 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8478 119 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8479 119 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
8480 119 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
8481 119 : if (_level != level) {
8482 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
8483 : }
8484 : /* ms_union is always aligned to the largest union arm*/
8485 119 : NDR_CHECK(ndr_pull_align(ndr, 5));
8486 119 : switch (level) {
8487 105 : case 1: {
8488 105 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_workstation_info));
8489 105 : if (_ptr_workstation_info) {
8490 105 : NDR_PULL_ALLOC(ndr, r->workstation_info);
8491 : } else {
8492 0 : r->workstation_info = NULL;
8493 : }
8494 105 : break; }
8495 :
8496 14 : case 2: {
8497 14 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lsa_policy_info));
8498 14 : if (_ptr_lsa_policy_info) {
8499 14 : NDR_PULL_ALLOC(ndr, r->lsa_policy_info);
8500 : } else {
8501 0 : r->lsa_policy_info = NULL;
8502 : }
8503 14 : break; }
8504 :
8505 0 : default:
8506 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
8507 : }
8508 0 : }
8509 119 : if (ndr_flags & NDR_BUFFERS) {
8510 119 : if (!(ndr_flags & NDR_SCALARS)) {
8511 : /* We didn't get it above, and the token is not needed after this. */
8512 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
8513 : }
8514 119 : switch (level) {
8515 105 : case 1:
8516 105 : if (r->workstation_info) {
8517 105 : _mem_save_workstation_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8518 105 : NDR_PULL_SET_MEM_CTX(ndr, r->workstation_info, 0);
8519 105 : NDR_CHECK(ndr_pull_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->workstation_info));
8520 105 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_workstation_info_0, 0);
8521 : }
8522 105 : break;
8523 :
8524 14 : case 2:
8525 14 : if (r->lsa_policy_info) {
8526 14 : _mem_save_lsa_policy_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8527 14 : NDR_PULL_SET_MEM_CTX(ndr, r->lsa_policy_info, 0);
8528 14 : NDR_CHECK(ndr_pull_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
8529 14 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lsa_policy_info_0, 0);
8530 : }
8531 14 : break;
8532 :
8533 0 : default:
8534 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
8535 : }
8536 0 : }
8537 119 : return NDR_ERR_SUCCESS;
8538 : }
8539 :
8540 0 : _PUBLIC_ void ndr_print_netr_WorkstationInfo(struct ndr_print *ndr, const char *name, const union netr_WorkstationInfo *r)
8541 : {
8542 : uint32_t level;
8543 0 : level = ndr_print_steal_switch_value(ndr, r);
8544 0 : ndr_print_union(ndr, name, level, "netr_WorkstationInfo");
8545 0 : switch (level) {
8546 0 : case 1:
8547 0 : ndr_print_ptr(ndr, "workstation_info", r->workstation_info);
8548 0 : ndr->depth++;
8549 0 : if (r->workstation_info) {
8550 0 : ndr_print_netr_WorkstationInformation(ndr, "workstation_info", r->workstation_info);
8551 : }
8552 0 : ndr->depth--;
8553 0 : break;
8554 :
8555 0 : case 2:
8556 0 : ndr_print_ptr(ndr, "lsa_policy_info", r->lsa_policy_info);
8557 0 : ndr->depth++;
8558 0 : if (r->lsa_policy_info) {
8559 0 : ndr_print_netr_WorkstationInformation(ndr, "lsa_policy_info", r->lsa_policy_info);
8560 : }
8561 0 : ndr->depth--;
8562 0 : break;
8563 :
8564 0 : default:
8565 0 : ndr_print_bad_level(ndr, name, level);
8566 : }
8567 0 : }
8568 :
8569 126 : static enum ndr_err_code ndr_push_netr_trust_extension_info(struct ndr_push *ndr, int ndr_flags, const struct netr_trust_extension_info *r)
8570 : {
8571 126 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8572 126 : if (ndr_flags & NDR_SCALARS) {
8573 126 : NDR_CHECK(ndr_push_align(ndr, 4));
8574 126 : NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->flags));
8575 126 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index));
8576 126 : NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
8577 126 : NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
8578 126 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8579 : }
8580 126 : if (ndr_flags & NDR_BUFFERS) {
8581 : }
8582 126 : return NDR_ERR_SUCCESS;
8583 : }
8584 :
8585 105 : static enum ndr_err_code ndr_pull_netr_trust_extension_info(struct ndr_pull *ndr, int ndr_flags, struct netr_trust_extension_info *r)
8586 : {
8587 105 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8588 105 : if (ndr_flags & NDR_SCALARS) {
8589 105 : NDR_CHECK(ndr_pull_align(ndr, 4));
8590 105 : NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->flags));
8591 105 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index));
8592 105 : NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
8593 105 : NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
8594 105 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8595 : }
8596 105 : if (ndr_flags & NDR_BUFFERS) {
8597 : }
8598 105 : return NDR_ERR_SUCCESS;
8599 : }
8600 :
8601 42 : _PUBLIC_ void ndr_print_netr_trust_extension_info(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_info *r)
8602 : {
8603 42 : ndr_print_struct(ndr, name, "netr_trust_extension_info");
8604 42 : if (r == NULL) { ndr_print_null(ndr); return; }
8605 42 : ndr->depth++;
8606 42 : ndr_print_netr_TrustFlags(ndr, "flags", r->flags);
8607 42 : ndr_print_uint32(ndr, "parent_index", r->parent_index);
8608 42 : ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
8609 42 : ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
8610 42 : ndr->depth--;
8611 : }
8612 :
8613 126 : static enum ndr_err_code ndr_push_netr_trust_extension(struct ndr_push *ndr, int ndr_flags, const struct netr_trust_extension *r)
8614 : {
8615 126 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8616 126 : if (ndr_flags & NDR_SCALARS) {
8617 126 : NDR_CHECK(ndr_push_align(ndr, 5));
8618 126 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 8));
8619 126 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8620 126 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 8));
8621 : {
8622 : struct ndr_push *_ndr_info;
8623 126 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, 8 * 2));
8624 126 : NDR_CHECK(ndr_push_netr_trust_extension_info(_ndr_info, NDR_SCALARS, &r->info));
8625 126 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, 8 * 2));
8626 : }
8627 126 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8628 : }
8629 126 : if (ndr_flags & NDR_BUFFERS) {
8630 : }
8631 126 : return NDR_ERR_SUCCESS;
8632 : }
8633 :
8634 105 : static enum ndr_err_code ndr_pull_netr_trust_extension(struct ndr_pull *ndr, int ndr_flags, struct netr_trust_extension *r)
8635 : {
8636 105 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8637 105 : if (ndr_flags & NDR_SCALARS) {
8638 105 : NDR_CHECK(ndr_pull_align(ndr, 5));
8639 105 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
8640 105 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->dummy));
8641 105 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->size));
8642 : {
8643 : struct ndr_pull *_ndr_info;
8644 105 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, r->size * 2));
8645 105 : NDR_CHECK(ndr_pull_netr_trust_extension_info(_ndr_info, NDR_SCALARS, &r->info));
8646 105 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, r->size * 2));
8647 : }
8648 105 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8649 : }
8650 105 : if (ndr_flags & NDR_BUFFERS) {
8651 : }
8652 105 : return NDR_ERR_SUCCESS;
8653 : }
8654 :
8655 42 : _PUBLIC_ void ndr_print_netr_trust_extension(struct ndr_print *ndr, const char *name, const struct netr_trust_extension *r)
8656 : {
8657 42 : ndr_print_struct(ndr, name, "netr_trust_extension");
8658 42 : if (r == NULL) { ndr_print_null(ndr); return; }
8659 42 : ndr->depth++;
8660 42 : ndr_print_uint3264(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->length);
8661 42 : ndr_print_uint3264(ndr, "dummy", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->dummy);
8662 42 : ndr_print_uint3264(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->size);
8663 42 : ndr_print_netr_trust_extension_info(ndr, "info", &r->info);
8664 42 : ndr->depth--;
8665 : }
8666 :
8667 504 : static enum ndr_err_code ndr_push_netr_trust_extension_container(struct ndr_push *ndr, int ndr_flags, const struct netr_trust_extension_container *r)
8668 : {
8669 504 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8670 504 : if (ndr_flags & NDR_SCALARS) {
8671 252 : NDR_CHECK(ndr_push_align(ndr, 5));
8672 252 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->info == NULL?0:16));
8673 252 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->info == NULL?0:16));
8674 252 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
8675 252 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8676 : }
8677 504 : if (ndr_flags & NDR_BUFFERS) {
8678 252 : if (r->info) {
8679 126 : NDR_CHECK(ndr_push_netr_trust_extension(ndr, NDR_SCALARS, r->info));
8680 : }
8681 : }
8682 504 : return NDR_ERR_SUCCESS;
8683 : }
8684 :
8685 420 : static enum ndr_err_code ndr_pull_netr_trust_extension_container(struct ndr_pull *ndr, int ndr_flags, struct netr_trust_extension_container *r)
8686 : {
8687 : uint32_t _ptr_info;
8688 420 : TALLOC_CTX *_mem_save_info_0 = NULL;
8689 420 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8690 420 : if (ndr_flags & NDR_SCALARS) {
8691 210 : NDR_CHECK(ndr_pull_align(ndr, 5));
8692 210 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
8693 210 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
8694 210 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
8695 210 : if (_ptr_info) {
8696 105 : NDR_PULL_ALLOC(ndr, r->info);
8697 : } else {
8698 105 : r->info = NULL;
8699 : }
8700 210 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8701 : }
8702 420 : if (ndr_flags & NDR_BUFFERS) {
8703 210 : if (r->info) {
8704 105 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8705 105 : NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
8706 105 : NDR_CHECK(ndr_pull_netr_trust_extension(ndr, NDR_SCALARS, r->info));
8707 105 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
8708 : }
8709 : }
8710 420 : return NDR_ERR_SUCCESS;
8711 : }
8712 :
8713 84 : _PUBLIC_ void ndr_print_netr_trust_extension_container(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_container *r)
8714 : {
8715 84 : ndr_print_struct(ndr, name, "netr_trust_extension_container");
8716 84 : if (r == NULL) { ndr_print_null(ndr); return; }
8717 84 : ndr->depth++;
8718 84 : ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->info == NULL?0:16:r->length);
8719 84 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->info == NULL?0:16:r->size);
8720 84 : ndr_print_ptr(ndr, "info", r->info);
8721 84 : ndr->depth++;
8722 84 : if (r->info) {
8723 42 : ndr_print_netr_trust_extension(ndr, "info", r->info);
8724 : }
8725 84 : ndr->depth--;
8726 84 : ndr->depth--;
8727 : }
8728 :
8729 504 : static enum ndr_err_code ndr_push_netr_OneDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_OneDomainInfo *r)
8730 : {
8731 504 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8732 504 : if (ndr_flags & NDR_SCALARS) {
8733 252 : NDR_CHECK(ndr_push_align(ndr, 5));
8734 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domainname));
8735 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domainname));
8736 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forestname));
8737 252 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
8738 252 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
8739 252 : NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension));
8740 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
8741 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
8742 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
8743 252 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long1));
8744 252 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long2));
8745 252 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
8746 252 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
8747 252 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8748 : }
8749 504 : if (ndr_flags & NDR_BUFFERS) {
8750 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domainname));
8751 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domainname));
8752 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forestname));
8753 252 : if (r->domain_sid) {
8754 252 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
8755 : }
8756 252 : NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension));
8757 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
8758 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
8759 252 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
8760 : }
8761 504 : return NDR_ERR_SUCCESS;
8762 : }
8763 :
8764 420 : static enum ndr_err_code ndr_pull_netr_OneDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_OneDomainInfo *r)
8765 : {
8766 : uint32_t _ptr_domain_sid;
8767 420 : TALLOC_CTX *_mem_save_domain_sid_0 = NULL;
8768 420 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8769 420 : if (ndr_flags & NDR_SCALARS) {
8770 210 : NDR_CHECK(ndr_pull_align(ndr, 5));
8771 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domainname));
8772 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domainname));
8773 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forestname));
8774 210 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
8775 210 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
8776 210 : if (_ptr_domain_sid) {
8777 210 : NDR_PULL_ALLOC(ndr, r->domain_sid);
8778 : } else {
8779 0 : r->domain_sid = NULL;
8780 : }
8781 210 : NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension));
8782 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
8783 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
8784 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
8785 210 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long1));
8786 210 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long2));
8787 210 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3));
8788 210 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4));
8789 210 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8790 : }
8791 420 : if (ndr_flags & NDR_BUFFERS) {
8792 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domainname));
8793 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domainname));
8794 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forestname));
8795 210 : if (r->domain_sid) {
8796 210 : _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8797 210 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
8798 210 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
8799 210 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
8800 : }
8801 210 : NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension));
8802 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
8803 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
8804 210 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
8805 : }
8806 420 : return NDR_ERR_SUCCESS;
8807 : }
8808 :
8809 84 : _PUBLIC_ void ndr_print_netr_OneDomainInfo(struct ndr_print *ndr, const char *name, const struct netr_OneDomainInfo *r)
8810 : {
8811 84 : ndr_print_struct(ndr, name, "netr_OneDomainInfo");
8812 84 : if (r == NULL) { ndr_print_null(ndr); return; }
8813 84 : ndr->depth++;
8814 84 : ndr_print_lsa_StringLarge(ndr, "domainname", &r->domainname);
8815 84 : ndr_print_lsa_StringLarge(ndr, "dns_domainname", &r->dns_domainname);
8816 84 : ndr_print_lsa_StringLarge(ndr, "dns_forestname", &r->dns_forestname);
8817 84 : ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
8818 84 : ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
8819 84 : ndr->depth++;
8820 84 : if (r->domain_sid) {
8821 84 : ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
8822 : }
8823 84 : ndr->depth--;
8824 84 : ndr_print_netr_trust_extension_container(ndr, "trust_extension", &r->trust_extension);
8825 84 : ndr_print_lsa_StringLarge(ndr, "dummy_string2", &r->dummy_string2);
8826 84 : ndr_print_lsa_StringLarge(ndr, "dummy_string3", &r->dummy_string3);
8827 84 : ndr_print_lsa_StringLarge(ndr, "dummy_string4", &r->dummy_string4);
8828 84 : ndr_print_uint32(ndr, "dummy_long1", r->dummy_long1);
8829 84 : ndr_print_uint32(ndr, "dummy_long2", r->dummy_long2);
8830 84 : ndr_print_uint32(ndr, "dummy_long3", r->dummy_long3);
8831 84 : ndr_print_uint32(ndr, "dummy_long4", r->dummy_long4);
8832 84 : ndr->depth--;
8833 : }
8834 :
8835 126 : static enum ndr_err_code ndr_push_netr_DomainInformation(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainInformation *r)
8836 : {
8837 : uint32_t cntr_trusted_domains_1;
8838 126 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8839 126 : if (ndr_flags & NDR_SCALARS) {
8840 126 : NDR_CHECK(ndr_push_align(ndr, 5));
8841 126 : NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->primary_domain));
8842 126 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trusted_domain_count));
8843 126 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domains));
8844 126 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
8845 126 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_hostname));
8846 126 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
8847 126 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
8848 126 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
8849 126 : NDR_CHECK(ndr_push_netr_WorkstationFlags(ndr, NDR_SCALARS, r->workstation_flags));
8850 126 : NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->supported_enc_types));
8851 126 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
8852 126 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
8853 126 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8854 : }
8855 126 : if (ndr_flags & NDR_BUFFERS) {
8856 126 : NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->primary_domain));
8857 126 : if (r->trusted_domains) {
8858 126 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->trusted_domain_count));
8859 252 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (r->trusted_domain_count); cntr_trusted_domains_1++) {
8860 126 : NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->trusted_domains[cntr_trusted_domains_1]));
8861 : }
8862 252 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (r->trusted_domain_count); cntr_trusted_domains_1++) {
8863 126 : NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->trusted_domains[cntr_trusted_domains_1]));
8864 : }
8865 : }
8866 126 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
8867 126 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_hostname));
8868 126 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
8869 126 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
8870 126 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
8871 : }
8872 126 : return NDR_ERR_SUCCESS;
8873 : }
8874 :
8875 105 : static enum ndr_err_code ndr_pull_netr_DomainInformation(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainInformation *r)
8876 : {
8877 : uint32_t _ptr_trusted_domains;
8878 105 : uint32_t size_trusted_domains_1 = 0;
8879 : uint32_t cntr_trusted_domains_1;
8880 105 : TALLOC_CTX *_mem_save_trusted_domains_0 = NULL;
8881 105 : TALLOC_CTX *_mem_save_trusted_domains_1 = NULL;
8882 105 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
8883 105 : if (ndr_flags & NDR_SCALARS) {
8884 105 : NDR_CHECK(ndr_pull_align(ndr, 5));
8885 105 : NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->primary_domain));
8886 105 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trusted_domain_count));
8887 105 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domains));
8888 105 : if (_ptr_trusted_domains) {
8889 105 : NDR_PULL_ALLOC(ndr, r->trusted_domains);
8890 : } else {
8891 0 : r->trusted_domains = NULL;
8892 : }
8893 105 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
8894 105 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_hostname));
8895 105 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
8896 105 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
8897 105 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
8898 105 : NDR_CHECK(ndr_pull_netr_WorkstationFlags(ndr, NDR_SCALARS, &r->workstation_flags));
8899 105 : NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->supported_enc_types));
8900 105 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3));
8901 105 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4));
8902 105 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8903 : }
8904 105 : if (ndr_flags & NDR_BUFFERS) {
8905 105 : NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->primary_domain));
8906 105 : if (r->trusted_domains) {
8907 105 : _mem_save_trusted_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
8908 105 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domains, 0);
8909 105 : NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_domains));
8910 105 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->trusted_domains, &size_trusted_domains_1));
8911 105 : NDR_PULL_ALLOC_N(ndr, r->trusted_domains, size_trusted_domains_1);
8912 105 : _mem_save_trusted_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
8913 105 : NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domains, 0);
8914 210 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (size_trusted_domains_1); cntr_trusted_domains_1++) {
8915 105 : NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->trusted_domains[cntr_trusted_domains_1]));
8916 : }
8917 210 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (size_trusted_domains_1); cntr_trusted_domains_1++) {
8918 105 : NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->trusted_domains[cntr_trusted_domains_1]));
8919 : }
8920 105 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_1, 0);
8921 105 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_0, 0);
8922 : }
8923 105 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
8924 105 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_hostname));
8925 105 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
8926 105 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
8927 105 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
8928 105 : if (r->trusted_domains) {
8929 105 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->trusted_domains, r->trusted_domain_count));
8930 : }
8931 105 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (size_trusted_domains_1); cntr_trusted_domains_1++) {
8932 : }
8933 : }
8934 105 : return NDR_ERR_SUCCESS;
8935 : }
8936 :
8937 42 : _PUBLIC_ void ndr_print_netr_DomainInformation(struct ndr_print *ndr, const char *name, const struct netr_DomainInformation *r)
8938 : {
8939 : uint32_t cntr_trusted_domains_1;
8940 42 : ndr_print_struct(ndr, name, "netr_DomainInformation");
8941 42 : if (r == NULL) { ndr_print_null(ndr); return; }
8942 42 : ndr->depth++;
8943 42 : ndr_print_netr_OneDomainInfo(ndr, "primary_domain", &r->primary_domain);
8944 42 : ndr_print_uint32(ndr, "trusted_domain_count", r->trusted_domain_count);
8945 42 : ndr_print_ptr(ndr, "trusted_domains", r->trusted_domains);
8946 42 : ndr->depth++;
8947 42 : if (r->trusted_domains) {
8948 42 : ndr->print(ndr, "%s: ARRAY(%d)", "trusted_domains", (int)r->trusted_domain_count);
8949 42 : ndr->depth++;
8950 84 : for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (r->trusted_domain_count); cntr_trusted_domains_1++) {
8951 42 : ndr_print_netr_OneDomainInfo(ndr, "trusted_domains", &r->trusted_domains[cntr_trusted_domains_1]);
8952 : }
8953 42 : ndr->depth--;
8954 : }
8955 42 : ndr->depth--;
8956 42 : ndr_print_netr_LsaPolicyInformation(ndr, "lsa_policy", &r->lsa_policy);
8957 42 : ndr_print_lsa_StringLarge(ndr, "dns_hostname", &r->dns_hostname);
8958 42 : ndr_print_lsa_StringLarge(ndr, "dummy_string2", &r->dummy_string2);
8959 42 : ndr_print_lsa_StringLarge(ndr, "dummy_string3", &r->dummy_string3);
8960 42 : ndr_print_lsa_StringLarge(ndr, "dummy_string4", &r->dummy_string4);
8961 42 : ndr_print_netr_WorkstationFlags(ndr, "workstation_flags", r->workstation_flags);
8962 42 : ndr_print_kerb_EncTypes(ndr, "supported_enc_types", r->supported_enc_types);
8963 42 : ndr_print_uint32(ndr, "dummy_long3", r->dummy_long3);
8964 42 : ndr_print_uint32(ndr, "dummy_long4", r->dummy_long4);
8965 42 : ndr->depth--;
8966 : }
8967 :
8968 140 : static enum ndr_err_code ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const union netr_DomainInfo *r)
8969 : {
8970 : uint32_t level;
8971 140 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
8972 140 : if (ndr_flags & NDR_SCALARS) {
8973 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
8974 140 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8975 140 : NDR_CHECK(ndr_push_union_align(ndr, 5));
8976 140 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
8977 : /* ms_union is always aligned to the largest union arm*/
8978 140 : NDR_CHECK(ndr_push_align(ndr, 5));
8979 140 : switch (level) {
8980 126 : case 1: {
8981 126 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_info));
8982 126 : break; }
8983 :
8984 14 : case 2: {
8985 14 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->lsa_policy_info));
8986 14 : break; }
8987 :
8988 0 : default:
8989 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
8990 : }
8991 0 : }
8992 140 : if (ndr_flags & NDR_BUFFERS) {
8993 140 : if (!(ndr_flags & NDR_SCALARS)) {
8994 : /* We didn't get it above, and the token is not needed after this. */
8995 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
8996 : }
8997 140 : switch (level) {
8998 126 : case 1:
8999 126 : if (r->domain_info) {
9000 126 : NDR_CHECK(ndr_push_netr_DomainInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_info));
9001 : }
9002 126 : break;
9003 :
9004 14 : case 2:
9005 14 : if (r->lsa_policy_info) {
9006 14 : NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
9007 : }
9008 14 : break;
9009 :
9010 0 : default:
9011 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
9012 : }
9013 0 : }
9014 140 : return NDR_ERR_SUCCESS;
9015 : }
9016 :
9017 119 : static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, union netr_DomainInfo *r)
9018 : {
9019 : uint32_t level;
9020 : uint32_t _level;
9021 119 : TALLOC_CTX *_mem_save_domain_info_0 = NULL;
9022 : uint32_t _ptr_domain_info;
9023 119 : TALLOC_CTX *_mem_save_lsa_policy_info_0 = NULL;
9024 : uint32_t _ptr_lsa_policy_info;
9025 119 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9026 119 : if (ndr_flags & NDR_SCALARS) {
9027 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
9028 119 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
9029 119 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
9030 119 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
9031 119 : if (_level != level) {
9032 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
9033 : }
9034 : /* ms_union is always aligned to the largest union arm*/
9035 119 : NDR_CHECK(ndr_pull_align(ndr, 5));
9036 119 : switch (level) {
9037 105 : case 1: {
9038 105 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_info));
9039 105 : if (_ptr_domain_info) {
9040 105 : NDR_PULL_ALLOC(ndr, r->domain_info);
9041 : } else {
9042 0 : r->domain_info = NULL;
9043 : }
9044 105 : break; }
9045 :
9046 14 : case 2: {
9047 14 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lsa_policy_info));
9048 14 : if (_ptr_lsa_policy_info) {
9049 14 : NDR_PULL_ALLOC(ndr, r->lsa_policy_info);
9050 : } else {
9051 0 : r->lsa_policy_info = NULL;
9052 : }
9053 14 : break; }
9054 :
9055 0 : default:
9056 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
9057 : }
9058 0 : }
9059 119 : if (ndr_flags & NDR_BUFFERS) {
9060 119 : if (!(ndr_flags & NDR_SCALARS)) {
9061 : /* We didn't get it above, and the token is not needed after this. */
9062 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
9063 : }
9064 119 : switch (level) {
9065 105 : case 1:
9066 105 : if (r->domain_info) {
9067 105 : _mem_save_domain_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9068 105 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_info, 0);
9069 105 : NDR_CHECK(ndr_pull_netr_DomainInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_info));
9070 105 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_info_0, 0);
9071 : }
9072 105 : break;
9073 :
9074 14 : case 2:
9075 14 : if (r->lsa_policy_info) {
9076 14 : _mem_save_lsa_policy_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9077 14 : NDR_PULL_SET_MEM_CTX(ndr, r->lsa_policy_info, 0);
9078 14 : NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
9079 14 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lsa_policy_info_0, 0);
9080 : }
9081 14 : break;
9082 :
9083 0 : default:
9084 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
9085 : }
9086 0 : }
9087 119 : return NDR_ERR_SUCCESS;
9088 : }
9089 :
9090 42 : _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r)
9091 : {
9092 : uint32_t level;
9093 42 : level = ndr_print_steal_switch_value(ndr, r);
9094 42 : ndr_print_union(ndr, name, level, "netr_DomainInfo");
9095 42 : switch (level) {
9096 42 : case 1:
9097 42 : ndr_print_ptr(ndr, "domain_info", r->domain_info);
9098 42 : ndr->depth++;
9099 42 : if (r->domain_info) {
9100 42 : ndr_print_netr_DomainInformation(ndr, "domain_info", r->domain_info);
9101 : }
9102 42 : ndr->depth--;
9103 42 : break;
9104 :
9105 0 : case 2:
9106 0 : ndr_print_ptr(ndr, "lsa_policy_info", r->lsa_policy_info);
9107 0 : ndr->depth++;
9108 0 : if (r->lsa_policy_info) {
9109 0 : ndr_print_netr_LsaPolicyInformation(ndr, "lsa_policy_info", r->lsa_policy_info);
9110 : }
9111 0 : ndr->depth--;
9112 0 : break;
9113 :
9114 0 : default:
9115 0 : ndr_print_bad_level(ndr, name, level);
9116 : }
9117 42 : }
9118 :
9119 288 : static enum ndr_err_code ndr_push_netr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct netr_CryptPassword *r)
9120 : {
9121 : {
9122 288 : uint32_t _flags_save_STRUCT = ndr->flags;
9123 288 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
9124 288 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9125 288 : if (ndr_flags & NDR_SCALARS) {
9126 288 : NDR_CHECK(ndr_push_align(ndr, 4));
9127 288 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 512));
9128 288 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
9129 288 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9130 : }
9131 288 : if (ndr_flags & NDR_BUFFERS) {
9132 : }
9133 288 : ndr->flags = _flags_save_STRUCT;
9134 : }
9135 288 : return NDR_ERR_SUCCESS;
9136 : }
9137 :
9138 300 : static enum ndr_err_code ndr_pull_netr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct netr_CryptPassword *r)
9139 : {
9140 300 : uint32_t size_data_0 = 0;
9141 : {
9142 300 : uint32_t _flags_save_STRUCT = ndr->flags;
9143 300 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
9144 300 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9145 300 : if (ndr_flags & NDR_SCALARS) {
9146 300 : NDR_CHECK(ndr_pull_align(ndr, 4));
9147 300 : size_data_0 = 512;
9148 300 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
9149 300 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
9150 300 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9151 : }
9152 300 : if (ndr_flags & NDR_BUFFERS) {
9153 : }
9154 300 : ndr->flags = _flags_save_STRUCT;
9155 : }
9156 300 : return NDR_ERR_SUCCESS;
9157 : }
9158 :
9159 0 : _PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r)
9160 : {
9161 0 : ndr_print_struct(ndr, name, "netr_CryptPassword");
9162 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9163 : {
9164 0 : uint32_t _flags_save_STRUCT = ndr->flags;
9165 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
9166 0 : ndr->depth++;
9167 0 : ndr_print_array_uint8(ndr, "data", r->data, 512);
9168 0 : ndr_print_uint32(ndr, "length", r->length);
9169 0 : ndr->depth--;
9170 0 : ndr->flags = _flags_save_STRUCT;
9171 : }
9172 : }
9173 :
9174 34 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SendToSamType(struct ndr_push *ndr, int ndr_flags, enum netr_SendToSamType r)
9175 : {
9176 34 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
9177 34 : return NDR_ERR_SUCCESS;
9178 : }
9179 :
9180 34 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SendToSamType(struct ndr_pull *ndr, int ndr_flags, enum netr_SendToSamType *r)
9181 : {
9182 : uint16_t v;
9183 34 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
9184 34 : *r = v;
9185 34 : return NDR_ERR_SUCCESS;
9186 : }
9187 :
9188 0 : _PUBLIC_ void ndr_print_netr_SendToSamType(struct ndr_print *ndr, const char *name, enum netr_SendToSamType r)
9189 : {
9190 0 : const char *val = NULL;
9191 :
9192 0 : switch (r) {
9193 0 : case SendToSamUpdatePassword: val = "SendToSamUpdatePassword"; break;
9194 0 : case SendToSamResetBadPasswordCount: val = "SendToSamResetBadPasswordCount"; break;
9195 0 : case SendToSamUpdatePasswordForward: val = "SendToSamUpdatePasswordForward"; break;
9196 0 : case SendToSamUpdateLastLogonTimestamp: val = "SendToSamUpdateLastLogonTimestamp"; break;
9197 0 : case SendToSamResetSmartCardPassword: val = "SendToSamResetSmartCardPassword"; break;
9198 : }
9199 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
9200 0 : }
9201 :
9202 34 : static enum ndr_err_code ndr_push_netr_SendToSamResetBadPasswordCount(struct ndr_push *ndr, int ndr_flags, const struct netr_SendToSamResetBadPasswordCount *r)
9203 : {
9204 34 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9205 34 : if (ndr_flags & NDR_SCALARS) {
9206 34 : NDR_CHECK(ndr_push_align(ndr, 4));
9207 34 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
9208 34 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9209 : }
9210 34 : if (ndr_flags & NDR_BUFFERS) {
9211 : }
9212 34 : return NDR_ERR_SUCCESS;
9213 : }
9214 :
9215 34 : static enum ndr_err_code ndr_pull_netr_SendToSamResetBadPasswordCount(struct ndr_pull *ndr, int ndr_flags, struct netr_SendToSamResetBadPasswordCount *r)
9216 : {
9217 34 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9218 34 : if (ndr_flags & NDR_SCALARS) {
9219 34 : NDR_CHECK(ndr_pull_align(ndr, 4));
9220 34 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
9221 34 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9222 : }
9223 34 : if (ndr_flags & NDR_BUFFERS) {
9224 : }
9225 34 : return NDR_ERR_SUCCESS;
9226 : }
9227 :
9228 0 : _PUBLIC_ void ndr_print_netr_SendToSamResetBadPasswordCount(struct ndr_print *ndr, const char *name, const struct netr_SendToSamResetBadPasswordCount *r)
9229 : {
9230 0 : ndr_print_struct(ndr, name, "netr_SendToSamResetBadPasswordCount");
9231 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9232 0 : ndr->depth++;
9233 0 : ndr_print_GUID(ndr, "guid", &r->guid);
9234 0 : ndr->depth--;
9235 : }
9236 :
9237 34 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SendToSamMessage(struct ndr_push *ndr, int ndr_flags, const union netr_SendToSamMessage *r)
9238 : {
9239 : uint32_t level;
9240 34 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9241 34 : if (ndr_flags & NDR_SCALARS) {
9242 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
9243 34 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
9244 : /* ms_union is always aligned to the largest union arm*/
9245 34 : NDR_CHECK(ndr_push_align(ndr, 4));
9246 34 : switch (level) {
9247 34 : case SendToSamResetBadPasswordCount: {
9248 34 : NDR_CHECK(ndr_push_netr_SendToSamResetBadPasswordCount(ndr, NDR_SCALARS, &r->reset_bad_password));
9249 34 : break; }
9250 :
9251 0 : default: {
9252 0 : break; }
9253 :
9254 : }
9255 0 : }
9256 34 : return NDR_ERR_SUCCESS;
9257 : }
9258 :
9259 34 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SendToSamMessage(struct ndr_pull *ndr, int ndr_flags, union netr_SendToSamMessage *r)
9260 : {
9261 : uint32_t level;
9262 34 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9263 34 : if (ndr_flags & NDR_SCALARS) {
9264 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
9265 34 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
9266 : /* ms_union is always aligned to the largest union arm*/
9267 34 : NDR_CHECK(ndr_pull_align(ndr, 4));
9268 34 : switch (level) {
9269 34 : case SendToSamResetBadPasswordCount: {
9270 34 : NDR_CHECK(ndr_pull_netr_SendToSamResetBadPasswordCount(ndr, NDR_SCALARS, &r->reset_bad_password));
9271 34 : break; }
9272 :
9273 0 : default: {
9274 0 : break; }
9275 :
9276 : }
9277 0 : }
9278 34 : return NDR_ERR_SUCCESS;
9279 : }
9280 :
9281 0 : _PUBLIC_ void ndr_print_netr_SendToSamMessage(struct ndr_print *ndr, const char *name, const union netr_SendToSamMessage *r)
9282 : {
9283 : uint32_t level;
9284 0 : level = ndr_print_steal_switch_value(ndr, r);
9285 0 : ndr_print_union(ndr, name, level, "netr_SendToSamMessage");
9286 0 : switch (level) {
9287 0 : case SendToSamResetBadPasswordCount:
9288 0 : ndr_print_netr_SendToSamResetBadPasswordCount(ndr, "reset_bad_password", &r->reset_bad_password);
9289 0 : break;
9290 :
9291 0 : default:
9292 0 : break;
9293 :
9294 : }
9295 0 : }
9296 :
9297 34 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SendToSamBase(struct ndr_push *ndr, int ndr_flags, const struct netr_SendToSamBase *r)
9298 : {
9299 34 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9300 34 : if (ndr_flags & NDR_SCALARS) {
9301 34 : NDR_CHECK(ndr_push_align(ndr, 4));
9302 34 : NDR_CHECK(ndr_push_netr_SendToSamType(ndr, NDR_SCALARS, r->message_type));
9303 34 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_size));
9304 : {
9305 : struct ndr_push *_ndr_message;
9306 34 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_message, 0, r->message_size));
9307 34 : NDR_CHECK(ndr_push_set_switch_value(_ndr_message, &r->message, r->message_type));
9308 34 : NDR_CHECK(ndr_push_netr_SendToSamMessage(_ndr_message, NDR_SCALARS|NDR_BUFFERS, &r->message));
9309 34 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_message, 0, r->message_size));
9310 : }
9311 34 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9312 : }
9313 34 : if (ndr_flags & NDR_BUFFERS) {
9314 : }
9315 34 : return NDR_ERR_SUCCESS;
9316 : }
9317 :
9318 34 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SendToSamBase(struct ndr_pull *ndr, int ndr_flags, struct netr_SendToSamBase *r)
9319 : {
9320 34 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9321 34 : if (ndr_flags & NDR_SCALARS) {
9322 34 : NDR_CHECK(ndr_pull_align(ndr, 4));
9323 34 : NDR_CHECK(ndr_pull_netr_SendToSamType(ndr, NDR_SCALARS, &r->message_type));
9324 34 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_size));
9325 : {
9326 : struct ndr_pull *_ndr_message;
9327 34 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_message, 0, r->message_size));
9328 34 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_message, &r->message, r->message_type));
9329 34 : NDR_CHECK(ndr_pull_netr_SendToSamMessage(_ndr_message, NDR_SCALARS|NDR_BUFFERS, &r->message));
9330 34 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_message, 0, r->message_size));
9331 : }
9332 34 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9333 : }
9334 34 : if (ndr_flags & NDR_BUFFERS) {
9335 : }
9336 34 : return NDR_ERR_SUCCESS;
9337 : }
9338 :
9339 0 : static void ndr_print_flags_netr_SendToSamBase(struct ndr_print *ndr, const char *name, int unused, const struct netr_SendToSamBase *r)
9340 : {
9341 0 : ndr_print_netr_SendToSamBase(ndr, name, r);
9342 0 : }
9343 :
9344 0 : _PUBLIC_ void ndr_print_netr_SendToSamBase(struct ndr_print *ndr, const char *name, const struct netr_SendToSamBase *r)
9345 : {
9346 0 : ndr_print_struct(ndr, name, "netr_SendToSamBase");
9347 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9348 0 : ndr->depth++;
9349 0 : ndr_print_netr_SendToSamType(ndr, "message_type", r->message_type);
9350 0 : ndr_print_uint32(ndr, "message_size", r->message_size);
9351 0 : ndr_print_set_switch_value(ndr, &r->message, r->message_type);
9352 0 : ndr_print_netr_SendToSamMessage(ndr, "message", &r->message);
9353 0 : ndr->depth--;
9354 : }
9355 :
9356 45 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesWCtr(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRAddressToSitenamesWCtr *r)
9357 : {
9358 : uint32_t cntr_sitename_1;
9359 45 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9360 45 : if (ndr_flags & NDR_SCALARS) {
9361 45 : NDR_CHECK(ndr_push_align(ndr, 5));
9362 45 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
9363 45 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
9364 45 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9365 : }
9366 45 : if (ndr_flags & NDR_BUFFERS) {
9367 45 : if (r->sitename) {
9368 45 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
9369 315 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9370 270 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
9371 : }
9372 315 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9373 270 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
9374 : }
9375 : }
9376 : }
9377 45 : return NDR_ERR_SUCCESS;
9378 : }
9379 :
9380 36 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesWCtr(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRAddressToSitenamesWCtr *r)
9381 : {
9382 : uint32_t _ptr_sitename;
9383 36 : uint32_t size_sitename_1 = 0;
9384 : uint32_t cntr_sitename_1;
9385 36 : TALLOC_CTX *_mem_save_sitename_0 = NULL;
9386 36 : TALLOC_CTX *_mem_save_sitename_1 = NULL;
9387 36 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9388 36 : if (ndr_flags & NDR_SCALARS) {
9389 36 : NDR_CHECK(ndr_pull_align(ndr, 5));
9390 36 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
9391 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename));
9392 36 : if (_ptr_sitename) {
9393 36 : NDR_PULL_ALLOC(ndr, r->sitename);
9394 : } else {
9395 0 : r->sitename = NULL;
9396 : }
9397 36 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9398 : }
9399 36 : if (ndr_flags & NDR_BUFFERS) {
9400 36 : if (r->sitename) {
9401 36 : _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr);
9402 36 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
9403 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename));
9404 36 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sitename, &size_sitename_1));
9405 36 : NDR_PULL_ALLOC_N(ndr, r->sitename, size_sitename_1);
9406 36 : _mem_save_sitename_1 = NDR_PULL_GET_MEM_CTX(ndr);
9407 36 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
9408 252 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9409 216 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
9410 : }
9411 252 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9412 216 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
9413 : }
9414 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_1, 0);
9415 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0);
9416 : }
9417 36 : if (r->sitename) {
9418 36 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sitename, r->count));
9419 : }
9420 36 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9421 : }
9422 : }
9423 36 : return NDR_ERR_SUCCESS;
9424 : }
9425 :
9426 18 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r)
9427 : {
9428 : uint32_t cntr_sitename_1;
9429 18 : ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesWCtr");
9430 18 : if (r == NULL) { ndr_print_null(ndr); return; }
9431 18 : ndr->depth++;
9432 18 : ndr_print_uint32(ndr, "count", r->count);
9433 18 : ndr_print_ptr(ndr, "sitename", r->sitename);
9434 18 : ndr->depth++;
9435 18 : if (r->sitename) {
9436 18 : ndr->print(ndr, "%s: ARRAY(%d)", "sitename", (int)r->count);
9437 18 : ndr->depth++;
9438 126 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9439 108 : ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
9440 : }
9441 18 : ndr->depth--;
9442 : }
9443 18 : ndr->depth--;
9444 18 : ndr->depth--;
9445 : }
9446 :
9447 864 : static enum ndr_err_code ndr_push_netr_DsRAddress(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRAddress *r)
9448 : {
9449 864 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9450 864 : if (ndr_flags & NDR_SCALARS) {
9451 432 : NDR_CHECK(ndr_push_align(ndr, 5));
9452 432 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer));
9453 432 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
9454 432 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9455 : }
9456 864 : if (ndr_flags & NDR_BUFFERS) {
9457 432 : if (r->buffer) {
9458 432 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
9459 432 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->size));
9460 : }
9461 : }
9462 864 : return NDR_ERR_SUCCESS;
9463 : }
9464 :
9465 864 : static enum ndr_err_code ndr_pull_netr_DsRAddress(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRAddress *r)
9466 : {
9467 : uint32_t _ptr_buffer;
9468 864 : uint32_t size_buffer_1 = 0;
9469 864 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
9470 864 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9471 864 : if (ndr_flags & NDR_SCALARS) {
9472 432 : NDR_CHECK(ndr_pull_align(ndr, 5));
9473 432 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
9474 432 : if (_ptr_buffer) {
9475 432 : NDR_PULL_ALLOC(ndr, r->buffer);
9476 : } else {
9477 0 : r->buffer = NULL;
9478 : }
9479 432 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
9480 432 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9481 : }
9482 864 : if (ndr_flags & NDR_BUFFERS) {
9483 432 : if (r->buffer) {
9484 432 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9485 432 : NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0);
9486 432 : NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer));
9487 432 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->buffer, &size_buffer_1));
9488 432 : NDR_PULL_ALLOC_N(ndr, r->buffer, size_buffer_1);
9489 432 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, size_buffer_1));
9490 432 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
9491 : }
9492 432 : if (r->buffer) {
9493 432 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->buffer, r->size));
9494 : }
9495 : }
9496 864 : return NDR_ERR_SUCCESS;
9497 : }
9498 :
9499 0 : _PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r)
9500 : {
9501 0 : ndr_print_struct(ndr, name, "netr_DsRAddress");
9502 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9503 0 : ndr->depth++;
9504 0 : ndr_print_ptr(ndr, "buffer", r->buffer);
9505 0 : ndr->depth++;
9506 0 : if (r->buffer) {
9507 0 : ndr_print_array_uint8(ndr, "buffer", r->buffer, r->size);
9508 : }
9509 0 : ndr->depth--;
9510 0 : ndr_print_uint32(ndr, "size", r->size);
9511 0 : ndr->depth--;
9512 : }
9513 :
9514 162 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DomainTrust(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrust *r)
9515 : {
9516 162 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9517 162 : if (ndr_flags & NDR_SCALARS) {
9518 81 : NDR_CHECK(ndr_push_align(ndr, 5));
9519 81 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
9520 81 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
9521 81 : NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->trust_flags));
9522 81 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index));
9523 81 : NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
9524 81 : NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
9525 81 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
9526 81 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
9527 81 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9528 : }
9529 162 : if (ndr_flags & NDR_BUFFERS) {
9530 81 : if (r->netbios_name) {
9531 81 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
9532 81 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9533 81 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
9534 81 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9535 : }
9536 81 : if (r->dns_name) {
9537 81 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
9538 81 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9539 81 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
9540 81 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9541 : }
9542 81 : if (r->sid) {
9543 81 : NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
9544 : }
9545 : }
9546 162 : return NDR_ERR_SUCCESS;
9547 : }
9548 :
9549 132 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DomainTrust(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainTrust *r)
9550 : {
9551 : uint32_t _ptr_netbios_name;
9552 132 : uint32_t size_netbios_name_1 = 0;
9553 132 : uint32_t length_netbios_name_1 = 0;
9554 132 : TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
9555 : uint32_t _ptr_dns_name;
9556 132 : uint32_t size_dns_name_1 = 0;
9557 132 : uint32_t length_dns_name_1 = 0;
9558 132 : TALLOC_CTX *_mem_save_dns_name_0 = NULL;
9559 : uint32_t _ptr_sid;
9560 132 : TALLOC_CTX *_mem_save_sid_0 = NULL;
9561 132 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9562 132 : if (ndr_flags & NDR_SCALARS) {
9563 66 : NDR_CHECK(ndr_pull_align(ndr, 5));
9564 66 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
9565 66 : if (_ptr_netbios_name) {
9566 66 : NDR_PULL_ALLOC(ndr, r->netbios_name);
9567 : } else {
9568 0 : r->netbios_name = NULL;
9569 : }
9570 66 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
9571 66 : if (_ptr_dns_name) {
9572 66 : NDR_PULL_ALLOC(ndr, r->dns_name);
9573 : } else {
9574 0 : r->dns_name = NULL;
9575 : }
9576 66 : NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->trust_flags));
9577 66 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index));
9578 66 : NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
9579 66 : NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
9580 66 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
9581 66 : if (_ptr_sid) {
9582 66 : NDR_PULL_ALLOC(ndr, r->sid);
9583 : } else {
9584 0 : r->sid = NULL;
9585 : }
9586 66 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
9587 66 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9588 : }
9589 132 : if (ndr_flags & NDR_BUFFERS) {
9590 66 : if (r->netbios_name) {
9591 66 : _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9592 66 : NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
9593 66 : NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
9594 66 : NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
9595 66 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
9596 66 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
9597 66 : if (length_netbios_name_1 > size_netbios_name_1) {
9598 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_netbios_name_1, length_netbios_name_1);
9599 : }
9600 66 : NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
9601 66 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
9602 66 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
9603 : }
9604 66 : if (r->dns_name) {
9605 66 : _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9606 66 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
9607 66 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
9608 66 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
9609 66 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
9610 66 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
9611 66 : if (length_dns_name_1 > size_dns_name_1) {
9612 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_name_1, length_dns_name_1);
9613 : }
9614 66 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
9615 66 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
9616 66 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
9617 : }
9618 66 : if (r->sid) {
9619 66 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9620 66 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
9621 66 : NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
9622 66 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
9623 : }
9624 : }
9625 132 : return NDR_ERR_SUCCESS;
9626 : }
9627 :
9628 0 : static void ndr_print_flags_netr_DomainTrust(struct ndr_print *ndr, const char *name, int unused, const struct netr_DomainTrust *r)
9629 : {
9630 0 : ndr_print_netr_DomainTrust(ndr, name, r);
9631 0 : }
9632 :
9633 6 : _PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r)
9634 : {
9635 6 : ndr_print_struct(ndr, name, "netr_DomainTrust");
9636 6 : if (r == NULL) { ndr_print_null(ndr); return; }
9637 6 : ndr->depth++;
9638 6 : ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
9639 6 : ndr->depth++;
9640 6 : if (r->netbios_name) {
9641 6 : ndr_print_string(ndr, "netbios_name", r->netbios_name);
9642 : }
9643 6 : ndr->depth--;
9644 6 : ndr_print_ptr(ndr, "dns_name", r->dns_name);
9645 6 : ndr->depth++;
9646 6 : if (r->dns_name) {
9647 6 : ndr_print_string(ndr, "dns_name", r->dns_name);
9648 : }
9649 6 : ndr->depth--;
9650 6 : ndr_print_netr_TrustFlags(ndr, "trust_flags", r->trust_flags);
9651 6 : ndr_print_uint32(ndr, "parent_index", r->parent_index);
9652 6 : ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
9653 6 : ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
9654 6 : ndr_print_ptr(ndr, "sid", r->sid);
9655 6 : ndr->depth++;
9656 6 : if (r->sid) {
9657 6 : ndr_print_dom_sid2(ndr, "sid", r->sid);
9658 : }
9659 6 : ndr->depth--;
9660 6 : ndr_print_GUID(ndr, "guid", &r->guid);
9661 6 : ndr->depth--;
9662 : }
9663 :
9664 45 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DomainTrustList(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrustList *r)
9665 : {
9666 : uint32_t cntr_array_1;
9667 45 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9668 45 : if (ndr_flags & NDR_SCALARS) {
9669 45 : NDR_CHECK(ndr_push_align(ndr, 5));
9670 45 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
9671 45 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
9672 45 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9673 : }
9674 45 : if (ndr_flags & NDR_BUFFERS) {
9675 45 : if (r->array) {
9676 45 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
9677 126 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
9678 81 : NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
9679 : }
9680 126 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
9681 81 : NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
9682 : }
9683 : }
9684 : }
9685 45 : return NDR_ERR_SUCCESS;
9686 : }
9687 :
9688 38 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DomainTrustList(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainTrustList *r)
9689 : {
9690 : uint32_t _ptr_array;
9691 38 : uint32_t size_array_1 = 0;
9692 : uint32_t cntr_array_1;
9693 38 : TALLOC_CTX *_mem_save_array_0 = NULL;
9694 38 : TALLOC_CTX *_mem_save_array_1 = NULL;
9695 38 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9696 38 : if (ndr_flags & NDR_SCALARS) {
9697 38 : NDR_CHECK(ndr_pull_align(ndr, 5));
9698 38 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
9699 38 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
9700 38 : if (_ptr_array) {
9701 38 : NDR_PULL_ALLOC(ndr, r->array);
9702 : } else {
9703 0 : r->array = NULL;
9704 : }
9705 38 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9706 : }
9707 38 : if (ndr_flags & NDR_BUFFERS) {
9708 38 : if (r->array) {
9709 38 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
9710 38 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
9711 38 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
9712 38 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
9713 38 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
9714 38 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
9715 38 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
9716 104 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
9717 66 : NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
9718 : }
9719 104 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
9720 66 : NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
9721 : }
9722 38 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
9723 38 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
9724 : }
9725 38 : if (r->array) {
9726 38 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
9727 : }
9728 63 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
9729 : }
9730 : }
9731 38 : return NDR_ERR_SUCCESS;
9732 : }
9733 :
9734 0 : static void ndr_print_flags_netr_DomainTrustList(struct ndr_print *ndr, const char *name, int unused, const struct netr_DomainTrustList *r)
9735 : {
9736 0 : ndr_print_netr_DomainTrustList(ndr, name, r);
9737 0 : }
9738 :
9739 6 : _PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustList *r)
9740 : {
9741 : uint32_t cntr_array_1;
9742 6 : ndr_print_struct(ndr, name, "netr_DomainTrustList");
9743 6 : if (r == NULL) { ndr_print_null(ndr); return; }
9744 6 : ndr->depth++;
9745 6 : ndr_print_uint32(ndr, "count", r->count);
9746 6 : ndr_print_ptr(ndr, "array", r->array);
9747 6 : ndr->depth++;
9748 6 : if (r->array) {
9749 6 : ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
9750 6 : ndr->depth++;
9751 12 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
9752 6 : ndr_print_netr_DomainTrust(ndr, "array", &r->array[cntr_array_1]);
9753 : }
9754 6 : ndr->depth--;
9755 : }
9756 6 : ndr->depth--;
9757 6 : ndr->depth--;
9758 : }
9759 :
9760 45 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExWCtr(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRAddressToSitenamesExWCtr *r)
9761 : {
9762 : uint32_t cntr_sitename_1;
9763 : uint32_t cntr_subnetname_1;
9764 45 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9765 45 : if (ndr_flags & NDR_SCALARS) {
9766 45 : NDR_CHECK(ndr_push_align(ndr, 5));
9767 45 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
9768 45 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
9769 45 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->subnetname));
9770 45 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9771 : }
9772 45 : if (ndr_flags & NDR_BUFFERS) {
9773 45 : if (r->sitename) {
9774 45 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
9775 315 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9776 270 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
9777 : }
9778 315 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9779 270 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
9780 : }
9781 : }
9782 45 : if (r->subnetname) {
9783 45 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
9784 315 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (r->count); cntr_subnetname_1++) {
9785 270 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->subnetname[cntr_subnetname_1]));
9786 : }
9787 315 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (r->count); cntr_subnetname_1++) {
9788 270 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->subnetname[cntr_subnetname_1]));
9789 : }
9790 : }
9791 : }
9792 45 : return NDR_ERR_SUCCESS;
9793 : }
9794 :
9795 36 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExWCtr(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRAddressToSitenamesExWCtr *r)
9796 : {
9797 : uint32_t _ptr_sitename;
9798 36 : uint32_t size_sitename_1 = 0;
9799 : uint32_t cntr_sitename_1;
9800 36 : TALLOC_CTX *_mem_save_sitename_0 = NULL;
9801 36 : TALLOC_CTX *_mem_save_sitename_1 = NULL;
9802 : uint32_t _ptr_subnetname;
9803 36 : uint32_t size_subnetname_1 = 0;
9804 : uint32_t cntr_subnetname_1;
9805 36 : TALLOC_CTX *_mem_save_subnetname_0 = NULL;
9806 36 : TALLOC_CTX *_mem_save_subnetname_1 = NULL;
9807 36 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9808 36 : if (ndr_flags & NDR_SCALARS) {
9809 36 : NDR_CHECK(ndr_pull_align(ndr, 5));
9810 36 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
9811 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename));
9812 36 : if (_ptr_sitename) {
9813 36 : NDR_PULL_ALLOC(ndr, r->sitename);
9814 : } else {
9815 0 : r->sitename = NULL;
9816 : }
9817 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_subnetname));
9818 36 : if (_ptr_subnetname) {
9819 36 : NDR_PULL_ALLOC(ndr, r->subnetname);
9820 : } else {
9821 0 : r->subnetname = NULL;
9822 : }
9823 36 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9824 : }
9825 36 : if (ndr_flags & NDR_BUFFERS) {
9826 36 : if (r->sitename) {
9827 36 : _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr);
9828 36 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
9829 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename));
9830 36 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sitename, &size_sitename_1));
9831 36 : NDR_PULL_ALLOC_N(ndr, r->sitename, size_sitename_1);
9832 36 : _mem_save_sitename_1 = NDR_PULL_GET_MEM_CTX(ndr);
9833 36 : NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
9834 252 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9835 216 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
9836 : }
9837 252 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9838 216 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
9839 : }
9840 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_1, 0);
9841 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0);
9842 : }
9843 36 : if (r->subnetname) {
9844 36 : _mem_save_subnetname_0 = NDR_PULL_GET_MEM_CTX(ndr);
9845 36 : NDR_PULL_SET_MEM_CTX(ndr, r->subnetname, 0);
9846 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->subnetname));
9847 36 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->subnetname, &size_subnetname_1));
9848 36 : NDR_PULL_ALLOC_N(ndr, r->subnetname, size_subnetname_1);
9849 36 : _mem_save_subnetname_1 = NDR_PULL_GET_MEM_CTX(ndr);
9850 36 : NDR_PULL_SET_MEM_CTX(ndr, r->subnetname, 0);
9851 252 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (size_subnetname_1); cntr_subnetname_1++) {
9852 216 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->subnetname[cntr_subnetname_1]));
9853 : }
9854 252 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (size_subnetname_1); cntr_subnetname_1++) {
9855 216 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->subnetname[cntr_subnetname_1]));
9856 : }
9857 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subnetname_1, 0);
9858 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subnetname_0, 0);
9859 : }
9860 36 : if (r->sitename) {
9861 36 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sitename, r->count));
9862 : }
9863 36 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
9864 : }
9865 36 : if (r->subnetname) {
9866 36 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->subnetname, r->count));
9867 : }
9868 36 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (size_subnetname_1); cntr_subnetname_1++) {
9869 : }
9870 : }
9871 36 : return NDR_ERR_SUCCESS;
9872 : }
9873 :
9874 18 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesExWCtr *r)
9875 : {
9876 : uint32_t cntr_sitename_1;
9877 : uint32_t cntr_subnetname_1;
9878 18 : ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesExWCtr");
9879 18 : if (r == NULL) { ndr_print_null(ndr); return; }
9880 18 : ndr->depth++;
9881 18 : ndr_print_uint32(ndr, "count", r->count);
9882 18 : ndr_print_ptr(ndr, "sitename", r->sitename);
9883 18 : ndr->depth++;
9884 18 : if (r->sitename) {
9885 18 : ndr->print(ndr, "%s: ARRAY(%d)", "sitename", (int)r->count);
9886 18 : ndr->depth++;
9887 126 : for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
9888 108 : ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
9889 : }
9890 18 : ndr->depth--;
9891 : }
9892 18 : ndr->depth--;
9893 18 : ndr_print_ptr(ndr, "subnetname", r->subnetname);
9894 18 : ndr->depth++;
9895 18 : if (r->subnetname) {
9896 18 : ndr->print(ndr, "%s: ARRAY(%d)", "subnetname", (int)r->count);
9897 18 : ndr->depth++;
9898 126 : for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (r->count); cntr_subnetname_1++) {
9899 108 : ndr_print_lsa_String(ndr, "subnetname", &r->subnetname[cntr_subnetname_1]);
9900 : }
9901 18 : ndr->depth--;
9902 : }
9903 18 : ndr->depth--;
9904 18 : ndr->depth--;
9905 : }
9906 :
9907 20 : static enum ndr_err_code ndr_push_DcSitesCtr(struct ndr_push *ndr, int ndr_flags, const struct DcSitesCtr *r)
9908 : {
9909 : uint32_t cntr_sites_1;
9910 20 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9911 20 : if (ndr_flags & NDR_SCALARS) {
9912 20 : NDR_CHECK(ndr_push_align(ndr, 5));
9913 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sites));
9914 20 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sites));
9915 20 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
9916 : }
9917 20 : if (ndr_flags & NDR_BUFFERS) {
9918 20 : if (r->sites) {
9919 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sites));
9920 40 : for (cntr_sites_1 = 0; cntr_sites_1 < (r->num_sites); cntr_sites_1++) {
9921 20 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sites[cntr_sites_1]));
9922 : }
9923 40 : for (cntr_sites_1 = 0; cntr_sites_1 < (r->num_sites); cntr_sites_1++) {
9924 20 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sites[cntr_sites_1]));
9925 : }
9926 : }
9927 : }
9928 20 : return NDR_ERR_SUCCESS;
9929 : }
9930 :
9931 17 : static enum ndr_err_code ndr_pull_DcSitesCtr(struct ndr_pull *ndr, int ndr_flags, struct DcSitesCtr *r)
9932 : {
9933 : uint32_t _ptr_sites;
9934 17 : uint32_t size_sites_1 = 0;
9935 : uint32_t cntr_sites_1;
9936 17 : TALLOC_CTX *_mem_save_sites_0 = NULL;
9937 17 : TALLOC_CTX *_mem_save_sites_1 = NULL;
9938 17 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
9939 17 : if (ndr_flags & NDR_SCALARS) {
9940 17 : NDR_CHECK(ndr_pull_align(ndr, 5));
9941 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sites));
9942 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sites));
9943 17 : if (_ptr_sites) {
9944 17 : NDR_PULL_ALLOC(ndr, r->sites);
9945 : } else {
9946 0 : r->sites = NULL;
9947 : }
9948 17 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
9949 : }
9950 17 : if (ndr_flags & NDR_BUFFERS) {
9951 17 : if (r->sites) {
9952 17 : _mem_save_sites_0 = NDR_PULL_GET_MEM_CTX(ndr);
9953 17 : NDR_PULL_SET_MEM_CTX(ndr, r->sites, 0);
9954 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sites));
9955 17 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sites, &size_sites_1));
9956 17 : NDR_PULL_ALLOC_N(ndr, r->sites, size_sites_1);
9957 17 : _mem_save_sites_1 = NDR_PULL_GET_MEM_CTX(ndr);
9958 17 : NDR_PULL_SET_MEM_CTX(ndr, r->sites, 0);
9959 34 : for (cntr_sites_1 = 0; cntr_sites_1 < (size_sites_1); cntr_sites_1++) {
9960 17 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sites[cntr_sites_1]));
9961 : }
9962 34 : for (cntr_sites_1 = 0; cntr_sites_1 < (size_sites_1); cntr_sites_1++) {
9963 17 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sites[cntr_sites_1]));
9964 : }
9965 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sites_1, 0);
9966 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sites_0, 0);
9967 : }
9968 17 : if (r->sites) {
9969 17 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sites, r->num_sites));
9970 : }
9971 18 : for (cntr_sites_1 = 0; cntr_sites_1 < (size_sites_1); cntr_sites_1++) {
9972 : }
9973 : }
9974 17 : return NDR_ERR_SUCCESS;
9975 : }
9976 :
9977 6 : _PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, const struct DcSitesCtr *r)
9978 : {
9979 : uint32_t cntr_sites_1;
9980 6 : ndr_print_struct(ndr, name, "DcSitesCtr");
9981 6 : if (r == NULL) { ndr_print_null(ndr); return; }
9982 6 : ndr->depth++;
9983 6 : ndr_print_uint32(ndr, "num_sites", r->num_sites);
9984 6 : ndr_print_ptr(ndr, "sites", r->sites);
9985 6 : ndr->depth++;
9986 6 : if (r->sites) {
9987 6 : ndr->print(ndr, "%s: ARRAY(%d)", "sites", (int)r->num_sites);
9988 6 : ndr->depth++;
9989 12 : for (cntr_sites_1 = 0; cntr_sites_1 < (r->num_sites); cntr_sites_1++) {
9990 6 : ndr_print_lsa_String(ndr, "sites", &r->sites[cntr_sites_1]);
9991 : }
9992 6 : ndr->depth--;
9993 : }
9994 6 : ndr->depth--;
9995 6 : ndr->depth--;
9996 : }
9997 :
9998 13404 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonSamLogon_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
9999 : {
10000 13404 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
10001 13404 : return NDR_ERR_SUCCESS;
10002 : }
10003 :
10004 13074 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonSamLogon_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
10005 : {
10006 : uint32_t v;
10007 13074 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
10008 13074 : *r = v;
10009 13074 : return NDR_ERR_SUCCESS;
10010 : }
10011 :
10012 660 : _PUBLIC_ void ndr_print_netr_LogonSamLogon_flags(struct ndr_print *ndr, const char *name, uint32_t r)
10013 : {
10014 660 : ndr_print_uint32(ndr, name, r);
10015 660 : ndr->depth++;
10016 660 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT", NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT, r);
10017 660 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP", NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP, r);
10018 660 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN", NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN, r);
10019 660 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST", NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST, r);
10020 660 : ndr->depth--;
10021 660 : }
10022 :
10023 52 : static enum ndr_err_code ndr_push_netr_TrustInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_TrustInfo *r)
10024 : {
10025 : uint32_t cntr_data_1;
10026 : uint32_t cntr_entries_1;
10027 52 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10028 52 : if (ndr_flags & NDR_SCALARS) {
10029 52 : NDR_CHECK(ndr_push_align(ndr, 5));
10030 52 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
10031 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
10032 52 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entry_count));
10033 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
10034 52 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10035 : }
10036 52 : if (ndr_flags & NDR_BUFFERS) {
10037 52 : if (r->data) {
10038 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
10039 104 : for (cntr_data_1 = 0; cntr_data_1 < (r->count); cntr_data_1++) {
10040 52 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data[cntr_data_1]));
10041 : }
10042 : }
10043 52 : if (r->entries) {
10044 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
10045 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
10046 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
10047 : }
10048 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
10049 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
10050 : }
10051 : }
10052 : }
10053 52 : return NDR_ERR_SUCCESS;
10054 : }
10055 :
10056 4 : static enum ndr_err_code ndr_pull_netr_TrustInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_TrustInfo *r)
10057 : {
10058 : uint32_t _ptr_data;
10059 4 : uint32_t size_data_1 = 0;
10060 : uint32_t cntr_data_1;
10061 4 : TALLOC_CTX *_mem_save_data_0 = NULL;
10062 4 : TALLOC_CTX *_mem_save_data_1 = NULL;
10063 : uint32_t _ptr_entries;
10064 4 : uint32_t size_entries_1 = 0;
10065 : uint32_t cntr_entries_1;
10066 4 : TALLOC_CTX *_mem_save_entries_0 = NULL;
10067 4 : TALLOC_CTX *_mem_save_entries_1 = NULL;
10068 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10069 4 : if (ndr_flags & NDR_SCALARS) {
10070 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
10071 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
10072 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
10073 4 : if (_ptr_data) {
10074 4 : NDR_PULL_ALLOC(ndr, r->data);
10075 : } else {
10076 0 : r->data = NULL;
10077 : }
10078 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entry_count));
10079 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
10080 4 : if (_ptr_entries) {
10081 0 : NDR_PULL_ALLOC(ndr, r->entries);
10082 : } else {
10083 4 : r->entries = NULL;
10084 : }
10085 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10086 : }
10087 4 : if (ndr_flags & NDR_BUFFERS) {
10088 4 : if (r->data) {
10089 4 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
10090 4 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
10091 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
10092 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
10093 4 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
10094 4 : _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
10095 4 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
10096 8 : for (cntr_data_1 = 0; cntr_data_1 < (size_data_1); cntr_data_1++) {
10097 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data[cntr_data_1]));
10098 : }
10099 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
10100 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
10101 : }
10102 4 : if (r->entries) {
10103 0 : _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
10104 0 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
10105 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
10106 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
10107 0 : NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
10108 0 : _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
10109 0 : NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
10110 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
10111 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
10112 : }
10113 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
10114 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
10115 : }
10116 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
10117 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
10118 : }
10119 4 : if (r->data) {
10120 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->count));
10121 : }
10122 4 : if (r->entries) {
10123 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
10124 : }
10125 4 : for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
10126 : }
10127 : }
10128 4 : return NDR_ERR_SUCCESS;
10129 : }
10130 :
10131 2 : _PUBLIC_ void ndr_print_netr_TrustInfo(struct ndr_print *ndr, const char *name, const struct netr_TrustInfo *r)
10132 : {
10133 : uint32_t cntr_data_1;
10134 : uint32_t cntr_entries_1;
10135 2 : ndr_print_struct(ndr, name, "netr_TrustInfo");
10136 2 : if (r == NULL) { ndr_print_null(ndr); return; }
10137 2 : ndr->depth++;
10138 2 : ndr_print_uint32(ndr, "count", r->count);
10139 2 : ndr_print_ptr(ndr, "data", r->data);
10140 2 : ndr->depth++;
10141 2 : if (r->data) {
10142 2 : ndr->print(ndr, "%s: ARRAY(%d)", "data", (int)r->count);
10143 2 : ndr->depth++;
10144 4 : for (cntr_data_1 = 0; cntr_data_1 < (r->count); cntr_data_1++) {
10145 2 : ndr_print_uint32(ndr, "data", r->data[cntr_data_1]);
10146 : }
10147 2 : ndr->depth--;
10148 : }
10149 2 : ndr->depth--;
10150 2 : ndr_print_uint32(ndr, "entry_count", r->entry_count);
10151 2 : ndr_print_ptr(ndr, "entries", r->entries);
10152 2 : ndr->depth++;
10153 2 : if (r->entries) {
10154 0 : ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
10155 0 : ndr->depth++;
10156 0 : for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
10157 0 : ndr_print_lsa_String(ndr, "entries", &r->entries[cntr_entries_1]);
10158 : }
10159 0 : ndr->depth--;
10160 : }
10161 2 : ndr->depth--;
10162 2 : ndr->depth--;
10163 : }
10164 :
10165 24 : static enum ndr_err_code ndr_push_netr_DnsType(struct ndr_push *ndr, int ndr_flags, enum netr_DnsType r)
10166 : {
10167 24 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
10168 24 : return NDR_ERR_SUCCESS;
10169 : }
10170 :
10171 24 : static enum ndr_err_code ndr_pull_netr_DnsType(struct ndr_pull *ndr, int ndr_flags, enum netr_DnsType *r)
10172 : {
10173 : uint16_t v;
10174 24 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
10175 24 : *r = v;
10176 24 : return NDR_ERR_SUCCESS;
10177 : }
10178 :
10179 0 : _PUBLIC_ void ndr_print_netr_DnsType(struct ndr_print *ndr, const char *name, enum netr_DnsType r)
10180 : {
10181 0 : const char *val = NULL;
10182 :
10183 0 : switch (r) {
10184 0 : case NlDnsLdapAtSite: val = "NlDnsLdapAtSite"; break;
10185 0 : case NlDnsGcAtSite: val = "NlDnsGcAtSite"; break;
10186 0 : case NlDnsDsaCname: val = "NlDnsDsaCname"; break;
10187 0 : case NlDnsKdcAtSite: val = "NlDnsKdcAtSite"; break;
10188 0 : case NlDnsDcAtSite: val = "NlDnsDcAtSite"; break;
10189 0 : case NlDnsRfc1510KdcAtSite: val = "NlDnsRfc1510KdcAtSite"; break;
10190 0 : case NlDnsGenericGcAtSite: val = "NlDnsGenericGcAtSite"; break;
10191 : }
10192 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
10193 0 : }
10194 :
10195 24 : static enum ndr_err_code ndr_push_netr_DnsDomainInfoType(struct ndr_push *ndr, int ndr_flags, enum netr_DnsDomainInfoType r)
10196 : {
10197 24 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
10198 24 : return NDR_ERR_SUCCESS;
10199 : }
10200 :
10201 24 : static enum ndr_err_code ndr_pull_netr_DnsDomainInfoType(struct ndr_pull *ndr, int ndr_flags, enum netr_DnsDomainInfoType *r)
10202 : {
10203 : uint16_t v;
10204 24 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
10205 24 : *r = v;
10206 24 : return NDR_ERR_SUCCESS;
10207 : }
10208 :
10209 0 : _PUBLIC_ void ndr_print_netr_DnsDomainInfoType(struct ndr_print *ndr, const char *name, enum netr_DnsDomainInfoType r)
10210 : {
10211 0 : const char *val = NULL;
10212 :
10213 0 : switch (r) {
10214 0 : case NlDnsInfoTypeNone: val = "NlDnsInfoTypeNone"; break;
10215 0 : case NlDnsDomainName: val = "NlDnsDomainName"; break;
10216 0 : case NlDnsDomainNameAlias: val = "NlDnsDomainNameAlias"; break;
10217 0 : case NlDnsForestName: val = "NlDnsForestName"; break;
10218 0 : case NlDnsForestNameAlias: val = "NlDnsForestNameAlias"; break;
10219 0 : case NlDnsNdncDomainName: val = "NlDnsNdncDomainName"; break;
10220 0 : case NlDnsRecordName: val = "NlDnsRecordName"; break;
10221 : }
10222 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
10223 0 : }
10224 :
10225 48 : static enum ndr_err_code ndr_push_NL_DNS_NAME_INFO(struct ndr_push *ndr, int ndr_flags, const struct NL_DNS_NAME_INFO *r)
10226 : {
10227 48 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10228 48 : if (ndr_flags & NDR_SCALARS) {
10229 24 : NDR_CHECK(ndr_push_align(ndr, 5));
10230 24 : NDR_CHECK(ndr_push_netr_DnsType(ndr, NDR_SCALARS, r->type));
10231 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain_info));
10232 24 : NDR_CHECK(ndr_push_netr_DnsDomainInfoType(ndr, NDR_SCALARS, r->dns_domain_info_type));
10233 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
10234 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weight));
10235 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port));
10236 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dns_register));
10237 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
10238 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10239 : }
10240 48 : if (ndr_flags & NDR_BUFFERS) {
10241 24 : if (r->dns_domain_info) {
10242 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_info, CH_UTF16)));
10243 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10244 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_info, CH_UTF16)));
10245 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));
10246 : }
10247 : }
10248 48 : return NDR_ERR_SUCCESS;
10249 : }
10250 :
10251 48 : static enum ndr_err_code ndr_pull_NL_DNS_NAME_INFO(struct ndr_pull *ndr, int ndr_flags, struct NL_DNS_NAME_INFO *r)
10252 : {
10253 : uint32_t _ptr_dns_domain_info;
10254 48 : uint32_t size_dns_domain_info_1 = 0;
10255 48 : uint32_t length_dns_domain_info_1 = 0;
10256 48 : TALLOC_CTX *_mem_save_dns_domain_info_0 = NULL;
10257 48 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10258 48 : if (ndr_flags & NDR_SCALARS) {
10259 24 : NDR_CHECK(ndr_pull_align(ndr, 5));
10260 24 : NDR_CHECK(ndr_pull_netr_DnsType(ndr, NDR_SCALARS, &r->type));
10261 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain_info));
10262 24 : if (_ptr_dns_domain_info) {
10263 0 : NDR_PULL_ALLOC(ndr, r->dns_domain_info);
10264 : } else {
10265 24 : r->dns_domain_info = NULL;
10266 : }
10267 24 : NDR_CHECK(ndr_pull_netr_DnsDomainInfoType(ndr, NDR_SCALARS, &r->dns_domain_info_type));
10268 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
10269 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weight));
10270 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port));
10271 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dns_register));
10272 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
10273 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10274 : }
10275 48 : if (ndr_flags & NDR_BUFFERS) {
10276 24 : if (r->dns_domain_info) {
10277 0 : _mem_save_dns_domain_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10278 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain_info, 0);
10279 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain_info));
10280 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain_info));
10281 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_domain_info, &size_dns_domain_info_1));
10282 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_domain_info, &length_dns_domain_info_1));
10283 0 : if (length_dns_domain_info_1 > size_dns_domain_info_1) {
10284 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_domain_info_1, length_dns_domain_info_1);
10285 : }
10286 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_domain_info_1, sizeof(uint16_t)));
10287 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain_info, length_dns_domain_info_1, sizeof(uint16_t), CH_UTF16));
10288 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_info_0, 0);
10289 : }
10290 : }
10291 48 : return NDR_ERR_SUCCESS;
10292 : }
10293 :
10294 0 : _PUBLIC_ void ndr_print_NL_DNS_NAME_INFO(struct ndr_print *ndr, const char *name, const struct NL_DNS_NAME_INFO *r)
10295 : {
10296 0 : ndr_print_struct(ndr, name, "NL_DNS_NAME_INFO");
10297 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10298 0 : ndr->depth++;
10299 0 : ndr_print_netr_DnsType(ndr, "type", r->type);
10300 0 : ndr_print_ptr(ndr, "dns_domain_info", r->dns_domain_info);
10301 0 : ndr->depth++;
10302 0 : if (r->dns_domain_info) {
10303 0 : ndr_print_string(ndr, "dns_domain_info", r->dns_domain_info);
10304 : }
10305 0 : ndr->depth--;
10306 0 : ndr_print_netr_DnsDomainInfoType(ndr, "dns_domain_info_type", r->dns_domain_info_type);
10307 0 : ndr_print_uint32(ndr, "priority", r->priority);
10308 0 : ndr_print_uint32(ndr, "weight", r->weight);
10309 0 : ndr_print_uint32(ndr, "port", r->port);
10310 0 : ndr_print_uint32(ndr, "dns_register", r->dns_register);
10311 0 : ndr_print_uint32(ndr, "status", r->status);
10312 0 : ndr->depth--;
10313 : }
10314 :
10315 24 : _PUBLIC_ enum ndr_err_code ndr_push_NL_DNS_NAME_INFO_ARRAY(struct ndr_push *ndr, int ndr_flags, const struct NL_DNS_NAME_INFO_ARRAY *r)
10316 : {
10317 : uint32_t cntr_names_1;
10318 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10319 24 : if (ndr_flags & NDR_SCALARS) {
10320 24 : NDR_CHECK(ndr_push_align(ndr, 5));
10321 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
10322 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
10323 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
10324 : }
10325 24 : if (ndr_flags & NDR_BUFFERS) {
10326 24 : if (r->names) {
10327 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
10328 48 : for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
10329 24 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
10330 : }
10331 48 : for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
10332 24 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
10333 : }
10334 : }
10335 : }
10336 24 : return NDR_ERR_SUCCESS;
10337 : }
10338 :
10339 24 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_DNS_NAME_INFO_ARRAY(struct ndr_pull *ndr, int ndr_flags, struct NL_DNS_NAME_INFO_ARRAY *r)
10340 : {
10341 : uint32_t _ptr_names;
10342 24 : uint32_t size_names_1 = 0;
10343 : uint32_t cntr_names_1;
10344 24 : TALLOC_CTX *_mem_save_names_0 = NULL;
10345 24 : TALLOC_CTX *_mem_save_names_1 = NULL;
10346 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
10347 24 : if (ndr_flags & NDR_SCALARS) {
10348 24 : NDR_CHECK(ndr_pull_align(ndr, 5));
10349 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
10350 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
10351 24 : if (_ptr_names) {
10352 24 : NDR_PULL_ALLOC(ndr, r->names);
10353 : } else {
10354 0 : r->names = NULL;
10355 : }
10356 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
10357 : }
10358 24 : if (ndr_flags & NDR_BUFFERS) {
10359 24 : if (r->names) {
10360 24 : _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10361 24 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
10362 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
10363 24 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
10364 24 : NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
10365 24 : _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
10366 24 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
10367 48 : for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
10368 24 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
10369 : }
10370 48 : for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
10371 24 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
10372 : }
10373 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
10374 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
10375 : }
10376 24 : if (r->names) {
10377 24 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
10378 : }
10379 24 : for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
10380 : }
10381 : }
10382 24 : return NDR_ERR_SUCCESS;
10383 : }
10384 :
10385 0 : static void ndr_print_flags_NL_DNS_NAME_INFO_ARRAY(struct ndr_print *ndr, const char *name, int unused, const struct NL_DNS_NAME_INFO_ARRAY *r)
10386 : {
10387 0 : ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, name, r);
10388 0 : }
10389 :
10390 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)
10391 : {
10392 : uint32_t cntr_names_1;
10393 0 : ndr_print_struct(ndr, name, "NL_DNS_NAME_INFO_ARRAY");
10394 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10395 0 : ndr->depth++;
10396 0 : ndr_print_uint32(ndr, "count", r->count);
10397 0 : ndr_print_ptr(ndr, "names", r->names);
10398 0 : ndr->depth++;
10399 0 : if (r->names) {
10400 0 : ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
10401 0 : ndr->depth++;
10402 0 : for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
10403 0 : ndr_print_NL_DNS_NAME_INFO(ndr, "names", &r->names[cntr_names_1]);
10404 : }
10405 0 : ndr->depth--;
10406 : }
10407 0 : ndr->depth--;
10408 0 : ndr->depth--;
10409 : }
10410 :
10411 12 : static enum ndr_err_code ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogon *r)
10412 : {
10413 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10414 12 : if (flags & NDR_IN) {
10415 12 : if (r->in.account_name == NULL) {
10416 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10417 : }
10418 12 : if (r->in.workstation == NULL) {
10419 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10420 : }
10421 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10422 12 : if (r->in.server_name) {
10423 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10424 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10425 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10426 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));
10427 : }
10428 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
10429 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10430 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
10431 12 : 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));
10432 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
10433 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10434 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
10435 12 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.workstation, ndr_charset_length(r->in.workstation, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10436 : }
10437 12 : if (flags & NDR_OUT) {
10438 0 : if (r->out.info == NULL) {
10439 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10440 : }
10441 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10442 0 : if (*r->out.info) {
10443 0 : NDR_CHECK(ndr_push_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10444 : }
10445 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10446 : }
10447 12 : return NDR_ERR_SUCCESS;
10448 : }
10449 :
10450 12 : static enum ndr_err_code ndr_pull_netr_LogonUasLogon(struct ndr_pull *ndr, int flags, struct netr_LogonUasLogon *r)
10451 : {
10452 : uint32_t _ptr_server_name;
10453 12 : uint32_t size_server_name_1 = 0;
10454 12 : uint32_t length_server_name_1 = 0;
10455 12 : uint32_t size_account_name_1 = 0;
10456 12 : uint32_t length_account_name_1 = 0;
10457 12 : uint32_t size_workstation_1 = 0;
10458 12 : uint32_t length_workstation_1 = 0;
10459 : uint32_t _ptr_info;
10460 12 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10461 12 : TALLOC_CTX *_mem_save_info_0 = NULL;
10462 12 : TALLOC_CTX *_mem_save_info_1 = NULL;
10463 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10464 12 : if (flags & NDR_IN) {
10465 12 : NDR_ZERO_STRUCT(r->out);
10466 :
10467 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10468 12 : if (_ptr_server_name) {
10469 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10470 : } else {
10471 12 : r->in.server_name = NULL;
10472 : }
10473 12 : if (r->in.server_name) {
10474 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10475 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10476 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10477 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10478 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10479 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10480 0 : if (length_server_name_1 > size_server_name_1) {
10481 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
10482 : }
10483 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10484 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10485 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10486 : }
10487 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
10488 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
10489 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
10490 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
10491 12 : if (length_account_name_1 > size_account_name_1) {
10492 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
10493 : }
10494 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
10495 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
10496 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.workstation));
10497 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.workstation));
10498 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.workstation, &size_workstation_1));
10499 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.workstation, &length_workstation_1));
10500 12 : if (length_workstation_1 > size_workstation_1) {
10501 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_workstation_1, length_workstation_1);
10502 : }
10503 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_workstation_1, sizeof(uint16_t)));
10504 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.workstation, length_workstation_1, sizeof(uint16_t), CH_UTF16));
10505 12 : NDR_PULL_ALLOC(ndr, r->out.info);
10506 12 : NDR_ZERO_STRUCTP(r->out.info);
10507 : }
10508 12 : if (flags & NDR_OUT) {
10509 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10510 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10511 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10512 0 : NDR_PULL_ALLOC(ndr, r->out.info);
10513 : }
10514 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10515 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10516 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10517 0 : if (_ptr_info) {
10518 0 : NDR_PULL_ALLOC(ndr, *r->out.info);
10519 : } else {
10520 0 : *r->out.info = NULL;
10521 : }
10522 0 : if (*r->out.info) {
10523 0 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10524 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10525 0 : NDR_CHECK(ndr_pull_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10526 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10527 : }
10528 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10529 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10530 : }
10531 12 : return NDR_ERR_SUCCESS;
10532 : }
10533 :
10534 0 : _PUBLIC_ void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogon *r)
10535 : {
10536 0 : ndr_print_struct(ndr, name, "netr_LogonUasLogon");
10537 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10538 0 : ndr->depth++;
10539 0 : if (flags & NDR_SET_VALUES) {
10540 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10541 : }
10542 0 : if (flags & NDR_IN) {
10543 0 : ndr_print_struct(ndr, "in", "netr_LogonUasLogon");
10544 0 : ndr->depth++;
10545 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10546 0 : ndr->depth++;
10547 0 : if (r->in.server_name) {
10548 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10549 : }
10550 0 : ndr->depth--;
10551 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
10552 0 : ndr->depth++;
10553 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
10554 0 : ndr->depth--;
10555 0 : ndr_print_ptr(ndr, "workstation", r->in.workstation);
10556 0 : ndr->depth++;
10557 0 : ndr_print_string(ndr, "workstation", r->in.workstation);
10558 0 : ndr->depth--;
10559 0 : ndr->depth--;
10560 : }
10561 0 : if (flags & NDR_OUT) {
10562 0 : ndr_print_struct(ndr, "out", "netr_LogonUasLogon");
10563 0 : ndr->depth++;
10564 0 : ndr_print_ptr(ndr, "info", r->out.info);
10565 0 : ndr->depth++;
10566 0 : ndr_print_ptr(ndr, "info", *r->out.info);
10567 0 : ndr->depth++;
10568 0 : if (*r->out.info) {
10569 0 : ndr_print_netr_UasInfo(ndr, "info", *r->out.info);
10570 : }
10571 0 : ndr->depth--;
10572 0 : ndr->depth--;
10573 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10574 0 : ndr->depth--;
10575 : }
10576 0 : ndr->depth--;
10577 : }
10578 :
10579 12 : static enum ndr_err_code ndr_push_netr_LogonUasLogoff(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogoff *r)
10580 : {
10581 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10582 12 : if (flags & NDR_IN) {
10583 12 : if (r->in.account_name == NULL) {
10584 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10585 : }
10586 12 : if (r->in.workstation == NULL) {
10587 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10588 : }
10589 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10590 12 : if (r->in.server_name) {
10591 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10592 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10593 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10594 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));
10595 : }
10596 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
10597 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10598 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
10599 12 : 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));
10600 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
10601 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10602 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
10603 12 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.workstation, ndr_charset_length(r->in.workstation, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10604 : }
10605 12 : if (flags & NDR_OUT) {
10606 0 : if (r->out.info == NULL) {
10607 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10608 : }
10609 0 : NDR_CHECK(ndr_push_netr_UasLogoffInfo(ndr, NDR_SCALARS, r->out.info));
10610 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10611 : }
10612 12 : return NDR_ERR_SUCCESS;
10613 : }
10614 :
10615 12 : static enum ndr_err_code ndr_pull_netr_LogonUasLogoff(struct ndr_pull *ndr, int flags, struct netr_LogonUasLogoff *r)
10616 : {
10617 : uint32_t _ptr_server_name;
10618 12 : uint32_t size_server_name_1 = 0;
10619 12 : uint32_t length_server_name_1 = 0;
10620 12 : uint32_t size_account_name_1 = 0;
10621 12 : uint32_t length_account_name_1 = 0;
10622 12 : uint32_t size_workstation_1 = 0;
10623 12 : uint32_t length_workstation_1 = 0;
10624 12 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10625 12 : TALLOC_CTX *_mem_save_info_0 = NULL;
10626 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10627 12 : if (flags & NDR_IN) {
10628 12 : NDR_ZERO_STRUCT(r->out);
10629 :
10630 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10631 12 : if (_ptr_server_name) {
10632 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10633 : } else {
10634 12 : r->in.server_name = NULL;
10635 : }
10636 12 : if (r->in.server_name) {
10637 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10638 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10639 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10640 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10641 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10642 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10643 0 : if (length_server_name_1 > size_server_name_1) {
10644 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
10645 : }
10646 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10647 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10648 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10649 : }
10650 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
10651 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
10652 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
10653 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
10654 12 : if (length_account_name_1 > size_account_name_1) {
10655 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
10656 : }
10657 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
10658 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
10659 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.workstation));
10660 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.workstation));
10661 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.workstation, &size_workstation_1));
10662 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.workstation, &length_workstation_1));
10663 12 : if (length_workstation_1 > size_workstation_1) {
10664 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_workstation_1, length_workstation_1);
10665 : }
10666 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_workstation_1, sizeof(uint16_t)));
10667 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.workstation, length_workstation_1, sizeof(uint16_t), CH_UTF16));
10668 12 : NDR_PULL_ALLOC(ndr, r->out.info);
10669 12 : NDR_ZERO_STRUCTP(r->out.info);
10670 : }
10671 12 : if (flags & NDR_OUT) {
10672 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10673 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10674 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10675 0 : NDR_PULL_ALLOC(ndr, r->out.info);
10676 : }
10677 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10678 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10679 0 : NDR_CHECK(ndr_pull_netr_UasLogoffInfo(ndr, NDR_SCALARS, r->out.info));
10680 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10681 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10682 : }
10683 12 : return NDR_ERR_SUCCESS;
10684 : }
10685 :
10686 0 : _PUBLIC_ void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogoff *r)
10687 : {
10688 0 : ndr_print_struct(ndr, name, "netr_LogonUasLogoff");
10689 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10690 0 : ndr->depth++;
10691 0 : if (flags & NDR_SET_VALUES) {
10692 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10693 : }
10694 0 : if (flags & NDR_IN) {
10695 0 : ndr_print_struct(ndr, "in", "netr_LogonUasLogoff");
10696 0 : ndr->depth++;
10697 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10698 0 : ndr->depth++;
10699 0 : if (r->in.server_name) {
10700 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10701 : }
10702 0 : ndr->depth--;
10703 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
10704 0 : ndr->depth++;
10705 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
10706 0 : ndr->depth--;
10707 0 : ndr_print_ptr(ndr, "workstation", r->in.workstation);
10708 0 : ndr->depth++;
10709 0 : ndr_print_string(ndr, "workstation", r->in.workstation);
10710 0 : ndr->depth--;
10711 0 : ndr->depth--;
10712 : }
10713 0 : if (flags & NDR_OUT) {
10714 0 : ndr_print_struct(ndr, "out", "netr_LogonUasLogoff");
10715 0 : ndr->depth++;
10716 0 : ndr_print_ptr(ndr, "info", r->out.info);
10717 0 : ndr->depth++;
10718 0 : ndr_print_netr_UasLogoffInfo(ndr, "info", r->out.info);
10719 0 : ndr->depth--;
10720 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10721 0 : ndr->depth--;
10722 : }
10723 0 : ndr->depth--;
10724 : }
10725 :
10726 15539 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogon *r)
10727 : {
10728 15539 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10729 15539 : if (flags & NDR_IN) {
10730 7148 : if (r->in.logon == NULL) {
10731 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10732 : }
10733 7148 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10734 7148 : if (r->in.server_name) {
10735 7148 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10736 7148 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10737 7148 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10738 7148 : 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));
10739 : }
10740 7148 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
10741 7148 : if (r->in.computer_name) {
10742 7148 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
10743 7148 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10744 7148 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
10745 7148 : 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));
10746 : }
10747 7148 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
10748 7148 : if (r->in.credential) {
10749 6244 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
10750 : }
10751 7148 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
10752 7148 : if (r->in.return_authenticator) {
10753 7148 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
10754 : }
10755 7148 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
10756 7148 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
10757 7148 : NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
10758 7148 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
10759 : }
10760 15539 : if (flags & NDR_OUT) {
10761 8391 : if (r->out.validation == NULL) {
10762 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10763 : }
10764 8391 : if (r->out.authoritative == NULL) {
10765 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10766 : }
10767 8391 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
10768 8391 : if (r->out.return_authenticator) {
10769 5566 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
10770 : }
10771 8391 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
10772 8391 : NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
10773 8391 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
10774 8391 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10775 : }
10776 15539 : return NDR_ERR_SUCCESS;
10777 : }
10778 :
10779 14296 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogon *r)
10780 : {
10781 : uint32_t _ptr_server_name;
10782 14296 : uint32_t size_server_name_1 = 0;
10783 14296 : uint32_t length_server_name_1 = 0;
10784 : uint32_t _ptr_computer_name;
10785 14296 : uint32_t size_computer_name_1 = 0;
10786 14296 : uint32_t length_computer_name_1 = 0;
10787 : uint32_t _ptr_credential;
10788 : uint32_t _ptr_return_authenticator;
10789 14296 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10790 14296 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
10791 14296 : TALLOC_CTX *_mem_save_credential_0 = NULL;
10792 14296 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
10793 14296 : TALLOC_CTX *_mem_save_logon_0 = NULL;
10794 14296 : TALLOC_CTX *_mem_save_validation_0 = NULL;
10795 14296 : TALLOC_CTX *_mem_save_authoritative_0 = NULL;
10796 14296 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10797 14296 : if (flags & NDR_IN) {
10798 7148 : NDR_ZERO_STRUCT(r->out);
10799 :
10800 7148 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10801 7148 : if (_ptr_server_name) {
10802 7148 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10803 : } else {
10804 0 : r->in.server_name = NULL;
10805 : }
10806 7148 : if (r->in.server_name) {
10807 7148 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10808 7148 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10809 7148 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10810 7148 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10811 7148 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10812 7148 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10813 7148 : if (length_server_name_1 > size_server_name_1) {
10814 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
10815 : }
10816 7148 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10817 7148 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10818 7148 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10819 : }
10820 7148 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
10821 7148 : if (_ptr_computer_name) {
10822 7148 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
10823 : } else {
10824 0 : r->in.computer_name = NULL;
10825 : }
10826 7148 : if (r->in.computer_name) {
10827 7148 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10828 7148 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
10829 7148 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
10830 7148 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
10831 7148 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
10832 7148 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
10833 7148 : if (length_computer_name_1 > size_computer_name_1) {
10834 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
10835 : }
10836 7148 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
10837 7148 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
10838 7148 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
10839 : }
10840 7148 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
10841 7148 : if (_ptr_credential) {
10842 6244 : NDR_PULL_ALLOC(ndr, r->in.credential);
10843 : } else {
10844 904 : r->in.credential = NULL;
10845 : }
10846 7148 : if (r->in.credential) {
10847 6244 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
10848 6244 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
10849 6244 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
10850 6244 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
10851 : }
10852 7148 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
10853 7148 : if (_ptr_return_authenticator) {
10854 7148 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
10855 : } else {
10856 0 : r->in.return_authenticator = NULL;
10857 : }
10858 7148 : if (r->in.return_authenticator) {
10859 7148 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
10860 7148 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
10861 7148 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
10862 7148 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
10863 : }
10864 7148 : NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
10865 7148 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10866 7148 : NDR_PULL_ALLOC(ndr, r->in.logon);
10867 : }
10868 7148 : _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
10869 7148 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
10870 7148 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
10871 7148 : NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
10872 7148 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
10873 7148 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
10874 7148 : NDR_PULL_ALLOC(ndr, r->out.validation);
10875 7148 : NDR_ZERO_STRUCTP(r->out.validation);
10876 7148 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
10877 7148 : NDR_ZERO_STRUCTP(r->out.authoritative);
10878 : }
10879 14296 : if (flags & NDR_OUT) {
10880 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10881 : if (r->in.logon == NULL) {
10882 : NDR_PULL_ALLOC(ndr, r->in.logon);
10883 : NDR_ZERO_STRUCTP(r->in.logon);
10884 : }
10885 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10886 7148 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
10887 7148 : if (_ptr_return_authenticator) {
10888 4888 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
10889 : } else {
10890 2260 : r->out.return_authenticator = NULL;
10891 : }
10892 7148 : if (r->out.return_authenticator) {
10893 4888 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
10894 4888 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
10895 4888 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
10896 4888 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
10897 : }
10898 7148 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10899 1243 : NDR_PULL_ALLOC(ndr, r->out.validation);
10900 : }
10901 7148 : _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
10902 7148 : NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
10903 7148 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
10904 7148 : NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
10905 7148 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
10906 7148 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10907 1243 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
10908 : }
10909 7148 : _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
10910 7148 : NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
10911 7148 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
10912 7148 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
10913 7148 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10914 : }
10915 14296 : return NDR_ERR_SUCCESS;
10916 : }
10917 :
10918 2486 : _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogon *r)
10919 : {
10920 2486 : ndr_print_struct(ndr, name, "netr_LogonSamLogon");
10921 2486 : if (r == NULL) { ndr_print_null(ndr); return; }
10922 2486 : ndr->depth++;
10923 2486 : if (flags & NDR_SET_VALUES) {
10924 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10925 : }
10926 2486 : if (flags & NDR_IN) {
10927 0 : ndr_print_struct(ndr, "in", "netr_LogonSamLogon");
10928 0 : ndr->depth++;
10929 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10930 0 : ndr->depth++;
10931 0 : if (r->in.server_name) {
10932 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10933 : }
10934 0 : ndr->depth--;
10935 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
10936 0 : ndr->depth++;
10937 0 : if (r->in.computer_name) {
10938 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
10939 : }
10940 0 : ndr->depth--;
10941 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
10942 0 : ndr->depth++;
10943 0 : if (r->in.credential) {
10944 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
10945 : }
10946 0 : ndr->depth--;
10947 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
10948 0 : ndr->depth++;
10949 0 : if (r->in.return_authenticator) {
10950 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
10951 : }
10952 0 : ndr->depth--;
10953 0 : ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
10954 0 : ndr_print_ptr(ndr, "logon", r->in.logon);
10955 0 : ndr->depth++;
10956 0 : ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
10957 0 : ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
10958 0 : ndr->depth--;
10959 0 : ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
10960 0 : ndr->depth--;
10961 : }
10962 2486 : if (flags & NDR_OUT) {
10963 2486 : ndr_print_struct(ndr, "out", "netr_LogonSamLogon");
10964 2486 : ndr->depth++;
10965 2486 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
10966 2486 : ndr->depth++;
10967 2486 : if (r->out.return_authenticator) {
10968 1356 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
10969 : }
10970 2486 : ndr->depth--;
10971 2486 : ndr_print_ptr(ndr, "validation", r->out.validation);
10972 2486 : ndr->depth++;
10973 2486 : ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
10974 2486 : ndr_print_netr_Validation(ndr, "validation", r->out.validation);
10975 2486 : ndr->depth--;
10976 2486 : ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
10977 2486 : ndr->depth++;
10978 2486 : ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
10979 2486 : ndr->depth--;
10980 2486 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
10981 2486 : ndr->depth--;
10982 : }
10983 2486 : ndr->depth--;
10984 : }
10985 :
10986 0 : static enum ndr_err_code ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogoff *r)
10987 : {
10988 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10989 0 : if (flags & NDR_IN) {
10990 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10991 0 : if (r->in.server_name) {
10992 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10993 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10994 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10995 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));
10996 : }
10997 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
10998 0 : if (r->in.computer_name) {
10999 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11000 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11001 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11002 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));
11003 : }
11004 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
11005 0 : if (r->in.credential) {
11006 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11007 : }
11008 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
11009 0 : if (r->in.return_authenticator) {
11010 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11011 : }
11012 0 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
11013 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
11014 0 : NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
11015 : }
11016 0 : if (flags & NDR_OUT) {
11017 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
11018 0 : if (r->out.return_authenticator) {
11019 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11020 : }
11021 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11022 : }
11023 0 : return NDR_ERR_SUCCESS;
11024 : }
11025 :
11026 0 : static enum ndr_err_code ndr_pull_netr_LogonSamLogoff(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogoff *r)
11027 : {
11028 : uint32_t _ptr_server_name;
11029 0 : uint32_t size_server_name_1 = 0;
11030 0 : uint32_t length_server_name_1 = 0;
11031 : uint32_t _ptr_computer_name;
11032 0 : uint32_t size_computer_name_1 = 0;
11033 0 : uint32_t length_computer_name_1 = 0;
11034 : uint32_t _ptr_credential;
11035 : uint32_t _ptr_return_authenticator;
11036 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
11037 0 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
11038 0 : TALLOC_CTX *_mem_save_credential_0 = NULL;
11039 0 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
11040 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11041 0 : if (flags & NDR_IN) {
11042 0 : NDR_ZERO_STRUCT(r->out);
11043 :
11044 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11045 0 : if (_ptr_server_name) {
11046 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11047 : } else {
11048 0 : r->in.server_name = NULL;
11049 : }
11050 0 : if (r->in.server_name) {
11051 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11052 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11053 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11054 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11055 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11056 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11057 0 : if (length_server_name_1 > size_server_name_1) {
11058 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
11059 : }
11060 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11061 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11062 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11063 : }
11064 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
11065 0 : if (_ptr_computer_name) {
11066 0 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
11067 : } else {
11068 0 : r->in.computer_name = NULL;
11069 : }
11070 0 : if (r->in.computer_name) {
11071 0 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11072 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
11073 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
11074 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
11075 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
11076 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
11077 0 : if (length_computer_name_1 > size_computer_name_1) {
11078 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
11079 : }
11080 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
11081 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
11082 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
11083 : }
11084 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
11085 0 : if (_ptr_credential) {
11086 0 : NDR_PULL_ALLOC(ndr, r->in.credential);
11087 : } else {
11088 0 : r->in.credential = NULL;
11089 : }
11090 0 : if (r->in.credential) {
11091 0 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
11092 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
11093 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11094 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
11095 : }
11096 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
11097 0 : if (_ptr_return_authenticator) {
11098 0 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
11099 : } else {
11100 0 : r->in.return_authenticator = NULL;
11101 : }
11102 0 : if (r->in.return_authenticator) {
11103 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11104 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
11105 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11106 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
11107 : }
11108 0 : NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
11109 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
11110 0 : NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
11111 : }
11112 0 : if (flags & NDR_OUT) {
11113 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11114 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11115 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
11116 0 : if (_ptr_return_authenticator) {
11117 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11118 : } else {
11119 0 : r->out.return_authenticator = NULL;
11120 : }
11121 0 : if (r->out.return_authenticator) {
11122 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11123 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
11124 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11125 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
11126 : }
11127 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11128 : }
11129 0 : return NDR_ERR_SUCCESS;
11130 : }
11131 :
11132 0 : _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogoff *r)
11133 : {
11134 0 : ndr_print_struct(ndr, name, "netr_LogonSamLogoff");
11135 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11136 0 : ndr->depth++;
11137 0 : if (flags & NDR_SET_VALUES) {
11138 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11139 : }
11140 0 : if (flags & NDR_IN) {
11141 0 : ndr_print_struct(ndr, "in", "netr_LogonSamLogoff");
11142 0 : ndr->depth++;
11143 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11144 0 : ndr->depth++;
11145 0 : if (r->in.server_name) {
11146 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11147 : }
11148 0 : ndr->depth--;
11149 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
11150 0 : ndr->depth++;
11151 0 : if (r->in.computer_name) {
11152 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
11153 : }
11154 0 : ndr->depth--;
11155 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
11156 0 : ndr->depth++;
11157 0 : if (r->in.credential) {
11158 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
11159 : }
11160 0 : ndr->depth--;
11161 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
11162 0 : ndr->depth++;
11163 0 : if (r->in.return_authenticator) {
11164 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
11165 : }
11166 0 : ndr->depth--;
11167 0 : ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
11168 0 : ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
11169 0 : ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
11170 0 : ndr->depth--;
11171 : }
11172 0 : if (flags & NDR_OUT) {
11173 0 : ndr_print_struct(ndr, "out", "netr_LogonSamLogoff");
11174 0 : ndr->depth++;
11175 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
11176 0 : ndr->depth++;
11177 0 : if (r->out.return_authenticator) {
11178 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
11179 : }
11180 0 : ndr->depth--;
11181 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11182 0 : ndr->depth--;
11183 : }
11184 0 : ndr->depth--;
11185 : }
11186 :
11187 14766 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr, int flags, const struct netr_ServerReqChallenge *r)
11188 : {
11189 14766 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11190 14766 : if (flags & NDR_IN) {
11191 6539 : if (r->in.computer_name == NULL) {
11192 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11193 : }
11194 6539 : if (r->in.credentials == NULL) {
11195 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11196 : }
11197 6539 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
11198 6539 : if (r->in.server_name) {
11199 732 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11200 732 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11201 732 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11202 732 : 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));
11203 : }
11204 6539 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11205 6539 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11206 6539 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11207 6539 : 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));
11208 6539 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
11209 : }
11210 14766 : if (flags & NDR_OUT) {
11211 8227 : if (r->out.return_credentials == NULL) {
11212 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11213 : }
11214 8227 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
11215 8227 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11216 : }
11217 14766 : return NDR_ERR_SUCCESS;
11218 : }
11219 :
11220 13195 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr, int flags, struct netr_ServerReqChallenge *r)
11221 : {
11222 : uint32_t _ptr_server_name;
11223 13195 : uint32_t size_server_name_1 = 0;
11224 13195 : uint32_t length_server_name_1 = 0;
11225 13195 : uint32_t size_computer_name_1 = 0;
11226 13195 : uint32_t length_computer_name_1 = 0;
11227 13195 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
11228 13195 : TALLOC_CTX *_mem_save_credentials_0 = NULL;
11229 13195 : TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
11230 13195 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11231 13195 : if (flags & NDR_IN) {
11232 6656 : NDR_ZERO_STRUCT(r->out);
11233 :
11234 6656 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11235 6656 : if (_ptr_server_name) {
11236 849 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11237 : } else {
11238 5807 : r->in.server_name = NULL;
11239 : }
11240 6656 : if (r->in.server_name) {
11241 849 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11242 849 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11243 849 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11244 849 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11245 849 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11246 849 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11247 849 : if (length_server_name_1 > size_server_name_1) {
11248 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
11249 : }
11250 849 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11251 849 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11252 849 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11253 : }
11254 6656 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
11255 6656 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
11256 6656 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
11257 6656 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
11258 6656 : if (length_computer_name_1 > size_computer_name_1) {
11259 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
11260 : }
11261 6656 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
11262 6656 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
11263 6656 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11264 6656 : NDR_PULL_ALLOC(ndr, r->in.credentials);
11265 : }
11266 6656 : _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
11267 6656 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
11268 6656 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
11269 6656 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
11270 6656 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
11271 6656 : NDR_ZERO_STRUCTP(r->out.return_credentials);
11272 : }
11273 13195 : if (flags & NDR_OUT) {
11274 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11275 : if (r->in.credentials == NULL) {
11276 : NDR_PULL_ALLOC(ndr, r->in.credentials);
11277 : NDR_ZERO_STRUCTP(r->in.credentials);
11278 : }
11279 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11280 6539 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11281 1610 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
11282 : }
11283 6539 : _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
11284 6539 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
11285 6539 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
11286 6539 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
11287 6539 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11288 : }
11289 13195 : return NDR_ERR_SUCCESS;
11290 : }
11291 :
11292 3142 : _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerReqChallenge *r)
11293 : {
11294 3142 : ndr_print_struct(ndr, name, "netr_ServerReqChallenge");
11295 3142 : if (r == NULL) { ndr_print_null(ndr); return; }
11296 3142 : ndr->depth++;
11297 3142 : if (flags & NDR_SET_VALUES) {
11298 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11299 : }
11300 3142 : if (flags & NDR_IN) {
11301 0 : ndr_print_struct(ndr, "in", "netr_ServerReqChallenge");
11302 0 : ndr->depth++;
11303 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11304 0 : ndr->depth++;
11305 0 : if (r->in.server_name) {
11306 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11307 : }
11308 0 : ndr->depth--;
11309 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
11310 0 : ndr->depth++;
11311 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
11312 0 : ndr->depth--;
11313 0 : ndr_print_ptr(ndr, "credentials", r->in.credentials);
11314 0 : ndr->depth++;
11315 0 : ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
11316 0 : ndr->depth--;
11317 0 : ndr->depth--;
11318 : }
11319 3142 : if (flags & NDR_OUT) {
11320 3142 : ndr_print_struct(ndr, "out", "netr_ServerReqChallenge");
11321 3142 : ndr->depth++;
11322 3142 : ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
11323 3142 : ndr->depth++;
11324 3142 : ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
11325 3142 : ndr->depth--;
11326 3142 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11327 3142 : ndr->depth--;
11328 : }
11329 3142 : ndr->depth--;
11330 : }
11331 :
11332 450 : static enum ndr_err_code ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate *r)
11333 : {
11334 450 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11335 450 : if (flags & NDR_IN) {
11336 200 : if (r->in.account_name == NULL) {
11337 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11338 : }
11339 200 : if (r->in.computer_name == NULL) {
11340 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11341 : }
11342 200 : if (r->in.credentials == NULL) {
11343 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11344 : }
11345 200 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
11346 200 : if (r->in.server_name) {
11347 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11348 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11349 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11350 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));
11351 : }
11352 200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
11353 200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11354 200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
11355 200 : 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));
11356 200 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
11357 200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11358 200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11359 200 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11360 200 : 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));
11361 200 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
11362 : }
11363 450 : if (flags & NDR_OUT) {
11364 250 : if (r->out.return_credentials == NULL) {
11365 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11366 : }
11367 250 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
11368 250 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11369 : }
11370 450 : return NDR_ERR_SUCCESS;
11371 : }
11372 :
11373 400 : static enum ndr_err_code ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate *r)
11374 : {
11375 : uint32_t _ptr_server_name;
11376 400 : uint32_t size_server_name_1 = 0;
11377 400 : uint32_t length_server_name_1 = 0;
11378 400 : uint32_t size_account_name_1 = 0;
11379 400 : uint32_t length_account_name_1 = 0;
11380 400 : uint32_t size_computer_name_1 = 0;
11381 400 : uint32_t length_computer_name_1 = 0;
11382 400 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
11383 400 : TALLOC_CTX *_mem_save_credentials_0 = NULL;
11384 400 : TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
11385 400 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11386 400 : if (flags & NDR_IN) {
11387 200 : NDR_ZERO_STRUCT(r->out);
11388 :
11389 200 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11390 200 : if (_ptr_server_name) {
11391 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11392 : } else {
11393 200 : r->in.server_name = NULL;
11394 : }
11395 200 : if (r->in.server_name) {
11396 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11397 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11398 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11399 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11400 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11401 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11402 0 : if (length_server_name_1 > size_server_name_1) {
11403 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
11404 : }
11405 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11406 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11407 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11408 : }
11409 200 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
11410 200 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
11411 200 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
11412 200 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
11413 200 : if (length_account_name_1 > size_account_name_1) {
11414 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
11415 : }
11416 200 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
11417 200 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
11418 200 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
11419 200 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
11420 200 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
11421 200 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
11422 200 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
11423 200 : if (length_computer_name_1 > size_computer_name_1) {
11424 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
11425 : }
11426 200 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
11427 200 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
11428 200 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11429 200 : NDR_PULL_ALLOC(ndr, r->in.credentials);
11430 : }
11431 200 : _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
11432 200 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
11433 200 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
11434 200 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
11435 200 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
11436 200 : NDR_ZERO_STRUCTP(r->out.return_credentials);
11437 : }
11438 400 : if (flags & NDR_OUT) {
11439 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11440 : if (r->in.credentials == NULL) {
11441 : NDR_PULL_ALLOC(ndr, r->in.credentials);
11442 : NDR_ZERO_STRUCTP(r->in.credentials);
11443 : }
11444 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11445 200 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11446 50 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
11447 : }
11448 200 : _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
11449 200 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
11450 200 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
11451 200 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
11452 200 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11453 : }
11454 400 : return NDR_ERR_SUCCESS;
11455 : }
11456 :
11457 100 : _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate *r)
11458 : {
11459 100 : ndr_print_struct(ndr, name, "netr_ServerAuthenticate");
11460 100 : if (r == NULL) { ndr_print_null(ndr); return; }
11461 100 : ndr->depth++;
11462 100 : if (flags & NDR_SET_VALUES) {
11463 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11464 : }
11465 100 : if (flags & NDR_IN) {
11466 0 : ndr_print_struct(ndr, "in", "netr_ServerAuthenticate");
11467 0 : ndr->depth++;
11468 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11469 0 : ndr->depth++;
11470 0 : if (r->in.server_name) {
11471 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11472 : }
11473 0 : ndr->depth--;
11474 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
11475 0 : ndr->depth++;
11476 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
11477 0 : ndr->depth--;
11478 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
11479 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
11480 0 : ndr->depth++;
11481 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
11482 0 : ndr->depth--;
11483 0 : ndr_print_ptr(ndr, "credentials", r->in.credentials);
11484 0 : ndr->depth++;
11485 0 : ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
11486 0 : ndr->depth--;
11487 0 : ndr->depth--;
11488 : }
11489 100 : if (flags & NDR_OUT) {
11490 100 : ndr_print_struct(ndr, "out", "netr_ServerAuthenticate");
11491 100 : ndr->depth++;
11492 100 : ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
11493 100 : ndr->depth++;
11494 100 : ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
11495 100 : ndr->depth--;
11496 100 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11497 100 : ndr->depth--;
11498 : }
11499 100 : ndr->depth--;
11500 : }
11501 :
11502 81 : static enum ndr_err_code ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordSet *r)
11503 : {
11504 81 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11505 81 : if (flags & NDR_IN) {
11506 36 : if (r->in.account_name == NULL) {
11507 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11508 : }
11509 36 : if (r->in.computer_name == NULL) {
11510 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11511 : }
11512 36 : if (r->in.credential == NULL) {
11513 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11514 : }
11515 36 : if (r->in.new_password == NULL) {
11516 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11517 : }
11518 36 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
11519 36 : if (r->in.server_name) {
11520 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11521 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11522 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11523 36 : 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));
11524 : }
11525 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
11526 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11527 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
11528 36 : 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));
11529 36 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
11530 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11531 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11532 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
11533 36 : 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));
11534 36 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11535 36 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_password));
11536 : }
11537 81 : if (flags & NDR_OUT) {
11538 45 : if (r->out.return_authenticator == NULL) {
11539 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11540 : }
11541 45 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11542 45 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11543 : }
11544 81 : return NDR_ERR_SUCCESS;
11545 : }
11546 :
11547 72 : static enum ndr_err_code ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordSet *r)
11548 : {
11549 : uint32_t _ptr_server_name;
11550 72 : uint32_t size_server_name_1 = 0;
11551 72 : uint32_t length_server_name_1 = 0;
11552 72 : uint32_t size_account_name_1 = 0;
11553 72 : uint32_t length_account_name_1 = 0;
11554 72 : uint32_t size_computer_name_1 = 0;
11555 72 : uint32_t length_computer_name_1 = 0;
11556 72 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
11557 72 : TALLOC_CTX *_mem_save_credential_0 = NULL;
11558 72 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
11559 72 : TALLOC_CTX *_mem_save_new_password_0 = NULL;
11560 72 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11561 72 : if (flags & NDR_IN) {
11562 36 : NDR_ZERO_STRUCT(r->out);
11563 :
11564 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11565 36 : if (_ptr_server_name) {
11566 36 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11567 : } else {
11568 0 : r->in.server_name = NULL;
11569 : }
11570 36 : if (r->in.server_name) {
11571 36 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11572 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11573 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11574 36 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11575 36 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11576 36 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11577 36 : if (length_server_name_1 > size_server_name_1) {
11578 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
11579 : }
11580 36 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11581 36 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11582 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11583 : }
11584 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
11585 36 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
11586 36 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
11587 36 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
11588 36 : if (length_account_name_1 > size_account_name_1) {
11589 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
11590 : }
11591 36 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
11592 36 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
11593 36 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
11594 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
11595 36 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
11596 36 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
11597 36 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
11598 36 : if (length_computer_name_1 > size_computer_name_1) {
11599 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
11600 : }
11601 36 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
11602 36 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
11603 36 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11604 36 : NDR_PULL_ALLOC(ndr, r->in.credential);
11605 : }
11606 36 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
11607 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
11608 36 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11609 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
11610 36 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11611 36 : NDR_PULL_ALLOC(ndr, r->in.new_password);
11612 : }
11613 36 : _mem_save_new_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
11614 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.new_password, LIBNDR_FLAG_REF_ALLOC);
11615 36 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_password));
11616 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_password_0, LIBNDR_FLAG_REF_ALLOC);
11617 36 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11618 36 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
11619 : }
11620 72 : if (flags & NDR_OUT) {
11621 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11622 : if (r->in.credential == NULL) {
11623 : NDR_PULL_ALLOC(ndr, r->in.credential);
11624 : NDR_ZERO_STRUCTP(r->in.credential);
11625 : }
11626 : if (r->in.new_password == NULL) {
11627 : NDR_PULL_ALLOC(ndr, r->in.new_password);
11628 : NDR_ZERO_STRUCTP(r->in.new_password);
11629 : }
11630 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11631 36 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11632 9 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11633 : }
11634 36 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11635 36 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
11636 36 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11637 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
11638 36 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11639 : }
11640 72 : return NDR_ERR_SUCCESS;
11641 : }
11642 :
11643 18 : _PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet *r)
11644 : {
11645 18 : ndr_print_struct(ndr, name, "netr_ServerPasswordSet");
11646 18 : if (r == NULL) { ndr_print_null(ndr); return; }
11647 18 : ndr->depth++;
11648 18 : if (flags & NDR_SET_VALUES) {
11649 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11650 : }
11651 18 : if (flags & NDR_IN) {
11652 0 : ndr_print_struct(ndr, "in", "netr_ServerPasswordSet");
11653 0 : ndr->depth++;
11654 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11655 0 : ndr->depth++;
11656 0 : if (r->in.server_name) {
11657 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11658 : }
11659 0 : ndr->depth--;
11660 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
11661 0 : ndr->depth++;
11662 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
11663 0 : ndr->depth--;
11664 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
11665 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
11666 0 : ndr->depth++;
11667 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
11668 0 : ndr->depth--;
11669 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
11670 0 : ndr->depth++;
11671 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
11672 0 : ndr->depth--;
11673 0 : ndr_print_ptr(ndr, "new_password", r->in.new_password);
11674 0 : ndr->depth++;
11675 0 : ndr_print_samr_Password(ndr, "new_password", r->in.new_password);
11676 0 : ndr->depth--;
11677 0 : ndr->depth--;
11678 : }
11679 18 : if (flags & NDR_OUT) {
11680 18 : ndr_print_struct(ndr, "out", "netr_ServerPasswordSet");
11681 18 : ndr->depth++;
11682 18 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
11683 18 : ndr->depth++;
11684 18 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
11685 18 : ndr->depth--;
11686 18 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11687 18 : ndr->depth--;
11688 : }
11689 18 : ndr->depth--;
11690 : }
11691 :
11692 0 : static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int flags, const struct netr_DatabaseDeltas *r)
11693 : {
11694 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11695 0 : if (flags & NDR_IN) {
11696 0 : if (r->in.logon_server == NULL) {
11697 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11698 : }
11699 0 : if (r->in.computername == NULL) {
11700 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11701 : }
11702 0 : if (r->in.credential == NULL) {
11703 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11704 : }
11705 0 : if (r->in.return_authenticator == NULL) {
11706 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11707 : }
11708 0 : if (r->in.sequence_num == NULL) {
11709 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11710 : }
11711 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
11712 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11713 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
11714 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));
11715 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
11716 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11717 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
11718 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));
11719 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11720 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11721 0 : NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
11722 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->in.sequence_num));
11723 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
11724 : }
11725 0 : if (flags & NDR_OUT) {
11726 0 : if (r->out.return_authenticator == NULL) {
11727 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11728 : }
11729 0 : if (r->out.sequence_num == NULL) {
11730 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11731 : }
11732 0 : if (r->out.delta_enum_array == NULL) {
11733 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11734 : }
11735 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11736 0 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->out.sequence_num));
11737 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
11738 0 : if (*r->out.delta_enum_array) {
11739 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
11740 : }
11741 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11742 : }
11743 0 : return NDR_ERR_SUCCESS;
11744 : }
11745 :
11746 0 : static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int flags, struct netr_DatabaseDeltas *r)
11747 : {
11748 0 : uint32_t size_logon_server_1 = 0;
11749 0 : uint32_t length_logon_server_1 = 0;
11750 0 : uint32_t size_computername_1 = 0;
11751 0 : uint32_t length_computername_1 = 0;
11752 : uint32_t _ptr_delta_enum_array;
11753 0 : TALLOC_CTX *_mem_save_credential_0 = NULL;
11754 0 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
11755 0 : TALLOC_CTX *_mem_save_sequence_num_0 = NULL;
11756 0 : TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
11757 0 : TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
11758 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11759 0 : if (flags & NDR_IN) {
11760 0 : NDR_ZERO_STRUCT(r->out);
11761 :
11762 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
11763 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
11764 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
11765 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
11766 0 : if (length_logon_server_1 > size_logon_server_1) {
11767 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
11768 : }
11769 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
11770 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
11771 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
11772 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
11773 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
11774 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
11775 0 : if (length_computername_1 > size_computername_1) {
11776 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computername_1, length_computername_1);
11777 : }
11778 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
11779 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
11780 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11781 0 : NDR_PULL_ALLOC(ndr, r->in.credential);
11782 : }
11783 0 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
11784 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
11785 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11786 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
11787 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11788 0 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
11789 : }
11790 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11791 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
11792 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11793 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
11794 0 : NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
11795 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11796 0 : NDR_PULL_ALLOC(ndr, r->in.sequence_num);
11797 : }
11798 0 : _mem_save_sequence_num_0 = NDR_PULL_GET_MEM_CTX(ndr);
11799 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sequence_num, LIBNDR_FLAG_REF_ALLOC);
11800 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->in.sequence_num));
11801 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_num_0, LIBNDR_FLAG_REF_ALLOC);
11802 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
11803 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11804 0 : *r->out.return_authenticator = *r->in.return_authenticator;
11805 0 : NDR_PULL_ALLOC(ndr, r->out.sequence_num);
11806 0 : *r->out.sequence_num = *r->in.sequence_num;
11807 0 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
11808 0 : NDR_ZERO_STRUCTP(r->out.delta_enum_array);
11809 : }
11810 0 : if (flags & NDR_OUT) {
11811 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11812 : if (r->in.credential == NULL) {
11813 : NDR_PULL_ALLOC(ndr, r->in.credential);
11814 : NDR_ZERO_STRUCTP(r->in.credential);
11815 : }
11816 : if (r->in.return_authenticator == NULL) {
11817 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
11818 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
11819 : }
11820 : if (r->in.sequence_num == NULL) {
11821 : NDR_PULL_ALLOC(ndr, r->in.sequence_num);
11822 : NDR_ZERO_STRUCTP(r->in.sequence_num);
11823 : }
11824 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11825 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11826 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
11827 : }
11828 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
11829 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
11830 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11831 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
11832 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11833 0 : NDR_PULL_ALLOC(ndr, r->out.sequence_num);
11834 : }
11835 0 : _mem_save_sequence_num_0 = NDR_PULL_GET_MEM_CTX(ndr);
11836 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sequence_num, LIBNDR_FLAG_REF_ALLOC);
11837 0 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->out.sequence_num));
11838 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_num_0, LIBNDR_FLAG_REF_ALLOC);
11839 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11840 0 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
11841 : }
11842 0 : _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
11843 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
11844 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
11845 0 : if (_ptr_delta_enum_array) {
11846 0 : NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
11847 : } else {
11848 0 : *r->out.delta_enum_array = NULL;
11849 : }
11850 0 : if (*r->out.delta_enum_array) {
11851 0 : _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
11852 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
11853 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
11854 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
11855 : }
11856 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
11857 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11858 : }
11859 0 : return NDR_ERR_SUCCESS;
11860 : }
11861 :
11862 0 : _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseDeltas *r)
11863 : {
11864 0 : ndr_print_struct(ndr, name, "netr_DatabaseDeltas");
11865 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11866 0 : ndr->depth++;
11867 0 : if (flags & NDR_SET_VALUES) {
11868 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11869 : }
11870 0 : if (flags & NDR_IN) {
11871 0 : ndr_print_struct(ndr, "in", "netr_DatabaseDeltas");
11872 0 : ndr->depth++;
11873 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
11874 0 : ndr->depth++;
11875 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
11876 0 : ndr->depth--;
11877 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
11878 0 : ndr->depth++;
11879 0 : ndr_print_string(ndr, "computername", r->in.computername);
11880 0 : ndr->depth--;
11881 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
11882 0 : ndr->depth++;
11883 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
11884 0 : ndr->depth--;
11885 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
11886 0 : ndr->depth++;
11887 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
11888 0 : ndr->depth--;
11889 0 : ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
11890 0 : ndr_print_ptr(ndr, "sequence_num", r->in.sequence_num);
11891 0 : ndr->depth++;
11892 0 : ndr_print_udlong(ndr, "sequence_num", *r->in.sequence_num);
11893 0 : ndr->depth--;
11894 0 : ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
11895 0 : ndr->depth--;
11896 : }
11897 0 : if (flags & NDR_OUT) {
11898 0 : ndr_print_struct(ndr, "out", "netr_DatabaseDeltas");
11899 0 : ndr->depth++;
11900 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
11901 0 : ndr->depth++;
11902 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
11903 0 : ndr->depth--;
11904 0 : ndr_print_ptr(ndr, "sequence_num", r->out.sequence_num);
11905 0 : ndr->depth++;
11906 0 : ndr_print_udlong(ndr, "sequence_num", *r->out.sequence_num);
11907 0 : ndr->depth--;
11908 0 : ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
11909 0 : ndr->depth++;
11910 0 : ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
11911 0 : ndr->depth++;
11912 0 : if (*r->out.delta_enum_array) {
11913 0 : ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
11914 : }
11915 0 : ndr->depth--;
11916 0 : ndr->depth--;
11917 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
11918 0 : ndr->depth--;
11919 : }
11920 0 : ndr->depth--;
11921 : }
11922 :
11923 27 : static enum ndr_err_code ndr_push_netr_DatabaseSync(struct ndr_push *ndr, int flags, const struct netr_DatabaseSync *r)
11924 : {
11925 27 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11926 27 : if (flags & NDR_IN) {
11927 12 : if (r->in.logon_server == NULL) {
11928 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11929 : }
11930 12 : if (r->in.computername == NULL) {
11931 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11932 : }
11933 12 : if (r->in.credential == NULL) {
11934 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11935 : }
11936 12 : if (r->in.return_authenticator == NULL) {
11937 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11938 : }
11939 12 : if (r->in.sync_context == NULL) {
11940 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11941 : }
11942 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
11943 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11944 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
11945 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));
11946 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
11947 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11948 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
11949 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));
11950 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
11951 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
11952 12 : NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
11953 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.sync_context));
11954 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
11955 : }
11956 27 : if (flags & NDR_OUT) {
11957 15 : if (r->out.return_authenticator == NULL) {
11958 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11959 : }
11960 15 : if (r->out.sync_context == NULL) {
11961 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11962 : }
11963 15 : if (r->out.delta_enum_array == NULL) {
11964 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11965 : }
11966 15 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
11967 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context));
11968 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
11969 15 : if (*r->out.delta_enum_array) {
11970 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
11971 : }
11972 15 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11973 : }
11974 27 : return NDR_ERR_SUCCESS;
11975 : }
11976 :
11977 24 : static enum ndr_err_code ndr_pull_netr_DatabaseSync(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync *r)
11978 : {
11979 24 : uint32_t size_logon_server_1 = 0;
11980 24 : uint32_t length_logon_server_1 = 0;
11981 24 : uint32_t size_computername_1 = 0;
11982 24 : uint32_t length_computername_1 = 0;
11983 : uint32_t _ptr_delta_enum_array;
11984 24 : TALLOC_CTX *_mem_save_credential_0 = NULL;
11985 24 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
11986 24 : TALLOC_CTX *_mem_save_sync_context_0 = NULL;
11987 24 : TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
11988 24 : TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
11989 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11990 24 : if (flags & NDR_IN) {
11991 12 : NDR_ZERO_STRUCT(r->out);
11992 :
11993 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
11994 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
11995 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
11996 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
11997 12 : if (length_logon_server_1 > size_logon_server_1) {
11998 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
11999 : }
12000 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12001 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12002 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
12003 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
12004 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
12005 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
12006 12 : if (length_computername_1 > size_computername_1) {
12007 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computername_1, length_computername_1);
12008 : }
12009 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
12010 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
12011 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12012 12 : NDR_PULL_ALLOC(ndr, r->in.credential);
12013 : }
12014 12 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
12015 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
12016 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
12017 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
12018 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12019 12 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12020 : }
12021 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12022 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12023 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
12024 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12025 12 : NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
12026 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12027 12 : NDR_PULL_ALLOC(ndr, r->in.sync_context);
12028 : }
12029 12 : _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
12030 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sync_context, LIBNDR_FLAG_REF_ALLOC);
12031 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.sync_context));
12032 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
12033 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
12034 12 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12035 12 : *r->out.return_authenticator = *r->in.return_authenticator;
12036 12 : NDR_PULL_ALLOC(ndr, r->out.sync_context);
12037 12 : *r->out.sync_context = *r->in.sync_context;
12038 12 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
12039 12 : NDR_ZERO_STRUCTP(r->out.delta_enum_array);
12040 : }
12041 24 : if (flags & NDR_OUT) {
12042 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12043 : if (r->in.credential == NULL) {
12044 : NDR_PULL_ALLOC(ndr, r->in.credential);
12045 : NDR_ZERO_STRUCTP(r->in.credential);
12046 : }
12047 : if (r->in.return_authenticator == NULL) {
12048 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12049 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
12050 : }
12051 : if (r->in.sync_context == NULL) {
12052 : NDR_PULL_ALLOC(ndr, r->in.sync_context);
12053 : NDR_ZERO_STRUCTP(r->in.sync_context);
12054 : }
12055 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12056 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12057 3 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12058 : }
12059 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12060 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12061 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12062 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12063 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12064 3 : NDR_PULL_ALLOC(ndr, r->out.sync_context);
12065 : }
12066 12 : _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
12067 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC);
12068 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context));
12069 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
12070 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12071 3 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
12072 : }
12073 12 : _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12074 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
12075 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
12076 12 : if (_ptr_delta_enum_array) {
12077 0 : NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
12078 : } else {
12079 12 : *r->out.delta_enum_array = NULL;
12080 : }
12081 12 : if (*r->out.delta_enum_array) {
12082 0 : _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12083 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
12084 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
12085 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
12086 : }
12087 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
12088 12 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12089 : }
12090 24 : return NDR_ERR_SUCCESS;
12091 : }
12092 :
12093 6 : _PUBLIC_ void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync *r)
12094 : {
12095 6 : ndr_print_struct(ndr, name, "netr_DatabaseSync");
12096 6 : if (r == NULL) { ndr_print_null(ndr); return; }
12097 6 : ndr->depth++;
12098 6 : if (flags & NDR_SET_VALUES) {
12099 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12100 : }
12101 6 : if (flags & NDR_IN) {
12102 0 : ndr_print_struct(ndr, "in", "netr_DatabaseSync");
12103 0 : ndr->depth++;
12104 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12105 0 : ndr->depth++;
12106 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12107 0 : ndr->depth--;
12108 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
12109 0 : ndr->depth++;
12110 0 : ndr_print_string(ndr, "computername", r->in.computername);
12111 0 : ndr->depth--;
12112 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
12113 0 : ndr->depth++;
12114 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
12115 0 : ndr->depth--;
12116 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
12117 0 : ndr->depth++;
12118 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
12119 0 : ndr->depth--;
12120 0 : ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
12121 0 : ndr_print_ptr(ndr, "sync_context", r->in.sync_context);
12122 0 : ndr->depth++;
12123 0 : ndr_print_uint32(ndr, "sync_context", *r->in.sync_context);
12124 0 : ndr->depth--;
12125 0 : ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
12126 0 : ndr->depth--;
12127 : }
12128 6 : if (flags & NDR_OUT) {
12129 6 : ndr_print_struct(ndr, "out", "netr_DatabaseSync");
12130 6 : ndr->depth++;
12131 6 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
12132 6 : ndr->depth++;
12133 6 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
12134 6 : ndr->depth--;
12135 6 : ndr_print_ptr(ndr, "sync_context", r->out.sync_context);
12136 6 : ndr->depth++;
12137 6 : ndr_print_uint32(ndr, "sync_context", *r->out.sync_context);
12138 6 : ndr->depth--;
12139 6 : ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
12140 6 : ndr->depth++;
12141 6 : ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
12142 6 : ndr->depth++;
12143 6 : if (*r->out.delta_enum_array) {
12144 0 : ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
12145 : }
12146 6 : ndr->depth--;
12147 6 : ndr->depth--;
12148 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12149 6 : ndr->depth--;
12150 : }
12151 6 : ndr->depth--;
12152 : }
12153 :
12154 27 : static enum ndr_err_code ndr_push_netr_AccountDeltas(struct ndr_push *ndr, int flags, const struct netr_AccountDeltas *r)
12155 : {
12156 27 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12157 27 : if (flags & NDR_IN) {
12158 12 : if (r->in.computername == NULL) {
12159 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12160 : }
12161 12 : if (r->in.return_authenticator == NULL) {
12162 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12163 : }
12164 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
12165 12 : if (r->in.logon_server) {
12166 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12167 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12168 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12169 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));
12170 : }
12171 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
12172 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12173 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
12174 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));
12175 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
12176 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
12177 12 : NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, &r->in.uas));
12178 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
12179 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
12180 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffersize));
12181 : }
12182 27 : if (flags & NDR_OUT) {
12183 15 : if (r->out.return_authenticator == NULL) {
12184 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12185 : }
12186 15 : if (r->out.buffer == NULL) {
12187 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12188 : }
12189 15 : if (r->out.count_returned == NULL) {
12190 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12191 : }
12192 15 : if (r->out.total_entries == NULL) {
12193 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12194 : }
12195 15 : if (r->out.recordid == NULL) {
12196 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12197 : }
12198 15 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12199 : {
12200 : struct ndr_push *_ndr_buffer;
12201 15 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_buffer, 4, -1));
12202 15 : NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
12203 15 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_buffer, 4, -1));
12204 : }
12205 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count_returned));
12206 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
12207 15 : NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
12208 15 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12209 : }
12210 27 : return NDR_ERR_SUCCESS;
12211 : }
12212 :
12213 24 : static enum ndr_err_code ndr_pull_netr_AccountDeltas(struct ndr_pull *ndr, int flags, struct netr_AccountDeltas *r)
12214 : {
12215 : uint32_t _ptr_logon_server;
12216 24 : uint32_t size_logon_server_1 = 0;
12217 24 : uint32_t length_logon_server_1 = 0;
12218 24 : uint32_t size_computername_1 = 0;
12219 24 : uint32_t length_computername_1 = 0;
12220 24 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
12221 24 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
12222 24 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
12223 24 : TALLOC_CTX *_mem_save_count_returned_0 = NULL;
12224 24 : TALLOC_CTX *_mem_save_total_entries_0 = NULL;
12225 24 : TALLOC_CTX *_mem_save_recordid_0 = NULL;
12226 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12227 24 : if (flags & NDR_IN) {
12228 12 : NDR_ZERO_STRUCT(r->out);
12229 :
12230 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
12231 12 : if (_ptr_logon_server) {
12232 12 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
12233 : } else {
12234 0 : r->in.logon_server = NULL;
12235 : }
12236 12 : if (r->in.logon_server) {
12237 12 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
12238 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
12239 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
12240 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
12241 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
12242 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
12243 12 : if (length_logon_server_1 > size_logon_server_1) {
12244 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
12245 : }
12246 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12247 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12248 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
12249 : }
12250 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
12251 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
12252 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
12253 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
12254 12 : if (length_computername_1 > size_computername_1) {
12255 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computername_1, length_computername_1);
12256 : }
12257 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
12258 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
12259 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
12260 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12261 12 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12262 : }
12263 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12264 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12265 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
12266 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12267 12 : NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, &r->in.uas));
12268 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
12269 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
12270 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffersize));
12271 12 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12272 12 : *r->out.return_authenticator = *r->in.return_authenticator;
12273 12 : NDR_PULL_ALLOC(ndr, r->out.buffer);
12274 12 : NDR_ZERO_STRUCTP(r->out.buffer);
12275 12 : NDR_PULL_ALLOC(ndr, r->out.count_returned);
12276 12 : NDR_ZERO_STRUCTP(r->out.count_returned);
12277 12 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
12278 12 : NDR_ZERO_STRUCTP(r->out.total_entries);
12279 12 : NDR_PULL_ALLOC(ndr, r->out.recordid);
12280 12 : NDR_ZERO_STRUCTP(r->out.recordid);
12281 : }
12282 24 : if (flags & NDR_OUT) {
12283 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12284 : if (r->in.return_authenticator == NULL) {
12285 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12286 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
12287 : }
12288 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12289 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12290 3 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12291 : }
12292 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12293 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12294 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12295 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12296 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12297 3 : NDR_PULL_ALLOC(ndr, r->out.buffer);
12298 : }
12299 12 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
12300 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, LIBNDR_FLAG_REF_ALLOC);
12301 : {
12302 : struct ndr_pull *_ndr_buffer;
12303 12 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 4, -1));
12304 12 : NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
12305 12 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 4, -1));
12306 : }
12307 15 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, LIBNDR_FLAG_REF_ALLOC);
12308 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12309 3 : NDR_PULL_ALLOC(ndr, r->out.count_returned);
12310 : }
12311 12 : _mem_save_count_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
12312 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count_returned, LIBNDR_FLAG_REF_ALLOC);
12313 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count_returned));
12314 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_returned_0, LIBNDR_FLAG_REF_ALLOC);
12315 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12316 3 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
12317 : }
12318 12 : _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
12319 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
12320 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
12321 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
12322 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12323 3 : NDR_PULL_ALLOC(ndr, r->out.recordid);
12324 : }
12325 12 : _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
12326 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.recordid, LIBNDR_FLAG_REF_ALLOC);
12327 12 : NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
12328 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
12329 12 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12330 : }
12331 24 : return NDR_ERR_SUCCESS;
12332 : }
12333 :
12334 6 : _PUBLIC_ void ndr_print_netr_AccountDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountDeltas *r)
12335 : {
12336 6 : ndr_print_struct(ndr, name, "netr_AccountDeltas");
12337 6 : if (r == NULL) { ndr_print_null(ndr); return; }
12338 6 : ndr->depth++;
12339 6 : if (flags & NDR_SET_VALUES) {
12340 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12341 : }
12342 6 : if (flags & NDR_IN) {
12343 0 : ndr_print_struct(ndr, "in", "netr_AccountDeltas");
12344 0 : ndr->depth++;
12345 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12346 0 : ndr->depth++;
12347 0 : if (r->in.logon_server) {
12348 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12349 : }
12350 0 : ndr->depth--;
12351 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
12352 0 : ndr->depth++;
12353 0 : ndr_print_string(ndr, "computername", r->in.computername);
12354 0 : ndr->depth--;
12355 0 : ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
12356 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
12357 0 : ndr->depth++;
12358 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
12359 0 : ndr->depth--;
12360 0 : ndr_print_netr_UAS_INFO_0(ndr, "uas", &r->in.uas);
12361 0 : ndr_print_uint32(ndr, "count", r->in.count);
12362 0 : ndr_print_uint32(ndr, "level", r->in.level);
12363 0 : ndr_print_uint32(ndr, "buffersize", r->in.buffersize);
12364 0 : ndr->depth--;
12365 : }
12366 6 : if (flags & NDR_OUT) {
12367 6 : ndr_print_struct(ndr, "out", "netr_AccountDeltas");
12368 6 : ndr->depth++;
12369 6 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
12370 6 : ndr->depth++;
12371 6 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
12372 6 : ndr->depth--;
12373 6 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
12374 6 : ndr->depth++;
12375 6 : ndr_print_netr_AccountBuffer(ndr, "buffer", r->out.buffer);
12376 6 : ndr->depth--;
12377 6 : ndr_print_ptr(ndr, "count_returned", r->out.count_returned);
12378 6 : ndr->depth++;
12379 6 : ndr_print_uint32(ndr, "count_returned", *r->out.count_returned);
12380 6 : ndr->depth--;
12381 6 : ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
12382 6 : ndr->depth++;
12383 6 : ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
12384 6 : ndr->depth--;
12385 6 : ndr_print_ptr(ndr, "recordid", r->out.recordid);
12386 6 : ndr->depth++;
12387 6 : ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->out.recordid);
12388 6 : ndr->depth--;
12389 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12390 6 : ndr->depth--;
12391 : }
12392 6 : ndr->depth--;
12393 : }
12394 :
12395 27 : static enum ndr_err_code ndr_push_netr_AccountSync(struct ndr_push *ndr, int flags, const struct netr_AccountSync *r)
12396 : {
12397 27 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12398 27 : if (flags & NDR_IN) {
12399 12 : if (r->in.computername == NULL) {
12400 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12401 : }
12402 12 : if (r->in.return_authenticator == NULL) {
12403 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12404 : }
12405 12 : if (r->in.recordid == NULL) {
12406 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12407 : }
12408 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
12409 12 : if (r->in.logon_server) {
12410 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12411 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12412 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12413 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));
12414 : }
12415 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
12416 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12417 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
12418 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));
12419 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
12420 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
12421 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reference));
12422 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
12423 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffersize));
12424 12 : NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->in.recordid));
12425 : }
12426 27 : if (flags & NDR_OUT) {
12427 15 : if (r->out.return_authenticator == NULL) {
12428 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12429 : }
12430 15 : if (r->out.buffer == NULL) {
12431 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12432 : }
12433 15 : if (r->out.count_returned == NULL) {
12434 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12435 : }
12436 15 : if (r->out.total_entries == NULL) {
12437 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12438 : }
12439 15 : if (r->out.next_reference == NULL) {
12440 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12441 : }
12442 15 : if (r->out.recordid == NULL) {
12443 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12444 : }
12445 15 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12446 : {
12447 : struct ndr_push *_ndr_buffer;
12448 15 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_buffer, 4, -1));
12449 15 : NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
12450 15 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_buffer, 4, -1));
12451 : }
12452 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count_returned));
12453 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
12454 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.next_reference));
12455 15 : NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
12456 15 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12457 : }
12458 27 : return NDR_ERR_SUCCESS;
12459 : }
12460 :
12461 24 : static enum ndr_err_code ndr_pull_netr_AccountSync(struct ndr_pull *ndr, int flags, struct netr_AccountSync *r)
12462 : {
12463 : uint32_t _ptr_logon_server;
12464 24 : uint32_t size_logon_server_1 = 0;
12465 24 : uint32_t length_logon_server_1 = 0;
12466 24 : uint32_t size_computername_1 = 0;
12467 24 : uint32_t length_computername_1 = 0;
12468 24 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
12469 24 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
12470 24 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
12471 24 : TALLOC_CTX *_mem_save_count_returned_0 = NULL;
12472 24 : TALLOC_CTX *_mem_save_total_entries_0 = NULL;
12473 24 : TALLOC_CTX *_mem_save_next_reference_0 = NULL;
12474 24 : TALLOC_CTX *_mem_save_recordid_0 = NULL;
12475 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12476 24 : if (flags & NDR_IN) {
12477 12 : NDR_ZERO_STRUCT(r->out);
12478 :
12479 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
12480 12 : if (_ptr_logon_server) {
12481 12 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
12482 : } else {
12483 0 : r->in.logon_server = NULL;
12484 : }
12485 12 : if (r->in.logon_server) {
12486 12 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
12487 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
12488 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
12489 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
12490 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
12491 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
12492 12 : if (length_logon_server_1 > size_logon_server_1) {
12493 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
12494 : }
12495 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12496 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12497 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
12498 : }
12499 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
12500 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
12501 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
12502 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
12503 12 : if (length_computername_1 > size_computername_1) {
12504 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computername_1, length_computername_1);
12505 : }
12506 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
12507 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
12508 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
12509 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12510 12 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12511 : }
12512 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12513 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12514 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
12515 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12516 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reference));
12517 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
12518 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffersize));
12519 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12520 12 : NDR_PULL_ALLOC(ndr, r->in.recordid);
12521 : }
12522 12 : _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
12523 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.recordid, LIBNDR_FLAG_REF_ALLOC);
12524 12 : NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->in.recordid));
12525 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
12526 12 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12527 12 : *r->out.return_authenticator = *r->in.return_authenticator;
12528 12 : NDR_PULL_ALLOC(ndr, r->out.buffer);
12529 12 : NDR_ZERO_STRUCTP(r->out.buffer);
12530 12 : NDR_PULL_ALLOC(ndr, r->out.count_returned);
12531 12 : NDR_ZERO_STRUCTP(r->out.count_returned);
12532 12 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
12533 12 : NDR_ZERO_STRUCTP(r->out.total_entries);
12534 12 : NDR_PULL_ALLOC(ndr, r->out.next_reference);
12535 12 : NDR_ZERO_STRUCTP(r->out.next_reference);
12536 12 : NDR_PULL_ALLOC(ndr, r->out.recordid);
12537 12 : *r->out.recordid = *r->in.recordid;
12538 : }
12539 24 : if (flags & NDR_OUT) {
12540 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12541 : if (r->in.return_authenticator == NULL) {
12542 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
12543 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
12544 : }
12545 : if (r->in.recordid == NULL) {
12546 : NDR_PULL_ALLOC(ndr, r->in.recordid);
12547 : NDR_ZERO_STRUCTP(r->in.recordid);
12548 : }
12549 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12550 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12551 3 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
12552 : }
12553 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
12554 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
12555 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
12556 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
12557 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12558 3 : NDR_PULL_ALLOC(ndr, r->out.buffer);
12559 : }
12560 12 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
12561 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, LIBNDR_FLAG_REF_ALLOC);
12562 : {
12563 : struct ndr_pull *_ndr_buffer;
12564 12 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 4, -1));
12565 12 : NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
12566 12 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 4, -1));
12567 : }
12568 15 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, LIBNDR_FLAG_REF_ALLOC);
12569 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12570 3 : NDR_PULL_ALLOC(ndr, r->out.count_returned);
12571 : }
12572 12 : _mem_save_count_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
12573 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.count_returned, LIBNDR_FLAG_REF_ALLOC);
12574 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count_returned));
12575 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_returned_0, LIBNDR_FLAG_REF_ALLOC);
12576 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12577 3 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
12578 : }
12579 12 : _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
12580 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
12581 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
12582 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
12583 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12584 3 : NDR_PULL_ALLOC(ndr, r->out.next_reference);
12585 : }
12586 12 : _mem_save_next_reference_0 = NDR_PULL_GET_MEM_CTX(ndr);
12587 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.next_reference, LIBNDR_FLAG_REF_ALLOC);
12588 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.next_reference));
12589 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_reference_0, LIBNDR_FLAG_REF_ALLOC);
12590 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12591 3 : NDR_PULL_ALLOC(ndr, r->out.recordid);
12592 : }
12593 12 : _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
12594 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.recordid, LIBNDR_FLAG_REF_ALLOC);
12595 12 : NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
12596 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
12597 12 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12598 : }
12599 24 : return NDR_ERR_SUCCESS;
12600 : }
12601 :
12602 6 : _PUBLIC_ void ndr_print_netr_AccountSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountSync *r)
12603 : {
12604 6 : ndr_print_struct(ndr, name, "netr_AccountSync");
12605 6 : if (r == NULL) { ndr_print_null(ndr); return; }
12606 6 : ndr->depth++;
12607 6 : if (flags & NDR_SET_VALUES) {
12608 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12609 : }
12610 6 : if (flags & NDR_IN) {
12611 0 : ndr_print_struct(ndr, "in", "netr_AccountSync");
12612 0 : ndr->depth++;
12613 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12614 0 : ndr->depth++;
12615 0 : if (r->in.logon_server) {
12616 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12617 : }
12618 0 : ndr->depth--;
12619 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
12620 0 : ndr->depth++;
12621 0 : ndr_print_string(ndr, "computername", r->in.computername);
12622 0 : ndr->depth--;
12623 0 : ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
12624 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
12625 0 : ndr->depth++;
12626 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
12627 0 : ndr->depth--;
12628 0 : ndr_print_uint32(ndr, "reference", r->in.reference);
12629 0 : ndr_print_uint32(ndr, "level", r->in.level);
12630 0 : ndr_print_uint32(ndr, "buffersize", r->in.buffersize);
12631 0 : ndr_print_ptr(ndr, "recordid", r->in.recordid);
12632 0 : ndr->depth++;
12633 0 : ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->in.recordid);
12634 0 : ndr->depth--;
12635 0 : ndr->depth--;
12636 : }
12637 6 : if (flags & NDR_OUT) {
12638 6 : ndr_print_struct(ndr, "out", "netr_AccountSync");
12639 6 : ndr->depth++;
12640 6 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
12641 6 : ndr->depth++;
12642 6 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
12643 6 : ndr->depth--;
12644 6 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
12645 6 : ndr->depth++;
12646 6 : ndr_print_netr_AccountBuffer(ndr, "buffer", r->out.buffer);
12647 6 : ndr->depth--;
12648 6 : ndr_print_ptr(ndr, "count_returned", r->out.count_returned);
12649 6 : ndr->depth++;
12650 6 : ndr_print_uint32(ndr, "count_returned", *r->out.count_returned);
12651 6 : ndr->depth--;
12652 6 : ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
12653 6 : ndr->depth++;
12654 6 : ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
12655 6 : ndr->depth--;
12656 6 : ndr_print_ptr(ndr, "next_reference", r->out.next_reference);
12657 6 : ndr->depth++;
12658 6 : ndr_print_uint32(ndr, "next_reference", *r->out.next_reference);
12659 6 : ndr->depth--;
12660 6 : ndr_print_ptr(ndr, "recordid", r->out.recordid);
12661 6 : ndr->depth++;
12662 6 : ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->out.recordid);
12663 6 : ndr->depth--;
12664 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
12665 6 : ndr->depth--;
12666 : }
12667 6 : ndr->depth--;
12668 : }
12669 :
12670 27 : static enum ndr_err_code ndr_push_netr_GetDcName(struct ndr_push *ndr, int flags, const struct netr_GetDcName *r)
12671 : {
12672 27 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12673 27 : if (flags & NDR_IN) {
12674 12 : if (r->in.logon_server == NULL) {
12675 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12676 : }
12677 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12678 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12679 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12680 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));
12681 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domainname));
12682 12 : if (r->in.domainname) {
12683 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
12684 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12685 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
12686 12 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domainname, ndr_charset_length(r->in.domainname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12687 : }
12688 : }
12689 27 : if (flags & NDR_OUT) {
12690 15 : if (r->out.dcname == NULL) {
12691 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12692 : }
12693 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dcname));
12694 15 : if (*r->out.dcname) {
12695 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
12696 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12697 15 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
12698 15 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12699 : }
12700 15 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
12701 : }
12702 27 : return NDR_ERR_SUCCESS;
12703 : }
12704 :
12705 24 : static enum ndr_err_code ndr_pull_netr_GetDcName(struct ndr_pull *ndr, int flags, struct netr_GetDcName *r)
12706 : {
12707 24 : uint32_t size_logon_server_1 = 0;
12708 24 : uint32_t length_logon_server_1 = 0;
12709 : uint32_t _ptr_domainname;
12710 24 : uint32_t size_domainname_1 = 0;
12711 24 : uint32_t length_domainname_1 = 0;
12712 : uint32_t _ptr_dcname;
12713 24 : uint32_t size_dcname_2 = 0;
12714 24 : uint32_t length_dcname_2 = 0;
12715 24 : TALLOC_CTX *_mem_save_domainname_0 = NULL;
12716 24 : TALLOC_CTX *_mem_save_dcname_0 = NULL;
12717 24 : TALLOC_CTX *_mem_save_dcname_1 = NULL;
12718 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12719 24 : if (flags & NDR_IN) {
12720 12 : NDR_ZERO_STRUCT(r->out);
12721 :
12722 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
12723 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
12724 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
12725 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
12726 12 : if (length_logon_server_1 > size_logon_server_1) {
12727 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
12728 : }
12729 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12730 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12731 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domainname));
12732 12 : if (_ptr_domainname) {
12733 12 : NDR_PULL_ALLOC(ndr, r->in.domainname);
12734 : } else {
12735 0 : r->in.domainname = NULL;
12736 : }
12737 12 : if (r->in.domainname) {
12738 12 : _mem_save_domainname_0 = NDR_PULL_GET_MEM_CTX(ndr);
12739 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domainname, 0);
12740 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domainname));
12741 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domainname));
12742 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domainname, &size_domainname_1));
12743 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domainname, &length_domainname_1));
12744 12 : if (length_domainname_1 > size_domainname_1) {
12745 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domainname_1, length_domainname_1);
12746 : }
12747 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domainname_1, sizeof(uint16_t)));
12748 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domainname, length_domainname_1, sizeof(uint16_t), CH_UTF16));
12749 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domainname_0, 0);
12750 : }
12751 12 : NDR_PULL_ALLOC(ndr, r->out.dcname);
12752 12 : NDR_ZERO_STRUCTP(r->out.dcname);
12753 : }
12754 24 : if (flags & NDR_OUT) {
12755 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12756 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12757 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12758 3 : NDR_PULL_ALLOC(ndr, r->out.dcname);
12759 : }
12760 12 : _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr);
12761 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC);
12762 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dcname));
12763 12 : if (_ptr_dcname) {
12764 12 : NDR_PULL_ALLOC(ndr, *r->out.dcname);
12765 : } else {
12766 0 : *r->out.dcname = NULL;
12767 : }
12768 12 : if (*r->out.dcname) {
12769 12 : _mem_save_dcname_1 = NDR_PULL_GET_MEM_CTX(ndr);
12770 12 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.dcname, 0);
12771 12 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname));
12772 12 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname));
12773 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.dcname, &size_dcname_2));
12774 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.dcname, &length_dcname_2));
12775 12 : if (length_dcname_2 > size_dcname_2) {
12776 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dcname_2, length_dcname_2);
12777 : }
12778 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dcname_2, sizeof(uint16_t)));
12779 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, length_dcname_2, sizeof(uint16_t), CH_UTF16));
12780 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_1, 0);
12781 : }
12782 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC);
12783 12 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
12784 : }
12785 24 : return NDR_ERR_SUCCESS;
12786 : }
12787 :
12788 6 : _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetDcName *r)
12789 : {
12790 6 : ndr_print_struct(ndr, name, "netr_GetDcName");
12791 6 : if (r == NULL) { ndr_print_null(ndr); return; }
12792 6 : ndr->depth++;
12793 6 : if (flags & NDR_SET_VALUES) {
12794 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12795 : }
12796 6 : if (flags & NDR_IN) {
12797 0 : ndr_print_struct(ndr, "in", "netr_GetDcName");
12798 0 : ndr->depth++;
12799 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12800 0 : ndr->depth++;
12801 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12802 0 : ndr->depth--;
12803 0 : ndr_print_ptr(ndr, "domainname", r->in.domainname);
12804 0 : ndr->depth++;
12805 0 : if (r->in.domainname) {
12806 0 : ndr_print_string(ndr, "domainname", r->in.domainname);
12807 : }
12808 0 : ndr->depth--;
12809 0 : ndr->depth--;
12810 : }
12811 6 : if (flags & NDR_OUT) {
12812 6 : ndr_print_struct(ndr, "out", "netr_GetDcName");
12813 6 : ndr->depth++;
12814 6 : ndr_print_ptr(ndr, "dcname", r->out.dcname);
12815 6 : ndr->depth++;
12816 6 : ndr_print_ptr(ndr, "dcname", *r->out.dcname);
12817 6 : ndr->depth++;
12818 6 : if (*r->out.dcname) {
12819 6 : ndr_print_string(ndr, "dcname", *r->out.dcname);
12820 : }
12821 6 : ndr->depth--;
12822 6 : ndr->depth--;
12823 6 : ndr_print_WERROR(ndr, "result", r->out.result);
12824 6 : ndr->depth--;
12825 : }
12826 6 : ndr->depth--;
12827 : }
12828 :
12829 5323 : static enum ndr_err_code ndr_push_netr_LogonControl(struct ndr_push *ndr, int flags, const struct netr_LogonControl *r)
12830 : {
12831 5323 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12832 5323 : if (flags & NDR_IN) {
12833 2340 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
12834 2340 : if (r->in.logon_server) {
12835 2340 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12836 2340 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12837 2340 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12838 2340 : 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));
12839 : }
12840 2340 : NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
12841 2340 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
12842 : }
12843 5323 : if (flags & NDR_OUT) {
12844 2983 : if (r->out.query == NULL) {
12845 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12846 : }
12847 2983 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
12848 2983 : NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
12849 2983 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
12850 : }
12851 5323 : return NDR_ERR_SUCCESS;
12852 : }
12853 :
12854 4738 : static enum ndr_err_code ndr_pull_netr_LogonControl(struct ndr_pull *ndr, int flags, struct netr_LogonControl *r)
12855 : {
12856 : uint32_t _ptr_logon_server;
12857 4738 : uint32_t size_logon_server_1 = 0;
12858 4738 : uint32_t length_logon_server_1 = 0;
12859 4738 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
12860 4738 : TALLOC_CTX *_mem_save_query_0 = NULL;
12861 4738 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12862 4738 : if (flags & NDR_IN) {
12863 2398 : NDR_ZERO_STRUCT(r->out);
12864 :
12865 2398 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
12866 2398 : if (_ptr_logon_server) {
12867 2398 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
12868 : } else {
12869 0 : r->in.logon_server = NULL;
12870 : }
12871 2398 : if (r->in.logon_server) {
12872 2398 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
12873 2398 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
12874 2398 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
12875 2398 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
12876 2398 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
12877 2398 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
12878 2398 : if (length_logon_server_1 > size_logon_server_1) {
12879 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
12880 : }
12881 2398 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
12882 2398 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
12883 2398 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
12884 : }
12885 2398 : NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
12886 2398 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
12887 2398 : NDR_PULL_ALLOC(ndr, r->out.query);
12888 2398 : NDR_ZERO_STRUCTP(r->out.query);
12889 : }
12890 4738 : if (flags & NDR_OUT) {
12891 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
12892 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
12893 2340 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12894 585 : NDR_PULL_ALLOC(ndr, r->out.query);
12895 : }
12896 2340 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
12897 2340 : NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
12898 2340 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level));
12899 2340 : NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
12900 2340 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
12901 2340 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
12902 : }
12903 4738 : return NDR_ERR_SUCCESS;
12904 : }
12905 :
12906 1170 : _PUBLIC_ void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl *r)
12907 : {
12908 1170 : ndr_print_struct(ndr, name, "netr_LogonControl");
12909 1170 : if (r == NULL) { ndr_print_null(ndr); return; }
12910 1170 : ndr->depth++;
12911 1170 : if (flags & NDR_SET_VALUES) {
12912 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12913 : }
12914 1170 : if (flags & NDR_IN) {
12915 0 : ndr_print_struct(ndr, "in", "netr_LogonControl");
12916 0 : ndr->depth++;
12917 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
12918 0 : ndr->depth++;
12919 0 : if (r->in.logon_server) {
12920 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
12921 : }
12922 0 : ndr->depth--;
12923 0 : ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
12924 0 : ndr_print_uint32(ndr, "level", r->in.level);
12925 0 : ndr->depth--;
12926 : }
12927 1170 : if (flags & NDR_OUT) {
12928 1170 : ndr_print_struct(ndr, "out", "netr_LogonControl");
12929 1170 : ndr->depth++;
12930 1170 : ndr_print_ptr(ndr, "query", r->out.query);
12931 1170 : ndr->depth++;
12932 1170 : ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
12933 1170 : ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
12934 1170 : ndr->depth--;
12935 1170 : ndr_print_WERROR(ndr, "result", r->out.result);
12936 1170 : ndr->depth--;
12937 : }
12938 1170 : ndr->depth--;
12939 : }
12940 :
12941 81 : static enum ndr_err_code ndr_push_netr_GetAnyDCName(struct ndr_push *ndr, int flags, const struct netr_GetAnyDCName *r)
12942 : {
12943 81 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
12944 81 : if (flags & NDR_IN) {
12945 36 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
12946 36 : if (r->in.logon_server) {
12947 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12948 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12949 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
12950 36 : 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));
12951 : }
12952 36 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domainname));
12953 36 : if (r->in.domainname) {
12954 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
12955 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12956 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
12957 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));
12958 : }
12959 : }
12960 81 : if (flags & NDR_OUT) {
12961 45 : if (r->out.dcname == NULL) {
12962 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12963 : }
12964 45 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dcname));
12965 45 : if (*r->out.dcname) {
12966 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
12967 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12968 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
12969 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));
12970 : }
12971 45 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
12972 : }
12973 81 : return NDR_ERR_SUCCESS;
12974 : }
12975 :
12976 72 : static enum ndr_err_code ndr_pull_netr_GetAnyDCName(struct ndr_pull *ndr, int flags, struct netr_GetAnyDCName *r)
12977 : {
12978 : uint32_t _ptr_logon_server;
12979 72 : uint32_t size_logon_server_1 = 0;
12980 72 : uint32_t length_logon_server_1 = 0;
12981 : uint32_t _ptr_domainname;
12982 72 : uint32_t size_domainname_1 = 0;
12983 72 : uint32_t length_domainname_1 = 0;
12984 : uint32_t _ptr_dcname;
12985 72 : uint32_t size_dcname_2 = 0;
12986 72 : uint32_t length_dcname_2 = 0;
12987 72 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
12988 72 : TALLOC_CTX *_mem_save_domainname_0 = NULL;
12989 72 : TALLOC_CTX *_mem_save_dcname_0 = NULL;
12990 72 : TALLOC_CTX *_mem_save_dcname_1 = NULL;
12991 72 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
12992 72 : if (flags & NDR_IN) {
12993 36 : NDR_ZERO_STRUCT(r->out);
12994 :
12995 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
12996 36 : if (_ptr_logon_server) {
12997 36 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
12998 : } else {
12999 0 : r->in.logon_server = NULL;
13000 : }
13001 36 : if (r->in.logon_server) {
13002 36 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
13003 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
13004 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
13005 36 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
13006 36 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
13007 36 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
13008 36 : if (length_logon_server_1 > size_logon_server_1) {
13009 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
13010 : }
13011 36 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
13012 36 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
13013 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
13014 : }
13015 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domainname));
13016 36 : if (_ptr_domainname) {
13017 24 : NDR_PULL_ALLOC(ndr, r->in.domainname);
13018 : } else {
13019 12 : r->in.domainname = NULL;
13020 : }
13021 36 : if (r->in.domainname) {
13022 24 : _mem_save_domainname_0 = NDR_PULL_GET_MEM_CTX(ndr);
13023 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domainname, 0);
13024 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domainname));
13025 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domainname));
13026 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domainname, &size_domainname_1));
13027 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domainname, &length_domainname_1));
13028 24 : if (length_domainname_1 > size_domainname_1) {
13029 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domainname_1, length_domainname_1);
13030 : }
13031 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domainname_1, sizeof(uint16_t)));
13032 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domainname, length_domainname_1, sizeof(uint16_t), CH_UTF16));
13033 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domainname_0, 0);
13034 : }
13035 36 : NDR_PULL_ALLOC(ndr, r->out.dcname);
13036 36 : NDR_ZERO_STRUCTP(r->out.dcname);
13037 : }
13038 72 : if (flags & NDR_OUT) {
13039 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13040 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13041 36 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13042 9 : NDR_PULL_ALLOC(ndr, r->out.dcname);
13043 : }
13044 36 : _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr);
13045 36 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC);
13046 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dcname));
13047 36 : if (_ptr_dcname) {
13048 0 : NDR_PULL_ALLOC(ndr, *r->out.dcname);
13049 : } else {
13050 36 : *r->out.dcname = NULL;
13051 : }
13052 36 : if (*r->out.dcname) {
13053 0 : _mem_save_dcname_1 = NDR_PULL_GET_MEM_CTX(ndr);
13054 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.dcname, 0);
13055 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname));
13056 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname));
13057 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.dcname, &size_dcname_2));
13058 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.dcname, &length_dcname_2));
13059 0 : if (length_dcname_2 > size_dcname_2) {
13060 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dcname_2, length_dcname_2);
13061 : }
13062 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dcname_2, sizeof(uint16_t)));
13063 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, length_dcname_2, sizeof(uint16_t), CH_UTF16));
13064 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_1, 0);
13065 : }
13066 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC);
13067 36 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13068 : }
13069 72 : return NDR_ERR_SUCCESS;
13070 : }
13071 :
13072 18 : _PUBLIC_ void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetAnyDCName *r)
13073 : {
13074 18 : ndr_print_struct(ndr, name, "netr_GetAnyDCName");
13075 18 : if (r == NULL) { ndr_print_null(ndr); return; }
13076 18 : ndr->depth++;
13077 18 : if (flags & NDR_SET_VALUES) {
13078 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13079 : }
13080 18 : if (flags & NDR_IN) {
13081 0 : ndr_print_struct(ndr, "in", "netr_GetAnyDCName");
13082 0 : ndr->depth++;
13083 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
13084 0 : ndr->depth++;
13085 0 : if (r->in.logon_server) {
13086 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
13087 : }
13088 0 : ndr->depth--;
13089 0 : ndr_print_ptr(ndr, "domainname", r->in.domainname);
13090 0 : ndr->depth++;
13091 0 : if (r->in.domainname) {
13092 0 : ndr_print_string(ndr, "domainname", r->in.domainname);
13093 : }
13094 0 : ndr->depth--;
13095 0 : ndr->depth--;
13096 : }
13097 18 : if (flags & NDR_OUT) {
13098 18 : ndr_print_struct(ndr, "out", "netr_GetAnyDCName");
13099 18 : ndr->depth++;
13100 18 : ndr_print_ptr(ndr, "dcname", r->out.dcname);
13101 18 : ndr->depth++;
13102 18 : ndr_print_ptr(ndr, "dcname", *r->out.dcname);
13103 18 : ndr->depth++;
13104 18 : if (*r->out.dcname) {
13105 0 : ndr_print_string(ndr, "dcname", *r->out.dcname);
13106 : }
13107 18 : ndr->depth--;
13108 18 : ndr->depth--;
13109 18 : ndr_print_WERROR(ndr, "result", r->out.result);
13110 18 : ndr->depth--;
13111 : }
13112 18 : ndr->depth--;
13113 : }
13114 :
13115 1134 : static enum ndr_err_code ndr_push_netr_LogonControl2(struct ndr_push *ndr, int flags, const struct netr_LogonControl2 *r)
13116 : {
13117 1134 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13118 1134 : if (flags & NDR_IN) {
13119 504 : if (r->in.data == NULL) {
13120 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13121 : }
13122 504 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
13123 504 : if (r->in.logon_server) {
13124 504 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13125 504 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13126 504 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13127 504 : 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));
13128 : }
13129 504 : NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
13130 504 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13131 504 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.data, r->in.function_code));
13132 504 : NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
13133 : }
13134 1134 : if (flags & NDR_OUT) {
13135 630 : if (r->out.query == NULL) {
13136 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13137 : }
13138 630 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
13139 630 : NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
13140 630 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13141 : }
13142 1134 : return NDR_ERR_SUCCESS;
13143 : }
13144 :
13145 1008 : static enum ndr_err_code ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int flags, struct netr_LogonControl2 *r)
13146 : {
13147 : uint32_t _ptr_logon_server;
13148 1008 : uint32_t size_logon_server_1 = 0;
13149 1008 : uint32_t length_logon_server_1 = 0;
13150 1008 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
13151 1008 : TALLOC_CTX *_mem_save_data_0 = NULL;
13152 1008 : TALLOC_CTX *_mem_save_query_0 = NULL;
13153 1008 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13154 1008 : if (flags & NDR_IN) {
13155 504 : NDR_ZERO_STRUCT(r->out);
13156 :
13157 504 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
13158 504 : if (_ptr_logon_server) {
13159 504 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
13160 : } else {
13161 0 : r->in.logon_server = NULL;
13162 : }
13163 504 : if (r->in.logon_server) {
13164 504 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
13165 504 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
13166 504 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
13167 504 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
13168 504 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
13169 504 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
13170 504 : if (length_logon_server_1 > size_logon_server_1) {
13171 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
13172 : }
13173 504 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
13174 504 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
13175 504 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
13176 : }
13177 504 : NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
13178 504 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13179 504 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13180 504 : NDR_PULL_ALLOC(ndr, r->in.data);
13181 : }
13182 504 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
13183 504 : NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
13184 504 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.data, r->in.function_code));
13185 504 : NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
13186 504 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
13187 504 : NDR_PULL_ALLOC(ndr, r->out.query);
13188 504 : NDR_ZERO_STRUCTP(r->out.query);
13189 : }
13190 1008 : if (flags & NDR_OUT) {
13191 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13192 : if (r->in.data == NULL) {
13193 : NDR_PULL_ALLOC(ndr, r->in.data);
13194 : NDR_ZERO_STRUCTP(r->in.data);
13195 : }
13196 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13197 504 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13198 126 : NDR_PULL_ALLOC(ndr, r->out.query);
13199 : }
13200 504 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
13201 504 : NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
13202 504 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level));
13203 504 : NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
13204 504 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
13205 504 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13206 : }
13207 1008 : return NDR_ERR_SUCCESS;
13208 : }
13209 :
13210 252 : _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2 *r)
13211 : {
13212 252 : ndr_print_struct(ndr, name, "netr_LogonControl2");
13213 252 : if (r == NULL) { ndr_print_null(ndr); return; }
13214 252 : ndr->depth++;
13215 252 : if (flags & NDR_SET_VALUES) {
13216 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13217 : }
13218 252 : if (flags & NDR_IN) {
13219 0 : ndr_print_struct(ndr, "in", "netr_LogonControl2");
13220 0 : ndr->depth++;
13221 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
13222 0 : ndr->depth++;
13223 0 : if (r->in.logon_server) {
13224 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
13225 : }
13226 0 : ndr->depth--;
13227 0 : ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
13228 0 : ndr_print_uint32(ndr, "level", r->in.level);
13229 0 : ndr_print_ptr(ndr, "data", r->in.data);
13230 0 : ndr->depth++;
13231 0 : ndr_print_set_switch_value(ndr, r->in.data, r->in.function_code);
13232 0 : ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", r->in.data);
13233 0 : ndr->depth--;
13234 0 : ndr->depth--;
13235 : }
13236 252 : if (flags & NDR_OUT) {
13237 252 : ndr_print_struct(ndr, "out", "netr_LogonControl2");
13238 252 : ndr->depth++;
13239 252 : ndr_print_ptr(ndr, "query", r->out.query);
13240 252 : ndr->depth++;
13241 252 : ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
13242 252 : ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
13243 252 : ndr->depth--;
13244 252 : ndr_print_WERROR(ndr, "result", r->out.result);
13245 252 : ndr->depth--;
13246 : }
13247 252 : ndr->depth--;
13248 : }
13249 :
13250 1038 : static enum ndr_err_code ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate2 *r)
13251 : {
13252 1038 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13253 1038 : if (flags & NDR_IN) {
13254 473 : if (r->in.account_name == NULL) {
13255 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13256 : }
13257 473 : if (r->in.computer_name == NULL) {
13258 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13259 : }
13260 473 : if (r->in.credentials == NULL) {
13261 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13262 : }
13263 473 : if (r->in.negotiate_flags == NULL) {
13264 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13265 : }
13266 473 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
13267 473 : if (r->in.server_name) {
13268 237 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
13269 237 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13270 237 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
13271 237 : 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));
13272 : }
13273 473 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
13274 473 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13275 473 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
13276 473 : 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));
13277 473 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
13278 473 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
13279 473 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13280 473 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
13281 473 : 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));
13282 473 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
13283 473 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->in.negotiate_flags));
13284 : }
13285 1038 : if (flags & NDR_OUT) {
13286 565 : if (r->out.return_credentials == NULL) {
13287 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13288 : }
13289 565 : if (r->out.negotiate_flags == NULL) {
13290 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13291 : }
13292 565 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
13293 565 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->out.negotiate_flags));
13294 565 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13295 : }
13296 1038 : return NDR_ERR_SUCCESS;
13297 : }
13298 :
13299 947 : static enum ndr_err_code ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate2 *r)
13300 : {
13301 : uint32_t _ptr_server_name;
13302 947 : uint32_t size_server_name_1 = 0;
13303 947 : uint32_t length_server_name_1 = 0;
13304 947 : uint32_t size_account_name_1 = 0;
13305 947 : uint32_t length_account_name_1 = 0;
13306 947 : uint32_t size_computer_name_1 = 0;
13307 947 : uint32_t length_computer_name_1 = 0;
13308 947 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
13309 947 : TALLOC_CTX *_mem_save_credentials_0 = NULL;
13310 947 : TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
13311 947 : TALLOC_CTX *_mem_save_negotiate_flags_0 = NULL;
13312 947 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13313 947 : if (flags & NDR_IN) {
13314 474 : NDR_ZERO_STRUCT(r->out);
13315 :
13316 474 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
13317 474 : if (_ptr_server_name) {
13318 238 : NDR_PULL_ALLOC(ndr, r->in.server_name);
13319 : } else {
13320 236 : r->in.server_name = NULL;
13321 : }
13322 474 : if (r->in.server_name) {
13323 238 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13324 238 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
13325 238 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
13326 238 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
13327 238 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
13328 238 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
13329 238 : if (length_server_name_1 > size_server_name_1) {
13330 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
13331 : }
13332 238 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
13333 238 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
13334 238 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
13335 : }
13336 474 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
13337 474 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
13338 474 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
13339 474 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
13340 474 : if (length_account_name_1 > size_account_name_1) {
13341 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
13342 : }
13343 474 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
13344 474 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
13345 474 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
13346 474 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
13347 474 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
13348 474 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
13349 474 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
13350 474 : if (length_computer_name_1 > size_computer_name_1) {
13351 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
13352 : }
13353 474 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
13354 474 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
13355 474 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13356 474 : NDR_PULL_ALLOC(ndr, r->in.credentials);
13357 : }
13358 474 : _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
13359 474 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
13360 474 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
13361 474 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
13362 474 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13363 474 : NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
13364 : }
13365 474 : _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
13366 474 : NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
13367 474 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->in.negotiate_flags));
13368 474 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
13369 474 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
13370 474 : NDR_ZERO_STRUCTP(r->out.return_credentials);
13371 474 : NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
13372 474 : *r->out.negotiate_flags = *r->in.negotiate_flags;
13373 : }
13374 947 : if (flags & NDR_OUT) {
13375 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13376 : if (r->in.credentials == NULL) {
13377 : NDR_PULL_ALLOC(ndr, r->in.credentials);
13378 : NDR_ZERO_STRUCTP(r->in.credentials);
13379 : }
13380 : if (r->in.negotiate_flags == NULL) {
13381 : NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
13382 : NDR_ZERO_STRUCTP(r->in.negotiate_flags);
13383 : }
13384 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13385 473 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13386 91 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
13387 : }
13388 473 : _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
13389 473 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
13390 473 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
13391 473 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
13392 473 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13393 91 : NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
13394 : }
13395 473 : _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
13396 473 : NDR_PULL_SET_MEM_CTX(ndr, r->out.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
13397 473 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->out.negotiate_flags));
13398 473 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
13399 473 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13400 : }
13401 947 : return NDR_ERR_SUCCESS;
13402 : }
13403 :
13404 182 : _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate2 *r)
13405 : {
13406 182 : ndr_print_struct(ndr, name, "netr_ServerAuthenticate2");
13407 182 : if (r == NULL) { ndr_print_null(ndr); return; }
13408 182 : ndr->depth++;
13409 182 : if (flags & NDR_SET_VALUES) {
13410 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13411 : }
13412 182 : if (flags & NDR_IN) {
13413 0 : ndr_print_struct(ndr, "in", "netr_ServerAuthenticate2");
13414 0 : ndr->depth++;
13415 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
13416 0 : ndr->depth++;
13417 0 : if (r->in.server_name) {
13418 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
13419 : }
13420 0 : ndr->depth--;
13421 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
13422 0 : ndr->depth++;
13423 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
13424 0 : ndr->depth--;
13425 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
13426 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
13427 0 : ndr->depth++;
13428 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
13429 0 : ndr->depth--;
13430 0 : ndr_print_ptr(ndr, "credentials", r->in.credentials);
13431 0 : ndr->depth++;
13432 0 : ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
13433 0 : ndr->depth--;
13434 0 : ndr_print_ptr(ndr, "negotiate_flags", r->in.negotiate_flags);
13435 0 : ndr->depth++;
13436 0 : ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->in.negotiate_flags);
13437 0 : ndr->depth--;
13438 0 : ndr->depth--;
13439 : }
13440 182 : if (flags & NDR_OUT) {
13441 182 : ndr_print_struct(ndr, "out", "netr_ServerAuthenticate2");
13442 182 : ndr->depth++;
13443 182 : ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
13444 182 : ndr->depth++;
13445 182 : ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
13446 182 : ndr->depth--;
13447 182 : ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
13448 182 : ndr->depth++;
13449 182 : ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->out.negotiate_flags);
13450 182 : ndr->depth--;
13451 182 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13452 182 : ndr->depth--;
13453 : }
13454 182 : ndr->depth--;
13455 : }
13456 :
13457 27 : static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int flags, const struct netr_DatabaseSync2 *r)
13458 : {
13459 27 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13460 27 : if (flags & NDR_IN) {
13461 12 : if (r->in.logon_server == NULL) {
13462 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13463 : }
13464 12 : if (r->in.computername == NULL) {
13465 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13466 : }
13467 12 : if (r->in.credential == NULL) {
13468 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13469 : }
13470 12 : if (r->in.return_authenticator == NULL) {
13471 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13472 : }
13473 12 : if (r->in.sync_context == NULL) {
13474 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13475 : }
13476 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13477 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13478 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13479 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));
13480 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
13481 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13482 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
13483 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));
13484 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
13485 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
13486 12 : NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
13487 12 : NDR_CHECK(ndr_push_SyncStateEnum(ndr, NDR_SCALARS, r->in.restart_state));
13488 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.sync_context));
13489 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
13490 : }
13491 27 : if (flags & NDR_OUT) {
13492 15 : if (r->out.return_authenticator == NULL) {
13493 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13494 : }
13495 15 : if (r->out.sync_context == NULL) {
13496 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13497 : }
13498 15 : if (r->out.delta_enum_array == NULL) {
13499 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13500 : }
13501 15 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
13502 15 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context));
13503 15 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
13504 15 : if (*r->out.delta_enum_array) {
13505 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
13506 : }
13507 15 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13508 : }
13509 27 : return NDR_ERR_SUCCESS;
13510 : }
13511 :
13512 24 : static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync2 *r)
13513 : {
13514 24 : uint32_t size_logon_server_1 = 0;
13515 24 : uint32_t length_logon_server_1 = 0;
13516 24 : uint32_t size_computername_1 = 0;
13517 24 : uint32_t length_computername_1 = 0;
13518 : uint32_t _ptr_delta_enum_array;
13519 24 : TALLOC_CTX *_mem_save_credential_0 = NULL;
13520 24 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
13521 24 : TALLOC_CTX *_mem_save_sync_context_0 = NULL;
13522 24 : TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
13523 24 : TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
13524 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13525 24 : if (flags & NDR_IN) {
13526 12 : NDR_ZERO_STRUCT(r->out);
13527 :
13528 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
13529 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
13530 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
13531 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
13532 12 : if (length_logon_server_1 > size_logon_server_1) {
13533 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
13534 : }
13535 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
13536 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
13537 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
13538 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
13539 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
13540 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
13541 12 : if (length_computername_1 > size_computername_1) {
13542 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computername_1, length_computername_1);
13543 : }
13544 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
13545 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
13546 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13547 12 : NDR_PULL_ALLOC(ndr, r->in.credential);
13548 : }
13549 12 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
13550 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
13551 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
13552 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
13553 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13554 12 : NDR_PULL_ALLOC(ndr, r->in.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->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
13558 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
13559 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
13560 12 : NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
13561 12 : NDR_CHECK(ndr_pull_SyncStateEnum(ndr, NDR_SCALARS, &r->in.restart_state));
13562 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13563 12 : NDR_PULL_ALLOC(ndr, r->in.sync_context);
13564 : }
13565 12 : _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
13566 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sync_context, LIBNDR_FLAG_REF_ALLOC);
13567 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.sync_context));
13568 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
13569 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
13570 12 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
13571 12 : *r->out.return_authenticator = *r->in.return_authenticator;
13572 12 : NDR_PULL_ALLOC(ndr, r->out.sync_context);
13573 12 : *r->out.sync_context = *r->in.sync_context;
13574 12 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
13575 12 : NDR_ZERO_STRUCTP(r->out.delta_enum_array);
13576 : }
13577 24 : if (flags & NDR_OUT) {
13578 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13579 : if (r->in.credential == NULL) {
13580 : NDR_PULL_ALLOC(ndr, r->in.credential);
13581 : NDR_ZERO_STRUCTP(r->in.credential);
13582 : }
13583 : if (r->in.return_authenticator == NULL) {
13584 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
13585 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
13586 : }
13587 : if (r->in.sync_context == NULL) {
13588 : NDR_PULL_ALLOC(ndr, r->in.sync_context);
13589 : NDR_ZERO_STRUCTP(r->in.sync_context);
13590 : }
13591 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13592 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13593 3 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
13594 : }
13595 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
13596 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
13597 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
13598 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
13599 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13600 3 : NDR_PULL_ALLOC(ndr, r->out.sync_context);
13601 : }
13602 12 : _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
13603 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC);
13604 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context));
13605 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
13606 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13607 3 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
13608 : }
13609 12 : _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13610 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
13611 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
13612 12 : if (_ptr_delta_enum_array) {
13613 0 : NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
13614 : } else {
13615 12 : *r->out.delta_enum_array = NULL;
13616 : }
13617 12 : if (*r->out.delta_enum_array) {
13618 0 : _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
13619 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
13620 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
13621 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
13622 : }
13623 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
13624 12 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13625 : }
13626 24 : return NDR_ERR_SUCCESS;
13627 : }
13628 :
13629 6 : _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync2 *r)
13630 : {
13631 6 : ndr_print_struct(ndr, name, "netr_DatabaseSync2");
13632 6 : if (r == NULL) { ndr_print_null(ndr); return; }
13633 6 : ndr->depth++;
13634 6 : if (flags & NDR_SET_VALUES) {
13635 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13636 : }
13637 6 : if (flags & NDR_IN) {
13638 0 : ndr_print_struct(ndr, "in", "netr_DatabaseSync2");
13639 0 : ndr->depth++;
13640 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
13641 0 : ndr->depth++;
13642 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
13643 0 : ndr->depth--;
13644 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
13645 0 : ndr->depth++;
13646 0 : ndr_print_string(ndr, "computername", r->in.computername);
13647 0 : ndr->depth--;
13648 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
13649 0 : ndr->depth++;
13650 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
13651 0 : ndr->depth--;
13652 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
13653 0 : ndr->depth++;
13654 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
13655 0 : ndr->depth--;
13656 0 : ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
13657 0 : ndr_print_SyncStateEnum(ndr, "restart_state", r->in.restart_state);
13658 0 : ndr_print_ptr(ndr, "sync_context", r->in.sync_context);
13659 0 : ndr->depth++;
13660 0 : ndr_print_uint32(ndr, "sync_context", *r->in.sync_context);
13661 0 : ndr->depth--;
13662 0 : ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
13663 0 : ndr->depth--;
13664 : }
13665 6 : if (flags & NDR_OUT) {
13666 6 : ndr_print_struct(ndr, "out", "netr_DatabaseSync2");
13667 6 : ndr->depth++;
13668 6 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
13669 6 : ndr->depth++;
13670 6 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
13671 6 : ndr->depth--;
13672 6 : ndr_print_ptr(ndr, "sync_context", r->out.sync_context);
13673 6 : ndr->depth++;
13674 6 : ndr_print_uint32(ndr, "sync_context", *r->out.sync_context);
13675 6 : ndr->depth--;
13676 6 : ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
13677 6 : ndr->depth++;
13678 6 : ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
13679 6 : ndr->depth++;
13680 6 : if (*r->out.delta_enum_array) {
13681 0 : ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
13682 : }
13683 6 : ndr->depth--;
13684 6 : ndr->depth--;
13685 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13686 6 : ndr->depth--;
13687 : }
13688 6 : ndr->depth--;
13689 : }
13690 :
13691 12 : static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int flags, const struct netr_DatabaseRedo *r)
13692 : {
13693 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13694 12 : if (flags & NDR_IN) {
13695 12 : if (r->in.logon_server == NULL) {
13696 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13697 : }
13698 12 : if (r->in.computername == NULL) {
13699 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13700 : }
13701 12 : if (r->in.credential == NULL) {
13702 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13703 : }
13704 12 : if (r->in.return_authenticator == NULL) {
13705 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13706 : }
13707 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13708 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13709 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13710 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));
13711 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
13712 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13713 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
13714 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));
13715 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
13716 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
13717 : {
13718 : struct ndr_push *_ndr_change_log_entry;
13719 12 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_change_log_entry, 4, -1));
13720 12 : NDR_CHECK(ndr_push_netr_ChangeLogEntry(_ndr_change_log_entry, NDR_SCALARS|NDR_BUFFERS, &r->in.change_log_entry));
13721 12 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_change_log_entry, 4, -1));
13722 : }
13723 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags)));
13724 : }
13725 12 : if (flags & NDR_OUT) {
13726 0 : if (r->out.return_authenticator == NULL) {
13727 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13728 : }
13729 0 : if (r->out.delta_enum_array == NULL) {
13730 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13731 : }
13732 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
13733 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
13734 0 : if (*r->out.delta_enum_array) {
13735 0 : NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
13736 : }
13737 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
13738 : }
13739 12 : return NDR_ERR_SUCCESS;
13740 : }
13741 :
13742 12 : static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int flags, struct netr_DatabaseRedo *r)
13743 : {
13744 12 : uint32_t size_logon_server_1 = 0;
13745 12 : uint32_t length_logon_server_1 = 0;
13746 12 : uint32_t size_computername_1 = 0;
13747 12 : uint32_t length_computername_1 = 0;
13748 : uint32_t _ptr_delta_enum_array;
13749 12 : TALLOC_CTX *_mem_save_credential_0 = NULL;
13750 12 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
13751 12 : TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
13752 12 : TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
13753 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13754 12 : if (flags & NDR_IN) {
13755 12 : NDR_ZERO_STRUCT(r->out);
13756 :
13757 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
13758 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
13759 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
13760 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
13761 12 : if (length_logon_server_1 > size_logon_server_1) {
13762 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
13763 : }
13764 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
13765 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
13766 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
13767 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
13768 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
13769 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
13770 12 : if (length_computername_1 > size_computername_1) {
13771 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computername_1, length_computername_1);
13772 : }
13773 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
13774 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
13775 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13776 12 : NDR_PULL_ALLOC(ndr, r->in.credential);
13777 : }
13778 12 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
13779 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
13780 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
13781 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
13782 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13783 12 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
13784 : }
13785 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
13786 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
13787 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
13788 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
13789 : {
13790 : struct ndr_pull *_ndr_change_log_entry;
13791 12 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_change_log_entry, 4, -1));
13792 12 : NDR_CHECK(ndr_pull_netr_ChangeLogEntry(_ndr_change_log_entry, NDR_SCALARS|NDR_BUFFERS, &r->in.change_log_entry));
13793 12 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_change_log_entry, 4, -1));
13794 : }
13795 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.change_log_entry_size));
13796 12 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
13797 12 : *r->out.return_authenticator = *r->in.return_authenticator;
13798 12 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
13799 12 : NDR_ZERO_STRUCTP(r->out.delta_enum_array);
13800 : }
13801 12 : if (flags & NDR_OUT) {
13802 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13803 : if (r->in.credential == NULL) {
13804 : NDR_PULL_ALLOC(ndr, r->in.credential);
13805 : NDR_ZERO_STRUCTP(r->in.credential);
13806 : }
13807 : if (r->in.return_authenticator == NULL) {
13808 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
13809 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
13810 : }
13811 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13812 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13813 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
13814 : }
13815 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
13816 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
13817 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
13818 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
13819 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13820 0 : NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
13821 : }
13822 0 : _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13823 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
13824 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
13825 0 : if (_ptr_delta_enum_array) {
13826 0 : NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
13827 : } else {
13828 0 : *r->out.delta_enum_array = NULL;
13829 : }
13830 0 : if (*r->out.delta_enum_array) {
13831 0 : _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
13832 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
13833 0 : NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
13834 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
13835 : }
13836 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
13837 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
13838 : }
13839 12 : return NDR_ERR_SUCCESS;
13840 : }
13841 :
13842 0 : _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseRedo *r)
13843 : {
13844 0 : ndr_print_struct(ndr, name, "netr_DatabaseRedo");
13845 0 : if (r == NULL) { ndr_print_null(ndr); return; }
13846 0 : ndr->depth++;
13847 0 : if (flags & NDR_SET_VALUES) {
13848 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13849 : }
13850 0 : if (flags & NDR_IN) {
13851 0 : ndr_print_struct(ndr, "in", "netr_DatabaseRedo");
13852 0 : ndr->depth++;
13853 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
13854 0 : ndr->depth++;
13855 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
13856 0 : ndr->depth--;
13857 0 : ndr_print_ptr(ndr, "computername", r->in.computername);
13858 0 : ndr->depth++;
13859 0 : ndr_print_string(ndr, "computername", r->in.computername);
13860 0 : ndr->depth--;
13861 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
13862 0 : ndr->depth++;
13863 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
13864 0 : ndr->depth--;
13865 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
13866 0 : ndr->depth++;
13867 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
13868 0 : ndr->depth--;
13869 0 : ndr_print_netr_ChangeLogEntry(ndr, "change_log_entry", &r->in.change_log_entry);
13870 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);
13871 0 : ndr->depth--;
13872 : }
13873 0 : if (flags & NDR_OUT) {
13874 0 : ndr_print_struct(ndr, "out", "netr_DatabaseRedo");
13875 0 : ndr->depth++;
13876 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
13877 0 : ndr->depth++;
13878 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
13879 0 : ndr->depth--;
13880 0 : ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
13881 0 : ndr->depth++;
13882 0 : ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
13883 0 : ndr->depth++;
13884 0 : if (*r->out.delta_enum_array) {
13885 0 : ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
13886 : }
13887 0 : ndr->depth--;
13888 0 : ndr->depth--;
13889 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
13890 0 : ndr->depth--;
13891 : }
13892 0 : ndr->depth--;
13893 : }
13894 :
13895 1296 : static enum ndr_err_code ndr_push_netr_LogonControl2Ex(struct ndr_push *ndr, int flags, const struct netr_LogonControl2Ex *r)
13896 : {
13897 1296 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
13898 1296 : if (flags & NDR_IN) {
13899 585 : if (r->in.data == NULL) {
13900 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13901 : }
13902 585 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
13903 585 : if (r->in.logon_server) {
13904 585 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13905 585 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13906 585 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
13907 585 : 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));
13908 : }
13909 585 : NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
13910 585 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13911 585 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.data, r->in.function_code));
13912 585 : NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
13913 : }
13914 1296 : if (flags & NDR_OUT) {
13915 711 : if (r->out.query == NULL) {
13916 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13917 : }
13918 711 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
13919 711 : NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
13920 711 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13921 : }
13922 1296 : return NDR_ERR_SUCCESS;
13923 : }
13924 :
13925 1170 : static enum ndr_err_code ndr_pull_netr_LogonControl2Ex(struct ndr_pull *ndr, int flags, struct netr_LogonControl2Ex *r)
13926 : {
13927 : uint32_t _ptr_logon_server;
13928 1170 : uint32_t size_logon_server_1 = 0;
13929 1170 : uint32_t length_logon_server_1 = 0;
13930 1170 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
13931 1170 : TALLOC_CTX *_mem_save_data_0 = NULL;
13932 1170 : TALLOC_CTX *_mem_save_query_0 = NULL;
13933 1170 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
13934 1170 : if (flags & NDR_IN) {
13935 585 : NDR_ZERO_STRUCT(r->out);
13936 :
13937 585 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
13938 585 : if (_ptr_logon_server) {
13939 585 : NDR_PULL_ALLOC(ndr, r->in.logon_server);
13940 : } else {
13941 0 : r->in.logon_server = NULL;
13942 : }
13943 585 : if (r->in.logon_server) {
13944 585 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
13945 585 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
13946 585 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
13947 585 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
13948 585 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
13949 585 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
13950 585 : if (length_logon_server_1 > size_logon_server_1) {
13951 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logon_server_1, length_logon_server_1);
13952 : }
13953 585 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
13954 585 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
13955 585 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
13956 : }
13957 585 : NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
13958 585 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13959 585 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13960 585 : NDR_PULL_ALLOC(ndr, r->in.data);
13961 : }
13962 585 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
13963 585 : NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
13964 585 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.data, r->in.function_code));
13965 585 : NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
13966 585 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
13967 585 : NDR_PULL_ALLOC(ndr, r->out.query);
13968 585 : NDR_ZERO_STRUCTP(r->out.query);
13969 : }
13970 1170 : if (flags & NDR_OUT) {
13971 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
13972 : if (r->in.data == NULL) {
13973 : NDR_PULL_ALLOC(ndr, r->in.data);
13974 : NDR_ZERO_STRUCTP(r->in.data);
13975 : }
13976 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
13977 585 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13978 207 : NDR_PULL_ALLOC(ndr, r->out.query);
13979 : }
13980 585 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
13981 585 : NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
13982 585 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level));
13983 585 : NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
13984 585 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
13985 585 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13986 : }
13987 1170 : return NDR_ERR_SUCCESS;
13988 : }
13989 :
13990 252 : _PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2Ex *r)
13991 : {
13992 252 : ndr_print_struct(ndr, name, "netr_LogonControl2Ex");
13993 252 : if (r == NULL) { ndr_print_null(ndr); return; }
13994 252 : ndr->depth++;
13995 252 : if (flags & NDR_SET_VALUES) {
13996 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13997 : }
13998 252 : if (flags & NDR_IN) {
13999 0 : ndr_print_struct(ndr, "in", "netr_LogonControl2Ex");
14000 0 : ndr->depth++;
14001 0 : ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
14002 0 : ndr->depth++;
14003 0 : if (r->in.logon_server) {
14004 0 : ndr_print_string(ndr, "logon_server", r->in.logon_server);
14005 : }
14006 0 : ndr->depth--;
14007 0 : ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
14008 0 : ndr_print_uint32(ndr, "level", r->in.level);
14009 0 : ndr_print_ptr(ndr, "data", r->in.data);
14010 0 : ndr->depth++;
14011 0 : ndr_print_set_switch_value(ndr, r->in.data, r->in.function_code);
14012 0 : ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", r->in.data);
14013 0 : ndr->depth--;
14014 0 : ndr->depth--;
14015 : }
14016 252 : if (flags & NDR_OUT) {
14017 252 : ndr_print_struct(ndr, "out", "netr_LogonControl2Ex");
14018 252 : ndr->depth++;
14019 252 : ndr_print_ptr(ndr, "query", r->out.query);
14020 252 : ndr->depth++;
14021 252 : ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
14022 252 : ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
14023 252 : ndr->depth--;
14024 252 : ndr_print_WERROR(ndr, "result", r->out.result);
14025 252 : ndr->depth--;
14026 : }
14027 252 : ndr->depth--;
14028 : }
14029 :
14030 16 : static enum ndr_err_code ndr_push_netr_NetrEnumerateTrustedDomains(struct ndr_push *ndr, int flags, const struct netr_NetrEnumerateTrustedDomains *r)
14031 : {
14032 16 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14033 16 : if (flags & NDR_IN) {
14034 16 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
14035 16 : if (r->in.server_name) {
14036 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14037 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14038 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14039 16 : 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));
14040 : }
14041 : }
14042 16 : if (flags & NDR_OUT) {
14043 0 : if (r->out.trusted_domains_blob == NULL) {
14044 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14045 : }
14046 0 : NDR_CHECK(ndr_push_netr_Blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusted_domains_blob));
14047 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
14048 : }
14049 16 : return NDR_ERR_SUCCESS;
14050 : }
14051 :
14052 16 : static enum ndr_err_code ndr_pull_netr_NetrEnumerateTrustedDomains(struct ndr_pull *ndr, int flags, struct netr_NetrEnumerateTrustedDomains *r)
14053 : {
14054 : uint32_t _ptr_server_name;
14055 16 : uint32_t size_server_name_1 = 0;
14056 16 : uint32_t length_server_name_1 = 0;
14057 16 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
14058 16 : TALLOC_CTX *_mem_save_trusted_domains_blob_0 = NULL;
14059 16 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14060 16 : if (flags & NDR_IN) {
14061 16 : NDR_ZERO_STRUCT(r->out);
14062 :
14063 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
14064 16 : if (_ptr_server_name) {
14065 16 : NDR_PULL_ALLOC(ndr, r->in.server_name);
14066 : } else {
14067 0 : r->in.server_name = NULL;
14068 : }
14069 16 : if (r->in.server_name) {
14070 16 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14071 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
14072 16 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
14073 16 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
14074 16 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
14075 16 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
14076 16 : if (length_server_name_1 > size_server_name_1) {
14077 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
14078 : }
14079 16 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
14080 16 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
14081 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
14082 : }
14083 16 : NDR_PULL_ALLOC(ndr, r->out.trusted_domains_blob);
14084 16 : NDR_ZERO_STRUCTP(r->out.trusted_domains_blob);
14085 : }
14086 16 : if (flags & NDR_OUT) {
14087 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14088 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14089 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14090 0 : NDR_PULL_ALLOC(ndr, r->out.trusted_domains_blob);
14091 : }
14092 0 : _mem_save_trusted_domains_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
14093 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.trusted_domains_blob, LIBNDR_FLAG_REF_ALLOC);
14094 0 : NDR_CHECK(ndr_pull_netr_Blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusted_domains_blob));
14095 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_blob_0, LIBNDR_FLAG_REF_ALLOC);
14096 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
14097 : }
14098 16 : return NDR_ERR_SUCCESS;
14099 : }
14100 :
14101 0 : _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomains *r)
14102 : {
14103 0 : ndr_print_struct(ndr, name, "netr_NetrEnumerateTrustedDomains");
14104 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14105 0 : ndr->depth++;
14106 0 : if (flags & NDR_SET_VALUES) {
14107 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14108 : }
14109 0 : if (flags & NDR_IN) {
14110 0 : ndr_print_struct(ndr, "in", "netr_NetrEnumerateTrustedDomains");
14111 0 : ndr->depth++;
14112 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
14113 0 : ndr->depth++;
14114 0 : if (r->in.server_name) {
14115 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
14116 : }
14117 0 : ndr->depth--;
14118 0 : ndr->depth--;
14119 : }
14120 0 : if (flags & NDR_OUT) {
14121 0 : ndr_print_struct(ndr, "out", "netr_NetrEnumerateTrustedDomains");
14122 0 : ndr->depth++;
14123 0 : ndr_print_ptr(ndr, "trusted_domains_blob", r->out.trusted_domains_blob);
14124 0 : ndr->depth++;
14125 0 : ndr_print_netr_Blob(ndr, "trusted_domains_blob", r->out.trusted_domains_blob);
14126 0 : ndr->depth--;
14127 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
14128 0 : ndr->depth--;
14129 : }
14130 0 : ndr->depth--;
14131 : }
14132 :
14133 74 : static enum ndr_err_code ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCName *r)
14134 : {
14135 74 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14136 74 : if (flags & NDR_IN) {
14137 26 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14138 26 : if (r->in.server_unc) {
14139 26 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14140 26 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14141 26 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14142 26 : 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));
14143 : }
14144 26 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
14145 26 : if (r->in.domain_name) {
14146 26 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
14147 26 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14148 26 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
14149 26 : 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));
14150 : }
14151 26 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
14152 26 : if (r->in.domain_guid) {
14153 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
14154 : }
14155 26 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_guid));
14156 26 : if (r->in.site_guid) {
14157 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.site_guid));
14158 : }
14159 26 : NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags));
14160 : }
14161 74 : if (flags & NDR_OUT) {
14162 48 : if (r->out.info == NULL) {
14163 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14164 : }
14165 48 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
14166 48 : if (*r->out.info) {
14167 48 : NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
14168 : }
14169 48 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14170 : }
14171 74 : return NDR_ERR_SUCCESS;
14172 : }
14173 :
14174 68 : static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCName *r)
14175 : {
14176 : uint32_t _ptr_server_unc;
14177 68 : uint32_t size_server_unc_1 = 0;
14178 68 : uint32_t length_server_unc_1 = 0;
14179 : uint32_t _ptr_domain_name;
14180 68 : uint32_t size_domain_name_1 = 0;
14181 68 : uint32_t length_domain_name_1 = 0;
14182 : uint32_t _ptr_domain_guid;
14183 : uint32_t _ptr_site_guid;
14184 : uint32_t _ptr_info;
14185 68 : TALLOC_CTX *_mem_save_server_unc_0 = NULL;
14186 68 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
14187 68 : TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
14188 68 : TALLOC_CTX *_mem_save_site_guid_0 = NULL;
14189 68 : TALLOC_CTX *_mem_save_info_0 = NULL;
14190 68 : TALLOC_CTX *_mem_save_info_1 = NULL;
14191 68 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14192 68 : if (flags & NDR_IN) {
14193 42 : NDR_ZERO_STRUCT(r->out);
14194 :
14195 42 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14196 42 : if (_ptr_server_unc) {
14197 42 : NDR_PULL_ALLOC(ndr, r->in.server_unc);
14198 : } else {
14199 0 : r->in.server_unc = NULL;
14200 : }
14201 42 : if (r->in.server_unc) {
14202 42 : _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14203 42 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14204 42 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14205 42 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14206 42 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_unc, &size_server_unc_1));
14207 42 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_unc, &length_server_unc_1));
14208 42 : if (length_server_unc_1 > size_server_unc_1) {
14209 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14210 : }
14211 42 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14212 42 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14213 42 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14214 : }
14215 42 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
14216 42 : if (_ptr_domain_name) {
14217 42 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
14218 : } else {
14219 0 : r->in.domain_name = NULL;
14220 : }
14221 42 : if (r->in.domain_name) {
14222 42 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14223 42 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
14224 42 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
14225 42 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
14226 42 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
14227 42 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
14228 42 : if (length_domain_name_1 > size_domain_name_1) {
14229 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_name_1, length_domain_name_1);
14230 : }
14231 42 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
14232 42 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
14233 42 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
14234 : }
14235 42 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
14236 42 : if (_ptr_domain_guid) {
14237 0 : NDR_PULL_ALLOC(ndr, r->in.domain_guid);
14238 : } else {
14239 42 : r->in.domain_guid = NULL;
14240 : }
14241 42 : if (r->in.domain_guid) {
14242 0 : _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
14243 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
14244 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
14245 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
14246 : }
14247 42 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_guid));
14248 42 : if (_ptr_site_guid) {
14249 0 : NDR_PULL_ALLOC(ndr, r->in.site_guid);
14250 : } else {
14251 42 : r->in.site_guid = NULL;
14252 : }
14253 42 : if (r->in.site_guid) {
14254 0 : _mem_save_site_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
14255 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.site_guid, 0);
14256 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.site_guid));
14257 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_guid_0, 0);
14258 : }
14259 42 : NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags));
14260 42 : NDR_PULL_ALLOC(ndr, r->out.info);
14261 42 : NDR_ZERO_STRUCTP(r->out.info);
14262 : }
14263 68 : if (flags & NDR_OUT) {
14264 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14265 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14266 26 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14267 8 : NDR_PULL_ALLOC(ndr, r->out.info);
14268 : }
14269 26 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14270 26 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
14271 26 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
14272 26 : if (_ptr_info) {
14273 26 : NDR_PULL_ALLOC(ndr, *r->out.info);
14274 : } else {
14275 0 : *r->out.info = NULL;
14276 : }
14277 26 : if (*r->out.info) {
14278 26 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
14279 26 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
14280 26 : NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
14281 26 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
14282 : }
14283 26 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
14284 26 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14285 : }
14286 68 : return NDR_ERR_SUCCESS;
14287 : }
14288 :
14289 12 : _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCName *r)
14290 : {
14291 12 : ndr_print_struct(ndr, name, "netr_DsRGetDCName");
14292 12 : if (r == NULL) { ndr_print_null(ndr); return; }
14293 12 : ndr->depth++;
14294 12 : if (flags & NDR_SET_VALUES) {
14295 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14296 : }
14297 12 : if (flags & NDR_IN) {
14298 0 : ndr_print_struct(ndr, "in", "netr_DsRGetDCName");
14299 0 : ndr->depth++;
14300 0 : ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14301 0 : ndr->depth++;
14302 0 : if (r->in.server_unc) {
14303 0 : ndr_print_string(ndr, "server_unc", r->in.server_unc);
14304 : }
14305 0 : ndr->depth--;
14306 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
14307 0 : ndr->depth++;
14308 0 : if (r->in.domain_name) {
14309 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
14310 : }
14311 0 : ndr->depth--;
14312 0 : ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
14313 0 : ndr->depth++;
14314 0 : if (r->in.domain_guid) {
14315 0 : ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
14316 : }
14317 0 : ndr->depth--;
14318 0 : ndr_print_ptr(ndr, "site_guid", r->in.site_guid);
14319 0 : ndr->depth++;
14320 0 : if (r->in.site_guid) {
14321 0 : ndr_print_GUID(ndr, "site_guid", r->in.site_guid);
14322 : }
14323 0 : ndr->depth--;
14324 0 : ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags);
14325 0 : ndr->depth--;
14326 : }
14327 12 : if (flags & NDR_OUT) {
14328 12 : ndr_print_struct(ndr, "out", "netr_DsRGetDCName");
14329 12 : ndr->depth++;
14330 12 : ndr_print_ptr(ndr, "info", r->out.info);
14331 12 : ndr->depth++;
14332 12 : ndr_print_ptr(ndr, "info", *r->out.info);
14333 12 : ndr->depth++;
14334 12 : if (*r->out.info) {
14335 12 : ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
14336 : }
14337 12 : ndr->depth--;
14338 12 : ndr->depth--;
14339 12 : ndr_print_WERROR(ndr, "result", r->out.result);
14340 12 : ndr->depth--;
14341 : }
14342 12 : ndr->depth--;
14343 : }
14344 :
14345 1867 : static enum ndr_err_code ndr_push_netr_LogonGetCapabilities(struct ndr_push *ndr, int flags, const struct netr_LogonGetCapabilities *r)
14346 : {
14347 1867 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14348 1867 : if (flags & NDR_IN) {
14349 1282 : if (r->in.server_name == NULL) {
14350 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14351 : }
14352 1282 : if (r->in.credential == NULL) {
14353 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14354 : }
14355 1282 : if (r->in.return_authenticator == NULL) {
14356 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14357 : }
14358 1282 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14359 1282 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14360 1282 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14361 1282 : 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));
14362 1282 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
14363 1282 : if (r->in.computer_name) {
14364 1282 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14365 1282 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14366 1282 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14367 1282 : 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));
14368 : }
14369 1282 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
14370 1282 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
14371 1282 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.query_level));
14372 : }
14373 1867 : if (flags & NDR_OUT) {
14374 585 : if (r->out.return_authenticator == NULL) {
14375 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14376 : }
14377 585 : if (r->out.capabilities == NULL) {
14378 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14379 : }
14380 585 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
14381 585 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.capabilities, r->in.query_level));
14382 585 : NDR_CHECK(ndr_push_netr_Capabilities(ndr, NDR_SCALARS, r->out.capabilities));
14383 585 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
14384 : }
14385 1867 : return NDR_ERR_SUCCESS;
14386 : }
14387 :
14388 1789 : static enum ndr_err_code ndr_pull_netr_LogonGetCapabilities(struct ndr_pull *ndr, int flags, struct netr_LogonGetCapabilities *r)
14389 : {
14390 1789 : uint32_t size_server_name_1 = 0;
14391 1789 : uint32_t length_server_name_1 = 0;
14392 : uint32_t _ptr_computer_name;
14393 1789 : uint32_t size_computer_name_1 = 0;
14394 1789 : uint32_t length_computer_name_1 = 0;
14395 1789 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
14396 1789 : TALLOC_CTX *_mem_save_credential_0 = NULL;
14397 1789 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
14398 1789 : TALLOC_CTX *_mem_save_capabilities_0 = NULL;
14399 1789 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14400 1789 : if (flags & NDR_IN) {
14401 1371 : NDR_ZERO_STRUCT(r->out);
14402 :
14403 1371 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
14404 1371 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
14405 1371 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
14406 1371 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
14407 1371 : if (length_server_name_1 > size_server_name_1) {
14408 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
14409 : }
14410 1371 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
14411 1371 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
14412 1371 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
14413 1371 : if (_ptr_computer_name) {
14414 1371 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
14415 : } else {
14416 0 : r->in.computer_name = NULL;
14417 : }
14418 1371 : if (r->in.computer_name) {
14419 1371 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14420 1371 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
14421 1371 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
14422 1371 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
14423 1371 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
14424 1371 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
14425 1371 : if (length_computer_name_1 > size_computer_name_1) {
14426 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
14427 : }
14428 1371 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
14429 1371 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
14430 1371 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
14431 : }
14432 1371 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14433 1371 : NDR_PULL_ALLOC(ndr, r->in.credential);
14434 : }
14435 1371 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
14436 1371 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
14437 1371 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
14438 1371 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
14439 1371 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14440 1371 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
14441 : }
14442 1371 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
14443 1371 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
14444 1371 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
14445 1371 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
14446 1371 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.query_level));
14447 1371 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
14448 1371 : *r->out.return_authenticator = *r->in.return_authenticator;
14449 1371 : NDR_PULL_ALLOC(ndr, r->out.capabilities);
14450 1371 : NDR_ZERO_STRUCTP(r->out.capabilities);
14451 : }
14452 1789 : if (flags & NDR_OUT) {
14453 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14454 : if (r->in.credential == NULL) {
14455 : NDR_PULL_ALLOC(ndr, r->in.credential);
14456 : NDR_ZERO_STRUCTP(r->in.credential);
14457 : }
14458 : if (r->in.return_authenticator == NULL) {
14459 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
14460 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
14461 : }
14462 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14463 418 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14464 123 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
14465 : }
14466 418 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
14467 418 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
14468 418 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
14469 418 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
14470 418 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14471 123 : NDR_PULL_ALLOC(ndr, r->out.capabilities);
14472 : }
14473 418 : _mem_save_capabilities_0 = NDR_PULL_GET_MEM_CTX(ndr);
14474 418 : NDR_PULL_SET_MEM_CTX(ndr, r->out.capabilities, LIBNDR_FLAG_REF_ALLOC);
14475 418 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.capabilities, r->in.query_level));
14476 418 : NDR_CHECK(ndr_pull_netr_Capabilities(ndr, NDR_SCALARS, r->out.capabilities));
14477 418 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_capabilities_0, LIBNDR_FLAG_REF_ALLOC);
14478 418 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
14479 : }
14480 1789 : return NDR_ERR_SUCCESS;
14481 : }
14482 :
14483 156 : _PUBLIC_ void ndr_print_netr_LogonGetCapabilities(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetCapabilities *r)
14484 : {
14485 156 : ndr_print_struct(ndr, name, "netr_LogonGetCapabilities");
14486 156 : if (r == NULL) { ndr_print_null(ndr); return; }
14487 156 : ndr->depth++;
14488 156 : if (flags & NDR_SET_VALUES) {
14489 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14490 : }
14491 156 : if (flags & NDR_IN) {
14492 0 : ndr_print_struct(ndr, "in", "netr_LogonGetCapabilities");
14493 0 : ndr->depth++;
14494 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
14495 0 : ndr->depth++;
14496 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
14497 0 : ndr->depth--;
14498 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
14499 0 : ndr->depth++;
14500 0 : if (r->in.computer_name) {
14501 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
14502 : }
14503 0 : ndr->depth--;
14504 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
14505 0 : ndr->depth++;
14506 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
14507 0 : ndr->depth--;
14508 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
14509 0 : ndr->depth++;
14510 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
14511 0 : ndr->depth--;
14512 0 : ndr_print_uint32(ndr, "query_level", r->in.query_level);
14513 0 : ndr->depth--;
14514 : }
14515 156 : if (flags & NDR_OUT) {
14516 156 : ndr_print_struct(ndr, "out", "netr_LogonGetCapabilities");
14517 156 : ndr->depth++;
14518 156 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
14519 156 : ndr->depth++;
14520 156 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
14521 156 : ndr->depth--;
14522 156 : ndr_print_ptr(ndr, "capabilities", r->out.capabilities);
14523 156 : ndr->depth++;
14524 156 : ndr_print_set_switch_value(ndr, r->out.capabilities, r->in.query_level);
14525 156 : ndr_print_netr_Capabilities(ndr, "capabilities", r->out.capabilities);
14526 156 : ndr->depth--;
14527 156 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
14528 156 : ndr->depth--;
14529 : }
14530 156 : ndr->depth--;
14531 : }
14532 :
14533 0 : static enum ndr_err_code ndr_push_netr_NETRLOGONSETSERVICEBITS(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
14534 : {
14535 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14536 0 : if (flags & NDR_IN) {
14537 : }
14538 0 : if (flags & NDR_OUT) {
14539 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14540 : }
14541 0 : return NDR_ERR_SUCCESS;
14542 : }
14543 :
14544 0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONSETSERVICEBITS(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONSETSERVICEBITS *r)
14545 : {
14546 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14547 0 : if (flags & NDR_IN) {
14548 : }
14549 0 : if (flags & NDR_OUT) {
14550 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14551 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14552 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14553 : }
14554 0 : return NDR_ERR_SUCCESS;
14555 : }
14556 :
14557 0 : _PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
14558 : {
14559 0 : ndr_print_struct(ndr, name, "netr_NETRLOGONSETSERVICEBITS");
14560 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14561 0 : ndr->depth++;
14562 0 : if (flags & NDR_SET_VALUES) {
14563 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14564 : }
14565 0 : if (flags & NDR_IN) {
14566 0 : ndr_print_struct(ndr, "in", "netr_NETRLOGONSETSERVICEBITS");
14567 0 : ndr->depth++;
14568 0 : ndr->depth--;
14569 : }
14570 0 : if (flags & NDR_OUT) {
14571 0 : ndr_print_struct(ndr, "out", "netr_NETRLOGONSETSERVICEBITS");
14572 0 : ndr->depth++;
14573 0 : ndr_print_WERROR(ndr, "result", r->out.result);
14574 0 : ndr->depth--;
14575 : }
14576 0 : ndr->depth--;
14577 : }
14578 :
14579 0 : static enum ndr_err_code ndr_push_netr_LogonGetTrustRid(struct ndr_push *ndr, int flags, const struct netr_LogonGetTrustRid *r)
14580 : {
14581 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14582 0 : if (flags & NDR_IN) {
14583 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
14584 0 : if (r->in.server_name) {
14585 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14586 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14587 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14588 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));
14589 : }
14590 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
14591 0 : if (r->in.domain_name) {
14592 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
14593 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14594 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
14595 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));
14596 : }
14597 : }
14598 0 : if (flags & NDR_OUT) {
14599 0 : if (r->out.rid == NULL) {
14600 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14601 : }
14602 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
14603 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14604 : }
14605 0 : return NDR_ERR_SUCCESS;
14606 : }
14607 :
14608 0 : static enum ndr_err_code ndr_pull_netr_LogonGetTrustRid(struct ndr_pull *ndr, int flags, struct netr_LogonGetTrustRid *r)
14609 : {
14610 : uint32_t _ptr_server_name;
14611 0 : uint32_t size_server_name_1 = 0;
14612 0 : uint32_t length_server_name_1 = 0;
14613 : uint32_t _ptr_domain_name;
14614 0 : uint32_t size_domain_name_1 = 0;
14615 0 : uint32_t length_domain_name_1 = 0;
14616 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
14617 0 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
14618 0 : TALLOC_CTX *_mem_save_rid_0 = NULL;
14619 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14620 0 : if (flags & NDR_IN) {
14621 0 : NDR_ZERO_STRUCT(r->out);
14622 :
14623 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
14624 0 : if (_ptr_server_name) {
14625 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
14626 : } else {
14627 0 : r->in.server_name = NULL;
14628 : }
14629 0 : if (r->in.server_name) {
14630 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14631 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
14632 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
14633 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
14634 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
14635 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
14636 0 : if (length_server_name_1 > size_server_name_1) {
14637 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
14638 : }
14639 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
14640 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
14641 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
14642 : }
14643 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
14644 0 : if (_ptr_domain_name) {
14645 0 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
14646 : } else {
14647 0 : r->in.domain_name = NULL;
14648 : }
14649 0 : if (r->in.domain_name) {
14650 0 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14651 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
14652 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
14653 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
14654 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
14655 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
14656 0 : if (length_domain_name_1 > size_domain_name_1) {
14657 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_name_1, length_domain_name_1);
14658 : }
14659 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
14660 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
14661 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
14662 : }
14663 0 : NDR_PULL_ALLOC(ndr, r->out.rid);
14664 0 : NDR_ZERO_STRUCTP(r->out.rid);
14665 : }
14666 0 : if (flags & NDR_OUT) {
14667 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14668 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14669 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14670 0 : NDR_PULL_ALLOC(ndr, r->out.rid);
14671 : }
14672 0 : _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
14673 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
14674 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
14675 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
14676 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14677 : }
14678 0 : return NDR_ERR_SUCCESS;
14679 : }
14680 :
14681 0 : _PUBLIC_ void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetTrustRid *r)
14682 : {
14683 0 : ndr_print_struct(ndr, name, "netr_LogonGetTrustRid");
14684 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14685 0 : ndr->depth++;
14686 0 : if (flags & NDR_SET_VALUES) {
14687 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14688 : }
14689 0 : if (flags & NDR_IN) {
14690 0 : ndr_print_struct(ndr, "in", "netr_LogonGetTrustRid");
14691 0 : ndr->depth++;
14692 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
14693 0 : ndr->depth++;
14694 0 : if (r->in.server_name) {
14695 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
14696 : }
14697 0 : ndr->depth--;
14698 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
14699 0 : ndr->depth++;
14700 0 : if (r->in.domain_name) {
14701 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
14702 : }
14703 0 : ndr->depth--;
14704 0 : ndr->depth--;
14705 : }
14706 0 : if (flags & NDR_OUT) {
14707 0 : ndr_print_struct(ndr, "out", "netr_LogonGetTrustRid");
14708 0 : ndr->depth++;
14709 0 : ndr_print_ptr(ndr, "rid", r->out.rid);
14710 0 : ndr->depth++;
14711 0 : ndr_print_uint32(ndr, "rid", *r->out.rid);
14712 0 : ndr->depth--;
14713 0 : ndr_print_WERROR(ndr, "result", r->out.result);
14714 0 : ndr->depth--;
14715 : }
14716 0 : ndr->depth--;
14717 : }
14718 :
14719 0 : static enum ndr_err_code ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
14720 : {
14721 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14722 0 : if (flags & NDR_IN) {
14723 : }
14724 0 : if (flags & NDR_OUT) {
14725 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14726 : }
14727 0 : return NDR_ERR_SUCCESS;
14728 : }
14729 :
14730 0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
14731 : {
14732 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14733 0 : if (flags & NDR_IN) {
14734 : }
14735 0 : if (flags & NDR_OUT) {
14736 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14737 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14738 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14739 : }
14740 0 : return NDR_ERR_SUCCESS;
14741 : }
14742 :
14743 0 : _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
14744 : {
14745 0 : ndr_print_struct(ndr, name, "netr_NETRLOGONCOMPUTESERVERDIGEST");
14746 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14747 0 : ndr->depth++;
14748 0 : if (flags & NDR_SET_VALUES) {
14749 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14750 : }
14751 0 : if (flags & NDR_IN) {
14752 0 : ndr_print_struct(ndr, "in", "netr_NETRLOGONCOMPUTESERVERDIGEST");
14753 0 : ndr->depth++;
14754 0 : ndr->depth--;
14755 : }
14756 0 : if (flags & NDR_OUT) {
14757 0 : ndr_print_struct(ndr, "out", "netr_NETRLOGONCOMPUTESERVERDIGEST");
14758 0 : ndr->depth++;
14759 0 : ndr_print_WERROR(ndr, "result", r->out.result);
14760 0 : ndr->depth--;
14761 : }
14762 0 : ndr->depth--;
14763 : }
14764 :
14765 0 : static enum ndr_err_code ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
14766 : {
14767 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14768 0 : if (flags & NDR_IN) {
14769 : }
14770 0 : if (flags & NDR_OUT) {
14771 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14772 : }
14773 0 : return NDR_ERR_SUCCESS;
14774 : }
14775 :
14776 0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
14777 : {
14778 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14779 0 : if (flags & NDR_IN) {
14780 : }
14781 0 : if (flags & NDR_OUT) {
14782 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14783 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14784 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14785 : }
14786 0 : return NDR_ERR_SUCCESS;
14787 : }
14788 :
14789 0 : _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
14790 : {
14791 0 : ndr_print_struct(ndr, name, "netr_NETRLOGONCOMPUTECLIENTDIGEST");
14792 0 : if (r == NULL) { ndr_print_null(ndr); return; }
14793 0 : ndr->depth++;
14794 0 : if (flags & NDR_SET_VALUES) {
14795 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14796 : }
14797 0 : if (flags & NDR_IN) {
14798 0 : ndr_print_struct(ndr, "in", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
14799 0 : ndr->depth++;
14800 0 : ndr->depth--;
14801 : }
14802 0 : if (flags & NDR_OUT) {
14803 0 : ndr_print_struct(ndr, "out", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
14804 0 : ndr->depth++;
14805 0 : ndr_print_WERROR(ndr, "result", r->out.result);
14806 0 : ndr->depth--;
14807 : }
14808 0 : ndr->depth--;
14809 : }
14810 :
14811 1361 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ServerAuthenticate3(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate3 *r)
14812 : {
14813 1361 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
14814 1361 : if (flags & NDR_IN) {
14815 560 : if (r->in.account_name == NULL) {
14816 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14817 : }
14818 560 : if (r->in.computer_name == NULL) {
14819 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14820 : }
14821 560 : if (r->in.credentials == NULL) {
14822 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14823 : }
14824 560 : if (r->in.negotiate_flags == NULL) {
14825 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14826 : }
14827 560 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
14828 560 : if (r->in.server_name) {
14829 351 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14830 351 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14831 351 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
14832 351 : 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));
14833 : }
14834 560 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
14835 560 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14836 560 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
14837 560 : 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));
14838 560 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
14839 560 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14840 560 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14841 560 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14842 560 : 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));
14843 560 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
14844 560 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->in.negotiate_flags));
14845 : }
14846 1361 : if (flags & NDR_OUT) {
14847 801 : if (r->out.return_credentials == NULL) {
14848 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14849 : }
14850 801 : if (r->out.negotiate_flags == NULL) {
14851 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14852 : }
14853 801 : if (r->out.rid == NULL) {
14854 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14855 : }
14856 801 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
14857 801 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->out.negotiate_flags));
14858 801 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
14859 801 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
14860 : }
14861 1361 : return NDR_ERR_SUCCESS;
14862 : }
14863 :
14864 1231 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ServerAuthenticate3(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate3 *r)
14865 : {
14866 : uint32_t _ptr_server_name;
14867 1231 : uint32_t size_server_name_1 = 0;
14868 1231 : uint32_t length_server_name_1 = 0;
14869 1231 : uint32_t size_account_name_1 = 0;
14870 1231 : uint32_t length_account_name_1 = 0;
14871 1231 : uint32_t size_computer_name_1 = 0;
14872 1231 : uint32_t length_computer_name_1 = 0;
14873 1231 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
14874 1231 : TALLOC_CTX *_mem_save_credentials_0 = NULL;
14875 1231 : TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
14876 1231 : TALLOC_CTX *_mem_save_negotiate_flags_0 = NULL;
14877 1231 : TALLOC_CTX *_mem_save_rid_0 = NULL;
14878 1231 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
14879 1231 : if (flags & NDR_IN) {
14880 671 : NDR_ZERO_STRUCT(r->out);
14881 :
14882 671 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
14883 671 : if (_ptr_server_name) {
14884 462 : NDR_PULL_ALLOC(ndr, r->in.server_name);
14885 : } else {
14886 209 : r->in.server_name = NULL;
14887 : }
14888 671 : if (r->in.server_name) {
14889 462 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14890 462 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
14891 462 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
14892 462 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
14893 462 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
14894 462 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
14895 462 : if (length_server_name_1 > size_server_name_1) {
14896 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
14897 : }
14898 462 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
14899 462 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
14900 462 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
14901 : }
14902 671 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
14903 671 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
14904 671 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
14905 671 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
14906 671 : if (length_account_name_1 > size_account_name_1) {
14907 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
14908 : }
14909 671 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
14910 671 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
14911 671 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
14912 671 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
14913 671 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
14914 671 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
14915 671 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
14916 671 : if (length_computer_name_1 > size_computer_name_1) {
14917 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
14918 : }
14919 671 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
14920 671 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
14921 671 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14922 671 : NDR_PULL_ALLOC(ndr, r->in.credentials);
14923 : }
14924 671 : _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
14925 671 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
14926 671 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
14927 671 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
14928 671 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14929 671 : NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
14930 : }
14931 671 : _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
14932 671 : NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
14933 671 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->in.negotiate_flags));
14934 671 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
14935 671 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
14936 671 : NDR_ZERO_STRUCTP(r->out.return_credentials);
14937 671 : NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
14938 671 : *r->out.negotiate_flags = *r->in.negotiate_flags;
14939 671 : NDR_PULL_ALLOC(ndr, r->out.rid);
14940 671 : NDR_ZERO_STRUCTP(r->out.rid);
14941 : }
14942 1231 : if (flags & NDR_OUT) {
14943 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
14944 : if (r->in.credentials == NULL) {
14945 : NDR_PULL_ALLOC(ndr, r->in.credentials);
14946 : NDR_ZERO_STRUCTP(r->in.credentials);
14947 : }
14948 : if (r->in.negotiate_flags == NULL) {
14949 : NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
14950 : NDR_ZERO_STRUCTP(r->in.negotiate_flags);
14951 : }
14952 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
14953 560 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14954 169 : NDR_PULL_ALLOC(ndr, r->out.return_credentials);
14955 : }
14956 560 : _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
14957 560 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
14958 560 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
14959 560 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
14960 560 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14961 169 : NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
14962 : }
14963 560 : _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
14964 560 : NDR_PULL_SET_MEM_CTX(ndr, r->out.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
14965 560 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->out.negotiate_flags));
14966 560 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
14967 560 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14968 169 : NDR_PULL_ALLOC(ndr, r->out.rid);
14969 : }
14970 560 : _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
14971 560 : NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
14972 560 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
14973 560 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
14974 560 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
14975 : }
14976 1231 : return NDR_ERR_SUCCESS;
14977 : }
14978 :
14979 260 : _PUBLIC_ void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate3 *r)
14980 : {
14981 260 : ndr_print_struct(ndr, name, "netr_ServerAuthenticate3");
14982 260 : if (r == NULL) { ndr_print_null(ndr); return; }
14983 260 : ndr->depth++;
14984 260 : if (flags & NDR_SET_VALUES) {
14985 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14986 : }
14987 260 : if (flags & NDR_IN) {
14988 0 : ndr_print_struct(ndr, "in", "netr_ServerAuthenticate3");
14989 0 : ndr->depth++;
14990 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
14991 0 : ndr->depth++;
14992 0 : if (r->in.server_name) {
14993 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
14994 : }
14995 0 : ndr->depth--;
14996 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
14997 0 : ndr->depth++;
14998 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
14999 0 : ndr->depth--;
15000 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
15001 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
15002 0 : ndr->depth++;
15003 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
15004 0 : ndr->depth--;
15005 0 : ndr_print_ptr(ndr, "credentials", r->in.credentials);
15006 0 : ndr->depth++;
15007 0 : ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
15008 0 : ndr->depth--;
15009 0 : ndr_print_ptr(ndr, "negotiate_flags", r->in.negotiate_flags);
15010 0 : ndr->depth++;
15011 0 : ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->in.negotiate_flags);
15012 0 : ndr->depth--;
15013 0 : ndr->depth--;
15014 : }
15015 260 : if (flags & NDR_OUT) {
15016 260 : ndr_print_struct(ndr, "out", "netr_ServerAuthenticate3");
15017 260 : ndr->depth++;
15018 260 : ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
15019 260 : ndr->depth++;
15020 260 : ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
15021 260 : ndr->depth--;
15022 260 : ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
15023 260 : ndr->depth++;
15024 260 : ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->out.negotiate_flags);
15025 260 : ndr->depth--;
15026 260 : ndr_print_ptr(ndr, "rid", r->out.rid);
15027 260 : ndr->depth++;
15028 260 : ndr_print_uint32(ndr, "rid", *r->out.rid);
15029 260 : ndr->depth--;
15030 260 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
15031 260 : ndr->depth--;
15032 : }
15033 260 : ndr->depth--;
15034 : }
15035 :
15036 110 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCNameEx *r)
15037 : {
15038 110 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15039 110 : if (flags & NDR_IN) {
15040 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15041 52 : if (r->in.server_unc) {
15042 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15043 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15044 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15045 52 : 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));
15046 : }
15047 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
15048 52 : if (r->in.domain_name) {
15049 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
15050 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15051 52 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
15052 52 : 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));
15053 : }
15054 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
15055 52 : if (r->in.domain_guid) {
15056 4 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
15057 : }
15058 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
15059 52 : if (r->in.site_name) {
15060 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
15061 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15062 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
15063 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));
15064 : }
15065 52 : NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags));
15066 : }
15067 110 : if (flags & NDR_OUT) {
15068 58 : if (r->out.info == NULL) {
15069 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15070 : }
15071 58 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
15072 58 : if (*r->out.info) {
15073 58 : NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
15074 : }
15075 58 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15076 : }
15077 110 : return NDR_ERR_SUCCESS;
15078 : }
15079 :
15080 104 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCNameEx *r)
15081 : {
15082 : uint32_t _ptr_server_unc;
15083 104 : uint32_t size_server_unc_1 = 0;
15084 104 : uint32_t length_server_unc_1 = 0;
15085 : uint32_t _ptr_domain_name;
15086 104 : uint32_t size_domain_name_1 = 0;
15087 104 : uint32_t length_domain_name_1 = 0;
15088 : uint32_t _ptr_domain_guid;
15089 : uint32_t _ptr_site_name;
15090 104 : uint32_t size_site_name_1 = 0;
15091 104 : uint32_t length_site_name_1 = 0;
15092 : uint32_t _ptr_info;
15093 104 : TALLOC_CTX *_mem_save_server_unc_0 = NULL;
15094 104 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
15095 104 : TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
15096 104 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
15097 104 : TALLOC_CTX *_mem_save_info_0 = NULL;
15098 104 : TALLOC_CTX *_mem_save_info_1 = NULL;
15099 104 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15100 104 : if (flags & NDR_IN) {
15101 52 : NDR_ZERO_STRUCT(r->out);
15102 :
15103 52 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15104 52 : if (_ptr_server_unc) {
15105 52 : NDR_PULL_ALLOC(ndr, r->in.server_unc);
15106 : } else {
15107 0 : r->in.server_unc = NULL;
15108 : }
15109 52 : if (r->in.server_unc) {
15110 52 : _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15111 52 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15112 52 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15113 52 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15114 52 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_unc, &size_server_unc_1));
15115 52 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_unc, &length_server_unc_1));
15116 52 : if (length_server_unc_1 > size_server_unc_1) {
15117 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15118 : }
15119 52 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15120 52 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15121 52 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15122 : }
15123 52 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
15124 52 : if (_ptr_domain_name) {
15125 52 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
15126 : } else {
15127 0 : r->in.domain_name = NULL;
15128 : }
15129 52 : if (r->in.domain_name) {
15130 52 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15131 52 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
15132 52 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
15133 52 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
15134 52 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
15135 52 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
15136 52 : if (length_domain_name_1 > size_domain_name_1) {
15137 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_name_1, length_domain_name_1);
15138 : }
15139 52 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
15140 52 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
15141 52 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
15142 : }
15143 52 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
15144 52 : if (_ptr_domain_guid) {
15145 4 : NDR_PULL_ALLOC(ndr, r->in.domain_guid);
15146 : } else {
15147 48 : r->in.domain_guid = NULL;
15148 : }
15149 52 : if (r->in.domain_guid) {
15150 4 : _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
15151 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
15152 4 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
15153 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
15154 : }
15155 52 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
15156 52 : if (_ptr_site_name) {
15157 16 : NDR_PULL_ALLOC(ndr, r->in.site_name);
15158 : } else {
15159 36 : r->in.site_name = NULL;
15160 : }
15161 52 : if (r->in.site_name) {
15162 16 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15163 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
15164 16 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
15165 16 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
15166 16 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
15167 16 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
15168 16 : if (length_site_name_1 > size_site_name_1) {
15169 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_site_name_1, length_site_name_1);
15170 : }
15171 16 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
15172 16 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
15173 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
15174 : }
15175 52 : NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags));
15176 52 : NDR_PULL_ALLOC(ndr, r->out.info);
15177 52 : NDR_ZERO_STRUCTP(r->out.info);
15178 : }
15179 104 : if (flags & NDR_OUT) {
15180 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15181 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15182 52 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15183 34 : NDR_PULL_ALLOC(ndr, r->out.info);
15184 : }
15185 52 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15186 52 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
15187 52 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
15188 52 : if (_ptr_info) {
15189 52 : NDR_PULL_ALLOC(ndr, *r->out.info);
15190 : } else {
15191 0 : *r->out.info = NULL;
15192 : }
15193 52 : if (*r->out.info) {
15194 52 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
15195 52 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
15196 52 : NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
15197 52 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
15198 : }
15199 52 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15200 52 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15201 : }
15202 104 : return NDR_ERR_SUCCESS;
15203 : }
15204 :
15205 12 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx *r)
15206 : {
15207 12 : ndr_print_struct(ndr, name, "netr_DsRGetDCNameEx");
15208 12 : if (r == NULL) { ndr_print_null(ndr); return; }
15209 12 : ndr->depth++;
15210 12 : if (flags & NDR_SET_VALUES) {
15211 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15212 : }
15213 12 : if (flags & NDR_IN) {
15214 0 : ndr_print_struct(ndr, "in", "netr_DsRGetDCNameEx");
15215 0 : ndr->depth++;
15216 0 : ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15217 0 : ndr->depth++;
15218 0 : if (r->in.server_unc) {
15219 0 : ndr_print_string(ndr, "server_unc", r->in.server_unc);
15220 : }
15221 0 : ndr->depth--;
15222 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
15223 0 : ndr->depth++;
15224 0 : if (r->in.domain_name) {
15225 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
15226 : }
15227 0 : ndr->depth--;
15228 0 : ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
15229 0 : ndr->depth++;
15230 0 : if (r->in.domain_guid) {
15231 0 : ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
15232 : }
15233 0 : ndr->depth--;
15234 0 : ndr_print_ptr(ndr, "site_name", r->in.site_name);
15235 0 : ndr->depth++;
15236 0 : if (r->in.site_name) {
15237 0 : ndr_print_string(ndr, "site_name", r->in.site_name);
15238 : }
15239 0 : ndr->depth--;
15240 0 : ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags);
15241 0 : ndr->depth--;
15242 : }
15243 12 : if (flags & NDR_OUT) {
15244 12 : ndr_print_struct(ndr, "out", "netr_DsRGetDCNameEx");
15245 12 : ndr->depth++;
15246 12 : ndr_print_ptr(ndr, "info", r->out.info);
15247 12 : ndr->depth++;
15248 12 : ndr_print_ptr(ndr, "info", *r->out.info);
15249 12 : ndr->depth++;
15250 12 : if (*r->out.info) {
15251 12 : ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
15252 : }
15253 12 : ndr->depth--;
15254 12 : ndr->depth--;
15255 12 : ndr_print_WERROR(ndr, "result", r->out.result);
15256 12 : ndr->depth--;
15257 : }
15258 12 : ndr->depth--;
15259 : }
15260 :
15261 108 : static enum ndr_err_code ndr_push_netr_DsRGetSiteName(struct ndr_push *ndr, int flags, const struct netr_DsRGetSiteName *r)
15262 : {
15263 108 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15264 108 : if (flags & NDR_IN) {
15265 48 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
15266 48 : if (r->in.computer_name) {
15267 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15268 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15269 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15270 48 : 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));
15271 : }
15272 : }
15273 108 : if (flags & NDR_OUT) {
15274 60 : if (r->out.site == NULL) {
15275 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15276 : }
15277 60 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.site));
15278 60 : if (*r->out.site) {
15279 60 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16)));
15280 60 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15281 60 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16)));
15282 60 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.site, ndr_charset_length(*r->out.site, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15283 : }
15284 60 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15285 : }
15286 108 : return NDR_ERR_SUCCESS;
15287 : }
15288 :
15289 96 : static enum ndr_err_code ndr_pull_netr_DsRGetSiteName(struct ndr_pull *ndr, int flags, struct netr_DsRGetSiteName *r)
15290 : {
15291 : uint32_t _ptr_computer_name;
15292 96 : uint32_t size_computer_name_1 = 0;
15293 96 : uint32_t length_computer_name_1 = 0;
15294 : uint32_t _ptr_site;
15295 96 : uint32_t size_site_2 = 0;
15296 96 : uint32_t length_site_2 = 0;
15297 96 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
15298 96 : TALLOC_CTX *_mem_save_site_0 = NULL;
15299 96 : TALLOC_CTX *_mem_save_site_1 = NULL;
15300 96 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15301 96 : if (flags & NDR_IN) {
15302 48 : NDR_ZERO_STRUCT(r->out);
15303 :
15304 48 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
15305 48 : if (_ptr_computer_name) {
15306 48 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
15307 : } else {
15308 0 : r->in.computer_name = NULL;
15309 : }
15310 48 : if (r->in.computer_name) {
15311 48 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15312 48 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
15313 48 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
15314 48 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
15315 48 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
15316 48 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
15317 48 : if (length_computer_name_1 > size_computer_name_1) {
15318 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
15319 : }
15320 48 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
15321 48 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
15322 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
15323 : }
15324 48 : NDR_PULL_ALLOC(ndr, r->out.site);
15325 48 : NDR_ZERO_STRUCTP(r->out.site);
15326 : }
15327 96 : if (flags & NDR_OUT) {
15328 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15329 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15330 48 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15331 12 : NDR_PULL_ALLOC(ndr, r->out.site);
15332 : }
15333 48 : _mem_save_site_0 = NDR_PULL_GET_MEM_CTX(ndr);
15334 48 : NDR_PULL_SET_MEM_CTX(ndr, r->out.site, LIBNDR_FLAG_REF_ALLOC);
15335 48 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site));
15336 48 : if (_ptr_site) {
15337 48 : NDR_PULL_ALLOC(ndr, *r->out.site);
15338 : } else {
15339 0 : *r->out.site = NULL;
15340 : }
15341 48 : if (*r->out.site) {
15342 48 : _mem_save_site_1 = NDR_PULL_GET_MEM_CTX(ndr);
15343 48 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.site, 0);
15344 48 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.site));
15345 48 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.site));
15346 48 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.site, &size_site_2));
15347 48 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.site, &length_site_2));
15348 48 : if (length_site_2 > size_site_2) {
15349 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_site_2, length_site_2);
15350 : }
15351 48 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_2, sizeof(uint16_t)));
15352 48 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.site, length_site_2, sizeof(uint16_t), CH_UTF16));
15353 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_1, 0);
15354 : }
15355 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_0, LIBNDR_FLAG_REF_ALLOC);
15356 48 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15357 : }
15358 96 : return NDR_ERR_SUCCESS;
15359 : }
15360 :
15361 24 : _PUBLIC_ void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetSiteName *r)
15362 : {
15363 24 : ndr_print_struct(ndr, name, "netr_DsRGetSiteName");
15364 24 : if (r == NULL) { ndr_print_null(ndr); return; }
15365 24 : ndr->depth++;
15366 24 : if (flags & NDR_SET_VALUES) {
15367 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15368 : }
15369 24 : if (flags & NDR_IN) {
15370 0 : ndr_print_struct(ndr, "in", "netr_DsRGetSiteName");
15371 0 : ndr->depth++;
15372 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
15373 0 : ndr->depth++;
15374 0 : if (r->in.computer_name) {
15375 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
15376 : }
15377 0 : ndr->depth--;
15378 0 : ndr->depth--;
15379 : }
15380 24 : if (flags & NDR_OUT) {
15381 24 : ndr_print_struct(ndr, "out", "netr_DsRGetSiteName");
15382 24 : ndr->depth++;
15383 24 : ndr_print_ptr(ndr, "site", r->out.site);
15384 24 : ndr->depth++;
15385 24 : ndr_print_ptr(ndr, "site", *r->out.site);
15386 24 : ndr->depth++;
15387 24 : if (*r->out.site) {
15388 24 : ndr_print_string(ndr, "site", *r->out.site);
15389 : }
15390 24 : ndr->depth--;
15391 24 : ndr->depth--;
15392 24 : ndr_print_WERROR(ndr, "result", r->out.result);
15393 24 : ndr->depth--;
15394 : }
15395 24 : ndr->depth--;
15396 : }
15397 :
15398 259 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonGetDomainInfo(struct ndr_push *ndr, int flags, const struct netr_LogonGetDomainInfo *r)
15399 : {
15400 259 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15401 259 : if (flags & NDR_IN) {
15402 119 : if (r->in.server_name == NULL) {
15403 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15404 : }
15405 119 : if (r->in.credential == NULL) {
15406 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15407 : }
15408 119 : if (r->in.return_authenticator == NULL) {
15409 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15410 : }
15411 119 : if (r->in.query == NULL) {
15412 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15413 : }
15414 119 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15415 119 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15416 119 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15417 119 : 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));
15418 119 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
15419 119 : if (r->in.computer_name) {
15420 119 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15421 119 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15422 119 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15423 119 : 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));
15424 : }
15425 119 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15426 119 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
15427 119 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15428 119 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.query, r->in.level));
15429 119 : NDR_CHECK(ndr_push_netr_WorkstationInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.query));
15430 : }
15431 259 : if (flags & NDR_OUT) {
15432 140 : if (r->out.return_authenticator == NULL) {
15433 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15434 : }
15435 140 : if (r->out.info == NULL) {
15436 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15437 : }
15438 140 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15439 140 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
15440 140 : NDR_CHECK(ndr_push_netr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15441 140 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
15442 : }
15443 259 : return NDR_ERR_SUCCESS;
15444 : }
15445 :
15446 238 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonGetDomainInfo(struct ndr_pull *ndr, int flags, struct netr_LogonGetDomainInfo *r)
15447 : {
15448 238 : uint32_t size_server_name_1 = 0;
15449 238 : uint32_t length_server_name_1 = 0;
15450 : uint32_t _ptr_computer_name;
15451 238 : uint32_t size_computer_name_1 = 0;
15452 238 : uint32_t length_computer_name_1 = 0;
15453 238 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
15454 238 : TALLOC_CTX *_mem_save_credential_0 = NULL;
15455 238 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
15456 238 : TALLOC_CTX *_mem_save_query_0 = NULL;
15457 238 : TALLOC_CTX *_mem_save_info_0 = NULL;
15458 238 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15459 238 : if (flags & NDR_IN) {
15460 119 : NDR_ZERO_STRUCT(r->out);
15461 :
15462 119 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
15463 119 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
15464 119 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
15465 119 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
15466 119 : if (length_server_name_1 > size_server_name_1) {
15467 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
15468 : }
15469 119 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
15470 119 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
15471 119 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
15472 119 : if (_ptr_computer_name) {
15473 119 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
15474 : } else {
15475 0 : r->in.computer_name = NULL;
15476 : }
15477 119 : if (r->in.computer_name) {
15478 119 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15479 119 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
15480 119 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
15481 119 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
15482 119 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
15483 119 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
15484 119 : if (length_computer_name_1 > size_computer_name_1) {
15485 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
15486 : }
15487 119 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
15488 119 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
15489 119 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
15490 : }
15491 119 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15492 119 : NDR_PULL_ALLOC(ndr, r->in.credential);
15493 : }
15494 119 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
15495 119 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
15496 119 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15497 119 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
15498 119 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15499 119 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
15500 : }
15501 119 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
15502 119 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
15503 119 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
15504 119 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
15505 119 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15506 119 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15507 119 : NDR_PULL_ALLOC(ndr, r->in.query);
15508 : }
15509 119 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
15510 119 : NDR_PULL_SET_MEM_CTX(ndr, r->in.query, LIBNDR_FLAG_REF_ALLOC);
15511 119 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.query, r->in.level));
15512 119 : NDR_CHECK(ndr_pull_netr_WorkstationInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.query));
15513 119 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
15514 119 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15515 119 : *r->out.return_authenticator = *r->in.return_authenticator;
15516 119 : NDR_PULL_ALLOC(ndr, r->out.info);
15517 119 : NDR_ZERO_STRUCTP(r->out.info);
15518 : }
15519 238 : if (flags & NDR_OUT) {
15520 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15521 : if (r->in.credential == NULL) {
15522 : NDR_PULL_ALLOC(ndr, r->in.credential);
15523 : NDR_ZERO_STRUCTP(r->in.credential);
15524 : }
15525 : if (r->in.return_authenticator == NULL) {
15526 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
15527 : NDR_ZERO_STRUCTP(r->in.return_authenticator);
15528 : }
15529 : if (r->in.query == NULL) {
15530 : NDR_PULL_ALLOC(ndr, r->in.query);
15531 : NDR_ZERO_STRUCTP(r->in.query);
15532 : }
15533 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15534 119 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15535 56 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15536 : }
15537 119 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
15538 119 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
15539 119 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15540 119 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
15541 119 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15542 56 : NDR_PULL_ALLOC(ndr, r->out.info);
15543 : }
15544 119 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15545 119 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
15546 119 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
15547 119 : NDR_CHECK(ndr_pull_netr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15548 119 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15549 119 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
15550 : }
15551 238 : return NDR_ERR_SUCCESS;
15552 : }
15553 :
15554 42 : _PUBLIC_ void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetDomainInfo *r)
15555 : {
15556 42 : ndr_print_struct(ndr, name, "netr_LogonGetDomainInfo");
15557 42 : if (r == NULL) { ndr_print_null(ndr); return; }
15558 42 : ndr->depth++;
15559 42 : if (flags & NDR_SET_VALUES) {
15560 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15561 : }
15562 42 : if (flags & NDR_IN) {
15563 0 : ndr_print_struct(ndr, "in", "netr_LogonGetDomainInfo");
15564 0 : ndr->depth++;
15565 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
15566 0 : ndr->depth++;
15567 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
15568 0 : ndr->depth--;
15569 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
15570 0 : ndr->depth++;
15571 0 : if (r->in.computer_name) {
15572 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
15573 : }
15574 0 : ndr->depth--;
15575 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
15576 0 : ndr->depth++;
15577 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
15578 0 : ndr->depth--;
15579 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
15580 0 : ndr->depth++;
15581 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
15582 0 : ndr->depth--;
15583 0 : ndr_print_uint32(ndr, "level", r->in.level);
15584 0 : ndr_print_ptr(ndr, "query", r->in.query);
15585 0 : ndr->depth++;
15586 0 : ndr_print_set_switch_value(ndr, r->in.query, r->in.level);
15587 0 : ndr_print_netr_WorkstationInfo(ndr, "query", r->in.query);
15588 0 : ndr->depth--;
15589 0 : ndr->depth--;
15590 : }
15591 42 : if (flags & NDR_OUT) {
15592 42 : ndr_print_struct(ndr, "out", "netr_LogonGetDomainInfo");
15593 42 : ndr->depth++;
15594 42 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
15595 42 : ndr->depth++;
15596 42 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
15597 42 : ndr->depth--;
15598 42 : ndr_print_ptr(ndr, "info", r->out.info);
15599 42 : ndr->depth++;
15600 42 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
15601 42 : ndr_print_netr_DomainInfo(ndr, "info", r->out.info);
15602 42 : ndr->depth--;
15603 42 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
15604 42 : ndr->depth--;
15605 : }
15606 42 : ndr->depth--;
15607 : }
15608 :
15609 659 : static enum ndr_err_code ndr_push_netr_ServerPasswordSet2(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordSet2 *r)
15610 : {
15611 659 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15612 659 : if (flags & NDR_IN) {
15613 288 : if (r->in.account_name == NULL) {
15614 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15615 : }
15616 288 : if (r->in.computer_name == NULL) {
15617 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15618 : }
15619 288 : if (r->in.credential == NULL) {
15620 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15621 : }
15622 288 : if (r->in.new_password == NULL) {
15623 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15624 : }
15625 288 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
15626 288 : if (r->in.server_name) {
15627 288 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15628 288 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15629 288 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15630 288 : 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));
15631 : }
15632 288 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
15633 288 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15634 288 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
15635 288 : 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));
15636 288 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
15637 288 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15638 288 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15639 288 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15640 288 : 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));
15641 288 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15642 288 : NDR_CHECK(ndr_push_netr_CryptPassword(ndr, NDR_SCALARS, r->in.new_password));
15643 : }
15644 659 : if (flags & NDR_OUT) {
15645 371 : if (r->out.return_authenticator == NULL) {
15646 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15647 : }
15648 371 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15649 371 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
15650 : }
15651 659 : return NDR_ERR_SUCCESS;
15652 : }
15653 :
15654 588 : static enum ndr_err_code ndr_pull_netr_ServerPasswordSet2(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordSet2 *r)
15655 : {
15656 : uint32_t _ptr_server_name;
15657 588 : uint32_t size_server_name_1 = 0;
15658 588 : uint32_t length_server_name_1 = 0;
15659 588 : uint32_t size_account_name_1 = 0;
15660 588 : uint32_t length_account_name_1 = 0;
15661 588 : uint32_t size_computer_name_1 = 0;
15662 588 : uint32_t length_computer_name_1 = 0;
15663 588 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
15664 588 : TALLOC_CTX *_mem_save_credential_0 = NULL;
15665 588 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
15666 588 : TALLOC_CTX *_mem_save_new_password_0 = NULL;
15667 588 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15668 588 : if (flags & NDR_IN) {
15669 300 : NDR_ZERO_STRUCT(r->out);
15670 :
15671 300 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
15672 300 : if (_ptr_server_name) {
15673 300 : NDR_PULL_ALLOC(ndr, r->in.server_name);
15674 : } else {
15675 0 : r->in.server_name = NULL;
15676 : }
15677 300 : if (r->in.server_name) {
15678 300 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15679 300 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
15680 300 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
15681 300 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
15682 300 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
15683 300 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
15684 300 : if (length_server_name_1 > size_server_name_1) {
15685 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
15686 : }
15687 300 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
15688 300 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
15689 300 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
15690 : }
15691 300 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
15692 300 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
15693 300 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
15694 300 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
15695 300 : if (length_account_name_1 > size_account_name_1) {
15696 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
15697 : }
15698 300 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
15699 300 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
15700 300 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
15701 300 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
15702 300 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
15703 300 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
15704 300 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
15705 300 : if (length_computer_name_1 > size_computer_name_1) {
15706 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
15707 : }
15708 300 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
15709 300 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
15710 300 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15711 300 : NDR_PULL_ALLOC(ndr, r->in.credential);
15712 : }
15713 300 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
15714 300 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
15715 300 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15716 300 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
15717 300 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15718 300 : NDR_PULL_ALLOC(ndr, r->in.new_password);
15719 : }
15720 300 : _mem_save_new_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
15721 300 : NDR_PULL_SET_MEM_CTX(ndr, r->in.new_password, LIBNDR_FLAG_REF_ALLOC);
15722 300 : NDR_CHECK(ndr_pull_netr_CryptPassword(ndr, NDR_SCALARS, r->in.new_password));
15723 300 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_password_0, LIBNDR_FLAG_REF_ALLOC);
15724 300 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15725 300 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
15726 : }
15727 588 : if (flags & NDR_OUT) {
15728 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15729 : if (r->in.credential == NULL) {
15730 : NDR_PULL_ALLOC(ndr, r->in.credential);
15731 : NDR_ZERO_STRUCTP(r->in.credential);
15732 : }
15733 : if (r->in.new_password == NULL) {
15734 : NDR_PULL_ALLOC(ndr, r->in.new_password);
15735 : NDR_ZERO_STRUCTP(r->in.new_password);
15736 : }
15737 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15738 288 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15739 75 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15740 : }
15741 288 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
15742 288 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
15743 288 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15744 288 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
15745 288 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
15746 : }
15747 588 : return NDR_ERR_SUCCESS;
15748 : }
15749 :
15750 142 : _PUBLIC_ void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet2 *r)
15751 : {
15752 142 : ndr_print_struct(ndr, name, "netr_ServerPasswordSet2");
15753 142 : if (r == NULL) { ndr_print_null(ndr); return; }
15754 142 : ndr->depth++;
15755 142 : if (flags & NDR_SET_VALUES) {
15756 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15757 : }
15758 142 : if (flags & NDR_IN) {
15759 0 : ndr_print_struct(ndr, "in", "netr_ServerPasswordSet2");
15760 0 : ndr->depth++;
15761 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
15762 0 : ndr->depth++;
15763 0 : if (r->in.server_name) {
15764 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
15765 : }
15766 0 : ndr->depth--;
15767 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
15768 0 : ndr->depth++;
15769 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
15770 0 : ndr->depth--;
15771 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
15772 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
15773 0 : ndr->depth++;
15774 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
15775 0 : ndr->depth--;
15776 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
15777 0 : ndr->depth++;
15778 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
15779 0 : ndr->depth--;
15780 0 : ndr_print_ptr(ndr, "new_password", r->in.new_password);
15781 0 : ndr->depth++;
15782 0 : ndr_print_netr_CryptPassword(ndr, "new_password", r->in.new_password);
15783 0 : ndr->depth--;
15784 0 : ndr->depth--;
15785 : }
15786 142 : if (flags & NDR_OUT) {
15787 142 : ndr_print_struct(ndr, "out", "netr_ServerPasswordSet2");
15788 142 : ndr->depth++;
15789 142 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
15790 142 : ndr->depth++;
15791 142 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
15792 142 : ndr->depth--;
15793 142 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
15794 142 : ndr->depth--;
15795 : }
15796 142 : ndr->depth--;
15797 : }
15798 :
15799 12 : static enum ndr_err_code ndr_push_netr_ServerPasswordGet(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordGet *r)
15800 : {
15801 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15802 12 : if (flags & NDR_IN) {
15803 12 : if (r->in.account_name == NULL) {
15804 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15805 : }
15806 12 : if (r->in.computer_name == NULL) {
15807 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15808 : }
15809 12 : if (r->in.credential == NULL) {
15810 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15811 : }
15812 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
15813 12 : if (r->in.server_name) {
15814 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15815 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15816 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
15817 12 : 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));
15818 : }
15819 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
15820 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15821 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
15822 12 : 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));
15823 12 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
15824 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15825 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15826 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
15827 12 : 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));
15828 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15829 : }
15830 12 : if (flags & NDR_OUT) {
15831 0 : if (r->out.return_authenticator == NULL) {
15832 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15833 : }
15834 0 : if (r->out.password == NULL) {
15835 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15836 : }
15837 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15838 0 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.password));
15839 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
15840 : }
15841 12 : return NDR_ERR_SUCCESS;
15842 : }
15843 :
15844 12 : static enum ndr_err_code ndr_pull_netr_ServerPasswordGet(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordGet *r)
15845 : {
15846 : uint32_t _ptr_server_name;
15847 12 : uint32_t size_server_name_1 = 0;
15848 12 : uint32_t length_server_name_1 = 0;
15849 12 : uint32_t size_account_name_1 = 0;
15850 12 : uint32_t length_account_name_1 = 0;
15851 12 : uint32_t size_computer_name_1 = 0;
15852 12 : uint32_t length_computer_name_1 = 0;
15853 12 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
15854 12 : TALLOC_CTX *_mem_save_credential_0 = NULL;
15855 12 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
15856 12 : TALLOC_CTX *_mem_save_password_0 = NULL;
15857 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
15858 12 : if (flags & NDR_IN) {
15859 12 : NDR_ZERO_STRUCT(r->out);
15860 :
15861 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
15862 12 : if (_ptr_server_name) {
15863 12 : NDR_PULL_ALLOC(ndr, r->in.server_name);
15864 : } else {
15865 0 : r->in.server_name = NULL;
15866 : }
15867 12 : if (r->in.server_name) {
15868 12 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15869 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
15870 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
15871 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
15872 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
15873 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
15874 12 : if (length_server_name_1 > size_server_name_1) {
15875 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
15876 : }
15877 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
15878 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
15879 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
15880 : }
15881 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
15882 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
15883 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
15884 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
15885 12 : if (length_account_name_1 > size_account_name_1) {
15886 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
15887 : }
15888 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
15889 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
15890 12 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
15891 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
15892 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
15893 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
15894 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
15895 12 : if (length_computer_name_1 > size_computer_name_1) {
15896 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
15897 : }
15898 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
15899 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
15900 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15901 12 : NDR_PULL_ALLOC(ndr, r->in.credential);
15902 : }
15903 12 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
15904 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
15905 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
15906 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
15907 12 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15908 12 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
15909 12 : NDR_PULL_ALLOC(ndr, r->out.password);
15910 12 : NDR_ZERO_STRUCTP(r->out.password);
15911 : }
15912 12 : if (flags & NDR_OUT) {
15913 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
15914 : if (r->in.credential == NULL) {
15915 : NDR_PULL_ALLOC(ndr, r->in.credential);
15916 : NDR_ZERO_STRUCTP(r->in.credential);
15917 : }
15918 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
15919 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15920 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
15921 : }
15922 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
15923 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
15924 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
15925 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
15926 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15927 0 : NDR_PULL_ALLOC(ndr, r->out.password);
15928 : }
15929 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
15930 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.password, LIBNDR_FLAG_REF_ALLOC);
15931 0 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.password));
15932 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, LIBNDR_FLAG_REF_ALLOC);
15933 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
15934 : }
15935 12 : return NDR_ERR_SUCCESS;
15936 : }
15937 :
15938 0 : _PUBLIC_ void ndr_print_netr_ServerPasswordGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordGet *r)
15939 : {
15940 0 : ndr_print_struct(ndr, name, "netr_ServerPasswordGet");
15941 0 : if (r == NULL) { ndr_print_null(ndr); return; }
15942 0 : ndr->depth++;
15943 0 : if (flags & NDR_SET_VALUES) {
15944 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15945 : }
15946 0 : if (flags & NDR_IN) {
15947 0 : ndr_print_struct(ndr, "in", "netr_ServerPasswordGet");
15948 0 : ndr->depth++;
15949 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
15950 0 : ndr->depth++;
15951 0 : if (r->in.server_name) {
15952 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
15953 : }
15954 0 : ndr->depth--;
15955 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
15956 0 : ndr->depth++;
15957 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
15958 0 : ndr->depth--;
15959 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
15960 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
15961 0 : ndr->depth++;
15962 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
15963 0 : ndr->depth--;
15964 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
15965 0 : ndr->depth++;
15966 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
15967 0 : ndr->depth--;
15968 0 : ndr->depth--;
15969 : }
15970 0 : if (flags & NDR_OUT) {
15971 0 : ndr_print_struct(ndr, "out", "netr_ServerPasswordGet");
15972 0 : ndr->depth++;
15973 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
15974 0 : ndr->depth++;
15975 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
15976 0 : ndr->depth--;
15977 0 : ndr_print_ptr(ndr, "password", r->out.password);
15978 0 : ndr->depth++;
15979 0 : ndr_print_samr_Password(ndr, "password", r->out.password);
15980 0 : ndr->depth--;
15981 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
15982 0 : ndr->depth--;
15983 : }
15984 0 : ndr->depth--;
15985 : }
15986 :
15987 17 : static enum ndr_err_code ndr_push_netr_NetrLogonSendToSam(struct ndr_push *ndr, int flags, const struct netr_NetrLogonSendToSam *r)
15988 : {
15989 17 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
15990 17 : if (flags & NDR_IN) {
15991 0 : if (r->in.computer_name == NULL) {
15992 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15993 : }
15994 0 : if (r->in.credential == NULL) {
15995 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15996 : }
15997 0 : if (r->in.opaque_buffer == NULL) {
15998 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15999 : }
16000 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
16001 0 : if (r->in.server_name) {
16002 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16003 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16004 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16005 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));
16006 : }
16007 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
16008 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16009 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
16010 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));
16011 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
16012 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.buffer_len));
16013 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.opaque_buffer, r->in.buffer_len));
16014 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_len));
16015 : }
16016 17 : if (flags & NDR_OUT) {
16017 17 : if (r->out.return_authenticator == NULL) {
16018 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16019 : }
16020 17 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
16021 17 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
16022 : }
16023 17 : return NDR_ERR_SUCCESS;
16024 : }
16025 :
16026 17 : static enum ndr_err_code ndr_pull_netr_NetrLogonSendToSam(struct ndr_pull *ndr, int flags, struct netr_NetrLogonSendToSam *r)
16027 : {
16028 : uint32_t _ptr_server_name;
16029 17 : uint32_t size_server_name_1 = 0;
16030 17 : uint32_t length_server_name_1 = 0;
16031 17 : uint32_t size_computer_name_1 = 0;
16032 17 : uint32_t length_computer_name_1 = 0;
16033 17 : uint32_t size_opaque_buffer_1 = 0;
16034 17 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
16035 17 : TALLOC_CTX *_mem_save_credential_0 = NULL;
16036 17 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
16037 17 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16038 17 : if (flags & NDR_IN) {
16039 17 : NDR_ZERO_STRUCT(r->out);
16040 :
16041 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16042 17 : if (_ptr_server_name) {
16043 17 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16044 : } else {
16045 0 : r->in.server_name = NULL;
16046 : }
16047 17 : if (r->in.server_name) {
16048 17 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16049 17 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16050 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16051 17 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16052 17 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16053 17 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16054 17 : if (length_server_name_1 > size_server_name_1) {
16055 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
16056 : }
16057 17 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16058 17 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16059 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16060 : }
16061 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
16062 17 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
16063 17 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
16064 17 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
16065 17 : if (length_computer_name_1 > size_computer_name_1) {
16066 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
16067 : }
16068 17 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
16069 17 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
16070 17 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16071 17 : NDR_PULL_ALLOC(ndr, r->in.credential);
16072 : }
16073 17 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
16074 17 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
16075 17 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
16076 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
16077 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.opaque_buffer));
16078 17 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.opaque_buffer, &size_opaque_buffer_1));
16079 17 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16080 17 : NDR_PULL_ALLOC_N(ndr, r->in.opaque_buffer, size_opaque_buffer_1);
16081 : }
16082 17 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.opaque_buffer, size_opaque_buffer_1));
16083 17 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_len));
16084 17 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
16085 17 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
16086 17 : if (r->in.opaque_buffer) {
16087 17 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.opaque_buffer, r->in.buffer_len));
16088 : }
16089 : }
16090 17 : if (flags & NDR_OUT) {
16091 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16092 : if (r->in.credential == NULL) {
16093 : NDR_PULL_ALLOC(ndr, r->in.credential);
16094 : NDR_ZERO_STRUCTP(r->in.credential);
16095 : }
16096 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16097 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16098 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
16099 : }
16100 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
16101 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
16102 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
16103 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
16104 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
16105 : }
16106 17 : return NDR_ERR_SUCCESS;
16107 : }
16108 :
16109 0 : _PUBLIC_ void ndr_print_netr_NetrLogonSendToSam(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrLogonSendToSam *r)
16110 : {
16111 0 : ndr_print_struct(ndr, name, "netr_NetrLogonSendToSam");
16112 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16113 0 : ndr->depth++;
16114 0 : if (flags & NDR_SET_VALUES) {
16115 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16116 : }
16117 0 : if (flags & NDR_IN) {
16118 0 : ndr_print_struct(ndr, "in", "netr_NetrLogonSendToSam");
16119 0 : ndr->depth++;
16120 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
16121 0 : ndr->depth++;
16122 0 : if (r->in.server_name) {
16123 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
16124 : }
16125 0 : ndr->depth--;
16126 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
16127 0 : ndr->depth++;
16128 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
16129 0 : ndr->depth--;
16130 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
16131 0 : ndr->depth++;
16132 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
16133 0 : ndr->depth--;
16134 0 : ndr_print_ptr(ndr, "opaque_buffer", r->in.opaque_buffer);
16135 0 : ndr->depth++;
16136 0 : ndr_print_array_uint8(ndr, "opaque_buffer", r->in.opaque_buffer, r->in.buffer_len);
16137 0 : ndr->depth--;
16138 0 : ndr_print_uint32(ndr, "buffer_len", r->in.buffer_len);
16139 0 : ndr->depth--;
16140 : }
16141 0 : if (flags & NDR_OUT) {
16142 0 : ndr_print_struct(ndr, "out", "netr_NetrLogonSendToSam");
16143 0 : ndr->depth++;
16144 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
16145 0 : ndr->depth++;
16146 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
16147 0 : ndr->depth--;
16148 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
16149 0 : ndr->depth--;
16150 : }
16151 0 : ndr->depth--;
16152 : }
16153 :
16154 81 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesW(struct ndr_push *ndr, int flags, const struct netr_DsRAddressToSitenamesW *r)
16155 : {
16156 : uint32_t cntr_addresses_1;
16157 81 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16158 81 : if (flags & NDR_IN) {
16159 36 : if (r->in.addresses == NULL) {
16160 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16161 : }
16162 36 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
16163 36 : if (r->in.server_name) {
16164 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16165 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16166 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16167 36 : 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));
16168 : }
16169 36 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
16170 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.count));
16171 252 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16172 216 : NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
16173 : }
16174 252 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16175 216 : NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
16176 : }
16177 : }
16178 81 : if (flags & NDR_OUT) {
16179 45 : if (r->out.ctr == NULL) {
16180 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16181 : }
16182 45 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
16183 45 : if (*r->out.ctr) {
16184 45 : NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16185 : }
16186 45 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16187 : }
16188 81 : return NDR_ERR_SUCCESS;
16189 : }
16190 :
16191 72 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesW(struct ndr_pull *ndr, int flags, struct netr_DsRAddressToSitenamesW *r)
16192 : {
16193 : uint32_t _ptr_server_name;
16194 72 : uint32_t size_server_name_1 = 0;
16195 72 : uint32_t length_server_name_1 = 0;
16196 72 : uint32_t size_addresses_1 = 0;
16197 : uint32_t cntr_addresses_1;
16198 : uint32_t _ptr_ctr;
16199 72 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
16200 72 : TALLOC_CTX *_mem_save_addresses_1 = NULL;
16201 72 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
16202 72 : TALLOC_CTX *_mem_save_ctr_1 = NULL;
16203 72 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16204 72 : if (flags & NDR_IN) {
16205 36 : NDR_ZERO_STRUCT(r->out);
16206 :
16207 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16208 36 : if (_ptr_server_name) {
16209 36 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16210 : } else {
16211 0 : r->in.server_name = NULL;
16212 : }
16213 36 : if (r->in.server_name) {
16214 36 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16215 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16216 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16217 36 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16218 36 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16219 36 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16220 36 : if (length_server_name_1 > size_server_name_1) {
16221 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
16222 : }
16223 36 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16224 36 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16225 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16226 : }
16227 36 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
16228 36 : if (r->in.count > 32000) {
16229 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
16230 : }
16231 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses));
16232 36 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.addresses, &size_addresses_1));
16233 36 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16234 36 : NDR_PULL_ALLOC_N(ndr, r->in.addresses, size_addresses_1);
16235 : }
16236 36 : _mem_save_addresses_1 = NDR_PULL_GET_MEM_CTX(ndr);
16237 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.addresses, 0);
16238 252 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16239 216 : NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
16240 : }
16241 252 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16242 216 : NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
16243 : }
16244 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_1, 0);
16245 36 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16246 36 : NDR_ZERO_STRUCTP(r->out.ctr);
16247 36 : if (r->in.addresses) {
16248 36 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.addresses, r->in.count));
16249 : }
16250 36 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16251 : }
16252 : }
16253 72 : if (flags & NDR_OUT) {
16254 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16255 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16256 36 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16257 9 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16258 : }
16259 36 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16260 36 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16261 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
16262 36 : if (_ptr_ctr) {
16263 36 : NDR_PULL_ALLOC(ndr, *r->out.ctr);
16264 : } else {
16265 0 : *r->out.ctr = NULL;
16266 : }
16267 36 : if (*r->out.ctr) {
16268 36 : _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
16269 36 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
16270 36 : NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16271 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
16272 : }
16273 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16274 36 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16275 : }
16276 72 : return NDR_ERR_SUCCESS;
16277 : }
16278 :
16279 18 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesW *r)
16280 : {
16281 : uint32_t cntr_addresses_1;
16282 18 : ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesW");
16283 18 : if (r == NULL) { ndr_print_null(ndr); return; }
16284 18 : ndr->depth++;
16285 18 : if (flags & NDR_SET_VALUES) {
16286 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16287 : }
16288 18 : if (flags & NDR_IN) {
16289 0 : ndr_print_struct(ndr, "in", "netr_DsRAddressToSitenamesW");
16290 0 : ndr->depth++;
16291 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
16292 0 : ndr->depth++;
16293 0 : if (r->in.server_name) {
16294 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
16295 : }
16296 0 : ndr->depth--;
16297 0 : ndr_print_uint32(ndr, "count", r->in.count);
16298 0 : ndr_print_ptr(ndr, "addresses", r->in.addresses);
16299 0 : ndr->depth++;
16300 0 : ndr->print(ndr, "%s: ARRAY(%d)", "addresses", (int)r->in.count);
16301 0 : ndr->depth++;
16302 0 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16303 0 : ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
16304 : }
16305 0 : ndr->depth--;
16306 0 : ndr->depth--;
16307 0 : ndr->depth--;
16308 : }
16309 18 : if (flags & NDR_OUT) {
16310 18 : ndr_print_struct(ndr, "out", "netr_DsRAddressToSitenamesW");
16311 18 : ndr->depth++;
16312 18 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
16313 18 : ndr->depth++;
16314 18 : ndr_print_ptr(ndr, "ctr", *r->out.ctr);
16315 18 : ndr->depth++;
16316 18 : if (*r->out.ctr) {
16317 18 : ndr_print_netr_DsRAddressToSitenamesWCtr(ndr, "ctr", *r->out.ctr);
16318 : }
16319 18 : ndr->depth--;
16320 18 : ndr->depth--;
16321 18 : ndr_print_WERROR(ndr, "result", r->out.result);
16322 18 : ndr->depth--;
16323 : }
16324 18 : ndr->depth--;
16325 : }
16326 :
16327 354 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCNameEx2 *r)
16328 : {
16329 354 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16330 354 : if (flags & NDR_IN) {
16331 171 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16332 171 : if (r->in.server_unc) {
16333 159 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16334 159 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16335 159 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16336 159 : 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));
16337 : }
16338 171 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client_account));
16339 171 : if (r->in.client_account) {
16340 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client_account, CH_UTF16)));
16341 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16342 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client_account, CH_UTF16)));
16343 12 : 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));
16344 : }
16345 171 : NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.mask));
16346 171 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
16347 171 : if (r->in.domain_name) {
16348 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
16349 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16350 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
16351 48 : 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));
16352 : }
16353 171 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
16354 171 : if (r->in.domain_guid) {
16355 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
16356 : }
16357 171 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
16358 171 : if (r->in.site_name) {
16359 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
16360 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16361 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
16362 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));
16363 : }
16364 171 : NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags));
16365 : }
16366 354 : if (flags & NDR_OUT) {
16367 183 : if (r->out.info == NULL) {
16368 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16369 : }
16370 183 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
16371 183 : if (*r->out.info) {
16372 183 : NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
16373 : }
16374 183 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16375 : }
16376 354 : return NDR_ERR_SUCCESS;
16377 : }
16378 :
16379 342 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCNameEx2 *r)
16380 : {
16381 : uint32_t _ptr_server_unc;
16382 342 : uint32_t size_server_unc_1 = 0;
16383 342 : uint32_t length_server_unc_1 = 0;
16384 : uint32_t _ptr_client_account;
16385 342 : uint32_t size_client_account_1 = 0;
16386 342 : uint32_t length_client_account_1 = 0;
16387 : uint32_t _ptr_domain_name;
16388 342 : uint32_t size_domain_name_1 = 0;
16389 342 : uint32_t length_domain_name_1 = 0;
16390 : uint32_t _ptr_domain_guid;
16391 : uint32_t _ptr_site_name;
16392 342 : uint32_t size_site_name_1 = 0;
16393 342 : uint32_t length_site_name_1 = 0;
16394 : uint32_t _ptr_info;
16395 342 : TALLOC_CTX *_mem_save_server_unc_0 = NULL;
16396 342 : TALLOC_CTX *_mem_save_client_account_0 = NULL;
16397 342 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
16398 342 : TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
16399 342 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
16400 342 : TALLOC_CTX *_mem_save_info_0 = NULL;
16401 342 : TALLOC_CTX *_mem_save_info_1 = NULL;
16402 342 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16403 342 : if (flags & NDR_IN) {
16404 171 : NDR_ZERO_STRUCT(r->out);
16405 :
16406 171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16407 171 : if (_ptr_server_unc) {
16408 159 : NDR_PULL_ALLOC(ndr, r->in.server_unc);
16409 : } else {
16410 12 : r->in.server_unc = NULL;
16411 : }
16412 171 : if (r->in.server_unc) {
16413 159 : _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16414 159 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16415 159 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16416 159 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16417 159 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_unc, &size_server_unc_1));
16418 159 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_unc, &length_server_unc_1));
16419 159 : if (length_server_unc_1 > size_server_unc_1) {
16420 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16421 : }
16422 159 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16423 159 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16424 159 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16425 : }
16426 171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_account));
16427 171 : if (_ptr_client_account) {
16428 12 : NDR_PULL_ALLOC(ndr, r->in.client_account);
16429 : } else {
16430 159 : r->in.client_account = NULL;
16431 : }
16432 171 : if (r->in.client_account) {
16433 12 : _mem_save_client_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
16434 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.client_account, 0);
16435 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client_account));
16436 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client_account));
16437 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.client_account, &size_client_account_1));
16438 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.client_account, &length_client_account_1));
16439 12 : if (length_client_account_1 > size_client_account_1) {
16440 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_account_1, length_client_account_1);
16441 : }
16442 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_client_account_1, sizeof(uint16_t)));
16443 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client_account, length_client_account_1, sizeof(uint16_t), CH_UTF16));
16444 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_account_0, 0);
16445 : }
16446 171 : NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.mask));
16447 171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
16448 171 : if (_ptr_domain_name) {
16449 48 : NDR_PULL_ALLOC(ndr, r->in.domain_name);
16450 : } else {
16451 123 : r->in.domain_name = NULL;
16452 : }
16453 171 : if (r->in.domain_name) {
16454 48 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16455 48 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
16456 48 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
16457 48 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
16458 48 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
16459 48 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
16460 48 : if (length_domain_name_1 > size_domain_name_1) {
16461 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_name_1, length_domain_name_1);
16462 : }
16463 48 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
16464 48 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
16465 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
16466 : }
16467 171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
16468 171 : if (_ptr_domain_guid) {
16469 0 : NDR_PULL_ALLOC(ndr, r->in.domain_guid);
16470 : } else {
16471 171 : r->in.domain_guid = NULL;
16472 : }
16473 171 : if (r->in.domain_guid) {
16474 0 : _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
16475 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
16476 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
16477 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
16478 : }
16479 171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
16480 171 : if (_ptr_site_name) {
16481 4 : NDR_PULL_ALLOC(ndr, r->in.site_name);
16482 : } else {
16483 167 : r->in.site_name = NULL;
16484 : }
16485 171 : if (r->in.site_name) {
16486 4 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16487 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
16488 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
16489 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
16490 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
16491 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
16492 4 : if (length_site_name_1 > size_site_name_1) {
16493 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_site_name_1, length_site_name_1);
16494 : }
16495 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
16496 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
16497 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
16498 : }
16499 171 : NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags));
16500 171 : NDR_PULL_ALLOC(ndr, r->out.info);
16501 171 : NDR_ZERO_STRUCTP(r->out.info);
16502 : }
16503 342 : if (flags & NDR_OUT) {
16504 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16505 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16506 171 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16507 135 : NDR_PULL_ALLOC(ndr, r->out.info);
16508 : }
16509 171 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16510 171 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16511 171 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
16512 171 : if (_ptr_info) {
16513 171 : NDR_PULL_ALLOC(ndr, *r->out.info);
16514 : } else {
16515 0 : *r->out.info = NULL;
16516 : }
16517 171 : if (*r->out.info) {
16518 171 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
16519 171 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
16520 171 : NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
16521 171 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
16522 : }
16523 171 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16524 171 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16525 : }
16526 342 : return NDR_ERR_SUCCESS;
16527 : }
16528 :
16529 24 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx2 *r)
16530 : {
16531 24 : ndr_print_struct(ndr, name, "netr_DsRGetDCNameEx2");
16532 24 : if (r == NULL) { ndr_print_null(ndr); return; }
16533 24 : ndr->depth++;
16534 24 : if (flags & NDR_SET_VALUES) {
16535 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16536 : }
16537 24 : if (flags & NDR_IN) {
16538 0 : ndr_print_struct(ndr, "in", "netr_DsRGetDCNameEx2");
16539 0 : ndr->depth++;
16540 0 : ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16541 0 : ndr->depth++;
16542 0 : if (r->in.server_unc) {
16543 0 : ndr_print_string(ndr, "server_unc", r->in.server_unc);
16544 : }
16545 0 : ndr->depth--;
16546 0 : ndr_print_ptr(ndr, "client_account", r->in.client_account);
16547 0 : ndr->depth++;
16548 0 : if (r->in.client_account) {
16549 0 : ndr_print_string(ndr, "client_account", r->in.client_account);
16550 : }
16551 0 : ndr->depth--;
16552 0 : ndr_print_samr_AcctFlags(ndr, "mask", r->in.mask);
16553 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
16554 0 : ndr->depth++;
16555 0 : if (r->in.domain_name) {
16556 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
16557 : }
16558 0 : ndr->depth--;
16559 0 : ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
16560 0 : ndr->depth++;
16561 0 : if (r->in.domain_guid) {
16562 0 : ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
16563 : }
16564 0 : ndr->depth--;
16565 0 : ndr_print_ptr(ndr, "site_name", r->in.site_name);
16566 0 : ndr->depth++;
16567 0 : if (r->in.site_name) {
16568 0 : ndr_print_string(ndr, "site_name", r->in.site_name);
16569 : }
16570 0 : ndr->depth--;
16571 0 : ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags);
16572 0 : ndr->depth--;
16573 : }
16574 24 : if (flags & NDR_OUT) {
16575 24 : ndr_print_struct(ndr, "out", "netr_DsRGetDCNameEx2");
16576 24 : ndr->depth++;
16577 24 : ndr_print_ptr(ndr, "info", r->out.info);
16578 24 : ndr->depth++;
16579 24 : ndr_print_ptr(ndr, "info", *r->out.info);
16580 24 : ndr->depth++;
16581 24 : if (*r->out.info) {
16582 24 : ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
16583 : }
16584 24 : ndr->depth--;
16585 24 : ndr->depth--;
16586 24 : ndr_print_WERROR(ndr, "result", r->out.result);
16587 24 : ndr->depth--;
16588 : }
16589 24 : ndr->depth--;
16590 : }
16591 :
16592 0 : static enum ndr_err_code ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
16593 : {
16594 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16595 0 : if (flags & NDR_IN) {
16596 : }
16597 0 : if (flags & NDR_OUT) {
16598 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16599 : }
16600 0 : return NDR_ERR_SUCCESS;
16601 : }
16602 :
16603 0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
16604 : {
16605 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16606 0 : if (flags & NDR_IN) {
16607 : }
16608 0 : if (flags & NDR_OUT) {
16609 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16610 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16611 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16612 : }
16613 0 : return NDR_ERR_SUCCESS;
16614 : }
16615 :
16616 0 : _PUBLIC_ void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
16617 : {
16618 0 : ndr_print_struct(ndr, name, "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
16619 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16620 0 : ndr->depth++;
16621 0 : if (flags & NDR_SET_VALUES) {
16622 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16623 : }
16624 0 : if (flags & NDR_IN) {
16625 0 : ndr_print_struct(ndr, "in", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
16626 0 : ndr->depth++;
16627 0 : ndr->depth--;
16628 : }
16629 0 : if (flags & NDR_OUT) {
16630 0 : ndr_print_struct(ndr, "out", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
16631 0 : ndr->depth++;
16632 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16633 0 : ndr->depth--;
16634 : }
16635 0 : ndr->depth--;
16636 : }
16637 :
16638 12 : static enum ndr_err_code ndr_push_netr_NetrEnumerateTrustedDomainsEx(struct ndr_push *ndr, int flags, const struct netr_NetrEnumerateTrustedDomainsEx *r)
16639 : {
16640 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16641 12 : if (flags & NDR_IN) {
16642 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
16643 12 : if (r->in.server_name) {
16644 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16645 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16646 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16647 12 : 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));
16648 : }
16649 : }
16650 12 : if (flags & NDR_OUT) {
16651 0 : if (r->out.dom_trust_list == NULL) {
16652 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16653 : }
16654 0 : NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dom_trust_list));
16655 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16656 : }
16657 12 : return NDR_ERR_SUCCESS;
16658 : }
16659 :
16660 12 : static enum ndr_err_code ndr_pull_netr_NetrEnumerateTrustedDomainsEx(struct ndr_pull *ndr, int flags, struct netr_NetrEnumerateTrustedDomainsEx *r)
16661 : {
16662 : uint32_t _ptr_server_name;
16663 12 : uint32_t size_server_name_1 = 0;
16664 12 : uint32_t length_server_name_1 = 0;
16665 12 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
16666 12 : TALLOC_CTX *_mem_save_dom_trust_list_0 = NULL;
16667 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16668 12 : if (flags & NDR_IN) {
16669 12 : NDR_ZERO_STRUCT(r->out);
16670 :
16671 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16672 12 : if (_ptr_server_name) {
16673 12 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16674 : } else {
16675 0 : r->in.server_name = NULL;
16676 : }
16677 12 : if (r->in.server_name) {
16678 12 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16679 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16680 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16681 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16682 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16683 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16684 12 : if (length_server_name_1 > size_server_name_1) {
16685 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
16686 : }
16687 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16688 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16689 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16690 : }
16691 12 : NDR_PULL_ALLOC(ndr, r->out.dom_trust_list);
16692 12 : NDR_ZERO_STRUCTP(r->out.dom_trust_list);
16693 : }
16694 12 : if (flags & NDR_OUT) {
16695 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16696 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16697 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16698 0 : NDR_PULL_ALLOC(ndr, r->out.dom_trust_list);
16699 : }
16700 0 : _mem_save_dom_trust_list_0 = NDR_PULL_GET_MEM_CTX(ndr);
16701 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dom_trust_list, LIBNDR_FLAG_REF_ALLOC);
16702 0 : NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dom_trust_list));
16703 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_trust_list_0, LIBNDR_FLAG_REF_ALLOC);
16704 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16705 : }
16706 12 : return NDR_ERR_SUCCESS;
16707 : }
16708 :
16709 0 : _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomainsEx *r)
16710 : {
16711 0 : ndr_print_struct(ndr, name, "netr_NetrEnumerateTrustedDomainsEx");
16712 0 : if (r == NULL) { ndr_print_null(ndr); return; }
16713 0 : ndr->depth++;
16714 0 : if (flags & NDR_SET_VALUES) {
16715 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16716 : }
16717 0 : if (flags & NDR_IN) {
16718 0 : ndr_print_struct(ndr, "in", "netr_NetrEnumerateTrustedDomainsEx");
16719 0 : ndr->depth++;
16720 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
16721 0 : ndr->depth++;
16722 0 : if (r->in.server_name) {
16723 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
16724 : }
16725 0 : ndr->depth--;
16726 0 : ndr->depth--;
16727 : }
16728 0 : if (flags & NDR_OUT) {
16729 0 : ndr_print_struct(ndr, "out", "netr_NetrEnumerateTrustedDomainsEx");
16730 0 : ndr->depth++;
16731 0 : ndr_print_ptr(ndr, "dom_trust_list", r->out.dom_trust_list);
16732 0 : ndr->depth++;
16733 0 : ndr_print_netr_DomainTrustList(ndr, "dom_trust_list", r->out.dom_trust_list);
16734 0 : ndr->depth--;
16735 0 : ndr_print_WERROR(ndr, "result", r->out.result);
16736 0 : ndr->depth--;
16737 : }
16738 0 : ndr->depth--;
16739 : }
16740 :
16741 81 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExW(struct ndr_push *ndr, int flags, const struct netr_DsRAddressToSitenamesExW *r)
16742 : {
16743 : uint32_t cntr_addresses_1;
16744 81 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16745 81 : if (flags & NDR_IN) {
16746 36 : if (r->in.addresses == NULL) {
16747 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16748 : }
16749 36 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
16750 36 : if (r->in.server_name) {
16751 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16752 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16753 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16754 36 : 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));
16755 : }
16756 36 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
16757 36 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.count));
16758 252 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16759 216 : NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
16760 : }
16761 252 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16762 216 : NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
16763 : }
16764 : }
16765 81 : if (flags & NDR_OUT) {
16766 45 : if (r->out.ctr == NULL) {
16767 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16768 : }
16769 45 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
16770 45 : if (*r->out.ctr) {
16771 45 : NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16772 : }
16773 45 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16774 : }
16775 81 : return NDR_ERR_SUCCESS;
16776 : }
16777 :
16778 72 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExW(struct ndr_pull *ndr, int flags, struct netr_DsRAddressToSitenamesExW *r)
16779 : {
16780 : uint32_t _ptr_server_name;
16781 72 : uint32_t size_server_name_1 = 0;
16782 72 : uint32_t length_server_name_1 = 0;
16783 72 : uint32_t size_addresses_1 = 0;
16784 : uint32_t cntr_addresses_1;
16785 : uint32_t _ptr_ctr;
16786 72 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
16787 72 : TALLOC_CTX *_mem_save_addresses_1 = NULL;
16788 72 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
16789 72 : TALLOC_CTX *_mem_save_ctr_1 = NULL;
16790 72 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16791 72 : if (flags & NDR_IN) {
16792 36 : NDR_ZERO_STRUCT(r->out);
16793 :
16794 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16795 36 : if (_ptr_server_name) {
16796 36 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16797 : } else {
16798 0 : r->in.server_name = NULL;
16799 : }
16800 36 : if (r->in.server_name) {
16801 36 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16802 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16803 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16804 36 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16805 36 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16806 36 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16807 36 : if (length_server_name_1 > size_server_name_1) {
16808 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
16809 : }
16810 36 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16811 36 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16812 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16813 : }
16814 36 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
16815 36 : if (r->in.count > 32000) {
16816 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
16817 : }
16818 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses));
16819 36 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.addresses, &size_addresses_1));
16820 36 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16821 36 : NDR_PULL_ALLOC_N(ndr, r->in.addresses, size_addresses_1);
16822 : }
16823 36 : _mem_save_addresses_1 = NDR_PULL_GET_MEM_CTX(ndr);
16824 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.addresses, 0);
16825 252 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16826 216 : NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
16827 : }
16828 252 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16829 216 : NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
16830 : }
16831 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_1, 0);
16832 36 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16833 36 : NDR_ZERO_STRUCTP(r->out.ctr);
16834 36 : if (r->in.addresses) {
16835 36 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.addresses, r->in.count));
16836 : }
16837 36 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
16838 : }
16839 : }
16840 72 : if (flags & NDR_OUT) {
16841 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16842 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16843 36 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16844 9 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16845 : }
16846 36 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16847 36 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16848 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
16849 36 : if (_ptr_ctr) {
16850 36 : NDR_PULL_ALLOC(ndr, *r->out.ctr);
16851 : } else {
16852 0 : *r->out.ctr = NULL;
16853 : }
16854 36 : if (*r->out.ctr) {
16855 36 : _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
16856 36 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
16857 36 : NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16858 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
16859 : }
16860 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16861 36 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16862 : }
16863 72 : return NDR_ERR_SUCCESS;
16864 : }
16865 :
16866 18 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesExW *r)
16867 : {
16868 : uint32_t cntr_addresses_1;
16869 18 : ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesExW");
16870 18 : if (r == NULL) { ndr_print_null(ndr); return; }
16871 18 : ndr->depth++;
16872 18 : if (flags & NDR_SET_VALUES) {
16873 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16874 : }
16875 18 : if (flags & NDR_IN) {
16876 0 : ndr_print_struct(ndr, "in", "netr_DsRAddressToSitenamesExW");
16877 0 : ndr->depth++;
16878 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
16879 0 : ndr->depth++;
16880 0 : if (r->in.server_name) {
16881 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
16882 : }
16883 0 : ndr->depth--;
16884 0 : ndr_print_uint32(ndr, "count", r->in.count);
16885 0 : ndr_print_ptr(ndr, "addresses", r->in.addresses);
16886 0 : ndr->depth++;
16887 0 : ndr->print(ndr, "%s: ARRAY(%d)", "addresses", (int)r->in.count);
16888 0 : ndr->depth++;
16889 0 : for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
16890 0 : ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
16891 : }
16892 0 : ndr->depth--;
16893 0 : ndr->depth--;
16894 0 : ndr->depth--;
16895 : }
16896 18 : if (flags & NDR_OUT) {
16897 18 : ndr_print_struct(ndr, "out", "netr_DsRAddressToSitenamesExW");
16898 18 : ndr->depth++;
16899 18 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
16900 18 : ndr->depth++;
16901 18 : ndr_print_ptr(ndr, "ctr", *r->out.ctr);
16902 18 : ndr->depth++;
16903 18 : if (*r->out.ctr) {
16904 18 : ndr_print_netr_DsRAddressToSitenamesExWCtr(ndr, "ctr", *r->out.ctr);
16905 : }
16906 18 : ndr->depth--;
16907 18 : ndr->depth--;
16908 18 : ndr_print_WERROR(ndr, "result", r->out.result);
16909 18 : ndr->depth--;
16910 : }
16911 18 : ndr->depth--;
16912 : }
16913 :
16914 37 : static enum ndr_err_code ndr_push_netr_DsrGetDcSiteCoverageW(struct ndr_push *ndr, int flags, const struct netr_DsrGetDcSiteCoverageW *r)
16915 : {
16916 37 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
16917 37 : if (flags & NDR_IN) {
16918 17 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
16919 17 : if (r->in.server_name) {
16920 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16921 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16922 17 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
16923 17 : 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));
16924 : }
16925 : }
16926 37 : if (flags & NDR_OUT) {
16927 20 : if (r->out.ctr == NULL) {
16928 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16929 : }
16930 20 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
16931 20 : if (*r->out.ctr) {
16932 20 : NDR_CHECK(ndr_push_DcSitesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16933 : }
16934 20 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16935 : }
16936 37 : return NDR_ERR_SUCCESS;
16937 : }
16938 :
16939 34 : static enum ndr_err_code ndr_pull_netr_DsrGetDcSiteCoverageW(struct ndr_pull *ndr, int flags, struct netr_DsrGetDcSiteCoverageW *r)
16940 : {
16941 : uint32_t _ptr_server_name;
16942 34 : uint32_t size_server_name_1 = 0;
16943 34 : uint32_t length_server_name_1 = 0;
16944 : uint32_t _ptr_ctr;
16945 34 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
16946 34 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
16947 34 : TALLOC_CTX *_mem_save_ctr_1 = NULL;
16948 34 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
16949 34 : if (flags & NDR_IN) {
16950 17 : NDR_ZERO_STRUCT(r->out);
16951 :
16952 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
16953 17 : if (_ptr_server_name) {
16954 17 : NDR_PULL_ALLOC(ndr, r->in.server_name);
16955 : } else {
16956 0 : r->in.server_name = NULL;
16957 : }
16958 17 : if (r->in.server_name) {
16959 17 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16960 17 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
16961 17 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
16962 17 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
16963 17 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
16964 17 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
16965 17 : if (length_server_name_1 > size_server_name_1) {
16966 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
16967 : }
16968 17 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
16969 17 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
16970 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
16971 : }
16972 17 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16973 17 : NDR_ZERO_STRUCTP(r->out.ctr);
16974 : }
16975 34 : if (flags & NDR_OUT) {
16976 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
16977 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
16978 17 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16979 8 : NDR_PULL_ALLOC(ndr, r->out.ctr);
16980 : }
16981 17 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16982 17 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
16983 17 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
16984 17 : if (_ptr_ctr) {
16985 17 : NDR_PULL_ALLOC(ndr, *r->out.ctr);
16986 : } else {
16987 0 : *r->out.ctr = NULL;
16988 : }
16989 17 : if (*r->out.ctr) {
16990 17 : _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
16991 17 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
16992 17 : NDR_CHECK(ndr_pull_DcSitesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
16993 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
16994 : }
16995 17 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16996 17 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16997 : }
16998 34 : return NDR_ERR_SUCCESS;
16999 : }
17000 :
17001 6 : _PUBLIC_ void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrGetDcSiteCoverageW *r)
17002 : {
17003 6 : ndr_print_struct(ndr, name, "netr_DsrGetDcSiteCoverageW");
17004 6 : if (r == NULL) { ndr_print_null(ndr); return; }
17005 6 : ndr->depth++;
17006 6 : if (flags & NDR_SET_VALUES) {
17007 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17008 : }
17009 6 : if (flags & NDR_IN) {
17010 0 : ndr_print_struct(ndr, "in", "netr_DsrGetDcSiteCoverageW");
17011 0 : ndr->depth++;
17012 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17013 0 : ndr->depth++;
17014 0 : if (r->in.server_name) {
17015 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17016 : }
17017 0 : ndr->depth--;
17018 0 : ndr->depth--;
17019 : }
17020 6 : if (flags & NDR_OUT) {
17021 6 : ndr_print_struct(ndr, "out", "netr_DsrGetDcSiteCoverageW");
17022 6 : ndr->depth++;
17023 6 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
17024 6 : ndr->depth++;
17025 6 : ndr_print_ptr(ndr, "ctr", *r->out.ctr);
17026 6 : ndr->depth++;
17027 6 : if (*r->out.ctr) {
17028 6 : ndr_print_DcSitesCtr(ndr, "ctr", *r->out.ctr);
17029 : }
17030 6 : ndr->depth--;
17031 6 : ndr->depth--;
17032 6 : ndr_print_WERROR(ndr, "result", r->out.result);
17033 6 : ndr->depth--;
17034 : }
17035 6 : ndr->depth--;
17036 : }
17037 :
17038 9260 : static enum ndr_err_code ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogonEx *r)
17039 : {
17040 9260 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17041 9260 : if (flags & NDR_IN) {
17042 3944 : if (r->in.logon == NULL) {
17043 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17044 : }
17045 3944 : if (r->in.flags == NULL) {
17046 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17047 : }
17048 3944 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17049 3944 : if (r->in.server_name) {
17050 3944 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17051 3944 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17052 3944 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17053 3944 : 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));
17054 : }
17055 3944 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
17056 3944 : if (r->in.computer_name) {
17057 3944 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17058 3944 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17059 3944 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17060 3944 : 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));
17061 : }
17062 3944 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
17063 3944 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
17064 3944 : NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
17065 3944 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
17066 3944 : NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->in.flags));
17067 : }
17068 9260 : if (flags & NDR_OUT) {
17069 5316 : if (r->out.validation == NULL) {
17070 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17071 : }
17072 5316 : if (r->out.authoritative == NULL) {
17073 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17074 : }
17075 5316 : if (r->out.flags == NULL) {
17076 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17077 : }
17078 5316 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
17079 5316 : NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
17080 5316 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
17081 5316 : NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->out.flags));
17082 5316 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
17083 : }
17084 9260 : return NDR_ERR_SUCCESS;
17085 : }
17086 :
17087 8930 : static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogonEx *r)
17088 : {
17089 : uint32_t _ptr_server_name;
17090 8930 : uint32_t size_server_name_1 = 0;
17091 8930 : uint32_t length_server_name_1 = 0;
17092 : uint32_t _ptr_computer_name;
17093 8930 : uint32_t size_computer_name_1 = 0;
17094 8930 : uint32_t length_computer_name_1 = 0;
17095 8930 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17096 8930 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
17097 8930 : TALLOC_CTX *_mem_save_logon_0 = NULL;
17098 8930 : TALLOC_CTX *_mem_save_validation_0 = NULL;
17099 8930 : TALLOC_CTX *_mem_save_authoritative_0 = NULL;
17100 8930 : TALLOC_CTX *_mem_save_flags_0 = NULL;
17101 8930 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17102 8930 : if (flags & NDR_IN) {
17103 4986 : NDR_ZERO_STRUCT(r->out);
17104 :
17105 4986 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17106 4986 : if (_ptr_server_name) {
17107 4986 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17108 : } else {
17109 0 : r->in.server_name = NULL;
17110 : }
17111 4986 : if (r->in.server_name) {
17112 4986 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17113 4986 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17114 4986 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17115 4986 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17116 4986 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17117 4986 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17118 4986 : if (length_server_name_1 > size_server_name_1) {
17119 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
17120 : }
17121 4986 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17122 4986 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17123 4986 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17124 : }
17125 4986 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
17126 4986 : if (_ptr_computer_name) {
17127 4986 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
17128 : } else {
17129 0 : r->in.computer_name = NULL;
17130 : }
17131 4986 : if (r->in.computer_name) {
17132 4986 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17133 4986 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
17134 4986 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
17135 4986 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
17136 4986 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
17137 4986 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
17138 4986 : if (length_computer_name_1 > size_computer_name_1) {
17139 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
17140 : }
17141 4986 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
17142 4986 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
17143 4986 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
17144 : }
17145 4986 : NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
17146 4986 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17147 4986 : NDR_PULL_ALLOC(ndr, r->in.logon);
17148 : }
17149 4986 : _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
17150 4986 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
17151 4986 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
17152 4986 : NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
17153 4986 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
17154 4986 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
17155 4986 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17156 4986 : NDR_PULL_ALLOC(ndr, r->in.flags);
17157 : }
17158 4986 : _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
17159 4986 : NDR_PULL_SET_MEM_CTX(ndr, r->in.flags, LIBNDR_FLAG_REF_ALLOC);
17160 4986 : NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->in.flags));
17161 4986 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
17162 4986 : NDR_PULL_ALLOC(ndr, r->out.validation);
17163 4986 : NDR_ZERO_STRUCTP(r->out.validation);
17164 4986 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
17165 4986 : NDR_ZERO_STRUCTP(r->out.authoritative);
17166 4986 : NDR_PULL_ALLOC(ndr, r->out.flags);
17167 4986 : *r->out.flags = *r->in.flags;
17168 : }
17169 8930 : if (flags & NDR_OUT) {
17170 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17171 : if (r->in.logon == NULL) {
17172 : NDR_PULL_ALLOC(ndr, r->in.logon);
17173 : NDR_ZERO_STRUCTP(r->in.logon);
17174 : }
17175 : if (r->in.flags == NULL) {
17176 : NDR_PULL_ALLOC(ndr, r->in.flags);
17177 : NDR_ZERO_STRUCTP(r->in.flags);
17178 : }
17179 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17180 3944 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17181 366 : NDR_PULL_ALLOC(ndr, r->out.validation);
17182 : }
17183 3944 : _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
17184 3944 : NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
17185 3944 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
17186 3944 : NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
17187 3944 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
17188 3944 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17189 366 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
17190 : }
17191 3944 : _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
17192 3944 : NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
17193 3944 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
17194 3944 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
17195 3944 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17196 366 : NDR_PULL_ALLOC(ndr, r->out.flags);
17197 : }
17198 3944 : _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
17199 3944 : NDR_PULL_SET_MEM_CTX(ndr, r->out.flags, LIBNDR_FLAG_REF_ALLOC);
17200 3944 : NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->out.flags));
17201 3944 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
17202 3944 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
17203 : }
17204 8930 : return NDR_ERR_SUCCESS;
17205 : }
17206 :
17207 660 : _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonEx *r)
17208 : {
17209 660 : ndr_print_struct(ndr, name, "netr_LogonSamLogonEx");
17210 660 : if (r == NULL) { ndr_print_null(ndr); return; }
17211 660 : ndr->depth++;
17212 660 : if (flags & NDR_SET_VALUES) {
17213 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17214 : }
17215 660 : if (flags & NDR_IN) {
17216 0 : ndr_print_struct(ndr, "in", "netr_LogonSamLogonEx");
17217 0 : ndr->depth++;
17218 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17219 0 : ndr->depth++;
17220 0 : if (r->in.server_name) {
17221 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17222 : }
17223 0 : ndr->depth--;
17224 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
17225 0 : ndr->depth++;
17226 0 : if (r->in.computer_name) {
17227 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
17228 : }
17229 0 : ndr->depth--;
17230 0 : ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
17231 0 : ndr_print_ptr(ndr, "logon", r->in.logon);
17232 0 : ndr->depth++;
17233 0 : ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
17234 0 : ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
17235 0 : ndr->depth--;
17236 0 : ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
17237 0 : ndr_print_ptr(ndr, "flags", r->in.flags);
17238 0 : ndr->depth++;
17239 0 : ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->in.flags);
17240 0 : ndr->depth--;
17241 0 : ndr->depth--;
17242 : }
17243 660 : if (flags & NDR_OUT) {
17244 660 : ndr_print_struct(ndr, "out", "netr_LogonSamLogonEx");
17245 660 : ndr->depth++;
17246 660 : ndr_print_ptr(ndr, "validation", r->out.validation);
17247 660 : ndr->depth++;
17248 660 : ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
17249 660 : ndr_print_netr_Validation(ndr, "validation", r->out.validation);
17250 660 : ndr->depth--;
17251 660 : ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
17252 660 : ndr->depth++;
17253 660 : ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
17254 660 : ndr->depth--;
17255 660 : ndr_print_ptr(ndr, "flags", r->out.flags);
17256 660 : ndr->depth++;
17257 660 : ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->out.flags);
17258 660 : ndr->depth--;
17259 660 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
17260 660 : ndr->depth--;
17261 : }
17262 660 : ndr->depth--;
17263 : }
17264 :
17265 83 : static enum ndr_err_code ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push *ndr, int flags, const struct netr_DsrEnumerateDomainTrusts *r)
17266 : {
17267 83 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17268 83 : if (flags & NDR_IN) {
17269 38 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17270 38 : if (r->in.server_name) {
17271 38 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17272 38 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17273 38 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17274 38 : 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));
17275 : }
17276 38 : NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->in.trust_flags));
17277 : }
17278 83 : if (flags & NDR_OUT) {
17279 45 : if (r->out.trusts == NULL) {
17280 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17281 : }
17282 45 : NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts));
17283 45 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17284 : }
17285 83 : return NDR_ERR_SUCCESS;
17286 : }
17287 :
17288 80 : static enum ndr_err_code ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull *ndr, int flags, struct netr_DsrEnumerateDomainTrusts *r)
17289 : {
17290 : uint32_t _ptr_server_name;
17291 80 : uint32_t size_server_name_1 = 0;
17292 80 : uint32_t length_server_name_1 = 0;
17293 80 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17294 80 : TALLOC_CTX *_mem_save_trusts_0 = NULL;
17295 80 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17296 80 : if (flags & NDR_IN) {
17297 42 : NDR_ZERO_STRUCT(r->out);
17298 :
17299 42 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17300 42 : if (_ptr_server_name) {
17301 42 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17302 : } else {
17303 0 : r->in.server_name = NULL;
17304 : }
17305 42 : if (r->in.server_name) {
17306 42 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17307 42 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17308 42 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17309 42 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17310 42 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17311 42 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17312 42 : if (length_server_name_1 > size_server_name_1) {
17313 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
17314 : }
17315 42 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17316 42 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17317 42 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17318 : }
17319 42 : NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->in.trust_flags));
17320 42 : NDR_PULL_ALLOC(ndr, r->out.trusts);
17321 42 : NDR_ZERO_STRUCTP(r->out.trusts);
17322 : }
17323 80 : if (flags & NDR_OUT) {
17324 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17325 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17326 38 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17327 29 : NDR_PULL_ALLOC(ndr, r->out.trusts);
17328 : }
17329 38 : _mem_save_trusts_0 = NDR_PULL_GET_MEM_CTX(ndr);
17330 38 : NDR_PULL_SET_MEM_CTX(ndr, r->out.trusts, LIBNDR_FLAG_REF_ALLOC);
17331 38 : NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts));
17332 38 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_0, LIBNDR_FLAG_REF_ALLOC);
17333 38 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17334 : }
17335 80 : return NDR_ERR_SUCCESS;
17336 : }
17337 :
17338 6 : _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrEnumerateDomainTrusts *r)
17339 : {
17340 6 : ndr_print_struct(ndr, name, "netr_DsrEnumerateDomainTrusts");
17341 6 : if (r == NULL) { ndr_print_null(ndr); return; }
17342 6 : ndr->depth++;
17343 6 : if (flags & NDR_SET_VALUES) {
17344 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17345 : }
17346 6 : if (flags & NDR_IN) {
17347 0 : ndr_print_struct(ndr, "in", "netr_DsrEnumerateDomainTrusts");
17348 0 : ndr->depth++;
17349 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17350 0 : ndr->depth++;
17351 0 : if (r->in.server_name) {
17352 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17353 : }
17354 0 : ndr->depth--;
17355 0 : ndr_print_netr_TrustFlags(ndr, "trust_flags", r->in.trust_flags);
17356 0 : ndr->depth--;
17357 : }
17358 6 : if (flags & NDR_OUT) {
17359 6 : ndr_print_struct(ndr, "out", "netr_DsrEnumerateDomainTrusts");
17360 6 : ndr->depth++;
17361 6 : ndr_print_ptr(ndr, "trusts", r->out.trusts);
17362 6 : ndr->depth++;
17363 6 : ndr_print_netr_DomainTrustList(ndr, "trusts", r->out.trusts);
17364 6 : ndr->depth--;
17365 6 : ndr_print_WERROR(ndr, "result", r->out.result);
17366 6 : ndr->depth--;
17367 : }
17368 6 : ndr->depth--;
17369 : }
17370 :
17371 0 : static enum ndr_err_code ndr_push_netr_DsrDeregisterDNSHostRecords(struct ndr_push *ndr, int flags, const struct netr_DsrDeregisterDNSHostRecords *r)
17372 : {
17373 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17374 0 : if (flags & NDR_IN) {
17375 0 : if (r->in.dns_host == NULL) {
17376 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17377 : }
17378 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17379 0 : if (r->in.server_name) {
17380 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17381 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17382 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17383 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));
17384 : }
17385 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain));
17386 0 : if (r->in.domain) {
17387 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF16)));
17388 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17389 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF16)));
17390 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));
17391 : }
17392 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
17393 0 : if (r->in.domain_guid) {
17394 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
17395 : }
17396 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dsa_guid));
17397 0 : if (r->in.dsa_guid) {
17398 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.dsa_guid));
17399 : }
17400 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_host, CH_UTF16)));
17401 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17402 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_host, CH_UTF16)));
17403 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));
17404 : }
17405 0 : if (flags & NDR_OUT) {
17406 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17407 : }
17408 0 : return NDR_ERR_SUCCESS;
17409 : }
17410 :
17411 0 : static enum ndr_err_code ndr_pull_netr_DsrDeregisterDNSHostRecords(struct ndr_pull *ndr, int flags, struct netr_DsrDeregisterDNSHostRecords *r)
17412 : {
17413 : uint32_t _ptr_server_name;
17414 0 : uint32_t size_server_name_1 = 0;
17415 0 : uint32_t length_server_name_1 = 0;
17416 : uint32_t _ptr_domain;
17417 0 : uint32_t size_domain_1 = 0;
17418 0 : uint32_t length_domain_1 = 0;
17419 : uint32_t _ptr_domain_guid;
17420 : uint32_t _ptr_dsa_guid;
17421 0 : uint32_t size_dns_host_1 = 0;
17422 0 : uint32_t length_dns_host_1 = 0;
17423 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17424 0 : TALLOC_CTX *_mem_save_domain_0 = NULL;
17425 0 : TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
17426 0 : TALLOC_CTX *_mem_save_dsa_guid_0 = NULL;
17427 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17428 0 : if (flags & NDR_IN) {
17429 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17430 0 : if (_ptr_server_name) {
17431 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17432 : } else {
17433 0 : r->in.server_name = NULL;
17434 : }
17435 0 : if (r->in.server_name) {
17436 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17437 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17438 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17439 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17440 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17441 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17442 0 : if (length_server_name_1 > size_server_name_1) {
17443 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
17444 : }
17445 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17446 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17447 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17448 : }
17449 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
17450 0 : if (_ptr_domain) {
17451 0 : NDR_PULL_ALLOC(ndr, r->in.domain);
17452 : } else {
17453 0 : r->in.domain = NULL;
17454 : }
17455 0 : if (r->in.domain) {
17456 0 : _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
17457 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain, 0);
17458 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain));
17459 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain));
17460 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain, &size_domain_1));
17461 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain, &length_domain_1));
17462 0 : if (length_domain_1 > size_domain_1) {
17463 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
17464 : }
17465 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
17466 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
17467 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
17468 : }
17469 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
17470 0 : if (_ptr_domain_guid) {
17471 0 : NDR_PULL_ALLOC(ndr, r->in.domain_guid);
17472 : } else {
17473 0 : r->in.domain_guid = NULL;
17474 : }
17475 0 : if (r->in.domain_guid) {
17476 0 : _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
17477 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
17478 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
17479 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
17480 : }
17481 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dsa_guid));
17482 0 : if (_ptr_dsa_guid) {
17483 0 : NDR_PULL_ALLOC(ndr, r->in.dsa_guid);
17484 : } else {
17485 0 : r->in.dsa_guid = NULL;
17486 : }
17487 0 : if (r->in.dsa_guid) {
17488 0 : _mem_save_dsa_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
17489 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dsa_guid, 0);
17490 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.dsa_guid));
17491 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dsa_guid_0, 0);
17492 : }
17493 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_host));
17494 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_host));
17495 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.dns_host, &size_dns_host_1));
17496 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.dns_host, &length_dns_host_1));
17497 0 : if (length_dns_host_1 > size_dns_host_1) {
17498 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_host_1, length_dns_host_1);
17499 : }
17500 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_host_1, sizeof(uint16_t)));
17501 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_host, length_dns_host_1, sizeof(uint16_t), CH_UTF16));
17502 : }
17503 0 : if (flags & NDR_OUT) {
17504 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17505 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17506 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17507 : }
17508 0 : return NDR_ERR_SUCCESS;
17509 : }
17510 :
17511 0 : _PUBLIC_ void ndr_print_netr_DsrDeregisterDNSHostRecords(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrDeregisterDNSHostRecords *r)
17512 : {
17513 0 : ndr_print_struct(ndr, name, "netr_DsrDeregisterDNSHostRecords");
17514 0 : if (r == NULL) { ndr_print_null(ndr); return; }
17515 0 : ndr->depth++;
17516 0 : if (flags & NDR_SET_VALUES) {
17517 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17518 : }
17519 0 : if (flags & NDR_IN) {
17520 0 : ndr_print_struct(ndr, "in", "netr_DsrDeregisterDNSHostRecords");
17521 0 : ndr->depth++;
17522 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17523 0 : ndr->depth++;
17524 0 : if (r->in.server_name) {
17525 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17526 : }
17527 0 : ndr->depth--;
17528 0 : ndr_print_ptr(ndr, "domain", r->in.domain);
17529 0 : ndr->depth++;
17530 0 : if (r->in.domain) {
17531 0 : ndr_print_string(ndr, "domain", r->in.domain);
17532 : }
17533 0 : ndr->depth--;
17534 0 : ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
17535 0 : ndr->depth++;
17536 0 : if (r->in.domain_guid) {
17537 0 : ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
17538 : }
17539 0 : ndr->depth--;
17540 0 : ndr_print_ptr(ndr, "dsa_guid", r->in.dsa_guid);
17541 0 : ndr->depth++;
17542 0 : if (r->in.dsa_guid) {
17543 0 : ndr_print_GUID(ndr, "dsa_guid", r->in.dsa_guid);
17544 : }
17545 0 : ndr->depth--;
17546 0 : ndr_print_ptr(ndr, "dns_host", r->in.dns_host);
17547 0 : ndr->depth++;
17548 0 : ndr_print_string(ndr, "dns_host", r->in.dns_host);
17549 0 : ndr->depth--;
17550 0 : ndr->depth--;
17551 : }
17552 0 : if (flags & NDR_OUT) {
17553 0 : ndr_print_struct(ndr, "out", "netr_DsrDeregisterDNSHostRecords");
17554 0 : ndr->depth++;
17555 0 : ndr_print_WERROR(ndr, "result", r->out.result);
17556 0 : ndr->depth--;
17557 : }
17558 0 : ndr->depth--;
17559 : }
17560 :
17561 27 : static enum ndr_err_code ndr_push_netr_ServerTrustPasswordsGet(struct ndr_push *ndr, int flags, const struct netr_ServerTrustPasswordsGet *r)
17562 : {
17563 27 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17564 27 : if (flags & NDR_IN) {
17565 12 : if (r->in.account_name == NULL) {
17566 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17567 : }
17568 12 : if (r->in.computer_name == NULL) {
17569 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17570 : }
17571 12 : if (r->in.credential == NULL) {
17572 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17573 : }
17574 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17575 12 : if (r->in.server_name) {
17576 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17577 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17578 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17579 12 : 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));
17580 : }
17581 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
17582 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17583 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
17584 12 : 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));
17585 12 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
17586 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17587 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17588 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17589 12 : 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));
17590 12 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
17591 : }
17592 27 : if (flags & NDR_OUT) {
17593 15 : if (r->out.return_authenticator == NULL) {
17594 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17595 : }
17596 15 : if (r->out.new_owf_password == NULL) {
17597 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17598 : }
17599 15 : if (r->out.old_owf_password == NULL) {
17600 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17601 : }
17602 15 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
17603 15 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
17604 15 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
17605 15 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
17606 : }
17607 27 : return NDR_ERR_SUCCESS;
17608 : }
17609 :
17610 24 : static enum ndr_err_code ndr_pull_netr_ServerTrustPasswordsGet(struct ndr_pull *ndr, int flags, struct netr_ServerTrustPasswordsGet *r)
17611 : {
17612 : uint32_t _ptr_server_name;
17613 24 : uint32_t size_server_name_1 = 0;
17614 24 : uint32_t length_server_name_1 = 0;
17615 24 : uint32_t size_account_name_1 = 0;
17616 24 : uint32_t length_account_name_1 = 0;
17617 24 : uint32_t size_computer_name_1 = 0;
17618 24 : uint32_t length_computer_name_1 = 0;
17619 24 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17620 24 : TALLOC_CTX *_mem_save_credential_0 = NULL;
17621 24 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
17622 24 : TALLOC_CTX *_mem_save_new_owf_password_0 = NULL;
17623 24 : TALLOC_CTX *_mem_save_old_owf_password_0 = NULL;
17624 24 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17625 24 : if (flags & NDR_IN) {
17626 12 : NDR_ZERO_STRUCT(r->out);
17627 :
17628 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17629 12 : if (_ptr_server_name) {
17630 12 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17631 : } else {
17632 0 : r->in.server_name = NULL;
17633 : }
17634 12 : if (r->in.server_name) {
17635 12 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17636 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17637 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17638 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17639 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17640 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17641 12 : if (length_server_name_1 > size_server_name_1) {
17642 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
17643 : }
17644 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17645 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17646 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17647 : }
17648 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
17649 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
17650 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
17651 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
17652 12 : if (length_account_name_1 > size_account_name_1) {
17653 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
17654 : }
17655 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
17656 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
17657 12 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
17658 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
17659 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
17660 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
17661 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
17662 12 : if (length_computer_name_1 > size_computer_name_1) {
17663 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
17664 : }
17665 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
17666 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
17667 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17668 12 : NDR_PULL_ALLOC(ndr, r->in.credential);
17669 : }
17670 12 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
17671 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
17672 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
17673 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
17674 12 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
17675 12 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
17676 12 : NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
17677 12 : NDR_ZERO_STRUCTP(r->out.new_owf_password);
17678 12 : NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
17679 12 : NDR_ZERO_STRUCTP(r->out.old_owf_password);
17680 : }
17681 24 : if (flags & NDR_OUT) {
17682 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17683 : if (r->in.credential == NULL) {
17684 : NDR_PULL_ALLOC(ndr, r->in.credential);
17685 : NDR_ZERO_STRUCTP(r->in.credential);
17686 : }
17687 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17688 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17689 3 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
17690 : }
17691 12 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
17692 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
17693 12 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
17694 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
17695 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17696 3 : NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
17697 : }
17698 12 : _mem_save_new_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
17699 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.new_owf_password, LIBNDR_FLAG_REF_ALLOC);
17700 12 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
17701 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
17702 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17703 3 : NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
17704 : }
17705 12 : _mem_save_old_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
17706 12 : NDR_PULL_SET_MEM_CTX(ndr, r->out.old_owf_password, LIBNDR_FLAG_REF_ALLOC);
17707 12 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
17708 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
17709 12 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
17710 : }
17711 24 : return NDR_ERR_SUCCESS;
17712 : }
17713 :
17714 6 : _PUBLIC_ void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerTrustPasswordsGet *r)
17715 : {
17716 6 : ndr_print_struct(ndr, name, "netr_ServerTrustPasswordsGet");
17717 6 : if (r == NULL) { ndr_print_null(ndr); return; }
17718 6 : ndr->depth++;
17719 6 : if (flags & NDR_SET_VALUES) {
17720 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17721 : }
17722 6 : if (flags & NDR_IN) {
17723 0 : ndr_print_struct(ndr, "in", "netr_ServerTrustPasswordsGet");
17724 0 : ndr->depth++;
17725 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17726 0 : ndr->depth++;
17727 0 : if (r->in.server_name) {
17728 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17729 : }
17730 0 : ndr->depth--;
17731 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
17732 0 : ndr->depth++;
17733 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
17734 0 : ndr->depth--;
17735 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
17736 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
17737 0 : ndr->depth++;
17738 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
17739 0 : ndr->depth--;
17740 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
17741 0 : ndr->depth++;
17742 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
17743 0 : ndr->depth--;
17744 0 : ndr->depth--;
17745 : }
17746 6 : if (flags & NDR_OUT) {
17747 6 : ndr_print_struct(ndr, "out", "netr_ServerTrustPasswordsGet");
17748 6 : ndr->depth++;
17749 6 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
17750 6 : ndr->depth++;
17751 6 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
17752 6 : ndr->depth--;
17753 6 : ndr_print_ptr(ndr, "new_owf_password", r->out.new_owf_password);
17754 6 : ndr->depth++;
17755 6 : ndr_print_samr_Password(ndr, "new_owf_password", r->out.new_owf_password);
17756 6 : ndr->depth--;
17757 6 : ndr_print_ptr(ndr, "old_owf_password", r->out.old_owf_password);
17758 6 : ndr->depth++;
17759 6 : ndr_print_samr_Password(ndr, "old_owf_password", r->out.old_owf_password);
17760 6 : ndr->depth--;
17761 6 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
17762 6 : ndr->depth--;
17763 : }
17764 6 : ndr->depth--;
17765 : }
17766 :
17767 303 : static enum ndr_err_code ndr_push_netr_DsRGetForestTrustInformation(struct ndr_push *ndr, int flags, const struct netr_DsRGetForestTrustInformation *r)
17768 : {
17769 303 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17770 303 : if (flags & NDR_IN) {
17771 150 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17772 150 : if (r->in.server_name) {
17773 150 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17774 150 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17775 150 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17776 150 : 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));
17777 : }
17778 150 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.trusted_domain_name));
17779 150 : if (r->in.trusted_domain_name) {
17780 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16)));
17781 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17782 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16)));
17783 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));
17784 : }
17785 150 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
17786 : }
17787 303 : if (flags & NDR_OUT) {
17788 153 : if (r->out.forest_trust_info == NULL) {
17789 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17790 : }
17791 153 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
17792 153 : if (*r->out.forest_trust_info) {
17793 149 : NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
17794 : }
17795 153 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17796 : }
17797 303 : return NDR_ERR_SUCCESS;
17798 : }
17799 :
17800 300 : static enum ndr_err_code ndr_pull_netr_DsRGetForestTrustInformation(struct ndr_pull *ndr, int flags, struct netr_DsRGetForestTrustInformation *r)
17801 : {
17802 : uint32_t _ptr_server_name;
17803 300 : uint32_t size_server_name_1 = 0;
17804 300 : uint32_t length_server_name_1 = 0;
17805 : uint32_t _ptr_trusted_domain_name;
17806 300 : uint32_t size_trusted_domain_name_1 = 0;
17807 300 : uint32_t length_trusted_domain_name_1 = 0;
17808 : uint32_t _ptr_forest_trust_info;
17809 300 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17810 300 : TALLOC_CTX *_mem_save_trusted_domain_name_0 = NULL;
17811 300 : TALLOC_CTX *_mem_save_forest_trust_info_0 = NULL;
17812 300 : TALLOC_CTX *_mem_save_forest_trust_info_1 = NULL;
17813 300 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17814 300 : if (flags & NDR_IN) {
17815 150 : NDR_ZERO_STRUCT(r->out);
17816 :
17817 150 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17818 150 : if (_ptr_server_name) {
17819 150 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17820 : } else {
17821 0 : r->in.server_name = NULL;
17822 : }
17823 150 : if (r->in.server_name) {
17824 150 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17825 150 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17826 150 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17827 150 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
17828 150 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
17829 150 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
17830 150 : if (length_server_name_1 > size_server_name_1) {
17831 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
17832 : }
17833 150 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
17834 150 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
17835 150 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
17836 : }
17837 150 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain_name));
17838 150 : if (_ptr_trusted_domain_name) {
17839 20 : NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name);
17840 : } else {
17841 130 : r->in.trusted_domain_name = NULL;
17842 : }
17843 150 : if (r->in.trusted_domain_name) {
17844 20 : _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17845 20 : NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain_name, 0);
17846 20 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.trusted_domain_name));
17847 20 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.trusted_domain_name));
17848 20 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.trusted_domain_name, &size_trusted_domain_name_1));
17849 20 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.trusted_domain_name, &length_trusted_domain_name_1));
17850 20 : if (length_trusted_domain_name_1 > size_trusted_domain_name_1) {
17851 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_trusted_domain_name_1, length_trusted_domain_name_1);
17852 : }
17853 20 : NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_domain_name_1, sizeof(uint16_t)));
17854 20 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.trusted_domain_name, length_trusted_domain_name_1, sizeof(uint16_t), CH_UTF16));
17855 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, 0);
17856 : }
17857 150 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
17858 150 : NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
17859 150 : NDR_ZERO_STRUCTP(r->out.forest_trust_info);
17860 : }
17861 300 : if (flags & NDR_OUT) {
17862 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
17863 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
17864 150 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17865 141 : NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
17866 : }
17867 150 : _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17868 150 : NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
17869 150 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
17870 150 : if (_ptr_forest_trust_info) {
17871 146 : NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
17872 : } else {
17873 4 : *r->out.forest_trust_info = NULL;
17874 : }
17875 150 : if (*r->out.forest_trust_info) {
17876 146 : _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
17877 146 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
17878 146 : NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
17879 146 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
17880 : }
17881 150 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
17882 150 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17883 : }
17884 300 : return NDR_ERR_SUCCESS;
17885 : }
17886 :
17887 6 : _PUBLIC_ void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetForestTrustInformation *r)
17888 : {
17889 6 : ndr_print_struct(ndr, name, "netr_DsRGetForestTrustInformation");
17890 6 : if (r == NULL) { ndr_print_null(ndr); return; }
17891 6 : ndr->depth++;
17892 6 : if (flags & NDR_SET_VALUES) {
17893 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17894 : }
17895 6 : if (flags & NDR_IN) {
17896 0 : ndr_print_struct(ndr, "in", "netr_DsRGetForestTrustInformation");
17897 0 : ndr->depth++;
17898 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
17899 0 : ndr->depth++;
17900 0 : if (r->in.server_name) {
17901 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
17902 : }
17903 0 : ndr->depth--;
17904 0 : ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name);
17905 0 : ndr->depth++;
17906 0 : if (r->in.trusted_domain_name) {
17907 0 : ndr_print_string(ndr, "trusted_domain_name", r->in.trusted_domain_name);
17908 : }
17909 0 : ndr->depth--;
17910 0 : ndr_print_uint32(ndr, "flags", r->in.flags);
17911 0 : ndr->depth--;
17912 : }
17913 6 : if (flags & NDR_OUT) {
17914 6 : ndr_print_struct(ndr, "out", "netr_DsRGetForestTrustInformation");
17915 6 : ndr->depth++;
17916 6 : ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
17917 6 : ndr->depth++;
17918 6 : ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
17919 6 : ndr->depth++;
17920 6 : if (*r->out.forest_trust_info) {
17921 6 : ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
17922 : }
17923 6 : ndr->depth--;
17924 6 : ndr->depth--;
17925 6 : ndr_print_WERROR(ndr, "result", r->out.result);
17926 6 : ndr->depth--;
17927 : }
17928 6 : ndr->depth--;
17929 : }
17930 :
17931 56 : static enum ndr_err_code ndr_push_netr_GetForestTrustInformation(struct ndr_push *ndr, int flags, const struct netr_GetForestTrustInformation *r)
17932 : {
17933 56 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
17934 56 : if (flags & NDR_IN) {
17935 16 : if (r->in.computer_name == NULL) {
17936 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17937 : }
17938 16 : if (r->in.credential == NULL) {
17939 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17940 : }
17941 16 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
17942 16 : if (r->in.server_name) {
17943 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17944 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17945 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
17946 16 : 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));
17947 : }
17948 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17949 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17950 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
17951 16 : 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));
17952 16 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
17953 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
17954 : }
17955 56 : if (flags & NDR_OUT) {
17956 40 : if (r->out.return_authenticator == NULL) {
17957 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17958 : }
17959 40 : if (r->out.forest_trust_info == NULL) {
17960 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17961 : }
17962 40 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
17963 40 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
17964 40 : if (*r->out.forest_trust_info) {
17965 25 : NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
17966 : }
17967 40 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
17968 : }
17969 56 : return NDR_ERR_SUCCESS;
17970 : }
17971 :
17972 52 : static enum ndr_err_code ndr_pull_netr_GetForestTrustInformation(struct ndr_pull *ndr, int flags, struct netr_GetForestTrustInformation *r)
17973 : {
17974 : uint32_t _ptr_server_name;
17975 52 : uint32_t size_server_name_1 = 0;
17976 52 : uint32_t length_server_name_1 = 0;
17977 52 : uint32_t size_computer_name_1 = 0;
17978 52 : uint32_t length_computer_name_1 = 0;
17979 : uint32_t _ptr_forest_trust_info;
17980 52 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
17981 52 : TALLOC_CTX *_mem_save_credential_0 = NULL;
17982 52 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
17983 52 : TALLOC_CTX *_mem_save_forest_trust_info_0 = NULL;
17984 52 : TALLOC_CTX *_mem_save_forest_trust_info_1 = NULL;
17985 52 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
17986 52 : if (flags & NDR_IN) {
17987 36 : NDR_ZERO_STRUCT(r->out);
17988 :
17989 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
17990 36 : if (_ptr_server_name) {
17991 36 : NDR_PULL_ALLOC(ndr, r->in.server_name);
17992 : } else {
17993 0 : r->in.server_name = NULL;
17994 : }
17995 36 : if (r->in.server_name) {
17996 36 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17997 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
17998 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
17999 36 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
18000 36 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
18001 36 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
18002 36 : if (length_server_name_1 > size_server_name_1) {
18003 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
18004 : }
18005 36 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
18006 36 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
18007 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
18008 : }
18009 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
18010 36 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
18011 36 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
18012 36 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
18013 36 : if (length_computer_name_1 > size_computer_name_1) {
18014 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
18015 : }
18016 36 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
18017 36 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
18018 36 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18019 36 : NDR_PULL_ALLOC(ndr, r->in.credential);
18020 : }
18021 36 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
18022 36 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
18023 36 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18024 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
18025 36 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
18026 36 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18027 36 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
18028 36 : NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
18029 36 : NDR_ZERO_STRUCTP(r->out.forest_trust_info);
18030 : }
18031 52 : if (flags & NDR_OUT) {
18032 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
18033 : if (r->in.credential == NULL) {
18034 : NDR_PULL_ALLOC(ndr, r->in.credential);
18035 : NDR_ZERO_STRUCTP(r->in.credential);
18036 : }
18037 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
18038 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18039 4 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18040 : }
18041 16 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18042 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
18043 16 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18044 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
18045 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18046 4 : NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
18047 : }
18048 16 : _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
18049 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
18050 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
18051 16 : if (_ptr_forest_trust_info) {
18052 4 : NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
18053 : } else {
18054 12 : *r->out.forest_trust_info = NULL;
18055 : }
18056 16 : if (*r->out.forest_trust_info) {
18057 4 : _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
18058 4 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
18059 4 : NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
18060 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
18061 : }
18062 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
18063 16 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18064 : }
18065 52 : return NDR_ERR_SUCCESS;
18066 : }
18067 :
18068 8 : _PUBLIC_ void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetForestTrustInformation *r)
18069 : {
18070 8 : ndr_print_struct(ndr, name, "netr_GetForestTrustInformation");
18071 8 : if (r == NULL) { ndr_print_null(ndr); return; }
18072 8 : ndr->depth++;
18073 8 : if (flags & NDR_SET_VALUES) {
18074 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18075 : }
18076 8 : if (flags & NDR_IN) {
18077 0 : ndr_print_struct(ndr, "in", "netr_GetForestTrustInformation");
18078 0 : ndr->depth++;
18079 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
18080 0 : ndr->depth++;
18081 0 : if (r->in.server_name) {
18082 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
18083 : }
18084 0 : ndr->depth--;
18085 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
18086 0 : ndr->depth++;
18087 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
18088 0 : ndr->depth--;
18089 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
18090 0 : ndr->depth++;
18091 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
18092 0 : ndr->depth--;
18093 0 : ndr_print_uint32(ndr, "flags", r->in.flags);
18094 0 : ndr->depth--;
18095 : }
18096 8 : if (flags & NDR_OUT) {
18097 8 : ndr_print_struct(ndr, "out", "netr_GetForestTrustInformation");
18098 8 : ndr->depth++;
18099 8 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
18100 8 : ndr->depth++;
18101 8 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
18102 8 : ndr->depth--;
18103 8 : ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
18104 8 : ndr->depth++;
18105 8 : ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
18106 8 : ndr->depth++;
18107 8 : if (*r->out.forest_trust_info) {
18108 2 : ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
18109 : }
18110 8 : ndr->depth--;
18111 8 : ndr->depth--;
18112 8 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18113 8 : ndr->depth--;
18114 : }
18115 8 : ndr->depth--;
18116 : }
18117 :
18118 4144 : static enum ndr_err_code ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogonWithFlags *r)
18119 : {
18120 4144 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
18121 4144 : if (flags & NDR_IN) {
18122 2072 : if (r->in.logon == NULL) {
18123 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18124 : }
18125 2072 : if (r->in.flags == NULL) {
18126 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18127 : }
18128 2072 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
18129 2072 : if (r->in.server_name) {
18130 2072 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18131 2072 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18132 2072 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18133 2072 : 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));
18134 : }
18135 2072 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
18136 2072 : if (r->in.computer_name) {
18137 2072 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18138 2072 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18139 2072 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18140 2072 : 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));
18141 : }
18142 2072 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
18143 2072 : if (r->in.credential) {
18144 2072 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18145 : }
18146 2072 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
18147 2072 : if (r->in.return_authenticator) {
18148 2072 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
18149 : }
18150 2072 : NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
18151 2072 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
18152 2072 : NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
18153 2072 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
18154 2072 : NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->in.flags));
18155 : }
18156 4144 : if (flags & NDR_OUT) {
18157 2072 : if (r->out.validation == NULL) {
18158 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18159 : }
18160 2072 : if (r->out.authoritative == NULL) {
18161 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18162 : }
18163 2072 : if (r->out.flags == NULL) {
18164 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18165 : }
18166 2072 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
18167 2072 : if (r->out.return_authenticator) {
18168 2072 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18169 : }
18170 2072 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
18171 2072 : NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
18172 2072 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
18173 2072 : NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->out.flags));
18174 2072 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
18175 : }
18176 4144 : return NDR_ERR_SUCCESS;
18177 : }
18178 :
18179 4144 : static enum ndr_err_code ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogonWithFlags *r)
18180 : {
18181 : uint32_t _ptr_server_name;
18182 4144 : uint32_t size_server_name_1 = 0;
18183 4144 : uint32_t length_server_name_1 = 0;
18184 : uint32_t _ptr_computer_name;
18185 4144 : uint32_t size_computer_name_1 = 0;
18186 4144 : uint32_t length_computer_name_1 = 0;
18187 : uint32_t _ptr_credential;
18188 : uint32_t _ptr_return_authenticator;
18189 4144 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
18190 4144 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
18191 4144 : TALLOC_CTX *_mem_save_credential_0 = NULL;
18192 4144 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
18193 4144 : TALLOC_CTX *_mem_save_logon_0 = NULL;
18194 4144 : TALLOC_CTX *_mem_save_validation_0 = NULL;
18195 4144 : TALLOC_CTX *_mem_save_authoritative_0 = NULL;
18196 4144 : TALLOC_CTX *_mem_save_flags_0 = NULL;
18197 4144 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
18198 4144 : if (flags & NDR_IN) {
18199 2072 : NDR_ZERO_STRUCT(r->out);
18200 :
18201 2072 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
18202 2072 : if (_ptr_server_name) {
18203 2072 : NDR_PULL_ALLOC(ndr, r->in.server_name);
18204 : } else {
18205 0 : r->in.server_name = NULL;
18206 : }
18207 2072 : if (r->in.server_name) {
18208 2072 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18209 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
18210 2072 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
18211 2072 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
18212 2072 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
18213 2072 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
18214 2072 : if (length_server_name_1 > size_server_name_1) {
18215 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
18216 : }
18217 2072 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
18218 2072 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
18219 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
18220 : }
18221 2072 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
18222 2072 : if (_ptr_computer_name) {
18223 2072 : NDR_PULL_ALLOC(ndr, r->in.computer_name);
18224 : } else {
18225 0 : r->in.computer_name = NULL;
18226 : }
18227 2072 : if (r->in.computer_name) {
18228 2072 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18229 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
18230 2072 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
18231 2072 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
18232 2072 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
18233 2072 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
18234 2072 : if (length_computer_name_1 > size_computer_name_1) {
18235 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
18236 : }
18237 2072 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
18238 2072 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
18239 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
18240 : }
18241 2072 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
18242 2072 : if (_ptr_credential) {
18243 2072 : NDR_PULL_ALLOC(ndr, r->in.credential);
18244 : } else {
18245 0 : r->in.credential = NULL;
18246 : }
18247 2072 : if (r->in.credential) {
18248 2072 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
18249 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
18250 2072 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18251 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
18252 : }
18253 2072 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
18254 2072 : if (_ptr_return_authenticator) {
18255 2072 : NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
18256 : } else {
18257 0 : r->in.return_authenticator = NULL;
18258 : }
18259 2072 : if (r->in.return_authenticator) {
18260 2072 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18261 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
18262 2072 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
18263 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
18264 : }
18265 2072 : NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
18266 2072 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18267 2072 : NDR_PULL_ALLOC(ndr, r->in.logon);
18268 : }
18269 2072 : _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
18270 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
18271 2072 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
18272 2072 : NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
18273 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
18274 2072 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
18275 2072 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18276 2072 : NDR_PULL_ALLOC(ndr, r->in.flags);
18277 : }
18278 2072 : _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
18279 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->in.flags, LIBNDR_FLAG_REF_ALLOC);
18280 2072 : NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->in.flags));
18281 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
18282 2072 : NDR_PULL_ALLOC(ndr, r->out.validation);
18283 2072 : NDR_ZERO_STRUCTP(r->out.validation);
18284 2072 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
18285 2072 : NDR_ZERO_STRUCTP(r->out.authoritative);
18286 2072 : NDR_PULL_ALLOC(ndr, r->out.flags);
18287 2072 : *r->out.flags = *r->in.flags;
18288 : }
18289 4144 : if (flags & NDR_OUT) {
18290 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
18291 : if (r->in.logon == NULL) {
18292 : NDR_PULL_ALLOC(ndr, r->in.logon);
18293 : NDR_ZERO_STRUCTP(r->in.logon);
18294 : }
18295 : if (r->in.flags == NULL) {
18296 : NDR_PULL_ALLOC(ndr, r->in.flags);
18297 : NDR_ZERO_STRUCTP(r->in.flags);
18298 : }
18299 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
18300 2072 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
18301 2072 : if (_ptr_return_authenticator) {
18302 2072 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18303 : } else {
18304 0 : r->out.return_authenticator = NULL;
18305 : }
18306 2072 : if (r->out.return_authenticator) {
18307 2072 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18308 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
18309 2072 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18310 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
18311 : }
18312 2072 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18313 13 : NDR_PULL_ALLOC(ndr, r->out.validation);
18314 : }
18315 2072 : _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
18316 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
18317 2072 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
18318 2072 : NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
18319 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
18320 2072 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18321 13 : NDR_PULL_ALLOC(ndr, r->out.authoritative);
18322 : }
18323 2072 : _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
18324 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
18325 2072 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
18326 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
18327 2072 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18328 13 : NDR_PULL_ALLOC(ndr, r->out.flags);
18329 : }
18330 2072 : _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
18331 2072 : NDR_PULL_SET_MEM_CTX(ndr, r->out.flags, LIBNDR_FLAG_REF_ALLOC);
18332 2072 : NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->out.flags));
18333 2072 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
18334 2072 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18335 : }
18336 4144 : return NDR_ERR_SUCCESS;
18337 : }
18338 :
18339 0 : _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonWithFlags *r)
18340 : {
18341 0 : ndr_print_struct(ndr, name, "netr_LogonSamLogonWithFlags");
18342 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18343 0 : ndr->depth++;
18344 0 : if (flags & NDR_SET_VALUES) {
18345 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18346 : }
18347 0 : if (flags & NDR_IN) {
18348 0 : ndr_print_struct(ndr, "in", "netr_LogonSamLogonWithFlags");
18349 0 : ndr->depth++;
18350 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
18351 0 : ndr->depth++;
18352 0 : if (r->in.server_name) {
18353 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
18354 : }
18355 0 : ndr->depth--;
18356 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
18357 0 : ndr->depth++;
18358 0 : if (r->in.computer_name) {
18359 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
18360 : }
18361 0 : ndr->depth--;
18362 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
18363 0 : ndr->depth++;
18364 0 : if (r->in.credential) {
18365 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
18366 : }
18367 0 : ndr->depth--;
18368 0 : ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
18369 0 : ndr->depth++;
18370 0 : if (r->in.return_authenticator) {
18371 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
18372 : }
18373 0 : ndr->depth--;
18374 0 : ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
18375 0 : ndr_print_ptr(ndr, "logon", r->in.logon);
18376 0 : ndr->depth++;
18377 0 : ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
18378 0 : ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
18379 0 : ndr->depth--;
18380 0 : ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
18381 0 : ndr_print_ptr(ndr, "flags", r->in.flags);
18382 0 : ndr->depth++;
18383 0 : ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->in.flags);
18384 0 : ndr->depth--;
18385 0 : ndr->depth--;
18386 : }
18387 0 : if (flags & NDR_OUT) {
18388 0 : ndr_print_struct(ndr, "out", "netr_LogonSamLogonWithFlags");
18389 0 : ndr->depth++;
18390 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
18391 0 : ndr->depth++;
18392 0 : if (r->out.return_authenticator) {
18393 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
18394 : }
18395 0 : ndr->depth--;
18396 0 : ndr_print_ptr(ndr, "validation", r->out.validation);
18397 0 : ndr->depth++;
18398 0 : ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
18399 0 : ndr_print_netr_Validation(ndr, "validation", r->out.validation);
18400 0 : ndr->depth--;
18401 0 : ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
18402 0 : ndr->depth++;
18403 0 : ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
18404 0 : ndr->depth--;
18405 0 : ndr_print_ptr(ndr, "flags", r->out.flags);
18406 0 : ndr->depth++;
18407 0 : ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->out.flags);
18408 0 : ndr->depth--;
18409 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18410 0 : ndr->depth--;
18411 : }
18412 0 : ndr->depth--;
18413 : }
18414 :
18415 110 : static enum ndr_err_code ndr_push_netr_ServerGetTrustInfo(struct ndr_push *ndr, int flags, const struct netr_ServerGetTrustInfo *r)
18416 : {
18417 110 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
18418 110 : if (flags & NDR_IN) {
18419 28 : if (r->in.account_name == NULL) {
18420 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18421 : }
18422 28 : if (r->in.computer_name == NULL) {
18423 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18424 : }
18425 28 : if (r->in.credential == NULL) {
18426 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18427 : }
18428 28 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
18429 28 : if (r->in.server_name) {
18430 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18431 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18432 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18433 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));
18434 : }
18435 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
18436 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18437 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
18438 28 : 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));
18439 28 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
18440 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18441 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18442 28 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18443 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));
18444 28 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18445 : }
18446 110 : if (flags & NDR_OUT) {
18447 82 : if (r->out.return_authenticator == NULL) {
18448 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18449 : }
18450 82 : if (r->out.new_owf_password == NULL) {
18451 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18452 : }
18453 82 : if (r->out.old_owf_password == NULL) {
18454 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18455 : }
18456 82 : if (r->out.trust_info == NULL) {
18457 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18458 : }
18459 82 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18460 82 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
18461 82 : NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
18462 82 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.trust_info));
18463 82 : if (*r->out.trust_info) {
18464 52 : NDR_CHECK(ndr_push_netr_TrustInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trust_info));
18465 : }
18466 82 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
18467 : }
18468 110 : return NDR_ERR_SUCCESS;
18469 : }
18470 :
18471 103 : static enum ndr_err_code ndr_pull_netr_ServerGetTrustInfo(struct ndr_pull *ndr, int flags, struct netr_ServerGetTrustInfo *r)
18472 : {
18473 : uint32_t _ptr_server_name;
18474 103 : uint32_t size_server_name_1 = 0;
18475 103 : uint32_t length_server_name_1 = 0;
18476 103 : uint32_t size_account_name_1 = 0;
18477 103 : uint32_t length_account_name_1 = 0;
18478 103 : uint32_t size_computer_name_1 = 0;
18479 103 : uint32_t length_computer_name_1 = 0;
18480 : uint32_t _ptr_trust_info;
18481 103 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
18482 103 : TALLOC_CTX *_mem_save_credential_0 = NULL;
18483 103 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
18484 103 : TALLOC_CTX *_mem_save_new_owf_password_0 = NULL;
18485 103 : TALLOC_CTX *_mem_save_old_owf_password_0 = NULL;
18486 103 : TALLOC_CTX *_mem_save_trust_info_0 = NULL;
18487 103 : TALLOC_CTX *_mem_save_trust_info_1 = NULL;
18488 103 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
18489 103 : if (flags & NDR_IN) {
18490 75 : NDR_ZERO_STRUCT(r->out);
18491 :
18492 75 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
18493 75 : if (_ptr_server_name) {
18494 75 : NDR_PULL_ALLOC(ndr, r->in.server_name);
18495 : } else {
18496 0 : r->in.server_name = NULL;
18497 : }
18498 75 : if (r->in.server_name) {
18499 75 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18500 75 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
18501 75 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
18502 75 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
18503 75 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
18504 75 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
18505 75 : if (length_server_name_1 > size_server_name_1) {
18506 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
18507 : }
18508 75 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
18509 75 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
18510 75 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
18511 : }
18512 75 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
18513 75 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
18514 75 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
18515 75 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
18516 75 : if (length_account_name_1 > size_account_name_1) {
18517 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
18518 : }
18519 75 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
18520 75 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
18521 75 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
18522 75 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
18523 75 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
18524 75 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
18525 75 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
18526 75 : if (length_computer_name_1 > size_computer_name_1) {
18527 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
18528 : }
18529 75 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
18530 75 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
18531 75 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18532 75 : NDR_PULL_ALLOC(ndr, r->in.credential);
18533 : }
18534 75 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
18535 75 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
18536 75 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18537 75 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
18538 75 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18539 75 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
18540 75 : NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
18541 75 : NDR_ZERO_STRUCTP(r->out.new_owf_password);
18542 75 : NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
18543 75 : NDR_ZERO_STRUCTP(r->out.old_owf_password);
18544 75 : NDR_PULL_ALLOC(ndr, r->out.trust_info);
18545 75 : NDR_ZERO_STRUCTP(r->out.trust_info);
18546 : }
18547 103 : if (flags & NDR_OUT) {
18548 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
18549 : if (r->in.credential == NULL) {
18550 : NDR_PULL_ALLOC(ndr, r->in.credential);
18551 : NDR_ZERO_STRUCTP(r->in.credential);
18552 : }
18553 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
18554 28 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18555 7 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18556 : }
18557 28 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18558 28 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
18559 28 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18560 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
18561 28 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18562 7 : NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
18563 : }
18564 28 : _mem_save_new_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
18565 28 : NDR_PULL_SET_MEM_CTX(ndr, r->out.new_owf_password, LIBNDR_FLAG_REF_ALLOC);
18566 28 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
18567 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
18568 28 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18569 7 : NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
18570 : }
18571 28 : _mem_save_old_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
18572 28 : NDR_PULL_SET_MEM_CTX(ndr, r->out.old_owf_password, LIBNDR_FLAG_REF_ALLOC);
18573 28 : NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
18574 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
18575 28 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18576 7 : NDR_PULL_ALLOC(ndr, r->out.trust_info);
18577 : }
18578 28 : _mem_save_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
18579 28 : NDR_PULL_SET_MEM_CTX(ndr, r->out.trust_info, LIBNDR_FLAG_REF_ALLOC);
18580 28 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trust_info));
18581 28 : if (_ptr_trust_info) {
18582 4 : NDR_PULL_ALLOC(ndr, *r->out.trust_info);
18583 : } else {
18584 24 : *r->out.trust_info = NULL;
18585 : }
18586 28 : if (*r->out.trust_info) {
18587 4 : _mem_save_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
18588 4 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.trust_info, 0);
18589 4 : NDR_CHECK(ndr_pull_netr_TrustInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trust_info));
18590 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trust_info_1, 0);
18591 : }
18592 28 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
18593 28 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18594 : }
18595 103 : return NDR_ERR_SUCCESS;
18596 : }
18597 :
18598 14 : _PUBLIC_ void ndr_print_netr_ServerGetTrustInfo(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerGetTrustInfo *r)
18599 : {
18600 14 : ndr_print_struct(ndr, name, "netr_ServerGetTrustInfo");
18601 14 : if (r == NULL) { ndr_print_null(ndr); return; }
18602 14 : ndr->depth++;
18603 14 : if (flags & NDR_SET_VALUES) {
18604 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18605 : }
18606 14 : if (flags & NDR_IN) {
18607 0 : ndr_print_struct(ndr, "in", "netr_ServerGetTrustInfo");
18608 0 : ndr->depth++;
18609 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
18610 0 : ndr->depth++;
18611 0 : if (r->in.server_name) {
18612 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
18613 : }
18614 0 : ndr->depth--;
18615 0 : ndr_print_ptr(ndr, "account_name", r->in.account_name);
18616 0 : ndr->depth++;
18617 0 : ndr_print_string(ndr, "account_name", r->in.account_name);
18618 0 : ndr->depth--;
18619 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
18620 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
18621 0 : ndr->depth++;
18622 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
18623 0 : ndr->depth--;
18624 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
18625 0 : ndr->depth++;
18626 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
18627 0 : ndr->depth--;
18628 0 : ndr->depth--;
18629 : }
18630 14 : if (flags & NDR_OUT) {
18631 14 : ndr_print_struct(ndr, "out", "netr_ServerGetTrustInfo");
18632 14 : ndr->depth++;
18633 14 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
18634 14 : ndr->depth++;
18635 14 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
18636 14 : ndr->depth--;
18637 14 : ndr_print_ptr(ndr, "new_owf_password", r->out.new_owf_password);
18638 14 : ndr->depth++;
18639 14 : ndr_print_samr_Password(ndr, "new_owf_password", r->out.new_owf_password);
18640 14 : ndr->depth--;
18641 14 : ndr_print_ptr(ndr, "old_owf_password", r->out.old_owf_password);
18642 14 : ndr->depth++;
18643 14 : ndr_print_samr_Password(ndr, "old_owf_password", r->out.old_owf_password);
18644 14 : ndr->depth--;
18645 14 : ndr_print_ptr(ndr, "trust_info", r->out.trust_info);
18646 14 : ndr->depth++;
18647 14 : ndr_print_ptr(ndr, "trust_info", *r->out.trust_info);
18648 14 : ndr->depth++;
18649 14 : if (*r->out.trust_info) {
18650 2 : ndr_print_netr_TrustInfo(ndr, "trust_info", *r->out.trust_info);
18651 : }
18652 14 : ndr->depth--;
18653 14 : ndr->depth--;
18654 14 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18655 14 : ndr->depth--;
18656 : }
18657 14 : ndr->depth--;
18658 : }
18659 :
18660 0 : static enum ndr_err_code ndr_push_netr_Unused47(struct ndr_push *ndr, int flags, const struct netr_Unused47 *r)
18661 : {
18662 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
18663 0 : if (flags & NDR_IN) {
18664 : }
18665 0 : if (flags & NDR_OUT) {
18666 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
18667 : }
18668 0 : return NDR_ERR_SUCCESS;
18669 : }
18670 :
18671 0 : static enum ndr_err_code ndr_pull_netr_Unused47(struct ndr_pull *ndr, int flags, struct netr_Unused47 *r)
18672 : {
18673 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
18674 0 : if (flags & NDR_IN) {
18675 : }
18676 0 : if (flags & NDR_OUT) {
18677 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
18678 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
18679 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18680 : }
18681 0 : return NDR_ERR_SUCCESS;
18682 : }
18683 :
18684 0 : _PUBLIC_ void ndr_print_netr_Unused47(struct ndr_print *ndr, const char *name, int flags, const struct netr_Unused47 *r)
18685 : {
18686 0 : ndr_print_struct(ndr, name, "netr_Unused47");
18687 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18688 0 : ndr->depth++;
18689 0 : if (flags & NDR_SET_VALUES) {
18690 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18691 : }
18692 0 : if (flags & NDR_IN) {
18693 0 : ndr_print_struct(ndr, "in", "netr_Unused47");
18694 0 : ndr->depth++;
18695 0 : ndr->depth--;
18696 : }
18697 0 : if (flags & NDR_OUT) {
18698 0 : ndr_print_struct(ndr, "out", "netr_Unused47");
18699 0 : ndr->depth++;
18700 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18701 0 : ndr->depth--;
18702 : }
18703 0 : ndr->depth--;
18704 : }
18705 :
18706 4 : static enum ndr_err_code ndr_push_netr_DsrUpdateReadOnlyServerDnsRecords(struct ndr_push *ndr, int flags, const struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
18707 : {
18708 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
18709 4 : if (flags & NDR_IN) {
18710 0 : if (r->in.computer_name == NULL) {
18711 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18712 : }
18713 0 : if (r->in.credential == NULL) {
18714 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18715 : }
18716 0 : if (r->in.dns_names == NULL) {
18717 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18718 : }
18719 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
18720 0 : if (r->in.server_name) {
18721 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18722 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18723 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
18724 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));
18725 : }
18726 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18727 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18728 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
18729 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));
18730 0 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18731 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
18732 0 : if (r->in.site_name) {
18733 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
18734 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18735 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
18736 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));
18737 : }
18738 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dns_ttl));
18739 0 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dns_names));
18740 : }
18741 4 : if (flags & NDR_OUT) {
18742 4 : if (r->out.return_authenticator == NULL) {
18743 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18744 : }
18745 4 : if (r->out.dns_names == NULL) {
18746 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18747 : }
18748 4 : NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18749 4 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dns_names));
18750 4 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
18751 : }
18752 4 : return NDR_ERR_SUCCESS;
18753 : }
18754 :
18755 4 : static enum ndr_err_code ndr_pull_netr_DsrUpdateReadOnlyServerDnsRecords(struct ndr_pull *ndr, int flags, struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
18756 : {
18757 : uint32_t _ptr_server_name;
18758 4 : uint32_t size_server_name_1 = 0;
18759 4 : uint32_t length_server_name_1 = 0;
18760 4 : uint32_t size_computer_name_1 = 0;
18761 4 : uint32_t length_computer_name_1 = 0;
18762 : uint32_t _ptr_site_name;
18763 4 : uint32_t size_site_name_1 = 0;
18764 4 : uint32_t length_site_name_1 = 0;
18765 4 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
18766 4 : TALLOC_CTX *_mem_save_credential_0 = NULL;
18767 4 : TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
18768 4 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
18769 4 : TALLOC_CTX *_mem_save_dns_names_0 = NULL;
18770 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
18771 4 : if (flags & NDR_IN) {
18772 4 : NDR_ZERO_STRUCT(r->out);
18773 :
18774 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
18775 4 : if (_ptr_server_name) {
18776 4 : NDR_PULL_ALLOC(ndr, r->in.server_name);
18777 : } else {
18778 0 : r->in.server_name = NULL;
18779 : }
18780 4 : if (r->in.server_name) {
18781 4 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18782 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
18783 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
18784 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
18785 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
18786 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
18787 4 : if (length_server_name_1 > size_server_name_1) {
18788 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
18789 : }
18790 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
18791 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
18792 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
18793 : }
18794 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
18795 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
18796 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
18797 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
18798 4 : if (length_computer_name_1 > size_computer_name_1) {
18799 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
18800 : }
18801 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
18802 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
18803 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18804 4 : NDR_PULL_ALLOC(ndr, r->in.credential);
18805 : }
18806 4 : _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
18807 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
18808 4 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
18809 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
18810 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
18811 4 : if (_ptr_site_name) {
18812 4 : NDR_PULL_ALLOC(ndr, r->in.site_name);
18813 : } else {
18814 0 : r->in.site_name = NULL;
18815 : }
18816 4 : if (r->in.site_name) {
18817 4 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18818 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
18819 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
18820 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
18821 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
18822 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
18823 4 : if (length_site_name_1 > size_site_name_1) {
18824 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_site_name_1, length_site_name_1);
18825 : }
18826 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
18827 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
18828 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
18829 : }
18830 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dns_ttl));
18831 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18832 4 : NDR_PULL_ALLOC(ndr, r->in.dns_names);
18833 : }
18834 4 : _mem_save_dns_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
18835 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dns_names, LIBNDR_FLAG_REF_ALLOC);
18836 4 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dns_names));
18837 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_names_0, LIBNDR_FLAG_REF_ALLOC);
18838 4 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18839 4 : NDR_ZERO_STRUCTP(r->out.return_authenticator);
18840 4 : NDR_PULL_ALLOC(ndr, r->out.dns_names);
18841 4 : *r->out.dns_names = *r->in.dns_names;
18842 : }
18843 4 : if (flags & NDR_OUT) {
18844 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
18845 : if (r->in.credential == NULL) {
18846 : NDR_PULL_ALLOC(ndr, r->in.credential);
18847 : NDR_ZERO_STRUCTP(r->in.credential);
18848 : }
18849 : if (r->in.dns_names == NULL) {
18850 : NDR_PULL_ALLOC(ndr, r->in.dns_names);
18851 : NDR_ZERO_STRUCTP(r->in.dns_names);
18852 : }
18853 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
18854 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18855 0 : NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
18856 : }
18857 0 : _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
18858 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
18859 0 : NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
18860 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
18861 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18862 0 : NDR_PULL_ALLOC(ndr, r->out.dns_names);
18863 : }
18864 0 : _mem_save_dns_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
18865 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dns_names, LIBNDR_FLAG_REF_ALLOC);
18866 0 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dns_names));
18867 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_names_0, LIBNDR_FLAG_REF_ALLOC);
18868 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
18869 : }
18870 4 : return NDR_ERR_SUCCESS;
18871 : }
18872 :
18873 0 : _PUBLIC_ void ndr_print_netr_DsrUpdateReadOnlyServerDnsRecords(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
18874 : {
18875 0 : ndr_print_struct(ndr, name, "netr_DsrUpdateReadOnlyServerDnsRecords");
18876 0 : if (r == NULL) { ndr_print_null(ndr); return; }
18877 0 : ndr->depth++;
18878 0 : if (flags & NDR_SET_VALUES) {
18879 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18880 : }
18881 0 : if (flags & NDR_IN) {
18882 0 : ndr_print_struct(ndr, "in", "netr_DsrUpdateReadOnlyServerDnsRecords");
18883 0 : ndr->depth++;
18884 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
18885 0 : ndr->depth++;
18886 0 : if (r->in.server_name) {
18887 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
18888 : }
18889 0 : ndr->depth--;
18890 0 : ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
18891 0 : ndr->depth++;
18892 0 : ndr_print_string(ndr, "computer_name", r->in.computer_name);
18893 0 : ndr->depth--;
18894 0 : ndr_print_ptr(ndr, "credential", r->in.credential);
18895 0 : ndr->depth++;
18896 0 : ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
18897 0 : ndr->depth--;
18898 0 : ndr_print_ptr(ndr, "site_name", r->in.site_name);
18899 0 : ndr->depth++;
18900 0 : if (r->in.site_name) {
18901 0 : ndr_print_string(ndr, "site_name", r->in.site_name);
18902 : }
18903 0 : ndr->depth--;
18904 0 : ndr_print_uint32(ndr, "dns_ttl", r->in.dns_ttl);
18905 0 : ndr_print_ptr(ndr, "dns_names", r->in.dns_names);
18906 0 : ndr->depth++;
18907 0 : ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, "dns_names", r->in.dns_names);
18908 0 : ndr->depth--;
18909 0 : ndr->depth--;
18910 : }
18911 0 : if (flags & NDR_OUT) {
18912 0 : ndr_print_struct(ndr, "out", "netr_DsrUpdateReadOnlyServerDnsRecords");
18913 0 : ndr->depth++;
18914 0 : ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
18915 0 : ndr->depth++;
18916 0 : ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
18917 0 : ndr->depth--;
18918 0 : ndr_print_ptr(ndr, "dns_names", r->out.dns_names);
18919 0 : ndr->depth++;
18920 0 : ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, "dns_names", r->out.dns_names);
18921 0 : ndr->depth--;
18922 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
18923 0 : ndr->depth--;
18924 : }
18925 0 : ndr->depth--;
18926 : }
18927 :
18928 : #ifndef SKIP_NDR_TABLE_netlogon
18929 : static const struct ndr_interface_public_struct netlogon_public_structs[] = {
18930 : {
18931 : .name = "netr_AcctLockStr",
18932 : .struct_size = sizeof(struct netr_AcctLockStr ),
18933 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_AcctLockStr,
18934 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_AcctLockStr,
18935 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_AcctLockStr,
18936 : },
18937 : {
18938 : .name = "netr_UserSessionKey",
18939 : .struct_size = sizeof(struct netr_UserSessionKey ),
18940 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_UserSessionKey,
18941 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_UserSessionKey,
18942 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_UserSessionKey,
18943 : },
18944 : {
18945 : .name = "netr_LMSessionKey",
18946 : .struct_size = sizeof(struct netr_LMSessionKey ),
18947 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_LMSessionKey,
18948 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_LMSessionKey,
18949 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_LMSessionKey,
18950 : },
18951 : {
18952 : .name = "netr_SidAttr",
18953 : .struct_size = sizeof(struct netr_SidAttr ),
18954 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SidAttr,
18955 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_SidAttr,
18956 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_SidAttr,
18957 : },
18958 : {
18959 : .name = "netr_SamInfo3",
18960 : .struct_size = sizeof(struct netr_SamInfo3 ),
18961 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SamInfo3,
18962 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_SamInfo3,
18963 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_SamInfo3,
18964 : },
18965 : {
18966 : .name = "netr_Credential",
18967 : .struct_size = sizeof(struct netr_Credential ),
18968 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_Credential,
18969 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_Credential,
18970 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_Credential,
18971 : },
18972 : {
18973 : .name = "netlogon_server_pipe_state",
18974 : .struct_size = sizeof(struct netlogon_server_pipe_state ),
18975 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netlogon_server_pipe_state,
18976 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netlogon_server_pipe_state,
18977 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netlogon_server_pipe_state,
18978 : },
18979 : {
18980 : .name = "netr_Authenticator",
18981 : .struct_size = sizeof(struct netr_Authenticator ),
18982 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_Authenticator,
18983 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_Authenticator,
18984 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_Authenticator,
18985 : },
18986 : {
18987 : .name = "netr_USER_KEYS",
18988 : .struct_size = sizeof(struct netr_USER_KEYS ),
18989 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_USER_KEYS,
18990 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_USER_KEYS,
18991 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_USER_KEYS,
18992 : },
18993 : {
18994 : .name = "netr_ChangeLogEntry",
18995 : .struct_size = sizeof(struct netr_ChangeLogEntry ),
18996 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_ChangeLogEntry,
18997 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_ChangeLogEntry,
18998 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_ChangeLogEntry,
18999 : },
19000 : {
19001 : .name = "netr_DsRGetDCNameInfo",
19002 : .struct_size = sizeof(struct netr_DsRGetDCNameInfo ),
19003 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameInfo,
19004 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameInfo,
19005 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_DsRGetDCNameInfo,
19006 : },
19007 : {
19008 : .name = "netr_SendToSamBase",
19009 : .struct_size = sizeof(struct netr_SendToSamBase ),
19010 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SendToSamBase,
19011 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_SendToSamBase,
19012 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_SendToSamBase,
19013 : },
19014 : {
19015 : .name = "netr_DomainTrust",
19016 : .struct_size = sizeof(struct netr_DomainTrust ),
19017 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_DomainTrust,
19018 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_DomainTrust,
19019 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_DomainTrust,
19020 : },
19021 : {
19022 : .name = "netr_DomainTrustList",
19023 : .struct_size = sizeof(struct netr_DomainTrustList ),
19024 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_DomainTrustList,
19025 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_DomainTrustList,
19026 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_DomainTrustList,
19027 : },
19028 : {
19029 : .name = "NL_DNS_NAME_INFO_ARRAY",
19030 : .struct_size = sizeof(struct NL_DNS_NAME_INFO_ARRAY ),
19031 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_NL_DNS_NAME_INFO_ARRAY,
19032 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NL_DNS_NAME_INFO_ARRAY,
19033 : .ndr_print = (ndr_print_function_t) ndr_print_flags_NL_DNS_NAME_INFO_ARRAY,
19034 : },
19035 : { .name = NULL }
19036 : };
19037 :
19038 : static const struct ndr_interface_call netlogon_calls[] = {
19039 : {
19040 : "netr_LogonUasLogon",
19041 : sizeof(struct netr_LogonUasLogon),
19042 : (ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogon,
19043 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogon,
19044 : (ndr_print_function_t) ndr_print_netr_LogonUasLogon,
19045 : { 0, NULL },
19046 : { 0, NULL },
19047 : },
19048 : {
19049 : "netr_LogonUasLogoff",
19050 : sizeof(struct netr_LogonUasLogoff),
19051 : (ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogoff,
19052 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogoff,
19053 : (ndr_print_function_t) ndr_print_netr_LogonUasLogoff,
19054 : { 0, NULL },
19055 : { 0, NULL },
19056 : },
19057 : {
19058 : "netr_LogonSamLogon",
19059 : sizeof(struct netr_LogonSamLogon),
19060 : (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogon,
19061 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogon,
19062 : (ndr_print_function_t) ndr_print_netr_LogonSamLogon,
19063 : { 0, NULL },
19064 : { 0, NULL },
19065 : },
19066 : {
19067 : "netr_LogonSamLogoff",
19068 : sizeof(struct netr_LogonSamLogoff),
19069 : (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogoff,
19070 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogoff,
19071 : (ndr_print_function_t) ndr_print_netr_LogonSamLogoff,
19072 : { 0, NULL },
19073 : { 0, NULL },
19074 : },
19075 : {
19076 : "netr_ServerReqChallenge",
19077 : sizeof(struct netr_ServerReqChallenge),
19078 : (ndr_push_flags_fn_t) ndr_push_netr_ServerReqChallenge,
19079 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerReqChallenge,
19080 : (ndr_print_function_t) ndr_print_netr_ServerReqChallenge,
19081 : { 0, NULL },
19082 : { 0, NULL },
19083 : },
19084 : {
19085 : "netr_ServerAuthenticate",
19086 : sizeof(struct netr_ServerAuthenticate),
19087 : (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate,
19088 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate,
19089 : (ndr_print_function_t) ndr_print_netr_ServerAuthenticate,
19090 : { 0, NULL },
19091 : { 0, NULL },
19092 : },
19093 : {
19094 : "netr_ServerPasswordSet",
19095 : sizeof(struct netr_ServerPasswordSet),
19096 : (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet,
19097 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet,
19098 : (ndr_print_function_t) ndr_print_netr_ServerPasswordSet,
19099 : { 0, NULL },
19100 : { 0, NULL },
19101 : },
19102 : {
19103 : "netr_DatabaseDeltas",
19104 : sizeof(struct netr_DatabaseDeltas),
19105 : (ndr_push_flags_fn_t) ndr_push_netr_DatabaseDeltas,
19106 : (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseDeltas,
19107 : (ndr_print_function_t) ndr_print_netr_DatabaseDeltas,
19108 : { 0, NULL },
19109 : { 0, NULL },
19110 : },
19111 : {
19112 : "netr_DatabaseSync",
19113 : sizeof(struct netr_DatabaseSync),
19114 : (ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync,
19115 : (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync,
19116 : (ndr_print_function_t) ndr_print_netr_DatabaseSync,
19117 : { 0, NULL },
19118 : { 0, NULL },
19119 : },
19120 : {
19121 : "netr_AccountDeltas",
19122 : sizeof(struct netr_AccountDeltas),
19123 : (ndr_push_flags_fn_t) ndr_push_netr_AccountDeltas,
19124 : (ndr_pull_flags_fn_t) ndr_pull_netr_AccountDeltas,
19125 : (ndr_print_function_t) ndr_print_netr_AccountDeltas,
19126 : { 0, NULL },
19127 : { 0, NULL },
19128 : },
19129 : {
19130 : "netr_AccountSync",
19131 : sizeof(struct netr_AccountSync),
19132 : (ndr_push_flags_fn_t) ndr_push_netr_AccountSync,
19133 : (ndr_pull_flags_fn_t) ndr_pull_netr_AccountSync,
19134 : (ndr_print_function_t) ndr_print_netr_AccountSync,
19135 : { 0, NULL },
19136 : { 0, NULL },
19137 : },
19138 : {
19139 : "netr_GetDcName",
19140 : sizeof(struct netr_GetDcName),
19141 : (ndr_push_flags_fn_t) ndr_push_netr_GetDcName,
19142 : (ndr_pull_flags_fn_t) ndr_pull_netr_GetDcName,
19143 : (ndr_print_function_t) ndr_print_netr_GetDcName,
19144 : { 0, NULL },
19145 : { 0, NULL },
19146 : },
19147 : {
19148 : "netr_LogonControl",
19149 : sizeof(struct netr_LogonControl),
19150 : (ndr_push_flags_fn_t) ndr_push_netr_LogonControl,
19151 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl,
19152 : (ndr_print_function_t) ndr_print_netr_LogonControl,
19153 : { 0, NULL },
19154 : { 0, NULL },
19155 : },
19156 : {
19157 : "netr_GetAnyDCName",
19158 : sizeof(struct netr_GetAnyDCName),
19159 : (ndr_push_flags_fn_t) ndr_push_netr_GetAnyDCName,
19160 : (ndr_pull_flags_fn_t) ndr_pull_netr_GetAnyDCName,
19161 : (ndr_print_function_t) ndr_print_netr_GetAnyDCName,
19162 : { 0, NULL },
19163 : { 0, NULL },
19164 : },
19165 : {
19166 : "netr_LogonControl2",
19167 : sizeof(struct netr_LogonControl2),
19168 : (ndr_push_flags_fn_t) ndr_push_netr_LogonControl2,
19169 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2,
19170 : (ndr_print_function_t) ndr_print_netr_LogonControl2,
19171 : { 0, NULL },
19172 : { 0, NULL },
19173 : },
19174 : {
19175 : "netr_ServerAuthenticate2",
19176 : sizeof(struct netr_ServerAuthenticate2),
19177 : (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate2,
19178 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate2,
19179 : (ndr_print_function_t) ndr_print_netr_ServerAuthenticate2,
19180 : { 0, NULL },
19181 : { 0, NULL },
19182 : },
19183 : {
19184 : "netr_DatabaseSync2",
19185 : sizeof(struct netr_DatabaseSync2),
19186 : (ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync2,
19187 : (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync2,
19188 : (ndr_print_function_t) ndr_print_netr_DatabaseSync2,
19189 : { 0, NULL },
19190 : { 0, NULL },
19191 : },
19192 : {
19193 : "netr_DatabaseRedo",
19194 : sizeof(struct netr_DatabaseRedo),
19195 : (ndr_push_flags_fn_t) ndr_push_netr_DatabaseRedo,
19196 : (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseRedo,
19197 : (ndr_print_function_t) ndr_print_netr_DatabaseRedo,
19198 : { 0, NULL },
19199 : { 0, NULL },
19200 : },
19201 : {
19202 : "netr_LogonControl2Ex",
19203 : sizeof(struct netr_LogonControl2Ex),
19204 : (ndr_push_flags_fn_t) ndr_push_netr_LogonControl2Ex,
19205 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2Ex,
19206 : (ndr_print_function_t) ndr_print_netr_LogonControl2Ex,
19207 : { 0, NULL },
19208 : { 0, NULL },
19209 : },
19210 : {
19211 : "netr_NetrEnumerateTrustedDomains",
19212 : sizeof(struct netr_NetrEnumerateTrustedDomains),
19213 : (ndr_push_flags_fn_t) ndr_push_netr_NetrEnumerateTrustedDomains,
19214 : (ndr_pull_flags_fn_t) ndr_pull_netr_NetrEnumerateTrustedDomains,
19215 : (ndr_print_function_t) ndr_print_netr_NetrEnumerateTrustedDomains,
19216 : { 0, NULL },
19217 : { 0, NULL },
19218 : },
19219 : {
19220 : "netr_DsRGetDCName",
19221 : sizeof(struct netr_DsRGetDCName),
19222 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCName,
19223 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCName,
19224 : (ndr_print_function_t) ndr_print_netr_DsRGetDCName,
19225 : { 0, NULL },
19226 : { 0, NULL },
19227 : },
19228 : {
19229 : "netr_LogonGetCapabilities",
19230 : sizeof(struct netr_LogonGetCapabilities),
19231 : (ndr_push_flags_fn_t) ndr_push_netr_LogonGetCapabilities,
19232 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetCapabilities,
19233 : (ndr_print_function_t) ndr_print_netr_LogonGetCapabilities,
19234 : { 0, NULL },
19235 : { 0, NULL },
19236 : },
19237 : {
19238 : "netr_NETRLOGONSETSERVICEBITS",
19239 : sizeof(struct netr_NETRLOGONSETSERVICEBITS),
19240 : (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONSETSERVICEBITS,
19241 : (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONSETSERVICEBITS,
19242 : (ndr_print_function_t) ndr_print_netr_NETRLOGONSETSERVICEBITS,
19243 : { 0, NULL },
19244 : { 0, NULL },
19245 : },
19246 : {
19247 : "netr_LogonGetTrustRid",
19248 : sizeof(struct netr_LogonGetTrustRid),
19249 : (ndr_push_flags_fn_t) ndr_push_netr_LogonGetTrustRid,
19250 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetTrustRid,
19251 : (ndr_print_function_t) ndr_print_netr_LogonGetTrustRid,
19252 : { 0, NULL },
19253 : { 0, NULL },
19254 : },
19255 : {
19256 : "netr_NETRLOGONCOMPUTESERVERDIGEST",
19257 : sizeof(struct netr_NETRLOGONCOMPUTESERVERDIGEST),
19258 : (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST,
19259 : (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST,
19260 : (ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST,
19261 : { 0, NULL },
19262 : { 0, NULL },
19263 : },
19264 : {
19265 : "netr_NETRLOGONCOMPUTECLIENTDIGEST",
19266 : sizeof(struct netr_NETRLOGONCOMPUTECLIENTDIGEST),
19267 : (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST,
19268 : (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST,
19269 : (ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST,
19270 : { 0, NULL },
19271 : { 0, NULL },
19272 : },
19273 : {
19274 : "netr_ServerAuthenticate3",
19275 : sizeof(struct netr_ServerAuthenticate3),
19276 : (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate3,
19277 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate3,
19278 : (ndr_print_function_t) ndr_print_netr_ServerAuthenticate3,
19279 : { 0, NULL },
19280 : { 0, NULL },
19281 : },
19282 : {
19283 : "netr_DsRGetDCNameEx",
19284 : sizeof(struct netr_DsRGetDCNameEx),
19285 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx,
19286 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx,
19287 : (ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx,
19288 : { 0, NULL },
19289 : { 0, NULL },
19290 : },
19291 : {
19292 : "netr_DsRGetSiteName",
19293 : sizeof(struct netr_DsRGetSiteName),
19294 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetSiteName,
19295 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetSiteName,
19296 : (ndr_print_function_t) ndr_print_netr_DsRGetSiteName,
19297 : { 0, NULL },
19298 : { 0, NULL },
19299 : },
19300 : {
19301 : "netr_LogonGetDomainInfo",
19302 : sizeof(struct netr_LogonGetDomainInfo),
19303 : (ndr_push_flags_fn_t) ndr_push_netr_LogonGetDomainInfo,
19304 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetDomainInfo,
19305 : (ndr_print_function_t) ndr_print_netr_LogonGetDomainInfo,
19306 : { 0, NULL },
19307 : { 0, NULL },
19308 : },
19309 : {
19310 : "netr_ServerPasswordSet2",
19311 : sizeof(struct netr_ServerPasswordSet2),
19312 : (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet2,
19313 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet2,
19314 : (ndr_print_function_t) ndr_print_netr_ServerPasswordSet2,
19315 : { 0, NULL },
19316 : { 0, NULL },
19317 : },
19318 : {
19319 : "netr_ServerPasswordGet",
19320 : sizeof(struct netr_ServerPasswordGet),
19321 : (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordGet,
19322 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordGet,
19323 : (ndr_print_function_t) ndr_print_netr_ServerPasswordGet,
19324 : { 0, NULL },
19325 : { 0, NULL },
19326 : },
19327 : {
19328 : "netr_NetrLogonSendToSam",
19329 : sizeof(struct netr_NetrLogonSendToSam),
19330 : (ndr_push_flags_fn_t) ndr_push_netr_NetrLogonSendToSam,
19331 : (ndr_pull_flags_fn_t) ndr_pull_netr_NetrLogonSendToSam,
19332 : (ndr_print_function_t) ndr_print_netr_NetrLogonSendToSam,
19333 : { 0, NULL },
19334 : { 0, NULL },
19335 : },
19336 : {
19337 : "netr_DsRAddressToSitenamesW",
19338 : sizeof(struct netr_DsRAddressToSitenamesW),
19339 : (ndr_push_flags_fn_t) ndr_push_netr_DsRAddressToSitenamesW,
19340 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRAddressToSitenamesW,
19341 : (ndr_print_function_t) ndr_print_netr_DsRAddressToSitenamesW,
19342 : { 0, NULL },
19343 : { 0, NULL },
19344 : },
19345 : {
19346 : "netr_DsRGetDCNameEx2",
19347 : sizeof(struct netr_DsRGetDCNameEx2),
19348 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx2,
19349 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx2,
19350 : (ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx2,
19351 : { 0, NULL },
19352 : { 0, NULL },
19353 : },
19354 : {
19355 : "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN",
19356 : sizeof(struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN),
19357 : (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
19358 : (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
19359 : (ndr_print_function_t) ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
19360 : { 0, NULL },
19361 : { 0, NULL },
19362 : },
19363 : {
19364 : "netr_NetrEnumerateTrustedDomainsEx",
19365 : sizeof(struct netr_NetrEnumerateTrustedDomainsEx),
19366 : (ndr_push_flags_fn_t) ndr_push_netr_NetrEnumerateTrustedDomainsEx,
19367 : (ndr_pull_flags_fn_t) ndr_pull_netr_NetrEnumerateTrustedDomainsEx,
19368 : (ndr_print_function_t) ndr_print_netr_NetrEnumerateTrustedDomainsEx,
19369 : { 0, NULL },
19370 : { 0, NULL },
19371 : },
19372 : {
19373 : "netr_DsRAddressToSitenamesExW",
19374 : sizeof(struct netr_DsRAddressToSitenamesExW),
19375 : (ndr_push_flags_fn_t) ndr_push_netr_DsRAddressToSitenamesExW,
19376 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRAddressToSitenamesExW,
19377 : (ndr_print_function_t) ndr_print_netr_DsRAddressToSitenamesExW,
19378 : { 0, NULL },
19379 : { 0, NULL },
19380 : },
19381 : {
19382 : "netr_DsrGetDcSiteCoverageW",
19383 : sizeof(struct netr_DsrGetDcSiteCoverageW),
19384 : (ndr_push_flags_fn_t) ndr_push_netr_DsrGetDcSiteCoverageW,
19385 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsrGetDcSiteCoverageW,
19386 : (ndr_print_function_t) ndr_print_netr_DsrGetDcSiteCoverageW,
19387 : { 0, NULL },
19388 : { 0, NULL },
19389 : },
19390 : {
19391 : "netr_LogonSamLogonEx",
19392 : sizeof(struct netr_LogonSamLogonEx),
19393 : (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonEx,
19394 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonEx,
19395 : (ndr_print_function_t) ndr_print_netr_LogonSamLogonEx,
19396 : { 0, NULL },
19397 : { 0, NULL },
19398 : },
19399 : {
19400 : "netr_DsrEnumerateDomainTrusts",
19401 : sizeof(struct netr_DsrEnumerateDomainTrusts),
19402 : (ndr_push_flags_fn_t) ndr_push_netr_DsrEnumerateDomainTrusts,
19403 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsrEnumerateDomainTrusts,
19404 : (ndr_print_function_t) ndr_print_netr_DsrEnumerateDomainTrusts,
19405 : { 0, NULL },
19406 : { 0, NULL },
19407 : },
19408 : {
19409 : "netr_DsrDeregisterDNSHostRecords",
19410 : sizeof(struct netr_DsrDeregisterDNSHostRecords),
19411 : (ndr_push_flags_fn_t) ndr_push_netr_DsrDeregisterDNSHostRecords,
19412 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsrDeregisterDNSHostRecords,
19413 : (ndr_print_function_t) ndr_print_netr_DsrDeregisterDNSHostRecords,
19414 : { 0, NULL },
19415 : { 0, NULL },
19416 : },
19417 : {
19418 : "netr_ServerTrustPasswordsGet",
19419 : sizeof(struct netr_ServerTrustPasswordsGet),
19420 : (ndr_push_flags_fn_t) ndr_push_netr_ServerTrustPasswordsGet,
19421 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerTrustPasswordsGet,
19422 : (ndr_print_function_t) ndr_print_netr_ServerTrustPasswordsGet,
19423 : { 0, NULL },
19424 : { 0, NULL },
19425 : },
19426 : {
19427 : "netr_DsRGetForestTrustInformation",
19428 : sizeof(struct netr_DsRGetForestTrustInformation),
19429 : (ndr_push_flags_fn_t) ndr_push_netr_DsRGetForestTrustInformation,
19430 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetForestTrustInformation,
19431 : (ndr_print_function_t) ndr_print_netr_DsRGetForestTrustInformation,
19432 : { 0, NULL },
19433 : { 0, NULL },
19434 : },
19435 : {
19436 : "netr_GetForestTrustInformation",
19437 : sizeof(struct netr_GetForestTrustInformation),
19438 : (ndr_push_flags_fn_t) ndr_push_netr_GetForestTrustInformation,
19439 : (ndr_pull_flags_fn_t) ndr_pull_netr_GetForestTrustInformation,
19440 : (ndr_print_function_t) ndr_print_netr_GetForestTrustInformation,
19441 : { 0, NULL },
19442 : { 0, NULL },
19443 : },
19444 : {
19445 : "netr_LogonSamLogonWithFlags",
19446 : sizeof(struct netr_LogonSamLogonWithFlags),
19447 : (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonWithFlags,
19448 : (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonWithFlags,
19449 : (ndr_print_function_t) ndr_print_netr_LogonSamLogonWithFlags,
19450 : { 0, NULL },
19451 : { 0, NULL },
19452 : },
19453 : {
19454 : "netr_ServerGetTrustInfo",
19455 : sizeof(struct netr_ServerGetTrustInfo),
19456 : (ndr_push_flags_fn_t) ndr_push_netr_ServerGetTrustInfo,
19457 : (ndr_pull_flags_fn_t) ndr_pull_netr_ServerGetTrustInfo,
19458 : (ndr_print_function_t) ndr_print_netr_ServerGetTrustInfo,
19459 : { 0, NULL },
19460 : { 0, NULL },
19461 : },
19462 : {
19463 : "netr_Unused47",
19464 : sizeof(struct netr_Unused47),
19465 : (ndr_push_flags_fn_t) ndr_push_netr_Unused47,
19466 : (ndr_pull_flags_fn_t) ndr_pull_netr_Unused47,
19467 : (ndr_print_function_t) ndr_print_netr_Unused47,
19468 : { 0, NULL },
19469 : { 0, NULL },
19470 : },
19471 : {
19472 : "netr_DsrUpdateReadOnlyServerDnsRecords",
19473 : sizeof(struct netr_DsrUpdateReadOnlyServerDnsRecords),
19474 : (ndr_push_flags_fn_t) ndr_push_netr_DsrUpdateReadOnlyServerDnsRecords,
19475 : (ndr_pull_flags_fn_t) ndr_pull_netr_DsrUpdateReadOnlyServerDnsRecords,
19476 : (ndr_print_function_t) ndr_print_netr_DsrUpdateReadOnlyServerDnsRecords,
19477 : { 0, NULL },
19478 : { 0, NULL },
19479 : },
19480 : { .name = NULL }
19481 : };
19482 :
19483 : static const char * const netlogon_endpoint_strings[] = {
19484 : "ncacn_np:[\\pipe\\netlogon]",
19485 : "ncacn_ip_tcp:",
19486 : "ncalrpc:",
19487 : };
19488 :
19489 : static const struct ndr_interface_string_array netlogon_endpoints = {
19490 : .count = 3,
19491 : .names = netlogon_endpoint_strings
19492 : };
19493 :
19494 : static const char * const netlogon_authservice_strings[] = {
19495 : "host",
19496 : };
19497 :
19498 : static const struct ndr_interface_string_array netlogon_authservices = {
19499 : .count = 1,
19500 : .names = netlogon_authservice_strings
19501 : };
19502 :
19503 :
19504 : const struct ndr_interface_table ndr_table_netlogon = {
19505 : .name = "netlogon",
19506 : .syntax_id = {
19507 : {0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0xcf,0xfb}},
19508 : NDR_NETLOGON_VERSION
19509 : },
19510 : .helpstring = NDR_NETLOGON_HELPSTRING,
19511 : .num_calls = 49,
19512 : .calls = netlogon_calls,
19513 : .num_public_structs = 15,
19514 : .public_structs = netlogon_public_structs,
19515 : .endpoints = &netlogon_endpoints,
19516 : .authservices = &netlogon_authservices
19517 : };
19518 :
19519 : #endif /* SKIP_NDR_TABLE_netlogon */
|