1 /* parser auto-generated by pidl */
4 #include "librpc/gen_ndr/ndr_netlogon.h"
6 #include "librpc/gen_ndr/ndr_lsa.h"
7 #include "librpc/gen_ndr/ndr_samr.h"
8 #include "librpc/gen_ndr/ndr_security.h"
9 #include "librpc/gen_ndr/ndr_nbt.h"
10 static enum ndr_err_code
ndr_push_netr_UasInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_UasInfo
*r
)
12 if (ndr_flags
& NDR_SCALARS
) {
13 NDR_CHECK(ndr_push_align(ndr
, 4));
14 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->account_name
));
15 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priv
));
16 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->auth_flags
));
17 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->logon_count
));
18 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->bad_pw_count
));
19 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->last_logon
));
20 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->last_logoff
));
21 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->logoff_time
));
22 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->kickoff_time
));
23 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->password_age
));
24 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->pw_can_change
));
25 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->pw_must_change
));
26 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->computer
));
27 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain
));
28 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->script_path
));
29 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
31 if (ndr_flags
& NDR_BUFFERS
) {
32 if (r
->account_name
) {
33 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->account_name
, CH_UTF16
)));
34 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
35 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->account_name
, CH_UTF16
)));
36 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 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer
, CH_UTF16
)));
40 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
41 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->computer
, CH_UTF16
)));
42 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->computer
, ndr_charset_length(r
->computer
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
45 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain
, CH_UTF16
)));
46 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
47 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain
, CH_UTF16
)));
48 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain
, ndr_charset_length(r
->domain
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
51 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->script_path
, CH_UTF16
)));
52 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
53 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->script_path
, CH_UTF16
)));
54 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 return NDR_ERR_SUCCESS
;
60 static enum ndr_err_code
ndr_pull_netr_UasInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_UasInfo
*r
)
62 uint32_t _ptr_account_name
;
63 TALLOC_CTX
*_mem_save_account_name_0
;
64 uint32_t _ptr_computer
;
65 TALLOC_CTX
*_mem_save_computer_0
;
67 TALLOC_CTX
*_mem_save_domain_0
;
68 uint32_t _ptr_script_path
;
69 TALLOC_CTX
*_mem_save_script_path_0
;
70 if (ndr_flags
& NDR_SCALARS
) {
71 NDR_CHECK(ndr_pull_align(ndr
, 4));
72 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
73 if (_ptr_account_name
) {
74 NDR_PULL_ALLOC(ndr
, r
->account_name
);
76 r
->account_name
= NULL
;
78 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priv
));
79 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->auth_flags
));
80 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->logon_count
));
81 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->bad_pw_count
));
82 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->last_logon
));
83 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->last_logoff
));
84 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->logoff_time
));
85 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->kickoff_time
));
86 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->password_age
));
87 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->pw_can_change
));
88 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->pw_must_change
));
89 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer
));
91 NDR_PULL_ALLOC(ndr
, r
->computer
);
95 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain
));
97 NDR_PULL_ALLOC(ndr
, r
->domain
);
101 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_script_path
));
102 if (_ptr_script_path
) {
103 NDR_PULL_ALLOC(ndr
, r
->script_path
);
105 r
->script_path
= NULL
;
107 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
109 if (ndr_flags
& NDR_BUFFERS
) {
110 if (r
->account_name
) {
111 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
112 NDR_PULL_SET_MEM_CTX(ndr
, r
->account_name
, 0);
113 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->account_name
));
114 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->account_name
));
115 if (ndr_get_array_length(ndr
, &r
->account_name
) > ndr_get_array_size(ndr
, &r
->account_name
)) {
116 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->account_name
), ndr_get_array_length(ndr
, &r
->account_name
));
118 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->account_name
), sizeof(uint16_t)));
119 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->account_name
, ndr_get_array_length(ndr
, &r
->account_name
), sizeof(uint16_t), CH_UTF16
));
120 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, 0);
123 _mem_save_computer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
124 NDR_PULL_SET_MEM_CTX(ndr
, r
->computer
, 0);
125 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->computer
));
126 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->computer
));
127 if (ndr_get_array_length(ndr
, &r
->computer
) > ndr_get_array_size(ndr
, &r
->computer
)) {
128 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->computer
), ndr_get_array_length(ndr
, &r
->computer
));
130 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->computer
), sizeof(uint16_t)));
131 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->computer
, ndr_get_array_length(ndr
, &r
->computer
), sizeof(uint16_t), CH_UTF16
));
132 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_0
, 0);
135 _mem_save_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
136 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain
, 0);
137 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain
));
138 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain
));
139 if (ndr_get_array_length(ndr
, &r
->domain
) > ndr_get_array_size(ndr
, &r
->domain
)) {
140 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain
), ndr_get_array_length(ndr
, &r
->domain
));
142 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain
), sizeof(uint16_t)));
143 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain
, ndr_get_array_length(ndr
, &r
->domain
), sizeof(uint16_t), CH_UTF16
));
144 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_0
, 0);
146 if (r
->script_path
) {
147 _mem_save_script_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
148 NDR_PULL_SET_MEM_CTX(ndr
, r
->script_path
, 0);
149 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->script_path
));
150 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->script_path
));
151 if (ndr_get_array_length(ndr
, &r
->script_path
) > ndr_get_array_size(ndr
, &r
->script_path
)) {
152 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->script_path
), ndr_get_array_length(ndr
, &r
->script_path
));
154 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->script_path
), sizeof(uint16_t)));
155 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->script_path
, ndr_get_array_length(ndr
, &r
->script_path
), sizeof(uint16_t), CH_UTF16
));
156 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_script_path_0
, 0);
159 return NDR_ERR_SUCCESS
;
162 _PUBLIC_
void ndr_print_netr_UasInfo(struct ndr_print
*ndr
, const char *name
, const struct netr_UasInfo
*r
)
164 ndr_print_struct(ndr
, name
, "netr_UasInfo");
166 ndr_print_ptr(ndr
, "account_name", r
->account_name
);
168 if (r
->account_name
) {
169 ndr_print_string(ndr
, "account_name", r
->account_name
);
172 ndr_print_uint32(ndr
, "priv", r
->priv
);
173 ndr_print_uint32(ndr
, "auth_flags", r
->auth_flags
);
174 ndr_print_uint32(ndr
, "logon_count", r
->logon_count
);
175 ndr_print_uint32(ndr
, "bad_pw_count", r
->bad_pw_count
);
176 ndr_print_time_t(ndr
, "last_logon", r
->last_logon
);
177 ndr_print_time_t(ndr
, "last_logoff", r
->last_logoff
);
178 ndr_print_time_t(ndr
, "logoff_time", r
->logoff_time
);
179 ndr_print_time_t(ndr
, "kickoff_time", r
->kickoff_time
);
180 ndr_print_uint32(ndr
, "password_age", r
->password_age
);
181 ndr_print_time_t(ndr
, "pw_can_change", r
->pw_can_change
);
182 ndr_print_time_t(ndr
, "pw_must_change", r
->pw_must_change
);
183 ndr_print_ptr(ndr
, "computer", r
->computer
);
186 ndr_print_string(ndr
, "computer", r
->computer
);
189 ndr_print_ptr(ndr
, "domain", r
->domain
);
192 ndr_print_string(ndr
, "domain", r
->domain
);
195 ndr_print_ptr(ndr
, "script_path", r
->script_path
);
197 if (r
->script_path
) {
198 ndr_print_string(ndr
, "script_path", r
->script_path
);
201 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
205 static enum ndr_err_code
ndr_push_netr_UasLogoffInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_UasLogoffInfo
*r
)
207 if (ndr_flags
& NDR_SCALARS
) {
208 NDR_CHECK(ndr_push_align(ndr
, 4));
209 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->duration
));
210 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logon_count
));
212 if (ndr_flags
& NDR_BUFFERS
) {
214 return NDR_ERR_SUCCESS
;
217 static enum ndr_err_code
ndr_pull_netr_UasLogoffInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_UasLogoffInfo
*r
)
219 if (ndr_flags
& NDR_SCALARS
) {
220 NDR_CHECK(ndr_pull_align(ndr
, 4));
221 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->duration
));
222 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logon_count
));
224 if (ndr_flags
& NDR_BUFFERS
) {
226 return NDR_ERR_SUCCESS
;
229 _PUBLIC_
void ndr_print_netr_UasLogoffInfo(struct ndr_print
*ndr
, const char *name
, const struct netr_UasLogoffInfo
*r
)
231 ndr_print_struct(ndr
, name
, "netr_UasLogoffInfo");
233 ndr_print_uint32(ndr
, "duration", r
->duration
);
234 ndr_print_uint16(ndr
, "logon_count", r
->logon_count
);
238 _PUBLIC_
enum ndr_err_code
ndr_push_netr_AcctLockStr(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_AcctLockStr
*r
)
240 if (ndr_flags
& NDR_SCALARS
) {
241 NDR_CHECK(ndr_push_align(ndr
, 4));
242 NDR_CHECK(ndr_push_dlong(ndr
, NDR_SCALARS
, r
->lockout_duration
));
243 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->reset_count
));
244 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->bad_attempt_lockout
));
245 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dummy
));
247 if (ndr_flags
& NDR_BUFFERS
) {
249 return NDR_ERR_SUCCESS
;
252 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_AcctLockStr(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_AcctLockStr
*r
)
254 if (ndr_flags
& NDR_SCALARS
) {
255 NDR_CHECK(ndr_pull_align(ndr
, 4));
256 NDR_CHECK(ndr_pull_dlong(ndr
, NDR_SCALARS
, &r
->lockout_duration
));
257 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->reset_count
));
258 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->bad_attempt_lockout
));
259 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dummy
));
261 if (ndr_flags
& NDR_BUFFERS
) {
263 return NDR_ERR_SUCCESS
;
266 _PUBLIC_
void ndr_print_netr_AcctLockStr(struct ndr_print
*ndr
, const char *name
, const struct netr_AcctLockStr
*r
)
268 ndr_print_struct(ndr
, name
, "netr_AcctLockStr");
270 ndr_print_dlong(ndr
, "lockout_duration", r
->lockout_duration
);
271 ndr_print_udlong(ndr
, "reset_count", r
->reset_count
);
272 ndr_print_uint32(ndr
, "bad_attempt_lockout", r
->bad_attempt_lockout
);
273 ndr_print_uint32(ndr
, "dummy", r
->dummy
);
277 _PUBLIC_
enum ndr_err_code
ndr_push_netr_LogonParameterControl(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
279 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
280 return NDR_ERR_SUCCESS
;
283 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_LogonParameterControl(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
286 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
288 return NDR_ERR_SUCCESS
;
291 _PUBLIC_
void ndr_print_netr_LogonParameterControl(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
293 ndr_print_uint32(ndr
, name
, r
);
295 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", MSV1_0_CLEARTEXT_PASSWORD_ALLOWED
, r
);
296 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "MSV1_0_UPDATE_LOGON_STATISTICS", MSV1_0_UPDATE_LOGON_STATISTICS
, r
);
297 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "MSV1_0_RETURN_USER_PARAMETERS", MSV1_0_RETURN_USER_PARAMETERS
, r
);
298 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
, r
);
299 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "MSV1_0_RETURN_PROFILE_PATH", MSV1_0_RETURN_PROFILE_PATH
, r
);
300 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT
, r
);
304 static enum ndr_err_code
ndr_push_netr_IdentityInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_IdentityInfo
*r
)
306 if (ndr_flags
& NDR_SCALARS
) {
307 NDR_CHECK(ndr_push_align(ndr
, 4));
308 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
309 NDR_CHECK(ndr_push_netr_LogonParameterControl(ndr
, NDR_SCALARS
, r
->parameter_control
));
310 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->logon_id_low
));
311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->logon_id_high
));
312 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
313 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstation
));
315 if (ndr_flags
& NDR_BUFFERS
) {
316 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
317 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
318 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstation
));
320 return NDR_ERR_SUCCESS
;
323 static enum ndr_err_code
ndr_pull_netr_IdentityInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_IdentityInfo
*r
)
325 if (ndr_flags
& NDR_SCALARS
) {
326 NDR_CHECK(ndr_pull_align(ndr
, 4));
327 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
328 NDR_CHECK(ndr_pull_netr_LogonParameterControl(ndr
, NDR_SCALARS
, &r
->parameter_control
));
329 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->logon_id_low
));
330 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->logon_id_high
));
331 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
332 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstation
));
334 if (ndr_flags
& NDR_BUFFERS
) {
335 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
336 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
337 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstation
));
339 return NDR_ERR_SUCCESS
;
342 _PUBLIC_
void ndr_print_netr_IdentityInfo(struct ndr_print
*ndr
, const char *name
, const struct netr_IdentityInfo
*r
)
344 ndr_print_struct(ndr
, name
, "netr_IdentityInfo");
346 ndr_print_lsa_String(ndr
, "domain_name", &r
->domain_name
);
347 ndr_print_netr_LogonParameterControl(ndr
, "parameter_control", r
->parameter_control
);
348 ndr_print_uint32(ndr
, "logon_id_low", r
->logon_id_low
);
349 ndr_print_uint32(ndr
, "logon_id_high", r
->logon_id_high
);
350 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
351 ndr_print_lsa_String(ndr
, "workstation", &r
->workstation
);
355 static enum ndr_err_code
ndr_push_netr_PasswordInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_PasswordInfo
*r
)
357 if (ndr_flags
& NDR_SCALARS
) {
358 NDR_CHECK(ndr_push_align(ndr
, 4));
359 NDR_CHECK(ndr_push_netr_IdentityInfo(ndr
, NDR_SCALARS
, &r
->identity_info
));
360 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->lmpassword
));
361 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->ntpassword
));
363 if (ndr_flags
& NDR_BUFFERS
) {
364 NDR_CHECK(ndr_push_netr_IdentityInfo(ndr
, NDR_BUFFERS
, &r
->identity_info
));
365 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_BUFFERS
, &r
->lmpassword
));
366 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_BUFFERS
, &r
->ntpassword
));
368 return NDR_ERR_SUCCESS
;
371 static enum ndr_err_code
ndr_pull_netr_PasswordInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_PasswordInfo
*r
)
373 if (ndr_flags
& NDR_SCALARS
) {
374 NDR_CHECK(ndr_pull_align(ndr
, 4));
375 NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr
, NDR_SCALARS
, &r
->identity_info
));
376 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->lmpassword
));
377 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->ntpassword
));
379 if (ndr_flags
& NDR_BUFFERS
) {
380 NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr
, NDR_BUFFERS
, &r
->identity_info
));
381 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_BUFFERS
, &r
->lmpassword
));
382 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_BUFFERS
, &r
->ntpassword
));
384 return NDR_ERR_SUCCESS
;
387 _PUBLIC_
void ndr_print_netr_PasswordInfo(struct ndr_print
*ndr
, const char *name
, const struct netr_PasswordInfo
*r
)
389 ndr_print_struct(ndr
, name
, "netr_PasswordInfo");
391 ndr_print_netr_IdentityInfo(ndr
, "identity_info", &r
->identity_info
);
392 ndr_print_samr_Password(ndr
, "lmpassword", &r
->lmpassword
);
393 ndr_print_samr_Password(ndr
, "ntpassword", &r
->ntpassword
);
397 static enum ndr_err_code
ndr_push_netr_ChallengeResponse(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_ChallengeResponse
*r
)
400 uint32_t _flags_save_STRUCT
= ndr
->flags
;
401 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
402 if (ndr_flags
& NDR_SCALARS
) {
403 NDR_CHECK(ndr_push_align(ndr
, 4));
404 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->length
));
405 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->length
));
406 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
408 if (ndr_flags
& NDR_BUFFERS
) {
410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
413 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
416 ndr
->flags
= _flags_save_STRUCT
;
418 return NDR_ERR_SUCCESS
;
421 static enum ndr_err_code
ndr_pull_netr_ChallengeResponse(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_ChallengeResponse
*r
)
424 TALLOC_CTX
*_mem_save_data_0
;
426 uint32_t _flags_save_STRUCT
= ndr
->flags
;
427 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
428 if (ndr_flags
& NDR_SCALARS
) {
429 NDR_CHECK(ndr_pull_align(ndr
, 4));
430 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
431 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
432 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
434 NDR_PULL_ALLOC(ndr
, r
->data
);
439 if (ndr_flags
& NDR_BUFFERS
) {
441 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
442 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
443 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
444 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data
));
445 if (ndr_get_array_length(ndr
, &r
->data
) > ndr_get_array_size(ndr
, &r
->data
)) {
446 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->data
), ndr_get_array_length(ndr
, &r
->data
));
448 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
449 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_length(ndr
, &r
->data
)));
450 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
453 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
456 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->data
, r
->length
));
459 ndr
->flags
= _flags_save_STRUCT
;
461 return NDR_ERR_SUCCESS
;
464 _PUBLIC_
void ndr_print_netr_ChallengeResponse(struct ndr_print
*ndr
, const char *name
, const struct netr_ChallengeResponse
*r
)
466 ndr_print_struct(ndr
, name
, "netr_ChallengeResponse");
468 uint32_t _flags_save_STRUCT
= ndr
->flags
;
469 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
471 ndr_print_uint16(ndr
, "length", r
->length
);
472 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->length
:r
->size
);
473 ndr_print_ptr(ndr
, "data", r
->data
);
476 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
480 ndr
->flags
= _flags_save_STRUCT
;
484 static enum ndr_err_code
ndr_push_netr_NetworkInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_NetworkInfo
*r
)
487 uint32_t _flags_save_STRUCT
= ndr
->flags
;
488 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
489 if (ndr_flags
& NDR_SCALARS
) {
490 NDR_CHECK(ndr_push_align(ndr
, 4));
491 NDR_CHECK(ndr_push_netr_IdentityInfo(ndr
, NDR_SCALARS
, &r
->identity_info
));
492 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->challenge
, 8));
493 NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr
, NDR_SCALARS
, &r
->nt
));
494 NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr
, NDR_SCALARS
, &r
->lm
));
496 if (ndr_flags
& NDR_BUFFERS
) {
497 NDR_CHECK(ndr_push_netr_IdentityInfo(ndr
, NDR_BUFFERS
, &r
->identity_info
));
498 NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr
, NDR_BUFFERS
, &r
->nt
));
499 NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr
, NDR_BUFFERS
, &r
->lm
));
501 ndr
->flags
= _flags_save_STRUCT
;
503 return NDR_ERR_SUCCESS
;
506 static enum ndr_err_code
ndr_pull_netr_NetworkInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_NetworkInfo
*r
)
509 uint32_t _flags_save_STRUCT
= ndr
->flags
;
510 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
511 if (ndr_flags
& NDR_SCALARS
) {
512 NDR_CHECK(ndr_pull_align(ndr
, 4));
513 NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr
, NDR_SCALARS
, &r
->identity_info
));
514 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->challenge
, 8));
515 NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr
, NDR_SCALARS
, &r
->nt
));
516 NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr
, NDR_SCALARS
, &r
->lm
));
518 if (ndr_flags
& NDR_BUFFERS
) {
519 NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr
, NDR_BUFFERS
, &r
->identity_info
));
520 NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr
, NDR_BUFFERS
, &r
->nt
));
521 NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr
, NDR_BUFFERS
, &r
->lm
));
523 ndr
->flags
= _flags_save_STRUCT
;
525 return NDR_ERR_SUCCESS
;
528 _PUBLIC_
void ndr_print_netr_NetworkInfo(struct ndr_print
*ndr
, const char *name
, const struct netr_NetworkInfo
*r
)
530 ndr_print_struct(ndr
, name
, "netr_NetworkInfo");
532 uint32_t _flags_save_STRUCT
= ndr
->flags
;
533 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
535 ndr_print_netr_IdentityInfo(ndr
, "identity_info", &r
->identity_info
);
536 ndr_print_array_uint8(ndr
, "challenge", r
->challenge
, 8);
537 ndr_print_netr_ChallengeResponse(ndr
, "nt", &r
->nt
);
538 ndr_print_netr_ChallengeResponse(ndr
, "lm", &r
->lm
);
540 ndr
->flags
= _flags_save_STRUCT
;
544 _PUBLIC_
enum ndr_err_code
ndr_push_netr_LogonInfo(struct ndr_push
*ndr
, int ndr_flags
, const union netr_LogonInfo
*r
)
546 if (ndr_flags
& NDR_SCALARS
) {
547 int level
= ndr_push_get_switch_value(ndr
, r
);
548 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
551 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->password
));
555 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->network
));
559 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->password
));
563 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->password
));
567 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->network
));
571 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
574 if (ndr_flags
& NDR_BUFFERS
) {
575 int level
= ndr_push_get_switch_value(ndr
, r
);
579 NDR_CHECK(ndr_push_netr_PasswordInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
585 NDR_CHECK(ndr_push_netr_NetworkInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->network
));
591 NDR_CHECK(ndr_push_netr_PasswordInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
597 NDR_CHECK(ndr_push_netr_PasswordInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
603 NDR_CHECK(ndr_push_netr_NetworkInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->network
));
608 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
611 return NDR_ERR_SUCCESS
;
614 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_LogonInfo(struct ndr_pull
*ndr
, int ndr_flags
, union netr_LogonInfo
*r
)
618 TALLOC_CTX
*_mem_save_password_0
;
619 TALLOC_CTX
*_mem_save_network_0
;
620 level
= ndr_pull_get_switch_value(ndr
, r
);
621 if (ndr_flags
& NDR_SCALARS
) {
622 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
623 if (_level
!= level
) {
624 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
628 uint32_t _ptr_password
;
629 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
631 NDR_PULL_ALLOC(ndr
, r
->password
);
638 uint32_t _ptr_network
;
639 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_network
));
641 NDR_PULL_ALLOC(ndr
, r
->network
);
648 uint32_t _ptr_password
;
649 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
651 NDR_PULL_ALLOC(ndr
, r
->password
);
658 uint32_t _ptr_password
;
659 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
661 NDR_PULL_ALLOC(ndr
, r
->password
);
668 uint32_t _ptr_network
;
669 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_network
));
671 NDR_PULL_ALLOC(ndr
, r
->network
);
678 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
681 if (ndr_flags
& NDR_BUFFERS
) {
685 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
686 NDR_PULL_SET_MEM_CTX(ndr
, r
->password
, 0);
687 NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
688 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
694 _mem_save_network_0
= NDR_PULL_GET_MEM_CTX(ndr
);
695 NDR_PULL_SET_MEM_CTX(ndr
, r
->network
, 0);
696 NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->network
));
697 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_network_0
, 0);
703 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
704 NDR_PULL_SET_MEM_CTX(ndr
, r
->password
, 0);
705 NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
706 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
712 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
713 NDR_PULL_SET_MEM_CTX(ndr
, r
->password
, 0);
714 NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
715 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
721 _mem_save_network_0
= NDR_PULL_GET_MEM_CTX(ndr
);
722 NDR_PULL_SET_MEM_CTX(ndr
, r
->network
, 0);
723 NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->network
));
724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_network_0
, 0);
729 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
732 return NDR_ERR_SUCCESS
;
735 _PUBLIC_
void ndr_print_netr_LogonInfo(struct ndr_print
*ndr
, const char *name
, const union netr_LogonInfo
*r
)
738 level
= ndr_print_get_switch_value(ndr
, r
);
739 ndr_print_union(ndr
, name
, level
, "netr_LogonInfo");
742 ndr_print_ptr(ndr
, "password", r
->password
);
745 ndr_print_netr_PasswordInfo(ndr
, "password", r
->password
);
751 ndr_print_ptr(ndr
, "network", r
->network
);
754 ndr_print_netr_NetworkInfo(ndr
, "network", r
->network
);
760 ndr_print_ptr(ndr
, "password", r
->password
);
763 ndr_print_netr_PasswordInfo(ndr
, "password", r
->password
);
769 ndr_print_ptr(ndr
, "password", r
->password
);
772 ndr_print_netr_PasswordInfo(ndr
, "password", r
->password
);
778 ndr_print_ptr(ndr
, "network", r
->network
);
781 ndr_print_netr_NetworkInfo(ndr
, "network", r
->network
);
787 ndr_print_bad_level(ndr
, name
, level
);
791 _PUBLIC_
enum ndr_err_code
ndr_push_netr_UserSessionKey(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_UserSessionKey
*r
)
794 uint32_t _flags_save_STRUCT
= ndr
->flags
;
795 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
796 if (ndr_flags
& NDR_SCALARS
) {
797 NDR_CHECK(ndr_push_align(ndr
, 1));
798 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->key
, 16));
800 if (ndr_flags
& NDR_BUFFERS
) {
802 ndr
->flags
= _flags_save_STRUCT
;
804 return NDR_ERR_SUCCESS
;
807 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_UserSessionKey(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_UserSessionKey
*r
)
810 uint32_t _flags_save_STRUCT
= ndr
->flags
;
811 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
812 if (ndr_flags
& NDR_SCALARS
) {
813 NDR_CHECK(ndr_pull_align(ndr
, 1));
814 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->key
, 16));
816 if (ndr_flags
& NDR_BUFFERS
) {
818 ndr
->flags
= _flags_save_STRUCT
;
820 return NDR_ERR_SUCCESS
;
823 _PUBLIC_
void ndr_print_netr_UserSessionKey(struct ndr_print
*ndr
, const char *name
, const struct netr_UserSessionKey
*r
)
825 ndr_print_struct(ndr
, name
, "netr_UserSessionKey");
827 uint32_t _flags_save_STRUCT
= ndr
->flags
;
828 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
830 ndr_print_array_uint8(ndr
, "key", r
->key
, 16);
832 ndr
->flags
= _flags_save_STRUCT
;
836 _PUBLIC_
enum ndr_err_code
ndr_push_netr_LMSessionKey(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_LMSessionKey
*r
)
839 uint32_t _flags_save_STRUCT
= ndr
->flags
;
840 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
841 if (ndr_flags
& NDR_SCALARS
) {
842 NDR_CHECK(ndr_push_align(ndr
, 1));
843 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->key
, 8));
845 if (ndr_flags
& NDR_BUFFERS
) {
847 ndr
->flags
= _flags_save_STRUCT
;
849 return NDR_ERR_SUCCESS
;
852 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_LMSessionKey(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_LMSessionKey
*r
)
855 uint32_t _flags_save_STRUCT
= ndr
->flags
;
856 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
857 if (ndr_flags
& NDR_SCALARS
) {
858 NDR_CHECK(ndr_pull_align(ndr
, 1));
859 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->key
, 8));
861 if (ndr_flags
& NDR_BUFFERS
) {
863 ndr
->flags
= _flags_save_STRUCT
;
865 return NDR_ERR_SUCCESS
;
868 _PUBLIC_
void ndr_print_netr_LMSessionKey(struct ndr_print
*ndr
, const char *name
, const struct netr_LMSessionKey
*r
)
870 ndr_print_struct(ndr
, name
, "netr_LMSessionKey");
872 uint32_t _flags_save_STRUCT
= ndr
->flags
;
873 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
875 ndr_print_array_uint8(ndr
, "key", r
->key
, 8);
877 ndr
->flags
= _flags_save_STRUCT
;
881 _PUBLIC_
enum ndr_err_code
ndr_push_netr_UserFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
883 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
884 return NDR_ERR_SUCCESS
;
887 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_UserFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
890 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
892 return NDR_ERR_SUCCESS
;
895 _PUBLIC_
void ndr_print_netr_UserFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
897 ndr_print_uint32(ndr
, name
, r
);
899 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_GUEST", NETLOGON_GUEST
, r
);
900 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NOENCRYPTION", NETLOGON_NOENCRYPTION
, r
);
901 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_CACHED_ACCOUNT", NETLOGON_CACHED_ACCOUNT
, r
);
902 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_USED_LM_PASSWORD", NETLOGON_USED_LM_PASSWORD
, r
);
903 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_EXTRA_SIDS", NETLOGON_EXTRA_SIDS
, r
);
904 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_SUBAUTH_SESSION_KEY", NETLOGON_SUBAUTH_SESSION_KEY
, r
);
905 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_SERVER_TRUST_ACCOUNT", NETLOGON_SERVER_TRUST_ACCOUNT
, r
);
906 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NTLMV2_ENABLED", NETLOGON_NTLMV2_ENABLED
, r
);
907 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_RESOURCE_GROUPS", NETLOGON_RESOURCE_GROUPS
, r
);
908 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_PROFILE_PATH_RETURNED", NETLOGON_PROFILE_PATH_RETURNED
, r
);
909 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_GRACE_LOGON", NETLOGON_GRACE_LOGON
, r
);
913 static enum ndr_err_code
ndr_push_netr_SamBaseInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_SamBaseInfo
*r
)
915 uint32_t cntr_unknown_0
;
916 if (ndr_flags
& NDR_SCALARS
) {
917 NDR_CHECK(ndr_push_align(ndr
, 4));
918 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logon
));
919 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logoff
));
920 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->acct_expiry
));
921 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_password_change
));
922 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->allow_password_change
));
923 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->force_password_change
));
924 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
925 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
926 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
927 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
928 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
929 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
930 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logon_count
));
931 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->bad_password_count
));
932 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
933 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
934 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr
, NDR_SCALARS
, &r
->groups
));
935 NDR_CHECK(ndr_push_netr_UserFlags(ndr
, NDR_SCALARS
, r
->user_flags
));
936 NDR_CHECK(ndr_push_netr_UserSessionKey(ndr
, NDR_SCALARS
, &r
->key
));
937 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->logon_server
));
938 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain
));
939 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_sid
));
940 NDR_CHECK(ndr_push_netr_LMSessionKey(ndr
, NDR_SCALARS
, &r
->LMSessKey
));
941 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
942 for (cntr_unknown_0
= 0; cntr_unknown_0
< 7; cntr_unknown_0
++) {
943 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
[cntr_unknown_0
]));
946 if (ndr_flags
& NDR_BUFFERS
) {
947 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
948 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
949 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
950 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
951 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
952 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
953 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr
, NDR_BUFFERS
, &r
->groups
));
954 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->logon_server
));
955 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain
));
957 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
960 return NDR_ERR_SUCCESS
;
963 static enum ndr_err_code
ndr_pull_netr_SamBaseInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_SamBaseInfo
*r
)
965 uint32_t _ptr_domain_sid
;
966 TALLOC_CTX
*_mem_save_domain_sid_0
;
967 uint32_t cntr_unknown_0
;
968 if (ndr_flags
& NDR_SCALARS
) {
969 NDR_CHECK(ndr_pull_align(ndr
, 4));
970 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logon
));
971 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logoff
));
972 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->acct_expiry
));
973 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_password_change
));
974 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->allow_password_change
));
975 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->force_password_change
));
976 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
977 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
978 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
979 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
980 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
981 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
982 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logon_count
));
983 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->bad_password_count
));
984 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
985 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
986 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr
, NDR_SCALARS
, &r
->groups
));
987 NDR_CHECK(ndr_pull_netr_UserFlags(ndr
, NDR_SCALARS
, &r
->user_flags
));
988 NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr
, NDR_SCALARS
, &r
->key
));
989 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->logon_server
));
990 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain
));
991 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_sid
));
992 if (_ptr_domain_sid
) {
993 NDR_PULL_ALLOC(ndr
, r
->domain_sid
);
995 r
->domain_sid
= NULL
;
997 NDR_CHECK(ndr_pull_netr_LMSessionKey(ndr
, NDR_SCALARS
, &r
->LMSessKey
));
998 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
999 for (cntr_unknown_0
= 0; cntr_unknown_0
< 7; cntr_unknown_0
++) {
1000 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
[cntr_unknown_0
]));
1003 if (ndr_flags
& NDR_BUFFERS
) {
1004 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
1005 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
1006 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
1007 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
1008 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
1009 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
1010 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr
, NDR_BUFFERS
, &r
->groups
));
1011 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->logon_server
));
1012 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain
));
1013 if (r
->domain_sid
) {
1014 _mem_save_domain_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1015 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_sid
, 0);
1016 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
1017 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_sid_0
, 0);
1020 return NDR_ERR_SUCCESS
;
1023 _PUBLIC_
void ndr_print_netr_SamBaseInfo(struct ndr_print
*ndr
, const char *name
, const struct netr_SamBaseInfo
*r
)
1025 uint32_t cntr_unknown_0
;
1026 ndr_print_struct(ndr
, name
, "netr_SamBaseInfo");
1028 ndr_print_NTTIME(ndr
, "last_logon", r
->last_logon
);
1029 ndr_print_NTTIME(ndr
, "last_logoff", r
->last_logoff
);
1030 ndr_print_NTTIME(ndr
, "acct_expiry", r
->acct_expiry
);
1031 ndr_print_NTTIME(ndr
, "last_password_change", r
->last_password_change
);
1032 ndr_print_NTTIME(ndr
, "allow_password_change", r
->allow_password_change
);
1033 ndr_print_NTTIME(ndr
, "force_password_change", r
->force_password_change
);
1034 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
1035 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
1036 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
1037 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
1038 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
1039 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
1040 ndr_print_uint16(ndr
, "logon_count", r
->logon_count
);
1041 ndr_print_uint16(ndr
, "bad_password_count", r
->bad_password_count
);
1042 ndr_print_uint32(ndr
, "rid", r
->rid
);
1043 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
1044 ndr_print_samr_RidWithAttributeArray(ndr
, "groups", &r
->groups
);
1045 ndr_print_netr_UserFlags(ndr
, "user_flags", r
->user_flags
);
1046 ndr_print_netr_UserSessionKey(ndr
, "key", &r
->key
);
1047 ndr_print_lsa_StringLarge(ndr
, "logon_server", &r
->logon_server
);
1048 ndr_print_lsa_StringLarge(ndr
, "domain", &r
->domain
);
1049 ndr_print_ptr(ndr
, "domain_sid", r
->domain_sid
);
1051 if (r
->domain_sid
) {
1052 ndr_print_dom_sid2(ndr
, "domain_sid", r
->domain_sid
);
1055 ndr_print_netr_LMSessionKey(ndr
, "LMSessKey", &r
->LMSessKey
);
1056 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
1057 ndr
->print(ndr
, "%s: ARRAY(%d)", "unknown", 7);
1059 for (cntr_unknown_0
=0;cntr_unknown_0
<7;cntr_unknown_0
++) {
1061 if (asprintf(&idx_0
, "[%d]", cntr_unknown_0
) != -1) {
1062 ndr_print_uint32(ndr
, "unknown", r
->unknown
[cntr_unknown_0
]);
1070 static enum ndr_err_code
ndr_push_netr_SamInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_SamInfo2
*r
)
1072 if (ndr_flags
& NDR_SCALARS
) {
1073 NDR_CHECK(ndr_push_align(ndr
, 4));
1074 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr
, NDR_SCALARS
, &r
->base
));
1076 if (ndr_flags
& NDR_BUFFERS
) {
1077 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr
, NDR_BUFFERS
, &r
->base
));
1079 return NDR_ERR_SUCCESS
;
1082 static enum ndr_err_code
ndr_pull_netr_SamInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_SamInfo2
*r
)
1084 if (ndr_flags
& NDR_SCALARS
) {
1085 NDR_CHECK(ndr_pull_align(ndr
, 4));
1086 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr
, NDR_SCALARS
, &r
->base
));
1088 if (ndr_flags
& NDR_BUFFERS
) {
1089 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr
, NDR_BUFFERS
, &r
->base
));
1091 return NDR_ERR_SUCCESS
;
1094 _PUBLIC_
void ndr_print_netr_SamInfo2(struct ndr_print
*ndr
, const char *name
, const struct netr_SamInfo2
*r
)
1096 ndr_print_struct(ndr
, name
, "netr_SamInfo2");
1098 ndr_print_netr_SamBaseInfo(ndr
, "base", &r
->base
);
1102 static enum ndr_err_code
ndr_push_netr_SidAttr(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_SidAttr
*r
)
1104 if (ndr_flags
& NDR_SCALARS
) {
1105 NDR_CHECK(ndr_push_align(ndr
, 4));
1106 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1107 NDR_CHECK(ndr_push_samr_GroupAttrs(ndr
, NDR_SCALARS
, r
->attributes
));
1109 if (ndr_flags
& NDR_BUFFERS
) {
1111 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1114 return NDR_ERR_SUCCESS
;
1117 static enum ndr_err_code
ndr_pull_netr_SidAttr(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_SidAttr
*r
)
1120 TALLOC_CTX
*_mem_save_sid_0
;
1121 if (ndr_flags
& NDR_SCALARS
) {
1122 NDR_CHECK(ndr_pull_align(ndr
, 4));
1123 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1125 NDR_PULL_ALLOC(ndr
, r
->sid
);
1129 NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr
, NDR_SCALARS
, &r
->attributes
));
1131 if (ndr_flags
& NDR_BUFFERS
) {
1133 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1134 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1135 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1136 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1139 return NDR_ERR_SUCCESS
;
1142 _PUBLIC_
void ndr_print_netr_SidAttr(struct ndr_print
*ndr
, const char *name
, const struct netr_SidAttr
*r
)
1144 ndr_print_struct(ndr
, name
, "netr_SidAttr");
1146 ndr_print_ptr(ndr
, "sid", r
->sid
);
1149 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1152 ndr_print_samr_GroupAttrs(ndr
, "attributes", r
->attributes
);
1156 _PUBLIC_
enum ndr_err_code
ndr_push_netr_SamInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_SamInfo3
*r
)
1158 uint32_t cntr_sids_1
;
1159 if (ndr_flags
& NDR_SCALARS
) {
1160 NDR_CHECK(ndr_push_align(ndr
, 4));
1161 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr
, NDR_SCALARS
, &r
->base
));
1162 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sidcount
));
1163 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
1165 if (ndr_flags
& NDR_BUFFERS
) {
1166 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr
, NDR_BUFFERS
, &r
->base
));
1168 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sidcount
));
1169 for (cntr_sids_1
= 0; cntr_sids_1
< r
->sidcount
; cntr_sids_1
++) {
1170 NDR_CHECK(ndr_push_netr_SidAttr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1172 for (cntr_sids_1
= 0; cntr_sids_1
< r
->sidcount
; cntr_sids_1
++) {
1173 NDR_CHECK(ndr_push_netr_SidAttr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1177 return NDR_ERR_SUCCESS
;
1180 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_SamInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_SamInfo3
*r
)
1183 uint32_t cntr_sids_1
;
1184 TALLOC_CTX
*_mem_save_sids_0
;
1185 TALLOC_CTX
*_mem_save_sids_1
;
1186 if (ndr_flags
& NDR_SCALARS
) {
1187 NDR_CHECK(ndr_pull_align(ndr
, 4));
1188 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr
, NDR_SCALARS
, &r
->base
));
1189 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sidcount
));
1190 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
1192 NDR_PULL_ALLOC(ndr
, r
->sids
);
1197 if (ndr_flags
& NDR_BUFFERS
) {
1198 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr
, NDR_BUFFERS
, &r
->base
));
1200 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1201 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1202 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
1203 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
1204 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1205 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1206 for (cntr_sids_1
= 0; cntr_sids_1
< r
->sidcount
; cntr_sids_1
++) {
1207 NDR_CHECK(ndr_pull_netr_SidAttr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1209 for (cntr_sids_1
= 0; cntr_sids_1
< r
->sidcount
; cntr_sids_1
++) {
1210 NDR_CHECK(ndr_pull_netr_SidAttr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1212 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
1213 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
1216 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->sidcount
));
1219 return NDR_ERR_SUCCESS
;
1222 _PUBLIC_
void ndr_print_netr_SamInfo3(struct ndr_print
*ndr
, const char *name
, const struct netr_SamInfo3
*r
)
1224 uint32_t cntr_sids_1
;
1225 ndr_print_struct(ndr
, name
, "netr_SamInfo3");
1227 ndr_print_netr_SamBaseInfo(ndr
, "base", &r
->base
);
1228 ndr_print_uint32(ndr
, "sidcount", r
->sidcount
);
1229 ndr_print_ptr(ndr
, "sids", r
->sids
);
1232 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", r
->sidcount
);
1234 for (cntr_sids_1
=0;cntr_sids_1
<r
->sidcount
;cntr_sids_1
++) {
1236 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
1237 ndr_print_netr_SidAttr(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
1247 static enum ndr_err_code
ndr_push_netr_SamInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_SamInfo6
*r
)
1249 uint32_t cntr_sids_1
;
1250 uint32_t cntr_unknown4_0
;
1251 if (ndr_flags
& NDR_SCALARS
) {
1252 NDR_CHECK(ndr_push_align(ndr
, 4));
1253 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr
, NDR_SCALARS
, &r
->base
));
1254 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sidcount
));
1255 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
1256 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->forest
));
1257 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->principle
));
1258 for (cntr_unknown4_0
= 0; cntr_unknown4_0
< 20; cntr_unknown4_0
++) {
1259 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown4
[cntr_unknown4_0
]));
1262 if (ndr_flags
& NDR_BUFFERS
) {
1263 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr
, NDR_BUFFERS
, &r
->base
));
1265 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sidcount
));
1266 for (cntr_sids_1
= 0; cntr_sids_1
< r
->sidcount
; cntr_sids_1
++) {
1267 NDR_CHECK(ndr_push_netr_SidAttr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1269 for (cntr_sids_1
= 0; cntr_sids_1
< r
->sidcount
; cntr_sids_1
++) {
1270 NDR_CHECK(ndr_push_netr_SidAttr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1273 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->forest
));
1274 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->principle
));
1276 return NDR_ERR_SUCCESS
;
1279 static enum ndr_err_code
ndr_pull_netr_SamInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_SamInfo6
*r
)
1282 uint32_t cntr_sids_1
;
1283 TALLOC_CTX
*_mem_save_sids_0
;
1284 TALLOC_CTX
*_mem_save_sids_1
;
1285 uint32_t cntr_unknown4_0
;
1286 if (ndr_flags
& NDR_SCALARS
) {
1287 NDR_CHECK(ndr_pull_align(ndr
, 4));
1288 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr
, NDR_SCALARS
, &r
->base
));
1289 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sidcount
));
1290 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
1292 NDR_PULL_ALLOC(ndr
, r
->sids
);
1296 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->forest
));
1297 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->principle
));
1298 for (cntr_unknown4_0
= 0; cntr_unknown4_0
< 20; cntr_unknown4_0
++) {
1299 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown4
[cntr_unknown4_0
]));
1302 if (ndr_flags
& NDR_BUFFERS
) {
1303 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr
, NDR_BUFFERS
, &r
->base
));
1305 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1306 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1307 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
1308 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
1309 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1310 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1311 for (cntr_sids_1
= 0; cntr_sids_1
< r
->sidcount
; cntr_sids_1
++) {
1312 NDR_CHECK(ndr_pull_netr_SidAttr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1314 for (cntr_sids_1
= 0; cntr_sids_1
< r
->sidcount
; cntr_sids_1
++) {
1315 NDR_CHECK(ndr_pull_netr_SidAttr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1317 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
1318 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
1320 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->forest
));
1321 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->principle
));
1323 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->sidcount
));
1326 return NDR_ERR_SUCCESS
;
1329 _PUBLIC_
void ndr_print_netr_SamInfo6(struct ndr_print
*ndr
, const char *name
, const struct netr_SamInfo6
*r
)
1331 uint32_t cntr_sids_1
;
1332 uint32_t cntr_unknown4_0
;
1333 ndr_print_struct(ndr
, name
, "netr_SamInfo6");
1335 ndr_print_netr_SamBaseInfo(ndr
, "base", &r
->base
);
1336 ndr_print_uint32(ndr
, "sidcount", r
->sidcount
);
1337 ndr_print_ptr(ndr
, "sids", r
->sids
);
1340 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", r
->sidcount
);
1342 for (cntr_sids_1
=0;cntr_sids_1
<r
->sidcount
;cntr_sids_1
++) {
1344 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
1345 ndr_print_netr_SidAttr(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
1352 ndr_print_lsa_String(ndr
, "forest", &r
->forest
);
1353 ndr_print_lsa_String(ndr
, "principle", &r
->principle
);
1354 ndr
->print(ndr
, "%s: ARRAY(%d)", "unknown4", 20);
1356 for (cntr_unknown4_0
=0;cntr_unknown4_0
<20;cntr_unknown4_0
++) {
1358 if (asprintf(&idx_0
, "[%d]", cntr_unknown4_0
) != -1) {
1359 ndr_print_uint32(ndr
, "unknown4", r
->unknown4
[cntr_unknown4_0
]);
1367 static enum ndr_err_code
ndr_push_netr_PacInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_PacInfo
*r
)
1369 uint32_t cntr_expansionroom_0
;
1370 if (ndr_flags
& NDR_SCALARS
) {
1371 NDR_CHECK(ndr_push_align(ndr
, 4));
1372 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pac_size
));
1373 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->pac
));
1374 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_domain
));
1375 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_server
));
1376 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->principal_name
));
1377 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->auth_size
));
1378 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->auth
));
1379 NDR_CHECK(ndr_push_netr_UserSessionKey(ndr
, NDR_SCALARS
, &r
->user_session_key
));
1380 for (cntr_expansionroom_0
= 0; cntr_expansionroom_0
< 10; cntr_expansionroom_0
++) {
1381 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->expansionroom
[cntr_expansionroom_0
]));
1383 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
1384 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
1385 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
1386 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
1388 if (ndr_flags
& NDR_BUFFERS
) {
1390 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pac_size
));
1391 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->pac
, r
->pac_size
));
1393 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_domain
));
1394 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_server
));
1395 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->principal_name
));
1397 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->auth_size
));
1398 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->auth
, r
->auth_size
));
1400 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
1401 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
1402 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
1403 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
1405 return NDR_ERR_SUCCESS
;
1408 static enum ndr_err_code
ndr_pull_netr_PacInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_PacInfo
*r
)
1411 TALLOC_CTX
*_mem_save_pac_0
;
1413 TALLOC_CTX
*_mem_save_auth_0
;
1414 uint32_t cntr_expansionroom_0
;
1415 if (ndr_flags
& NDR_SCALARS
) {
1416 NDR_CHECK(ndr_pull_align(ndr
, 4));
1417 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pac_size
));
1418 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_pac
));
1420 NDR_PULL_ALLOC(ndr
, r
->pac
);
1424 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_domain
));
1425 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_server
));
1426 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->principal_name
));
1427 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->auth_size
));
1428 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_auth
));
1430 NDR_PULL_ALLOC(ndr
, r
->auth
);
1434 NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr
, NDR_SCALARS
, &r
->user_session_key
));
1435 for (cntr_expansionroom_0
= 0; cntr_expansionroom_0
< 10; cntr_expansionroom_0
++) {
1436 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->expansionroom
[cntr_expansionroom_0
]));
1438 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
1439 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
1440 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
1441 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
1443 if (ndr_flags
& NDR_BUFFERS
) {
1445 _mem_save_pac_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1446 NDR_PULL_SET_MEM_CTX(ndr
, r
->pac
, 0);
1447 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->pac
));
1448 NDR_PULL_ALLOC_N(ndr
, r
->pac
, ndr_get_array_size(ndr
, &r
->pac
));
1449 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->pac
, ndr_get_array_size(ndr
, &r
->pac
)));
1450 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_pac_0
, 0);
1452 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_domain
));
1453 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_server
));
1454 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->principal_name
));
1456 _mem_save_auth_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1457 NDR_PULL_SET_MEM_CTX(ndr
, r
->auth
, 0);
1458 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->auth
));
1459 NDR_PULL_ALLOC_N(ndr
, r
->auth
, ndr_get_array_size(ndr
, &r
->auth
));
1460 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->auth
, ndr_get_array_size(ndr
, &r
->auth
)));
1461 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_auth_0
, 0);
1463 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
1464 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
1465 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
1466 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
1468 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->pac
, r
->pac_size
));
1471 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->auth
, r
->auth_size
));
1474 return NDR_ERR_SUCCESS
;
1477 _PUBLIC_
void ndr_print_netr_PacInfo(struct ndr_print
*ndr
, const char *name
, const struct netr_PacInfo
*r
)
1479 uint32_t cntr_expansionroom_0
;
1480 ndr_print_struct(ndr
, name
, "netr_PacInfo");
1482 ndr_print_uint32(ndr
, "pac_size", r
->pac_size
);
1483 ndr_print_ptr(ndr
, "pac", r
->pac
);
1486 ndr_print_array_uint8(ndr
, "pac", r
->pac
, r
->pac_size
);
1489 ndr_print_lsa_String(ndr
, "logon_domain", &r
->logon_domain
);
1490 ndr_print_lsa_String(ndr
, "logon_server", &r
->logon_server
);
1491 ndr_print_lsa_String(ndr
, "principal_name", &r
->principal_name
);
1492 ndr_print_uint32(ndr
, "auth_size", r
->auth_size
);
1493 ndr_print_ptr(ndr
, "auth", r
->auth
);
1496 ndr_print_array_uint8(ndr
, "auth", r
->auth
, r
->auth_size
);
1499 ndr_print_netr_UserSessionKey(ndr
, "user_session_key", &r
->user_session_key
);
1500 ndr
->print(ndr
, "%s: ARRAY(%d)", "expansionroom", 10);
1502 for (cntr_expansionroom_0
=0;cntr_expansionroom_0
<10;cntr_expansionroom_0
++) {
1504 if (asprintf(&idx_0
, "[%d]", cntr_expansionroom_0
) != -1) {
1505 ndr_print_uint32(ndr
, "expansionroom", r
->expansionroom
[cntr_expansionroom_0
]);
1510 ndr_print_lsa_String(ndr
, "unknown1", &r
->unknown1
);
1511 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
1512 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
1513 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
1517 _PUBLIC_
enum ndr_err_code
ndr_push_netr_Validation(struct ndr_push
*ndr
, int ndr_flags
, const union netr_Validation
*r
)
1519 if (ndr_flags
& NDR_SCALARS
) {
1520 int level
= ndr_push_get_switch_value(ndr
, r
);
1521 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
1524 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sam2
));
1528 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sam3
));
1532 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->pac
));
1536 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->pac
));
1540 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sam6
));
1544 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1547 if (ndr_flags
& NDR_BUFFERS
) {
1548 int level
= ndr_push_get_switch_value(ndr
, r
);
1552 NDR_CHECK(ndr_push_netr_SamInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sam2
));
1558 NDR_CHECK(ndr_push_netr_SamInfo3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sam3
));
1564 NDR_CHECK(ndr_push_netr_PacInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->pac
));
1570 NDR_CHECK(ndr_push_netr_PacInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->pac
));
1576 NDR_CHECK(ndr_push_netr_SamInfo6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sam6
));
1581 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1584 return NDR_ERR_SUCCESS
;
1587 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_Validation(struct ndr_pull
*ndr
, int ndr_flags
, union netr_Validation
*r
)
1591 TALLOC_CTX
*_mem_save_sam2_0
;
1592 TALLOC_CTX
*_mem_save_sam3_0
;
1593 TALLOC_CTX
*_mem_save_pac_0
;
1594 TALLOC_CTX
*_mem_save_sam6_0
;
1595 level
= ndr_pull_get_switch_value(ndr
, r
);
1596 if (ndr_flags
& NDR_SCALARS
) {
1597 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
1598 if (_level
!= level
) {
1599 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
1604 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam2
));
1606 NDR_PULL_ALLOC(ndr
, r
->sam2
);
1614 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam3
));
1616 NDR_PULL_ALLOC(ndr
, r
->sam3
);
1624 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_pac
));
1626 NDR_PULL_ALLOC(ndr
, r
->pac
);
1634 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_pac
));
1636 NDR_PULL_ALLOC(ndr
, r
->pac
);
1644 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sam6
));
1646 NDR_PULL_ALLOC(ndr
, r
->sam6
);
1653 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1656 if (ndr_flags
& NDR_BUFFERS
) {
1660 _mem_save_sam2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1661 NDR_PULL_SET_MEM_CTX(ndr
, r
->sam2
, 0);
1662 NDR_CHECK(ndr_pull_netr_SamInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sam2
));
1663 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam2_0
, 0);
1669 _mem_save_sam3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1670 NDR_PULL_SET_MEM_CTX(ndr
, r
->sam3
, 0);
1671 NDR_CHECK(ndr_pull_netr_SamInfo3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sam3
));
1672 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam3_0
, 0);
1678 _mem_save_pac_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1679 NDR_PULL_SET_MEM_CTX(ndr
, r
->pac
, 0);
1680 NDR_CHECK(ndr_pull_netr_PacInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->pac
));
1681 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_pac_0
, 0);
1687 _mem_save_pac_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1688 NDR_PULL_SET_MEM_CTX(ndr
, r
->pac
, 0);
1689 NDR_CHECK(ndr_pull_netr_PacInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->pac
));
1690 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_pac_0
, 0);
1696 _mem_save_sam6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1697 NDR_PULL_SET_MEM_CTX(ndr
, r
->sam6
, 0);
1698 NDR_CHECK(ndr_pull_netr_SamInfo6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sam6
));
1699 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sam6_0
, 0);
1704 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1707 return NDR_ERR_SUCCESS
;
1710 _PUBLIC_
void ndr_print_netr_Validation(struct ndr_print
*ndr
, const char *name
, const union netr_Validation
*r
)
1713 level
= ndr_print_get_switch_value(ndr
, r
);
1714 ndr_print_union(ndr
, name
, level
, "netr_Validation");
1717 ndr_print_ptr(ndr
, "sam2", r
->sam2
);
1720 ndr_print_netr_SamInfo2(ndr
, "sam2", r
->sam2
);
1726 ndr_print_ptr(ndr
, "sam3", r
->sam3
);
1729 ndr_print_netr_SamInfo3(ndr
, "sam3", r
->sam3
);
1735 ndr_print_ptr(ndr
, "pac", r
->pac
);
1738 ndr_print_netr_PacInfo(ndr
, "pac", r
->pac
);
1744 ndr_print_ptr(ndr
, "pac", r
->pac
);
1747 ndr_print_netr_PacInfo(ndr
, "pac", r
->pac
);
1753 ndr_print_ptr(ndr
, "sam6", r
->sam6
);
1756 ndr_print_netr_SamInfo6(ndr
, "sam6", r
->sam6
);
1762 ndr_print_bad_level(ndr
, name
, level
);
1766 _PUBLIC_
enum ndr_err_code
ndr_push_netr_Credential(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_Credential
*r
)
1769 uint32_t _flags_save_STRUCT
= ndr
->flags
;
1770 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1771 if (ndr_flags
& NDR_SCALARS
) {
1772 NDR_CHECK(ndr_push_align(ndr
, 1));
1773 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 8));
1775 if (ndr_flags
& NDR_BUFFERS
) {
1777 ndr
->flags
= _flags_save_STRUCT
;
1779 return NDR_ERR_SUCCESS
;
1782 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_Credential(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_Credential
*r
)
1785 uint32_t _flags_save_STRUCT
= ndr
->flags
;
1786 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1787 if (ndr_flags
& NDR_SCALARS
) {
1788 NDR_CHECK(ndr_pull_align(ndr
, 1));
1789 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 8));
1791 if (ndr_flags
& NDR_BUFFERS
) {
1793 ndr
->flags
= _flags_save_STRUCT
;
1795 return NDR_ERR_SUCCESS
;
1798 _PUBLIC_
void ndr_print_netr_Credential(struct ndr_print
*ndr
, const char *name
, const struct netr_Credential
*r
)
1800 ndr_print_struct(ndr
, name
, "netr_Credential");
1802 uint32_t _flags_save_STRUCT
= ndr
->flags
;
1803 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
1805 ndr_print_array_uint8(ndr
, "data", r
->data
, 8);
1807 ndr
->flags
= _flags_save_STRUCT
;
1811 _PUBLIC_
enum ndr_err_code
ndr_push_netr_Authenticator(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_Authenticator
*r
)
1813 if (ndr_flags
& NDR_SCALARS
) {
1814 NDR_CHECK(ndr_push_align(ndr
, 4));
1815 NDR_CHECK(ndr_push_netr_Credential(ndr
, NDR_SCALARS
, &r
->cred
));
1816 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->timestamp
));
1818 if (ndr_flags
& NDR_BUFFERS
) {
1820 return NDR_ERR_SUCCESS
;
1823 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_Authenticator(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_Authenticator
*r
)
1825 if (ndr_flags
& NDR_SCALARS
) {
1826 NDR_CHECK(ndr_pull_align(ndr
, 4));
1827 NDR_CHECK(ndr_pull_netr_Credential(ndr
, NDR_SCALARS
, &r
->cred
));
1828 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->timestamp
));
1830 if (ndr_flags
& NDR_BUFFERS
) {
1832 return NDR_ERR_SUCCESS
;
1835 _PUBLIC_
void ndr_print_netr_Authenticator(struct ndr_print
*ndr
, const char *name
, const struct netr_Authenticator
*r
)
1837 ndr_print_struct(ndr
, name
, "netr_Authenticator");
1839 ndr_print_netr_Credential(ndr
, "cred", &r
->cred
);
1840 ndr_print_time_t(ndr
, "timestamp", r
->timestamp
);
1844 static enum ndr_err_code
ndr_push_netr_LogonLevel(struct ndr_push
*ndr
, int ndr_flags
, enum netr_LogonLevel r
)
1846 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1847 return NDR_ERR_SUCCESS
;
1850 static enum ndr_err_code
ndr_pull_netr_LogonLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum netr_LogonLevel
*r
)
1853 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1855 return NDR_ERR_SUCCESS
;
1858 _PUBLIC_
void ndr_print_netr_LogonLevel(struct ndr_print
*ndr
, const char *name
, enum netr_LogonLevel r
)
1860 const char *val
= NULL
;
1863 case INTERACTIVE_LOGON_TYPE
: val
= "INTERACTIVE_LOGON_TYPE"; break;
1864 case NET_LOGON_TYPE
: val
= "NET_LOGON_TYPE"; break;
1866 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1869 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
)
1871 if (ndr_flags
& NDR_SCALARS
) {
1872 NDR_CHECK(ndr_push_align(ndr
, 4));
1873 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->account_name
));
1874 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
1875 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
1876 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
1877 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
1878 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
1879 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
1880 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
1881 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
1883 if (ndr_flags
& NDR_BUFFERS
) {
1884 if (r
->account_name
) {
1885 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->account_name
, CH_UTF16
)));
1886 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1887 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->account_name
, CH_UTF16
)));
1888 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->account_name
, ndr_charset_length(r
->account_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1890 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
1891 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
1892 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
1893 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
1895 return NDR_ERR_SUCCESS
;
1898 static enum ndr_err_code
ndr_pull_netr_DELTA_DELETE_USER(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_DELETE_USER
*r
)
1900 uint32_t _ptr_account_name
;
1901 TALLOC_CTX
*_mem_save_account_name_0
;
1902 if (ndr_flags
& NDR_SCALARS
) {
1903 NDR_CHECK(ndr_pull_align(ndr
, 4));
1904 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
1905 if (_ptr_account_name
) {
1906 NDR_PULL_ALLOC(ndr
, r
->account_name
);
1908 r
->account_name
= NULL
;
1910 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
1911 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
1912 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
1913 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
1914 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
1915 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
1916 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
1917 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
1919 if (ndr_flags
& NDR_BUFFERS
) {
1920 if (r
->account_name
) {
1921 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1922 NDR_PULL_SET_MEM_CTX(ndr
, r
->account_name
, 0);
1923 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->account_name
));
1924 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->account_name
));
1925 if (ndr_get_array_length(ndr
, &r
->account_name
) > ndr_get_array_size(ndr
, &r
->account_name
)) {
1926 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->account_name
), ndr_get_array_length(ndr
, &r
->account_name
));
1928 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->account_name
), sizeof(uint16_t)));
1929 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->account_name
, ndr_get_array_length(ndr
, &r
->account_name
), sizeof(uint16_t), CH_UTF16
));
1930 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, 0);
1932 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
1933 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
1934 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
1935 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
1937 return NDR_ERR_SUCCESS
;
1940 _PUBLIC_
void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_DELETE_USER
*r
)
1942 ndr_print_struct(ndr
, name
, "netr_DELTA_DELETE_USER");
1944 ndr_print_ptr(ndr
, "account_name", r
->account_name
);
1946 if (r
->account_name
) {
1947 ndr_print_string(ndr
, "account_name", r
->account_name
);
1950 ndr_print_lsa_String(ndr
, "unknown1", &r
->unknown1
);
1951 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
1952 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
1953 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
1954 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
1955 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
1956 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
1957 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
1961 static enum ndr_err_code
ndr_push_netr_USER_KEY16(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_USER_KEY16
*r
)
1963 if (ndr_flags
& NDR_SCALARS
) {
1964 NDR_CHECK(ndr_push_align(ndr
, 4));
1965 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->length
));
1966 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->length
));
1967 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
1968 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->pwd
));
1970 if (ndr_flags
& NDR_BUFFERS
) {
1971 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_BUFFERS
, &r
->pwd
));
1973 return NDR_ERR_SUCCESS
;
1976 static enum ndr_err_code
ndr_pull_netr_USER_KEY16(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_USER_KEY16
*r
)
1978 if (ndr_flags
& NDR_SCALARS
) {
1979 NDR_CHECK(ndr_pull_align(ndr
, 4));
1980 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
1981 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
1982 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
1983 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->pwd
));
1985 if (ndr_flags
& NDR_BUFFERS
) {
1986 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_BUFFERS
, &r
->pwd
));
1988 return NDR_ERR_SUCCESS
;
1991 _PUBLIC_
void ndr_print_netr_USER_KEY16(struct ndr_print
*ndr
, const char *name
, const struct netr_USER_KEY16
*r
)
1993 ndr_print_struct(ndr
, name
, "netr_USER_KEY16");
1995 ndr_print_uint16(ndr
, "length", r
->length
);
1996 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->length
:r
->size
);
1997 ndr_print_uint32(ndr
, "flags", r
->flags
);
1998 ndr_print_samr_Password(ndr
, "pwd", &r
->pwd
);
2002 static enum ndr_err_code
ndr_push_netr_PasswordHistory(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_PasswordHistory
*r
)
2004 if (ndr_flags
& NDR_SCALARS
) {
2005 NDR_CHECK(ndr_push_align(ndr
, 4));
2006 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->nt_length
));
2007 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->nt_length
));
2008 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->nt_flags
));
2009 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->lm_length
));
2010 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->lm_length
));
2011 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lm_flags
));
2012 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->nt_history
, r
->nt_length
));
2013 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->lm_history
, r
->lm_length
));
2015 if (ndr_flags
& NDR_BUFFERS
) {
2017 return NDR_ERR_SUCCESS
;
2020 static enum ndr_err_code
ndr_pull_netr_PasswordHistory(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_PasswordHistory
*r
)
2022 if (ndr_flags
& NDR_SCALARS
) {
2023 NDR_CHECK(ndr_pull_align(ndr
, 4));
2024 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->nt_length
));
2025 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->nt_size
));
2026 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->nt_flags
));
2027 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->lm_length
));
2028 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->lm_size
));
2029 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lm_flags
));
2030 NDR_PULL_ALLOC_N(ndr
, r
->nt_history
, r
->nt_length
);
2031 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->nt_history
, r
->nt_length
));
2032 NDR_PULL_ALLOC_N(ndr
, r
->lm_history
, r
->lm_length
);
2033 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->lm_history
, r
->lm_length
));
2035 if (ndr_flags
& NDR_BUFFERS
) {
2037 return NDR_ERR_SUCCESS
;
2040 _PUBLIC_
void ndr_print_netr_PasswordHistory(struct ndr_print
*ndr
, const char *name
, const struct netr_PasswordHistory
*r
)
2042 ndr_print_struct(ndr
, name
, "netr_PasswordHistory");
2044 ndr_print_uint16(ndr
, "nt_length", r
->nt_length
);
2045 ndr_print_uint16(ndr
, "nt_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->nt_length
:r
->nt_size
);
2046 ndr_print_uint32(ndr
, "nt_flags", r
->nt_flags
);
2047 ndr_print_uint16(ndr
, "lm_length", r
->lm_length
);
2048 ndr_print_uint16(ndr
, "lm_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->lm_length
:r
->lm_size
);
2049 ndr_print_uint32(ndr
, "lm_flags", r
->lm_flags
);
2050 ndr_print_array_uint8(ndr
, "nt_history", r
->nt_history
, r
->nt_length
);
2051 ndr_print_array_uint8(ndr
, "lm_history", r
->lm_history
, r
->lm_length
);
2055 static enum ndr_err_code
ndr_push_netr_USER_KEYS2(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_USER_KEYS2
*r
)
2057 if (ndr_flags
& NDR_SCALARS
) {
2058 NDR_CHECK(ndr_push_align(ndr
, 4));
2059 NDR_CHECK(ndr_push_netr_USER_KEY16(ndr
, NDR_SCALARS
, &r
->lmpassword
));
2060 NDR_CHECK(ndr_push_netr_USER_KEY16(ndr
, NDR_SCALARS
, &r
->ntpassword
));
2061 NDR_CHECK(ndr_push_netr_PasswordHistory(ndr
, NDR_SCALARS
, &r
->history
));
2063 if (ndr_flags
& NDR_BUFFERS
) {
2064 NDR_CHECK(ndr_push_netr_USER_KEY16(ndr
, NDR_BUFFERS
, &r
->lmpassword
));
2065 NDR_CHECK(ndr_push_netr_USER_KEY16(ndr
, NDR_BUFFERS
, &r
->ntpassword
));
2067 return NDR_ERR_SUCCESS
;
2070 static enum ndr_err_code
ndr_pull_netr_USER_KEYS2(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_USER_KEYS2
*r
)
2072 if (ndr_flags
& NDR_SCALARS
) {
2073 NDR_CHECK(ndr_pull_align(ndr
, 4));
2074 NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr
, NDR_SCALARS
, &r
->lmpassword
));
2075 NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr
, NDR_SCALARS
, &r
->ntpassword
));
2076 NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr
, NDR_SCALARS
, &r
->history
));
2078 if (ndr_flags
& NDR_BUFFERS
) {
2079 NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr
, NDR_BUFFERS
, &r
->lmpassword
));
2080 NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr
, NDR_BUFFERS
, &r
->ntpassword
));
2082 return NDR_ERR_SUCCESS
;
2085 _PUBLIC_
void ndr_print_netr_USER_KEYS2(struct ndr_print
*ndr
, const char *name
, const struct netr_USER_KEYS2
*r
)
2087 ndr_print_struct(ndr
, name
, "netr_USER_KEYS2");
2089 ndr_print_netr_USER_KEY16(ndr
, "lmpassword", &r
->lmpassword
);
2090 ndr_print_netr_USER_KEY16(ndr
, "ntpassword", &r
->ntpassword
);
2091 ndr_print_netr_PasswordHistory(ndr
, "history", &r
->history
);
2095 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
)
2097 if (ndr_flags
& NDR_SCALARS
) {
2098 NDR_CHECK(ndr_push_align(ndr
, 4));
2099 NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr
, NDR_SCALARS
, &r
->keys2
));
2101 if (ndr_flags
& NDR_BUFFERS
) {
2102 NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr
, NDR_BUFFERS
, &r
->keys2
));
2104 return NDR_ERR_SUCCESS
;
2107 static enum ndr_err_code
ndr_pull_netr_USER_KEY_UNION(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_USER_KEY_UNION
*r
)
2109 if (ndr_flags
& NDR_SCALARS
) {
2110 NDR_CHECK(ndr_pull_align(ndr
, 4));
2111 NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr
, NDR_SCALARS
, &r
->keys2
));
2113 if (ndr_flags
& NDR_BUFFERS
) {
2114 NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr
, NDR_BUFFERS
, &r
->keys2
));
2116 return NDR_ERR_SUCCESS
;
2119 _PUBLIC_
void ndr_print_netr_USER_KEY_UNION(struct ndr_print
*ndr
, const char *name
, const struct netr_USER_KEY_UNION
*r
)
2121 ndr_print_struct(ndr
, name
, "netr_USER_KEY_UNION");
2123 ndr_print_netr_USER_KEYS2(ndr
, "keys2", &r
->keys2
);
2127 _PUBLIC_
enum ndr_err_code
ndr_push_netr_USER_KEYS(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_USER_KEYS
*r
)
2129 if (ndr_flags
& NDR_SCALARS
) {
2130 NDR_CHECK(ndr_push_align(ndr
, 4));
2131 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
2132 NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr
, NDR_SCALARS
, &r
->keys
));
2134 if (ndr_flags
& NDR_BUFFERS
) {
2135 NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr
, NDR_BUFFERS
, &r
->keys
));
2137 return NDR_ERR_SUCCESS
;
2140 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_USER_KEYS(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_USER_KEYS
*r
)
2142 if (ndr_flags
& NDR_SCALARS
) {
2143 NDR_CHECK(ndr_pull_align(ndr
, 4));
2144 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
2145 NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr
, NDR_SCALARS
, &r
->keys
));
2147 if (ndr_flags
& NDR_BUFFERS
) {
2148 NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr
, NDR_BUFFERS
, &r
->keys
));
2150 return NDR_ERR_SUCCESS
;
2153 _PUBLIC_
void ndr_print_netr_USER_KEYS(struct ndr_print
*ndr
, const char *name
, const struct netr_USER_KEYS
*r
)
2155 ndr_print_struct(ndr
, name
, "netr_USER_KEYS");
2157 ndr_print_uint32(ndr
, "version", r
->version
);
2158 ndr_print_netr_USER_KEY_UNION(ndr
, "keys", &r
->keys
);
2162 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
)
2164 if (ndr_flags
& NDR_SCALARS
) {
2165 NDR_CHECK(ndr_push_align(ndr
, 4));
2166 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->SensitiveDataFlag
));
2167 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->DataLength
));
2169 uint32_t _flags_save_uint8
= ndr
->flags
;
2170 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2171 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->SensitiveData
));
2172 ndr
->flags
= _flags_save_uint8
;
2175 if (ndr_flags
& NDR_BUFFERS
) {
2177 uint32_t _flags_save_uint8
= ndr
->flags
;
2178 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2179 if (r
->SensitiveData
) {
2180 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->DataLength
));
2181 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->SensitiveData
, r
->DataLength
));
2183 ndr
->flags
= _flags_save_uint8
;
2186 return NDR_ERR_SUCCESS
;
2189 static enum ndr_err_code
ndr_pull_netr_USER_PRIVATE_INFO(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_USER_PRIVATE_INFO
*r
)
2191 uint32_t _ptr_SensitiveData
;
2192 TALLOC_CTX
*_mem_save_SensitiveData_0
;
2193 if (ndr_flags
& NDR_SCALARS
) {
2194 NDR_CHECK(ndr_pull_align(ndr
, 4));
2195 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->SensitiveDataFlag
));
2196 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->DataLength
));
2198 uint32_t _flags_save_uint8
= ndr
->flags
;
2199 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2200 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_SensitiveData
));
2201 if (_ptr_SensitiveData
) {
2202 NDR_PULL_ALLOC(ndr
, r
->SensitiveData
);
2204 r
->SensitiveData
= NULL
;
2206 ndr
->flags
= _flags_save_uint8
;
2209 if (ndr_flags
& NDR_BUFFERS
) {
2211 uint32_t _flags_save_uint8
= ndr
->flags
;
2212 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2213 if (r
->SensitiveData
) {
2214 _mem_save_SensitiveData_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2215 NDR_PULL_SET_MEM_CTX(ndr
, r
->SensitiveData
, 0);
2216 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->SensitiveData
));
2217 NDR_PULL_ALLOC_N(ndr
, r
->SensitiveData
, ndr_get_array_size(ndr
, &r
->SensitiveData
));
2218 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->SensitiveData
, ndr_get_array_size(ndr
, &r
->SensitiveData
)));
2219 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_SensitiveData_0
, 0);
2221 ndr
->flags
= _flags_save_uint8
;
2223 if (r
->SensitiveData
) {
2224 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->SensitiveData
, r
->DataLength
));
2227 return NDR_ERR_SUCCESS
;
2230 _PUBLIC_
void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print
*ndr
, const char *name
, const struct netr_USER_PRIVATE_INFO
*r
)
2232 ndr_print_struct(ndr
, name
, "netr_USER_PRIVATE_INFO");
2234 ndr_print_uint8(ndr
, "SensitiveDataFlag", r
->SensitiveDataFlag
);
2235 ndr_print_uint32(ndr
, "DataLength", r
->DataLength
);
2236 ndr_print_ptr(ndr
, "SensitiveData", r
->SensitiveData
);
2238 if (r
->SensitiveData
) {
2239 ndr_print_array_uint8(ndr
, "SensitiveData", r
->SensitiveData
, r
->DataLength
);
2245 static enum ndr_err_code
ndr_push_netr_DELTA_USER(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_USER
*r
)
2247 if (ndr_flags
& NDR_SCALARS
) {
2248 NDR_CHECK(ndr_push_align(ndr
, 4));
2249 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2250 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2251 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2252 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->primary_gid
));
2253 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2254 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2255 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2256 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2257 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2258 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logon
));
2259 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_logoff
));
2260 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2261 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->bad_password_count
));
2262 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logon_count
));
2263 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->last_password_change
));
2264 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->acct_expiry
));
2265 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->acct_flags
));
2266 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->lmpassword
));
2267 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
, &r
->ntpassword
));
2268 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->nt_password_present
));
2269 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->lm_password_present
));
2270 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->password_expired
));
2271 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
2272 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->parameters
));
2273 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->country_code
));
2274 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->code_page
));
2275 NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr
, NDR_SCALARS
, &r
->user_private_info
));
2276 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->SecurityInformation
));
2277 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
2278 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2279 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2280 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2281 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
2283 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
2284 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
2285 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
2287 if (ndr_flags
& NDR_BUFFERS
) {
2288 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2289 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2290 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2291 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2292 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2293 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2294 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2295 NDR_CHECK(ndr_push_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2296 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_BUFFERS
, &r
->lmpassword
));
2297 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_BUFFERS
, &r
->ntpassword
));
2298 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2299 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->parameters
));
2300 NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr
, NDR_BUFFERS
, &r
->user_private_info
));
2301 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
2302 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2303 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2304 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2305 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2307 return NDR_ERR_SUCCESS
;
2310 static enum ndr_err_code
ndr_pull_netr_DELTA_USER(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_USER
*r
)
2312 if (ndr_flags
& NDR_SCALARS
) {
2313 NDR_CHECK(ndr_pull_align(ndr
, 4));
2314 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account_name
));
2315 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->full_name
));
2316 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2317 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->primary_gid
));
2318 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_directory
));
2319 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->home_drive
));
2320 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->logon_script
));
2321 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2322 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->workstations
));
2323 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logon
));
2324 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_logoff
));
2325 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_SCALARS
, &r
->logon_hours
));
2326 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->bad_password_count
));
2327 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logon_count
));
2328 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->last_password_change
));
2329 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->acct_expiry
));
2330 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->acct_flags
));
2331 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->lmpassword
));
2332 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
, &r
->ntpassword
));
2333 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->nt_password_present
));
2334 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->lm_password_present
));
2335 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->password_expired
));
2336 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
2337 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->parameters
));
2338 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->country_code
));
2339 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->code_page
));
2340 NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr
, NDR_SCALARS
, &r
->user_private_info
));
2341 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->SecurityInformation
));
2342 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
2343 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->profile_path
));
2344 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2345 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2346 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2347 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
2348 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
2349 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
2350 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
2352 if (ndr_flags
& NDR_BUFFERS
) {
2353 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account_name
));
2354 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->full_name
));
2355 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_directory
));
2356 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->home_drive
));
2357 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->logon_script
));
2358 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2359 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->workstations
));
2360 NDR_CHECK(ndr_pull_samr_LogonHours(ndr
, NDR_BUFFERS
, &r
->logon_hours
));
2361 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_BUFFERS
, &r
->lmpassword
));
2362 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_BUFFERS
, &r
->ntpassword
));
2363 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2364 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->parameters
));
2365 NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr
, NDR_BUFFERS
, &r
->user_private_info
));
2366 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
2367 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->profile_path
));
2368 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2369 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2370 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2372 return NDR_ERR_SUCCESS
;
2375 _PUBLIC_
void ndr_print_netr_DELTA_USER(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_USER
*r
)
2377 ndr_print_struct(ndr
, name
, "netr_DELTA_USER");
2379 ndr_print_lsa_String(ndr
, "account_name", &r
->account_name
);
2380 ndr_print_lsa_String(ndr
, "full_name", &r
->full_name
);
2381 ndr_print_uint32(ndr
, "rid", r
->rid
);
2382 ndr_print_uint32(ndr
, "primary_gid", r
->primary_gid
);
2383 ndr_print_lsa_String(ndr
, "home_directory", &r
->home_directory
);
2384 ndr_print_lsa_String(ndr
, "home_drive", &r
->home_drive
);
2385 ndr_print_lsa_String(ndr
, "logon_script", &r
->logon_script
);
2386 ndr_print_lsa_String(ndr
, "description", &r
->description
);
2387 ndr_print_lsa_String(ndr
, "workstations", &r
->workstations
);
2388 ndr_print_NTTIME(ndr
, "last_logon", r
->last_logon
);
2389 ndr_print_NTTIME(ndr
, "last_logoff", r
->last_logoff
);
2390 ndr_print_samr_LogonHours(ndr
, "logon_hours", &r
->logon_hours
);
2391 ndr_print_uint16(ndr
, "bad_password_count", r
->bad_password_count
);
2392 ndr_print_uint16(ndr
, "logon_count", r
->logon_count
);
2393 ndr_print_NTTIME(ndr
, "last_password_change", r
->last_password_change
);
2394 ndr_print_NTTIME(ndr
, "acct_expiry", r
->acct_expiry
);
2395 ndr_print_samr_AcctFlags(ndr
, "acct_flags", r
->acct_flags
);
2396 ndr_print_samr_Password(ndr
, "lmpassword", &r
->lmpassword
);
2397 ndr_print_samr_Password(ndr
, "ntpassword", &r
->ntpassword
);
2398 ndr_print_uint8(ndr
, "nt_password_present", r
->nt_password_present
);
2399 ndr_print_uint8(ndr
, "lm_password_present", r
->lm_password_present
);
2400 ndr_print_uint8(ndr
, "password_expired", r
->password_expired
);
2401 ndr_print_lsa_String(ndr
, "comment", &r
->comment
);
2402 ndr_print_lsa_String(ndr
, "parameters", &r
->parameters
);
2403 ndr_print_uint16(ndr
, "country_code", r
->country_code
);
2404 ndr_print_uint16(ndr
, "code_page", r
->code_page
);
2405 ndr_print_netr_USER_PRIVATE_INFO(ndr
, "user_private_info", &r
->user_private_info
);
2406 ndr_print_uint32(ndr
, "SecurityInformation", r
->SecurityInformation
);
2407 ndr_print_sec_desc_buf(ndr
, "sdbuf", &r
->sdbuf
);
2408 ndr_print_lsa_String(ndr
, "profile_path", &r
->profile_path
);
2409 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
2410 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
2411 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
2412 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
2413 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
2414 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
2415 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
2419 static enum ndr_err_code
ndr_push_netr_DELTA_DOMAIN(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_DOMAIN
*r
)
2421 if (ndr_flags
& NDR_SCALARS
) {
2422 NDR_CHECK(ndr_push_align(ndr
, 4));
2423 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
2424 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
2425 NDR_CHECK(ndr_push_dlong(ndr
, NDR_SCALARS
, r
->force_logoff_time
));
2426 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->min_password_length
));
2427 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->password_history_length
));
2428 NDR_CHECK(ndr_push_dlong(ndr
, NDR_SCALARS
, r
->max_password_age
));
2429 NDR_CHECK(ndr_push_dlong(ndr
, NDR_SCALARS
, r
->min_password_age
));
2430 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->sequence_num
));
2431 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->domain_create_time
));
2432 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->SecurityInformation
));
2433 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
2434 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->account_lockout
));
2435 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2436 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2437 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2438 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->logon_to_chgpass
));
2439 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
2440 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
2441 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
2443 if (ndr_flags
& NDR_BUFFERS
) {
2444 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
2445 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2446 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
2447 NDR_CHECK(ndr_push_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->account_lockout
));
2448 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2449 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2450 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2452 return NDR_ERR_SUCCESS
;
2455 static enum ndr_err_code
ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_DOMAIN
*r
)
2457 if (ndr_flags
& NDR_SCALARS
) {
2458 NDR_CHECK(ndr_pull_align(ndr
, 4));
2459 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
2460 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->comment
));
2461 NDR_CHECK(ndr_pull_dlong(ndr
, NDR_SCALARS
, &r
->force_logoff_time
));
2462 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->min_password_length
));
2463 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->password_history_length
));
2464 NDR_CHECK(ndr_pull_dlong(ndr
, NDR_SCALARS
, &r
->max_password_age
));
2465 NDR_CHECK(ndr_pull_dlong(ndr
, NDR_SCALARS
, &r
->min_password_age
));
2466 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->sequence_num
));
2467 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->domain_create_time
));
2468 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->SecurityInformation
));
2469 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
2470 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_SCALARS
, &r
->account_lockout
));
2471 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2472 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2473 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2474 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->logon_to_chgpass
));
2475 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
2476 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
2477 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
2479 if (ndr_flags
& NDR_BUFFERS
) {
2480 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
2481 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->comment
));
2482 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
2483 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr
, NDR_BUFFERS
, &r
->account_lockout
));
2484 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2485 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2486 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2488 return NDR_ERR_SUCCESS
;
2491 _PUBLIC_
void ndr_print_netr_DELTA_DOMAIN(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_DOMAIN
*r
)
2493 ndr_print_struct(ndr
, name
, "netr_DELTA_DOMAIN");
2495 ndr_print_lsa_String(ndr
, "domain_name", &r
->domain_name
);
2496 ndr_print_lsa_String(ndr
, "comment", &r
->comment
);
2497 ndr_print_dlong(ndr
, "force_logoff_time", r
->force_logoff_time
);
2498 ndr_print_uint16(ndr
, "min_password_length", r
->min_password_length
);
2499 ndr_print_uint16(ndr
, "password_history_length", r
->password_history_length
);
2500 ndr_print_dlong(ndr
, "max_password_age", r
->max_password_age
);
2501 ndr_print_dlong(ndr
, "min_password_age", r
->min_password_age
);
2502 ndr_print_udlong(ndr
, "sequence_num", r
->sequence_num
);
2503 ndr_print_NTTIME(ndr
, "domain_create_time", r
->domain_create_time
);
2504 ndr_print_uint32(ndr
, "SecurityInformation", r
->SecurityInformation
);
2505 ndr_print_sec_desc_buf(ndr
, "sdbuf", &r
->sdbuf
);
2506 ndr_print_lsa_BinaryString(ndr
, "account_lockout", &r
->account_lockout
);
2507 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
2508 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
2509 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
2510 ndr_print_uint32(ndr
, "logon_to_chgpass", r
->logon_to_chgpass
);
2511 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
2512 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
2513 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
2517 static enum ndr_err_code
ndr_push_netr_DELTA_GROUP(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_GROUP
*r
)
2519 if (ndr_flags
& NDR_SCALARS
) {
2520 NDR_CHECK(ndr_push_align(ndr
, 4));
2521 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->group_name
));
2522 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2523 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attributes
));
2524 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2525 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->SecurityInformation
));
2526 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
2527 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
2528 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2529 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2530 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2531 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
2532 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
2533 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
2534 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
2536 if (ndr_flags
& NDR_BUFFERS
) {
2537 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->group_name
));
2538 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2539 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
2540 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
2541 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2542 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2543 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2545 return NDR_ERR_SUCCESS
;
2548 static enum ndr_err_code
ndr_pull_netr_DELTA_GROUP(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_GROUP
*r
)
2550 if (ndr_flags
& NDR_SCALARS
) {
2551 NDR_CHECK(ndr_pull_align(ndr
, 4));
2552 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->group_name
));
2553 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2554 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attributes
));
2555 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2556 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->SecurityInformation
));
2557 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
2558 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
2559 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2560 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2561 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2562 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
2563 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
2564 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
2565 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
2567 if (ndr_flags
& NDR_BUFFERS
) {
2568 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->group_name
));
2569 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2570 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
2571 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
2572 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2573 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2574 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2576 return NDR_ERR_SUCCESS
;
2579 _PUBLIC_
void ndr_print_netr_DELTA_GROUP(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_GROUP
*r
)
2581 ndr_print_struct(ndr
, name
, "netr_DELTA_GROUP");
2583 ndr_print_lsa_String(ndr
, "group_name", &r
->group_name
);
2584 ndr_print_uint32(ndr
, "rid", r
->rid
);
2585 ndr_print_uint32(ndr
, "attributes", r
->attributes
);
2586 ndr_print_lsa_String(ndr
, "description", &r
->description
);
2587 ndr_print_uint32(ndr
, "SecurityInformation", r
->SecurityInformation
);
2588 ndr_print_sec_desc_buf(ndr
, "sdbuf", &r
->sdbuf
);
2589 ndr_print_lsa_String(ndr
, "unknown1", &r
->unknown1
);
2590 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
2591 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
2592 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
2593 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
2594 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
2595 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
2596 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
2600 static enum ndr_err_code
ndr_push_netr_DELTA_RENAME(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_RENAME
*r
)
2602 if (ndr_flags
& NDR_SCALARS
) {
2603 NDR_CHECK(ndr_push_align(ndr
, 4));
2604 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->OldName
));
2605 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->NewName
));
2606 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
2607 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2608 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2609 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2610 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
2611 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
2612 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
2613 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
2615 if (ndr_flags
& NDR_BUFFERS
) {
2616 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->OldName
));
2617 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->NewName
));
2618 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
2619 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2620 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2621 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2623 return NDR_ERR_SUCCESS
;
2626 static enum ndr_err_code
ndr_pull_netr_DELTA_RENAME(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_RENAME
*r
)
2628 if (ndr_flags
& NDR_SCALARS
) {
2629 NDR_CHECK(ndr_pull_align(ndr
, 4));
2630 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->OldName
));
2631 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->NewName
));
2632 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
2633 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2634 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2635 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2636 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
2637 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
2638 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
2639 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
2641 if (ndr_flags
& NDR_BUFFERS
) {
2642 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->OldName
));
2643 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->NewName
));
2644 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
2645 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2646 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2647 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2649 return NDR_ERR_SUCCESS
;
2652 _PUBLIC_
void ndr_print_netr_DELTA_RENAME(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_RENAME
*r
)
2654 ndr_print_struct(ndr
, name
, "netr_DELTA_RENAME");
2656 ndr_print_lsa_String(ndr
, "OldName", &r
->OldName
);
2657 ndr_print_lsa_String(ndr
, "NewName", &r
->NewName
);
2658 ndr_print_lsa_String(ndr
, "unknown1", &r
->unknown1
);
2659 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
2660 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
2661 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
2662 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
2663 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
2664 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
2665 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
2669 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
)
2671 uint32_t cntr_rids_1
;
2672 uint32_t cntr_attribs_1
;
2673 if (ndr_flags
& NDR_SCALARS
) {
2674 NDR_CHECK(ndr_push_align(ndr
, 4));
2675 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->rids
));
2676 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->attribs
));
2677 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_rids
));
2678 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
2679 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
2680 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown3
));
2681 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown4
));
2683 if (ndr_flags
& NDR_BUFFERS
) {
2685 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_rids
));
2686 for (cntr_rids_1
= 0; cntr_rids_1
< r
->num_rids
; cntr_rids_1
++) {
2687 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rids
[cntr_rids_1
]));
2691 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_rids
));
2692 for (cntr_attribs_1
= 0; cntr_attribs_1
< r
->num_rids
; cntr_attribs_1
++) {
2693 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attribs
[cntr_attribs_1
]));
2697 return NDR_ERR_SUCCESS
;
2700 static enum ndr_err_code
ndr_pull_netr_DELTA_GROUP_MEMBER(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_GROUP_MEMBER
*r
)
2703 uint32_t cntr_rids_1
;
2704 TALLOC_CTX
*_mem_save_rids_0
;
2705 TALLOC_CTX
*_mem_save_rids_1
;
2706 uint32_t _ptr_attribs
;
2707 uint32_t cntr_attribs_1
;
2708 TALLOC_CTX
*_mem_save_attribs_0
;
2709 TALLOC_CTX
*_mem_save_attribs_1
;
2710 if (ndr_flags
& NDR_SCALARS
) {
2711 NDR_CHECK(ndr_pull_align(ndr
, 4));
2712 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rids
));
2714 NDR_PULL_ALLOC(ndr
, r
->rids
);
2718 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_attribs
));
2720 NDR_PULL_ALLOC(ndr
, r
->attribs
);
2724 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_rids
));
2725 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
2726 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
2727 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown3
));
2728 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown4
));
2730 if (ndr_flags
& NDR_BUFFERS
) {
2732 _mem_save_rids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2733 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
2734 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->rids
));
2735 NDR_PULL_ALLOC_N(ndr
, r
->rids
, ndr_get_array_size(ndr
, &r
->rids
));
2736 _mem_save_rids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2737 NDR_PULL_SET_MEM_CTX(ndr
, r
->rids
, 0);
2738 for (cntr_rids_1
= 0; cntr_rids_1
< r
->num_rids
; cntr_rids_1
++) {
2739 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rids
[cntr_rids_1
]));
2741 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_1
, 0);
2742 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rids_0
, 0);
2745 _mem_save_attribs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2746 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribs
, 0);
2747 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->attribs
));
2748 NDR_PULL_ALLOC_N(ndr
, r
->attribs
, ndr_get_array_size(ndr
, &r
->attribs
));
2749 _mem_save_attribs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2750 NDR_PULL_SET_MEM_CTX(ndr
, r
->attribs
, 0);
2751 for (cntr_attribs_1
= 0; cntr_attribs_1
< r
->num_rids
; cntr_attribs_1
++) {
2752 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attribs
[cntr_attribs_1
]));
2754 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribs_1
, 0);
2755 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attribs_0
, 0);
2758 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->rids
, r
->num_rids
));
2761 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->attribs
, r
->num_rids
));
2764 return NDR_ERR_SUCCESS
;
2767 _PUBLIC_
void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_GROUP_MEMBER
*r
)
2769 uint32_t cntr_rids_1
;
2770 uint32_t cntr_attribs_1
;
2771 ndr_print_struct(ndr
, name
, "netr_DELTA_GROUP_MEMBER");
2773 ndr_print_ptr(ndr
, "rids", r
->rids
);
2776 ndr
->print(ndr
, "%s: ARRAY(%d)", "rids", r
->num_rids
);
2778 for (cntr_rids_1
=0;cntr_rids_1
<r
->num_rids
;cntr_rids_1
++) {
2780 if (asprintf(&idx_1
, "[%d]", cntr_rids_1
) != -1) {
2781 ndr_print_uint32(ndr
, "rids", r
->rids
[cntr_rids_1
]);
2788 ndr_print_ptr(ndr
, "attribs", r
->attribs
);
2791 ndr
->print(ndr
, "%s: ARRAY(%d)", "attribs", r
->num_rids
);
2793 for (cntr_attribs_1
=0;cntr_attribs_1
<r
->num_rids
;cntr_attribs_1
++) {
2795 if (asprintf(&idx_1
, "[%d]", cntr_attribs_1
) != -1) {
2796 ndr_print_uint32(ndr
, "attribs", r
->attribs
[cntr_attribs_1
]);
2803 ndr_print_uint32(ndr
, "num_rids", r
->num_rids
);
2804 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
2805 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
2806 ndr_print_uint32(ndr
, "unknown3", r
->unknown3
);
2807 ndr_print_uint32(ndr
, "unknown4", r
->unknown4
);
2811 static enum ndr_err_code
ndr_push_netr_DELTA_ALIAS(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_ALIAS
*r
)
2813 if (ndr_flags
& NDR_SCALARS
) {
2814 NDR_CHECK(ndr_push_align(ndr
, 4));
2815 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->alias_name
));
2816 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2817 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->SecurityInformation
));
2818 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
2819 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2820 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2821 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2822 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2823 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
2824 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
2825 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
2826 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
2828 if (ndr_flags
& NDR_BUFFERS
) {
2829 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->alias_name
));
2830 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
2831 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2832 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2833 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2834 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2836 return NDR_ERR_SUCCESS
;
2839 static enum ndr_err_code
ndr_pull_netr_DELTA_ALIAS(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_ALIAS
*r
)
2841 if (ndr_flags
& NDR_SCALARS
) {
2842 NDR_CHECK(ndr_pull_align(ndr
, 4));
2843 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->alias_name
));
2844 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2845 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->SecurityInformation
));
2846 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
2847 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->description
));
2848 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2849 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2850 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2851 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
2852 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
2853 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
2854 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
2856 if (ndr_flags
& NDR_BUFFERS
) {
2857 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->alias_name
));
2858 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
2859 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->description
));
2860 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
2861 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
2862 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
2864 return NDR_ERR_SUCCESS
;
2867 _PUBLIC_
void ndr_print_netr_DELTA_ALIAS(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_ALIAS
*r
)
2869 ndr_print_struct(ndr
, name
, "netr_DELTA_ALIAS");
2871 ndr_print_lsa_String(ndr
, "alias_name", &r
->alias_name
);
2872 ndr_print_uint32(ndr
, "rid", r
->rid
);
2873 ndr_print_uint32(ndr
, "SecurityInformation", r
->SecurityInformation
);
2874 ndr_print_sec_desc_buf(ndr
, "sdbuf", &r
->sdbuf
);
2875 ndr_print_lsa_String(ndr
, "description", &r
->description
);
2876 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
2877 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
2878 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
2879 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
2880 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
2881 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
2882 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
2886 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
)
2888 if (ndr_flags
& NDR_SCALARS
) {
2889 NDR_CHECK(ndr_push_align(ndr
, 4));
2890 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
, &r
->sids
));
2891 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
2892 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
2893 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown3
));
2894 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown4
));
2896 if (ndr_flags
& NDR_BUFFERS
) {
2897 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_BUFFERS
, &r
->sids
));
2899 return NDR_ERR_SUCCESS
;
2902 static enum ndr_err_code
ndr_pull_netr_DELTA_ALIAS_MEMBER(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_ALIAS_MEMBER
*r
)
2904 if (ndr_flags
& NDR_SCALARS
) {
2905 NDR_CHECK(ndr_pull_align(ndr
, 4));
2906 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
, &r
->sids
));
2907 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
2908 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
2909 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown3
));
2910 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown4
));
2912 if (ndr_flags
& NDR_BUFFERS
) {
2913 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_BUFFERS
, &r
->sids
));
2915 return NDR_ERR_SUCCESS
;
2918 _PUBLIC_
void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_ALIAS_MEMBER
*r
)
2920 ndr_print_struct(ndr
, name
, "netr_DELTA_ALIAS_MEMBER");
2922 ndr_print_lsa_SidArray(ndr
, "sids", &r
->sids
);
2923 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
2924 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
2925 ndr_print_uint32(ndr
, "unknown3", r
->unknown3
);
2926 ndr_print_uint32(ndr
, "unknown4", r
->unknown4
);
2930 static enum ndr_err_code
ndr_push_netr_QUOTA_LIMITS(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_QUOTA_LIMITS
*r
)
2932 if (ndr_flags
& NDR_SCALARS
) {
2933 NDR_CHECK(ndr_push_align(ndr
, 4));
2934 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pagedpoollimit
));
2935 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->nonpagedpoollimit
));
2936 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->minimumworkingsetsize
));
2937 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maximumworkingsetsize
));
2938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pagefilelimit
));
2939 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->timelimit
));
2941 if (ndr_flags
& NDR_BUFFERS
) {
2943 return NDR_ERR_SUCCESS
;
2946 static enum ndr_err_code
ndr_pull_netr_QUOTA_LIMITS(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_QUOTA_LIMITS
*r
)
2948 if (ndr_flags
& NDR_SCALARS
) {
2949 NDR_CHECK(ndr_pull_align(ndr
, 4));
2950 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pagedpoollimit
));
2951 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->nonpagedpoollimit
));
2952 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->minimumworkingsetsize
));
2953 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maximumworkingsetsize
));
2954 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pagefilelimit
));
2955 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->timelimit
));
2957 if (ndr_flags
& NDR_BUFFERS
) {
2959 return NDR_ERR_SUCCESS
;
2962 _PUBLIC_
void ndr_print_netr_QUOTA_LIMITS(struct ndr_print
*ndr
, const char *name
, const struct netr_QUOTA_LIMITS
*r
)
2964 ndr_print_struct(ndr
, name
, "netr_QUOTA_LIMITS");
2966 ndr_print_uint32(ndr
, "pagedpoollimit", r
->pagedpoollimit
);
2967 ndr_print_uint32(ndr
, "nonpagedpoollimit", r
->nonpagedpoollimit
);
2968 ndr_print_uint32(ndr
, "minimumworkingsetsize", r
->minimumworkingsetsize
);
2969 ndr_print_uint32(ndr
, "maximumworkingsetsize", r
->maximumworkingsetsize
);
2970 ndr_print_uint32(ndr
, "pagefilelimit", r
->pagefilelimit
);
2971 ndr_print_NTTIME(ndr
, "timelimit", r
->timelimit
);
2975 static enum ndr_err_code
ndr_push_netr_DELTA_POLICY(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_POLICY
*r
)
2977 uint32_t cntr_eventauditoptions_1
;
2978 if (ndr_flags
& NDR_SCALARS
) {
2979 NDR_CHECK(ndr_push_align(ndr
, 4));
2980 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maxlogsize
));
2981 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->auditretentionperiod
));
2982 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->auditingmode
));
2983 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maxauditeventcount
));
2984 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->eventauditoptions
));
2985 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->primary_domain_name
));
2986 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
2987 NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr
, NDR_SCALARS
, &r
->quota_limits
));
2988 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->sequence_num
));
2989 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->db_create_time
));
2990 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->SecurityInformation
));
2991 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
2992 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
2993 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
2994 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
2995 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
2996 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
2997 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
2998 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
2999 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
3001 if (ndr_flags
& NDR_BUFFERS
) {
3002 if (r
->eventauditoptions
) {
3003 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maxauditeventcount
+ 1));
3004 for (cntr_eventauditoptions_1
= 0; cntr_eventauditoptions_1
< r
->maxauditeventcount
+ 1; cntr_eventauditoptions_1
++) {
3005 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->eventauditoptions
[cntr_eventauditoptions_1
]));
3008 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary_domain_name
));
3010 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3012 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
3013 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
3014 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
3015 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
3016 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
3018 return NDR_ERR_SUCCESS
;
3021 static enum ndr_err_code
ndr_pull_netr_DELTA_POLICY(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_POLICY
*r
)
3023 uint32_t _ptr_eventauditoptions
;
3024 uint32_t cntr_eventauditoptions_1
;
3025 TALLOC_CTX
*_mem_save_eventauditoptions_0
;
3026 TALLOC_CTX
*_mem_save_eventauditoptions_1
;
3028 TALLOC_CTX
*_mem_save_sid_0
;
3029 if (ndr_flags
& NDR_SCALARS
) {
3030 NDR_CHECK(ndr_pull_align(ndr
, 4));
3031 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maxlogsize
));
3032 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->auditretentionperiod
));
3033 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->auditingmode
));
3034 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maxauditeventcount
));
3035 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_eventauditoptions
));
3036 if (_ptr_eventauditoptions
) {
3037 NDR_PULL_ALLOC(ndr
, r
->eventauditoptions
);
3039 r
->eventauditoptions
= NULL
;
3041 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->primary_domain_name
));
3042 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
3044 NDR_PULL_ALLOC(ndr
, r
->sid
);
3048 NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr
, NDR_SCALARS
, &r
->quota_limits
));
3049 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->sequence_num
));
3050 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->db_create_time
));
3051 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->SecurityInformation
));
3052 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
3053 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
3054 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
3055 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
3056 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
3057 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
3058 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
3059 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
3060 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
3062 if (ndr_flags
& NDR_BUFFERS
) {
3063 if (r
->eventauditoptions
) {
3064 _mem_save_eventauditoptions_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3065 NDR_PULL_SET_MEM_CTX(ndr
, r
->eventauditoptions
, 0);
3066 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->eventauditoptions
));
3067 NDR_PULL_ALLOC_N(ndr
, r
->eventauditoptions
, ndr_get_array_size(ndr
, &r
->eventauditoptions
));
3068 _mem_save_eventauditoptions_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3069 NDR_PULL_SET_MEM_CTX(ndr
, r
->eventauditoptions
, 0);
3070 for (cntr_eventauditoptions_1
= 0; cntr_eventauditoptions_1
< r
->maxauditeventcount
+ 1; cntr_eventauditoptions_1
++) {
3071 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->eventauditoptions
[cntr_eventauditoptions_1
]));
3073 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_eventauditoptions_1
, 0);
3074 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_eventauditoptions_0
, 0);
3076 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->primary_domain_name
));
3078 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3079 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
3080 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3081 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
3083 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
3084 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
3085 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
3086 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
3087 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
3088 if (r
->eventauditoptions
) {
3089 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->eventauditoptions
, r
->maxauditeventcount
+ 1));
3092 return NDR_ERR_SUCCESS
;
3095 _PUBLIC_
void ndr_print_netr_DELTA_POLICY(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_POLICY
*r
)
3097 uint32_t cntr_eventauditoptions_1
;
3098 ndr_print_struct(ndr
, name
, "netr_DELTA_POLICY");
3100 ndr_print_uint32(ndr
, "maxlogsize", r
->maxlogsize
);
3101 ndr_print_NTTIME(ndr
, "auditretentionperiod", r
->auditretentionperiod
);
3102 ndr_print_uint8(ndr
, "auditingmode", r
->auditingmode
);
3103 ndr_print_uint32(ndr
, "maxauditeventcount", r
->maxauditeventcount
);
3104 ndr_print_ptr(ndr
, "eventauditoptions", r
->eventauditoptions
);
3106 if (r
->eventauditoptions
) {
3107 ndr
->print(ndr
, "%s: ARRAY(%d)", "eventauditoptions", r
->maxauditeventcount
+ 1);
3109 for (cntr_eventauditoptions_1
=0;cntr_eventauditoptions_1
<r
->maxauditeventcount
+ 1;cntr_eventauditoptions_1
++) {
3111 if (asprintf(&idx_1
, "[%d]", cntr_eventauditoptions_1
) != -1) {
3112 ndr_print_uint32(ndr
, "eventauditoptions", r
->eventauditoptions
[cntr_eventauditoptions_1
]);
3119 ndr_print_lsa_String(ndr
, "primary_domain_name", &r
->primary_domain_name
);
3120 ndr_print_ptr(ndr
, "sid", r
->sid
);
3123 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
3126 ndr_print_netr_QUOTA_LIMITS(ndr
, "quota_limits", &r
->quota_limits
);
3127 ndr_print_udlong(ndr
, "sequence_num", r
->sequence_num
);
3128 ndr_print_NTTIME(ndr
, "db_create_time", r
->db_create_time
);
3129 ndr_print_uint32(ndr
, "SecurityInformation", r
->SecurityInformation
);
3130 ndr_print_sec_desc_buf(ndr
, "sdbuf", &r
->sdbuf
);
3131 ndr_print_lsa_String(ndr
, "unknown1", &r
->unknown1
);
3132 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
3133 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
3134 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
3135 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
3136 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
3137 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
3138 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
3142 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
)
3144 uint32_t cntr_controller_names_1
;
3145 if (ndr_flags
& NDR_SCALARS
) {
3146 NDR_CHECK(ndr_push_align(ndr
, 4));
3147 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
3148 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_controllers
));
3149 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->controller_names
));
3150 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->SecurityInformation
));
3151 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
3152 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
3153 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
3154 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
3155 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
3156 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->posix_offset
));
3157 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
3158 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
3159 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
3161 if (ndr_flags
& NDR_BUFFERS
) {
3162 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3163 if (r
->controller_names
) {
3164 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_controllers
));
3165 for (cntr_controller_names_1
= 0; cntr_controller_names_1
< r
->num_controllers
; cntr_controller_names_1
++) {
3166 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->controller_names
[cntr_controller_names_1
]));
3168 for (cntr_controller_names_1
= 0; cntr_controller_names_1
< r
->num_controllers
; cntr_controller_names_1
++) {
3169 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->controller_names
[cntr_controller_names_1
]));
3172 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
3173 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
3174 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
3175 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
3176 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
3178 return NDR_ERR_SUCCESS
;
3181 static enum ndr_err_code
ndr_pull_netr_DELTA_TRUSTED_DOMAIN(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_TRUSTED_DOMAIN
*r
)
3183 uint32_t _ptr_controller_names
;
3184 uint32_t cntr_controller_names_1
;
3185 TALLOC_CTX
*_mem_save_controller_names_0
;
3186 TALLOC_CTX
*_mem_save_controller_names_1
;
3187 if (ndr_flags
& NDR_SCALARS
) {
3188 NDR_CHECK(ndr_pull_align(ndr
, 4));
3189 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->domain_name
));
3190 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_controllers
));
3191 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_controller_names
));
3192 if (_ptr_controller_names
) {
3193 NDR_PULL_ALLOC(ndr
, r
->controller_names
);
3195 r
->controller_names
= NULL
;
3197 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->SecurityInformation
));
3198 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
3199 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
3200 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
3201 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
3202 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
3203 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3204 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
3205 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
3206 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
3208 if (ndr_flags
& NDR_BUFFERS
) {
3209 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3210 if (r
->controller_names
) {
3211 _mem_save_controller_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3212 NDR_PULL_SET_MEM_CTX(ndr
, r
->controller_names
, 0);
3213 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->controller_names
));
3214 NDR_PULL_ALLOC_N(ndr
, r
->controller_names
, ndr_get_array_size(ndr
, &r
->controller_names
));
3215 _mem_save_controller_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3216 NDR_PULL_SET_MEM_CTX(ndr
, r
->controller_names
, 0);
3217 for (cntr_controller_names_1
= 0; cntr_controller_names_1
< r
->num_controllers
; cntr_controller_names_1
++) {
3218 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->controller_names
[cntr_controller_names_1
]));
3220 for (cntr_controller_names_1
= 0; cntr_controller_names_1
< r
->num_controllers
; cntr_controller_names_1
++) {
3221 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->controller_names
[cntr_controller_names_1
]));
3223 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_controller_names_1
, 0);
3224 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_controller_names_0
, 0);
3226 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
3227 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
3228 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
3229 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
3230 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
3231 if (r
->controller_names
) {
3232 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->controller_names
, r
->num_controllers
));
3235 return NDR_ERR_SUCCESS
;
3238 _PUBLIC_
void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_TRUSTED_DOMAIN
*r
)
3240 uint32_t cntr_controller_names_1
;
3241 ndr_print_struct(ndr
, name
, "netr_DELTA_TRUSTED_DOMAIN");
3243 ndr_print_lsa_String(ndr
, "domain_name", &r
->domain_name
);
3244 ndr_print_uint32(ndr
, "num_controllers", r
->num_controllers
);
3245 ndr_print_ptr(ndr
, "controller_names", r
->controller_names
);
3247 if (r
->controller_names
) {
3248 ndr
->print(ndr
, "%s: ARRAY(%d)", "controller_names", r
->num_controllers
);
3250 for (cntr_controller_names_1
=0;cntr_controller_names_1
<r
->num_controllers
;cntr_controller_names_1
++) {
3252 if (asprintf(&idx_1
, "[%d]", cntr_controller_names_1
) != -1) {
3253 ndr_print_lsa_String(ndr
, "controller_names", &r
->controller_names
[cntr_controller_names_1
]);
3260 ndr_print_uint32(ndr
, "SecurityInformation", r
->SecurityInformation
);
3261 ndr_print_sec_desc_buf(ndr
, "sdbuf", &r
->sdbuf
);
3262 ndr_print_lsa_String(ndr
, "unknown1", &r
->unknown1
);
3263 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
3264 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
3265 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
3266 ndr_print_uint32(ndr
, "posix_offset", r
->posix_offset
);
3267 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
3268 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
3269 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
3273 static enum ndr_err_code
ndr_push_netr_DELTA_DELETE_TRUST(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_DELETE_TRUST
*r
)
3275 if (ndr_flags
& NDR_SCALARS
) {
3276 NDR_CHECK(ndr_push_align(ndr
, 2));
3277 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unknown
));
3279 if (ndr_flags
& NDR_BUFFERS
) {
3281 return NDR_ERR_SUCCESS
;
3284 static enum ndr_err_code
ndr_pull_netr_DELTA_DELETE_TRUST(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_DELETE_TRUST
*r
)
3286 if (ndr_flags
& NDR_SCALARS
) {
3287 NDR_CHECK(ndr_pull_align(ndr
, 2));
3288 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown
));
3290 if (ndr_flags
& NDR_BUFFERS
) {
3292 return NDR_ERR_SUCCESS
;
3295 _PUBLIC_
void ndr_print_netr_DELTA_DELETE_TRUST(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_DELETE_TRUST
*r
)
3297 ndr_print_struct(ndr
, name
, "netr_DELTA_DELETE_TRUST");
3299 ndr_print_uint16(ndr
, "unknown", r
->unknown
);
3303 static enum ndr_err_code
ndr_push_netr_DELTA_ACCOUNT(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_ACCOUNT
*r
)
3305 uint32_t cntr_privilege_attrib_1
;
3306 uint32_t cntr_privilege_name_1
;
3307 if (ndr_flags
& NDR_SCALARS
) {
3308 NDR_CHECK(ndr_push_align(ndr
, 4));
3309 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->privilege_entries
));
3310 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->privilege_control
));
3311 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->privilege_attrib
));
3312 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->privilege_name
));
3313 NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr
, NDR_SCALARS
, &r
->quotalimits
));
3314 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->system_flags
));
3315 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->SecurityInformation
));
3316 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
3317 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
3318 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
3319 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
3320 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
3321 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
3322 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
3323 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
3324 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
3326 if (ndr_flags
& NDR_BUFFERS
) {
3327 if (r
->privilege_attrib
) {
3328 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->privilege_entries
));
3329 for (cntr_privilege_attrib_1
= 0; cntr_privilege_attrib_1
< r
->privilege_entries
; cntr_privilege_attrib_1
++) {
3330 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->privilege_attrib
[cntr_privilege_attrib_1
]));
3333 if (r
->privilege_name
) {
3334 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->privilege_entries
));
3335 for (cntr_privilege_name_1
= 0; cntr_privilege_name_1
< r
->privilege_entries
; cntr_privilege_name_1
++) {
3336 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->privilege_name
[cntr_privilege_name_1
]));
3338 for (cntr_privilege_name_1
= 0; cntr_privilege_name_1
< r
->privilege_entries
; cntr_privilege_name_1
++) {
3339 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->privilege_name
[cntr_privilege_name_1
]));
3342 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
3343 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
3344 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
3345 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
3346 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
3348 return NDR_ERR_SUCCESS
;
3351 static enum ndr_err_code
ndr_pull_netr_DELTA_ACCOUNT(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_ACCOUNT
*r
)
3353 uint32_t _ptr_privilege_attrib
;
3354 uint32_t cntr_privilege_attrib_1
;
3355 TALLOC_CTX
*_mem_save_privilege_attrib_0
;
3356 TALLOC_CTX
*_mem_save_privilege_attrib_1
;
3357 uint32_t _ptr_privilege_name
;
3358 uint32_t cntr_privilege_name_1
;
3359 TALLOC_CTX
*_mem_save_privilege_name_0
;
3360 TALLOC_CTX
*_mem_save_privilege_name_1
;
3361 if (ndr_flags
& NDR_SCALARS
) {
3362 NDR_CHECK(ndr_pull_align(ndr
, 4));
3363 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->privilege_entries
));
3364 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->privilege_control
));
3365 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privilege_attrib
));
3366 if (_ptr_privilege_attrib
) {
3367 NDR_PULL_ALLOC(ndr
, r
->privilege_attrib
);
3369 r
->privilege_attrib
= NULL
;
3371 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privilege_name
));
3372 if (_ptr_privilege_name
) {
3373 NDR_PULL_ALLOC(ndr
, r
->privilege_name
);
3375 r
->privilege_name
= NULL
;
3377 NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr
, NDR_SCALARS
, &r
->quotalimits
));
3378 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->system_flags
));
3379 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->SecurityInformation
));
3380 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
3381 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
3382 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
3383 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
3384 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
3385 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
3386 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
3387 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
3388 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
3390 if (ndr_flags
& NDR_BUFFERS
) {
3391 if (r
->privilege_attrib
) {
3392 _mem_save_privilege_attrib_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3393 NDR_PULL_SET_MEM_CTX(ndr
, r
->privilege_attrib
, 0);
3394 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->privilege_attrib
));
3395 NDR_PULL_ALLOC_N(ndr
, r
->privilege_attrib
, ndr_get_array_size(ndr
, &r
->privilege_attrib
));
3396 _mem_save_privilege_attrib_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3397 NDR_PULL_SET_MEM_CTX(ndr
, r
->privilege_attrib
, 0);
3398 for (cntr_privilege_attrib_1
= 0; cntr_privilege_attrib_1
< r
->privilege_entries
; cntr_privilege_attrib_1
++) {
3399 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->privilege_attrib
[cntr_privilege_attrib_1
]));
3401 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privilege_attrib_1
, 0);
3402 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privilege_attrib_0
, 0);
3404 if (r
->privilege_name
) {
3405 _mem_save_privilege_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3406 NDR_PULL_SET_MEM_CTX(ndr
, r
->privilege_name
, 0);
3407 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->privilege_name
));
3408 NDR_PULL_ALLOC_N(ndr
, r
->privilege_name
, ndr_get_array_size(ndr
, &r
->privilege_name
));
3409 _mem_save_privilege_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3410 NDR_PULL_SET_MEM_CTX(ndr
, r
->privilege_name
, 0);
3411 for (cntr_privilege_name_1
= 0; cntr_privilege_name_1
< r
->privilege_entries
; cntr_privilege_name_1
++) {
3412 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->privilege_name
[cntr_privilege_name_1
]));
3414 for (cntr_privilege_name_1
= 0; cntr_privilege_name_1
< r
->privilege_entries
; cntr_privilege_name_1
++) {
3415 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->privilege_name
[cntr_privilege_name_1
]));
3417 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privilege_name_1
, 0);
3418 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privilege_name_0
, 0);
3420 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
3421 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
3422 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
3423 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
3424 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
3425 if (r
->privilege_attrib
) {
3426 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->privilege_attrib
, r
->privilege_entries
));
3428 if (r
->privilege_name
) {
3429 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->privilege_name
, r
->privilege_entries
));
3432 return NDR_ERR_SUCCESS
;
3435 _PUBLIC_
void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_ACCOUNT
*r
)
3437 uint32_t cntr_privilege_attrib_1
;
3438 uint32_t cntr_privilege_name_1
;
3439 ndr_print_struct(ndr
, name
, "netr_DELTA_ACCOUNT");
3441 ndr_print_uint32(ndr
, "privilege_entries", r
->privilege_entries
);
3442 ndr_print_uint32(ndr
, "privilege_control", r
->privilege_control
);
3443 ndr_print_ptr(ndr
, "privilege_attrib", r
->privilege_attrib
);
3445 if (r
->privilege_attrib
) {
3446 ndr
->print(ndr
, "%s: ARRAY(%d)", "privilege_attrib", r
->privilege_entries
);
3448 for (cntr_privilege_attrib_1
=0;cntr_privilege_attrib_1
<r
->privilege_entries
;cntr_privilege_attrib_1
++) {
3450 if (asprintf(&idx_1
, "[%d]", cntr_privilege_attrib_1
) != -1) {
3451 ndr_print_uint32(ndr
, "privilege_attrib", r
->privilege_attrib
[cntr_privilege_attrib_1
]);
3458 ndr_print_ptr(ndr
, "privilege_name", r
->privilege_name
);
3460 if (r
->privilege_name
) {
3461 ndr
->print(ndr
, "%s: ARRAY(%d)", "privilege_name", r
->privilege_entries
);
3463 for (cntr_privilege_name_1
=0;cntr_privilege_name_1
<r
->privilege_entries
;cntr_privilege_name_1
++) {
3465 if (asprintf(&idx_1
, "[%d]", cntr_privilege_name_1
) != -1) {
3466 ndr_print_lsa_String(ndr
, "privilege_name", &r
->privilege_name
[cntr_privilege_name_1
]);
3473 ndr_print_netr_QUOTA_LIMITS(ndr
, "quotalimits", &r
->quotalimits
);
3474 ndr_print_uint32(ndr
, "system_flags", r
->system_flags
);
3475 ndr_print_uint32(ndr
, "SecurityInformation", r
->SecurityInformation
);
3476 ndr_print_sec_desc_buf(ndr
, "sdbuf", &r
->sdbuf
);
3477 ndr_print_lsa_String(ndr
, "unknown1", &r
->unknown1
);
3478 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
3479 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
3480 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
3481 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
3482 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
3483 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
3484 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
3488 static enum ndr_err_code
ndr_push_netr_DELTA_DELETE_ACCOUNT(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_DELETE_ACCOUNT
*r
)
3490 if (ndr_flags
& NDR_SCALARS
) {
3491 NDR_CHECK(ndr_push_align(ndr
, 2));
3492 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unknown
));
3494 if (ndr_flags
& NDR_BUFFERS
) {
3496 return NDR_ERR_SUCCESS
;
3499 static enum ndr_err_code
ndr_pull_netr_DELTA_DELETE_ACCOUNT(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_DELETE_ACCOUNT
*r
)
3501 if (ndr_flags
& NDR_SCALARS
) {
3502 NDR_CHECK(ndr_pull_align(ndr
, 2));
3503 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown
));
3505 if (ndr_flags
& NDR_BUFFERS
) {
3507 return NDR_ERR_SUCCESS
;
3510 _PUBLIC_
void ndr_print_netr_DELTA_DELETE_ACCOUNT(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_DELETE_ACCOUNT
*r
)
3512 ndr_print_struct(ndr
, name
, "netr_DELTA_DELETE_ACCOUNT");
3514 ndr_print_uint16(ndr
, "unknown", r
->unknown
);
3518 static enum ndr_err_code
ndr_push_netr_DELTA_DELETE_SECRET(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_DELETE_SECRET
*r
)
3520 if (ndr_flags
& NDR_SCALARS
) {
3521 NDR_CHECK(ndr_push_align(ndr
, 2));
3522 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unknown
));
3524 if (ndr_flags
& NDR_BUFFERS
) {
3526 return NDR_ERR_SUCCESS
;
3529 static enum ndr_err_code
ndr_pull_netr_DELTA_DELETE_SECRET(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_DELETE_SECRET
*r
)
3531 if (ndr_flags
& NDR_SCALARS
) {
3532 NDR_CHECK(ndr_pull_align(ndr
, 2));
3533 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown
));
3535 if (ndr_flags
& NDR_BUFFERS
) {
3537 return NDR_ERR_SUCCESS
;
3540 _PUBLIC_
void ndr_print_netr_DELTA_DELETE_SECRET(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_DELETE_SECRET
*r
)
3542 ndr_print_struct(ndr
, name
, "netr_DELTA_DELETE_SECRET");
3544 ndr_print_uint16(ndr
, "unknown", r
->unknown
);
3548 static enum ndr_err_code
ndr_push_netr_CIPHER_VALUE(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_CIPHER_VALUE
*r
)
3550 if (ndr_flags
& NDR_SCALARS
) {
3551 NDR_CHECK(ndr_push_align(ndr
, 4));
3552 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
3553 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maxlen
));
3554 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->cipher_data
));
3556 if (ndr_flags
& NDR_BUFFERS
) {
3557 if (r
->cipher_data
) {
3558 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maxlen
));
3559 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3560 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
3561 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->cipher_data
, r
->len
));
3564 return NDR_ERR_SUCCESS
;
3567 static enum ndr_err_code
ndr_pull_netr_CIPHER_VALUE(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_CIPHER_VALUE
*r
)
3569 uint32_t _ptr_cipher_data
;
3570 TALLOC_CTX
*_mem_save_cipher_data_0
;
3571 if (ndr_flags
& NDR_SCALARS
) {
3572 NDR_CHECK(ndr_pull_align(ndr
, 4));
3573 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->len
));
3574 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maxlen
));
3575 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_cipher_data
));
3576 if (_ptr_cipher_data
) {
3577 NDR_PULL_ALLOC(ndr
, r
->cipher_data
);
3579 r
->cipher_data
= NULL
;
3582 if (ndr_flags
& NDR_BUFFERS
) {
3583 if (r
->cipher_data
) {
3584 _mem_save_cipher_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3585 NDR_PULL_SET_MEM_CTX(ndr
, r
->cipher_data
, 0);
3586 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->cipher_data
));
3587 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->cipher_data
));
3588 if (ndr_get_array_length(ndr
, &r
->cipher_data
) > ndr_get_array_size(ndr
, &r
->cipher_data
)) {
3589 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->cipher_data
), ndr_get_array_length(ndr
, &r
->cipher_data
));
3591 NDR_PULL_ALLOC_N(ndr
, r
->cipher_data
, ndr_get_array_size(ndr
, &r
->cipher_data
));
3592 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->cipher_data
, ndr_get_array_length(ndr
, &r
->cipher_data
)));
3593 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_cipher_data_0
, 0);
3595 if (r
->cipher_data
) {
3596 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->cipher_data
, r
->maxlen
));
3598 if (r
->cipher_data
) {
3599 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->cipher_data
, r
->len
));
3602 return NDR_ERR_SUCCESS
;
3605 _PUBLIC_
void ndr_print_netr_CIPHER_VALUE(struct ndr_print
*ndr
, const char *name
, const struct netr_CIPHER_VALUE
*r
)
3607 ndr_print_struct(ndr
, name
, "netr_CIPHER_VALUE");
3609 ndr_print_uint32(ndr
, "len", r
->len
);
3610 ndr_print_uint32(ndr
, "maxlen", r
->maxlen
);
3611 ndr_print_ptr(ndr
, "cipher_data", r
->cipher_data
);
3613 if (r
->cipher_data
) {
3614 ndr_print_array_uint8(ndr
, "cipher_data", r
->cipher_data
, r
->len
);
3620 static enum ndr_err_code
ndr_push_netr_DELTA_SECRET(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_SECRET
*r
)
3622 if (ndr_flags
& NDR_SCALARS
) {
3623 NDR_CHECK(ndr_push_align(ndr
, 4));
3624 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr
, NDR_SCALARS
, &r
->current_cipher
));
3625 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->current_cipher_set_time
));
3626 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr
, NDR_SCALARS
, &r
->old_cipher
));
3627 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->old_cipher_set_time
));
3628 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->SecurityInformation
));
3629 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
3630 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
3631 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
3632 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
3633 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
3634 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
3635 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown6
));
3636 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
));
3637 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown8
));
3639 if (ndr_flags
& NDR_BUFFERS
) {
3640 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr
, NDR_BUFFERS
, &r
->current_cipher
));
3641 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr
, NDR_BUFFERS
, &r
->old_cipher
));
3642 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
3643 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
3644 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
3645 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
3646 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
3648 return NDR_ERR_SUCCESS
;
3651 static enum ndr_err_code
ndr_pull_netr_DELTA_SECRET(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_SECRET
*r
)
3653 if (ndr_flags
& NDR_SCALARS
) {
3654 NDR_CHECK(ndr_pull_align(ndr
, 4));
3655 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr
, NDR_SCALARS
, &r
->current_cipher
));
3656 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->current_cipher_set_time
));
3657 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr
, NDR_SCALARS
, &r
->old_cipher
));
3658 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->old_cipher_set_time
));
3659 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->SecurityInformation
));
3660 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sdbuf
));
3661 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown1
));
3662 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown2
));
3663 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown3
));
3664 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown4
));
3665 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
3666 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown6
));
3667 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
));
3668 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown8
));
3670 if (ndr_flags
& NDR_BUFFERS
) {
3671 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr
, NDR_BUFFERS
, &r
->current_cipher
));
3672 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr
, NDR_BUFFERS
, &r
->old_cipher
));
3673 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sdbuf
));
3674 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown1
));
3675 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown2
));
3676 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown3
));
3677 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown4
));
3679 return NDR_ERR_SUCCESS
;
3682 _PUBLIC_
void ndr_print_netr_DELTA_SECRET(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_SECRET
*r
)
3684 ndr_print_struct(ndr
, name
, "netr_DELTA_SECRET");
3686 ndr_print_netr_CIPHER_VALUE(ndr
, "current_cipher", &r
->current_cipher
);
3687 ndr_print_NTTIME(ndr
, "current_cipher_set_time", r
->current_cipher_set_time
);
3688 ndr_print_netr_CIPHER_VALUE(ndr
, "old_cipher", &r
->old_cipher
);
3689 ndr_print_NTTIME(ndr
, "old_cipher_set_time", r
->old_cipher_set_time
);
3690 ndr_print_uint32(ndr
, "SecurityInformation", r
->SecurityInformation
);
3691 ndr_print_sec_desc_buf(ndr
, "sdbuf", &r
->sdbuf
);
3692 ndr_print_lsa_String(ndr
, "unknown1", &r
->unknown1
);
3693 ndr_print_lsa_String(ndr
, "unknown2", &r
->unknown2
);
3694 ndr_print_lsa_String(ndr
, "unknown3", &r
->unknown3
);
3695 ndr_print_lsa_String(ndr
, "unknown4", &r
->unknown4
);
3696 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
3697 ndr_print_uint32(ndr
, "unknown6", r
->unknown6
);
3698 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
);
3699 ndr_print_uint32(ndr
, "unknown8", r
->unknown8
);
3703 static enum ndr_err_code
ndr_push_netr_DeltaEnum(struct ndr_push
*ndr
, int ndr_flags
, enum netr_DeltaEnum r
)
3705 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
3706 return NDR_ERR_SUCCESS
;
3709 static enum ndr_err_code
ndr_pull_netr_DeltaEnum(struct ndr_pull
*ndr
, int ndr_flags
, enum netr_DeltaEnum
*r
)
3712 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
3714 return NDR_ERR_SUCCESS
;
3717 _PUBLIC_
void ndr_print_netr_DeltaEnum(struct ndr_print
*ndr
, const char *name
, enum netr_DeltaEnum r
)
3719 const char *val
= NULL
;
3722 case NETR_DELTA_DOMAIN
: val
= "NETR_DELTA_DOMAIN"; break;
3723 case NETR_DELTA_GROUP
: val
= "NETR_DELTA_GROUP"; break;
3724 case NETR_DELTA_DELETE_GROUP
: val
= "NETR_DELTA_DELETE_GROUP"; break;
3725 case NETR_DELTA_RENAME_GROUP
: val
= "NETR_DELTA_RENAME_GROUP"; break;
3726 case NETR_DELTA_USER
: val
= "NETR_DELTA_USER"; break;
3727 case NETR_DELTA_DELETE_USER
: val
= "NETR_DELTA_DELETE_USER"; break;
3728 case NETR_DELTA_RENAME_USER
: val
= "NETR_DELTA_RENAME_USER"; break;
3729 case NETR_DELTA_GROUP_MEMBER
: val
= "NETR_DELTA_GROUP_MEMBER"; break;
3730 case NETR_DELTA_ALIAS
: val
= "NETR_DELTA_ALIAS"; break;
3731 case NETR_DELTA_DELETE_ALIAS
: val
= "NETR_DELTA_DELETE_ALIAS"; break;
3732 case NETR_DELTA_RENAME_ALIAS
: val
= "NETR_DELTA_RENAME_ALIAS"; break;
3733 case NETR_DELTA_ALIAS_MEMBER
: val
= "NETR_DELTA_ALIAS_MEMBER"; break;
3734 case NETR_DELTA_POLICY
: val
= "NETR_DELTA_POLICY"; break;
3735 case NETR_DELTA_TRUSTED_DOMAIN
: val
= "NETR_DELTA_TRUSTED_DOMAIN"; break;
3736 case NETR_DELTA_DELETE_TRUST
: val
= "NETR_DELTA_DELETE_TRUST"; break;
3737 case NETR_DELTA_ACCOUNT
: val
= "NETR_DELTA_ACCOUNT"; break;
3738 case NETR_DELTA_DELETE_ACCOUNT
: val
= "NETR_DELTA_DELETE_ACCOUNT"; break;
3739 case NETR_DELTA_SECRET
: val
= "NETR_DELTA_SECRET"; break;
3740 case NETR_DELTA_DELETE_SECRET
: val
= "NETR_DELTA_DELETE_SECRET"; break;
3741 case NETR_DELTA_DELETE_GROUP2
: val
= "NETR_DELTA_DELETE_GROUP2"; break;
3742 case NETR_DELTA_DELETE_USER2
: val
= "NETR_DELTA_DELETE_USER2"; break;
3743 case NETR_DELTA_MODIFY_COUNT
: val
= "NETR_DELTA_MODIFY_COUNT"; break;
3745 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3748 static enum ndr_err_code
ndr_push_netr_DELTA_UNION(struct ndr_push
*ndr
, int ndr_flags
, const union netr_DELTA_UNION
*r
)
3750 if (ndr_flags
& NDR_SCALARS
) {
3751 int level
= ndr_push_get_switch_value(ndr
, r
);
3752 NDR_CHECK(ndr_push_netr_DeltaEnum(ndr
, NDR_SCALARS
, level
));
3754 case NETR_DELTA_DOMAIN
: {
3755 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain
));
3758 case NETR_DELTA_GROUP
: {
3759 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->group
));
3762 case NETR_DELTA_DELETE_GROUP
: {
3765 case NETR_DELTA_RENAME_GROUP
: {
3766 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->rename_group
));
3769 case NETR_DELTA_USER
: {
3770 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user
));
3773 case NETR_DELTA_DELETE_USER
: {
3776 case NETR_DELTA_RENAME_USER
: {
3777 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->rename_user
));
3780 case NETR_DELTA_GROUP_MEMBER
: {
3781 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->group_member
));
3784 case NETR_DELTA_ALIAS
: {
3785 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->alias
));
3788 case NETR_DELTA_DELETE_ALIAS
: {
3791 case NETR_DELTA_RENAME_ALIAS
: {
3792 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->rename_alias
));
3795 case NETR_DELTA_ALIAS_MEMBER
: {
3796 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->alias_member
));
3799 case NETR_DELTA_POLICY
: {
3800 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->policy
));
3803 case NETR_DELTA_TRUSTED_DOMAIN
: {
3804 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->trusted_domain
));
3807 case NETR_DELTA_DELETE_TRUST
: {
3808 NDR_CHECK(ndr_push_netr_DELTA_DELETE_TRUST(ndr
, NDR_SCALARS
, &r
->delete_trust
));
3811 case NETR_DELTA_ACCOUNT
: {
3812 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->account
));
3815 case NETR_DELTA_DELETE_ACCOUNT
: {
3816 NDR_CHECK(ndr_push_netr_DELTA_DELETE_ACCOUNT(ndr
, NDR_SCALARS
, &r
->delete_account
));
3819 case NETR_DELTA_SECRET
: {
3820 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->secret
));
3823 case NETR_DELTA_DELETE_SECRET
: {
3824 NDR_CHECK(ndr_push_netr_DELTA_DELETE_SECRET(ndr
, NDR_SCALARS
, &r
->delete_secret
));
3827 case NETR_DELTA_DELETE_GROUP2
: {
3828 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->delete_group
));
3831 case NETR_DELTA_DELETE_USER2
: {
3832 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->delete_user
));
3835 case NETR_DELTA_MODIFY_COUNT
: {
3836 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->modified_count
));
3840 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3843 if (ndr_flags
& NDR_BUFFERS
) {
3844 int level
= ndr_push_get_switch_value(ndr
, r
);
3846 case NETR_DELTA_DOMAIN
:
3848 NDR_CHECK(ndr_push_netr_DELTA_DOMAIN(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain
));
3852 case NETR_DELTA_GROUP
:
3854 NDR_CHECK(ndr_push_netr_DELTA_GROUP(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->group
));
3858 case NETR_DELTA_DELETE_GROUP
:
3861 case NETR_DELTA_RENAME_GROUP
:
3862 if (r
->rename_group
) {
3863 NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->rename_group
));
3867 case NETR_DELTA_USER
:
3869 NDR_CHECK(ndr_push_netr_DELTA_USER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user
));
3873 case NETR_DELTA_DELETE_USER
:
3876 case NETR_DELTA_RENAME_USER
:
3877 if (r
->rename_user
) {
3878 NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->rename_user
));
3882 case NETR_DELTA_GROUP_MEMBER
:
3883 if (r
->group_member
) {
3884 NDR_CHECK(ndr_push_netr_DELTA_GROUP_MEMBER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->group_member
));
3888 case NETR_DELTA_ALIAS
:
3890 NDR_CHECK(ndr_push_netr_DELTA_ALIAS(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->alias
));
3894 case NETR_DELTA_DELETE_ALIAS
:
3897 case NETR_DELTA_RENAME_ALIAS
:
3898 if (r
->rename_alias
) {
3899 NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->rename_alias
));
3903 case NETR_DELTA_ALIAS_MEMBER
:
3904 if (r
->alias_member
) {
3905 NDR_CHECK(ndr_push_netr_DELTA_ALIAS_MEMBER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->alias_member
));
3909 case NETR_DELTA_POLICY
:
3911 NDR_CHECK(ndr_push_netr_DELTA_POLICY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->policy
));
3915 case NETR_DELTA_TRUSTED_DOMAIN
:
3916 if (r
->trusted_domain
) {
3917 NDR_CHECK(ndr_push_netr_DELTA_TRUSTED_DOMAIN(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->trusted_domain
));
3921 case NETR_DELTA_DELETE_TRUST
:
3924 case NETR_DELTA_ACCOUNT
:
3926 NDR_CHECK(ndr_push_netr_DELTA_ACCOUNT(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->account
));
3930 case NETR_DELTA_DELETE_ACCOUNT
:
3933 case NETR_DELTA_SECRET
:
3935 NDR_CHECK(ndr_push_netr_DELTA_SECRET(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->secret
));
3939 case NETR_DELTA_DELETE_SECRET
:
3942 case NETR_DELTA_DELETE_GROUP2
:
3943 if (r
->delete_group
) {
3944 NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->delete_group
));
3948 case NETR_DELTA_DELETE_USER2
:
3949 if (r
->delete_user
) {
3950 NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->delete_user
));
3954 case NETR_DELTA_MODIFY_COUNT
:
3955 if (r
->modified_count
) {
3956 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, *r
->modified_count
));
3961 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3964 return NDR_ERR_SUCCESS
;
3967 static enum ndr_err_code
ndr_pull_netr_DELTA_UNION(struct ndr_pull
*ndr
, int ndr_flags
, union netr_DELTA_UNION
*r
)
3971 TALLOC_CTX
*_mem_save_domain_0
;
3972 TALLOC_CTX
*_mem_save_group_0
;
3973 TALLOC_CTX
*_mem_save_rename_group_0
;
3974 TALLOC_CTX
*_mem_save_user_0
;
3975 TALLOC_CTX
*_mem_save_rename_user_0
;
3976 TALLOC_CTX
*_mem_save_group_member_0
;
3977 TALLOC_CTX
*_mem_save_alias_0
;
3978 TALLOC_CTX
*_mem_save_rename_alias_0
;
3979 TALLOC_CTX
*_mem_save_alias_member_0
;
3980 TALLOC_CTX
*_mem_save_policy_0
;
3981 TALLOC_CTX
*_mem_save_trusted_domain_0
;
3982 TALLOC_CTX
*_mem_save_account_0
;
3983 TALLOC_CTX
*_mem_save_secret_0
;
3984 TALLOC_CTX
*_mem_save_delete_group_0
;
3985 TALLOC_CTX
*_mem_save_delete_user_0
;
3986 TALLOC_CTX
*_mem_save_modified_count_0
;
3987 level
= ndr_pull_get_switch_value(ndr
, r
);
3988 if (ndr_flags
& NDR_SCALARS
) {
3989 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
3990 if (_level
!= level
) {
3991 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
3994 case NETR_DELTA_DOMAIN
: {
3995 uint32_t _ptr_domain
;
3996 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain
));
3998 NDR_PULL_ALLOC(ndr
, r
->domain
);
4004 case NETR_DELTA_GROUP
: {
4005 uint32_t _ptr_group
;
4006 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_group
));
4008 NDR_PULL_ALLOC(ndr
, r
->group
);
4014 case NETR_DELTA_DELETE_GROUP
: {
4017 case NETR_DELTA_RENAME_GROUP
: {
4018 uint32_t _ptr_rename_group
;
4019 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rename_group
));
4020 if (_ptr_rename_group
) {
4021 NDR_PULL_ALLOC(ndr
, r
->rename_group
);
4023 r
->rename_group
= NULL
;
4027 case NETR_DELTA_USER
: {
4029 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user
));
4031 NDR_PULL_ALLOC(ndr
, r
->user
);
4037 case NETR_DELTA_DELETE_USER
: {
4040 case NETR_DELTA_RENAME_USER
: {
4041 uint32_t _ptr_rename_user
;
4042 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rename_user
));
4043 if (_ptr_rename_user
) {
4044 NDR_PULL_ALLOC(ndr
, r
->rename_user
);
4046 r
->rename_user
= NULL
;
4050 case NETR_DELTA_GROUP_MEMBER
: {
4051 uint32_t _ptr_group_member
;
4052 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_group_member
));
4053 if (_ptr_group_member
) {
4054 NDR_PULL_ALLOC(ndr
, r
->group_member
);
4056 r
->group_member
= NULL
;
4060 case NETR_DELTA_ALIAS
: {
4061 uint32_t _ptr_alias
;
4062 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_alias
));
4064 NDR_PULL_ALLOC(ndr
, r
->alias
);
4070 case NETR_DELTA_DELETE_ALIAS
: {
4073 case NETR_DELTA_RENAME_ALIAS
: {
4074 uint32_t _ptr_rename_alias
;
4075 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rename_alias
));
4076 if (_ptr_rename_alias
) {
4077 NDR_PULL_ALLOC(ndr
, r
->rename_alias
);
4079 r
->rename_alias
= NULL
;
4083 case NETR_DELTA_ALIAS_MEMBER
: {
4084 uint32_t _ptr_alias_member
;
4085 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_alias_member
));
4086 if (_ptr_alias_member
) {
4087 NDR_PULL_ALLOC(ndr
, r
->alias_member
);
4089 r
->alias_member
= NULL
;
4093 case NETR_DELTA_POLICY
: {
4094 uint32_t _ptr_policy
;
4095 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_policy
));
4097 NDR_PULL_ALLOC(ndr
, r
->policy
);
4103 case NETR_DELTA_TRUSTED_DOMAIN
: {
4104 uint32_t _ptr_trusted_domain
;
4105 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_trusted_domain
));
4106 if (_ptr_trusted_domain
) {
4107 NDR_PULL_ALLOC(ndr
, r
->trusted_domain
);
4109 r
->trusted_domain
= NULL
;
4113 case NETR_DELTA_DELETE_TRUST
: {
4114 NDR_CHECK(ndr_pull_netr_DELTA_DELETE_TRUST(ndr
, NDR_SCALARS
, &r
->delete_trust
));
4117 case NETR_DELTA_ACCOUNT
: {
4118 uint32_t _ptr_account
;
4119 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account
));
4121 NDR_PULL_ALLOC(ndr
, r
->account
);
4127 case NETR_DELTA_DELETE_ACCOUNT
: {
4128 NDR_CHECK(ndr_pull_netr_DELTA_DELETE_ACCOUNT(ndr
, NDR_SCALARS
, &r
->delete_account
));
4131 case NETR_DELTA_SECRET
: {
4132 uint32_t _ptr_secret
;
4133 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secret
));
4135 NDR_PULL_ALLOC(ndr
, r
->secret
);
4141 case NETR_DELTA_DELETE_SECRET
: {
4142 NDR_CHECK(ndr_pull_netr_DELTA_DELETE_SECRET(ndr
, NDR_SCALARS
, &r
->delete_secret
));
4145 case NETR_DELTA_DELETE_GROUP2
: {
4146 uint32_t _ptr_delete_group
;
4147 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_delete_group
));
4148 if (_ptr_delete_group
) {
4149 NDR_PULL_ALLOC(ndr
, r
->delete_group
);
4151 r
->delete_group
= NULL
;
4155 case NETR_DELTA_DELETE_USER2
: {
4156 uint32_t _ptr_delete_user
;
4157 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_delete_user
));
4158 if (_ptr_delete_user
) {
4159 NDR_PULL_ALLOC(ndr
, r
->delete_user
);
4161 r
->delete_user
= NULL
;
4165 case NETR_DELTA_MODIFY_COUNT
: {
4166 uint32_t _ptr_modified_count
;
4167 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_modified_count
));
4168 if (_ptr_modified_count
) {
4169 NDR_PULL_ALLOC(ndr
, r
->modified_count
);
4171 r
->modified_count
= NULL
;
4176 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4179 if (ndr_flags
& NDR_BUFFERS
) {
4181 case NETR_DELTA_DOMAIN
:
4183 _mem_save_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4184 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain
, 0);
4185 NDR_CHECK(ndr_pull_netr_DELTA_DOMAIN(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain
));
4186 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_0
, 0);
4190 case NETR_DELTA_GROUP
:
4192 _mem_save_group_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4193 NDR_PULL_SET_MEM_CTX(ndr
, r
->group
, 0);
4194 NDR_CHECK(ndr_pull_netr_DELTA_GROUP(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->group
));
4195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_0
, 0);
4199 case NETR_DELTA_DELETE_GROUP
:
4202 case NETR_DELTA_RENAME_GROUP
:
4203 if (r
->rename_group
) {
4204 _mem_save_rename_group_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4205 NDR_PULL_SET_MEM_CTX(ndr
, r
->rename_group
, 0);
4206 NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->rename_group
));
4207 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rename_group_0
, 0);
4211 case NETR_DELTA_USER
:
4213 _mem_save_user_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4214 NDR_PULL_SET_MEM_CTX(ndr
, r
->user
, 0);
4215 NDR_CHECK(ndr_pull_netr_DELTA_USER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user
));
4216 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_0
, 0);
4220 case NETR_DELTA_DELETE_USER
:
4223 case NETR_DELTA_RENAME_USER
:
4224 if (r
->rename_user
) {
4225 _mem_save_rename_user_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4226 NDR_PULL_SET_MEM_CTX(ndr
, r
->rename_user
, 0);
4227 NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->rename_user
));
4228 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rename_user_0
, 0);
4232 case NETR_DELTA_GROUP_MEMBER
:
4233 if (r
->group_member
) {
4234 _mem_save_group_member_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4235 NDR_PULL_SET_MEM_CTX(ndr
, r
->group_member
, 0);
4236 NDR_CHECK(ndr_pull_netr_DELTA_GROUP_MEMBER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->group_member
));
4237 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_member_0
, 0);
4241 case NETR_DELTA_ALIAS
:
4243 _mem_save_alias_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4244 NDR_PULL_SET_MEM_CTX(ndr
, r
->alias
, 0);
4245 NDR_CHECK(ndr_pull_netr_DELTA_ALIAS(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->alias
));
4246 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_0
, 0);
4250 case NETR_DELTA_DELETE_ALIAS
:
4253 case NETR_DELTA_RENAME_ALIAS
:
4254 if (r
->rename_alias
) {
4255 _mem_save_rename_alias_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4256 NDR_PULL_SET_MEM_CTX(ndr
, r
->rename_alias
, 0);
4257 NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->rename_alias
));
4258 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rename_alias_0
, 0);
4262 case NETR_DELTA_ALIAS_MEMBER
:
4263 if (r
->alias_member
) {
4264 _mem_save_alias_member_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4265 NDR_PULL_SET_MEM_CTX(ndr
, r
->alias_member
, 0);
4266 NDR_CHECK(ndr_pull_netr_DELTA_ALIAS_MEMBER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->alias_member
));
4267 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_alias_member_0
, 0);
4271 case NETR_DELTA_POLICY
:
4273 _mem_save_policy_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4274 NDR_PULL_SET_MEM_CTX(ndr
, r
->policy
, 0);
4275 NDR_CHECK(ndr_pull_netr_DELTA_POLICY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->policy
));
4276 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_0
, 0);
4280 case NETR_DELTA_TRUSTED_DOMAIN
:
4281 if (r
->trusted_domain
) {
4282 _mem_save_trusted_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4283 NDR_PULL_SET_MEM_CTX(ndr
, r
->trusted_domain
, 0);
4284 NDR_CHECK(ndr_pull_netr_DELTA_TRUSTED_DOMAIN(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->trusted_domain
));
4285 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_0
, 0);
4289 case NETR_DELTA_DELETE_TRUST
:
4292 case NETR_DELTA_ACCOUNT
:
4294 _mem_save_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4295 NDR_PULL_SET_MEM_CTX(ndr
, r
->account
, 0);
4296 NDR_CHECK(ndr_pull_netr_DELTA_ACCOUNT(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->account
));
4297 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_0
, 0);
4301 case NETR_DELTA_DELETE_ACCOUNT
:
4304 case NETR_DELTA_SECRET
:
4306 _mem_save_secret_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4307 NDR_PULL_SET_MEM_CTX(ndr
, r
->secret
, 0);
4308 NDR_CHECK(ndr_pull_netr_DELTA_SECRET(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->secret
));
4309 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secret_0
, 0);
4313 case NETR_DELTA_DELETE_SECRET
:
4316 case NETR_DELTA_DELETE_GROUP2
:
4317 if (r
->delete_group
) {
4318 _mem_save_delete_group_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4319 NDR_PULL_SET_MEM_CTX(ndr
, r
->delete_group
, 0);
4320 NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->delete_group
));
4321 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delete_group_0
, 0);
4325 case NETR_DELTA_DELETE_USER2
:
4326 if (r
->delete_user
) {
4327 _mem_save_delete_user_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4328 NDR_PULL_SET_MEM_CTX(ndr
, r
->delete_user
, 0);
4329 NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->delete_user
));
4330 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delete_user_0
, 0);
4334 case NETR_DELTA_MODIFY_COUNT
:
4335 if (r
->modified_count
) {
4336 _mem_save_modified_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4337 NDR_PULL_SET_MEM_CTX(ndr
, r
->modified_count
, 0);
4338 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, r
->modified_count
));
4339 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_modified_count_0
, 0);
4344 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4347 return NDR_ERR_SUCCESS
;
4350 _PUBLIC_
void ndr_print_netr_DELTA_UNION(struct ndr_print
*ndr
, const char *name
, const union netr_DELTA_UNION
*r
)
4353 level
= ndr_print_get_switch_value(ndr
, r
);
4354 ndr_print_union(ndr
, name
, level
, "netr_DELTA_UNION");
4356 case NETR_DELTA_DOMAIN
:
4357 ndr_print_ptr(ndr
, "domain", r
->domain
);
4360 ndr_print_netr_DELTA_DOMAIN(ndr
, "domain", r
->domain
);
4365 case NETR_DELTA_GROUP
:
4366 ndr_print_ptr(ndr
, "group", r
->group
);
4369 ndr_print_netr_DELTA_GROUP(ndr
, "group", r
->group
);
4374 case NETR_DELTA_DELETE_GROUP
:
4377 case NETR_DELTA_RENAME_GROUP
:
4378 ndr_print_ptr(ndr
, "rename_group", r
->rename_group
);
4380 if (r
->rename_group
) {
4381 ndr_print_netr_DELTA_RENAME(ndr
, "rename_group", r
->rename_group
);
4386 case NETR_DELTA_USER
:
4387 ndr_print_ptr(ndr
, "user", r
->user
);
4390 ndr_print_netr_DELTA_USER(ndr
, "user", r
->user
);
4395 case NETR_DELTA_DELETE_USER
:
4398 case NETR_DELTA_RENAME_USER
:
4399 ndr_print_ptr(ndr
, "rename_user", r
->rename_user
);
4401 if (r
->rename_user
) {
4402 ndr_print_netr_DELTA_RENAME(ndr
, "rename_user", r
->rename_user
);
4407 case NETR_DELTA_GROUP_MEMBER
:
4408 ndr_print_ptr(ndr
, "group_member", r
->group_member
);
4410 if (r
->group_member
) {
4411 ndr_print_netr_DELTA_GROUP_MEMBER(ndr
, "group_member", r
->group_member
);
4416 case NETR_DELTA_ALIAS
:
4417 ndr_print_ptr(ndr
, "alias", r
->alias
);
4420 ndr_print_netr_DELTA_ALIAS(ndr
, "alias", r
->alias
);
4425 case NETR_DELTA_DELETE_ALIAS
:
4428 case NETR_DELTA_RENAME_ALIAS
:
4429 ndr_print_ptr(ndr
, "rename_alias", r
->rename_alias
);
4431 if (r
->rename_alias
) {
4432 ndr_print_netr_DELTA_RENAME(ndr
, "rename_alias", r
->rename_alias
);
4437 case NETR_DELTA_ALIAS_MEMBER
:
4438 ndr_print_ptr(ndr
, "alias_member", r
->alias_member
);
4440 if (r
->alias_member
) {
4441 ndr_print_netr_DELTA_ALIAS_MEMBER(ndr
, "alias_member", r
->alias_member
);
4446 case NETR_DELTA_POLICY
:
4447 ndr_print_ptr(ndr
, "policy", r
->policy
);
4450 ndr_print_netr_DELTA_POLICY(ndr
, "policy", r
->policy
);
4455 case NETR_DELTA_TRUSTED_DOMAIN
:
4456 ndr_print_ptr(ndr
, "trusted_domain", r
->trusted_domain
);
4458 if (r
->trusted_domain
) {
4459 ndr_print_netr_DELTA_TRUSTED_DOMAIN(ndr
, "trusted_domain", r
->trusted_domain
);
4464 case NETR_DELTA_DELETE_TRUST
:
4465 ndr_print_netr_DELTA_DELETE_TRUST(ndr
, "delete_trust", &r
->delete_trust
);
4468 case NETR_DELTA_ACCOUNT
:
4469 ndr_print_ptr(ndr
, "account", r
->account
);
4472 ndr_print_netr_DELTA_ACCOUNT(ndr
, "account", r
->account
);
4477 case NETR_DELTA_DELETE_ACCOUNT
:
4478 ndr_print_netr_DELTA_DELETE_ACCOUNT(ndr
, "delete_account", &r
->delete_account
);
4481 case NETR_DELTA_SECRET
:
4482 ndr_print_ptr(ndr
, "secret", r
->secret
);
4485 ndr_print_netr_DELTA_SECRET(ndr
, "secret", r
->secret
);
4490 case NETR_DELTA_DELETE_SECRET
:
4491 ndr_print_netr_DELTA_DELETE_SECRET(ndr
, "delete_secret", &r
->delete_secret
);
4494 case NETR_DELTA_DELETE_GROUP2
:
4495 ndr_print_ptr(ndr
, "delete_group", r
->delete_group
);
4497 if (r
->delete_group
) {
4498 ndr_print_netr_DELTA_DELETE_USER(ndr
, "delete_group", r
->delete_group
);
4503 case NETR_DELTA_DELETE_USER2
:
4504 ndr_print_ptr(ndr
, "delete_user", r
->delete_user
);
4506 if (r
->delete_user
) {
4507 ndr_print_netr_DELTA_DELETE_USER(ndr
, "delete_user", r
->delete_user
);
4512 case NETR_DELTA_MODIFY_COUNT
:
4513 ndr_print_ptr(ndr
, "modified_count", r
->modified_count
);
4515 if (r
->modified_count
) {
4516 ndr_print_udlong(ndr
, "modified_count", *r
->modified_count
);
4522 ndr_print_bad_level(ndr
, name
, level
);
4526 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
)
4528 if (ndr_flags
& NDR_SCALARS
) {
4529 int level
= ndr_push_get_switch_value(ndr
, r
);
4530 NDR_CHECK(ndr_push_netr_DeltaEnum(ndr
, NDR_SCALARS
, level
));
4532 case NETR_DELTA_DOMAIN
: {
4533 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4536 case NETR_DELTA_GROUP
: {
4537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4540 case NETR_DELTA_DELETE_GROUP
: {
4541 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4544 case NETR_DELTA_RENAME_GROUP
: {
4545 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4548 case NETR_DELTA_USER
: {
4549 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4552 case NETR_DELTA_DELETE_USER
: {
4553 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4556 case NETR_DELTA_RENAME_USER
: {
4557 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4560 case NETR_DELTA_GROUP_MEMBER
: {
4561 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4564 case NETR_DELTA_ALIAS
: {
4565 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4568 case NETR_DELTA_DELETE_ALIAS
: {
4569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4572 case NETR_DELTA_RENAME_ALIAS
: {
4573 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4576 case NETR_DELTA_ALIAS_MEMBER
: {
4577 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4580 case NETR_DELTA_POLICY
: {
4581 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
4584 case NETR_DELTA_TRUSTED_DOMAIN
: {
4585 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
4588 case NETR_DELTA_DELETE_TRUST
: {
4589 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
4592 case NETR_DELTA_ACCOUNT
: {
4593 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
4596 case NETR_DELTA_DELETE_ACCOUNT
: {
4597 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
4600 case NETR_DELTA_SECRET
: {
4601 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
4604 case NETR_DELTA_DELETE_SECRET
: {
4605 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
4608 case NETR_DELTA_DELETE_GROUP2
: {
4609 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4612 case NETR_DELTA_DELETE_USER2
: {
4613 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4616 case NETR_DELTA_MODIFY_COUNT
: {
4620 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4623 if (ndr_flags
& NDR_BUFFERS
) {
4624 int level
= ndr_push_get_switch_value(ndr
, r
);
4626 case NETR_DELTA_DOMAIN
:
4629 case NETR_DELTA_GROUP
:
4632 case NETR_DELTA_DELETE_GROUP
:
4635 case NETR_DELTA_RENAME_GROUP
:
4638 case NETR_DELTA_USER
:
4641 case NETR_DELTA_DELETE_USER
:
4644 case NETR_DELTA_RENAME_USER
:
4647 case NETR_DELTA_GROUP_MEMBER
:
4650 case NETR_DELTA_ALIAS
:
4653 case NETR_DELTA_DELETE_ALIAS
:
4656 case NETR_DELTA_RENAME_ALIAS
:
4659 case NETR_DELTA_ALIAS_MEMBER
:
4662 case NETR_DELTA_POLICY
:
4664 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4668 case NETR_DELTA_TRUSTED_DOMAIN
:
4670 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4674 case NETR_DELTA_DELETE_TRUST
:
4676 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4680 case NETR_DELTA_ACCOUNT
:
4682 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4686 case NETR_DELTA_DELETE_ACCOUNT
:
4688 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4692 case NETR_DELTA_SECRET
:
4694 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
4695 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4696 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
4697 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, ndr_charset_length(r
->name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4701 case NETR_DELTA_DELETE_SECRET
:
4703 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
4704 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4705 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
4706 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, ndr_charset_length(r
->name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4710 case NETR_DELTA_DELETE_GROUP2
:
4713 case NETR_DELTA_DELETE_USER2
:
4716 case NETR_DELTA_MODIFY_COUNT
:
4720 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4723 return NDR_ERR_SUCCESS
;
4726 static enum ndr_err_code
ndr_pull_netr_DELTA_ID_UNION(struct ndr_pull
*ndr
, int ndr_flags
, union netr_DELTA_ID_UNION
*r
)
4730 TALLOC_CTX
*_mem_save_sid_0
;
4731 TALLOC_CTX
*_mem_save_name_0
;
4732 level
= ndr_pull_get_switch_value(ndr
, r
);
4733 if (ndr_flags
& NDR_SCALARS
) {
4734 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
4735 if (_level
!= level
) {
4736 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4739 case NETR_DELTA_DOMAIN
: {
4740 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4743 case NETR_DELTA_GROUP
: {
4744 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4747 case NETR_DELTA_DELETE_GROUP
: {
4748 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4751 case NETR_DELTA_RENAME_GROUP
: {
4752 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4755 case NETR_DELTA_USER
: {
4756 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4759 case NETR_DELTA_DELETE_USER
: {
4760 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4763 case NETR_DELTA_RENAME_USER
: {
4764 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4767 case NETR_DELTA_GROUP_MEMBER
: {
4768 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4771 case NETR_DELTA_ALIAS
: {
4772 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4775 case NETR_DELTA_DELETE_ALIAS
: {
4776 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4779 case NETR_DELTA_RENAME_ALIAS
: {
4780 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4783 case NETR_DELTA_ALIAS_MEMBER
: {
4784 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4787 case NETR_DELTA_POLICY
: {
4789 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
4791 NDR_PULL_ALLOC(ndr
, r
->sid
);
4797 case NETR_DELTA_TRUSTED_DOMAIN
: {
4799 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
4801 NDR_PULL_ALLOC(ndr
, r
->sid
);
4807 case NETR_DELTA_DELETE_TRUST
: {
4809 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
4811 NDR_PULL_ALLOC(ndr
, r
->sid
);
4817 case NETR_DELTA_ACCOUNT
: {
4819 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
4821 NDR_PULL_ALLOC(ndr
, r
->sid
);
4827 case NETR_DELTA_DELETE_ACCOUNT
: {
4829 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
4831 NDR_PULL_ALLOC(ndr
, r
->sid
);
4837 case NETR_DELTA_SECRET
: {
4839 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
4841 NDR_PULL_ALLOC(ndr
, r
->name
);
4847 case NETR_DELTA_DELETE_SECRET
: {
4849 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
4851 NDR_PULL_ALLOC(ndr
, r
->name
);
4857 case NETR_DELTA_DELETE_GROUP2
: {
4858 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4861 case NETR_DELTA_DELETE_USER2
: {
4862 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4865 case NETR_DELTA_MODIFY_COUNT
: {
4869 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4872 if (ndr_flags
& NDR_BUFFERS
) {
4874 case NETR_DELTA_DOMAIN
:
4877 case NETR_DELTA_GROUP
:
4880 case NETR_DELTA_DELETE_GROUP
:
4883 case NETR_DELTA_RENAME_GROUP
:
4886 case NETR_DELTA_USER
:
4889 case NETR_DELTA_DELETE_USER
:
4892 case NETR_DELTA_RENAME_USER
:
4895 case NETR_DELTA_GROUP_MEMBER
:
4898 case NETR_DELTA_ALIAS
:
4901 case NETR_DELTA_DELETE_ALIAS
:
4904 case NETR_DELTA_RENAME_ALIAS
:
4907 case NETR_DELTA_ALIAS_MEMBER
:
4910 case NETR_DELTA_POLICY
:
4912 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4913 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
4914 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4915 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
4919 case NETR_DELTA_TRUSTED_DOMAIN
:
4921 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4922 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
4923 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4924 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
4928 case NETR_DELTA_DELETE_TRUST
:
4930 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4931 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
4932 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4933 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
4937 case NETR_DELTA_ACCOUNT
:
4939 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4940 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
4941 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4942 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
4946 case NETR_DELTA_DELETE_ACCOUNT
:
4948 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4949 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
4950 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4951 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
4955 case NETR_DELTA_SECRET
:
4957 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4958 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
4959 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->name
));
4960 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->name
));
4961 if (ndr_get_array_length(ndr
, &r
->name
) > ndr_get_array_size(ndr
, &r
->name
)) {
4962 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->name
), ndr_get_array_length(ndr
, &r
->name
));
4964 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t)));
4965 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t), CH_UTF16
));
4966 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
4970 case NETR_DELTA_DELETE_SECRET
:
4972 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4973 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
4974 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->name
));
4975 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->name
));
4976 if (ndr_get_array_length(ndr
, &r
->name
) > ndr_get_array_size(ndr
, &r
->name
)) {
4977 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->name
), ndr_get_array_length(ndr
, &r
->name
));
4979 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t)));
4980 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t), CH_UTF16
));
4981 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
4985 case NETR_DELTA_DELETE_GROUP2
:
4988 case NETR_DELTA_DELETE_USER2
:
4991 case NETR_DELTA_MODIFY_COUNT
:
4995 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4998 return NDR_ERR_SUCCESS
;
5001 _PUBLIC_
void ndr_print_netr_DELTA_ID_UNION(struct ndr_print
*ndr
, const char *name
, const union netr_DELTA_ID_UNION
*r
)
5004 level
= ndr_print_get_switch_value(ndr
, r
);
5005 ndr_print_union(ndr
, name
, level
, "netr_DELTA_ID_UNION");
5007 case NETR_DELTA_DOMAIN
:
5008 ndr_print_uint32(ndr
, "rid", r
->rid
);
5011 case NETR_DELTA_GROUP
:
5012 ndr_print_uint32(ndr
, "rid", r
->rid
);
5015 case NETR_DELTA_DELETE_GROUP
:
5016 ndr_print_uint32(ndr
, "rid", r
->rid
);
5019 case NETR_DELTA_RENAME_GROUP
:
5020 ndr_print_uint32(ndr
, "rid", r
->rid
);
5023 case NETR_DELTA_USER
:
5024 ndr_print_uint32(ndr
, "rid", r
->rid
);
5027 case NETR_DELTA_DELETE_USER
:
5028 ndr_print_uint32(ndr
, "rid", r
->rid
);
5031 case NETR_DELTA_RENAME_USER
:
5032 ndr_print_uint32(ndr
, "rid", r
->rid
);
5035 case NETR_DELTA_GROUP_MEMBER
:
5036 ndr_print_uint32(ndr
, "rid", r
->rid
);
5039 case NETR_DELTA_ALIAS
:
5040 ndr_print_uint32(ndr
, "rid", r
->rid
);
5043 case NETR_DELTA_DELETE_ALIAS
:
5044 ndr_print_uint32(ndr
, "rid", r
->rid
);
5047 case NETR_DELTA_RENAME_ALIAS
:
5048 ndr_print_uint32(ndr
, "rid", r
->rid
);
5051 case NETR_DELTA_ALIAS_MEMBER
:
5052 ndr_print_uint32(ndr
, "rid", r
->rid
);
5055 case NETR_DELTA_POLICY
:
5056 ndr_print_ptr(ndr
, "sid", r
->sid
);
5059 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
5064 case NETR_DELTA_TRUSTED_DOMAIN
:
5065 ndr_print_ptr(ndr
, "sid", r
->sid
);
5068 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
5073 case NETR_DELTA_DELETE_TRUST
:
5074 ndr_print_ptr(ndr
, "sid", r
->sid
);
5077 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
5082 case NETR_DELTA_ACCOUNT
:
5083 ndr_print_ptr(ndr
, "sid", r
->sid
);
5086 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
5091 case NETR_DELTA_DELETE_ACCOUNT
:
5092 ndr_print_ptr(ndr
, "sid", r
->sid
);
5095 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
5100 case NETR_DELTA_SECRET
:
5101 ndr_print_ptr(ndr
, "name", r
->name
);
5104 ndr_print_string(ndr
, "name", r
->name
);
5109 case NETR_DELTA_DELETE_SECRET
:
5110 ndr_print_ptr(ndr
, "name", r
->name
);
5113 ndr_print_string(ndr
, "name", r
->name
);
5118 case NETR_DELTA_DELETE_GROUP2
:
5119 ndr_print_uint32(ndr
, "rid", r
->rid
);
5122 case NETR_DELTA_DELETE_USER2
:
5123 ndr_print_uint32(ndr
, "rid", r
->rid
);
5126 case NETR_DELTA_MODIFY_COUNT
:
5130 ndr_print_bad_level(ndr
, name
, level
);
5134 static enum ndr_err_code
ndr_push_netr_DELTA_ENUM(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DELTA_ENUM
*r
)
5136 if (ndr_flags
& NDR_SCALARS
) {
5137 NDR_CHECK(ndr_push_align(ndr
, 4));
5138 NDR_CHECK(ndr_push_netr_DeltaEnum(ndr
, NDR_SCALARS
, r
->delta_type
));
5139 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->delta_id_union
, r
->delta_type
));
5140 NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr
, NDR_SCALARS
, &r
->delta_id_union
));
5141 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->delta_union
, r
->delta_type
));
5142 NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr
, NDR_SCALARS
, &r
->delta_union
));
5144 if (ndr_flags
& NDR_BUFFERS
) {
5145 NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr
, NDR_BUFFERS
, &r
->delta_id_union
));
5146 NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr
, NDR_BUFFERS
, &r
->delta_union
));
5148 return NDR_ERR_SUCCESS
;
5151 static enum ndr_err_code
ndr_pull_netr_DELTA_ENUM(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_ENUM
*r
)
5153 if (ndr_flags
& NDR_SCALARS
) {
5154 NDR_CHECK(ndr_pull_align(ndr
, 4));
5155 NDR_CHECK(ndr_pull_netr_DeltaEnum(ndr
, NDR_SCALARS
, &r
->delta_type
));
5156 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->delta_id_union
, r
->delta_type
));
5157 NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr
, NDR_SCALARS
, &r
->delta_id_union
));
5158 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->delta_union
, r
->delta_type
));
5159 NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr
, NDR_SCALARS
, &r
->delta_union
));
5161 if (ndr_flags
& NDR_BUFFERS
) {
5162 NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr
, NDR_BUFFERS
, &r
->delta_id_union
));
5163 NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr
, NDR_BUFFERS
, &r
->delta_union
));
5165 return NDR_ERR_SUCCESS
;
5168 _PUBLIC_
void ndr_print_netr_DELTA_ENUM(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_ENUM
*r
)
5170 ndr_print_struct(ndr
, name
, "netr_DELTA_ENUM");
5172 ndr_print_netr_DeltaEnum(ndr
, "delta_type", r
->delta_type
);
5173 ndr_print_set_switch_value(ndr
, &r
->delta_id_union
, r
->delta_type
);
5174 ndr_print_netr_DELTA_ID_UNION(ndr
, "delta_id_union", &r
->delta_id_union
);
5175 ndr_print_set_switch_value(ndr
, &r
->delta_union
, r
->delta_type
);
5176 ndr_print_netr_DELTA_UNION(ndr
, "delta_union", &r
->delta_union
);
5180 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
)
5182 uint32_t cntr_delta_enum_1
;
5183 if (ndr_flags
& NDR_SCALARS
) {
5184 NDR_CHECK(ndr_push_align(ndr
, 4));
5185 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_deltas
));
5186 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->delta_enum
));
5188 if (ndr_flags
& NDR_BUFFERS
) {
5189 if (r
->delta_enum
) {
5190 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_deltas
));
5191 for (cntr_delta_enum_1
= 0; cntr_delta_enum_1
< r
->num_deltas
; cntr_delta_enum_1
++) {
5192 NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr
, NDR_SCALARS
, &r
->delta_enum
[cntr_delta_enum_1
]));
5194 for (cntr_delta_enum_1
= 0; cntr_delta_enum_1
< r
->num_deltas
; cntr_delta_enum_1
++) {
5195 NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr
, NDR_BUFFERS
, &r
->delta_enum
[cntr_delta_enum_1
]));
5199 return NDR_ERR_SUCCESS
;
5202 static enum ndr_err_code
ndr_pull_netr_DELTA_ENUM_ARRAY(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DELTA_ENUM_ARRAY
*r
)
5204 uint32_t _ptr_delta_enum
;
5205 uint32_t cntr_delta_enum_1
;
5206 TALLOC_CTX
*_mem_save_delta_enum_0
;
5207 TALLOC_CTX
*_mem_save_delta_enum_1
;
5208 if (ndr_flags
& NDR_SCALARS
) {
5209 NDR_CHECK(ndr_pull_align(ndr
, 4));
5210 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_deltas
));
5211 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_delta_enum
));
5212 if (_ptr_delta_enum
) {
5213 NDR_PULL_ALLOC(ndr
, r
->delta_enum
);
5215 r
->delta_enum
= NULL
;
5218 if (ndr_flags
& NDR_BUFFERS
) {
5219 if (r
->delta_enum
) {
5220 _mem_save_delta_enum_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5221 NDR_PULL_SET_MEM_CTX(ndr
, r
->delta_enum
, 0);
5222 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->delta_enum
));
5223 NDR_PULL_ALLOC_N(ndr
, r
->delta_enum
, ndr_get_array_size(ndr
, &r
->delta_enum
));
5224 _mem_save_delta_enum_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5225 NDR_PULL_SET_MEM_CTX(ndr
, r
->delta_enum
, 0);
5226 for (cntr_delta_enum_1
= 0; cntr_delta_enum_1
< r
->num_deltas
; cntr_delta_enum_1
++) {
5227 NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr
, NDR_SCALARS
, &r
->delta_enum
[cntr_delta_enum_1
]));
5229 for (cntr_delta_enum_1
= 0; cntr_delta_enum_1
< r
->num_deltas
; cntr_delta_enum_1
++) {
5230 NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr
, NDR_BUFFERS
, &r
->delta_enum
[cntr_delta_enum_1
]));
5232 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delta_enum_1
, 0);
5233 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delta_enum_0
, 0);
5235 if (r
->delta_enum
) {
5236 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->delta_enum
, r
->num_deltas
));
5239 return NDR_ERR_SUCCESS
;
5242 _PUBLIC_
void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print
*ndr
, const char *name
, const struct netr_DELTA_ENUM_ARRAY
*r
)
5244 uint32_t cntr_delta_enum_1
;
5245 ndr_print_struct(ndr
, name
, "netr_DELTA_ENUM_ARRAY");
5247 ndr_print_uint32(ndr
, "num_deltas", r
->num_deltas
);
5248 ndr_print_ptr(ndr
, "delta_enum", r
->delta_enum
);
5250 if (r
->delta_enum
) {
5251 ndr
->print(ndr
, "%s: ARRAY(%d)", "delta_enum", r
->num_deltas
);
5253 for (cntr_delta_enum_1
=0;cntr_delta_enum_1
<r
->num_deltas
;cntr_delta_enum_1
++) {
5255 if (asprintf(&idx_1
, "[%d]", cntr_delta_enum_1
) != -1) {
5256 ndr_print_netr_DELTA_ENUM(ndr
, "delta_enum", &r
->delta_enum
[cntr_delta_enum_1
]);
5266 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
)
5269 uint32_t _flags_save_STRUCT
= ndr
->flags
;
5270 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
5271 if (ndr_flags
& NDR_SCALARS
) {
5272 NDR_CHECK(ndr_push_align(ndr
, 4));
5273 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->computer_name
, 16));
5274 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timecreated
));
5275 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->serial_number
));
5277 if (ndr_flags
& NDR_BUFFERS
) {
5279 ndr
->flags
= _flags_save_STRUCT
;
5281 return NDR_ERR_SUCCESS
;
5284 static enum ndr_err_code
ndr_pull_netr_UAS_INFO_0(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_UAS_INFO_0
*r
)
5287 uint32_t _flags_save_STRUCT
= ndr
->flags
;
5288 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
5289 if (ndr_flags
& NDR_SCALARS
) {
5290 NDR_CHECK(ndr_pull_align(ndr
, 4));
5291 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->computer_name
, 16));
5292 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timecreated
));
5293 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->serial_number
));
5295 if (ndr_flags
& NDR_BUFFERS
) {
5297 ndr
->flags
= _flags_save_STRUCT
;
5299 return NDR_ERR_SUCCESS
;
5302 _PUBLIC_
void ndr_print_netr_UAS_INFO_0(struct ndr_print
*ndr
, const char *name
, const struct netr_UAS_INFO_0
*r
)
5304 ndr_print_struct(ndr
, name
, "netr_UAS_INFO_0");
5306 uint32_t _flags_save_STRUCT
= ndr
->flags
;
5307 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
5309 ndr_print_array_uint8(ndr
, "computer_name", r
->computer_name
, 16);
5310 ndr_print_uint32(ndr
, "timecreated", r
->timecreated
);
5311 ndr_print_uint32(ndr
, "serial_number", r
->serial_number
);
5313 ndr
->flags
= _flags_save_STRUCT
;
5317 static enum ndr_err_code
ndr_push_netr_AccountBuffer(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_AccountBuffer
*r
)
5319 if (ndr_flags
& NDR_SCALARS
) {
5320 NDR_CHECK(ndr_push_align(ndr
, 4));
5322 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
5323 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
5324 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->blob
));
5325 ndr
->flags
= _flags_save_DATA_BLOB
;
5328 if (ndr_flags
& NDR_BUFFERS
) {
5330 return NDR_ERR_SUCCESS
;
5333 static enum ndr_err_code
ndr_pull_netr_AccountBuffer(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_AccountBuffer
*r
)
5335 if (ndr_flags
& NDR_SCALARS
) {
5336 NDR_CHECK(ndr_pull_align(ndr
, 4));
5338 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
5339 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
5340 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->blob
));
5341 ndr
->flags
= _flags_save_DATA_BLOB
;
5344 if (ndr_flags
& NDR_BUFFERS
) {
5346 return NDR_ERR_SUCCESS
;
5349 _PUBLIC_
void ndr_print_netr_AccountBuffer(struct ndr_print
*ndr
, const char *name
, const struct netr_AccountBuffer
*r
)
5351 ndr_print_struct(ndr
, name
, "netr_AccountBuffer");
5353 ndr_print_DATA_BLOB(ndr
, "blob", r
->blob
);
5357 static enum ndr_err_code
ndr_push_netr_InfoFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
5359 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5360 return NDR_ERR_SUCCESS
;
5363 static enum ndr_err_code
ndr_pull_netr_InfoFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
5366 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5368 return NDR_ERR_SUCCESS
;
5371 _PUBLIC_
void ndr_print_netr_InfoFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
5373 ndr_print_uint32(ndr
, name
, r
);
5375 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_CTRL_REPL_NEEDED", NETLOGON_CTRL_REPL_NEEDED
, r
);
5376 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_CTRL_REPL_IN_PROGRESS", NETLOGON_CTRL_REPL_IN_PROGRESS
, r
);
5377 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_CTRL_REPL_FULL_SYNC", NETLOGON_CTRL_REPL_FULL_SYNC
, r
);
5381 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
)
5383 if (ndr_flags
& NDR_SCALARS
) {
5384 NDR_CHECK(ndr_push_align(ndr
, 4));
5385 NDR_CHECK(ndr_push_netr_InfoFlags(ndr
, NDR_SCALARS
, r
->flags
));
5386 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pdc_connection_status
));
5388 if (ndr_flags
& NDR_BUFFERS
) {
5390 return NDR_ERR_SUCCESS
;
5393 static enum ndr_err_code
ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_NETLOGON_INFO_1
*r
)
5395 if (ndr_flags
& NDR_SCALARS
) {
5396 NDR_CHECK(ndr_pull_align(ndr
, 4));
5397 NDR_CHECK(ndr_pull_netr_InfoFlags(ndr
, NDR_SCALARS
, &r
->flags
));
5398 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pdc_connection_status
));
5400 if (ndr_flags
& NDR_BUFFERS
) {
5402 return NDR_ERR_SUCCESS
;
5405 _PUBLIC_
void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print
*ndr
, const char *name
, const struct netr_NETLOGON_INFO_1
*r
)
5407 ndr_print_struct(ndr
, name
, "netr_NETLOGON_INFO_1");
5409 ndr_print_netr_InfoFlags(ndr
, "flags", r
->flags
);
5410 ndr_print_uint32(ndr
, "pdc_connection_status", r
->pdc_connection_status
);
5414 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
)
5416 if (ndr_flags
& NDR_SCALARS
) {
5417 NDR_CHECK(ndr_push_align(ndr
, 4));
5418 NDR_CHECK(ndr_push_netr_InfoFlags(ndr
, NDR_SCALARS
, r
->flags
));
5419 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pdc_connection_status
));
5420 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->trusted_dc_name
));
5421 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->tc_connection_status
));
5423 if (ndr_flags
& NDR_BUFFERS
) {
5424 if (r
->trusted_dc_name
) {
5425 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->trusted_dc_name
, CH_UTF16
)));
5426 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5427 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->trusted_dc_name
, CH_UTF16
)));
5428 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
));
5431 return NDR_ERR_SUCCESS
;
5434 static enum ndr_err_code
ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_NETLOGON_INFO_2
*r
)
5436 uint32_t _ptr_trusted_dc_name
;
5437 TALLOC_CTX
*_mem_save_trusted_dc_name_0
;
5438 if (ndr_flags
& NDR_SCALARS
) {
5439 NDR_CHECK(ndr_pull_align(ndr
, 4));
5440 NDR_CHECK(ndr_pull_netr_InfoFlags(ndr
, NDR_SCALARS
, &r
->flags
));
5441 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pdc_connection_status
));
5442 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_trusted_dc_name
));
5443 if (_ptr_trusted_dc_name
) {
5444 NDR_PULL_ALLOC(ndr
, r
->trusted_dc_name
);
5446 r
->trusted_dc_name
= NULL
;
5448 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->tc_connection_status
));
5450 if (ndr_flags
& NDR_BUFFERS
) {
5451 if (r
->trusted_dc_name
) {
5452 _mem_save_trusted_dc_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5453 NDR_PULL_SET_MEM_CTX(ndr
, r
->trusted_dc_name
, 0);
5454 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->trusted_dc_name
));
5455 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->trusted_dc_name
));
5456 if (ndr_get_array_length(ndr
, &r
->trusted_dc_name
) > ndr_get_array_size(ndr
, &r
->trusted_dc_name
)) {
5457 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->trusted_dc_name
), ndr_get_array_length(ndr
, &r
->trusted_dc_name
));
5459 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->trusted_dc_name
), sizeof(uint16_t)));
5460 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->trusted_dc_name
, ndr_get_array_length(ndr
, &r
->trusted_dc_name
), sizeof(uint16_t), CH_UTF16
));
5461 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_dc_name_0
, 0);
5464 return NDR_ERR_SUCCESS
;
5467 _PUBLIC_
void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print
*ndr
, const char *name
, const struct netr_NETLOGON_INFO_2
*r
)
5469 ndr_print_struct(ndr
, name
, "netr_NETLOGON_INFO_2");
5471 ndr_print_netr_InfoFlags(ndr
, "flags", r
->flags
);
5472 ndr_print_uint32(ndr
, "pdc_connection_status", r
->pdc_connection_status
);
5473 ndr_print_ptr(ndr
, "trusted_dc_name", r
->trusted_dc_name
);
5475 if (r
->trusted_dc_name
) {
5476 ndr_print_string(ndr
, "trusted_dc_name", r
->trusted_dc_name
);
5479 ndr_print_uint32(ndr
, "tc_connection_status", r
->tc_connection_status
);
5483 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
)
5485 if (ndr_flags
& NDR_SCALARS
) {
5486 NDR_CHECK(ndr_push_align(ndr
, 4));
5487 NDR_CHECK(ndr_push_netr_InfoFlags(ndr
, NDR_SCALARS
, r
->flags
));
5488 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->logon_attempts
));
5489 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
5490 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
5491 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown3
));
5492 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown4
));
5493 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown5
));
5495 if (ndr_flags
& NDR_BUFFERS
) {
5497 return NDR_ERR_SUCCESS
;
5500 static enum ndr_err_code
ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_NETLOGON_INFO_3
*r
)
5502 if (ndr_flags
& NDR_SCALARS
) {
5503 NDR_CHECK(ndr_pull_align(ndr
, 4));
5504 NDR_CHECK(ndr_pull_netr_InfoFlags(ndr
, NDR_SCALARS
, &r
->flags
));
5505 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->logon_attempts
));
5506 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
5507 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
5508 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown3
));
5509 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown4
));
5510 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown5
));
5512 if (ndr_flags
& NDR_BUFFERS
) {
5514 return NDR_ERR_SUCCESS
;
5517 _PUBLIC_
void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print
*ndr
, const char *name
, const struct netr_NETLOGON_INFO_3
*r
)
5519 ndr_print_struct(ndr
, name
, "netr_NETLOGON_INFO_3");
5521 ndr_print_netr_InfoFlags(ndr
, "flags", r
->flags
);
5522 ndr_print_uint32(ndr
, "logon_attempts", r
->logon_attempts
);
5523 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
5524 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
5525 ndr_print_uint32(ndr
, "unknown3", r
->unknown3
);
5526 ndr_print_uint32(ndr
, "unknown4", r
->unknown4
);
5527 ndr_print_uint32(ndr
, "unknown5", r
->unknown5
);
5531 static enum ndr_err_code
ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push
*ndr
, int ndr_flags
, const union netr_CONTROL_QUERY_INFORMATION
*r
)
5533 if (ndr_flags
& NDR_SCALARS
) {
5534 int level
= ndr_push_get_switch_value(ndr
, r
);
5535 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
5538 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
5542 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
5546 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
5550 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5553 if (ndr_flags
& NDR_BUFFERS
) {
5554 int level
= ndr_push_get_switch_value(ndr
, r
);
5558 NDR_CHECK(ndr_push_netr_NETLOGON_INFO_1(ndr
, NDR_SCALARS
, r
->info1
));
5564 NDR_CHECK(ndr_push_netr_NETLOGON_INFO_2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
5570 NDR_CHECK(ndr_push_netr_NETLOGON_INFO_3(ndr
, NDR_SCALARS
, r
->info3
));
5575 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5578 return NDR_ERR_SUCCESS
;
5581 static enum ndr_err_code
ndr_pull_netr_CONTROL_QUERY_INFORMATION(struct ndr_pull
*ndr
, int ndr_flags
, union netr_CONTROL_QUERY_INFORMATION
*r
)
5585 TALLOC_CTX
*_mem_save_info1_0
;
5586 TALLOC_CTX
*_mem_save_info2_0
;
5587 TALLOC_CTX
*_mem_save_info3_0
;
5588 level
= ndr_pull_get_switch_value(ndr
, r
);
5589 if (ndr_flags
& NDR_SCALARS
) {
5590 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
5591 if (_level
!= level
) {
5592 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5596 uint32_t _ptr_info1
;
5597 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
5599 NDR_PULL_ALLOC(ndr
, r
->info1
);
5606 uint32_t _ptr_info2
;
5607 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
5609 NDR_PULL_ALLOC(ndr
, r
->info2
);
5616 uint32_t _ptr_info3
;
5617 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
5619 NDR_PULL_ALLOC(ndr
, r
->info3
);
5626 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5629 if (ndr_flags
& NDR_BUFFERS
) {
5633 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5634 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
5635 NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_1(ndr
, NDR_SCALARS
, r
->info1
));
5636 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
5642 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5643 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
5644 NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
5645 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
5651 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5652 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
5653 NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_3(ndr
, NDR_SCALARS
, r
->info3
));
5654 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
5659 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5662 return NDR_ERR_SUCCESS
;
5665 _PUBLIC_
void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print
*ndr
, const char *name
, const union netr_CONTROL_QUERY_INFORMATION
*r
)
5668 level
= ndr_print_get_switch_value(ndr
, r
);
5669 ndr_print_union(ndr
, name
, level
, "netr_CONTROL_QUERY_INFORMATION");
5672 ndr_print_ptr(ndr
, "info1", r
->info1
);
5675 ndr_print_netr_NETLOGON_INFO_1(ndr
, "info1", r
->info1
);
5681 ndr_print_ptr(ndr
, "info2", r
->info2
);
5684 ndr_print_netr_NETLOGON_INFO_2(ndr
, "info2", r
->info2
);
5690 ndr_print_ptr(ndr
, "info3", r
->info3
);
5693 ndr_print_netr_NETLOGON_INFO_3(ndr
, "info3", r
->info3
);
5699 ndr_print_bad_level(ndr
, name
, level
);
5703 static enum ndr_err_code
ndr_push_netr_LogonControlCode(struct ndr_push
*ndr
, int ndr_flags
, enum netr_LogonControlCode r
)
5705 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5706 return NDR_ERR_SUCCESS
;
5709 static enum ndr_err_code
ndr_pull_netr_LogonControlCode(struct ndr_pull
*ndr
, int ndr_flags
, enum netr_LogonControlCode
*r
)
5712 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5714 return NDR_ERR_SUCCESS
;
5717 _PUBLIC_
void ndr_print_netr_LogonControlCode(struct ndr_print
*ndr
, const char *name
, enum netr_LogonControlCode r
)
5719 const char *val
= NULL
;
5722 case NETLOGON_CONTROL_SYNC
: val
= "NETLOGON_CONTROL_SYNC"; break;
5723 case NETLOGON_CONTROL_REDISCOVER
: val
= "NETLOGON_CONTROL_REDISCOVER"; break;
5724 case NETLOGON_CONTROL_TC_QUERY
: val
= "NETLOGON_CONTROL_TC_QUERY"; break;
5725 case NETLOGON_CONTROL_TRANSPORT_NOTIFY
: val
= "NETLOGON_CONTROL_TRANSPORT_NOTIFY"; break;
5726 case NETLOGON_CONTROL_SET_DBFLAG
: val
= "NETLOGON_CONTROL_SET_DBFLAG"; break;
5728 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5731 static enum ndr_err_code
ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push
*ndr
, int ndr_flags
, const union netr_CONTROL_DATA_INFORMATION
*r
)
5733 if (ndr_flags
& NDR_SCALARS
) {
5734 int level
= ndr_push_get_switch_value(ndr
, r
);
5735 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
5737 case NETLOGON_CONTROL_REDISCOVER
: {
5738 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain
));
5741 case NETLOGON_CONTROL_TC_QUERY
: {
5742 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain
));
5745 case NETLOGON_CONTROL_TRANSPORT_NOTIFY
: {
5746 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain
));
5749 case NETLOGON_CONTROL_SET_DBFLAG
: {
5750 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->debug_level
));
5754 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5757 if (ndr_flags
& NDR_BUFFERS
) {
5758 int level
= ndr_push_get_switch_value(ndr
, r
);
5760 case NETLOGON_CONTROL_REDISCOVER
:
5762 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain
, CH_UTF16
)));
5763 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5764 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain
, CH_UTF16
)));
5765 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain
, ndr_charset_length(r
->domain
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5769 case NETLOGON_CONTROL_TC_QUERY
:
5771 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain
, CH_UTF16
)));
5772 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5773 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain
, CH_UTF16
)));
5774 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain
, ndr_charset_length(r
->domain
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5778 case NETLOGON_CONTROL_TRANSPORT_NOTIFY
:
5780 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain
, CH_UTF16
)));
5781 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5782 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain
, CH_UTF16
)));
5783 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain
, ndr_charset_length(r
->domain
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5787 case NETLOGON_CONTROL_SET_DBFLAG
:
5791 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5794 return NDR_ERR_SUCCESS
;
5797 static enum ndr_err_code
ndr_pull_netr_CONTROL_DATA_INFORMATION(struct ndr_pull
*ndr
, int ndr_flags
, union netr_CONTROL_DATA_INFORMATION
*r
)
5801 TALLOC_CTX
*_mem_save_domain_0
;
5802 level
= ndr_pull_get_switch_value(ndr
, r
);
5803 if (ndr_flags
& NDR_SCALARS
) {
5804 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
5805 if (_level
!= level
) {
5806 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5809 case NETLOGON_CONTROL_REDISCOVER
: {
5810 uint32_t _ptr_domain
;
5811 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain
));
5813 NDR_PULL_ALLOC(ndr
, r
->domain
);
5819 case NETLOGON_CONTROL_TC_QUERY
: {
5820 uint32_t _ptr_domain
;
5821 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain
));
5823 NDR_PULL_ALLOC(ndr
, r
->domain
);
5829 case NETLOGON_CONTROL_TRANSPORT_NOTIFY
: {
5830 uint32_t _ptr_domain
;
5831 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain
));
5833 NDR_PULL_ALLOC(ndr
, r
->domain
);
5839 case NETLOGON_CONTROL_SET_DBFLAG
: {
5840 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->debug_level
));
5844 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5847 if (ndr_flags
& NDR_BUFFERS
) {
5849 case NETLOGON_CONTROL_REDISCOVER
:
5851 _mem_save_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5852 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain
, 0);
5853 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain
));
5854 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain
));
5855 if (ndr_get_array_length(ndr
, &r
->domain
) > ndr_get_array_size(ndr
, &r
->domain
)) {
5856 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain
), ndr_get_array_length(ndr
, &r
->domain
));
5858 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain
), sizeof(uint16_t)));
5859 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain
, ndr_get_array_length(ndr
, &r
->domain
), sizeof(uint16_t), CH_UTF16
));
5860 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_0
, 0);
5864 case NETLOGON_CONTROL_TC_QUERY
:
5866 _mem_save_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5867 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain
, 0);
5868 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain
));
5869 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain
));
5870 if (ndr_get_array_length(ndr
, &r
->domain
) > ndr_get_array_size(ndr
, &r
->domain
)) {
5871 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain
), ndr_get_array_length(ndr
, &r
->domain
));
5873 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain
), sizeof(uint16_t)));
5874 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain
, ndr_get_array_length(ndr
, &r
->domain
), sizeof(uint16_t), CH_UTF16
));
5875 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_0
, 0);
5879 case NETLOGON_CONTROL_TRANSPORT_NOTIFY
:
5881 _mem_save_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5882 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain
, 0);
5883 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain
));
5884 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain
));
5885 if (ndr_get_array_length(ndr
, &r
->domain
) > ndr_get_array_size(ndr
, &r
->domain
)) {
5886 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain
), ndr_get_array_length(ndr
, &r
->domain
));
5888 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain
), sizeof(uint16_t)));
5889 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain
, ndr_get_array_length(ndr
, &r
->domain
), sizeof(uint16_t), CH_UTF16
));
5890 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_0
, 0);
5894 case NETLOGON_CONTROL_SET_DBFLAG
:
5898 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5901 return NDR_ERR_SUCCESS
;
5904 _PUBLIC_
void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print
*ndr
, const char *name
, const union netr_CONTROL_DATA_INFORMATION
*r
)
5907 level
= ndr_print_get_switch_value(ndr
, r
);
5908 ndr_print_union(ndr
, name
, level
, "netr_CONTROL_DATA_INFORMATION");
5910 case NETLOGON_CONTROL_REDISCOVER
:
5911 ndr_print_ptr(ndr
, "domain", r
->domain
);
5914 ndr_print_string(ndr
, "domain", r
->domain
);
5919 case NETLOGON_CONTROL_TC_QUERY
:
5920 ndr_print_ptr(ndr
, "domain", r
->domain
);
5923 ndr_print_string(ndr
, "domain", r
->domain
);
5928 case NETLOGON_CONTROL_TRANSPORT_NOTIFY
:
5929 ndr_print_ptr(ndr
, "domain", r
->domain
);
5932 ndr_print_string(ndr
, "domain", r
->domain
);
5937 case NETLOGON_CONTROL_SET_DBFLAG
:
5938 ndr_print_uint32(ndr
, "debug_level", r
->debug_level
);
5942 ndr_print_bad_level(ndr
, name
, level
);
5946 static enum ndr_err_code
ndr_push_netr_NegotiateFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
5948 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5949 return NDR_ERR_SUCCESS
;
5952 static enum ndr_err_code
ndr_pull_netr_NegotiateFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
5955 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5957 return NDR_ERR_SUCCESS
;
5960 _PUBLIC_
void ndr_print_netr_NegotiateFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
5962 ndr_print_uint32(ndr
, name
, r
);
5964 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_ACCOUNT_LOCKOUT", NETLOGON_NEG_ACCOUNT_LOCKOUT
, r
);
5965 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_PERSISTENT_SAMREPL", NETLOGON_NEG_PERSISTENT_SAMREPL
, r
);
5966 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_ARCFOUR", NETLOGON_NEG_ARCFOUR
, r
);
5967 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_PROMOTION_COUNT", NETLOGON_NEG_PROMOTION_COUNT
, r
);
5968 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_CHANGELOG_BDC", NETLOGON_NEG_CHANGELOG_BDC
, r
);
5969 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_FULL_SYNC_REPL", NETLOGON_NEG_FULL_SYNC_REPL
, r
);
5970 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_MULTIPLE_SIDS", NETLOGON_NEG_MULTIPLE_SIDS
, r
);
5971 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_REDO", NETLOGON_NEG_REDO
, r
);
5972 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL", NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL
, r
);
5973 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_SEND_PASSWORD_INFO_PDC", NETLOGON_NEG_SEND_PASSWORD_INFO_PDC
, r
);
5974 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_GENERIC_PASSTHROUGH", NETLOGON_NEG_GENERIC_PASSTHROUGH
, r
);
5975 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_CONCURRENT_RPC", NETLOGON_NEG_CONCURRENT_RPC
, r
);
5976 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL", NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL
, r
);
5977 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL", NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL
, r
);
5978 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_128BIT", NETLOGON_NEG_128BIT
, r
);
5979 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_TRANSITIVE_TRUSTS", NETLOGON_NEG_TRANSITIVE_TRUSTS
, r
);
5980 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_DNS_DOMAIN_TRUSTS", NETLOGON_NEG_DNS_DOMAIN_TRUSTS
, r
);
5981 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_SET2", NETLOGON_NEG_PASSWORD_SET2
, r
);
5982 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_GETDOMAININFO", NETLOGON_NEG_GETDOMAININFO
, r
);
5983 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_CROSS_FOREST_TRUSTS", NETLOGON_NEG_CROSS_FOREST_TRUSTS
, r
);
5984 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION", NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION
, r
);
5985 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_RODC_PASSTHROUGH", NETLOGON_NEG_RODC_PASSTHROUGH
, r
);
5986 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_AUTHENTICATED_RPC_LSASS", NETLOGON_NEG_AUTHENTICATED_RPC_LSASS
, r
);
5987 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETLOGON_NEG_SCHANNEL", NETLOGON_NEG_SCHANNEL
, r
);
5991 static enum ndr_err_code
ndr_push_netr_Blob(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_Blob
*r
)
5993 if (ndr_flags
& NDR_SCALARS
) {
5994 NDR_CHECK(ndr_push_align(ndr
, 4));
5995 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
5996 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
5998 if (ndr_flags
& NDR_BUFFERS
) {
6000 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
6001 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
6004 return NDR_ERR_SUCCESS
;
6007 static enum ndr_err_code
ndr_pull_netr_Blob(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_Blob
*r
)
6010 TALLOC_CTX
*_mem_save_data_0
;
6011 if (ndr_flags
& NDR_SCALARS
) {
6012 NDR_CHECK(ndr_pull_align(ndr
, 4));
6013 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
6014 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
6016 NDR_PULL_ALLOC(ndr
, r
->data
);
6021 if (ndr_flags
& NDR_BUFFERS
) {
6023 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6024 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
6025 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
6026 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
6027 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
6028 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
6031 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
6034 return NDR_ERR_SUCCESS
;
6037 _PUBLIC_
void ndr_print_netr_Blob(struct ndr_print
*ndr
, const char *name
, const struct netr_Blob
*r
)
6039 ndr_print_struct(ndr
, name
, "netr_Blob");
6041 ndr_print_uint32(ndr
, "length", r
->length
);
6042 ndr_print_ptr(ndr
, "data", r
->data
);
6045 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
6051 static enum ndr_err_code
ndr_push_netr_DsRGetDCName_flags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
6053 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
6054 return NDR_ERR_SUCCESS
;
6057 static enum ndr_err_code
ndr_pull_netr_DsRGetDCName_flags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
6060 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
6062 return NDR_ERR_SUCCESS
;
6065 _PUBLIC_
void ndr_print_netr_DsRGetDCName_flags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
6067 ndr_print_uint32(ndr
, name
, r
);
6069 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_FORCE_REDISCOVERY", DS_FORCE_REDISCOVERY
, r
);
6070 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_REQUIRED", DS_DIRECTORY_SERVICE_REQUIRED
, r
);
6071 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_PREFERRED", DS_DIRECTORY_SERVICE_PREFERRED
, r
);
6072 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_GC_SERVER_REQUIRED", DS_GC_SERVER_REQUIRED
, r
);
6073 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_PDC_REQUIRED", DS_PDC_REQUIRED
, r
);
6074 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_BACKGROUND_ONLY", DS_BACKGROUND_ONLY
, r
);
6075 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_IP_REQUIRED", DS_IP_REQUIRED
, r
);
6076 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_KDC_REQUIRED", DS_KDC_REQUIRED
, r
);
6077 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_TIMESERV_REQUIRED", DS_TIMESERV_REQUIRED
, r
);
6078 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_WRITABLE_REQUIRED", DS_WRITABLE_REQUIRED
, r
);
6079 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_GOOD_TIMESERV_PREFERRED", DS_GOOD_TIMESERV_PREFERRED
, r
);
6080 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_AVOID_SELF", DS_AVOID_SELF
, r
);
6081 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED
, r
);
6082 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_IS_FLAT_NAME", DS_IS_FLAT_NAME
, r
);
6083 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_IS_DNS_NAME", DS_IS_DNS_NAME
, r
);
6084 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_TRY_NEXTCLOSEST_SITE", DS_TRY_NEXTCLOSEST_SITE
, r
);
6085 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_6_REQUIRED", DS_DIRECTORY_SERVICE_6_REQUIRED
, r
);
6086 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_RETURN_DNS_NAME", DS_RETURN_DNS_NAME
, r
);
6087 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME
, r
);
6091 static enum ndr_err_code
ndr_push_netr_DsRGetDCNameInfo_AddressType(struct ndr_push
*ndr
, int ndr_flags
, enum netr_DsRGetDCNameInfo_AddressType r
)
6093 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
6094 return NDR_ERR_SUCCESS
;
6097 static enum ndr_err_code
ndr_pull_netr_DsRGetDCNameInfo_AddressType(struct ndr_pull
*ndr
, int ndr_flags
, enum netr_DsRGetDCNameInfo_AddressType
*r
)
6100 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
6102 return NDR_ERR_SUCCESS
;
6105 _PUBLIC_
void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print
*ndr
, const char *name
, enum netr_DsRGetDCNameInfo_AddressType r
)
6107 const char *val
= NULL
;
6110 case DS_ADDRESS_TYPE_INET
: val
= "DS_ADDRESS_TYPE_INET"; break;
6111 case DS_ADDRESS_TYPE_NETBIOS
: val
= "DS_ADDRESS_TYPE_NETBIOS"; break;
6113 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
6116 static enum ndr_err_code
ndr_push_netr_DsR_DcFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
6118 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
6119 return NDR_ERR_SUCCESS
;
6122 static enum ndr_err_code
ndr_pull_netr_DsR_DcFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
6125 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
6127 return NDR_ERR_SUCCESS
;
6130 _PUBLIC_
void ndr_print_netr_DsR_DcFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
6132 ndr_print_uint32(ndr
, name
, r
);
6134 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_PDC", DS_SERVER_PDC
, r
);
6135 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_GC", DS_SERVER_GC
, r
);
6136 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_LDAP", DS_SERVER_LDAP
, r
);
6137 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_DS", DS_SERVER_DS
, r
);
6138 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_KDC", DS_SERVER_KDC
, r
);
6139 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_TIMESERV", DS_SERVER_TIMESERV
, r
);
6140 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_CLOSEST", DS_SERVER_CLOSEST
, r
);
6141 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_WRITABLE", DS_SERVER_WRITABLE
, r
);
6142 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_GOOD_TIMESERV", DS_SERVER_GOOD_TIMESERV
, r
);
6143 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_NDNC", DS_SERVER_NDNC
, r
);
6144 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_SELECT_SECRET_DOMAIN_6", DS_SERVER_SELECT_SECRET_DOMAIN_6
, r
);
6145 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_SERVER_FULL_SECRET_DOMAIN_6", DS_SERVER_FULL_SECRET_DOMAIN_6
, r
);
6146 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_DNS_CONTROLLER", DS_DNS_CONTROLLER
, r
);
6147 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_DNS_DOMAIN", DS_DNS_DOMAIN
, r
);
6148 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DS_DNS_FOREST", DS_DNS_FOREST
, r
);
6152 _PUBLIC_
enum ndr_err_code
ndr_push_netr_DsRGetDCNameInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DsRGetDCNameInfo
*r
)
6154 if (ndr_flags
& NDR_SCALARS
) {
6155 NDR_CHECK(ndr_push_align(ndr
, 4));
6156 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dc_unc
));
6157 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dc_address
));
6158 NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo_AddressType(ndr
, NDR_SCALARS
, r
->dc_address_type
));
6159 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
6160 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
6161 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->forest_name
));
6162 NDR_CHECK(ndr_push_netr_DsR_DcFlags(ndr
, NDR_SCALARS
, r
->dc_flags
));
6163 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dc_site_name
));
6164 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->client_site_name
));
6166 if (ndr_flags
& NDR_BUFFERS
) {
6168 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dc_unc
, CH_UTF16
)));
6169 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6170 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dc_unc
, CH_UTF16
)));
6171 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dc_unc
, ndr_charset_length(r
->dc_unc
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6173 if (r
->dc_address
) {
6174 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dc_address
, CH_UTF16
)));
6175 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6176 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dc_address
, CH_UTF16
)));
6177 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dc_address
, ndr_charset_length(r
->dc_address
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6179 NDR_CHECK(ndr_push_GUID(ndr
, NDR_BUFFERS
, &r
->domain_guid
));
6180 if (r
->domain_name
) {
6181 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
6182 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6183 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
6184 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_name
, ndr_charset_length(r
->domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6186 if (r
->forest_name
) {
6187 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->forest_name
, CH_UTF16
)));
6188 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6189 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->forest_name
, CH_UTF16
)));
6190 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->forest_name
, ndr_charset_length(r
->forest_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6192 if (r
->dc_site_name
) {
6193 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dc_site_name
, CH_UTF16
)));
6194 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6195 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dc_site_name
, CH_UTF16
)));
6196 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
));
6198 if (r
->client_site_name
) {
6199 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client_site_name
, CH_UTF16
)));
6200 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6201 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client_site_name
, CH_UTF16
)));
6202 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
));
6205 return NDR_ERR_SUCCESS
;
6208 _PUBLIC_
enum ndr_err_code
ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DsRGetDCNameInfo
*r
)
6210 uint32_t _ptr_dc_unc
;
6211 TALLOC_CTX
*_mem_save_dc_unc_0
;
6212 uint32_t _ptr_dc_address
;
6213 TALLOC_CTX
*_mem_save_dc_address_0
;
6214 uint32_t _ptr_domain_name
;
6215 TALLOC_CTX
*_mem_save_domain_name_0
;
6216 uint32_t _ptr_forest_name
;
6217 TALLOC_CTX
*_mem_save_forest_name_0
;
6218 uint32_t _ptr_dc_site_name
;
6219 TALLOC_CTX
*_mem_save_dc_site_name_0
;
6220 uint32_t _ptr_client_site_name
;
6221 TALLOC_CTX
*_mem_save_client_site_name_0
;
6222 if (ndr_flags
& NDR_SCALARS
) {
6223 NDR_CHECK(ndr_pull_align(ndr
, 4));
6224 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dc_unc
));
6226 NDR_PULL_ALLOC(ndr
, r
->dc_unc
);
6230 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dc_address
));
6231 if (_ptr_dc_address
) {
6232 NDR_PULL_ALLOC(ndr
, r
->dc_address
);
6234 r
->dc_address
= NULL
;
6236 NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo_AddressType(ndr
, NDR_SCALARS
, &r
->dc_address_type
));
6237 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
6238 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
6239 if (_ptr_domain_name
) {
6240 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
6242 r
->domain_name
= NULL
;
6244 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_name
));
6245 if (_ptr_forest_name
) {
6246 NDR_PULL_ALLOC(ndr
, r
->forest_name
);
6248 r
->forest_name
= NULL
;
6250 NDR_CHECK(ndr_pull_netr_DsR_DcFlags(ndr
, NDR_SCALARS
, &r
->dc_flags
));
6251 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dc_site_name
));
6252 if (_ptr_dc_site_name
) {
6253 NDR_PULL_ALLOC(ndr
, r
->dc_site_name
);
6255 r
->dc_site_name
= NULL
;
6257 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_client_site_name
));
6258 if (_ptr_client_site_name
) {
6259 NDR_PULL_ALLOC(ndr
, r
->client_site_name
);
6261 r
->client_site_name
= NULL
;
6264 if (ndr_flags
& NDR_BUFFERS
) {
6266 _mem_save_dc_unc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6267 NDR_PULL_SET_MEM_CTX(ndr
, r
->dc_unc
, 0);
6268 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dc_unc
));
6269 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dc_unc
));
6270 if (ndr_get_array_length(ndr
, &r
->dc_unc
) > ndr_get_array_size(ndr
, &r
->dc_unc
)) {
6271 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dc_unc
), ndr_get_array_length(ndr
, &r
->dc_unc
));
6273 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dc_unc
), sizeof(uint16_t)));
6274 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dc_unc
, ndr_get_array_length(ndr
, &r
->dc_unc
), sizeof(uint16_t), CH_UTF16
));
6275 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dc_unc_0
, 0);
6277 if (r
->dc_address
) {
6278 _mem_save_dc_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6279 NDR_PULL_SET_MEM_CTX(ndr
, r
->dc_address
, 0);
6280 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dc_address
));
6281 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dc_address
));
6282 if (ndr_get_array_length(ndr
, &r
->dc_address
) > ndr_get_array_size(ndr
, &r
->dc_address
)) {
6283 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dc_address
), ndr_get_array_length(ndr
, &r
->dc_address
));
6285 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dc_address
), sizeof(uint16_t)));
6286 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dc_address
, ndr_get_array_length(ndr
, &r
->dc_address
), sizeof(uint16_t), CH_UTF16
));
6287 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dc_address_0
, 0);
6289 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_BUFFERS
, &r
->domain_guid
));
6290 if (r
->domain_name
) {
6291 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6292 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
6293 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
6294 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
6295 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
6296 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain_name
), ndr_get_array_length(ndr
, &r
->domain_name
));
6298 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
6299 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
6300 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
6302 if (r
->forest_name
) {
6303 _mem_save_forest_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6304 NDR_PULL_SET_MEM_CTX(ndr
, r
->forest_name
, 0);
6305 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->forest_name
));
6306 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->forest_name
));
6307 if (ndr_get_array_length(ndr
, &r
->forest_name
) > ndr_get_array_size(ndr
, &r
->forest_name
)) {
6308 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->forest_name
), ndr_get_array_length(ndr
, &r
->forest_name
));
6310 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->forest_name
), sizeof(uint16_t)));
6311 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->forest_name
, ndr_get_array_length(ndr
, &r
->forest_name
), sizeof(uint16_t), CH_UTF16
));
6312 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_name_0
, 0);
6314 if (r
->dc_site_name
) {
6315 _mem_save_dc_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6316 NDR_PULL_SET_MEM_CTX(ndr
, r
->dc_site_name
, 0);
6317 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dc_site_name
));
6318 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dc_site_name
));
6319 if (ndr_get_array_length(ndr
, &r
->dc_site_name
) > ndr_get_array_size(ndr
, &r
->dc_site_name
)) {
6320 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dc_site_name
), ndr_get_array_length(ndr
, &r
->dc_site_name
));
6322 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dc_site_name
), sizeof(uint16_t)));
6323 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dc_site_name
, ndr_get_array_length(ndr
, &r
->dc_site_name
), sizeof(uint16_t), CH_UTF16
));
6324 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dc_site_name_0
, 0);
6326 if (r
->client_site_name
) {
6327 _mem_save_client_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6328 NDR_PULL_SET_MEM_CTX(ndr
, r
->client_site_name
, 0);
6329 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->client_site_name
));
6330 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->client_site_name
));
6331 if (ndr_get_array_length(ndr
, &r
->client_site_name
) > ndr_get_array_size(ndr
, &r
->client_site_name
)) {
6332 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->client_site_name
), ndr_get_array_length(ndr
, &r
->client_site_name
));
6334 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->client_site_name
), sizeof(uint16_t)));
6335 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->client_site_name
, ndr_get_array_length(ndr
, &r
->client_site_name
), sizeof(uint16_t), CH_UTF16
));
6336 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_client_site_name_0
, 0);
6339 return NDR_ERR_SUCCESS
;
6342 _PUBLIC_
void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print
*ndr
, const char *name
, const struct netr_DsRGetDCNameInfo
*r
)
6344 ndr_print_struct(ndr
, name
, "netr_DsRGetDCNameInfo");
6346 ndr_print_ptr(ndr
, "dc_unc", r
->dc_unc
);
6349 ndr_print_string(ndr
, "dc_unc", r
->dc_unc
);
6352 ndr_print_ptr(ndr
, "dc_address", r
->dc_address
);
6354 if (r
->dc_address
) {
6355 ndr_print_string(ndr
, "dc_address", r
->dc_address
);
6358 ndr_print_netr_DsRGetDCNameInfo_AddressType(ndr
, "dc_address_type", r
->dc_address_type
);
6359 ndr_print_GUID(ndr
, "domain_guid", &r
->domain_guid
);
6360 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
6362 if (r
->domain_name
) {
6363 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
6366 ndr_print_ptr(ndr
, "forest_name", r
->forest_name
);
6368 if (r
->forest_name
) {
6369 ndr_print_string(ndr
, "forest_name", r
->forest_name
);
6372 ndr_print_netr_DsR_DcFlags(ndr
, "dc_flags", r
->dc_flags
);
6373 ndr_print_ptr(ndr
, "dc_site_name", r
->dc_site_name
);
6375 if (r
->dc_site_name
) {
6376 ndr_print_string(ndr
, "dc_site_name", r
->dc_site_name
);
6379 ndr_print_ptr(ndr
, "client_site_name", r
->client_site_name
);
6381 if (r
->client_site_name
) {
6382 ndr_print_string(ndr
, "client_site_name", r
->client_site_name
);
6388 static enum ndr_err_code
ndr_push_netr_BinaryString(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_BinaryString
*r
)
6390 uint32_t cntr_data_1
;
6392 uint32_t _flags_save_STRUCT
= ndr
->flags
;
6393 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
6394 if (ndr_flags
& NDR_SCALARS
) {
6395 NDR_CHECK(ndr_push_align(ndr
, 4));
6396 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->length
));
6397 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->size
));
6398 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
6400 if (ndr_flags
& NDR_BUFFERS
) {
6402 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
/ 2));
6403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
/ 2));
6405 for (cntr_data_1
= 0; cntr_data_1
< r
->length
/ 2; cntr_data_1
++) {
6406 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->data
[cntr_data_1
]));
6410 ndr
->flags
= _flags_save_STRUCT
;
6412 return NDR_ERR_SUCCESS
;
6415 static enum ndr_err_code
ndr_pull_netr_BinaryString(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_BinaryString
*r
)
6418 uint32_t cntr_data_1
;
6419 TALLOC_CTX
*_mem_save_data_0
;
6420 TALLOC_CTX
*_mem_save_data_1
;
6422 uint32_t _flags_save_STRUCT
= ndr
->flags
;
6423 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
6424 if (ndr_flags
& NDR_SCALARS
) {
6425 NDR_CHECK(ndr_pull_align(ndr
, 4));
6426 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
6427 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
6428 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
6430 NDR_PULL_ALLOC(ndr
, r
->data
);
6435 if (ndr_flags
& NDR_BUFFERS
) {
6437 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6438 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
6439 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
6440 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data
));
6441 if (ndr_get_array_length(ndr
, &r
->data
) > ndr_get_array_size(ndr
, &r
->data
)) {
6442 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->data
), ndr_get_array_length(ndr
, &r
->data
));
6444 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
6445 _mem_save_data_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6446 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
6447 for (cntr_data_1
= 0; cntr_data_1
< r
->length
/ 2; cntr_data_1
++) {
6448 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->data
[cntr_data_1
]));
6450 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_1
, 0);
6451 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
6454 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
/ 2));
6457 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->data
, r
->length
/ 2));
6460 ndr
->flags
= _flags_save_STRUCT
;
6462 return NDR_ERR_SUCCESS
;
6465 _PUBLIC_
void ndr_print_netr_BinaryString(struct ndr_print
*ndr
, const char *name
, const struct netr_BinaryString
*r
)
6467 uint32_t cntr_data_1
;
6468 ndr_print_struct(ndr
, name
, "netr_BinaryString");
6470 uint32_t _flags_save_STRUCT
= ndr
->flags
;
6471 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
6473 ndr_print_uint16(ndr
, "length", r
->length
);
6474 ndr_print_uint16(ndr
, "size", r
->size
);
6475 ndr_print_ptr(ndr
, "data", r
->data
);
6478 ndr
->print(ndr
, "%s: ARRAY(%d)", "data", r
->length
/ 2);
6480 for (cntr_data_1
=0;cntr_data_1
<r
->length
/ 2;cntr_data_1
++) {
6482 if (asprintf(&idx_1
, "[%d]", cntr_data_1
) != -1) {
6483 ndr_print_uint16(ndr
, "data", r
->data
[cntr_data_1
]);
6491 ndr
->flags
= _flags_save_STRUCT
;
6495 static enum ndr_err_code
ndr_push_netr_DomainQuery1(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DomainQuery1
*r
)
6497 uint32_t cntr_unknown7_0
;
6498 if (ndr_flags
& NDR_SCALARS
) {
6499 NDR_CHECK(ndr_push_align(ndr
, 4));
6500 NDR_CHECK(ndr_push_netr_Blob(ndr
, NDR_SCALARS
, &r
->blob
));
6501 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->workstation_domain
));
6502 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->workstation_site
));
6503 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->unknown1
));
6504 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->unknown2
));
6505 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->unknown3
));
6506 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->unknown4
));
6507 NDR_CHECK(ndr_push_netr_BinaryString(ndr
, NDR_SCALARS
, &r
->blob2
));
6508 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->product
));
6509 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown5
));
6510 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown6
));
6511 for (cntr_unknown7_0
= 0; cntr_unknown7_0
< 4; cntr_unknown7_0
++) {
6512 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown7
[cntr_unknown7_0
]));
6515 if (ndr_flags
& NDR_BUFFERS
) {
6516 NDR_CHECK(ndr_push_netr_Blob(ndr
, NDR_BUFFERS
, &r
->blob
));
6517 if (r
->workstation_domain
) {
6518 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->workstation_domain
, CH_UTF16
)));
6519 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6520 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->workstation_domain
, CH_UTF16
)));
6521 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->workstation_domain
, ndr_charset_length(r
->workstation_domain
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6523 if (r
->workstation_site
) {
6524 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->workstation_site
, CH_UTF16
)));
6525 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6526 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->workstation_site
, CH_UTF16
)));
6527 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->workstation_site
, ndr_charset_length(r
->workstation_site
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6530 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown1
, CH_UTF16
)));
6531 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6532 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown1
, CH_UTF16
)));
6533 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->unknown1
, ndr_charset_length(r
->unknown1
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6536 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
6537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6538 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
6539 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->unknown2
, ndr_charset_length(r
->unknown2
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6542 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown3
, CH_UTF16
)));
6543 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6544 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown3
, CH_UTF16
)));
6545 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->unknown3
, ndr_charset_length(r
->unknown3
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6548 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown4
, CH_UTF16
)));
6549 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6550 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown4
, CH_UTF16
)));
6551 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->unknown4
, ndr_charset_length(r
->unknown4
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6553 NDR_CHECK(ndr_push_netr_BinaryString(ndr
, NDR_BUFFERS
, &r
->blob2
));
6554 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->product
));
6555 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown5
));
6556 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown6
));
6558 return NDR_ERR_SUCCESS
;
6561 static enum ndr_err_code
ndr_pull_netr_DomainQuery1(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DomainQuery1
*r
)
6563 uint32_t _ptr_workstation_domain
;
6564 TALLOC_CTX
*_mem_save_workstation_domain_0
;
6565 uint32_t _ptr_workstation_site
;
6566 TALLOC_CTX
*_mem_save_workstation_site_0
;
6567 uint32_t _ptr_unknown1
;
6568 TALLOC_CTX
*_mem_save_unknown1_0
;
6569 uint32_t _ptr_unknown2
;
6570 TALLOC_CTX
*_mem_save_unknown2_0
;
6571 uint32_t _ptr_unknown3
;
6572 TALLOC_CTX
*_mem_save_unknown3_0
;
6573 uint32_t _ptr_unknown4
;
6574 TALLOC_CTX
*_mem_save_unknown4_0
;
6575 uint32_t cntr_unknown7_0
;
6576 if (ndr_flags
& NDR_SCALARS
) {
6577 NDR_CHECK(ndr_pull_align(ndr
, 4));
6578 NDR_CHECK(ndr_pull_netr_Blob(ndr
, NDR_SCALARS
, &r
->blob
));
6579 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_workstation_domain
));
6580 if (_ptr_workstation_domain
) {
6581 NDR_PULL_ALLOC(ndr
, r
->workstation_domain
);
6583 r
->workstation_domain
= NULL
;
6585 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_workstation_site
));
6586 if (_ptr_workstation_site
) {
6587 NDR_PULL_ALLOC(ndr
, r
->workstation_site
);
6589 r
->workstation_site
= NULL
;
6591 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown1
));
6592 if (_ptr_unknown1
) {
6593 NDR_PULL_ALLOC(ndr
, r
->unknown1
);
6597 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
6598 if (_ptr_unknown2
) {
6599 NDR_PULL_ALLOC(ndr
, r
->unknown2
);
6603 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown3
));
6604 if (_ptr_unknown3
) {
6605 NDR_PULL_ALLOC(ndr
, r
->unknown3
);
6609 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown4
));
6610 if (_ptr_unknown4
) {
6611 NDR_PULL_ALLOC(ndr
, r
->unknown4
);
6615 NDR_CHECK(ndr_pull_netr_BinaryString(ndr
, NDR_SCALARS
, &r
->blob2
));
6616 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->product
));
6617 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown5
));
6618 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->unknown6
));
6619 for (cntr_unknown7_0
= 0; cntr_unknown7_0
< 4; cntr_unknown7_0
++) {
6620 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown7
[cntr_unknown7_0
]));
6623 if (ndr_flags
& NDR_BUFFERS
) {
6624 NDR_CHECK(ndr_pull_netr_Blob(ndr
, NDR_BUFFERS
, &r
->blob
));
6625 if (r
->workstation_domain
) {
6626 _mem_save_workstation_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6627 NDR_PULL_SET_MEM_CTX(ndr
, r
->workstation_domain
, 0);
6628 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->workstation_domain
));
6629 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->workstation_domain
));
6630 if (ndr_get_array_length(ndr
, &r
->workstation_domain
) > ndr_get_array_size(ndr
, &r
->workstation_domain
)) {
6631 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->workstation_domain
), ndr_get_array_length(ndr
, &r
->workstation_domain
));
6633 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->workstation_domain
), sizeof(uint16_t)));
6634 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->workstation_domain
, ndr_get_array_length(ndr
, &r
->workstation_domain
), sizeof(uint16_t), CH_UTF16
));
6635 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_workstation_domain_0
, 0);
6637 if (r
->workstation_site
) {
6638 _mem_save_workstation_site_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6639 NDR_PULL_SET_MEM_CTX(ndr
, r
->workstation_site
, 0);
6640 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->workstation_site
));
6641 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->workstation_site
));
6642 if (ndr_get_array_length(ndr
, &r
->workstation_site
) > ndr_get_array_size(ndr
, &r
->workstation_site
)) {
6643 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->workstation_site
), ndr_get_array_length(ndr
, &r
->workstation_site
));
6645 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->workstation_site
), sizeof(uint16_t)));
6646 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->workstation_site
, ndr_get_array_length(ndr
, &r
->workstation_site
), sizeof(uint16_t), CH_UTF16
));
6647 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_workstation_site_0
, 0);
6650 _mem_save_unknown1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6651 NDR_PULL_SET_MEM_CTX(ndr
, r
->unknown1
, 0);
6652 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->unknown1
));
6653 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->unknown1
));
6654 if (ndr_get_array_length(ndr
, &r
->unknown1
) > ndr_get_array_size(ndr
, &r
->unknown1
)) {
6655 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->unknown1
), ndr_get_array_length(ndr
, &r
->unknown1
));
6657 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->unknown1
), sizeof(uint16_t)));
6658 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->unknown1
, ndr_get_array_length(ndr
, &r
->unknown1
), sizeof(uint16_t), CH_UTF16
));
6659 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown1_0
, 0);
6662 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6663 NDR_PULL_SET_MEM_CTX(ndr
, r
->unknown2
, 0);
6664 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->unknown2
));
6665 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->unknown2
));
6666 if (ndr_get_array_length(ndr
, &r
->unknown2
) > ndr_get_array_size(ndr
, &r
->unknown2
)) {
6667 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->unknown2
), ndr_get_array_length(ndr
, &r
->unknown2
));
6669 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t)));
6670 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->unknown2
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t), CH_UTF16
));
6671 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
6674 _mem_save_unknown3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6675 NDR_PULL_SET_MEM_CTX(ndr
, r
->unknown3
, 0);
6676 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->unknown3
));
6677 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->unknown3
));
6678 if (ndr_get_array_length(ndr
, &r
->unknown3
) > ndr_get_array_size(ndr
, &r
->unknown3
)) {
6679 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->unknown3
), ndr_get_array_length(ndr
, &r
->unknown3
));
6681 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->unknown3
), sizeof(uint16_t)));
6682 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->unknown3
, ndr_get_array_length(ndr
, &r
->unknown3
), sizeof(uint16_t), CH_UTF16
));
6683 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown3_0
, 0);
6686 _mem_save_unknown4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6687 NDR_PULL_SET_MEM_CTX(ndr
, r
->unknown4
, 0);
6688 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->unknown4
));
6689 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->unknown4
));
6690 if (ndr_get_array_length(ndr
, &r
->unknown4
) > ndr_get_array_size(ndr
, &r
->unknown4
)) {
6691 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->unknown4
), ndr_get_array_length(ndr
, &r
->unknown4
));
6693 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->unknown4
), sizeof(uint16_t)));
6694 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->unknown4
, ndr_get_array_length(ndr
, &r
->unknown4
), sizeof(uint16_t), CH_UTF16
));
6695 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown4_0
, 0);
6697 NDR_CHECK(ndr_pull_netr_BinaryString(ndr
, NDR_BUFFERS
, &r
->blob2
));
6698 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->product
));
6699 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown5
));
6700 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->unknown6
));
6702 return NDR_ERR_SUCCESS
;
6705 _PUBLIC_
void ndr_print_netr_DomainQuery1(struct ndr_print
*ndr
, const char *name
, const struct netr_DomainQuery1
*r
)
6707 uint32_t cntr_unknown7_0
;
6708 ndr_print_struct(ndr
, name
, "netr_DomainQuery1");
6710 ndr_print_netr_Blob(ndr
, "blob", &r
->blob
);
6711 ndr_print_ptr(ndr
, "workstation_domain", r
->workstation_domain
);
6713 if (r
->workstation_domain
) {
6714 ndr_print_string(ndr
, "workstation_domain", r
->workstation_domain
);
6717 ndr_print_ptr(ndr
, "workstation_site", r
->workstation_site
);
6719 if (r
->workstation_site
) {
6720 ndr_print_string(ndr
, "workstation_site", r
->workstation_site
);
6723 ndr_print_ptr(ndr
, "unknown1", r
->unknown1
);
6726 ndr_print_string(ndr
, "unknown1", r
->unknown1
);
6729 ndr_print_ptr(ndr
, "unknown2", r
->unknown2
);
6732 ndr_print_string(ndr
, "unknown2", r
->unknown2
);
6735 ndr_print_ptr(ndr
, "unknown3", r
->unknown3
);
6738 ndr_print_string(ndr
, "unknown3", r
->unknown3
);
6741 ndr_print_ptr(ndr
, "unknown4", r
->unknown4
);
6744 ndr_print_string(ndr
, "unknown4", r
->unknown4
);
6747 ndr_print_netr_BinaryString(ndr
, "blob2", &r
->blob2
);
6748 ndr_print_lsa_String(ndr
, "product", &r
->product
);
6749 ndr_print_lsa_String(ndr
, "unknown5", &r
->unknown5
);
6750 ndr_print_lsa_String(ndr
, "unknown6", &r
->unknown6
);
6751 ndr
->print(ndr
, "%s: ARRAY(%d)", "unknown7", 4);
6753 for (cntr_unknown7_0
=0;cntr_unknown7_0
<4;cntr_unknown7_0
++) {
6755 if (asprintf(&idx_0
, "[%d]", cntr_unknown7_0
) != -1) {
6756 ndr_print_uint32(ndr
, "unknown7", r
->unknown7
[cntr_unknown7_0
]);
6764 static enum ndr_err_code
ndr_push_netr_DomainQuery(struct ndr_push
*ndr
, int ndr_flags
, const union netr_DomainQuery
*r
)
6766 if (ndr_flags
& NDR_SCALARS
) {
6767 int level
= ndr_push_get_switch_value(ndr
, r
);
6768 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
6771 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->query1
));
6775 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->query1
));
6779 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
6782 if (ndr_flags
& NDR_BUFFERS
) {
6783 int level
= ndr_push_get_switch_value(ndr
, r
);
6787 NDR_CHECK(ndr_push_netr_DomainQuery1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->query1
));
6793 NDR_CHECK(ndr_push_netr_DomainQuery1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->query1
));
6798 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
6801 return NDR_ERR_SUCCESS
;
6804 static enum ndr_err_code
ndr_pull_netr_DomainQuery(struct ndr_pull
*ndr
, int ndr_flags
, union netr_DomainQuery
*r
)
6808 TALLOC_CTX
*_mem_save_query1_0
;
6809 level
= ndr_pull_get_switch_value(ndr
, r
);
6810 if (ndr_flags
& NDR_SCALARS
) {
6811 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
6812 if (_level
!= level
) {
6813 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
6817 uint32_t _ptr_query1
;
6818 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_query1
));
6820 NDR_PULL_ALLOC(ndr
, r
->query1
);
6827 uint32_t _ptr_query1
;
6828 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_query1
));
6830 NDR_PULL_ALLOC(ndr
, r
->query1
);
6837 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
6840 if (ndr_flags
& NDR_BUFFERS
) {
6844 _mem_save_query1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6845 NDR_PULL_SET_MEM_CTX(ndr
, r
->query1
, 0);
6846 NDR_CHECK(ndr_pull_netr_DomainQuery1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->query1
));
6847 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_query1_0
, 0);
6853 _mem_save_query1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6854 NDR_PULL_SET_MEM_CTX(ndr
, r
->query1
, 0);
6855 NDR_CHECK(ndr_pull_netr_DomainQuery1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->query1
));
6856 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_query1_0
, 0);
6861 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
6864 return NDR_ERR_SUCCESS
;
6867 _PUBLIC_
void ndr_print_netr_DomainQuery(struct ndr_print
*ndr
, const char *name
, const union netr_DomainQuery
*r
)
6870 level
= ndr_print_get_switch_value(ndr
, r
);
6871 ndr_print_union(ndr
, name
, level
, "netr_DomainQuery");
6874 ndr_print_ptr(ndr
, "query1", r
->query1
);
6877 ndr_print_netr_DomainQuery1(ndr
, "query1", r
->query1
);
6883 ndr_print_ptr(ndr
, "query1", r
->query1
);
6886 ndr_print_netr_DomainQuery1(ndr
, "query1", r
->query1
);
6892 ndr_print_bad_level(ndr
, name
, level
);
6896 static enum ndr_err_code
ndr_push_netr_DomainTrustInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DomainTrustInfo
*r
)
6898 uint32_t cntr_unknown1_0
;
6899 uint32_t cntr_unknown_0
;
6900 if (ndr_flags
& NDR_SCALARS
) {
6901 NDR_CHECK(ndr_push_align(ndr
, 4));
6902 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->domainname
));
6903 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->fulldomainname
));
6904 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->forest
));
6905 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
6906 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
6907 for (cntr_unknown1_0
= 0; cntr_unknown1_0
< 4; cntr_unknown1_0
++) {
6908 NDR_CHECK(ndr_push_netr_BinaryString(ndr
, NDR_SCALARS
, &r
->unknown1
[cntr_unknown1_0
]));
6910 for (cntr_unknown_0
= 0; cntr_unknown_0
< 4; cntr_unknown_0
++) {
6911 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
[cntr_unknown_0
]));
6914 if (ndr_flags
& NDR_BUFFERS
) {
6915 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->domainname
));
6916 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->fulldomainname
));
6917 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->forest
));
6918 NDR_CHECK(ndr_push_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
6920 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
6922 for (cntr_unknown1_0
= 0; cntr_unknown1_0
< 4; cntr_unknown1_0
++) {
6923 NDR_CHECK(ndr_push_netr_BinaryString(ndr
, NDR_BUFFERS
, &r
->unknown1
[cntr_unknown1_0
]));
6926 return NDR_ERR_SUCCESS
;
6929 static enum ndr_err_code
ndr_pull_netr_DomainTrustInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DomainTrustInfo
*r
)
6932 TALLOC_CTX
*_mem_save_sid_0
;
6933 uint32_t cntr_unknown1_0
;
6934 uint32_t cntr_unknown_0
;
6935 if (ndr_flags
& NDR_SCALARS
) {
6936 NDR_CHECK(ndr_pull_align(ndr
, 4));
6937 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->domainname
));
6938 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->fulldomainname
));
6939 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->forest
));
6940 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
6941 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
6943 NDR_PULL_ALLOC(ndr
, r
->sid
);
6947 for (cntr_unknown1_0
= 0; cntr_unknown1_0
< 4; cntr_unknown1_0
++) {
6948 NDR_CHECK(ndr_pull_netr_BinaryString(ndr
, NDR_SCALARS
, &r
->unknown1
[cntr_unknown1_0
]));
6950 for (cntr_unknown_0
= 0; cntr_unknown_0
< 4; cntr_unknown_0
++) {
6951 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
[cntr_unknown_0
]));
6954 if (ndr_flags
& NDR_BUFFERS
) {
6955 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->domainname
));
6956 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->fulldomainname
));
6957 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->forest
));
6958 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
6960 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6961 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
6962 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
6963 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
6965 for (cntr_unknown1_0
= 0; cntr_unknown1_0
< 4; cntr_unknown1_0
++) {
6966 NDR_CHECK(ndr_pull_netr_BinaryString(ndr
, NDR_BUFFERS
, &r
->unknown1
[cntr_unknown1_0
]));
6969 return NDR_ERR_SUCCESS
;
6972 _PUBLIC_
void ndr_print_netr_DomainTrustInfo(struct ndr_print
*ndr
, const char *name
, const struct netr_DomainTrustInfo
*r
)
6974 uint32_t cntr_unknown1_0
;
6975 uint32_t cntr_unknown_0
;
6976 ndr_print_struct(ndr
, name
, "netr_DomainTrustInfo");
6978 ndr_print_lsa_String(ndr
, "domainname", &r
->domainname
);
6979 ndr_print_lsa_String(ndr
, "fulldomainname", &r
->fulldomainname
);
6980 ndr_print_lsa_String(ndr
, "forest", &r
->forest
);
6981 ndr_print_GUID(ndr
, "guid", &r
->guid
);
6982 ndr_print_ptr(ndr
, "sid", r
->sid
);
6985 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
6988 ndr
->print(ndr
, "%s: ARRAY(%d)", "unknown1", 4);
6990 for (cntr_unknown1_0
=0;cntr_unknown1_0
<4;cntr_unknown1_0
++) {
6992 if (asprintf(&idx_0
, "[%d]", cntr_unknown1_0
) != -1) {
6993 ndr_print_netr_BinaryString(ndr
, "unknown1", &r
->unknown1
[cntr_unknown1_0
]);
6998 ndr
->print(ndr
, "%s: ARRAY(%d)", "unknown", 4);
7000 for (cntr_unknown_0
=0;cntr_unknown_0
<4;cntr_unknown_0
++) {
7002 if (asprintf(&idx_0
, "[%d]", cntr_unknown_0
) != -1) {
7003 ndr_print_uint32(ndr
, "unknown", r
->unknown
[cntr_unknown_0
]);
7011 static enum ndr_err_code
ndr_push_netr_DomainInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DomainInfo1
*r
)
7013 uint32_t cntr_trusts_1
;
7014 uint32_t cntr_unknown_0
;
7015 if (ndr_flags
& NDR_SCALARS
) {
7016 NDR_CHECK(ndr_push_align(ndr
, 4));
7017 NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr
, NDR_SCALARS
, &r
->domaininfo
));
7018 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_trusts
));
7019 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->trusts
));
7020 for (cntr_unknown_0
= 0; cntr_unknown_0
< 14; cntr_unknown_0
++) {
7021 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
[cntr_unknown_0
]));
7024 if (ndr_flags
& NDR_BUFFERS
) {
7025 NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr
, NDR_BUFFERS
, &r
->domaininfo
));
7027 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_trusts
));
7028 for (cntr_trusts_1
= 0; cntr_trusts_1
< r
->num_trusts
; cntr_trusts_1
++) {
7029 NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr
, NDR_SCALARS
, &r
->trusts
[cntr_trusts_1
]));
7031 for (cntr_trusts_1
= 0; cntr_trusts_1
< r
->num_trusts
; cntr_trusts_1
++) {
7032 NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr
, NDR_BUFFERS
, &r
->trusts
[cntr_trusts_1
]));
7036 return NDR_ERR_SUCCESS
;
7039 static enum ndr_err_code
ndr_pull_netr_DomainInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DomainInfo1
*r
)
7041 uint32_t _ptr_trusts
;
7042 uint32_t cntr_trusts_1
;
7043 TALLOC_CTX
*_mem_save_trusts_0
;
7044 TALLOC_CTX
*_mem_save_trusts_1
;
7045 uint32_t cntr_unknown_0
;
7046 if (ndr_flags
& NDR_SCALARS
) {
7047 NDR_CHECK(ndr_pull_align(ndr
, 4));
7048 NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr
, NDR_SCALARS
, &r
->domaininfo
));
7049 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_trusts
));
7050 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_trusts
));
7052 NDR_PULL_ALLOC(ndr
, r
->trusts
);
7056 for (cntr_unknown_0
= 0; cntr_unknown_0
< 14; cntr_unknown_0
++) {
7057 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
[cntr_unknown_0
]));
7060 if (ndr_flags
& NDR_BUFFERS
) {
7061 NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr
, NDR_BUFFERS
, &r
->domaininfo
));
7063 _mem_save_trusts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7064 NDR_PULL_SET_MEM_CTX(ndr
, r
->trusts
, 0);
7065 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->trusts
));
7066 NDR_PULL_ALLOC_N(ndr
, r
->trusts
, ndr_get_array_size(ndr
, &r
->trusts
));
7067 _mem_save_trusts_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7068 NDR_PULL_SET_MEM_CTX(ndr
, r
->trusts
, 0);
7069 for (cntr_trusts_1
= 0; cntr_trusts_1
< r
->num_trusts
; cntr_trusts_1
++) {
7070 NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr
, NDR_SCALARS
, &r
->trusts
[cntr_trusts_1
]));
7072 for (cntr_trusts_1
= 0; cntr_trusts_1
< r
->num_trusts
; cntr_trusts_1
++) {
7073 NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr
, NDR_BUFFERS
, &r
->trusts
[cntr_trusts_1
]));
7075 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusts_1
, 0);
7076 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusts_0
, 0);
7079 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->trusts
, r
->num_trusts
));
7082 return NDR_ERR_SUCCESS
;
7085 _PUBLIC_
void ndr_print_netr_DomainInfo1(struct ndr_print
*ndr
, const char *name
, const struct netr_DomainInfo1
*r
)
7087 uint32_t cntr_trusts_1
;
7088 uint32_t cntr_unknown_0
;
7089 ndr_print_struct(ndr
, name
, "netr_DomainInfo1");
7091 ndr_print_netr_DomainTrustInfo(ndr
, "domaininfo", &r
->domaininfo
);
7092 ndr_print_uint32(ndr
, "num_trusts", r
->num_trusts
);
7093 ndr_print_ptr(ndr
, "trusts", r
->trusts
);
7096 ndr
->print(ndr
, "%s: ARRAY(%d)", "trusts", r
->num_trusts
);
7098 for (cntr_trusts_1
=0;cntr_trusts_1
<r
->num_trusts
;cntr_trusts_1
++) {
7100 if (asprintf(&idx_1
, "[%d]", cntr_trusts_1
) != -1) {
7101 ndr_print_netr_DomainTrustInfo(ndr
, "trusts", &r
->trusts
[cntr_trusts_1
]);
7108 ndr
->print(ndr
, "%s: ARRAY(%d)", "unknown", 14);
7110 for (cntr_unknown_0
=0;cntr_unknown_0
<14;cntr_unknown_0
++) {
7112 if (asprintf(&idx_0
, "[%d]", cntr_unknown_0
) != -1) {
7113 ndr_print_uint32(ndr
, "unknown", r
->unknown
[cntr_unknown_0
]);
7121 static enum ndr_err_code
ndr_push_netr_DomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const union netr_DomainInfo
*r
)
7123 if (ndr_flags
& NDR_SCALARS
) {
7124 int level
= ndr_push_get_switch_value(ndr
, r
);
7125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
7128 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
7132 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
7136 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7139 if (ndr_flags
& NDR_BUFFERS
) {
7140 int level
= ndr_push_get_switch_value(ndr
, r
);
7144 NDR_CHECK(ndr_push_netr_DomainInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
7150 NDR_CHECK(ndr_push_netr_DomainInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
7155 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7158 return NDR_ERR_SUCCESS
;
7161 static enum ndr_err_code
ndr_pull_netr_DomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, union netr_DomainInfo
*r
)
7165 TALLOC_CTX
*_mem_save_info1_0
;
7166 level
= ndr_pull_get_switch_value(ndr
, r
);
7167 if (ndr_flags
& NDR_SCALARS
) {
7168 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
7169 if (_level
!= level
) {
7170 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
7174 uint32_t _ptr_info1
;
7175 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
7177 NDR_PULL_ALLOC(ndr
, r
->info1
);
7184 uint32_t _ptr_info1
;
7185 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
7187 NDR_PULL_ALLOC(ndr
, r
->info1
);
7194 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7197 if (ndr_flags
& NDR_BUFFERS
) {
7201 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7202 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
7203 NDR_CHECK(ndr_pull_netr_DomainInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
7204 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
7210 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7211 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
7212 NDR_CHECK(ndr_pull_netr_DomainInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
7213 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
7218 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
7221 return NDR_ERR_SUCCESS
;
7224 _PUBLIC_
void ndr_print_netr_DomainInfo(struct ndr_print
*ndr
, const char *name
, const union netr_DomainInfo
*r
)
7227 level
= ndr_print_get_switch_value(ndr
, r
);
7228 ndr_print_union(ndr
, name
, level
, "netr_DomainInfo");
7231 ndr_print_ptr(ndr
, "info1", r
->info1
);
7234 ndr_print_netr_DomainInfo1(ndr
, "info1", r
->info1
);
7240 ndr_print_ptr(ndr
, "info1", r
->info1
);
7243 ndr_print_netr_DomainInfo1(ndr
, "info1", r
->info1
);
7249 ndr_print_bad_level(ndr
, name
, level
);
7253 static enum ndr_err_code
ndr_push_netr_CryptPassword(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_CryptPassword
*r
)
7256 uint32_t _flags_save_STRUCT
= ndr
->flags
;
7257 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
7258 if (ndr_flags
& NDR_SCALARS
) {
7259 NDR_CHECK(ndr_push_align(ndr
, 4));
7260 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 512));
7261 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
7263 if (ndr_flags
& NDR_BUFFERS
) {
7265 ndr
->flags
= _flags_save_STRUCT
;
7267 return NDR_ERR_SUCCESS
;
7270 static enum ndr_err_code
ndr_pull_netr_CryptPassword(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_CryptPassword
*r
)
7273 uint32_t _flags_save_STRUCT
= ndr
->flags
;
7274 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
7275 if (ndr_flags
& NDR_SCALARS
) {
7276 NDR_CHECK(ndr_pull_align(ndr
, 4));
7277 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 512));
7278 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
7280 if (ndr_flags
& NDR_BUFFERS
) {
7282 ndr
->flags
= _flags_save_STRUCT
;
7284 return NDR_ERR_SUCCESS
;
7287 _PUBLIC_
void ndr_print_netr_CryptPassword(struct ndr_print
*ndr
, const char *name
, const struct netr_CryptPassword
*r
)
7289 ndr_print_struct(ndr
, name
, "netr_CryptPassword");
7291 uint32_t _flags_save_STRUCT
= ndr
->flags
;
7292 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
7294 ndr_print_array_uint8(ndr
, "data", r
->data
, 512);
7295 ndr_print_uint32(ndr
, "length", r
->length
);
7297 ndr
->flags
= _flags_save_STRUCT
;
7301 static enum ndr_err_code
ndr_push_netr_DsRAddressToSitenamesWCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DsRAddressToSitenamesWCtr
*r
)
7303 uint32_t cntr_sitename_1
;
7304 if (ndr_flags
& NDR_SCALARS
) {
7305 NDR_CHECK(ndr_push_align(ndr
, 4));
7306 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7307 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sitename
));
7309 if (ndr_flags
& NDR_BUFFERS
) {
7311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7312 for (cntr_sitename_1
= 0; cntr_sitename_1
< r
->count
; cntr_sitename_1
++) {
7313 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->sitename
[cntr_sitename_1
]));
7315 for (cntr_sitename_1
= 0; cntr_sitename_1
< r
->count
; cntr_sitename_1
++) {
7316 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->sitename
[cntr_sitename_1
]));
7320 return NDR_ERR_SUCCESS
;
7323 static enum ndr_err_code
ndr_pull_netr_DsRAddressToSitenamesWCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DsRAddressToSitenamesWCtr
*r
)
7325 uint32_t _ptr_sitename
;
7326 uint32_t cntr_sitename_1
;
7327 TALLOC_CTX
*_mem_save_sitename_0
;
7328 TALLOC_CTX
*_mem_save_sitename_1
;
7329 if (ndr_flags
& NDR_SCALARS
) {
7330 NDR_CHECK(ndr_pull_align(ndr
, 4));
7331 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
7332 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sitename
));
7333 if (_ptr_sitename
) {
7334 NDR_PULL_ALLOC(ndr
, r
->sitename
);
7339 if (ndr_flags
& NDR_BUFFERS
) {
7341 _mem_save_sitename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7342 NDR_PULL_SET_MEM_CTX(ndr
, r
->sitename
, 0);
7343 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sitename
));
7344 NDR_PULL_ALLOC_N(ndr
, r
->sitename
, ndr_get_array_size(ndr
, &r
->sitename
));
7345 _mem_save_sitename_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7346 NDR_PULL_SET_MEM_CTX(ndr
, r
->sitename
, 0);
7347 for (cntr_sitename_1
= 0; cntr_sitename_1
< r
->count
; cntr_sitename_1
++) {
7348 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->sitename
[cntr_sitename_1
]));
7350 for (cntr_sitename_1
= 0; cntr_sitename_1
< r
->count
; cntr_sitename_1
++) {
7351 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->sitename
[cntr_sitename_1
]));
7353 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sitename_1
, 0);
7354 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sitename_0
, 0);
7357 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sitename
, r
->count
));
7360 return NDR_ERR_SUCCESS
;
7363 _PUBLIC_
void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print
*ndr
, const char *name
, const struct netr_DsRAddressToSitenamesWCtr
*r
)
7365 uint32_t cntr_sitename_1
;
7366 ndr_print_struct(ndr
, name
, "netr_DsRAddressToSitenamesWCtr");
7368 ndr_print_uint32(ndr
, "count", r
->count
);
7369 ndr_print_ptr(ndr
, "sitename", r
->sitename
);
7372 ndr
->print(ndr
, "%s: ARRAY(%d)", "sitename", r
->count
);
7374 for (cntr_sitename_1
=0;cntr_sitename_1
<r
->count
;cntr_sitename_1
++) {
7376 if (asprintf(&idx_1
, "[%d]", cntr_sitename_1
) != -1) {
7377 ndr_print_lsa_String(ndr
, "sitename", &r
->sitename
[cntr_sitename_1
]);
7387 static enum ndr_err_code
ndr_push_netr_DsRAddress(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DsRAddress
*r
)
7389 if (ndr_flags
& NDR_SCALARS
) {
7390 NDR_CHECK(ndr_push_align(ndr
, 4));
7391 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->buffer
));
7392 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
7394 if (ndr_flags
& NDR_BUFFERS
) {
7396 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
7397 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->buffer
, r
->size
));
7400 return NDR_ERR_SUCCESS
;
7403 static enum ndr_err_code
ndr_pull_netr_DsRAddress(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DsRAddress
*r
)
7405 uint32_t _ptr_buffer
;
7406 TALLOC_CTX
*_mem_save_buffer_0
;
7407 if (ndr_flags
& NDR_SCALARS
) {
7408 NDR_CHECK(ndr_pull_align(ndr
, 4));
7409 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
7411 NDR_PULL_ALLOC(ndr
, r
->buffer
);
7415 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
7417 if (ndr_flags
& NDR_BUFFERS
) {
7419 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7420 NDR_PULL_SET_MEM_CTX(ndr
, r
->buffer
, 0);
7421 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->buffer
));
7422 NDR_PULL_ALLOC_N(ndr
, r
->buffer
, ndr_get_array_size(ndr
, &r
->buffer
));
7423 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->buffer
, ndr_get_array_size(ndr
, &r
->buffer
)));
7424 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
7427 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->buffer
, r
->size
));
7430 return NDR_ERR_SUCCESS
;
7433 _PUBLIC_
void ndr_print_netr_DsRAddress(struct ndr_print
*ndr
, const char *name
, const struct netr_DsRAddress
*r
)
7435 ndr_print_struct(ndr
, name
, "netr_DsRAddress");
7437 ndr_print_ptr(ndr
, "buffer", r
->buffer
);
7440 ndr_print_array_uint8(ndr
, "buffer", r
->buffer
, r
->size
);
7443 ndr_print_uint32(ndr
, "size", r
->size
);
7447 static enum ndr_err_code
ndr_push_netr_TrustFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
7449 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
7450 return NDR_ERR_SUCCESS
;
7453 static enum ndr_err_code
ndr_pull_netr_TrustFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
7456 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
7458 return NDR_ERR_SUCCESS
;
7461 _PUBLIC_
void ndr_print_netr_TrustFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
7463 ndr_print_uint32(ndr
, name
, r
);
7465 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_FLAG_IN_FOREST", NETR_TRUST_FLAG_IN_FOREST
, r
);
7466 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_FLAG_OUTBOUND", NETR_TRUST_FLAG_OUTBOUND
, r
);
7467 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_FLAG_TREEROOT", NETR_TRUST_FLAG_TREEROOT
, r
);
7468 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_FLAG_PRIMARY", NETR_TRUST_FLAG_PRIMARY
, r
);
7469 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_FLAG_NATIVE", NETR_TRUST_FLAG_NATIVE
, r
);
7470 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_FLAG_INBOUND", NETR_TRUST_FLAG_INBOUND
, r
);
7474 static enum ndr_err_code
ndr_push_netr_TrustType(struct ndr_push
*ndr
, int ndr_flags
, enum netr_TrustType r
)
7476 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
7477 return NDR_ERR_SUCCESS
;
7480 static enum ndr_err_code
ndr_pull_netr_TrustType(struct ndr_pull
*ndr
, int ndr_flags
, enum netr_TrustType
*r
)
7483 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
7485 return NDR_ERR_SUCCESS
;
7488 _PUBLIC_
void ndr_print_netr_TrustType(struct ndr_print
*ndr
, const char *name
, enum netr_TrustType r
)
7490 const char *val
= NULL
;
7493 case NETR_TRUST_TYPE_DOWNLEVEL
: val
= "NETR_TRUST_TYPE_DOWNLEVEL"; break;
7494 case NETR_TRUST_TYPE_UPLEVEL
: val
= "NETR_TRUST_TYPE_UPLEVEL"; break;
7495 case NETR_TRUST_TYPE_MIT
: val
= "NETR_TRUST_TYPE_MIT"; break;
7496 case NETR_TRUST_TYPE_DCE
: val
= "NETR_TRUST_TYPE_DCE"; break;
7498 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
7501 static enum ndr_err_code
ndr_push_netr_TrustAttributes(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
7503 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
7504 return NDR_ERR_SUCCESS
;
7507 static enum ndr_err_code
ndr_pull_netr_TrustAttributes(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
7510 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
7512 return NDR_ERR_SUCCESS
;
7515 _PUBLIC_
void ndr_print_netr_TrustAttributes(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
7517 ndr_print_uint32(ndr
, name
, r
);
7519 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE", NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE
, r
);
7520 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY", NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY
, r
);
7521 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
, r
);
7522 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
, r
);
7523 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
, r
);
7524 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_WITHIN_FOREST", NETR_TRUST_ATTRIBUTE_WITHIN_FOREST
, r
);
7525 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
, r
);
7529 static enum ndr_err_code
ndr_push_netr_DomainTrust(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DomainTrust
*r
)
7531 if (ndr_flags
& NDR_SCALARS
) {
7532 NDR_CHECK(ndr_push_align(ndr
, 4));
7533 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_name
));
7534 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dns_name
));
7535 NDR_CHECK(ndr_push_netr_TrustFlags(ndr
, NDR_SCALARS
, r
->trust_flags
));
7536 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->parent_index
));
7537 NDR_CHECK(ndr_push_netr_TrustType(ndr
, NDR_SCALARS
, r
->trust_type
));
7538 NDR_CHECK(ndr_push_netr_TrustAttributes(ndr
, NDR_SCALARS
, r
->trust_attributes
));
7539 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
7540 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
7542 if (ndr_flags
& NDR_BUFFERS
) {
7543 if (r
->netbios_name
) {
7544 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
7545 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7546 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->netbios_name
, CH_UTF16
)));
7547 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->netbios_name
, ndr_charset_length(r
->netbios_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7550 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
7551 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7552 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dns_name
, CH_UTF16
)));
7553 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dns_name
, ndr_charset_length(r
->dns_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7556 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
7558 NDR_CHECK(ndr_push_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
7560 return NDR_ERR_SUCCESS
;
7563 static enum ndr_err_code
ndr_pull_netr_DomainTrust(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DomainTrust
*r
)
7565 uint32_t _ptr_netbios_name
;
7566 TALLOC_CTX
*_mem_save_netbios_name_0
;
7567 uint32_t _ptr_dns_name
;
7568 TALLOC_CTX
*_mem_save_dns_name_0
;
7570 TALLOC_CTX
*_mem_save_sid_0
;
7571 if (ndr_flags
& NDR_SCALARS
) {
7572 NDR_CHECK(ndr_pull_align(ndr
, 4));
7573 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_name
));
7574 if (_ptr_netbios_name
) {
7575 NDR_PULL_ALLOC(ndr
, r
->netbios_name
);
7577 r
->netbios_name
= NULL
;
7579 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dns_name
));
7580 if (_ptr_dns_name
) {
7581 NDR_PULL_ALLOC(ndr
, r
->dns_name
);
7585 NDR_CHECK(ndr_pull_netr_TrustFlags(ndr
, NDR_SCALARS
, &r
->trust_flags
));
7586 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->parent_index
));
7587 NDR_CHECK(ndr_pull_netr_TrustType(ndr
, NDR_SCALARS
, &r
->trust_type
));
7588 NDR_CHECK(ndr_pull_netr_TrustAttributes(ndr
, NDR_SCALARS
, &r
->trust_attributes
));
7589 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
7591 NDR_PULL_ALLOC(ndr
, r
->sid
);
7595 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
7597 if (ndr_flags
& NDR_BUFFERS
) {
7598 if (r
->netbios_name
) {
7599 _mem_save_netbios_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7600 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_name
, 0);
7601 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_name
));
7602 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->netbios_name
));
7603 if (ndr_get_array_length(ndr
, &r
->netbios_name
) > ndr_get_array_size(ndr
, &r
->netbios_name
)) {
7604 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->netbios_name
), ndr_get_array_length(ndr
, &r
->netbios_name
));
7606 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t)));
7607 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->netbios_name
, ndr_get_array_length(ndr
, &r
->netbios_name
), sizeof(uint16_t), CH_UTF16
));
7608 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_name_0
, 0);
7611 _mem_save_dns_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7612 NDR_PULL_SET_MEM_CTX(ndr
, r
->dns_name
, 0);
7613 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dns_name
));
7614 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dns_name
));
7615 if (ndr_get_array_length(ndr
, &r
->dns_name
) > ndr_get_array_size(ndr
, &r
->dns_name
)) {
7616 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dns_name
), ndr_get_array_length(ndr
, &r
->dns_name
));
7618 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t)));
7619 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dns_name
, ndr_get_array_length(ndr
, &r
->dns_name
), sizeof(uint16_t), CH_UTF16
));
7620 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dns_name_0
, 0);
7623 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7624 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
7625 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
7626 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
7628 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
7630 return NDR_ERR_SUCCESS
;
7633 _PUBLIC_
void ndr_print_netr_DomainTrust(struct ndr_print
*ndr
, const char *name
, const struct netr_DomainTrust
*r
)
7635 ndr_print_struct(ndr
, name
, "netr_DomainTrust");
7637 ndr_print_ptr(ndr
, "netbios_name", r
->netbios_name
);
7639 if (r
->netbios_name
) {
7640 ndr_print_string(ndr
, "netbios_name", r
->netbios_name
);
7643 ndr_print_ptr(ndr
, "dns_name", r
->dns_name
);
7646 ndr_print_string(ndr
, "dns_name", r
->dns_name
);
7649 ndr_print_netr_TrustFlags(ndr
, "trust_flags", r
->trust_flags
);
7650 ndr_print_uint32(ndr
, "parent_index", r
->parent_index
);
7651 ndr_print_netr_TrustType(ndr
, "trust_type", r
->trust_type
);
7652 ndr_print_netr_TrustAttributes(ndr
, "trust_attributes", r
->trust_attributes
);
7653 ndr_print_ptr(ndr
, "sid", r
->sid
);
7656 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
7659 ndr_print_GUID(ndr
, "guid", &r
->guid
);
7663 static enum ndr_err_code
ndr_push_netr_DomainTrustList(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DomainTrustList
*r
)
7665 uint32_t cntr_array_1
;
7666 if (ndr_flags
& NDR_SCALARS
) {
7667 NDR_CHECK(ndr_push_align(ndr
, 4));
7668 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7669 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
7671 if (ndr_flags
& NDR_BUFFERS
) {
7673 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7674 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7675 NDR_CHECK(ndr_push_netr_DomainTrust(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7677 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7678 NDR_CHECK(ndr_push_netr_DomainTrust(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7682 return NDR_ERR_SUCCESS
;
7685 static enum ndr_err_code
ndr_pull_netr_DomainTrustList(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DomainTrustList
*r
)
7687 uint32_t _ptr_array
;
7688 uint32_t cntr_array_1
;
7689 TALLOC_CTX
*_mem_save_array_0
;
7690 TALLOC_CTX
*_mem_save_array_1
;
7691 if (ndr_flags
& NDR_SCALARS
) {
7692 NDR_CHECK(ndr_pull_align(ndr
, 4));
7693 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
7694 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
7696 NDR_PULL_ALLOC(ndr
, r
->array
);
7701 if (ndr_flags
& NDR_BUFFERS
) {
7703 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7704 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7705 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
7706 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
7707 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7708 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
7709 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7710 NDR_CHECK(ndr_pull_netr_DomainTrust(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
7712 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
7713 NDR_CHECK(ndr_pull_netr_DomainTrust(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
7715 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
7716 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
7719 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
7722 return NDR_ERR_SUCCESS
;
7725 _PUBLIC_
void ndr_print_netr_DomainTrustList(struct ndr_print
*ndr
, const char *name
, const struct netr_DomainTrustList
*r
)
7727 uint32_t cntr_array_1
;
7728 ndr_print_struct(ndr
, name
, "netr_DomainTrustList");
7730 ndr_print_uint32(ndr
, "count", r
->count
);
7731 ndr_print_ptr(ndr
, "array", r
->array
);
7734 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", r
->count
);
7736 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
7738 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
7739 ndr_print_netr_DomainTrust(ndr
, "array", &r
->array
[cntr_array_1
]);
7749 static enum ndr_err_code
ndr_push_netr_DsRAddressToSitenamesExWCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct netr_DsRAddressToSitenamesExWCtr
*r
)
7751 uint32_t cntr_sitename_1
;
7752 uint32_t cntr_subnetname_1
;
7753 if (ndr_flags
& NDR_SCALARS
) {
7754 NDR_CHECK(ndr_push_align(ndr
, 4));
7755 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7756 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sitename
));
7757 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->subnetname
));
7759 if (ndr_flags
& NDR_BUFFERS
) {
7761 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7762 for (cntr_sitename_1
= 0; cntr_sitename_1
< r
->count
; cntr_sitename_1
++) {
7763 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->sitename
[cntr_sitename_1
]));
7765 for (cntr_sitename_1
= 0; cntr_sitename_1
< r
->count
; cntr_sitename_1
++) {
7766 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->sitename
[cntr_sitename_1
]));
7769 if (r
->subnetname
) {
7770 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
7771 for (cntr_subnetname_1
= 0; cntr_subnetname_1
< r
->count
; cntr_subnetname_1
++) {
7772 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->subnetname
[cntr_subnetname_1
]));
7774 for (cntr_subnetname_1
= 0; cntr_subnetname_1
< r
->count
; cntr_subnetname_1
++) {
7775 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->subnetname
[cntr_subnetname_1
]));
7779 return NDR_ERR_SUCCESS
;
7782 static enum ndr_err_code
ndr_pull_netr_DsRAddressToSitenamesExWCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct netr_DsRAddressToSitenamesExWCtr
*r
)
7784 uint32_t _ptr_sitename
;
7785 uint32_t cntr_sitename_1
;
7786 TALLOC_CTX
*_mem_save_sitename_0
;
7787 TALLOC_CTX
*_mem_save_sitename_1
;
7788 uint32_t _ptr_subnetname
;
7789 uint32_t cntr_subnetname_1
;
7790 TALLOC_CTX
*_mem_save_subnetname_0
;
7791 TALLOC_CTX
*_mem_save_subnetname_1
;
7792 if (ndr_flags
& NDR_SCALARS
) {
7793 NDR_CHECK(ndr_pull_align(ndr
, 4));
7794 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
7795 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sitename
));
7796 if (_ptr_sitename
) {
7797 NDR_PULL_ALLOC(ndr
, r
->sitename
);
7801 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_subnetname
));
7802 if (_ptr_subnetname
) {
7803 NDR_PULL_ALLOC(ndr
, r
->subnetname
);
7805 r
->subnetname
= NULL
;
7808 if (ndr_flags
& NDR_BUFFERS
) {
7810 _mem_save_sitename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7811 NDR_PULL_SET_MEM_CTX(ndr
, r
->sitename
, 0);
7812 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sitename
));
7813 NDR_PULL_ALLOC_N(ndr
, r
->sitename
, ndr_get_array_size(ndr
, &r
->sitename
));
7814 _mem_save_sitename_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7815 NDR_PULL_SET_MEM_CTX(ndr
, r
->sitename
, 0);
7816 for (cntr_sitename_1
= 0; cntr_sitename_1
< r
->count
; cntr_sitename_1
++) {
7817 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->sitename
[cntr_sitename_1
]));
7819 for (cntr_sitename_1
= 0; cntr_sitename_1
< r
->count
; cntr_sitename_1
++) {
7820 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->sitename
[cntr_sitename_1
]));
7822 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sitename_1
, 0);
7823 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sitename_0
, 0);
7825 if (r
->subnetname
) {
7826 _mem_save_subnetname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7827 NDR_PULL_SET_MEM_CTX(ndr
, r
->subnetname
, 0);
7828 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->subnetname
));
7829 NDR_PULL_ALLOC_N(ndr
, r
->subnetname
, ndr_get_array_size(ndr
, &r
->subnetname
));
7830 _mem_save_subnetname_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7831 NDR_PULL_SET_MEM_CTX(ndr
, r
->subnetname
, 0);
7832 for (cntr_subnetname_1
= 0; cntr_subnetname_1
< r
->count
; cntr_subnetname_1
++) {
7833 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->subnetname
[cntr_subnetname_1
]));
7835 for (cntr_subnetname_1
= 0; cntr_subnetname_1
< r
->count
; cntr_subnetname_1
++) {
7836 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->subnetname
[cntr_subnetname_1
]));
7838 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_subnetname_1
, 0);
7839 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_subnetname_0
, 0);
7842 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sitename
, r
->count
));
7844 if (r
->subnetname
) {
7845 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->subnetname
, r
->count
));
7848 return NDR_ERR_SUCCESS
;
7851 _PUBLIC_
void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print
*ndr
, const char *name
, const struct netr_DsRAddressToSitenamesExWCtr
*r
)
7853 uint32_t cntr_sitename_1
;
7854 uint32_t cntr_subnetname_1
;
7855 ndr_print_struct(ndr
, name
, "netr_DsRAddressToSitenamesExWCtr");
7857 ndr_print_uint32(ndr
, "count", r
->count
);
7858 ndr_print_ptr(ndr
, "sitename", r
->sitename
);
7861 ndr
->print(ndr
, "%s: ARRAY(%d)", "sitename", r
->count
);
7863 for (cntr_sitename_1
=0;cntr_sitename_1
<r
->count
;cntr_sitename_1
++) {
7865 if (asprintf(&idx_1
, "[%d]", cntr_sitename_1
) != -1) {
7866 ndr_print_lsa_String(ndr
, "sitename", &r
->sitename
[cntr_sitename_1
]);
7873 ndr_print_ptr(ndr
, "subnetname", r
->subnetname
);
7875 if (r
->subnetname
) {
7876 ndr
->print(ndr
, "%s: ARRAY(%d)", "subnetname", r
->count
);
7878 for (cntr_subnetname_1
=0;cntr_subnetname_1
<r
->count
;cntr_subnetname_1
++) {
7880 if (asprintf(&idx_1
, "[%d]", cntr_subnetname_1
) != -1) {
7881 ndr_print_lsa_String(ndr
, "subnetname", &r
->subnetname
[cntr_subnetname_1
]);
7891 static enum ndr_err_code
ndr_push_DcSitesCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct DcSitesCtr
*r
)
7893 uint32_t cntr_sites_1
;
7894 if (ndr_flags
& NDR_SCALARS
) {
7895 NDR_CHECK(ndr_push_align(ndr
, 4));
7896 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sites
));
7897 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sites
));
7899 if (ndr_flags
& NDR_BUFFERS
) {
7901 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sites
));
7902 for (cntr_sites_1
= 0; cntr_sites_1
< r
->num_sites
; cntr_sites_1
++) {
7903 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->sites
[cntr_sites_1
]));
7905 for (cntr_sites_1
= 0; cntr_sites_1
< r
->num_sites
; cntr_sites_1
++) {
7906 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->sites
[cntr_sites_1
]));
7910 return NDR_ERR_SUCCESS
;
7913 static enum ndr_err_code
ndr_pull_DcSitesCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct DcSitesCtr
*r
)
7915 uint32_t _ptr_sites
;
7916 uint32_t cntr_sites_1
;
7917 TALLOC_CTX
*_mem_save_sites_0
;
7918 TALLOC_CTX
*_mem_save_sites_1
;
7919 if (ndr_flags
& NDR_SCALARS
) {
7920 NDR_CHECK(ndr_pull_align(ndr
, 4));
7921 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_sites
));
7922 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sites
));
7924 NDR_PULL_ALLOC(ndr
, r
->sites
);
7929 if (ndr_flags
& NDR_BUFFERS
) {
7931 _mem_save_sites_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7932 NDR_PULL_SET_MEM_CTX(ndr
, r
->sites
, 0);
7933 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sites
));
7934 NDR_PULL_ALLOC_N(ndr
, r
->sites
, ndr_get_array_size(ndr
, &r
->sites
));
7935 _mem_save_sites_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7936 NDR_PULL_SET_MEM_CTX(ndr
, r
->sites
, 0);
7937 for (cntr_sites_1
= 0; cntr_sites_1
< r
->num_sites
; cntr_sites_1
++) {
7938 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->sites
[cntr_sites_1
]));
7940 for (cntr_sites_1
= 0; cntr_sites_1
< r
->num_sites
; cntr_sites_1
++) {
7941 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->sites
[cntr_sites_1
]));
7943 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sites_1
, 0);
7944 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sites_0
, 0);
7947 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sites
, r
->num_sites
));
7950 return NDR_ERR_SUCCESS
;
7953 _PUBLIC_
void ndr_print_DcSitesCtr(struct ndr_print
*ndr
, const char *name
, const struct DcSitesCtr
*r
)
7955 uint32_t cntr_sites_1
;
7956 ndr_print_struct(ndr
, name
, "DcSitesCtr");
7958 ndr_print_uint32(ndr
, "num_sites", r
->num_sites
);
7959 ndr_print_ptr(ndr
, "sites", r
->sites
);
7962 ndr
->print(ndr
, "%s: ARRAY(%d)", "sites", r
->num_sites
);
7964 for (cntr_sites_1
=0;cntr_sites_1
<r
->num_sites
;cntr_sites_1
++) {
7966 if (asprintf(&idx_1
, "[%d]", cntr_sites_1
) != -1) {
7967 ndr_print_lsa_String(ndr
, "sites", &r
->sites
[cntr_sites_1
]);
7977 static enum ndr_err_code
ndr_push_netr_LogonUasLogon(struct ndr_push
*ndr
, int flags
, const struct netr_LogonUasLogon
*r
)
7979 if (flags
& NDR_IN
) {
7980 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
7981 if (r
->in
.server_name
) {
7982 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7983 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7984 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7985 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
));
7987 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
7988 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7989 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
7990 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
));
7991 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.workstation
, CH_UTF16
)));
7992 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7993 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.workstation
, CH_UTF16
)));
7994 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.workstation
, ndr_charset_length(r
->in
.workstation
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7996 if (flags
& NDR_OUT
) {
7997 if (r
->out
.info
== NULL
) {
7998 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8000 NDR_CHECK(ndr_push_netr_UasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
8001 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
8003 return NDR_ERR_SUCCESS
;
8006 static enum ndr_err_code
ndr_pull_netr_LogonUasLogon(struct ndr_pull
*ndr
, int flags
, struct netr_LogonUasLogon
*r
)
8008 uint32_t _ptr_server_name
;
8009 TALLOC_CTX
*_mem_save_server_name_0
;
8010 TALLOC_CTX
*_mem_save_info_0
;
8011 if (flags
& NDR_IN
) {
8012 ZERO_STRUCT(r
->out
);
8014 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8015 if (_ptr_server_name
) {
8016 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8018 r
->in
.server_name
= NULL
;
8020 if (r
->in
.server_name
) {
8021 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8022 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8023 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8024 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8025 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8026 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8028 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8029 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8030 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8032 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
8033 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
8034 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
8035 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
8037 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
8038 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
8039 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.workstation
));
8040 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.workstation
));
8041 if (ndr_get_array_length(ndr
, &r
->in
.workstation
) > ndr_get_array_size(ndr
, &r
->in
.workstation
)) {
8042 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.workstation
), ndr_get_array_length(ndr
, &r
->in
.workstation
));
8044 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.workstation
), sizeof(uint16_t)));
8045 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.workstation
, ndr_get_array_length(ndr
, &r
->in
.workstation
), sizeof(uint16_t), CH_UTF16
));
8046 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8047 ZERO_STRUCTP(r
->out
.info
);
8049 if (flags
& NDR_OUT
) {
8050 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8051 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8053 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8054 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
8055 NDR_CHECK(ndr_pull_netr_UasInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
8056 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
8057 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
8059 return NDR_ERR_SUCCESS
;
8062 _PUBLIC_
void ndr_print_netr_LogonUasLogon(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonUasLogon
*r
)
8064 ndr_print_struct(ndr
, name
, "netr_LogonUasLogon");
8066 if (flags
& NDR_SET_VALUES
) {
8067 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8069 if (flags
& NDR_IN
) {
8070 ndr_print_struct(ndr
, "in", "netr_LogonUasLogon");
8072 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8074 if (r
->in
.server_name
) {
8075 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8078 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
8079 ndr_print_string(ndr
, "workstation", r
->in
.workstation
);
8082 if (flags
& NDR_OUT
) {
8083 ndr_print_struct(ndr
, "out", "netr_LogonUasLogon");
8085 ndr_print_ptr(ndr
, "info", r
->out
.info
);
8087 ndr_print_netr_UasInfo(ndr
, "info", r
->out
.info
);
8089 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
8095 static enum ndr_err_code
ndr_push_netr_LogonUasLogoff(struct ndr_push
*ndr
, int flags
, const struct netr_LogonUasLogoff
*r
)
8097 if (flags
& NDR_IN
) {
8098 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8099 if (r
->in
.server_name
) {
8100 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8101 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8102 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8103 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
));
8105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
8106 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
8108 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
));
8109 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.workstation
, CH_UTF16
)));
8110 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8111 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.workstation
, CH_UTF16
)));
8112 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.workstation
, ndr_charset_length(r
->in
.workstation
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8114 if (flags
& NDR_OUT
) {
8115 if (r
->out
.info
== NULL
) {
8116 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8118 NDR_CHECK(ndr_push_netr_UasLogoffInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
8119 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
8121 return NDR_ERR_SUCCESS
;
8124 static enum ndr_err_code
ndr_pull_netr_LogonUasLogoff(struct ndr_pull
*ndr
, int flags
, struct netr_LogonUasLogoff
*r
)
8126 uint32_t _ptr_server_name
;
8127 TALLOC_CTX
*_mem_save_server_name_0
;
8128 TALLOC_CTX
*_mem_save_info_0
;
8129 if (flags
& NDR_IN
) {
8130 ZERO_STRUCT(r
->out
);
8132 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8133 if (_ptr_server_name
) {
8134 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8136 r
->in
.server_name
= NULL
;
8138 if (r
->in
.server_name
) {
8139 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8140 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8141 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8142 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8143 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8144 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8146 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8147 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8148 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8150 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
8151 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
8152 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
8153 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
8155 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
8156 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
8157 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.workstation
));
8158 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.workstation
));
8159 if (ndr_get_array_length(ndr
, &r
->in
.workstation
) > ndr_get_array_size(ndr
, &r
->in
.workstation
)) {
8160 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.workstation
), ndr_get_array_length(ndr
, &r
->in
.workstation
));
8162 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.workstation
), sizeof(uint16_t)));
8163 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.workstation
, ndr_get_array_length(ndr
, &r
->in
.workstation
), sizeof(uint16_t), CH_UTF16
));
8164 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8165 ZERO_STRUCTP(r
->out
.info
);
8167 if (flags
& NDR_OUT
) {
8168 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8169 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
8171 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8172 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
8173 NDR_CHECK(ndr_pull_netr_UasLogoffInfo(ndr
, NDR_SCALARS
, r
->out
.info
));
8174 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
8175 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
8177 return NDR_ERR_SUCCESS
;
8180 _PUBLIC_
void ndr_print_netr_LogonUasLogoff(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonUasLogoff
*r
)
8182 ndr_print_struct(ndr
, name
, "netr_LogonUasLogoff");
8184 if (flags
& NDR_SET_VALUES
) {
8185 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8187 if (flags
& NDR_IN
) {
8188 ndr_print_struct(ndr
, "in", "netr_LogonUasLogoff");
8190 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8192 if (r
->in
.server_name
) {
8193 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8196 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
8197 ndr_print_string(ndr
, "workstation", r
->in
.workstation
);
8200 if (flags
& NDR_OUT
) {
8201 ndr_print_struct(ndr
, "out", "netr_LogonUasLogoff");
8203 ndr_print_ptr(ndr
, "info", r
->out
.info
);
8205 ndr_print_netr_UasLogoffInfo(ndr
, "info", r
->out
.info
);
8207 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
8213 static enum ndr_err_code
ndr_push_netr_LogonSamLogon(struct ndr_push
*ndr
, int flags
, const struct netr_LogonSamLogon
*r
)
8215 if (flags
& NDR_IN
) {
8216 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8217 if (r
->in
.server_name
) {
8218 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8219 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8220 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8221 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
));
8223 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.computer_name
));
8224 if (r
->in
.computer_name
) {
8225 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8226 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8227 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8228 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
));
8230 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.credential
));
8231 if (r
->in
.credential
) {
8232 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
8234 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.return_authenticator
));
8235 if (r
->in
.return_authenticator
) {
8236 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
8238 NDR_CHECK(ndr_push_netr_LogonLevel(ndr
, NDR_SCALARS
, r
->in
.logon_level
));
8239 if (r
->in
.logon
== NULL
) {
8240 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8242 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.logon
, r
->in
.logon_level
));
8243 NDR_CHECK(ndr_push_netr_LogonInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logon
));
8244 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.validation_level
));
8246 if (flags
& NDR_OUT
) {
8247 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.return_authenticator
));
8248 if (r
->out
.return_authenticator
) {
8249 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
8251 if (r
->out
.validation
== NULL
) {
8252 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8254 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.validation
, r
->in
.validation_level
));
8255 NDR_CHECK(ndr_push_netr_Validation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.validation
));
8256 if (r
->out
.authoritative
== NULL
) {
8257 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8259 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->out
.authoritative
));
8260 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8262 return NDR_ERR_SUCCESS
;
8265 static enum ndr_err_code
ndr_pull_netr_LogonSamLogon(struct ndr_pull
*ndr
, int flags
, struct netr_LogonSamLogon
*r
)
8267 uint32_t _ptr_server_name
;
8268 uint32_t _ptr_computer_name
;
8269 uint32_t _ptr_credential
;
8270 uint32_t _ptr_return_authenticator
;
8271 TALLOC_CTX
*_mem_save_server_name_0
;
8272 TALLOC_CTX
*_mem_save_computer_name_0
;
8273 TALLOC_CTX
*_mem_save_credential_0
;
8274 TALLOC_CTX
*_mem_save_return_authenticator_0
;
8275 TALLOC_CTX
*_mem_save_logon_0
;
8276 TALLOC_CTX
*_mem_save_validation_0
;
8277 TALLOC_CTX
*_mem_save_authoritative_0
;
8278 if (flags
& NDR_IN
) {
8279 ZERO_STRUCT(r
->out
);
8281 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8282 if (_ptr_server_name
) {
8283 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8285 r
->in
.server_name
= NULL
;
8287 if (r
->in
.server_name
) {
8288 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8289 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8290 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8291 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8292 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8293 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8295 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8296 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8297 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8299 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_name
));
8300 if (_ptr_computer_name
) {
8301 NDR_PULL_ALLOC(ndr
, r
->in
.computer_name
);
8303 r
->in
.computer_name
= NULL
;
8305 if (r
->in
.computer_name
) {
8306 _mem_save_computer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8307 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.computer_name
, 0);
8308 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
8309 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
8310 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
8311 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
8313 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
8314 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
8315 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_name_0
, 0);
8317 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_credential
));
8318 if (_ptr_credential
) {
8319 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
8321 r
->in
.credential
= NULL
;
8323 if (r
->in
.credential
) {
8324 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8325 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, 0);
8326 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
8327 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, 0);
8329 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_return_authenticator
));
8330 if (_ptr_return_authenticator
) {
8331 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
8333 r
->in
.return_authenticator
= NULL
;
8335 if (r
->in
.return_authenticator
) {
8336 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8337 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, 0);
8338 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
8339 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, 0);
8341 NDR_CHECK(ndr_pull_netr_LogonLevel(ndr
, NDR_SCALARS
, &r
->in
.logon_level
));
8342 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8343 NDR_PULL_ALLOC(ndr
, r
->in
.logon
);
8345 _mem_save_logon_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8346 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logon
, LIBNDR_FLAG_REF_ALLOC
);
8347 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.logon
, r
->in
.logon_level
));
8348 NDR_CHECK(ndr_pull_netr_LogonInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logon
));
8349 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_0
, LIBNDR_FLAG_REF_ALLOC
);
8350 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.validation_level
));
8351 NDR_PULL_ALLOC(ndr
, r
->out
.validation
);
8352 ZERO_STRUCTP(r
->out
.validation
);
8353 NDR_PULL_ALLOC(ndr
, r
->out
.authoritative
);
8354 ZERO_STRUCTP(r
->out
.authoritative
);
8356 if (flags
& NDR_OUT
) {
8357 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_return_authenticator
));
8358 if (_ptr_return_authenticator
) {
8359 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
8361 r
->out
.return_authenticator
= NULL
;
8363 if (r
->out
.return_authenticator
) {
8364 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8365 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, 0);
8366 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
8367 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, 0);
8369 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8370 NDR_PULL_ALLOC(ndr
, r
->out
.validation
);
8372 _mem_save_validation_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8373 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.validation
, LIBNDR_FLAG_REF_ALLOC
);
8374 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.validation
, r
->in
.validation_level
));
8375 NDR_CHECK(ndr_pull_netr_Validation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.validation
));
8376 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_validation_0
, LIBNDR_FLAG_REF_ALLOC
);
8377 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8378 NDR_PULL_ALLOC(ndr
, r
->out
.authoritative
);
8380 _mem_save_authoritative_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8381 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.authoritative
, LIBNDR_FLAG_REF_ALLOC
);
8382 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->out
.authoritative
));
8383 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authoritative_0
, LIBNDR_FLAG_REF_ALLOC
);
8384 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8386 return NDR_ERR_SUCCESS
;
8389 _PUBLIC_
void ndr_print_netr_LogonSamLogon(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonSamLogon
*r
)
8391 ndr_print_struct(ndr
, name
, "netr_LogonSamLogon");
8393 if (flags
& NDR_SET_VALUES
) {
8394 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8396 if (flags
& NDR_IN
) {
8397 ndr_print_struct(ndr
, "in", "netr_LogonSamLogon");
8399 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8401 if (r
->in
.server_name
) {
8402 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8405 ndr_print_ptr(ndr
, "computer_name", r
->in
.computer_name
);
8407 if (r
->in
.computer_name
) {
8408 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
8411 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
8413 if (r
->in
.credential
) {
8414 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
8417 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
8419 if (r
->in
.return_authenticator
) {
8420 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
8423 ndr_print_netr_LogonLevel(ndr
, "logon_level", r
->in
.logon_level
);
8424 ndr_print_ptr(ndr
, "logon", r
->in
.logon
);
8426 ndr_print_set_switch_value(ndr
, r
->in
.logon
, r
->in
.logon_level
);
8427 ndr_print_netr_LogonInfo(ndr
, "logon", r
->in
.logon
);
8429 ndr_print_uint16(ndr
, "validation_level", r
->in
.validation_level
);
8432 if (flags
& NDR_OUT
) {
8433 ndr_print_struct(ndr
, "out", "netr_LogonSamLogon");
8435 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
8437 if (r
->out
.return_authenticator
) {
8438 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
8441 ndr_print_ptr(ndr
, "validation", r
->out
.validation
);
8443 ndr_print_set_switch_value(ndr
, r
->out
.validation
, r
->in
.validation_level
);
8444 ndr_print_netr_Validation(ndr
, "validation", r
->out
.validation
);
8446 ndr_print_ptr(ndr
, "authoritative", r
->out
.authoritative
);
8448 ndr_print_uint8(ndr
, "authoritative", *r
->out
.authoritative
);
8450 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8456 static enum ndr_err_code
ndr_push_netr_LogonSamLogoff(struct ndr_push
*ndr
, int flags
, const struct netr_LogonSamLogoff
*r
)
8458 if (flags
& NDR_IN
) {
8459 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8460 if (r
->in
.server_name
) {
8461 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8462 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8463 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8464 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
));
8466 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.computer_name
));
8467 if (r
->in
.computer_name
) {
8468 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8469 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8470 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8471 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
));
8473 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.credential
));
8474 if (r
->in
.credential
) {
8475 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
8477 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.return_authenticator
));
8478 if (r
->in
.return_authenticator
) {
8479 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
8481 NDR_CHECK(ndr_push_netr_LogonLevel(ndr
, NDR_SCALARS
, r
->in
.logon_level
));
8482 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.logon
, r
->in
.logon_level
));
8483 NDR_CHECK(ndr_push_netr_LogonInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.logon
));
8485 if (flags
& NDR_OUT
) {
8486 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.return_authenticator
));
8487 if (r
->out
.return_authenticator
) {
8488 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
8490 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8492 return NDR_ERR_SUCCESS
;
8495 static enum ndr_err_code
ndr_pull_netr_LogonSamLogoff(struct ndr_pull
*ndr
, int flags
, struct netr_LogonSamLogoff
*r
)
8497 uint32_t _ptr_server_name
;
8498 uint32_t _ptr_computer_name
;
8499 uint32_t _ptr_credential
;
8500 uint32_t _ptr_return_authenticator
;
8501 TALLOC_CTX
*_mem_save_server_name_0
;
8502 TALLOC_CTX
*_mem_save_computer_name_0
;
8503 TALLOC_CTX
*_mem_save_credential_0
;
8504 TALLOC_CTX
*_mem_save_return_authenticator_0
;
8505 if (flags
& NDR_IN
) {
8506 ZERO_STRUCT(r
->out
);
8508 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8509 if (_ptr_server_name
) {
8510 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8512 r
->in
.server_name
= NULL
;
8514 if (r
->in
.server_name
) {
8515 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8516 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8517 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8518 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8519 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8520 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8522 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8523 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8524 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8526 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_name
));
8527 if (_ptr_computer_name
) {
8528 NDR_PULL_ALLOC(ndr
, r
->in
.computer_name
);
8530 r
->in
.computer_name
= NULL
;
8532 if (r
->in
.computer_name
) {
8533 _mem_save_computer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8534 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.computer_name
, 0);
8535 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
8536 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
8537 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
8538 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
8540 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
8541 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
8542 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_name_0
, 0);
8544 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_credential
));
8545 if (_ptr_credential
) {
8546 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
8548 r
->in
.credential
= NULL
;
8550 if (r
->in
.credential
) {
8551 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8552 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, 0);
8553 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
8554 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, 0);
8556 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_return_authenticator
));
8557 if (_ptr_return_authenticator
) {
8558 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
8560 r
->in
.return_authenticator
= NULL
;
8562 if (r
->in
.return_authenticator
) {
8563 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8564 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, 0);
8565 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
8566 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, 0);
8568 NDR_CHECK(ndr_pull_netr_LogonLevel(ndr
, NDR_SCALARS
, &r
->in
.logon_level
));
8569 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.logon
, r
->in
.logon_level
));
8570 NDR_CHECK(ndr_pull_netr_LogonInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.logon
));
8572 if (flags
& NDR_OUT
) {
8573 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_return_authenticator
));
8574 if (_ptr_return_authenticator
) {
8575 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
8577 r
->out
.return_authenticator
= NULL
;
8579 if (r
->out
.return_authenticator
) {
8580 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8581 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, 0);
8582 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
8583 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, 0);
8585 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8587 return NDR_ERR_SUCCESS
;
8590 _PUBLIC_
void ndr_print_netr_LogonSamLogoff(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonSamLogoff
*r
)
8592 ndr_print_struct(ndr
, name
, "netr_LogonSamLogoff");
8594 if (flags
& NDR_SET_VALUES
) {
8595 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8597 if (flags
& NDR_IN
) {
8598 ndr_print_struct(ndr
, "in", "netr_LogonSamLogoff");
8600 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8602 if (r
->in
.server_name
) {
8603 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8606 ndr_print_ptr(ndr
, "computer_name", r
->in
.computer_name
);
8608 if (r
->in
.computer_name
) {
8609 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
8612 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
8614 if (r
->in
.credential
) {
8615 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
8618 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
8620 if (r
->in
.return_authenticator
) {
8621 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
8624 ndr_print_netr_LogonLevel(ndr
, "logon_level", r
->in
.logon_level
);
8625 ndr_print_set_switch_value(ndr
, &r
->in
.logon
, r
->in
.logon_level
);
8626 ndr_print_netr_LogonInfo(ndr
, "logon", &r
->in
.logon
);
8629 if (flags
& NDR_OUT
) {
8630 ndr_print_struct(ndr
, "out", "netr_LogonSamLogoff");
8632 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
8634 if (r
->out
.return_authenticator
) {
8635 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
8638 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8644 static enum ndr_err_code
ndr_push_netr_ServerReqChallenge(struct ndr_push
*ndr
, int flags
, const struct netr_ServerReqChallenge
*r
)
8646 if (flags
& NDR_IN
) {
8647 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8648 if (r
->in
.server_name
) {
8649 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8650 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8651 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8652 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
));
8654 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8655 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8656 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8657 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
));
8658 if (r
->in
.credentials
== NULL
) {
8659 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8661 NDR_CHECK(ndr_push_netr_Credential(ndr
, NDR_SCALARS
, r
->in
.credentials
));
8663 if (flags
& NDR_OUT
) {
8664 if (r
->out
.return_credentials
== NULL
) {
8665 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8667 NDR_CHECK(ndr_push_netr_Credential(ndr
, NDR_SCALARS
, r
->out
.return_credentials
));
8668 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8670 return NDR_ERR_SUCCESS
;
8673 static enum ndr_err_code
ndr_pull_netr_ServerReqChallenge(struct ndr_pull
*ndr
, int flags
, struct netr_ServerReqChallenge
*r
)
8675 uint32_t _ptr_server_name
;
8676 TALLOC_CTX
*_mem_save_server_name_0
;
8677 TALLOC_CTX
*_mem_save_credentials_0
;
8678 TALLOC_CTX
*_mem_save_return_credentials_0
;
8679 if (flags
& NDR_IN
) {
8680 ZERO_STRUCT(r
->out
);
8682 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8683 if (_ptr_server_name
) {
8684 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8686 r
->in
.server_name
= NULL
;
8688 if (r
->in
.server_name
) {
8689 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8690 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8691 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8692 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8693 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8694 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8696 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8697 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8698 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8700 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
8701 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
8702 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
8703 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
8705 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
8706 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
8707 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8708 NDR_PULL_ALLOC(ndr
, r
->in
.credentials
);
8710 _mem_save_credentials_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8711 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credentials
, LIBNDR_FLAG_REF_ALLOC
);
8712 NDR_CHECK(ndr_pull_netr_Credential(ndr
, NDR_SCALARS
, r
->in
.credentials
));
8713 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credentials_0
, LIBNDR_FLAG_REF_ALLOC
);
8714 NDR_PULL_ALLOC(ndr
, r
->out
.return_credentials
);
8715 ZERO_STRUCTP(r
->out
.return_credentials
);
8717 if (flags
& NDR_OUT
) {
8718 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8719 NDR_PULL_ALLOC(ndr
, r
->out
.return_credentials
);
8721 _mem_save_return_credentials_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8722 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_credentials
, LIBNDR_FLAG_REF_ALLOC
);
8723 NDR_CHECK(ndr_pull_netr_Credential(ndr
, NDR_SCALARS
, r
->out
.return_credentials
));
8724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_credentials_0
, LIBNDR_FLAG_REF_ALLOC
);
8725 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8727 return NDR_ERR_SUCCESS
;
8730 _PUBLIC_
void ndr_print_netr_ServerReqChallenge(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_ServerReqChallenge
*r
)
8732 ndr_print_struct(ndr
, name
, "netr_ServerReqChallenge");
8734 if (flags
& NDR_SET_VALUES
) {
8735 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8737 if (flags
& NDR_IN
) {
8738 ndr_print_struct(ndr
, "in", "netr_ServerReqChallenge");
8740 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8742 if (r
->in
.server_name
) {
8743 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8746 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
8747 ndr_print_ptr(ndr
, "credentials", r
->in
.credentials
);
8749 ndr_print_netr_Credential(ndr
, "credentials", r
->in
.credentials
);
8753 if (flags
& NDR_OUT
) {
8754 ndr_print_struct(ndr
, "out", "netr_ServerReqChallenge");
8756 ndr_print_ptr(ndr
, "return_credentials", r
->out
.return_credentials
);
8758 ndr_print_netr_Credential(ndr
, "return_credentials", r
->out
.return_credentials
);
8760 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8766 static enum ndr_err_code
ndr_push_netr_ServerAuthenticate(struct ndr_push
*ndr
, int flags
, const struct netr_ServerAuthenticate
*r
)
8768 if (flags
& NDR_IN
) {
8769 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8770 if (r
->in
.server_name
) {
8771 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8772 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8773 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8774 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
));
8776 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
8777 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8778 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
8779 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
));
8780 NDR_CHECK(ndr_push_netr_SchannelType(ndr
, NDR_SCALARS
, r
->in
.secure_channel_type
));
8781 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8782 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8783 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8784 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
));
8785 if (r
->in
.credentials
== NULL
) {
8786 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8788 NDR_CHECK(ndr_push_netr_Credential(ndr
, NDR_SCALARS
, r
->in
.credentials
));
8790 if (flags
& NDR_OUT
) {
8791 if (r
->out
.return_credentials
== NULL
) {
8792 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8794 NDR_CHECK(ndr_push_netr_Credential(ndr
, NDR_SCALARS
, r
->out
.return_credentials
));
8795 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8797 return NDR_ERR_SUCCESS
;
8800 static enum ndr_err_code
ndr_pull_netr_ServerAuthenticate(struct ndr_pull
*ndr
, int flags
, struct netr_ServerAuthenticate
*r
)
8802 uint32_t _ptr_server_name
;
8803 TALLOC_CTX
*_mem_save_server_name_0
;
8804 TALLOC_CTX
*_mem_save_credentials_0
;
8805 TALLOC_CTX
*_mem_save_return_credentials_0
;
8806 if (flags
& NDR_IN
) {
8807 ZERO_STRUCT(r
->out
);
8809 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8810 if (_ptr_server_name
) {
8811 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8813 r
->in
.server_name
= NULL
;
8815 if (r
->in
.server_name
) {
8816 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8817 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8818 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8819 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8820 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8821 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8823 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8824 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8825 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8827 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
8828 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
8829 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
8830 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
8832 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
8833 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
8834 NDR_CHECK(ndr_pull_netr_SchannelType(ndr
, NDR_SCALARS
, &r
->in
.secure_channel_type
));
8835 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
8836 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
8837 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
8838 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
8840 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
8841 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
8842 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8843 NDR_PULL_ALLOC(ndr
, r
->in
.credentials
);
8845 _mem_save_credentials_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8846 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credentials
, LIBNDR_FLAG_REF_ALLOC
);
8847 NDR_CHECK(ndr_pull_netr_Credential(ndr
, NDR_SCALARS
, r
->in
.credentials
));
8848 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credentials_0
, LIBNDR_FLAG_REF_ALLOC
);
8849 NDR_PULL_ALLOC(ndr
, r
->out
.return_credentials
);
8850 ZERO_STRUCTP(r
->out
.return_credentials
);
8852 if (flags
& NDR_OUT
) {
8853 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8854 NDR_PULL_ALLOC(ndr
, r
->out
.return_credentials
);
8856 _mem_save_return_credentials_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8857 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_credentials
, LIBNDR_FLAG_REF_ALLOC
);
8858 NDR_CHECK(ndr_pull_netr_Credential(ndr
, NDR_SCALARS
, r
->out
.return_credentials
));
8859 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_credentials_0
, LIBNDR_FLAG_REF_ALLOC
);
8860 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8862 return NDR_ERR_SUCCESS
;
8865 _PUBLIC_
void ndr_print_netr_ServerAuthenticate(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_ServerAuthenticate
*r
)
8867 ndr_print_struct(ndr
, name
, "netr_ServerAuthenticate");
8869 if (flags
& NDR_SET_VALUES
) {
8870 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8872 if (flags
& NDR_IN
) {
8873 ndr_print_struct(ndr
, "in", "netr_ServerAuthenticate");
8875 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8877 if (r
->in
.server_name
) {
8878 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8881 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
8882 ndr_print_netr_SchannelType(ndr
, "secure_channel_type", r
->in
.secure_channel_type
);
8883 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
8884 ndr_print_ptr(ndr
, "credentials", r
->in
.credentials
);
8886 ndr_print_netr_Credential(ndr
, "credentials", r
->in
.credentials
);
8890 if (flags
& NDR_OUT
) {
8891 ndr_print_struct(ndr
, "out", "netr_ServerAuthenticate");
8893 ndr_print_ptr(ndr
, "return_credentials", r
->out
.return_credentials
);
8895 ndr_print_netr_Credential(ndr
, "return_credentials", r
->out
.return_credentials
);
8897 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8903 static enum ndr_err_code
ndr_push_netr_ServerPasswordSet(struct ndr_push
*ndr
, int flags
, const struct netr_ServerPasswordSet
*r
)
8905 if (flags
& NDR_IN
) {
8906 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8907 if (r
->in
.server_name
) {
8908 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8909 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8910 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8911 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
));
8913 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
8914 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8915 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
8916 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
));
8917 NDR_CHECK(ndr_push_netr_SchannelType(ndr
, NDR_SCALARS
, r
->in
.secure_channel_type
));
8918 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8919 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8920 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
8921 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
));
8922 if (r
->in
.credential
== NULL
) {
8923 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8925 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
8926 if (r
->in
.new_password
== NULL
) {
8927 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8929 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_password
));
8931 if (flags
& NDR_OUT
) {
8932 if (r
->out
.return_authenticator
== NULL
) {
8933 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8935 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
8936 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8938 return NDR_ERR_SUCCESS
;
8941 static enum ndr_err_code
ndr_pull_netr_ServerPasswordSet(struct ndr_pull
*ndr
, int flags
, struct netr_ServerPasswordSet
*r
)
8943 uint32_t _ptr_server_name
;
8944 TALLOC_CTX
*_mem_save_server_name_0
;
8945 TALLOC_CTX
*_mem_save_credential_0
;
8946 TALLOC_CTX
*_mem_save_return_authenticator_0
;
8947 TALLOC_CTX
*_mem_save_new_password_0
;
8948 if (flags
& NDR_IN
) {
8949 ZERO_STRUCT(r
->out
);
8951 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8952 if (_ptr_server_name
) {
8953 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8955 r
->in
.server_name
= NULL
;
8957 if (r
->in
.server_name
) {
8958 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8959 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8960 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8961 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8962 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8963 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8965 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8966 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8967 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8969 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
8970 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
8971 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
8972 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
8974 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
8975 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
8976 NDR_CHECK(ndr_pull_netr_SchannelType(ndr
, NDR_SCALARS
, &r
->in
.secure_channel_type
));
8977 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
8978 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
8979 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
8980 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
8982 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
8983 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
8984 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8985 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
8987 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8988 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, LIBNDR_FLAG_REF_ALLOC
);
8989 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
8990 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, LIBNDR_FLAG_REF_ALLOC
);
8991 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8992 NDR_PULL_ALLOC(ndr
, r
->in
.new_password
);
8994 _mem_save_new_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8995 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_password
, LIBNDR_FLAG_REF_ALLOC
);
8996 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_password
));
8997 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_password_0
, LIBNDR_FLAG_REF_ALLOC
);
8998 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
8999 ZERO_STRUCTP(r
->out
.return_authenticator
);
9001 if (flags
& NDR_OUT
) {
9002 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9003 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
9005 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9006 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
9007 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
9008 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
9009 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9011 return NDR_ERR_SUCCESS
;
9014 _PUBLIC_
void ndr_print_netr_ServerPasswordSet(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_ServerPasswordSet
*r
)
9016 ndr_print_struct(ndr
, name
, "netr_ServerPasswordSet");
9018 if (flags
& NDR_SET_VALUES
) {
9019 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9021 if (flags
& NDR_IN
) {
9022 ndr_print_struct(ndr
, "in", "netr_ServerPasswordSet");
9024 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
9026 if (r
->in
.server_name
) {
9027 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
9030 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
9031 ndr_print_netr_SchannelType(ndr
, "secure_channel_type", r
->in
.secure_channel_type
);
9032 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
9033 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
9035 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
9037 ndr_print_ptr(ndr
, "new_password", r
->in
.new_password
);
9039 ndr_print_samr_Password(ndr
, "new_password", r
->in
.new_password
);
9043 if (flags
& NDR_OUT
) {
9044 ndr_print_struct(ndr
, "out", "netr_ServerPasswordSet");
9046 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9048 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9050 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9056 static enum ndr_err_code
ndr_push_netr_DatabaseDeltas(struct ndr_push
*ndr
, int flags
, const struct netr_DatabaseDeltas
*r
)
9058 if (flags
& NDR_IN
) {
9059 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9060 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9061 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9062 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
));
9063 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
9064 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9065 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
9066 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.computername
, ndr_charset_length(r
->in
.computername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9067 if (r
->in
.credential
== NULL
) {
9068 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9070 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
9071 if (r
->in
.return_authenticator
== NULL
) {
9072 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9074 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
9075 NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr
, NDR_SCALARS
, r
->in
.database_id
));
9076 if (r
->in
.sequence_num
== NULL
) {
9077 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9079 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, *r
->in
.sequence_num
));
9080 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.preferredmaximumlength
));
9082 if (flags
& NDR_OUT
) {
9083 if (r
->out
.return_authenticator
== NULL
) {
9084 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9086 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
9087 if (r
->out
.sequence_num
== NULL
) {
9088 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9090 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, *r
->out
.sequence_num
));
9091 if (r
->out
.delta_enum_array
== NULL
) {
9092 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9094 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.delta_enum_array
));
9095 if (*r
->out
.delta_enum_array
) {
9096 NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.delta_enum_array
));
9098 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9100 return NDR_ERR_SUCCESS
;
9103 static enum ndr_err_code
ndr_pull_netr_DatabaseDeltas(struct ndr_pull
*ndr
, int flags
, struct netr_DatabaseDeltas
*r
)
9105 uint32_t _ptr_delta_enum_array
;
9106 TALLOC_CTX
*_mem_save_credential_0
;
9107 TALLOC_CTX
*_mem_save_return_authenticator_0
;
9108 TALLOC_CTX
*_mem_save_sequence_num_0
;
9109 TALLOC_CTX
*_mem_save_delta_enum_array_0
;
9110 TALLOC_CTX
*_mem_save_delta_enum_array_1
;
9111 if (flags
& NDR_IN
) {
9112 ZERO_STRUCT(r
->out
);
9114 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
9115 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
9116 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
9117 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
9119 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
9120 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
9121 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computername
));
9122 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computername
));
9123 if (ndr_get_array_length(ndr
, &r
->in
.computername
) > ndr_get_array_size(ndr
, &r
->in
.computername
)) {
9124 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computername
), ndr_get_array_length(ndr
, &r
->in
.computername
));
9126 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t)));
9127 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computername
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t), CH_UTF16
));
9128 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9129 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
9131 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9132 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, LIBNDR_FLAG_REF_ALLOC
);
9133 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
9134 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, LIBNDR_FLAG_REF_ALLOC
);
9135 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9136 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
9138 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9139 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
9140 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
9141 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
9142 NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr
, NDR_SCALARS
, &r
->in
.database_id
));
9143 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9144 NDR_PULL_ALLOC(ndr
, r
->in
.sequence_num
);
9146 _mem_save_sequence_num_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9147 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sequence_num
, LIBNDR_FLAG_REF_ALLOC
);
9148 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, r
->in
.sequence_num
));
9149 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sequence_num_0
, LIBNDR_FLAG_REF_ALLOC
);
9150 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.preferredmaximumlength
));
9151 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
9152 *r
->out
.return_authenticator
= *r
->in
.return_authenticator
;
9153 NDR_PULL_ALLOC(ndr
, r
->out
.sequence_num
);
9154 *r
->out
.sequence_num
= *r
->in
.sequence_num
;
9155 NDR_PULL_ALLOC(ndr
, r
->out
.delta_enum_array
);
9156 ZERO_STRUCTP(r
->out
.delta_enum_array
);
9158 if (flags
& NDR_OUT
) {
9159 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9160 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
9162 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9163 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
9164 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
9165 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
9166 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9167 NDR_PULL_ALLOC(ndr
, r
->out
.sequence_num
);
9169 _mem_save_sequence_num_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9170 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sequence_num
, LIBNDR_FLAG_REF_ALLOC
);
9171 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, r
->out
.sequence_num
));
9172 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sequence_num_0
, LIBNDR_FLAG_REF_ALLOC
);
9173 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9174 NDR_PULL_ALLOC(ndr
, r
->out
.delta_enum_array
);
9176 _mem_save_delta_enum_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9177 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.delta_enum_array
, LIBNDR_FLAG_REF_ALLOC
);
9178 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_delta_enum_array
));
9179 if (_ptr_delta_enum_array
) {
9180 NDR_PULL_ALLOC(ndr
, *r
->out
.delta_enum_array
);
9182 *r
->out
.delta_enum_array
= NULL
;
9184 if (*r
->out
.delta_enum_array
) {
9185 _mem_save_delta_enum_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9186 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.delta_enum_array
, 0);
9187 NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.delta_enum_array
));
9188 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delta_enum_array_1
, 0);
9190 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delta_enum_array_0
, LIBNDR_FLAG_REF_ALLOC
);
9191 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9193 return NDR_ERR_SUCCESS
;
9196 _PUBLIC_
void ndr_print_netr_DatabaseDeltas(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DatabaseDeltas
*r
)
9198 ndr_print_struct(ndr
, name
, "netr_DatabaseDeltas");
9200 if (flags
& NDR_SET_VALUES
) {
9201 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9203 if (flags
& NDR_IN
) {
9204 ndr_print_struct(ndr
, "in", "netr_DatabaseDeltas");
9206 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
9207 ndr_print_string(ndr
, "computername", r
->in
.computername
);
9208 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
9210 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
9212 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
9214 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
9216 ndr_print_netr_SamDatabaseID(ndr
, "database_id", r
->in
.database_id
);
9217 ndr_print_ptr(ndr
, "sequence_num", r
->in
.sequence_num
);
9219 ndr_print_udlong(ndr
, "sequence_num", *r
->in
.sequence_num
);
9221 ndr_print_uint32(ndr
, "preferredmaximumlength", r
->in
.preferredmaximumlength
);
9224 if (flags
& NDR_OUT
) {
9225 ndr_print_struct(ndr
, "out", "netr_DatabaseDeltas");
9227 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9229 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9231 ndr_print_ptr(ndr
, "sequence_num", r
->out
.sequence_num
);
9233 ndr_print_udlong(ndr
, "sequence_num", *r
->out
.sequence_num
);
9235 ndr_print_ptr(ndr
, "delta_enum_array", r
->out
.delta_enum_array
);
9237 ndr_print_ptr(ndr
, "delta_enum_array", *r
->out
.delta_enum_array
);
9239 if (*r
->out
.delta_enum_array
) {
9240 ndr_print_netr_DELTA_ENUM_ARRAY(ndr
, "delta_enum_array", *r
->out
.delta_enum_array
);
9244 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9250 static enum ndr_err_code
ndr_push_netr_DatabaseSync(struct ndr_push
*ndr
, int flags
, const struct netr_DatabaseSync
*r
)
9252 if (flags
& NDR_IN
) {
9253 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9254 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9255 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9256 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
));
9257 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
9258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9259 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
9260 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.computername
, ndr_charset_length(r
->in
.computername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9261 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, &r
->in
.credential
));
9262 if (r
->in
.return_authenticator
== NULL
) {
9263 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9265 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
9266 NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr
, NDR_SCALARS
, r
->in
.database_id
));
9267 if (r
->in
.sync_context
== NULL
) {
9268 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9270 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.sync_context
));
9271 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.preferredmaximumlength
));
9273 if (flags
& NDR_OUT
) {
9274 if (r
->out
.return_authenticator
== NULL
) {
9275 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9277 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
9278 if (r
->out
.sync_context
== NULL
) {
9279 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.sync_context
));
9282 if (r
->out
.delta_enum_array
== NULL
) {
9283 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9285 NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.delta_enum_array
));
9286 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9288 return NDR_ERR_SUCCESS
;
9291 static enum ndr_err_code
ndr_pull_netr_DatabaseSync(struct ndr_pull
*ndr
, int flags
, struct netr_DatabaseSync
*r
)
9293 TALLOC_CTX
*_mem_save_return_authenticator_0
;
9294 TALLOC_CTX
*_mem_save_sync_context_0
;
9295 TALLOC_CTX
*_mem_save_delta_enum_array_0
;
9296 if (flags
& NDR_IN
) {
9297 ZERO_STRUCT(r
->out
);
9299 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
9300 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
9301 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
9302 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
9304 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
9305 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
9306 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computername
));
9307 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computername
));
9308 if (ndr_get_array_length(ndr
, &r
->in
.computername
) > ndr_get_array_size(ndr
, &r
->in
.computername
)) {
9309 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computername
), ndr_get_array_length(ndr
, &r
->in
.computername
));
9311 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t)));
9312 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computername
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t), CH_UTF16
));
9313 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, &r
->in
.credential
));
9314 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9315 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
9317 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9318 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
9319 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
9320 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
9321 NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr
, NDR_SCALARS
, &r
->in
.database_id
));
9322 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9323 NDR_PULL_ALLOC(ndr
, r
->in
.sync_context
);
9325 _mem_save_sync_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9326 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sync_context
, LIBNDR_FLAG_REF_ALLOC
);
9327 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.sync_context
));
9328 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sync_context_0
, LIBNDR_FLAG_REF_ALLOC
);
9329 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.preferredmaximumlength
));
9330 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
9331 *r
->out
.return_authenticator
= *r
->in
.return_authenticator
;
9332 NDR_PULL_ALLOC(ndr
, r
->out
.sync_context
);
9333 *r
->out
.sync_context
= *r
->in
.sync_context
;
9334 NDR_PULL_ALLOC(ndr
, r
->out
.delta_enum_array
);
9335 ZERO_STRUCTP(r
->out
.delta_enum_array
);
9337 if (flags
& NDR_OUT
) {
9338 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9339 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
9341 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9342 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
9343 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
9344 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
9345 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9346 NDR_PULL_ALLOC(ndr
, r
->out
.sync_context
);
9348 _mem_save_sync_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9349 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sync_context
, LIBNDR_FLAG_REF_ALLOC
);
9350 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.sync_context
));
9351 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sync_context_0
, LIBNDR_FLAG_REF_ALLOC
);
9352 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9353 NDR_PULL_ALLOC(ndr
, r
->out
.delta_enum_array
);
9355 _mem_save_delta_enum_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9356 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.delta_enum_array
, LIBNDR_FLAG_REF_ALLOC
);
9357 NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.delta_enum_array
));
9358 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delta_enum_array_0
, LIBNDR_FLAG_REF_ALLOC
);
9359 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9361 return NDR_ERR_SUCCESS
;
9364 _PUBLIC_
void ndr_print_netr_DatabaseSync(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DatabaseSync
*r
)
9366 ndr_print_struct(ndr
, name
, "netr_DatabaseSync");
9368 if (flags
& NDR_SET_VALUES
) {
9369 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9371 if (flags
& NDR_IN
) {
9372 ndr_print_struct(ndr
, "in", "netr_DatabaseSync");
9374 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
9375 ndr_print_string(ndr
, "computername", r
->in
.computername
);
9376 ndr_print_netr_Authenticator(ndr
, "credential", &r
->in
.credential
);
9377 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
9379 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
9381 ndr_print_netr_SamDatabaseID(ndr
, "database_id", r
->in
.database_id
);
9382 ndr_print_ptr(ndr
, "sync_context", r
->in
.sync_context
);
9384 ndr_print_uint32(ndr
, "sync_context", *r
->in
.sync_context
);
9386 ndr_print_uint32(ndr
, "preferredmaximumlength", r
->in
.preferredmaximumlength
);
9389 if (flags
& NDR_OUT
) {
9390 ndr_print_struct(ndr
, "out", "netr_DatabaseSync");
9392 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9394 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9396 ndr_print_ptr(ndr
, "sync_context", r
->out
.sync_context
);
9398 ndr_print_uint32(ndr
, "sync_context", *r
->out
.sync_context
);
9400 ndr_print_ptr(ndr
, "delta_enum_array", r
->out
.delta_enum_array
);
9402 ndr_print_netr_DELTA_ENUM_ARRAY(ndr
, "delta_enum_array", r
->out
.delta_enum_array
);
9404 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9410 static enum ndr_err_code
ndr_push_netr_AccountDeltas(struct ndr_push
*ndr
, int flags
, const struct netr_AccountDeltas
*r
)
9412 if (flags
& NDR_IN
) {
9413 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.logon_server
));
9414 if (r
->in
.logon_server
) {
9415 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9416 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9417 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9418 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
));
9420 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
9421 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9422 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
9423 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.computername
, ndr_charset_length(r
->in
.computername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9424 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, &r
->in
.credential
));
9425 if (r
->in
.return_authenticator
== NULL
) {
9426 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9428 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
9429 NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr
, NDR_SCALARS
, &r
->in
.uas
));
9430 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
9431 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
9432 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buffersize
));
9434 if (flags
& NDR_OUT
) {
9435 if (r
->out
.return_authenticator
== NULL
) {
9436 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9438 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
9439 if (r
->out
.buffer
== NULL
) {
9440 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9443 struct ndr_push
*_ndr_buffer
;
9444 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_buffer
, 4, -1));
9445 NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer
, NDR_SCALARS
, r
->out
.buffer
));
9446 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_buffer
, 4, -1));
9448 if (r
->out
.count_returned
== NULL
) {
9449 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9451 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count_returned
));
9452 if (r
->out
.total_entries
== NULL
) {
9453 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9455 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total_entries
));
9456 if (r
->out
.recordid
== NULL
) {
9457 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9459 NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr
, NDR_SCALARS
, r
->out
.recordid
));
9460 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9462 return NDR_ERR_SUCCESS
;
9465 static enum ndr_err_code
ndr_pull_netr_AccountDeltas(struct ndr_pull
*ndr
, int flags
, struct netr_AccountDeltas
*r
)
9467 uint32_t _ptr_logon_server
;
9468 TALLOC_CTX
*_mem_save_logon_server_0
;
9469 TALLOC_CTX
*_mem_save_return_authenticator_0
;
9470 TALLOC_CTX
*_mem_save_buffer_0
;
9471 TALLOC_CTX
*_mem_save_count_returned_0
;
9472 TALLOC_CTX
*_mem_save_total_entries_0
;
9473 TALLOC_CTX
*_mem_save_recordid_0
;
9474 if (flags
& NDR_IN
) {
9475 ZERO_STRUCT(r
->out
);
9477 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_server
));
9478 if (_ptr_logon_server
) {
9479 NDR_PULL_ALLOC(ndr
, r
->in
.logon_server
);
9481 r
->in
.logon_server
= NULL
;
9483 if (r
->in
.logon_server
) {
9484 _mem_save_logon_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9485 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logon_server
, 0);
9486 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
9487 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
9488 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
9489 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
9491 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
9492 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
9493 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_server_0
, 0);
9495 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computername
));
9496 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computername
));
9497 if (ndr_get_array_length(ndr
, &r
->in
.computername
) > ndr_get_array_size(ndr
, &r
->in
.computername
)) {
9498 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computername
), ndr_get_array_length(ndr
, &r
->in
.computername
));
9500 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t)));
9501 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computername
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t), CH_UTF16
));
9502 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, &r
->in
.credential
));
9503 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9504 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
9506 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9507 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
9508 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
9509 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
9510 NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr
, NDR_SCALARS
, &r
->in
.uas
));
9511 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
9512 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
9513 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buffersize
));
9514 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
9515 *r
->out
.return_authenticator
= *r
->in
.return_authenticator
;
9516 NDR_PULL_ALLOC(ndr
, r
->out
.buffer
);
9517 ZERO_STRUCTP(r
->out
.buffer
);
9518 NDR_PULL_ALLOC(ndr
, r
->out
.count_returned
);
9519 ZERO_STRUCTP(r
->out
.count_returned
);
9520 NDR_PULL_ALLOC(ndr
, r
->out
.total_entries
);
9521 ZERO_STRUCTP(r
->out
.total_entries
);
9522 NDR_PULL_ALLOC(ndr
, r
->out
.recordid
);
9523 ZERO_STRUCTP(r
->out
.recordid
);
9525 if (flags
& NDR_OUT
) {
9526 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9527 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
9529 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9530 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
9531 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
9532 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
9533 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9534 NDR_PULL_ALLOC(ndr
, r
->out
.buffer
);
9536 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9537 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.buffer
, LIBNDR_FLAG_REF_ALLOC
);
9539 struct ndr_pull
*_ndr_buffer
;
9540 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_buffer
, 4, -1));
9541 NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer
, NDR_SCALARS
, r
->out
.buffer
));
9542 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_buffer
, 4, -1));
9544 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, LIBNDR_FLAG_REF_ALLOC
);
9545 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9546 NDR_PULL_ALLOC(ndr
, r
->out
.count_returned
);
9548 _mem_save_count_returned_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9549 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count_returned
, LIBNDR_FLAG_REF_ALLOC
);
9550 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count_returned
));
9551 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_returned_0
, LIBNDR_FLAG_REF_ALLOC
);
9552 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9553 NDR_PULL_ALLOC(ndr
, r
->out
.total_entries
);
9555 _mem_save_total_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9556 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total_entries
, LIBNDR_FLAG_REF_ALLOC
);
9557 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total_entries
));
9558 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
9559 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9560 NDR_PULL_ALLOC(ndr
, r
->out
.recordid
);
9562 _mem_save_recordid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9563 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.recordid
, LIBNDR_FLAG_REF_ALLOC
);
9564 NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr
, NDR_SCALARS
, r
->out
.recordid
));
9565 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_recordid_0
, LIBNDR_FLAG_REF_ALLOC
);
9566 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9568 return NDR_ERR_SUCCESS
;
9571 _PUBLIC_
void ndr_print_netr_AccountDeltas(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_AccountDeltas
*r
)
9573 ndr_print_struct(ndr
, name
, "netr_AccountDeltas");
9575 if (flags
& NDR_SET_VALUES
) {
9576 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9578 if (flags
& NDR_IN
) {
9579 ndr_print_struct(ndr
, "in", "netr_AccountDeltas");
9581 ndr_print_ptr(ndr
, "logon_server", r
->in
.logon_server
);
9583 if (r
->in
.logon_server
) {
9584 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
9587 ndr_print_string(ndr
, "computername", r
->in
.computername
);
9588 ndr_print_netr_Authenticator(ndr
, "credential", &r
->in
.credential
);
9589 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
9591 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
9593 ndr_print_netr_UAS_INFO_0(ndr
, "uas", &r
->in
.uas
);
9594 ndr_print_uint32(ndr
, "count", r
->in
.count
);
9595 ndr_print_uint32(ndr
, "level", r
->in
.level
);
9596 ndr_print_uint32(ndr
, "buffersize", r
->in
.buffersize
);
9599 if (flags
& NDR_OUT
) {
9600 ndr_print_struct(ndr
, "out", "netr_AccountDeltas");
9602 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9604 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9606 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
9608 ndr_print_netr_AccountBuffer(ndr
, "buffer", r
->out
.buffer
);
9610 ndr_print_ptr(ndr
, "count_returned", r
->out
.count_returned
);
9612 ndr_print_uint32(ndr
, "count_returned", *r
->out
.count_returned
);
9614 ndr_print_ptr(ndr
, "total_entries", r
->out
.total_entries
);
9616 ndr_print_uint32(ndr
, "total_entries", *r
->out
.total_entries
);
9618 ndr_print_ptr(ndr
, "recordid", r
->out
.recordid
);
9620 ndr_print_netr_UAS_INFO_0(ndr
, "recordid", r
->out
.recordid
);
9622 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9628 static enum ndr_err_code
ndr_push_netr_AccountSync(struct ndr_push
*ndr
, int flags
, const struct netr_AccountSync
*r
)
9630 if (flags
& NDR_IN
) {
9631 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.logon_server
));
9632 if (r
->in
.logon_server
) {
9633 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9634 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9635 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9636 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
));
9638 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
9639 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9640 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
9641 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.computername
, ndr_charset_length(r
->in
.computername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9642 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, &r
->in
.credential
));
9643 if (r
->in
.return_authenticator
== NULL
) {
9644 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9646 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
9647 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.reference
));
9648 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
9649 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buffersize
));
9650 if (r
->in
.recordid
== NULL
) {
9651 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9653 NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr
, NDR_SCALARS
, r
->in
.recordid
));
9655 if (flags
& NDR_OUT
) {
9656 if (r
->out
.return_authenticator
== NULL
) {
9657 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9659 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
9660 if (r
->out
.buffer
== NULL
) {
9661 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9664 struct ndr_push
*_ndr_buffer
;
9665 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_buffer
, 4, -1));
9666 NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer
, NDR_SCALARS
, r
->out
.buffer
));
9667 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_buffer
, 4, -1));
9669 if (r
->out
.count_returned
== NULL
) {
9670 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9672 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count_returned
));
9673 if (r
->out
.total_entries
== NULL
) {
9674 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9676 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total_entries
));
9677 if (r
->out
.next_reference
== NULL
) {
9678 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9680 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.next_reference
));
9681 if (r
->out
.recordid
== NULL
) {
9682 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9684 NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr
, NDR_SCALARS
, r
->out
.recordid
));
9685 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9687 return NDR_ERR_SUCCESS
;
9690 static enum ndr_err_code
ndr_pull_netr_AccountSync(struct ndr_pull
*ndr
, int flags
, struct netr_AccountSync
*r
)
9692 uint32_t _ptr_logon_server
;
9693 TALLOC_CTX
*_mem_save_logon_server_0
;
9694 TALLOC_CTX
*_mem_save_return_authenticator_0
;
9695 TALLOC_CTX
*_mem_save_buffer_0
;
9696 TALLOC_CTX
*_mem_save_count_returned_0
;
9697 TALLOC_CTX
*_mem_save_total_entries_0
;
9698 TALLOC_CTX
*_mem_save_next_reference_0
;
9699 TALLOC_CTX
*_mem_save_recordid_0
;
9700 if (flags
& NDR_IN
) {
9701 ZERO_STRUCT(r
->out
);
9703 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_server
));
9704 if (_ptr_logon_server
) {
9705 NDR_PULL_ALLOC(ndr
, r
->in
.logon_server
);
9707 r
->in
.logon_server
= NULL
;
9709 if (r
->in
.logon_server
) {
9710 _mem_save_logon_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9711 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logon_server
, 0);
9712 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
9713 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
9714 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
9715 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
9717 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
9718 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
9719 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_server_0
, 0);
9721 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computername
));
9722 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computername
));
9723 if (ndr_get_array_length(ndr
, &r
->in
.computername
) > ndr_get_array_size(ndr
, &r
->in
.computername
)) {
9724 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computername
), ndr_get_array_length(ndr
, &r
->in
.computername
));
9726 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t)));
9727 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computername
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t), CH_UTF16
));
9728 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, &r
->in
.credential
));
9729 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9730 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
9732 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9733 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
9734 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
9735 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
9736 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.reference
));
9737 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
9738 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buffersize
));
9739 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9740 NDR_PULL_ALLOC(ndr
, r
->in
.recordid
);
9742 _mem_save_recordid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9743 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.recordid
, LIBNDR_FLAG_REF_ALLOC
);
9744 NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr
, NDR_SCALARS
, r
->in
.recordid
));
9745 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_recordid_0
, LIBNDR_FLAG_REF_ALLOC
);
9746 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
9747 *r
->out
.return_authenticator
= *r
->in
.return_authenticator
;
9748 NDR_PULL_ALLOC(ndr
, r
->out
.buffer
);
9749 ZERO_STRUCTP(r
->out
.buffer
);
9750 NDR_PULL_ALLOC(ndr
, r
->out
.count_returned
);
9751 ZERO_STRUCTP(r
->out
.count_returned
);
9752 NDR_PULL_ALLOC(ndr
, r
->out
.total_entries
);
9753 ZERO_STRUCTP(r
->out
.total_entries
);
9754 NDR_PULL_ALLOC(ndr
, r
->out
.next_reference
);
9755 ZERO_STRUCTP(r
->out
.next_reference
);
9756 NDR_PULL_ALLOC(ndr
, r
->out
.recordid
);
9757 *r
->out
.recordid
= *r
->in
.recordid
;
9759 if (flags
& NDR_OUT
) {
9760 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9761 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
9763 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9764 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
9765 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
9766 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
9767 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9768 NDR_PULL_ALLOC(ndr
, r
->out
.buffer
);
9770 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9771 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.buffer
, LIBNDR_FLAG_REF_ALLOC
);
9773 struct ndr_pull
*_ndr_buffer
;
9774 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_buffer
, 4, -1));
9775 NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer
, NDR_SCALARS
, r
->out
.buffer
));
9776 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_buffer
, 4, -1));
9778 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, LIBNDR_FLAG_REF_ALLOC
);
9779 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9780 NDR_PULL_ALLOC(ndr
, r
->out
.count_returned
);
9782 _mem_save_count_returned_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9783 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count_returned
, LIBNDR_FLAG_REF_ALLOC
);
9784 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count_returned
));
9785 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_returned_0
, LIBNDR_FLAG_REF_ALLOC
);
9786 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9787 NDR_PULL_ALLOC(ndr
, r
->out
.total_entries
);
9789 _mem_save_total_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9790 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total_entries
, LIBNDR_FLAG_REF_ALLOC
);
9791 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total_entries
));
9792 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
9793 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9794 NDR_PULL_ALLOC(ndr
, r
->out
.next_reference
);
9796 _mem_save_next_reference_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9797 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.next_reference
, LIBNDR_FLAG_REF_ALLOC
);
9798 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.next_reference
));
9799 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_next_reference_0
, LIBNDR_FLAG_REF_ALLOC
);
9800 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9801 NDR_PULL_ALLOC(ndr
, r
->out
.recordid
);
9803 _mem_save_recordid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9804 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.recordid
, LIBNDR_FLAG_REF_ALLOC
);
9805 NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr
, NDR_SCALARS
, r
->out
.recordid
));
9806 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_recordid_0
, LIBNDR_FLAG_REF_ALLOC
);
9807 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9809 return NDR_ERR_SUCCESS
;
9812 _PUBLIC_
void ndr_print_netr_AccountSync(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_AccountSync
*r
)
9814 ndr_print_struct(ndr
, name
, "netr_AccountSync");
9816 if (flags
& NDR_SET_VALUES
) {
9817 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9819 if (flags
& NDR_IN
) {
9820 ndr_print_struct(ndr
, "in", "netr_AccountSync");
9822 ndr_print_ptr(ndr
, "logon_server", r
->in
.logon_server
);
9824 if (r
->in
.logon_server
) {
9825 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
9828 ndr_print_string(ndr
, "computername", r
->in
.computername
);
9829 ndr_print_netr_Authenticator(ndr
, "credential", &r
->in
.credential
);
9830 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
9832 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
9834 ndr_print_uint32(ndr
, "reference", r
->in
.reference
);
9835 ndr_print_uint32(ndr
, "level", r
->in
.level
);
9836 ndr_print_uint32(ndr
, "buffersize", r
->in
.buffersize
);
9837 ndr_print_ptr(ndr
, "recordid", r
->in
.recordid
);
9839 ndr_print_netr_UAS_INFO_0(ndr
, "recordid", r
->in
.recordid
);
9843 if (flags
& NDR_OUT
) {
9844 ndr_print_struct(ndr
, "out", "netr_AccountSync");
9846 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9848 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
9850 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
9852 ndr_print_netr_AccountBuffer(ndr
, "buffer", r
->out
.buffer
);
9854 ndr_print_ptr(ndr
, "count_returned", r
->out
.count_returned
);
9856 ndr_print_uint32(ndr
, "count_returned", *r
->out
.count_returned
);
9858 ndr_print_ptr(ndr
, "total_entries", r
->out
.total_entries
);
9860 ndr_print_uint32(ndr
, "total_entries", *r
->out
.total_entries
);
9862 ndr_print_ptr(ndr
, "next_reference", r
->out
.next_reference
);
9864 ndr_print_uint32(ndr
, "next_reference", *r
->out
.next_reference
);
9866 ndr_print_ptr(ndr
, "recordid", r
->out
.recordid
);
9868 ndr_print_netr_UAS_INFO_0(ndr
, "recordid", r
->out
.recordid
);
9870 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9876 static enum ndr_err_code
ndr_push_netr_GetDcName(struct ndr_push
*ndr
, int flags
, const struct netr_GetDcName
*r
)
9878 if (flags
& NDR_IN
) {
9879 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9880 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9881 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
9882 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
));
9883 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domainname
));
9884 if (r
->in
.domainname
) {
9885 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domainname
, CH_UTF16
)));
9886 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9887 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domainname
, CH_UTF16
)));
9888 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.domainname
, ndr_charset_length(r
->in
.domainname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9891 if (flags
& NDR_OUT
) {
9892 if (r
->out
.dcname
== NULL
) {
9893 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9895 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.dcname
));
9896 if (*r
->out
.dcname
) {
9897 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.dcname
, CH_UTF16
)));
9898 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9899 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.dcname
, CH_UTF16
)));
9900 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, *r
->out
.dcname
, ndr_charset_length(*r
->out
.dcname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9902 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
9904 return NDR_ERR_SUCCESS
;
9907 static enum ndr_err_code
ndr_pull_netr_GetDcName(struct ndr_pull
*ndr
, int flags
, struct netr_GetDcName
*r
)
9909 uint32_t _ptr_domainname
;
9910 uint32_t _ptr_dcname
;
9911 TALLOC_CTX
*_mem_save_domainname_0
;
9912 TALLOC_CTX
*_mem_save_dcname_0
;
9913 TALLOC_CTX
*_mem_save_dcname_1
;
9914 if (flags
& NDR_IN
) {
9915 ZERO_STRUCT(r
->out
);
9917 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
9918 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
9919 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
9920 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
9922 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
9923 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
9924 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domainname
));
9925 if (_ptr_domainname
) {
9926 NDR_PULL_ALLOC(ndr
, r
->in
.domainname
);
9928 r
->in
.domainname
= NULL
;
9930 if (r
->in
.domainname
) {
9931 _mem_save_domainname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9932 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domainname
, 0);
9933 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domainname
));
9934 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domainname
));
9935 if (ndr_get_array_length(ndr
, &r
->in
.domainname
) > ndr_get_array_size(ndr
, &r
->in
.domainname
)) {
9936 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domainname
), ndr_get_array_length(ndr
, &r
->in
.domainname
));
9938 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domainname
), sizeof(uint16_t)));
9939 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domainname
, ndr_get_array_length(ndr
, &r
->in
.domainname
), sizeof(uint16_t), CH_UTF16
));
9940 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domainname_0
, 0);
9942 NDR_PULL_ALLOC(ndr
, r
->out
.dcname
);
9943 ZERO_STRUCTP(r
->out
.dcname
);
9945 if (flags
& NDR_OUT
) {
9946 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9947 NDR_PULL_ALLOC(ndr
, r
->out
.dcname
);
9949 _mem_save_dcname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9950 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.dcname
, LIBNDR_FLAG_REF_ALLOC
);
9951 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dcname
));
9953 NDR_PULL_ALLOC(ndr
, *r
->out
.dcname
);
9955 *r
->out
.dcname
= NULL
;
9957 if (*r
->out
.dcname
) {
9958 _mem_save_dcname_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9959 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.dcname
, 0);
9960 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.dcname
));
9961 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.dcname
));
9962 if (ndr_get_array_length(ndr
, r
->out
.dcname
) > ndr_get_array_size(ndr
, r
->out
.dcname
)) {
9963 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, r
->out
.dcname
), ndr_get_array_length(ndr
, r
->out
.dcname
));
9965 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.dcname
), sizeof(uint16_t)));
9966 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, r
->out
.dcname
, ndr_get_array_length(ndr
, r
->out
.dcname
), sizeof(uint16_t), CH_UTF16
));
9967 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dcname_1
, 0);
9969 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dcname_0
, LIBNDR_FLAG_REF_ALLOC
);
9970 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
9972 return NDR_ERR_SUCCESS
;
9975 _PUBLIC_
void ndr_print_netr_GetDcName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_GetDcName
*r
)
9977 ndr_print_struct(ndr
, name
, "netr_GetDcName");
9979 if (flags
& NDR_SET_VALUES
) {
9980 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9982 if (flags
& NDR_IN
) {
9983 ndr_print_struct(ndr
, "in", "netr_GetDcName");
9985 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
9986 ndr_print_ptr(ndr
, "domainname", r
->in
.domainname
);
9988 if (r
->in
.domainname
) {
9989 ndr_print_string(ndr
, "domainname", r
->in
.domainname
);
9994 if (flags
& NDR_OUT
) {
9995 ndr_print_struct(ndr
, "out", "netr_GetDcName");
9997 ndr_print_ptr(ndr
, "dcname", r
->out
.dcname
);
9999 ndr_print_ptr(ndr
, "dcname", *r
->out
.dcname
);
10001 if (*r
->out
.dcname
) {
10002 ndr_print_string(ndr
, "dcname", *r
->out
.dcname
);
10006 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
10012 static enum ndr_err_code
ndr_push_netr_LogonControl(struct ndr_push
*ndr
, int flags
, const struct netr_LogonControl
*r
)
10014 if (flags
& NDR_IN
) {
10015 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.logon_server
));
10016 if (r
->in
.logon_server
) {
10017 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10018 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10019 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10020 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
));
10022 NDR_CHECK(ndr_push_netr_LogonControlCode(ndr
, NDR_SCALARS
, r
->in
.function_code
));
10023 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
10025 if (flags
& NDR_OUT
) {
10026 if (r
->out
.info
== NULL
) {
10027 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10029 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10030 NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10031 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
10033 return NDR_ERR_SUCCESS
;
10036 static enum ndr_err_code
ndr_pull_netr_LogonControl(struct ndr_pull
*ndr
, int flags
, struct netr_LogonControl
*r
)
10038 uint32_t _ptr_logon_server
;
10039 TALLOC_CTX
*_mem_save_logon_server_0
;
10040 TALLOC_CTX
*_mem_save_info_0
;
10041 if (flags
& NDR_IN
) {
10042 ZERO_STRUCT(r
->out
);
10044 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_server
));
10045 if (_ptr_logon_server
) {
10046 NDR_PULL_ALLOC(ndr
, r
->in
.logon_server
);
10048 r
->in
.logon_server
= NULL
;
10050 if (r
->in
.logon_server
) {
10051 _mem_save_logon_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10052 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logon_server
, 0);
10053 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
10054 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
10055 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
10056 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
10058 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
10059 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
10060 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_server_0
, 0);
10062 NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr
, NDR_SCALARS
, &r
->in
.function_code
));
10063 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
10064 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10065 ZERO_STRUCTP(r
->out
.info
);
10067 if (flags
& NDR_OUT
) {
10068 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10069 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10071 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10072 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10073 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
10074 NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
10075 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10076 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
10078 return NDR_ERR_SUCCESS
;
10081 _PUBLIC_
void ndr_print_netr_LogonControl(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonControl
*r
)
10083 ndr_print_struct(ndr
, name
, "netr_LogonControl");
10085 if (flags
& NDR_SET_VALUES
) {
10086 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10088 if (flags
& NDR_IN
) {
10089 ndr_print_struct(ndr
, "in", "netr_LogonControl");
10091 ndr_print_ptr(ndr
, "logon_server", r
->in
.logon_server
);
10093 if (r
->in
.logon_server
) {
10094 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
10097 ndr_print_netr_LogonControlCode(ndr
, "function_code", r
->in
.function_code
);
10098 ndr_print_uint32(ndr
, "level", r
->in
.level
);
10101 if (flags
& NDR_OUT
) {
10102 ndr_print_struct(ndr
, "out", "netr_LogonControl");
10104 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10106 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
10107 ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr
, "info", r
->out
.info
);
10109 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
10115 static enum ndr_err_code
ndr_push_netr_GetAnyDCName(struct ndr_push
*ndr
, int flags
, const struct netr_GetAnyDCName
*r
)
10117 if (flags
& NDR_IN
) {
10118 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.logon_server
));
10119 if (r
->in
.logon_server
) {
10120 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10121 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10122 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10123 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
));
10125 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domainname
));
10126 if (r
->in
.domainname
) {
10127 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domainname
, CH_UTF16
)));
10128 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10129 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domainname
, CH_UTF16
)));
10130 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.domainname
, ndr_charset_length(r
->in
.domainname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10133 if (flags
& NDR_OUT
) {
10134 if (r
->out
.dcname
== NULL
) {
10135 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10137 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.dcname
));
10138 if (*r
->out
.dcname
) {
10139 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.dcname
, CH_UTF16
)));
10140 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10141 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.dcname
, CH_UTF16
)));
10142 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, *r
->out
.dcname
, ndr_charset_length(*r
->out
.dcname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10144 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
10146 return NDR_ERR_SUCCESS
;
10149 static enum ndr_err_code
ndr_pull_netr_GetAnyDCName(struct ndr_pull
*ndr
, int flags
, struct netr_GetAnyDCName
*r
)
10151 uint32_t _ptr_logon_server
;
10152 uint32_t _ptr_domainname
;
10153 uint32_t _ptr_dcname
;
10154 TALLOC_CTX
*_mem_save_logon_server_0
;
10155 TALLOC_CTX
*_mem_save_domainname_0
;
10156 TALLOC_CTX
*_mem_save_dcname_0
;
10157 TALLOC_CTX
*_mem_save_dcname_1
;
10158 if (flags
& NDR_IN
) {
10159 ZERO_STRUCT(r
->out
);
10161 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_server
));
10162 if (_ptr_logon_server
) {
10163 NDR_PULL_ALLOC(ndr
, r
->in
.logon_server
);
10165 r
->in
.logon_server
= NULL
;
10167 if (r
->in
.logon_server
) {
10168 _mem_save_logon_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10169 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logon_server
, 0);
10170 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
10171 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
10172 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
10173 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
10175 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
10176 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
10177 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_server_0
, 0);
10179 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domainname
));
10180 if (_ptr_domainname
) {
10181 NDR_PULL_ALLOC(ndr
, r
->in
.domainname
);
10183 r
->in
.domainname
= NULL
;
10185 if (r
->in
.domainname
) {
10186 _mem_save_domainname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10187 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domainname
, 0);
10188 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domainname
));
10189 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domainname
));
10190 if (ndr_get_array_length(ndr
, &r
->in
.domainname
) > ndr_get_array_size(ndr
, &r
->in
.domainname
)) {
10191 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domainname
), ndr_get_array_length(ndr
, &r
->in
.domainname
));
10193 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domainname
), sizeof(uint16_t)));
10194 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domainname
, ndr_get_array_length(ndr
, &r
->in
.domainname
), sizeof(uint16_t), CH_UTF16
));
10195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domainname_0
, 0);
10197 NDR_PULL_ALLOC(ndr
, r
->out
.dcname
);
10198 ZERO_STRUCTP(r
->out
.dcname
);
10200 if (flags
& NDR_OUT
) {
10201 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10202 NDR_PULL_ALLOC(ndr
, r
->out
.dcname
);
10204 _mem_save_dcname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10205 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.dcname
, LIBNDR_FLAG_REF_ALLOC
);
10206 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dcname
));
10208 NDR_PULL_ALLOC(ndr
, *r
->out
.dcname
);
10210 *r
->out
.dcname
= NULL
;
10212 if (*r
->out
.dcname
) {
10213 _mem_save_dcname_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10214 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.dcname
, 0);
10215 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.dcname
));
10216 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.dcname
));
10217 if (ndr_get_array_length(ndr
, r
->out
.dcname
) > ndr_get_array_size(ndr
, r
->out
.dcname
)) {
10218 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, r
->out
.dcname
), ndr_get_array_length(ndr
, r
->out
.dcname
));
10220 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.dcname
), sizeof(uint16_t)));
10221 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, r
->out
.dcname
, ndr_get_array_length(ndr
, r
->out
.dcname
), sizeof(uint16_t), CH_UTF16
));
10222 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dcname_1
, 0);
10224 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dcname_0
, LIBNDR_FLAG_REF_ALLOC
);
10225 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
10227 return NDR_ERR_SUCCESS
;
10230 _PUBLIC_
void ndr_print_netr_GetAnyDCName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_GetAnyDCName
*r
)
10232 ndr_print_struct(ndr
, name
, "netr_GetAnyDCName");
10234 if (flags
& NDR_SET_VALUES
) {
10235 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10237 if (flags
& NDR_IN
) {
10238 ndr_print_struct(ndr
, "in", "netr_GetAnyDCName");
10240 ndr_print_ptr(ndr
, "logon_server", r
->in
.logon_server
);
10242 if (r
->in
.logon_server
) {
10243 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
10246 ndr_print_ptr(ndr
, "domainname", r
->in
.domainname
);
10248 if (r
->in
.domainname
) {
10249 ndr_print_string(ndr
, "domainname", r
->in
.domainname
);
10254 if (flags
& NDR_OUT
) {
10255 ndr_print_struct(ndr
, "out", "netr_GetAnyDCName");
10257 ndr_print_ptr(ndr
, "dcname", r
->out
.dcname
);
10259 ndr_print_ptr(ndr
, "dcname", *r
->out
.dcname
);
10261 if (*r
->out
.dcname
) {
10262 ndr_print_string(ndr
, "dcname", *r
->out
.dcname
);
10266 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
10272 static enum ndr_err_code
ndr_push_netr_LogonControl2(struct ndr_push
*ndr
, int flags
, const struct netr_LogonControl2
*r
)
10274 if (flags
& NDR_IN
) {
10275 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.logon_server
));
10276 if (r
->in
.logon_server
) {
10277 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10278 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10279 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10280 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
));
10282 NDR_CHECK(ndr_push_netr_LogonControlCode(ndr
, NDR_SCALARS
, r
->in
.function_code
));
10283 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
10284 if (r
->in
.data
== NULL
) {
10285 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10287 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.data
, r
->in
.function_code
));
10288 NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.data
));
10290 if (flags
& NDR_OUT
) {
10291 if (r
->out
.query
== NULL
) {
10292 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10294 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.query
, r
->in
.level
));
10295 NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.query
));
10296 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
10298 return NDR_ERR_SUCCESS
;
10301 static enum ndr_err_code
ndr_pull_netr_LogonControl2(struct ndr_pull
*ndr
, int flags
, struct netr_LogonControl2
*r
)
10303 uint32_t _ptr_logon_server
;
10304 TALLOC_CTX
*_mem_save_logon_server_0
;
10305 TALLOC_CTX
*_mem_save_data_0
;
10306 TALLOC_CTX
*_mem_save_query_0
;
10307 if (flags
& NDR_IN
) {
10308 ZERO_STRUCT(r
->out
);
10310 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_server
));
10311 if (_ptr_logon_server
) {
10312 NDR_PULL_ALLOC(ndr
, r
->in
.logon_server
);
10314 r
->in
.logon_server
= NULL
;
10316 if (r
->in
.logon_server
) {
10317 _mem_save_logon_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10318 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logon_server
, 0);
10319 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
10320 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
10321 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
10322 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
10324 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
10325 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
10326 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_server_0
, 0);
10328 NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr
, NDR_SCALARS
, &r
->in
.function_code
));
10329 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
10330 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10331 NDR_PULL_ALLOC(ndr
, r
->in
.data
);
10333 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10334 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data
, LIBNDR_FLAG_REF_ALLOC
);
10335 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.data
, r
->in
.function_code
));
10336 NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.data
));
10337 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, LIBNDR_FLAG_REF_ALLOC
);
10338 NDR_PULL_ALLOC(ndr
, r
->out
.query
);
10339 ZERO_STRUCTP(r
->out
.query
);
10341 if (flags
& NDR_OUT
) {
10342 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10343 NDR_PULL_ALLOC(ndr
, r
->out
.query
);
10345 _mem_save_query_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10346 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.query
, LIBNDR_FLAG_REF_ALLOC
);
10347 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.query
, r
->in
.level
));
10348 NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.query
));
10349 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_query_0
, LIBNDR_FLAG_REF_ALLOC
);
10350 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
10352 return NDR_ERR_SUCCESS
;
10355 _PUBLIC_
void ndr_print_netr_LogonControl2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonControl2
*r
)
10357 ndr_print_struct(ndr
, name
, "netr_LogonControl2");
10359 if (flags
& NDR_SET_VALUES
) {
10360 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10362 if (flags
& NDR_IN
) {
10363 ndr_print_struct(ndr
, "in", "netr_LogonControl2");
10365 ndr_print_ptr(ndr
, "logon_server", r
->in
.logon_server
);
10367 if (r
->in
.logon_server
) {
10368 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
10371 ndr_print_netr_LogonControlCode(ndr
, "function_code", r
->in
.function_code
);
10372 ndr_print_uint32(ndr
, "level", r
->in
.level
);
10373 ndr_print_ptr(ndr
, "data", r
->in
.data
);
10375 ndr_print_set_switch_value(ndr
, r
->in
.data
, r
->in
.function_code
);
10376 ndr_print_netr_CONTROL_DATA_INFORMATION(ndr
, "data", r
->in
.data
);
10380 if (flags
& NDR_OUT
) {
10381 ndr_print_struct(ndr
, "out", "netr_LogonControl2");
10383 ndr_print_ptr(ndr
, "query", r
->out
.query
);
10385 ndr_print_set_switch_value(ndr
, r
->out
.query
, r
->in
.level
);
10386 ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr
, "query", r
->out
.query
);
10388 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
10394 static enum ndr_err_code
ndr_push_netr_ServerAuthenticate2(struct ndr_push
*ndr
, int flags
, const struct netr_ServerAuthenticate2
*r
)
10396 if (flags
& NDR_IN
) {
10397 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
10398 if (r
->in
.server_name
) {
10399 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
10400 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10401 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
10402 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
));
10404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
10405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10406 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
10407 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
));
10408 NDR_CHECK(ndr_push_netr_SchannelType(ndr
, NDR_SCALARS
, r
->in
.secure_channel_type
));
10409 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
10410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
10412 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
));
10413 if (r
->in
.credentials
== NULL
) {
10414 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10416 NDR_CHECK(ndr_push_netr_Credential(ndr
, NDR_SCALARS
, r
->in
.credentials
));
10417 if (r
->in
.negotiate_flags
== NULL
) {
10418 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10420 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr
, NDR_SCALARS
, *r
->in
.negotiate_flags
));
10422 if (flags
& NDR_OUT
) {
10423 if (r
->out
.return_credentials
== NULL
) {
10424 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10426 NDR_CHECK(ndr_push_netr_Credential(ndr
, NDR_SCALARS
, r
->out
.return_credentials
));
10427 if (r
->out
.negotiate_flags
== NULL
) {
10428 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10430 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr
, NDR_SCALARS
, *r
->out
.negotiate_flags
));
10431 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10433 return NDR_ERR_SUCCESS
;
10436 static enum ndr_err_code
ndr_pull_netr_ServerAuthenticate2(struct ndr_pull
*ndr
, int flags
, struct netr_ServerAuthenticate2
*r
)
10438 uint32_t _ptr_server_name
;
10439 TALLOC_CTX
*_mem_save_server_name_0
;
10440 TALLOC_CTX
*_mem_save_credentials_0
;
10441 TALLOC_CTX
*_mem_save_return_credentials_0
;
10442 TALLOC_CTX
*_mem_save_negotiate_flags_0
;
10443 if (flags
& NDR_IN
) {
10444 ZERO_STRUCT(r
->out
);
10446 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
10447 if (_ptr_server_name
) {
10448 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
10450 r
->in
.server_name
= NULL
;
10452 if (r
->in
.server_name
) {
10453 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10454 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
10455 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
10456 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
10457 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
10458 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
10460 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
10461 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
10462 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
10464 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
10465 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
10466 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
10467 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
10469 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
10470 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
10471 NDR_CHECK(ndr_pull_netr_SchannelType(ndr
, NDR_SCALARS
, &r
->in
.secure_channel_type
));
10472 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
10473 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
10474 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
10475 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
10477 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
10478 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
10479 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10480 NDR_PULL_ALLOC(ndr
, r
->in
.credentials
);
10482 _mem_save_credentials_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10483 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credentials
, LIBNDR_FLAG_REF_ALLOC
);
10484 NDR_CHECK(ndr_pull_netr_Credential(ndr
, NDR_SCALARS
, r
->in
.credentials
));
10485 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credentials_0
, LIBNDR_FLAG_REF_ALLOC
);
10486 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10487 NDR_PULL_ALLOC(ndr
, r
->in
.negotiate_flags
);
10489 _mem_save_negotiate_flags_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10490 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.negotiate_flags
, LIBNDR_FLAG_REF_ALLOC
);
10491 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr
, NDR_SCALARS
, r
->in
.negotiate_flags
));
10492 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_negotiate_flags_0
, LIBNDR_FLAG_REF_ALLOC
);
10493 NDR_PULL_ALLOC(ndr
, r
->out
.return_credentials
);
10494 ZERO_STRUCTP(r
->out
.return_credentials
);
10495 NDR_PULL_ALLOC(ndr
, r
->out
.negotiate_flags
);
10496 *r
->out
.negotiate_flags
= *r
->in
.negotiate_flags
;
10498 if (flags
& NDR_OUT
) {
10499 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10500 NDR_PULL_ALLOC(ndr
, r
->out
.return_credentials
);
10502 _mem_save_return_credentials_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10503 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_credentials
, LIBNDR_FLAG_REF_ALLOC
);
10504 NDR_CHECK(ndr_pull_netr_Credential(ndr
, NDR_SCALARS
, r
->out
.return_credentials
));
10505 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_credentials_0
, LIBNDR_FLAG_REF_ALLOC
);
10506 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10507 NDR_PULL_ALLOC(ndr
, r
->out
.negotiate_flags
);
10509 _mem_save_negotiate_flags_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10510 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.negotiate_flags
, LIBNDR_FLAG_REF_ALLOC
);
10511 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr
, NDR_SCALARS
, r
->out
.negotiate_flags
));
10512 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_negotiate_flags_0
, LIBNDR_FLAG_REF_ALLOC
);
10513 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10515 return NDR_ERR_SUCCESS
;
10518 _PUBLIC_
void ndr_print_netr_ServerAuthenticate2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_ServerAuthenticate2
*r
)
10520 ndr_print_struct(ndr
, name
, "netr_ServerAuthenticate2");
10522 if (flags
& NDR_SET_VALUES
) {
10523 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10525 if (flags
& NDR_IN
) {
10526 ndr_print_struct(ndr
, "in", "netr_ServerAuthenticate2");
10528 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
10530 if (r
->in
.server_name
) {
10531 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
10534 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
10535 ndr_print_netr_SchannelType(ndr
, "secure_channel_type", r
->in
.secure_channel_type
);
10536 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
10537 ndr_print_ptr(ndr
, "credentials", r
->in
.credentials
);
10539 ndr_print_netr_Credential(ndr
, "credentials", r
->in
.credentials
);
10541 ndr_print_ptr(ndr
, "negotiate_flags", r
->in
.negotiate_flags
);
10543 ndr_print_netr_NegotiateFlags(ndr
, "negotiate_flags", *r
->in
.negotiate_flags
);
10547 if (flags
& NDR_OUT
) {
10548 ndr_print_struct(ndr
, "out", "netr_ServerAuthenticate2");
10550 ndr_print_ptr(ndr
, "return_credentials", r
->out
.return_credentials
);
10552 ndr_print_netr_Credential(ndr
, "return_credentials", r
->out
.return_credentials
);
10554 ndr_print_ptr(ndr
, "negotiate_flags", r
->out
.negotiate_flags
);
10556 ndr_print_netr_NegotiateFlags(ndr
, "negotiate_flags", *r
->out
.negotiate_flags
);
10558 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10564 static enum ndr_err_code
ndr_push_netr_DatabaseSync2(struct ndr_push
*ndr
, int flags
, const struct netr_DatabaseSync2
*r
)
10566 if (flags
& NDR_IN
) {
10567 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10568 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10570 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
));
10571 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
10572 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10573 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
10574 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.computername
, ndr_charset_length(r
->in
.computername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10575 if (r
->in
.credential
== NULL
) {
10576 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10578 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
10579 if (r
->in
.return_authenticator
== NULL
) {
10580 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10582 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
10583 NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr
, NDR_SCALARS
, r
->in
.database_id
));
10584 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.restart_state
));
10585 if (r
->in
.sync_context
== NULL
) {
10586 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10588 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.sync_context
));
10589 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.preferredmaximumlength
));
10591 if (flags
& NDR_OUT
) {
10592 if (r
->out
.return_authenticator
== NULL
) {
10593 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10595 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
10596 if (r
->out
.sync_context
== NULL
) {
10597 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10599 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.sync_context
));
10600 if (r
->out
.delta_enum_array
== NULL
) {
10601 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10603 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.delta_enum_array
));
10604 if (*r
->out
.delta_enum_array
) {
10605 NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.delta_enum_array
));
10607 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10609 return NDR_ERR_SUCCESS
;
10612 static enum ndr_err_code
ndr_pull_netr_DatabaseSync2(struct ndr_pull
*ndr
, int flags
, struct netr_DatabaseSync2
*r
)
10614 uint32_t _ptr_delta_enum_array
;
10615 TALLOC_CTX
*_mem_save_credential_0
;
10616 TALLOC_CTX
*_mem_save_return_authenticator_0
;
10617 TALLOC_CTX
*_mem_save_sync_context_0
;
10618 TALLOC_CTX
*_mem_save_delta_enum_array_0
;
10619 TALLOC_CTX
*_mem_save_delta_enum_array_1
;
10620 if (flags
& NDR_IN
) {
10621 ZERO_STRUCT(r
->out
);
10623 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
10624 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
10625 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
10626 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
10628 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
10629 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
10630 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computername
));
10631 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computername
));
10632 if (ndr_get_array_length(ndr
, &r
->in
.computername
) > ndr_get_array_size(ndr
, &r
->in
.computername
)) {
10633 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computername
), ndr_get_array_length(ndr
, &r
->in
.computername
));
10635 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t)));
10636 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computername
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t), CH_UTF16
));
10637 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10638 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
10640 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10641 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, LIBNDR_FLAG_REF_ALLOC
);
10642 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
10643 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, LIBNDR_FLAG_REF_ALLOC
);
10644 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10645 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
10647 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10648 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
10649 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
10650 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
10651 NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr
, NDR_SCALARS
, &r
->in
.database_id
));
10652 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.restart_state
));
10653 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10654 NDR_PULL_ALLOC(ndr
, r
->in
.sync_context
);
10656 _mem_save_sync_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10657 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sync_context
, LIBNDR_FLAG_REF_ALLOC
);
10658 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.sync_context
));
10659 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sync_context_0
, LIBNDR_FLAG_REF_ALLOC
);
10660 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.preferredmaximumlength
));
10661 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
10662 *r
->out
.return_authenticator
= *r
->in
.return_authenticator
;
10663 NDR_PULL_ALLOC(ndr
, r
->out
.sync_context
);
10664 *r
->out
.sync_context
= *r
->in
.sync_context
;
10665 NDR_PULL_ALLOC(ndr
, r
->out
.delta_enum_array
);
10666 ZERO_STRUCTP(r
->out
.delta_enum_array
);
10668 if (flags
& NDR_OUT
) {
10669 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10670 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
10672 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10673 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
10674 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
10675 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
10676 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10677 NDR_PULL_ALLOC(ndr
, r
->out
.sync_context
);
10679 _mem_save_sync_context_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10680 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sync_context
, LIBNDR_FLAG_REF_ALLOC
);
10681 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.sync_context
));
10682 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sync_context_0
, LIBNDR_FLAG_REF_ALLOC
);
10683 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10684 NDR_PULL_ALLOC(ndr
, r
->out
.delta_enum_array
);
10686 _mem_save_delta_enum_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10687 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.delta_enum_array
, LIBNDR_FLAG_REF_ALLOC
);
10688 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_delta_enum_array
));
10689 if (_ptr_delta_enum_array
) {
10690 NDR_PULL_ALLOC(ndr
, *r
->out
.delta_enum_array
);
10692 *r
->out
.delta_enum_array
= NULL
;
10694 if (*r
->out
.delta_enum_array
) {
10695 _mem_save_delta_enum_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10696 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.delta_enum_array
, 0);
10697 NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.delta_enum_array
));
10698 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delta_enum_array_1
, 0);
10700 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delta_enum_array_0
, LIBNDR_FLAG_REF_ALLOC
);
10701 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10703 return NDR_ERR_SUCCESS
;
10706 _PUBLIC_
void ndr_print_netr_DatabaseSync2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DatabaseSync2
*r
)
10708 ndr_print_struct(ndr
, name
, "netr_DatabaseSync2");
10710 if (flags
& NDR_SET_VALUES
) {
10711 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10713 if (flags
& NDR_IN
) {
10714 ndr_print_struct(ndr
, "in", "netr_DatabaseSync2");
10716 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
10717 ndr_print_string(ndr
, "computername", r
->in
.computername
);
10718 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
10720 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
10722 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
10724 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
10726 ndr_print_netr_SamDatabaseID(ndr
, "database_id", r
->in
.database_id
);
10727 ndr_print_uint16(ndr
, "restart_state", r
->in
.restart_state
);
10728 ndr_print_ptr(ndr
, "sync_context", r
->in
.sync_context
);
10730 ndr_print_uint32(ndr
, "sync_context", *r
->in
.sync_context
);
10732 ndr_print_uint32(ndr
, "preferredmaximumlength", r
->in
.preferredmaximumlength
);
10735 if (flags
& NDR_OUT
) {
10736 ndr_print_struct(ndr
, "out", "netr_DatabaseSync2");
10738 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
10740 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
10742 ndr_print_ptr(ndr
, "sync_context", r
->out
.sync_context
);
10744 ndr_print_uint32(ndr
, "sync_context", *r
->out
.sync_context
);
10746 ndr_print_ptr(ndr
, "delta_enum_array", r
->out
.delta_enum_array
);
10748 ndr_print_ptr(ndr
, "delta_enum_array", *r
->out
.delta_enum_array
);
10750 if (*r
->out
.delta_enum_array
) {
10751 ndr_print_netr_DELTA_ENUM_ARRAY(ndr
, "delta_enum_array", *r
->out
.delta_enum_array
);
10755 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10761 static enum ndr_err_code
ndr_push_netr_DatabaseRedo(struct ndr_push
*ndr
, int flags
, const struct netr_DatabaseRedo
*r
)
10763 if (flags
& NDR_IN
) {
10764 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10765 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10766 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10767 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
));
10768 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
10769 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10770 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computername
, CH_UTF16
)));
10771 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.computername
, ndr_charset_length(r
->in
.computername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10772 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, &r
->in
.credential
));
10773 if (r
->in
.return_authenticator
== NULL
) {
10774 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10776 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
10777 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.change_log_entry
));
10778 if (r
->in
.change_log_entry
) {
10779 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.change_log_entry_size
));
10780 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.change_log_entry
, r
->in
.change_log_entry_size
));
10782 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.change_log_entry_size
));
10784 if (flags
& NDR_OUT
) {
10785 if (r
->out
.return_authenticator
== NULL
) {
10786 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10788 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
10789 if (r
->out
.delta_enum_array
== NULL
) {
10790 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10792 NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.delta_enum_array
));
10793 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10795 return NDR_ERR_SUCCESS
;
10798 static enum ndr_err_code
ndr_pull_netr_DatabaseRedo(struct ndr_pull
*ndr
, int flags
, struct netr_DatabaseRedo
*r
)
10800 uint32_t _ptr_change_log_entry
;
10801 TALLOC_CTX
*_mem_save_return_authenticator_0
;
10802 TALLOC_CTX
*_mem_save_change_log_entry_0
;
10803 TALLOC_CTX
*_mem_save_delta_enum_array_0
;
10804 if (flags
& NDR_IN
) {
10805 ZERO_STRUCT(r
->out
);
10807 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
10808 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
10809 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
10810 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
10812 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
10813 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
10814 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computername
));
10815 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computername
));
10816 if (ndr_get_array_length(ndr
, &r
->in
.computername
) > ndr_get_array_size(ndr
, &r
->in
.computername
)) {
10817 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computername
), ndr_get_array_length(ndr
, &r
->in
.computername
));
10819 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t)));
10820 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computername
, ndr_get_array_length(ndr
, &r
->in
.computername
), sizeof(uint16_t), CH_UTF16
));
10821 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, &r
->in
.credential
));
10822 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10823 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
10825 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10826 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
10827 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
10828 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
10829 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_change_log_entry
));
10830 if (_ptr_change_log_entry
) {
10831 NDR_PULL_ALLOC(ndr
, r
->in
.change_log_entry
);
10833 r
->in
.change_log_entry
= NULL
;
10835 if (r
->in
.change_log_entry
) {
10836 _mem_save_change_log_entry_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10837 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.change_log_entry
, 0);
10838 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.change_log_entry
));
10839 NDR_PULL_ALLOC_N(ndr
, r
->in
.change_log_entry
, ndr_get_array_size(ndr
, &r
->in
.change_log_entry
));
10840 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.change_log_entry
, ndr_get_array_size(ndr
, &r
->in
.change_log_entry
)));
10841 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_change_log_entry_0
, 0);
10843 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.change_log_entry_size
));
10844 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
10845 *r
->out
.return_authenticator
= *r
->in
.return_authenticator
;
10846 NDR_PULL_ALLOC(ndr
, r
->out
.delta_enum_array
);
10847 ZERO_STRUCTP(r
->out
.delta_enum_array
);
10848 if (r
->in
.change_log_entry
) {
10849 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.change_log_entry
, r
->in
.change_log_entry_size
));
10852 if (flags
& NDR_OUT
) {
10853 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10854 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
10856 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10857 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
10858 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
10859 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
10860 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10861 NDR_PULL_ALLOC(ndr
, r
->out
.delta_enum_array
);
10863 _mem_save_delta_enum_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10864 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.delta_enum_array
, LIBNDR_FLAG_REF_ALLOC
);
10865 NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.delta_enum_array
));
10866 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_delta_enum_array_0
, LIBNDR_FLAG_REF_ALLOC
);
10867 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10869 return NDR_ERR_SUCCESS
;
10872 _PUBLIC_
void ndr_print_netr_DatabaseRedo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DatabaseRedo
*r
)
10874 ndr_print_struct(ndr
, name
, "netr_DatabaseRedo");
10876 if (flags
& NDR_SET_VALUES
) {
10877 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10879 if (flags
& NDR_IN
) {
10880 ndr_print_struct(ndr
, "in", "netr_DatabaseRedo");
10882 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
10883 ndr_print_string(ndr
, "computername", r
->in
.computername
);
10884 ndr_print_netr_Authenticator(ndr
, "credential", &r
->in
.credential
);
10885 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
10887 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
10889 ndr_print_ptr(ndr
, "change_log_entry", r
->in
.change_log_entry
);
10891 if (r
->in
.change_log_entry
) {
10892 ndr_print_array_uint8(ndr
, "change_log_entry", r
->in
.change_log_entry
, r
->in
.change_log_entry_size
);
10895 ndr_print_uint32(ndr
, "change_log_entry_size", r
->in
.change_log_entry_size
);
10898 if (flags
& NDR_OUT
) {
10899 ndr_print_struct(ndr
, "out", "netr_DatabaseRedo");
10901 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
10903 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
10905 ndr_print_ptr(ndr
, "delta_enum_array", r
->out
.delta_enum_array
);
10907 ndr_print_netr_DELTA_ENUM_ARRAY(ndr
, "delta_enum_array", r
->out
.delta_enum_array
);
10909 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10915 static enum ndr_err_code
ndr_push_netr_LogonControl2Ex(struct ndr_push
*ndr
, int flags
, const struct netr_LogonControl2Ex
*r
)
10917 if (flags
& NDR_IN
) {
10918 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.logon_server
));
10919 if (r
->in
.logon_server
) {
10920 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10921 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10922 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.logon_server
, CH_UTF16
)));
10923 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
));
10925 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.function_code
));
10926 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
10927 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.data
, r
->in
.function_code
));
10928 NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.data
));
10930 if (flags
& NDR_OUT
) {
10931 if (r
->out
.query
== NULL
) {
10932 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10934 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.query
, r
->in
.level
));
10935 NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.query
));
10936 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
10938 return NDR_ERR_SUCCESS
;
10941 static enum ndr_err_code
ndr_pull_netr_LogonControl2Ex(struct ndr_pull
*ndr
, int flags
, struct netr_LogonControl2Ex
*r
)
10943 uint32_t _ptr_logon_server
;
10944 TALLOC_CTX
*_mem_save_logon_server_0
;
10945 TALLOC_CTX
*_mem_save_query_0
;
10946 if (flags
& NDR_IN
) {
10947 ZERO_STRUCT(r
->out
);
10949 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_server
));
10950 if (_ptr_logon_server
) {
10951 NDR_PULL_ALLOC(ndr
, r
->in
.logon_server
);
10953 r
->in
.logon_server
= NULL
;
10955 if (r
->in
.logon_server
) {
10956 _mem_save_logon_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10957 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logon_server
, 0);
10958 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.logon_server
));
10959 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.logon_server
));
10960 if (ndr_get_array_length(ndr
, &r
->in
.logon_server
) > ndr_get_array_size(ndr
, &r
->in
.logon_server
)) {
10961 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.logon_server
), ndr_get_array_length(ndr
, &r
->in
.logon_server
));
10963 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t)));
10964 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.logon_server
, ndr_get_array_length(ndr
, &r
->in
.logon_server
), sizeof(uint16_t), CH_UTF16
));
10965 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_server_0
, 0);
10967 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.function_code
));
10968 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
10969 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.data
, r
->in
.function_code
));
10970 NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.data
));
10971 NDR_PULL_ALLOC(ndr
, r
->out
.query
);
10972 ZERO_STRUCTP(r
->out
.query
);
10974 if (flags
& NDR_OUT
) {
10975 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10976 NDR_PULL_ALLOC(ndr
, r
->out
.query
);
10978 _mem_save_query_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10979 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.query
, LIBNDR_FLAG_REF_ALLOC
);
10980 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.query
, r
->in
.level
));
10981 NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.query
));
10982 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_query_0
, LIBNDR_FLAG_REF_ALLOC
);
10983 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
10985 return NDR_ERR_SUCCESS
;
10988 _PUBLIC_
void ndr_print_netr_LogonControl2Ex(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonControl2Ex
*r
)
10990 ndr_print_struct(ndr
, name
, "netr_LogonControl2Ex");
10992 if (flags
& NDR_SET_VALUES
) {
10993 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10995 if (flags
& NDR_IN
) {
10996 ndr_print_struct(ndr
, "in", "netr_LogonControl2Ex");
10998 ndr_print_ptr(ndr
, "logon_server", r
->in
.logon_server
);
11000 if (r
->in
.logon_server
) {
11001 ndr_print_string(ndr
, "logon_server", r
->in
.logon_server
);
11004 ndr_print_uint32(ndr
, "function_code", r
->in
.function_code
);
11005 ndr_print_uint32(ndr
, "level", r
->in
.level
);
11006 ndr_print_set_switch_value(ndr
, &r
->in
.data
, r
->in
.function_code
);
11007 ndr_print_netr_CONTROL_DATA_INFORMATION(ndr
, "data", &r
->in
.data
);
11010 if (flags
& NDR_OUT
) {
11011 ndr_print_struct(ndr
, "out", "netr_LogonControl2Ex");
11013 ndr_print_ptr(ndr
, "query", r
->out
.query
);
11015 ndr_print_set_switch_value(ndr
, r
->out
.query
, r
->in
.level
);
11016 ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr
, "query", r
->out
.query
);
11018 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
11024 static enum ndr_err_code
ndr_push_netr_NetrEnumerateTrustedDomains(struct ndr_push
*ndr
, int flags
, const struct netr_NetrEnumerateTrustedDomains
*r
)
11026 if (flags
& NDR_IN
) {
11027 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
11028 if (r
->in
.server_name
) {
11029 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
11030 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11031 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
11032 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
));
11035 if (flags
& NDR_OUT
) {
11036 if (r
->out
.trusted_domains_blob
== NULL
) {
11037 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11039 NDR_CHECK(ndr_push_netr_Blob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.trusted_domains_blob
));
11040 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
11042 return NDR_ERR_SUCCESS
;
11045 static enum ndr_err_code
ndr_pull_netr_NetrEnumerateTrustedDomains(struct ndr_pull
*ndr
, int flags
, struct netr_NetrEnumerateTrustedDomains
*r
)
11047 uint32_t _ptr_server_name
;
11048 TALLOC_CTX
*_mem_save_server_name_0
;
11049 TALLOC_CTX
*_mem_save_trusted_domains_blob_0
;
11050 if (flags
& NDR_IN
) {
11051 ZERO_STRUCT(r
->out
);
11053 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
11054 if (_ptr_server_name
) {
11055 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
11057 r
->in
.server_name
= NULL
;
11059 if (r
->in
.server_name
) {
11060 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11061 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
11062 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
11063 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
11064 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
11065 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
11067 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
11068 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
11069 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
11071 NDR_PULL_ALLOC(ndr
, r
->out
.trusted_domains_blob
);
11072 ZERO_STRUCTP(r
->out
.trusted_domains_blob
);
11074 if (flags
& NDR_OUT
) {
11075 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11076 NDR_PULL_ALLOC(ndr
, r
->out
.trusted_domains_blob
);
11078 _mem_save_trusted_domains_blob_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11079 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trusted_domains_blob
, LIBNDR_FLAG_REF_ALLOC
);
11080 NDR_CHECK(ndr_pull_netr_Blob(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.trusted_domains_blob
));
11081 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domains_blob_0
, LIBNDR_FLAG_REF_ALLOC
);
11082 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
11084 return NDR_ERR_SUCCESS
;
11087 _PUBLIC_
void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_NetrEnumerateTrustedDomains
*r
)
11089 ndr_print_struct(ndr
, name
, "netr_NetrEnumerateTrustedDomains");
11091 if (flags
& NDR_SET_VALUES
) {
11092 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11094 if (flags
& NDR_IN
) {
11095 ndr_print_struct(ndr
, "in", "netr_NetrEnumerateTrustedDomains");
11097 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
11099 if (r
->in
.server_name
) {
11100 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
11105 if (flags
& NDR_OUT
) {
11106 ndr_print_struct(ndr
, "out", "netr_NetrEnumerateTrustedDomains");
11108 ndr_print_ptr(ndr
, "trusted_domains_blob", r
->out
.trusted_domains_blob
);
11110 ndr_print_netr_Blob(ndr
, "trusted_domains_blob", r
->out
.trusted_domains_blob
);
11112 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
11118 static enum ndr_err_code
ndr_push_netr_DsRGetDCName(struct ndr_push
*ndr
, int flags
, const struct netr_DsRGetDCName
*r
)
11120 if (flags
& NDR_IN
) {
11121 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_unc
));
11122 if (r
->in
.server_unc
) {
11123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_unc
, CH_UTF16
)));
11124 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_unc
, CH_UTF16
)));
11126 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
));
11128 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_name
));
11129 if (r
->in
.domain_name
) {
11130 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
11131 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11132 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
11133 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
));
11135 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_guid
));
11136 if (r
->in
.domain_guid
) {
11137 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_guid
));
11139 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.site_guid
));
11140 if (r
->in
.site_guid
) {
11141 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.site_guid
));
11143 NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr
, NDR_SCALARS
, r
->in
.flags
));
11145 if (flags
& NDR_OUT
) {
11146 if (r
->out
.info
== NULL
) {
11147 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11149 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
11150 if (*r
->out
.info
) {
11151 NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
11153 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
11155 return NDR_ERR_SUCCESS
;
11158 static enum ndr_err_code
ndr_pull_netr_DsRGetDCName(struct ndr_pull
*ndr
, int flags
, struct netr_DsRGetDCName
*r
)
11160 uint32_t _ptr_server_unc
;
11161 uint32_t _ptr_domain_name
;
11162 uint32_t _ptr_domain_guid
;
11163 uint32_t _ptr_site_guid
;
11164 uint32_t _ptr_info
;
11165 TALLOC_CTX
*_mem_save_server_unc_0
;
11166 TALLOC_CTX
*_mem_save_domain_name_0
;
11167 TALLOC_CTX
*_mem_save_domain_guid_0
;
11168 TALLOC_CTX
*_mem_save_site_guid_0
;
11169 TALLOC_CTX
*_mem_save_info_0
;
11170 TALLOC_CTX
*_mem_save_info_1
;
11171 if (flags
& NDR_IN
) {
11172 ZERO_STRUCT(r
->out
);
11174 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_unc
));
11175 if (_ptr_server_unc
) {
11176 NDR_PULL_ALLOC(ndr
, r
->in
.server_unc
);
11178 r
->in
.server_unc
= NULL
;
11180 if (r
->in
.server_unc
) {
11181 _mem_save_server_unc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11182 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_unc
, 0);
11183 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_unc
));
11184 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_unc
));
11185 if (ndr_get_array_length(ndr
, &r
->in
.server_unc
) > ndr_get_array_size(ndr
, &r
->in
.server_unc
)) {
11186 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_unc
), ndr_get_array_length(ndr
, &r
->in
.server_unc
));
11188 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_unc
), sizeof(uint16_t)));
11189 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_unc
, ndr_get_array_length(ndr
, &r
->in
.server_unc
), sizeof(uint16_t), CH_UTF16
));
11190 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_unc_0
, 0);
11192 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
11193 if (_ptr_domain_name
) {
11194 NDR_PULL_ALLOC(ndr
, r
->in
.domain_name
);
11196 r
->in
.domain_name
= NULL
;
11198 if (r
->in
.domain_name
) {
11199 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11200 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_name
, 0);
11201 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
11202 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
11203 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
11204 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
11206 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
11207 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
11208 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
11210 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_guid
));
11211 if (_ptr_domain_guid
) {
11212 NDR_PULL_ALLOC(ndr
, r
->in
.domain_guid
);
11214 r
->in
.domain_guid
= NULL
;
11216 if (r
->in
.domain_guid
) {
11217 _mem_save_domain_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11218 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_guid
, 0);
11219 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_guid
));
11220 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_guid_0
, 0);
11222 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_guid
));
11223 if (_ptr_site_guid
) {
11224 NDR_PULL_ALLOC(ndr
, r
->in
.site_guid
);
11226 r
->in
.site_guid
= NULL
;
11228 if (r
->in
.site_guid
) {
11229 _mem_save_site_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11230 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.site_guid
, 0);
11231 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.site_guid
));
11232 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_guid_0
, 0);
11234 NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
11235 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
11236 ZERO_STRUCTP(r
->out
.info
);
11238 if (flags
& NDR_OUT
) {
11239 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11240 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
11242 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11243 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
11244 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
11246 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
11248 *r
->out
.info
= NULL
;
11250 if (*r
->out
.info
) {
11251 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11252 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
11253 NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
11254 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
11256 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11257 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
11259 return NDR_ERR_SUCCESS
;
11262 _PUBLIC_
void ndr_print_netr_DsRGetDCName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsRGetDCName
*r
)
11264 ndr_print_struct(ndr
, name
, "netr_DsRGetDCName");
11266 if (flags
& NDR_SET_VALUES
) {
11267 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11269 if (flags
& NDR_IN
) {
11270 ndr_print_struct(ndr
, "in", "netr_DsRGetDCName");
11272 ndr_print_ptr(ndr
, "server_unc", r
->in
.server_unc
);
11274 if (r
->in
.server_unc
) {
11275 ndr_print_string(ndr
, "server_unc", r
->in
.server_unc
);
11278 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
11280 if (r
->in
.domain_name
) {
11281 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
11284 ndr_print_ptr(ndr
, "domain_guid", r
->in
.domain_guid
);
11286 if (r
->in
.domain_guid
) {
11287 ndr_print_GUID(ndr
, "domain_guid", r
->in
.domain_guid
);
11290 ndr_print_ptr(ndr
, "site_guid", r
->in
.site_guid
);
11292 if (r
->in
.site_guid
) {
11293 ndr_print_GUID(ndr
, "site_guid", r
->in
.site_guid
);
11296 ndr_print_netr_DsRGetDCName_flags(ndr
, "flags", r
->in
.flags
);
11299 if (flags
& NDR_OUT
) {
11300 ndr_print_struct(ndr
, "out", "netr_DsRGetDCName");
11302 ndr_print_ptr(ndr
, "info", r
->out
.info
);
11304 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
11306 if (*r
->out
.info
) {
11307 ndr_print_netr_DsRGetDCNameInfo(ndr
, "info", *r
->out
.info
);
11311 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
11317 static enum ndr_err_code
ndr_push_netr_NETRLOGONDUMMYROUTINE1(struct ndr_push
*ndr
, int flags
, const struct netr_NETRLOGONDUMMYROUTINE1
*r
)
11319 if (flags
& NDR_IN
) {
11321 if (flags
& NDR_OUT
) {
11322 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
11324 return NDR_ERR_SUCCESS
;
11327 static enum ndr_err_code
ndr_pull_netr_NETRLOGONDUMMYROUTINE1(struct ndr_pull
*ndr
, int flags
, struct netr_NETRLOGONDUMMYROUTINE1
*r
)
11329 if (flags
& NDR_IN
) {
11331 if (flags
& NDR_OUT
) {
11332 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
11334 return NDR_ERR_SUCCESS
;
11337 _PUBLIC_
void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_NETRLOGONDUMMYROUTINE1
*r
)
11339 ndr_print_struct(ndr
, name
, "netr_NETRLOGONDUMMYROUTINE1");
11341 if (flags
& NDR_SET_VALUES
) {
11342 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11344 if (flags
& NDR_IN
) {
11345 ndr_print_struct(ndr
, "in", "netr_NETRLOGONDUMMYROUTINE1");
11349 if (flags
& NDR_OUT
) {
11350 ndr_print_struct(ndr
, "out", "netr_NETRLOGONDUMMYROUTINE1");
11352 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
11358 static enum ndr_err_code
ndr_push_netr_NETRLOGONSETSERVICEBITS(struct ndr_push
*ndr
, int flags
, const struct netr_NETRLOGONSETSERVICEBITS
*r
)
11360 if (flags
& NDR_IN
) {
11362 if (flags
& NDR_OUT
) {
11363 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
11365 return NDR_ERR_SUCCESS
;
11368 static enum ndr_err_code
ndr_pull_netr_NETRLOGONSETSERVICEBITS(struct ndr_pull
*ndr
, int flags
, struct netr_NETRLOGONSETSERVICEBITS
*r
)
11370 if (flags
& NDR_IN
) {
11372 if (flags
& NDR_OUT
) {
11373 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
11375 return NDR_ERR_SUCCESS
;
11378 _PUBLIC_
void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_NETRLOGONSETSERVICEBITS
*r
)
11380 ndr_print_struct(ndr
, name
, "netr_NETRLOGONSETSERVICEBITS");
11382 if (flags
& NDR_SET_VALUES
) {
11383 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11385 if (flags
& NDR_IN
) {
11386 ndr_print_struct(ndr
, "in", "netr_NETRLOGONSETSERVICEBITS");
11390 if (flags
& NDR_OUT
) {
11391 ndr_print_struct(ndr
, "out", "netr_NETRLOGONSETSERVICEBITS");
11393 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
11399 static enum ndr_err_code
ndr_push_netr_LogonGetTrustRid(struct ndr_push
*ndr
, int flags
, const struct netr_LogonGetTrustRid
*r
)
11401 if (flags
& NDR_IN
) {
11402 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
11403 if (r
->in
.server_name
) {
11404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
11405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11406 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
11407 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
));
11409 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_name
));
11410 if (r
->in
.domain_name
) {
11411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
11412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11413 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
11414 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
));
11417 if (flags
& NDR_OUT
) {
11418 if (r
->out
.rid
== NULL
) {
11419 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11421 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
11422 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
11424 return NDR_ERR_SUCCESS
;
11427 static enum ndr_err_code
ndr_pull_netr_LogonGetTrustRid(struct ndr_pull
*ndr
, int flags
, struct netr_LogonGetTrustRid
*r
)
11429 uint32_t _ptr_server_name
;
11430 uint32_t _ptr_domain_name
;
11431 TALLOC_CTX
*_mem_save_server_name_0
;
11432 TALLOC_CTX
*_mem_save_domain_name_0
;
11433 TALLOC_CTX
*_mem_save_rid_0
;
11434 if (flags
& NDR_IN
) {
11435 ZERO_STRUCT(r
->out
);
11437 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
11438 if (_ptr_server_name
) {
11439 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
11441 r
->in
.server_name
= NULL
;
11443 if (r
->in
.server_name
) {
11444 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11445 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
11446 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
11447 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
11448 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
11449 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
11451 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
11452 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
11453 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
11455 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
11456 if (_ptr_domain_name
) {
11457 NDR_PULL_ALLOC(ndr
, r
->in
.domain_name
);
11459 r
->in
.domain_name
= NULL
;
11461 if (r
->in
.domain_name
) {
11462 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11463 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_name
, 0);
11464 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
11465 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
11466 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
11467 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
11469 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
11470 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
11471 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
11473 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
11474 ZERO_STRUCTP(r
->out
.rid
);
11476 if (flags
& NDR_OUT
) {
11477 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11478 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
11480 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11481 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
11482 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
11483 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
11484 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
11486 return NDR_ERR_SUCCESS
;
11489 _PUBLIC_
void ndr_print_netr_LogonGetTrustRid(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonGetTrustRid
*r
)
11491 ndr_print_struct(ndr
, name
, "netr_LogonGetTrustRid");
11493 if (flags
& NDR_SET_VALUES
) {
11494 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11496 if (flags
& NDR_IN
) {
11497 ndr_print_struct(ndr
, "in", "netr_LogonGetTrustRid");
11499 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
11501 if (r
->in
.server_name
) {
11502 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
11505 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
11507 if (r
->in
.domain_name
) {
11508 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
11513 if (flags
& NDR_OUT
) {
11514 ndr_print_struct(ndr
, "out", "netr_LogonGetTrustRid");
11516 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
11518 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
11520 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
11526 static enum ndr_err_code
ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_push
*ndr
, int flags
, const struct netr_NETRLOGONCOMPUTESERVERDIGEST
*r
)
11528 if (flags
& NDR_IN
) {
11530 if (flags
& NDR_OUT
) {
11531 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
11533 return NDR_ERR_SUCCESS
;
11536 static enum ndr_err_code
ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_pull
*ndr
, int flags
, struct netr_NETRLOGONCOMPUTESERVERDIGEST
*r
)
11538 if (flags
& NDR_IN
) {
11540 if (flags
& NDR_OUT
) {
11541 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
11543 return NDR_ERR_SUCCESS
;
11546 _PUBLIC_
void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_NETRLOGONCOMPUTESERVERDIGEST
*r
)
11548 ndr_print_struct(ndr
, name
, "netr_NETRLOGONCOMPUTESERVERDIGEST");
11550 if (flags
& NDR_SET_VALUES
) {
11551 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11553 if (flags
& NDR_IN
) {
11554 ndr_print_struct(ndr
, "in", "netr_NETRLOGONCOMPUTESERVERDIGEST");
11558 if (flags
& NDR_OUT
) {
11559 ndr_print_struct(ndr
, "out", "netr_NETRLOGONCOMPUTESERVERDIGEST");
11561 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
11567 static enum ndr_err_code
ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_push
*ndr
, int flags
, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST
*r
)
11569 if (flags
& NDR_IN
) {
11571 if (flags
& NDR_OUT
) {
11572 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
11574 return NDR_ERR_SUCCESS
;
11577 static enum ndr_err_code
ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_pull
*ndr
, int flags
, struct netr_NETRLOGONCOMPUTECLIENTDIGEST
*r
)
11579 if (flags
& NDR_IN
) {
11581 if (flags
& NDR_OUT
) {
11582 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
11584 return NDR_ERR_SUCCESS
;
11587 _PUBLIC_
void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST
*r
)
11589 ndr_print_struct(ndr
, name
, "netr_NETRLOGONCOMPUTECLIENTDIGEST");
11591 if (flags
& NDR_SET_VALUES
) {
11592 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11594 if (flags
& NDR_IN
) {
11595 ndr_print_struct(ndr
, "in", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
11599 if (flags
& NDR_OUT
) {
11600 ndr_print_struct(ndr
, "out", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
11602 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
11608 static enum ndr_err_code
ndr_push_netr_ServerAuthenticate3(struct ndr_push
*ndr
, int flags
, const struct netr_ServerAuthenticate3
*r
)
11610 if (flags
& NDR_IN
) {
11611 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
11612 if (r
->in
.server_name
) {
11613 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
11614 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11615 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
11616 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
));
11618 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
11619 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11620 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
11621 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
));
11622 NDR_CHECK(ndr_push_netr_SchannelType(ndr
, NDR_SCALARS
, r
->in
.secure_channel_type
));
11623 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
11624 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11625 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
11626 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
));
11627 if (r
->in
.credentials
== NULL
) {
11628 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11630 NDR_CHECK(ndr_push_netr_Credential(ndr
, NDR_SCALARS
, r
->in
.credentials
));
11631 if (r
->in
.negotiate_flags
== NULL
) {
11632 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11634 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr
, NDR_SCALARS
, *r
->in
.negotiate_flags
));
11636 if (flags
& NDR_OUT
) {
11637 if (r
->out
.credentials
== NULL
) {
11638 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11640 NDR_CHECK(ndr_push_netr_Credential(ndr
, NDR_SCALARS
, r
->out
.credentials
));
11641 if (r
->out
.negotiate_flags
== NULL
) {
11642 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11644 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr
, NDR_SCALARS
, *r
->out
.negotiate_flags
));
11645 if (r
->out
.rid
== NULL
) {
11646 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11648 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.rid
));
11649 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11651 return NDR_ERR_SUCCESS
;
11654 static enum ndr_err_code
ndr_pull_netr_ServerAuthenticate3(struct ndr_pull
*ndr
, int flags
, struct netr_ServerAuthenticate3
*r
)
11656 uint32_t _ptr_server_name
;
11657 TALLOC_CTX
*_mem_save_server_name_0
;
11658 TALLOC_CTX
*_mem_save_credentials_0
;
11659 TALLOC_CTX
*_mem_save_negotiate_flags_0
;
11660 TALLOC_CTX
*_mem_save_rid_0
;
11661 if (flags
& NDR_IN
) {
11662 ZERO_STRUCT(r
->out
);
11664 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
11665 if (_ptr_server_name
) {
11666 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
11668 r
->in
.server_name
= NULL
;
11670 if (r
->in
.server_name
) {
11671 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11672 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
11673 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
11674 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
11675 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
11676 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
11678 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
11679 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
11680 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
11682 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
11683 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
11684 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
11685 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
11687 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
11688 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
11689 NDR_CHECK(ndr_pull_netr_SchannelType(ndr
, NDR_SCALARS
, &r
->in
.secure_channel_type
));
11690 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
11691 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
11692 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
11693 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
11695 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
11696 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
11697 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11698 NDR_PULL_ALLOC(ndr
, r
->in
.credentials
);
11700 _mem_save_credentials_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11701 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credentials
, LIBNDR_FLAG_REF_ALLOC
);
11702 NDR_CHECK(ndr_pull_netr_Credential(ndr
, NDR_SCALARS
, r
->in
.credentials
));
11703 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credentials_0
, LIBNDR_FLAG_REF_ALLOC
);
11704 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11705 NDR_PULL_ALLOC(ndr
, r
->in
.negotiate_flags
);
11707 _mem_save_negotiate_flags_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11708 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.negotiate_flags
, LIBNDR_FLAG_REF_ALLOC
);
11709 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr
, NDR_SCALARS
, r
->in
.negotiate_flags
));
11710 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_negotiate_flags_0
, LIBNDR_FLAG_REF_ALLOC
);
11711 NDR_PULL_ALLOC(ndr
, r
->out
.credentials
);
11712 *r
->out
.credentials
= *r
->in
.credentials
;
11713 NDR_PULL_ALLOC(ndr
, r
->out
.negotiate_flags
);
11714 *r
->out
.negotiate_flags
= *r
->in
.negotiate_flags
;
11715 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
11716 ZERO_STRUCTP(r
->out
.rid
);
11718 if (flags
& NDR_OUT
) {
11719 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11720 NDR_PULL_ALLOC(ndr
, r
->out
.credentials
);
11722 _mem_save_credentials_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11723 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.credentials
, LIBNDR_FLAG_REF_ALLOC
);
11724 NDR_CHECK(ndr_pull_netr_Credential(ndr
, NDR_SCALARS
, r
->out
.credentials
));
11725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credentials_0
, LIBNDR_FLAG_REF_ALLOC
);
11726 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11727 NDR_PULL_ALLOC(ndr
, r
->out
.negotiate_flags
);
11729 _mem_save_negotiate_flags_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11730 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.negotiate_flags
, LIBNDR_FLAG_REF_ALLOC
);
11731 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr
, NDR_SCALARS
, r
->out
.negotiate_flags
));
11732 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_negotiate_flags_0
, LIBNDR_FLAG_REF_ALLOC
);
11733 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11734 NDR_PULL_ALLOC(ndr
, r
->out
.rid
);
11736 _mem_save_rid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11737 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rid
, LIBNDR_FLAG_REF_ALLOC
);
11738 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.rid
));
11739 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rid_0
, LIBNDR_FLAG_REF_ALLOC
);
11740 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11742 return NDR_ERR_SUCCESS
;
11745 _PUBLIC_
void ndr_print_netr_ServerAuthenticate3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_ServerAuthenticate3
*r
)
11747 ndr_print_struct(ndr
, name
, "netr_ServerAuthenticate3");
11749 if (flags
& NDR_SET_VALUES
) {
11750 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11752 if (flags
& NDR_IN
) {
11753 ndr_print_struct(ndr
, "in", "netr_ServerAuthenticate3");
11755 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
11757 if (r
->in
.server_name
) {
11758 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
11761 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
11762 ndr_print_netr_SchannelType(ndr
, "secure_channel_type", r
->in
.secure_channel_type
);
11763 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
11764 ndr_print_ptr(ndr
, "credentials", r
->in
.credentials
);
11766 ndr_print_netr_Credential(ndr
, "credentials", r
->in
.credentials
);
11768 ndr_print_ptr(ndr
, "negotiate_flags", r
->in
.negotiate_flags
);
11770 ndr_print_netr_NegotiateFlags(ndr
, "negotiate_flags", *r
->in
.negotiate_flags
);
11774 if (flags
& NDR_OUT
) {
11775 ndr_print_struct(ndr
, "out", "netr_ServerAuthenticate3");
11777 ndr_print_ptr(ndr
, "credentials", r
->out
.credentials
);
11779 ndr_print_netr_Credential(ndr
, "credentials", r
->out
.credentials
);
11781 ndr_print_ptr(ndr
, "negotiate_flags", r
->out
.negotiate_flags
);
11783 ndr_print_netr_NegotiateFlags(ndr
, "negotiate_flags", *r
->out
.negotiate_flags
);
11785 ndr_print_ptr(ndr
, "rid", r
->out
.rid
);
11787 ndr_print_uint32(ndr
, "rid", *r
->out
.rid
);
11789 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11795 static enum ndr_err_code
ndr_push_netr_DsRGetDCNameEx(struct ndr_push
*ndr
, int flags
, const struct netr_DsRGetDCNameEx
*r
)
11797 if (flags
& NDR_IN
) {
11798 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_unc
));
11799 if (r
->in
.server_unc
) {
11800 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_unc
, CH_UTF16
)));
11801 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11802 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_unc
, CH_UTF16
)));
11803 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
));
11805 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_name
));
11806 if (r
->in
.domain_name
) {
11807 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
11808 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11809 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
11810 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
));
11812 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_guid
));
11813 if (r
->in
.domain_guid
) {
11814 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_guid
));
11816 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.site_name
));
11817 if (r
->in
.site_name
) {
11818 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.site_name
, CH_UTF16
)));
11819 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
11820 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.site_name
, CH_UTF16
)));
11821 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
));
11823 NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr
, NDR_SCALARS
, r
->in
.flags
));
11825 if (flags
& NDR_OUT
) {
11826 if (r
->out
.info
== NULL
) {
11827 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11829 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
11830 if (*r
->out
.info
) {
11831 NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
11833 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
11835 return NDR_ERR_SUCCESS
;
11838 static enum ndr_err_code
ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull
*ndr
, int flags
, struct netr_DsRGetDCNameEx
*r
)
11840 uint32_t _ptr_server_unc
;
11841 uint32_t _ptr_domain_name
;
11842 uint32_t _ptr_domain_guid
;
11843 uint32_t _ptr_site_name
;
11844 uint32_t _ptr_info
;
11845 TALLOC_CTX
*_mem_save_server_unc_0
;
11846 TALLOC_CTX
*_mem_save_domain_name_0
;
11847 TALLOC_CTX
*_mem_save_domain_guid_0
;
11848 TALLOC_CTX
*_mem_save_site_name_0
;
11849 TALLOC_CTX
*_mem_save_info_0
;
11850 TALLOC_CTX
*_mem_save_info_1
;
11851 if (flags
& NDR_IN
) {
11852 ZERO_STRUCT(r
->out
);
11854 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_unc
));
11855 if (_ptr_server_unc
) {
11856 NDR_PULL_ALLOC(ndr
, r
->in
.server_unc
);
11858 r
->in
.server_unc
= NULL
;
11860 if (r
->in
.server_unc
) {
11861 _mem_save_server_unc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11862 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_unc
, 0);
11863 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_unc
));
11864 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_unc
));
11865 if (ndr_get_array_length(ndr
, &r
->in
.server_unc
) > ndr_get_array_size(ndr
, &r
->in
.server_unc
)) {
11866 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_unc
), ndr_get_array_length(ndr
, &r
->in
.server_unc
));
11868 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_unc
), sizeof(uint16_t)));
11869 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_unc
, ndr_get_array_length(ndr
, &r
->in
.server_unc
), sizeof(uint16_t), CH_UTF16
));
11870 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_unc_0
, 0);
11872 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
11873 if (_ptr_domain_name
) {
11874 NDR_PULL_ALLOC(ndr
, r
->in
.domain_name
);
11876 r
->in
.domain_name
= NULL
;
11878 if (r
->in
.domain_name
) {
11879 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11880 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_name
, 0);
11881 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
11882 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
11883 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
11884 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
11886 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
11887 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
11888 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
11890 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_guid
));
11891 if (_ptr_domain_guid
) {
11892 NDR_PULL_ALLOC(ndr
, r
->in
.domain_guid
);
11894 r
->in
.domain_guid
= NULL
;
11896 if (r
->in
.domain_guid
) {
11897 _mem_save_domain_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11898 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_guid
, 0);
11899 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_guid
));
11900 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_guid_0
, 0);
11902 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_name
));
11903 if (_ptr_site_name
) {
11904 NDR_PULL_ALLOC(ndr
, r
->in
.site_name
);
11906 r
->in
.site_name
= NULL
;
11908 if (r
->in
.site_name
) {
11909 _mem_save_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11910 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.site_name
, 0);
11911 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.site_name
));
11912 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.site_name
));
11913 if (ndr_get_array_length(ndr
, &r
->in
.site_name
) > ndr_get_array_size(ndr
, &r
->in
.site_name
)) {
11914 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.site_name
), ndr_get_array_length(ndr
, &r
->in
.site_name
));
11916 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.site_name
), sizeof(uint16_t)));
11917 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.site_name
, ndr_get_array_length(ndr
, &r
->in
.site_name
), sizeof(uint16_t), CH_UTF16
));
11918 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_name_0
, 0);
11920 NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
11921 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
11922 ZERO_STRUCTP(r
->out
.info
);
11924 if (flags
& NDR_OUT
) {
11925 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11926 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
11928 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11929 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
11930 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
11932 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
11934 *r
->out
.info
= NULL
;
11936 if (*r
->out
.info
) {
11937 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11938 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
11939 NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
11940 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
11942 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11943 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
11945 return NDR_ERR_SUCCESS
;
11948 _PUBLIC_
void ndr_print_netr_DsRGetDCNameEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsRGetDCNameEx
*r
)
11950 ndr_print_struct(ndr
, name
, "netr_DsRGetDCNameEx");
11952 if (flags
& NDR_SET_VALUES
) {
11953 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11955 if (flags
& NDR_IN
) {
11956 ndr_print_struct(ndr
, "in", "netr_DsRGetDCNameEx");
11958 ndr_print_ptr(ndr
, "server_unc", r
->in
.server_unc
);
11960 if (r
->in
.server_unc
) {
11961 ndr_print_string(ndr
, "server_unc", r
->in
.server_unc
);
11964 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
11966 if (r
->in
.domain_name
) {
11967 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
11970 ndr_print_ptr(ndr
, "domain_guid", r
->in
.domain_guid
);
11972 if (r
->in
.domain_guid
) {
11973 ndr_print_GUID(ndr
, "domain_guid", r
->in
.domain_guid
);
11976 ndr_print_ptr(ndr
, "site_name", r
->in
.site_name
);
11978 if (r
->in
.site_name
) {
11979 ndr_print_string(ndr
, "site_name", r
->in
.site_name
);
11982 ndr_print_netr_DsRGetDCName_flags(ndr
, "flags", r
->in
.flags
);
11985 if (flags
& NDR_OUT
) {
11986 ndr_print_struct(ndr
, "out", "netr_DsRGetDCNameEx");
11988 ndr_print_ptr(ndr
, "info", r
->out
.info
);
11990 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
11992 if (*r
->out
.info
) {
11993 ndr_print_netr_DsRGetDCNameInfo(ndr
, "info", *r
->out
.info
);
11997 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12003 static enum ndr_err_code
ndr_push_netr_DsRGetSiteName(struct ndr_push
*ndr
, int flags
, const struct netr_DsRGetSiteName
*r
)
12005 if (flags
& NDR_IN
) {
12006 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.computer_name
));
12007 if (r
->in
.computer_name
) {
12008 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
12009 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12010 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
12011 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
));
12014 if (flags
& NDR_OUT
) {
12015 if (r
->out
.site
== NULL
) {
12016 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12018 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.site
));
12019 if (*r
->out
.site
) {
12020 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.site
, CH_UTF16
)));
12021 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12022 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.site
, CH_UTF16
)));
12023 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, *r
->out
.site
, ndr_charset_length(*r
->out
.site
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
12025 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12027 return NDR_ERR_SUCCESS
;
12030 static enum ndr_err_code
ndr_pull_netr_DsRGetSiteName(struct ndr_pull
*ndr
, int flags
, struct netr_DsRGetSiteName
*r
)
12032 uint32_t _ptr_computer_name
;
12033 uint32_t _ptr_site
;
12034 TALLOC_CTX
*_mem_save_computer_name_0
;
12035 TALLOC_CTX
*_mem_save_site_0
;
12036 TALLOC_CTX
*_mem_save_site_1
;
12037 if (flags
& NDR_IN
) {
12038 ZERO_STRUCT(r
->out
);
12040 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_name
));
12041 if (_ptr_computer_name
) {
12042 NDR_PULL_ALLOC(ndr
, r
->in
.computer_name
);
12044 r
->in
.computer_name
= NULL
;
12046 if (r
->in
.computer_name
) {
12047 _mem_save_computer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12048 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.computer_name
, 0);
12049 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
12050 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
12051 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
12052 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
12054 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
12055 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
12056 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_name_0
, 0);
12058 NDR_PULL_ALLOC(ndr
, r
->out
.site
);
12059 ZERO_STRUCTP(r
->out
.site
);
12061 if (flags
& NDR_OUT
) {
12062 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12063 NDR_PULL_ALLOC(ndr
, r
->out
.site
);
12065 _mem_save_site_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12066 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.site
, LIBNDR_FLAG_REF_ALLOC
);
12067 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site
));
12069 NDR_PULL_ALLOC(ndr
, *r
->out
.site
);
12071 *r
->out
.site
= NULL
;
12073 if (*r
->out
.site
) {
12074 _mem_save_site_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12075 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.site
, 0);
12076 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.site
));
12077 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.site
));
12078 if (ndr_get_array_length(ndr
, r
->out
.site
) > ndr_get_array_size(ndr
, r
->out
.site
)) {
12079 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, r
->out
.site
), ndr_get_array_length(ndr
, r
->out
.site
));
12081 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.site
), sizeof(uint16_t)));
12082 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, r
->out
.site
, ndr_get_array_length(ndr
, r
->out
.site
), sizeof(uint16_t), CH_UTF16
));
12083 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_1
, 0);
12085 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_0
, LIBNDR_FLAG_REF_ALLOC
);
12086 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12088 return NDR_ERR_SUCCESS
;
12091 _PUBLIC_
void ndr_print_netr_DsRGetSiteName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsRGetSiteName
*r
)
12093 ndr_print_struct(ndr
, name
, "netr_DsRGetSiteName");
12095 if (flags
& NDR_SET_VALUES
) {
12096 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12098 if (flags
& NDR_IN
) {
12099 ndr_print_struct(ndr
, "in", "netr_DsRGetSiteName");
12101 ndr_print_ptr(ndr
, "computer_name", r
->in
.computer_name
);
12103 if (r
->in
.computer_name
) {
12104 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
12109 if (flags
& NDR_OUT
) {
12110 ndr_print_struct(ndr
, "out", "netr_DsRGetSiteName");
12112 ndr_print_ptr(ndr
, "site", r
->out
.site
);
12114 ndr_print_ptr(ndr
, "site", *r
->out
.site
);
12116 if (*r
->out
.site
) {
12117 ndr_print_string(ndr
, "site", *r
->out
.site
);
12121 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12127 static enum ndr_err_code
ndr_push_netr_LogonGetDomainInfo(struct ndr_push
*ndr
, int flags
, const struct netr_LogonGetDomainInfo
*r
)
12129 if (flags
& NDR_IN
) {
12130 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
12131 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12132 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
12133 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
));
12134 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.computer_name
));
12135 if (r
->in
.computer_name
) {
12136 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
12137 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12138 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
12139 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
));
12141 if (r
->in
.credential
== NULL
) {
12142 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12144 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
12145 if (r
->in
.return_authenticator
== NULL
) {
12146 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12148 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
12149 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
12150 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.query
, r
->in
.level
));
12151 NDR_CHECK(ndr_push_netr_DomainQuery(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.query
));
12153 if (flags
& NDR_OUT
) {
12154 if (r
->out
.return_authenticator
== NULL
) {
12155 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12157 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
12158 if (r
->out
.info
== NULL
) {
12159 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12161 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
12162 NDR_CHECK(ndr_push_netr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
12163 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12165 return NDR_ERR_SUCCESS
;
12168 static enum ndr_err_code
ndr_pull_netr_LogonGetDomainInfo(struct ndr_pull
*ndr
, int flags
, struct netr_LogonGetDomainInfo
*r
)
12170 uint32_t _ptr_computer_name
;
12171 TALLOC_CTX
*_mem_save_computer_name_0
;
12172 TALLOC_CTX
*_mem_save_credential_0
;
12173 TALLOC_CTX
*_mem_save_return_authenticator_0
;
12174 TALLOC_CTX
*_mem_save_info_0
;
12175 if (flags
& NDR_IN
) {
12176 ZERO_STRUCT(r
->out
);
12178 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
12179 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
12180 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
12181 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
12183 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
12184 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
12185 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_name
));
12186 if (_ptr_computer_name
) {
12187 NDR_PULL_ALLOC(ndr
, r
->in
.computer_name
);
12189 r
->in
.computer_name
= NULL
;
12191 if (r
->in
.computer_name
) {
12192 _mem_save_computer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12193 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.computer_name
, 0);
12194 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
12195 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
12196 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
12197 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
12199 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
12200 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
12201 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_name_0
, 0);
12203 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12204 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
12206 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12207 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, LIBNDR_FLAG_REF_ALLOC
);
12208 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
12209 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, LIBNDR_FLAG_REF_ALLOC
);
12210 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12211 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
12213 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12214 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
12215 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
12216 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
12217 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
12218 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.query
, r
->in
.level
));
12219 NDR_CHECK(ndr_pull_netr_DomainQuery(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.query
));
12220 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
12221 *r
->out
.return_authenticator
= *r
->in
.return_authenticator
;
12222 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
12223 ZERO_STRUCTP(r
->out
.info
);
12225 if (flags
& NDR_OUT
) {
12226 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12227 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
12229 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12230 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
12231 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
12232 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
12233 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12234 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
12236 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12237 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
12238 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
12239 NDR_CHECK(ndr_pull_netr_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
12240 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
12241 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12243 return NDR_ERR_SUCCESS
;
12246 _PUBLIC_
void ndr_print_netr_LogonGetDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonGetDomainInfo
*r
)
12248 ndr_print_struct(ndr
, name
, "netr_LogonGetDomainInfo");
12250 if (flags
& NDR_SET_VALUES
) {
12251 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12253 if (flags
& NDR_IN
) {
12254 ndr_print_struct(ndr
, "in", "netr_LogonGetDomainInfo");
12256 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
12257 ndr_print_ptr(ndr
, "computer_name", r
->in
.computer_name
);
12259 if (r
->in
.computer_name
) {
12260 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
12263 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
12265 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
12267 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
12269 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
12271 ndr_print_uint32(ndr
, "level", r
->in
.level
);
12272 ndr_print_set_switch_value(ndr
, &r
->in
.query
, r
->in
.level
);
12273 ndr_print_netr_DomainQuery(ndr
, "query", &r
->in
.query
);
12276 if (flags
& NDR_OUT
) {
12277 ndr_print_struct(ndr
, "out", "netr_LogonGetDomainInfo");
12279 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
12281 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
12283 ndr_print_ptr(ndr
, "info", r
->out
.info
);
12285 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
12286 ndr_print_netr_DomainInfo(ndr
, "info", r
->out
.info
);
12288 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12294 static enum ndr_err_code
ndr_push_netr_ServerPasswordSet2(struct ndr_push
*ndr
, int flags
, const struct netr_ServerPasswordSet2
*r
)
12296 if (flags
& NDR_IN
) {
12297 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
12298 if (r
->in
.server_name
) {
12299 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
12300 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12301 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
12302 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
));
12304 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
12305 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12306 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
12307 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
));
12308 NDR_CHECK(ndr_push_netr_SchannelType(ndr
, NDR_SCALARS
, r
->in
.secure_channel_type
));
12309 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
12310 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
12312 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
));
12313 if (r
->in
.credential
== NULL
) {
12314 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12316 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
12317 if (r
->in
.new_password
== NULL
) {
12318 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12320 NDR_CHECK(ndr_push_netr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.new_password
));
12322 if (flags
& NDR_OUT
) {
12323 if (r
->out
.return_authenticator
== NULL
) {
12324 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12326 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
12327 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12329 return NDR_ERR_SUCCESS
;
12332 static enum ndr_err_code
ndr_pull_netr_ServerPasswordSet2(struct ndr_pull
*ndr
, int flags
, struct netr_ServerPasswordSet2
*r
)
12334 uint32_t _ptr_server_name
;
12335 TALLOC_CTX
*_mem_save_server_name_0
;
12336 TALLOC_CTX
*_mem_save_credential_0
;
12337 TALLOC_CTX
*_mem_save_return_authenticator_0
;
12338 TALLOC_CTX
*_mem_save_new_password_0
;
12339 if (flags
& NDR_IN
) {
12340 ZERO_STRUCT(r
->out
);
12342 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
12343 if (_ptr_server_name
) {
12344 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
12346 r
->in
.server_name
= NULL
;
12348 if (r
->in
.server_name
) {
12349 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12350 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
12351 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
12352 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
12353 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
12354 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
12356 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
12357 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
12358 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
12360 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
12361 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
12362 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
12363 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
12365 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
12366 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
12367 NDR_CHECK(ndr_pull_netr_SchannelType(ndr
, NDR_SCALARS
, &r
->in
.secure_channel_type
));
12368 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
12369 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
12370 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
12371 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
12373 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
12374 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
12375 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12376 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
12378 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12379 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, LIBNDR_FLAG_REF_ALLOC
);
12380 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
12381 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, LIBNDR_FLAG_REF_ALLOC
);
12382 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12383 NDR_PULL_ALLOC(ndr
, r
->in
.new_password
);
12385 _mem_save_new_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12386 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_password
, LIBNDR_FLAG_REF_ALLOC
);
12387 NDR_CHECK(ndr_pull_netr_CryptPassword(ndr
, NDR_SCALARS
, r
->in
.new_password
));
12388 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_password_0
, LIBNDR_FLAG_REF_ALLOC
);
12389 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
12390 ZERO_STRUCTP(r
->out
.return_authenticator
);
12392 if (flags
& NDR_OUT
) {
12393 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12394 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
12396 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12397 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
12398 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
12399 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
12400 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12402 return NDR_ERR_SUCCESS
;
12405 _PUBLIC_
void ndr_print_netr_ServerPasswordSet2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_ServerPasswordSet2
*r
)
12407 ndr_print_struct(ndr
, name
, "netr_ServerPasswordSet2");
12409 if (flags
& NDR_SET_VALUES
) {
12410 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12412 if (flags
& NDR_IN
) {
12413 ndr_print_struct(ndr
, "in", "netr_ServerPasswordSet2");
12415 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
12417 if (r
->in
.server_name
) {
12418 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
12421 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
12422 ndr_print_netr_SchannelType(ndr
, "secure_channel_type", r
->in
.secure_channel_type
);
12423 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
12424 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
12426 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
12428 ndr_print_ptr(ndr
, "new_password", r
->in
.new_password
);
12430 ndr_print_netr_CryptPassword(ndr
, "new_password", r
->in
.new_password
);
12434 if (flags
& NDR_OUT
) {
12435 ndr_print_struct(ndr
, "out", "netr_ServerPasswordSet2");
12437 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
12439 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
12441 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12447 static enum ndr_err_code
ndr_push_netr_ServerPasswordGet(struct ndr_push
*ndr
, int flags
, const struct netr_ServerPasswordGet
*r
)
12449 if (flags
& NDR_IN
) {
12450 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
12451 if (r
->in
.server_name
) {
12452 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
12453 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12454 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
12455 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
));
12457 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
12458 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12459 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
12460 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
));
12461 NDR_CHECK(ndr_push_netr_SchannelType(ndr
, NDR_SCALARS
, r
->in
.secure_channel_type
));
12462 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
12463 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12464 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
12465 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
));
12466 if (r
->in
.credential
== NULL
) {
12467 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12469 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
12471 if (flags
& NDR_OUT
) {
12472 if (r
->out
.return_authenticator
== NULL
) {
12473 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12475 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
12476 if (r
->out
.password
== NULL
) {
12477 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12479 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.password
));
12480 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12482 return NDR_ERR_SUCCESS
;
12485 static enum ndr_err_code
ndr_pull_netr_ServerPasswordGet(struct ndr_pull
*ndr
, int flags
, struct netr_ServerPasswordGet
*r
)
12487 uint32_t _ptr_server_name
;
12488 TALLOC_CTX
*_mem_save_server_name_0
;
12489 TALLOC_CTX
*_mem_save_credential_0
;
12490 TALLOC_CTX
*_mem_save_return_authenticator_0
;
12491 TALLOC_CTX
*_mem_save_password_0
;
12492 if (flags
& NDR_IN
) {
12493 ZERO_STRUCT(r
->out
);
12495 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
12496 if (_ptr_server_name
) {
12497 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
12499 r
->in
.server_name
= NULL
;
12501 if (r
->in
.server_name
) {
12502 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12503 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
12504 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
12505 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
12506 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
12507 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
12509 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
12510 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
12511 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
12513 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
12514 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
12515 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
12516 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
12518 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
12519 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
12520 NDR_CHECK(ndr_pull_netr_SchannelType(ndr
, NDR_SCALARS
, &r
->in
.secure_channel_type
));
12521 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
12522 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
12523 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
12524 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
12526 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
12527 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
12528 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12529 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
12531 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12532 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, LIBNDR_FLAG_REF_ALLOC
);
12533 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
12534 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, LIBNDR_FLAG_REF_ALLOC
);
12535 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
12536 ZERO_STRUCTP(r
->out
.return_authenticator
);
12537 NDR_PULL_ALLOC(ndr
, r
->out
.password
);
12538 ZERO_STRUCTP(r
->out
.password
);
12540 if (flags
& NDR_OUT
) {
12541 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12542 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
12544 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12545 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
12546 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
12547 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
12548 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12549 NDR_PULL_ALLOC(ndr
, r
->out
.password
);
12551 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12552 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.password
, LIBNDR_FLAG_REF_ALLOC
);
12553 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.password
));
12554 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, LIBNDR_FLAG_REF_ALLOC
);
12555 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12557 return NDR_ERR_SUCCESS
;
12560 _PUBLIC_
void ndr_print_netr_ServerPasswordGet(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_ServerPasswordGet
*r
)
12562 ndr_print_struct(ndr
, name
, "netr_ServerPasswordGet");
12564 if (flags
& NDR_SET_VALUES
) {
12565 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12567 if (flags
& NDR_IN
) {
12568 ndr_print_struct(ndr
, "in", "netr_ServerPasswordGet");
12570 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
12572 if (r
->in
.server_name
) {
12573 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
12576 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
12577 ndr_print_netr_SchannelType(ndr
, "secure_channel_type", r
->in
.secure_channel_type
);
12578 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
12579 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
12581 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
12585 if (flags
& NDR_OUT
) {
12586 ndr_print_struct(ndr
, "out", "netr_ServerPasswordGet");
12588 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
12590 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
12592 ndr_print_ptr(ndr
, "password", r
->out
.password
);
12594 ndr_print_samr_Password(ndr
, "password", r
->out
.password
);
12596 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12602 static enum ndr_err_code
ndr_push_netr_NETRLOGONSENDTOSAM(struct ndr_push
*ndr
, int flags
, const struct netr_NETRLOGONSENDTOSAM
*r
)
12604 if (flags
& NDR_IN
) {
12606 if (flags
& NDR_OUT
) {
12607 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12609 return NDR_ERR_SUCCESS
;
12612 static enum ndr_err_code
ndr_pull_netr_NETRLOGONSENDTOSAM(struct ndr_pull
*ndr
, int flags
, struct netr_NETRLOGONSENDTOSAM
*r
)
12614 if (flags
& NDR_IN
) {
12616 if (flags
& NDR_OUT
) {
12617 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12619 return NDR_ERR_SUCCESS
;
12622 _PUBLIC_
void ndr_print_netr_NETRLOGONSENDTOSAM(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_NETRLOGONSENDTOSAM
*r
)
12624 ndr_print_struct(ndr
, name
, "netr_NETRLOGONSENDTOSAM");
12626 if (flags
& NDR_SET_VALUES
) {
12627 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12629 if (flags
& NDR_IN
) {
12630 ndr_print_struct(ndr
, "in", "netr_NETRLOGONSENDTOSAM");
12634 if (flags
& NDR_OUT
) {
12635 ndr_print_struct(ndr
, "out", "netr_NETRLOGONSENDTOSAM");
12637 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12643 static enum ndr_err_code
ndr_push_netr_DsRAddressToSitenamesW(struct ndr_push
*ndr
, int flags
, const struct netr_DsRAddressToSitenamesW
*r
)
12645 uint32_t cntr_addresses_1
;
12646 if (flags
& NDR_IN
) {
12647 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
12648 if (r
->in
.server_name
) {
12649 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
12650 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12651 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
12652 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
));
12654 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12655 if (r
->in
.addresses
== NULL
) {
12656 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12658 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12659 for (cntr_addresses_1
= 0; cntr_addresses_1
< r
->in
.count
; cntr_addresses_1
++) {
12660 NDR_CHECK(ndr_push_netr_DsRAddress(ndr
, NDR_SCALARS
, &r
->in
.addresses
[cntr_addresses_1
]));
12662 for (cntr_addresses_1
= 0; cntr_addresses_1
< r
->in
.count
; cntr_addresses_1
++) {
12663 NDR_CHECK(ndr_push_netr_DsRAddress(ndr
, NDR_BUFFERS
, &r
->in
.addresses
[cntr_addresses_1
]));
12666 if (flags
& NDR_OUT
) {
12667 if (r
->out
.ctr
== NULL
) {
12668 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12670 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.ctr
));
12672 NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesWCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.ctr
));
12674 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12676 return NDR_ERR_SUCCESS
;
12679 static enum ndr_err_code
ndr_pull_netr_DsRAddressToSitenamesW(struct ndr_pull
*ndr
, int flags
, struct netr_DsRAddressToSitenamesW
*r
)
12681 uint32_t _ptr_server_name
;
12682 uint32_t cntr_addresses_1
;
12684 TALLOC_CTX
*_mem_save_server_name_0
;
12685 TALLOC_CTX
*_mem_save_addresses_1
;
12686 TALLOC_CTX
*_mem_save_ctr_0
;
12687 TALLOC_CTX
*_mem_save_ctr_1
;
12688 if (flags
& NDR_IN
) {
12689 ZERO_STRUCT(r
->out
);
12691 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
12692 if (_ptr_server_name
) {
12693 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
12695 r
->in
.server_name
= NULL
;
12697 if (r
->in
.server_name
) {
12698 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12699 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
12700 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
12701 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
12702 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
12703 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
12705 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
12706 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
12707 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
12709 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
12710 if (r
->in
.count
< 0 || r
->in
.count
> 32000) {
12711 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
12713 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.addresses
));
12714 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12715 NDR_PULL_ALLOC_N(ndr
, r
->in
.addresses
, ndr_get_array_size(ndr
, &r
->in
.addresses
));
12717 _mem_save_addresses_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12718 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.addresses
, 0);
12719 for (cntr_addresses_1
= 0; cntr_addresses_1
< r
->in
.count
; cntr_addresses_1
++) {
12720 NDR_CHECK(ndr_pull_netr_DsRAddress(ndr
, NDR_SCALARS
, &r
->in
.addresses
[cntr_addresses_1
]));
12722 for (cntr_addresses_1
= 0; cntr_addresses_1
< r
->in
.count
; cntr_addresses_1
++) {
12723 NDR_CHECK(ndr_pull_netr_DsRAddress(ndr
, NDR_BUFFERS
, &r
->in
.addresses
[cntr_addresses_1
]));
12725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_addresses_1
, 0);
12726 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
12727 ZERO_STRUCTP(r
->out
.ctr
);
12728 if (r
->in
.addresses
) {
12729 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.addresses
, r
->in
.count
));
12732 if (flags
& NDR_OUT
) {
12733 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12734 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
12736 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12737 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
12738 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr
));
12740 NDR_PULL_ALLOC(ndr
, *r
->out
.ctr
);
12742 *r
->out
.ctr
= NULL
;
12745 _mem_save_ctr_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12746 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.ctr
, 0);
12747 NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesWCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.ctr
));
12748 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_1
, 0);
12750 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
12751 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12753 return NDR_ERR_SUCCESS
;
12756 _PUBLIC_
void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsRAddressToSitenamesW
*r
)
12758 uint32_t cntr_addresses_1
;
12759 ndr_print_struct(ndr
, name
, "netr_DsRAddressToSitenamesW");
12761 if (flags
& NDR_SET_VALUES
) {
12762 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12764 if (flags
& NDR_IN
) {
12765 ndr_print_struct(ndr
, "in", "netr_DsRAddressToSitenamesW");
12767 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
12769 if (r
->in
.server_name
) {
12770 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
12773 ndr_print_uint32(ndr
, "count", r
->in
.count
);
12774 ndr_print_ptr(ndr
, "addresses", r
->in
.addresses
);
12776 ndr
->print(ndr
, "%s: ARRAY(%d)", "addresses", r
->in
.count
);
12778 for (cntr_addresses_1
=0;cntr_addresses_1
<r
->in
.count
;cntr_addresses_1
++) {
12780 if (asprintf(&idx_1
, "[%d]", cntr_addresses_1
) != -1) {
12781 ndr_print_netr_DsRAddress(ndr
, "addresses", &r
->in
.addresses
[cntr_addresses_1
]);
12789 if (flags
& NDR_OUT
) {
12790 ndr_print_struct(ndr
, "out", "netr_DsRAddressToSitenamesW");
12792 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
12794 ndr_print_ptr(ndr
, "ctr", *r
->out
.ctr
);
12797 ndr_print_netr_DsRAddressToSitenamesWCtr(ndr
, "ctr", *r
->out
.ctr
);
12801 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
12807 static enum ndr_err_code
ndr_push_netr_DsRGetDCNameEx2(struct ndr_push
*ndr
, int flags
, const struct netr_DsRGetDCNameEx2
*r
)
12809 if (flags
& NDR_IN
) {
12810 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_unc
));
12811 if (r
->in
.server_unc
) {
12812 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_unc
, CH_UTF16
)));
12813 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12814 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_unc
, CH_UTF16
)));
12815 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
));
12817 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.client_account
));
12818 if (r
->in
.client_account
) {
12819 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.client_account
, CH_UTF16
)));
12820 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12821 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.client_account
, CH_UTF16
)));
12822 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
));
12824 NDR_CHECK(ndr_push_samr_AcctFlags(ndr
, NDR_SCALARS
, r
->in
.mask
));
12825 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_name
));
12826 if (r
->in
.domain_name
) {
12827 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
12828 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12829 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
12830 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
));
12832 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_guid
));
12833 if (r
->in
.domain_guid
) {
12834 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_guid
));
12836 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.site_name
));
12837 if (r
->in
.site_name
) {
12838 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.site_name
, CH_UTF16
)));
12839 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
12840 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.site_name
, CH_UTF16
)));
12841 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
));
12843 NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr
, NDR_SCALARS
, r
->in
.flags
));
12845 if (flags
& NDR_OUT
) {
12846 if (r
->out
.info
== NULL
) {
12847 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12849 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
12850 if (*r
->out
.info
) {
12851 NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
12853 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
12855 return NDR_ERR_SUCCESS
;
12858 static enum ndr_err_code
ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull
*ndr
, int flags
, struct netr_DsRGetDCNameEx2
*r
)
12860 uint32_t _ptr_server_unc
;
12861 uint32_t _ptr_client_account
;
12862 uint32_t _ptr_domain_name
;
12863 uint32_t _ptr_domain_guid
;
12864 uint32_t _ptr_site_name
;
12865 uint32_t _ptr_info
;
12866 TALLOC_CTX
*_mem_save_server_unc_0
;
12867 TALLOC_CTX
*_mem_save_client_account_0
;
12868 TALLOC_CTX
*_mem_save_domain_name_0
;
12869 TALLOC_CTX
*_mem_save_domain_guid_0
;
12870 TALLOC_CTX
*_mem_save_site_name_0
;
12871 TALLOC_CTX
*_mem_save_info_0
;
12872 TALLOC_CTX
*_mem_save_info_1
;
12873 if (flags
& NDR_IN
) {
12874 ZERO_STRUCT(r
->out
);
12876 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_unc
));
12877 if (_ptr_server_unc
) {
12878 NDR_PULL_ALLOC(ndr
, r
->in
.server_unc
);
12880 r
->in
.server_unc
= NULL
;
12882 if (r
->in
.server_unc
) {
12883 _mem_save_server_unc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12884 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_unc
, 0);
12885 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_unc
));
12886 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_unc
));
12887 if (ndr_get_array_length(ndr
, &r
->in
.server_unc
) > ndr_get_array_size(ndr
, &r
->in
.server_unc
)) {
12888 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_unc
), ndr_get_array_length(ndr
, &r
->in
.server_unc
));
12890 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_unc
), sizeof(uint16_t)));
12891 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_unc
, ndr_get_array_length(ndr
, &r
->in
.server_unc
), sizeof(uint16_t), CH_UTF16
));
12892 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_unc_0
, 0);
12894 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_client_account
));
12895 if (_ptr_client_account
) {
12896 NDR_PULL_ALLOC(ndr
, r
->in
.client_account
);
12898 r
->in
.client_account
= NULL
;
12900 if (r
->in
.client_account
) {
12901 _mem_save_client_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12902 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.client_account
, 0);
12903 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.client_account
));
12904 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.client_account
));
12905 if (ndr_get_array_length(ndr
, &r
->in
.client_account
) > ndr_get_array_size(ndr
, &r
->in
.client_account
)) {
12906 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.client_account
), ndr_get_array_length(ndr
, &r
->in
.client_account
));
12908 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.client_account
), sizeof(uint16_t)));
12909 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.client_account
, ndr_get_array_length(ndr
, &r
->in
.client_account
), sizeof(uint16_t), CH_UTF16
));
12910 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_client_account_0
, 0);
12912 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr
, NDR_SCALARS
, &r
->in
.mask
));
12913 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
12914 if (_ptr_domain_name
) {
12915 NDR_PULL_ALLOC(ndr
, r
->in
.domain_name
);
12917 r
->in
.domain_name
= NULL
;
12919 if (r
->in
.domain_name
) {
12920 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12921 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_name
, 0);
12922 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
12923 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
12924 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
12925 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
12927 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
12928 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
12929 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
12931 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_guid
));
12932 if (_ptr_domain_guid
) {
12933 NDR_PULL_ALLOC(ndr
, r
->in
.domain_guid
);
12935 r
->in
.domain_guid
= NULL
;
12937 if (r
->in
.domain_guid
) {
12938 _mem_save_domain_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12939 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_guid
, 0);
12940 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_guid
));
12941 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_guid_0
, 0);
12943 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_site_name
));
12944 if (_ptr_site_name
) {
12945 NDR_PULL_ALLOC(ndr
, r
->in
.site_name
);
12947 r
->in
.site_name
= NULL
;
12949 if (r
->in
.site_name
) {
12950 _mem_save_site_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12951 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.site_name
, 0);
12952 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.site_name
));
12953 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.site_name
));
12954 if (ndr_get_array_length(ndr
, &r
->in
.site_name
) > ndr_get_array_size(ndr
, &r
->in
.site_name
)) {
12955 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.site_name
), ndr_get_array_length(ndr
, &r
->in
.site_name
));
12957 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.site_name
), sizeof(uint16_t)));
12958 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.site_name
, ndr_get_array_length(ndr
, &r
->in
.site_name
), sizeof(uint16_t), CH_UTF16
));
12959 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_site_name_0
, 0);
12961 NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
12962 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
12963 ZERO_STRUCTP(r
->out
.info
);
12965 if (flags
& NDR_OUT
) {
12966 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12967 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
12969 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12970 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
12971 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
12973 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
12975 *r
->out
.info
= NULL
;
12977 if (*r
->out
.info
) {
12978 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12979 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
12980 NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
12981 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
12983 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
12984 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
12986 return NDR_ERR_SUCCESS
;
12989 _PUBLIC_
void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsRGetDCNameEx2
*r
)
12991 ndr_print_struct(ndr
, name
, "netr_DsRGetDCNameEx2");
12993 if (flags
& NDR_SET_VALUES
) {
12994 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12996 if (flags
& NDR_IN
) {
12997 ndr_print_struct(ndr
, "in", "netr_DsRGetDCNameEx2");
12999 ndr_print_ptr(ndr
, "server_unc", r
->in
.server_unc
);
13001 if (r
->in
.server_unc
) {
13002 ndr_print_string(ndr
, "server_unc", r
->in
.server_unc
);
13005 ndr_print_ptr(ndr
, "client_account", r
->in
.client_account
);
13007 if (r
->in
.client_account
) {
13008 ndr_print_string(ndr
, "client_account", r
->in
.client_account
);
13011 ndr_print_samr_AcctFlags(ndr
, "mask", r
->in
.mask
);
13012 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
13014 if (r
->in
.domain_name
) {
13015 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
13018 ndr_print_ptr(ndr
, "domain_guid", r
->in
.domain_guid
);
13020 if (r
->in
.domain_guid
) {
13021 ndr_print_GUID(ndr
, "domain_guid", r
->in
.domain_guid
);
13024 ndr_print_ptr(ndr
, "site_name", r
->in
.site_name
);
13026 if (r
->in
.site_name
) {
13027 ndr_print_string(ndr
, "site_name", r
->in
.site_name
);
13030 ndr_print_netr_DsRGetDCName_flags(ndr
, "flags", r
->in
.flags
);
13033 if (flags
& NDR_OUT
) {
13034 ndr_print_struct(ndr
, "out", "netr_DsRGetDCNameEx2");
13036 ndr_print_ptr(ndr
, "info", r
->out
.info
);
13038 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
13040 if (*r
->out
.info
) {
13041 ndr_print_netr_DsRGetDCNameInfo(ndr
, "info", *r
->out
.info
);
13045 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13051 static enum ndr_err_code
ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_push
*ndr
, int flags
, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
*r
)
13053 if (flags
& NDR_IN
) {
13055 if (flags
& NDR_OUT
) {
13056 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13058 return NDR_ERR_SUCCESS
;
13061 static enum ndr_err_code
ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_pull
*ndr
, int flags
, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
*r
)
13063 if (flags
& NDR_IN
) {
13065 if (flags
& NDR_OUT
) {
13066 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13068 return NDR_ERR_SUCCESS
;
13071 _PUBLIC_
void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
*r
)
13073 ndr_print_struct(ndr
, name
, "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
13075 if (flags
& NDR_SET_VALUES
) {
13076 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13078 if (flags
& NDR_IN
) {
13079 ndr_print_struct(ndr
, "in", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
13083 if (flags
& NDR_OUT
) {
13084 ndr_print_struct(ndr
, "out", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
13086 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13092 static enum ndr_err_code
ndr_push_netr_NetrEnumerateTrustedDomainsEx(struct ndr_push
*ndr
, int flags
, const struct netr_NetrEnumerateTrustedDomainsEx
*r
)
13094 if (flags
& NDR_IN
) {
13095 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
13096 if (r
->in
.server_name
) {
13097 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13098 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13099 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13100 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
));
13103 if (flags
& NDR_OUT
) {
13104 if (r
->out
.dom_trust_list
== NULL
) {
13105 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13107 NDR_CHECK(ndr_push_netr_DomainTrustList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.dom_trust_list
));
13108 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13110 return NDR_ERR_SUCCESS
;
13113 static enum ndr_err_code
ndr_pull_netr_NetrEnumerateTrustedDomainsEx(struct ndr_pull
*ndr
, int flags
, struct netr_NetrEnumerateTrustedDomainsEx
*r
)
13115 uint32_t _ptr_server_name
;
13116 TALLOC_CTX
*_mem_save_server_name_0
;
13117 TALLOC_CTX
*_mem_save_dom_trust_list_0
;
13118 if (flags
& NDR_IN
) {
13119 ZERO_STRUCT(r
->out
);
13121 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
13122 if (_ptr_server_name
) {
13123 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
13125 r
->in
.server_name
= NULL
;
13127 if (r
->in
.server_name
) {
13128 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13129 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
13130 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
13131 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
13132 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
13133 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
13135 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
13136 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
13137 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
13139 NDR_PULL_ALLOC(ndr
, r
->out
.dom_trust_list
);
13140 ZERO_STRUCTP(r
->out
.dom_trust_list
);
13142 if (flags
& NDR_OUT
) {
13143 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13144 NDR_PULL_ALLOC(ndr
, r
->out
.dom_trust_list
);
13146 _mem_save_dom_trust_list_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13147 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.dom_trust_list
, LIBNDR_FLAG_REF_ALLOC
);
13148 NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.dom_trust_list
));
13149 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_trust_list_0
, LIBNDR_FLAG_REF_ALLOC
);
13150 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13152 return NDR_ERR_SUCCESS
;
13155 _PUBLIC_
void ndr_print_netr_NetrEnumerateTrustedDomainsEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_NetrEnumerateTrustedDomainsEx
*r
)
13157 ndr_print_struct(ndr
, name
, "netr_NetrEnumerateTrustedDomainsEx");
13159 if (flags
& NDR_SET_VALUES
) {
13160 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13162 if (flags
& NDR_IN
) {
13163 ndr_print_struct(ndr
, "in", "netr_NetrEnumerateTrustedDomainsEx");
13165 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
13167 if (r
->in
.server_name
) {
13168 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
13173 if (flags
& NDR_OUT
) {
13174 ndr_print_struct(ndr
, "out", "netr_NetrEnumerateTrustedDomainsEx");
13176 ndr_print_ptr(ndr
, "dom_trust_list", r
->out
.dom_trust_list
);
13178 ndr_print_netr_DomainTrustList(ndr
, "dom_trust_list", r
->out
.dom_trust_list
);
13180 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13186 static enum ndr_err_code
ndr_push_netr_DsRAddressToSitenamesExW(struct ndr_push
*ndr
, int flags
, const struct netr_DsRAddressToSitenamesExW
*r
)
13188 uint32_t cntr_addresses_1
;
13189 if (flags
& NDR_IN
) {
13190 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
13191 if (r
->in
.server_name
) {
13192 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13193 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13194 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13195 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
));
13197 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
13198 if (r
->in
.addresses
== NULL
) {
13199 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13201 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
13202 for (cntr_addresses_1
= 0; cntr_addresses_1
< r
->in
.count
; cntr_addresses_1
++) {
13203 NDR_CHECK(ndr_push_netr_DsRAddress(ndr
, NDR_SCALARS
, &r
->in
.addresses
[cntr_addresses_1
]));
13205 for (cntr_addresses_1
= 0; cntr_addresses_1
< r
->in
.count
; cntr_addresses_1
++) {
13206 NDR_CHECK(ndr_push_netr_DsRAddress(ndr
, NDR_BUFFERS
, &r
->in
.addresses
[cntr_addresses_1
]));
13209 if (flags
& NDR_OUT
) {
13210 if (r
->out
.ctr
== NULL
) {
13211 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13213 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.ctr
));
13215 NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesExWCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.ctr
));
13217 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13219 return NDR_ERR_SUCCESS
;
13222 static enum ndr_err_code
ndr_pull_netr_DsRAddressToSitenamesExW(struct ndr_pull
*ndr
, int flags
, struct netr_DsRAddressToSitenamesExW
*r
)
13224 uint32_t _ptr_server_name
;
13225 uint32_t cntr_addresses_1
;
13227 TALLOC_CTX
*_mem_save_server_name_0
;
13228 TALLOC_CTX
*_mem_save_addresses_1
;
13229 TALLOC_CTX
*_mem_save_ctr_0
;
13230 TALLOC_CTX
*_mem_save_ctr_1
;
13231 if (flags
& NDR_IN
) {
13232 ZERO_STRUCT(r
->out
);
13234 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
13235 if (_ptr_server_name
) {
13236 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
13238 r
->in
.server_name
= NULL
;
13240 if (r
->in
.server_name
) {
13241 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13242 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
13243 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
13244 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
13245 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
13246 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
13248 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
13249 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
13250 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
13252 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
13253 if (r
->in
.count
< 0 || r
->in
.count
> 32000) {
13254 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
13256 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.addresses
));
13257 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13258 NDR_PULL_ALLOC_N(ndr
, r
->in
.addresses
, ndr_get_array_size(ndr
, &r
->in
.addresses
));
13260 _mem_save_addresses_1
= NDR_PULL_GET_MEM_CTX(ndr
);
13261 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.addresses
, 0);
13262 for (cntr_addresses_1
= 0; cntr_addresses_1
< r
->in
.count
; cntr_addresses_1
++) {
13263 NDR_CHECK(ndr_pull_netr_DsRAddress(ndr
, NDR_SCALARS
, &r
->in
.addresses
[cntr_addresses_1
]));
13265 for (cntr_addresses_1
= 0; cntr_addresses_1
< r
->in
.count
; cntr_addresses_1
++) {
13266 NDR_CHECK(ndr_pull_netr_DsRAddress(ndr
, NDR_BUFFERS
, &r
->in
.addresses
[cntr_addresses_1
]));
13268 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_addresses_1
, 0);
13269 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13270 ZERO_STRUCTP(r
->out
.ctr
);
13271 if (r
->in
.addresses
) {
13272 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.addresses
, r
->in
.count
));
13275 if (flags
& NDR_OUT
) {
13276 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13277 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13279 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13280 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
13281 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr
));
13283 NDR_PULL_ALLOC(ndr
, *r
->out
.ctr
);
13285 *r
->out
.ctr
= NULL
;
13288 _mem_save_ctr_1
= NDR_PULL_GET_MEM_CTX(ndr
);
13289 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.ctr
, 0);
13290 NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesExWCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.ctr
));
13291 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_1
, 0);
13293 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
13294 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13296 return NDR_ERR_SUCCESS
;
13299 _PUBLIC_
void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsRAddressToSitenamesExW
*r
)
13301 uint32_t cntr_addresses_1
;
13302 ndr_print_struct(ndr
, name
, "netr_DsRAddressToSitenamesExW");
13304 if (flags
& NDR_SET_VALUES
) {
13305 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13307 if (flags
& NDR_IN
) {
13308 ndr_print_struct(ndr
, "in", "netr_DsRAddressToSitenamesExW");
13310 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
13312 if (r
->in
.server_name
) {
13313 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
13316 ndr_print_uint32(ndr
, "count", r
->in
.count
);
13317 ndr_print_ptr(ndr
, "addresses", r
->in
.addresses
);
13319 ndr
->print(ndr
, "%s: ARRAY(%d)", "addresses", r
->in
.count
);
13321 for (cntr_addresses_1
=0;cntr_addresses_1
<r
->in
.count
;cntr_addresses_1
++) {
13323 if (asprintf(&idx_1
, "[%d]", cntr_addresses_1
) != -1) {
13324 ndr_print_netr_DsRAddress(ndr
, "addresses", &r
->in
.addresses
[cntr_addresses_1
]);
13332 if (flags
& NDR_OUT
) {
13333 ndr_print_struct(ndr
, "out", "netr_DsRAddressToSitenamesExW");
13335 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
13337 ndr_print_ptr(ndr
, "ctr", *r
->out
.ctr
);
13340 ndr_print_netr_DsRAddressToSitenamesExWCtr(ndr
, "ctr", *r
->out
.ctr
);
13344 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13350 static enum ndr_err_code
ndr_push_netr_DsrGetDcSiteCoverageW(struct ndr_push
*ndr
, int flags
, const struct netr_DsrGetDcSiteCoverageW
*r
)
13352 if (flags
& NDR_IN
) {
13353 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
13354 if (r
->in
.server_name
) {
13355 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13356 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13357 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13358 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
));
13361 if (flags
& NDR_OUT
) {
13362 if (r
->out
.ctr
== NULL
) {
13363 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13365 NDR_CHECK(ndr_push_DcSitesCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13366 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13368 return NDR_ERR_SUCCESS
;
13371 static enum ndr_err_code
ndr_pull_netr_DsrGetDcSiteCoverageW(struct ndr_pull
*ndr
, int flags
, struct netr_DsrGetDcSiteCoverageW
*r
)
13373 uint32_t _ptr_server_name
;
13374 TALLOC_CTX
*_mem_save_server_name_0
;
13375 TALLOC_CTX
*_mem_save_ctr_0
;
13376 if (flags
& NDR_IN
) {
13377 ZERO_STRUCT(r
->out
);
13379 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
13380 if (_ptr_server_name
) {
13381 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
13383 r
->in
.server_name
= NULL
;
13385 if (r
->in
.server_name
) {
13386 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13387 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
13388 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
13389 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
13390 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
13391 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
13393 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
13394 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
13395 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
13397 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13398 ZERO_STRUCTP(r
->out
.ctr
);
13400 if (flags
& NDR_OUT
) {
13401 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13402 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
13404 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13405 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
13406 NDR_CHECK(ndr_pull_DcSitesCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
13407 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
13408 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13410 return NDR_ERR_SUCCESS
;
13413 _PUBLIC_
void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsrGetDcSiteCoverageW
*r
)
13415 ndr_print_struct(ndr
, name
, "netr_DsrGetDcSiteCoverageW");
13417 if (flags
& NDR_SET_VALUES
) {
13418 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13420 if (flags
& NDR_IN
) {
13421 ndr_print_struct(ndr
, "in", "netr_DsrGetDcSiteCoverageW");
13423 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
13425 if (r
->in
.server_name
) {
13426 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
13431 if (flags
& NDR_OUT
) {
13432 ndr_print_struct(ndr
, "out", "netr_DsrGetDcSiteCoverageW");
13434 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
13436 ndr_print_DcSitesCtr(ndr
, "ctr", r
->out
.ctr
);
13438 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13444 static enum ndr_err_code
ndr_push_netr_LogonSamLogonEx(struct ndr_push
*ndr
, int flags
, const struct netr_LogonSamLogonEx
*r
)
13446 if (flags
& NDR_IN
) {
13447 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
13448 if (r
->in
.server_name
) {
13449 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13450 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13451 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13452 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
));
13454 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.computer_name
));
13455 if (r
->in
.computer_name
) {
13456 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
13457 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13458 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
13459 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
));
13461 NDR_CHECK(ndr_push_netr_LogonLevel(ndr
, NDR_SCALARS
, r
->in
.logon_level
));
13462 if (r
->in
.logon
== NULL
) {
13463 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13465 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.logon
, r
->in
.logon_level
));
13466 NDR_CHECK(ndr_push_netr_LogonInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logon
));
13467 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.validation_level
));
13468 if (r
->in
.flags
== NULL
) {
13469 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13471 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.flags
));
13473 if (flags
& NDR_OUT
) {
13474 if (r
->out
.validation
== NULL
) {
13475 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13477 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.validation
, r
->in
.validation_level
));
13478 NDR_CHECK(ndr_push_netr_Validation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.validation
));
13479 if (r
->out
.authoritative
== NULL
) {
13480 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13482 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->out
.authoritative
));
13483 if (r
->out
.flags
== NULL
) {
13484 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13486 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.flags
));
13487 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
13489 return NDR_ERR_SUCCESS
;
13492 static enum ndr_err_code
ndr_pull_netr_LogonSamLogonEx(struct ndr_pull
*ndr
, int flags
, struct netr_LogonSamLogonEx
*r
)
13494 uint32_t _ptr_server_name
;
13495 uint32_t _ptr_computer_name
;
13496 TALLOC_CTX
*_mem_save_server_name_0
;
13497 TALLOC_CTX
*_mem_save_computer_name_0
;
13498 TALLOC_CTX
*_mem_save_logon_0
;
13499 TALLOC_CTX
*_mem_save_validation_0
;
13500 TALLOC_CTX
*_mem_save_authoritative_0
;
13501 TALLOC_CTX
*_mem_save_flags_0
;
13502 if (flags
& NDR_IN
) {
13503 ZERO_STRUCT(r
->out
);
13505 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
13506 if (_ptr_server_name
) {
13507 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
13509 r
->in
.server_name
= NULL
;
13511 if (r
->in
.server_name
) {
13512 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13513 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
13514 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
13515 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
13516 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
13517 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
13519 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
13520 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
13521 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
13523 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_name
));
13524 if (_ptr_computer_name
) {
13525 NDR_PULL_ALLOC(ndr
, r
->in
.computer_name
);
13527 r
->in
.computer_name
= NULL
;
13529 if (r
->in
.computer_name
) {
13530 _mem_save_computer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13531 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.computer_name
, 0);
13532 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
13533 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
13534 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
13535 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
13537 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
13538 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
13539 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_name_0
, 0);
13541 NDR_CHECK(ndr_pull_netr_LogonLevel(ndr
, NDR_SCALARS
, &r
->in
.logon_level
));
13542 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13543 NDR_PULL_ALLOC(ndr
, r
->in
.logon
);
13545 _mem_save_logon_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13546 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logon
, LIBNDR_FLAG_REF_ALLOC
);
13547 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.logon
, r
->in
.logon_level
));
13548 NDR_CHECK(ndr_pull_netr_LogonInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logon
));
13549 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_0
, LIBNDR_FLAG_REF_ALLOC
);
13550 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.validation_level
));
13551 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13552 NDR_PULL_ALLOC(ndr
, r
->in
.flags
);
13554 _mem_save_flags_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13555 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.flags
, LIBNDR_FLAG_REF_ALLOC
);
13556 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
13557 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_flags_0
, LIBNDR_FLAG_REF_ALLOC
);
13558 NDR_PULL_ALLOC(ndr
, r
->out
.validation
);
13559 ZERO_STRUCTP(r
->out
.validation
);
13560 NDR_PULL_ALLOC(ndr
, r
->out
.authoritative
);
13561 ZERO_STRUCTP(r
->out
.authoritative
);
13562 NDR_PULL_ALLOC(ndr
, r
->out
.flags
);
13563 *r
->out
.flags
= *r
->in
.flags
;
13565 if (flags
& NDR_OUT
) {
13566 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13567 NDR_PULL_ALLOC(ndr
, r
->out
.validation
);
13569 _mem_save_validation_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13570 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.validation
, LIBNDR_FLAG_REF_ALLOC
);
13571 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.validation
, r
->in
.validation_level
));
13572 NDR_CHECK(ndr_pull_netr_Validation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.validation
));
13573 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_validation_0
, LIBNDR_FLAG_REF_ALLOC
);
13574 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13575 NDR_PULL_ALLOC(ndr
, r
->out
.authoritative
);
13577 _mem_save_authoritative_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13578 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.authoritative
, LIBNDR_FLAG_REF_ALLOC
);
13579 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->out
.authoritative
));
13580 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authoritative_0
, LIBNDR_FLAG_REF_ALLOC
);
13581 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13582 NDR_PULL_ALLOC(ndr
, r
->out
.flags
);
13584 _mem_save_flags_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13585 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.flags
, LIBNDR_FLAG_REF_ALLOC
);
13586 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.flags
));
13587 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_flags_0
, LIBNDR_FLAG_REF_ALLOC
);
13588 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
13590 return NDR_ERR_SUCCESS
;
13593 _PUBLIC_
void ndr_print_netr_LogonSamLogonEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonSamLogonEx
*r
)
13595 ndr_print_struct(ndr
, name
, "netr_LogonSamLogonEx");
13597 if (flags
& NDR_SET_VALUES
) {
13598 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13600 if (flags
& NDR_IN
) {
13601 ndr_print_struct(ndr
, "in", "netr_LogonSamLogonEx");
13603 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
13605 if (r
->in
.server_name
) {
13606 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
13609 ndr_print_ptr(ndr
, "computer_name", r
->in
.computer_name
);
13611 if (r
->in
.computer_name
) {
13612 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
13615 ndr_print_netr_LogonLevel(ndr
, "logon_level", r
->in
.logon_level
);
13616 ndr_print_ptr(ndr
, "logon", r
->in
.logon
);
13618 ndr_print_set_switch_value(ndr
, r
->in
.logon
, r
->in
.logon_level
);
13619 ndr_print_netr_LogonInfo(ndr
, "logon", r
->in
.logon
);
13621 ndr_print_uint16(ndr
, "validation_level", r
->in
.validation_level
);
13622 ndr_print_ptr(ndr
, "flags", r
->in
.flags
);
13624 ndr_print_uint32(ndr
, "flags", *r
->in
.flags
);
13628 if (flags
& NDR_OUT
) {
13629 ndr_print_struct(ndr
, "out", "netr_LogonSamLogonEx");
13631 ndr_print_ptr(ndr
, "validation", r
->out
.validation
);
13633 ndr_print_set_switch_value(ndr
, r
->out
.validation
, r
->in
.validation_level
);
13634 ndr_print_netr_Validation(ndr
, "validation", r
->out
.validation
);
13636 ndr_print_ptr(ndr
, "authoritative", r
->out
.authoritative
);
13638 ndr_print_uint8(ndr
, "authoritative", *r
->out
.authoritative
);
13640 ndr_print_ptr(ndr
, "flags", r
->out
.flags
);
13642 ndr_print_uint32(ndr
, "flags", *r
->out
.flags
);
13644 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
13650 static enum ndr_err_code
ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push
*ndr
, int flags
, const struct netr_DsrEnumerateDomainTrusts
*r
)
13652 if (flags
& NDR_IN
) {
13653 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
13654 if (r
->in
.server_name
) {
13655 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13656 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13657 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13658 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
));
13660 NDR_CHECK(ndr_push_netr_TrustFlags(ndr
, NDR_SCALARS
, r
->in
.trust_flags
));
13662 if (flags
& NDR_OUT
) {
13663 if (r
->out
.trusts
== NULL
) {
13664 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13666 NDR_CHECK(ndr_push_netr_DomainTrustList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.trusts
));
13667 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13669 return NDR_ERR_SUCCESS
;
13672 static enum ndr_err_code
ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull
*ndr
, int flags
, struct netr_DsrEnumerateDomainTrusts
*r
)
13674 uint32_t _ptr_server_name
;
13675 TALLOC_CTX
*_mem_save_server_name_0
;
13676 TALLOC_CTX
*_mem_save_trusts_0
;
13677 if (flags
& NDR_IN
) {
13678 ZERO_STRUCT(r
->out
);
13680 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
13681 if (_ptr_server_name
) {
13682 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
13684 r
->in
.server_name
= NULL
;
13686 if (r
->in
.server_name
) {
13687 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13688 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
13689 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
13690 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
13691 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
13692 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
13694 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
13695 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
13696 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
13698 NDR_CHECK(ndr_pull_netr_TrustFlags(ndr
, NDR_SCALARS
, &r
->in
.trust_flags
));
13699 NDR_PULL_ALLOC(ndr
, r
->out
.trusts
);
13700 ZERO_STRUCTP(r
->out
.trusts
);
13702 if (flags
& NDR_OUT
) {
13703 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
13704 NDR_PULL_ALLOC(ndr
, r
->out
.trusts
);
13706 _mem_save_trusts_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13707 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trusts
, LIBNDR_FLAG_REF_ALLOC
);
13708 NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.trusts
));
13709 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusts_0
, LIBNDR_FLAG_REF_ALLOC
);
13710 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13712 return NDR_ERR_SUCCESS
;
13715 _PUBLIC_
void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsrEnumerateDomainTrusts
*r
)
13717 ndr_print_struct(ndr
, name
, "netr_DsrEnumerateDomainTrusts");
13719 if (flags
& NDR_SET_VALUES
) {
13720 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13722 if (flags
& NDR_IN
) {
13723 ndr_print_struct(ndr
, "in", "netr_DsrEnumerateDomainTrusts");
13725 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
13727 if (r
->in
.server_name
) {
13728 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
13731 ndr_print_netr_TrustFlags(ndr
, "trust_flags", r
->in
.trust_flags
);
13734 if (flags
& NDR_OUT
) {
13735 ndr_print_struct(ndr
, "out", "netr_DsrEnumerateDomainTrusts");
13737 ndr_print_ptr(ndr
, "trusts", r
->out
.trusts
);
13739 ndr_print_netr_DomainTrustList(ndr
, "trusts", r
->out
.trusts
);
13741 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13747 static enum ndr_err_code
ndr_push_netr_DsrDeregisterDNSHostRecords(struct ndr_push
*ndr
, int flags
, const struct netr_DsrDeregisterDNSHostRecords
*r
)
13749 if (flags
& NDR_IN
) {
13750 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
13751 if (r
->in
.server_name
) {
13752 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13753 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13754 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13755 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
));
13757 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain
));
13758 if (r
->in
.domain
) {
13759 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain
, CH_UTF16
)));
13760 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13761 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain
, CH_UTF16
)));
13762 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.domain
, ndr_charset_length(r
->in
.domain
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
13764 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.domain_guid
));
13765 if (r
->in
.domain_guid
) {
13766 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_guid
));
13768 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.dsa_guid
));
13769 if (r
->in
.dsa_guid
) {
13770 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dsa_guid
));
13772 if (r
->in
.dns_host
== NULL
) {
13773 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13775 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_host
, CH_UTF16
)));
13776 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13777 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_host
, CH_UTF16
)));
13778 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
));
13780 if (flags
& NDR_OUT
) {
13781 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
13783 return NDR_ERR_SUCCESS
;
13786 static enum ndr_err_code
ndr_pull_netr_DsrDeregisterDNSHostRecords(struct ndr_pull
*ndr
, int flags
, struct netr_DsrDeregisterDNSHostRecords
*r
)
13788 uint32_t _ptr_server_name
;
13789 uint32_t _ptr_domain
;
13790 uint32_t _ptr_domain_guid
;
13791 uint32_t _ptr_dsa_guid
;
13792 TALLOC_CTX
*_mem_save_server_name_0
;
13793 TALLOC_CTX
*_mem_save_domain_0
;
13794 TALLOC_CTX
*_mem_save_domain_guid_0
;
13795 TALLOC_CTX
*_mem_save_dsa_guid_0
;
13796 if (flags
& NDR_IN
) {
13797 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
13798 if (_ptr_server_name
) {
13799 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
13801 r
->in
.server_name
= NULL
;
13803 if (r
->in
.server_name
) {
13804 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13805 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
13806 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
13807 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
13808 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
13809 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
13811 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
13812 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
13813 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
13815 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain
));
13817 NDR_PULL_ALLOC(ndr
, r
->in
.domain
);
13819 r
->in
.domain
= NULL
;
13821 if (r
->in
.domain
) {
13822 _mem_save_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13823 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain
, 0);
13824 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain
));
13825 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain
));
13826 if (ndr_get_array_length(ndr
, &r
->in
.domain
) > ndr_get_array_size(ndr
, &r
->in
.domain
)) {
13827 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain
), ndr_get_array_length(ndr
, &r
->in
.domain
));
13829 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain
), sizeof(uint16_t)));
13830 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain
, ndr_get_array_length(ndr
, &r
->in
.domain
), sizeof(uint16_t), CH_UTF16
));
13831 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_0
, 0);
13833 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_guid
));
13834 if (_ptr_domain_guid
) {
13835 NDR_PULL_ALLOC(ndr
, r
->in
.domain_guid
);
13837 r
->in
.domain_guid
= NULL
;
13839 if (r
->in
.domain_guid
) {
13840 _mem_save_domain_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13841 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.domain_guid
, 0);
13842 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.domain_guid
));
13843 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_guid_0
, 0);
13845 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dsa_guid
));
13846 if (_ptr_dsa_guid
) {
13847 NDR_PULL_ALLOC(ndr
, r
->in
.dsa_guid
);
13849 r
->in
.dsa_guid
= NULL
;
13851 if (r
->in
.dsa_guid
) {
13852 _mem_save_dsa_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13853 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dsa_guid
, 0);
13854 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dsa_guid
));
13855 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dsa_guid_0
, 0);
13857 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dns_host
));
13858 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dns_host
));
13859 if (ndr_get_array_length(ndr
, &r
->in
.dns_host
) > ndr_get_array_size(ndr
, &r
->in
.dns_host
)) {
13860 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.dns_host
), ndr_get_array_length(ndr
, &r
->in
.dns_host
));
13862 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dns_host
), sizeof(uint16_t)));
13863 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dns_host
, ndr_get_array_length(ndr
, &r
->in
.dns_host
), sizeof(uint16_t), CH_UTF16
));
13865 if (flags
& NDR_OUT
) {
13866 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
13868 return NDR_ERR_SUCCESS
;
13871 _PUBLIC_
void ndr_print_netr_DsrDeregisterDNSHostRecords(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsrDeregisterDNSHostRecords
*r
)
13873 ndr_print_struct(ndr
, name
, "netr_DsrDeregisterDNSHostRecords");
13875 if (flags
& NDR_SET_VALUES
) {
13876 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
13878 if (flags
& NDR_IN
) {
13879 ndr_print_struct(ndr
, "in", "netr_DsrDeregisterDNSHostRecords");
13881 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
13883 if (r
->in
.server_name
) {
13884 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
13887 ndr_print_ptr(ndr
, "domain", r
->in
.domain
);
13889 if (r
->in
.domain
) {
13890 ndr_print_string(ndr
, "domain", r
->in
.domain
);
13893 ndr_print_ptr(ndr
, "domain_guid", r
->in
.domain_guid
);
13895 if (r
->in
.domain_guid
) {
13896 ndr_print_GUID(ndr
, "domain_guid", r
->in
.domain_guid
);
13899 ndr_print_ptr(ndr
, "dsa_guid", r
->in
.dsa_guid
);
13901 if (r
->in
.dsa_guid
) {
13902 ndr_print_GUID(ndr
, "dsa_guid", r
->in
.dsa_guid
);
13905 ndr_print_ptr(ndr
, "dns_host", r
->in
.dns_host
);
13907 ndr_print_string(ndr
, "dns_host", r
->in
.dns_host
);
13911 if (flags
& NDR_OUT
) {
13912 ndr_print_struct(ndr
, "out", "netr_DsrDeregisterDNSHostRecords");
13914 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
13920 static enum ndr_err_code
ndr_push_netr_ServerTrustPasswordsGet(struct ndr_push
*ndr
, int flags
, const struct netr_ServerTrustPasswordsGet
*r
)
13922 if (flags
& NDR_IN
) {
13923 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
13924 if (r
->in
.server_name
) {
13925 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13926 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13927 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
13928 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
));
13930 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
13931 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13932 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
13933 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
));
13934 NDR_CHECK(ndr_push_netr_SchannelType(ndr
, NDR_SCALARS
, r
->in
.secure_channel_type
));
13935 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
13936 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
13937 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
13938 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
));
13939 if (r
->in
.credential
== NULL
) {
13940 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13942 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
13944 if (flags
& NDR_OUT
) {
13945 if (r
->out
.return_authenticator
== NULL
) {
13946 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13948 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
13949 if (r
->out
.password
== NULL
) {
13950 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13952 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.password
));
13953 if (r
->out
.password2
== NULL
) {
13954 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
13956 NDR_CHECK(ndr_push_samr_Password(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.password2
));
13957 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
13959 return NDR_ERR_SUCCESS
;
13962 static enum ndr_err_code
ndr_pull_netr_ServerTrustPasswordsGet(struct ndr_pull
*ndr
, int flags
, struct netr_ServerTrustPasswordsGet
*r
)
13964 uint32_t _ptr_server_name
;
13965 TALLOC_CTX
*_mem_save_server_name_0
;
13966 TALLOC_CTX
*_mem_save_credential_0
;
13967 TALLOC_CTX
*_mem_save_return_authenticator_0
;
13968 TALLOC_CTX
*_mem_save_password_0
;
13969 TALLOC_CTX
*_mem_save_password2_0
;
13970 if (flags
& NDR_IN
) {
13971 ZERO_STRUCT(r
->out
);
13973 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
13974 if (_ptr_server_name
) {
13975 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
13977 r
->in
.server_name
= NULL
;
13979 if (r
->in
.server_name
) {
13980 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13981 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
13982 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
13983 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
13984 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
13985 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
13987 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
13988 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
13989 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
13991 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
13992 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
13993 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
13994 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
13996 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
13997 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
13998 NDR_CHECK(ndr_pull_netr_SchannelType(ndr
, NDR_SCALARS
, &r
->in
.secure_channel_type
));
13999 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
14000 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
14001 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
14002 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
14004 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
14005 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
14006 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14007 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
14009 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14010 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, LIBNDR_FLAG_REF_ALLOC
);
14011 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
14012 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, LIBNDR_FLAG_REF_ALLOC
);
14013 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
14014 ZERO_STRUCTP(r
->out
.return_authenticator
);
14015 NDR_PULL_ALLOC(ndr
, r
->out
.password
);
14016 ZERO_STRUCTP(r
->out
.password
);
14017 NDR_PULL_ALLOC(ndr
, r
->out
.password2
);
14018 ZERO_STRUCTP(r
->out
.password2
);
14020 if (flags
& NDR_OUT
) {
14021 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14022 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
14024 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14025 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
14026 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
14027 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
14028 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14029 NDR_PULL_ALLOC(ndr
, r
->out
.password
);
14031 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14032 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.password
, LIBNDR_FLAG_REF_ALLOC
);
14033 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.password
));
14034 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, LIBNDR_FLAG_REF_ALLOC
);
14035 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14036 NDR_PULL_ALLOC(ndr
, r
->out
.password2
);
14038 _mem_save_password2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14039 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.password2
, LIBNDR_FLAG_REF_ALLOC
);
14040 NDR_CHECK(ndr_pull_samr_Password(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.password2
));
14041 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password2_0
, LIBNDR_FLAG_REF_ALLOC
);
14042 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
14044 return NDR_ERR_SUCCESS
;
14047 _PUBLIC_
void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_ServerTrustPasswordsGet
*r
)
14049 ndr_print_struct(ndr
, name
, "netr_ServerTrustPasswordsGet");
14051 if (flags
& NDR_SET_VALUES
) {
14052 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14054 if (flags
& NDR_IN
) {
14055 ndr_print_struct(ndr
, "in", "netr_ServerTrustPasswordsGet");
14057 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
14059 if (r
->in
.server_name
) {
14060 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
14063 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
14064 ndr_print_netr_SchannelType(ndr
, "secure_channel_type", r
->in
.secure_channel_type
);
14065 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
14066 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
14068 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
14072 if (flags
& NDR_OUT
) {
14073 ndr_print_struct(ndr
, "out", "netr_ServerTrustPasswordsGet");
14075 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
14077 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
14079 ndr_print_ptr(ndr
, "password", r
->out
.password
);
14081 ndr_print_samr_Password(ndr
, "password", r
->out
.password
);
14083 ndr_print_ptr(ndr
, "password2", r
->out
.password2
);
14085 ndr_print_samr_Password(ndr
, "password2", r
->out
.password2
);
14087 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
14093 static enum ndr_err_code
ndr_push_netr_DsRGetForestTrustInformation(struct ndr_push
*ndr
, int flags
, const struct netr_DsRGetForestTrustInformation
*r
)
14095 if (flags
& NDR_IN
) {
14096 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
14097 if (r
->in
.server_name
) {
14098 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
14099 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
14100 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
14101 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
));
14103 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.trusted_domain_name
));
14104 if (r
->in
.trusted_domain_name
) {
14105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.trusted_domain_name
, CH_UTF16
)));
14106 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
14107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.trusted_domain_name
, CH_UTF16
)));
14108 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
));
14110 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
14112 if (flags
& NDR_OUT
) {
14113 if (r
->out
.forest_trust_info
== NULL
) {
14114 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14116 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.forest_trust_info
));
14117 if (*r
->out
.forest_trust_info
) {
14118 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
14120 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14122 return NDR_ERR_SUCCESS
;
14125 static enum ndr_err_code
ndr_pull_netr_DsRGetForestTrustInformation(struct ndr_pull
*ndr
, int flags
, struct netr_DsRGetForestTrustInformation
*r
)
14127 uint32_t _ptr_server_name
;
14128 uint32_t _ptr_trusted_domain_name
;
14129 uint32_t _ptr_forest_trust_info
;
14130 TALLOC_CTX
*_mem_save_server_name_0
;
14131 TALLOC_CTX
*_mem_save_trusted_domain_name_0
;
14132 TALLOC_CTX
*_mem_save_forest_trust_info_0
;
14133 TALLOC_CTX
*_mem_save_forest_trust_info_1
;
14134 if (flags
& NDR_IN
) {
14135 ZERO_STRUCT(r
->out
);
14137 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
14138 if (_ptr_server_name
) {
14139 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
14141 r
->in
.server_name
= NULL
;
14143 if (r
->in
.server_name
) {
14144 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14145 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
14146 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
14147 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
14148 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
14149 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
14151 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
14152 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
14153 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
14155 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_trusted_domain_name
));
14156 if (_ptr_trusted_domain_name
) {
14157 NDR_PULL_ALLOC(ndr
, r
->in
.trusted_domain_name
);
14159 r
->in
.trusted_domain_name
= NULL
;
14161 if (r
->in
.trusted_domain_name
) {
14162 _mem_save_trusted_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14163 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trusted_domain_name
, 0);
14164 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.trusted_domain_name
));
14165 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.trusted_domain_name
));
14166 if (ndr_get_array_length(ndr
, &r
->in
.trusted_domain_name
) > ndr_get_array_size(ndr
, &r
->in
.trusted_domain_name
)) {
14167 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.trusted_domain_name
), ndr_get_array_length(ndr
, &r
->in
.trusted_domain_name
));
14169 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.trusted_domain_name
), sizeof(uint16_t)));
14170 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.trusted_domain_name
, ndr_get_array_length(ndr
, &r
->in
.trusted_domain_name
), sizeof(uint16_t), CH_UTF16
));
14171 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_name_0
, 0);
14173 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
14174 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
14175 ZERO_STRUCTP(r
->out
.forest_trust_info
);
14177 if (flags
& NDR_OUT
) {
14178 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14179 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
14181 _mem_save_forest_trust_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14182 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.forest_trust_info
, LIBNDR_FLAG_REF_ALLOC
);
14183 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_info
));
14184 if (_ptr_forest_trust_info
) {
14185 NDR_PULL_ALLOC(ndr
, *r
->out
.forest_trust_info
);
14187 *r
->out
.forest_trust_info
= NULL
;
14189 if (*r
->out
.forest_trust_info
) {
14190 _mem_save_forest_trust_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
14191 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.forest_trust_info
, 0);
14192 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
14193 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_1
, 0);
14195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_0
, LIBNDR_FLAG_REF_ALLOC
);
14196 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14198 return NDR_ERR_SUCCESS
;
14201 _PUBLIC_
void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_DsRGetForestTrustInformation
*r
)
14203 ndr_print_struct(ndr
, name
, "netr_DsRGetForestTrustInformation");
14205 if (flags
& NDR_SET_VALUES
) {
14206 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14208 if (flags
& NDR_IN
) {
14209 ndr_print_struct(ndr
, "in", "netr_DsRGetForestTrustInformation");
14211 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
14213 if (r
->in
.server_name
) {
14214 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
14217 ndr_print_ptr(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
14219 if (r
->in
.trusted_domain_name
) {
14220 ndr_print_string(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
14223 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
14226 if (flags
& NDR_OUT
) {
14227 ndr_print_struct(ndr
, "out", "netr_DsRGetForestTrustInformation");
14229 ndr_print_ptr(ndr
, "forest_trust_info", r
->out
.forest_trust_info
);
14231 ndr_print_ptr(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
14233 if (*r
->out
.forest_trust_info
) {
14234 ndr_print_lsa_ForestTrustInformation(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
14238 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14244 static enum ndr_err_code
ndr_push_netr_GetForestTrustInformation(struct ndr_push
*ndr
, int flags
, const struct netr_GetForestTrustInformation
*r
)
14246 if (flags
& NDR_IN
) {
14247 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
14248 if (r
->in
.server_name
) {
14249 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
14250 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
14251 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
14252 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
));
14254 if (r
->in
.trusted_domain_name
== NULL
) {
14255 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14257 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.trusted_domain_name
, CH_UTF16
)));
14258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
14259 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.trusted_domain_name
, CH_UTF16
)));
14260 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
));
14261 if (r
->in
.credential
== NULL
) {
14262 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14264 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
14265 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
14267 if (flags
& NDR_OUT
) {
14268 if (r
->out
.return_authenticator
== NULL
) {
14269 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14271 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
14272 if (r
->out
.forest_trust_info
== NULL
) {
14273 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14275 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.forest_trust_info
));
14276 if (*r
->out
.forest_trust_info
) {
14277 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
14279 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14281 return NDR_ERR_SUCCESS
;
14284 static enum ndr_err_code
ndr_pull_netr_GetForestTrustInformation(struct ndr_pull
*ndr
, int flags
, struct netr_GetForestTrustInformation
*r
)
14286 uint32_t _ptr_server_name
;
14287 uint32_t _ptr_forest_trust_info
;
14288 TALLOC_CTX
*_mem_save_server_name_0
;
14289 TALLOC_CTX
*_mem_save_credential_0
;
14290 TALLOC_CTX
*_mem_save_return_authenticator_0
;
14291 TALLOC_CTX
*_mem_save_forest_trust_info_0
;
14292 TALLOC_CTX
*_mem_save_forest_trust_info_1
;
14293 if (flags
& NDR_IN
) {
14294 ZERO_STRUCT(r
->out
);
14296 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
14297 if (_ptr_server_name
) {
14298 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
14300 r
->in
.server_name
= NULL
;
14302 if (r
->in
.server_name
) {
14303 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14304 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
14305 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
14306 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
14307 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
14308 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
14310 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
14311 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
14312 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
14314 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.trusted_domain_name
));
14315 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.trusted_domain_name
));
14316 if (ndr_get_array_length(ndr
, &r
->in
.trusted_domain_name
) > ndr_get_array_size(ndr
, &r
->in
.trusted_domain_name
)) {
14317 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.trusted_domain_name
), ndr_get_array_length(ndr
, &r
->in
.trusted_domain_name
));
14319 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.trusted_domain_name
), sizeof(uint16_t)));
14320 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.trusted_domain_name
, ndr_get_array_length(ndr
, &r
->in
.trusted_domain_name
), sizeof(uint16_t), CH_UTF16
));
14321 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14322 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
14324 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14325 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, LIBNDR_FLAG_REF_ALLOC
);
14326 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
14327 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, LIBNDR_FLAG_REF_ALLOC
);
14328 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
14329 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
14330 ZERO_STRUCTP(r
->out
.return_authenticator
);
14331 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
14332 ZERO_STRUCTP(r
->out
.forest_trust_info
);
14334 if (flags
& NDR_OUT
) {
14335 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14336 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
14338 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14339 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, LIBNDR_FLAG_REF_ALLOC
);
14340 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
14341 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, LIBNDR_FLAG_REF_ALLOC
);
14342 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14343 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
14345 _mem_save_forest_trust_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14346 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.forest_trust_info
, LIBNDR_FLAG_REF_ALLOC
);
14347 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_info
));
14348 if (_ptr_forest_trust_info
) {
14349 NDR_PULL_ALLOC(ndr
, *r
->out
.forest_trust_info
);
14351 *r
->out
.forest_trust_info
= NULL
;
14353 if (*r
->out
.forest_trust_info
) {
14354 _mem_save_forest_trust_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
14355 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.forest_trust_info
, 0);
14356 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
14357 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_1
, 0);
14359 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_0
, LIBNDR_FLAG_REF_ALLOC
);
14360 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14362 return NDR_ERR_SUCCESS
;
14365 _PUBLIC_
void ndr_print_netr_GetForestTrustInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_GetForestTrustInformation
*r
)
14367 ndr_print_struct(ndr
, name
, "netr_GetForestTrustInformation");
14369 if (flags
& NDR_SET_VALUES
) {
14370 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14372 if (flags
& NDR_IN
) {
14373 ndr_print_struct(ndr
, "in", "netr_GetForestTrustInformation");
14375 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
14377 if (r
->in
.server_name
) {
14378 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
14381 ndr_print_ptr(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
14383 ndr_print_string(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
14385 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
14387 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
14389 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
14392 if (flags
& NDR_OUT
) {
14393 ndr_print_struct(ndr
, "out", "netr_GetForestTrustInformation");
14395 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
14397 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
14399 ndr_print_ptr(ndr
, "forest_trust_info", r
->out
.forest_trust_info
);
14401 ndr_print_ptr(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
14403 if (*r
->out
.forest_trust_info
) {
14404 ndr_print_lsa_ForestTrustInformation(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
14408 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14414 static enum ndr_err_code
ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push
*ndr
, int flags
, const struct netr_LogonSamLogonWithFlags
*r
)
14416 if (flags
& NDR_IN
) {
14417 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
14418 if (r
->in
.server_name
) {
14419 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
14420 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
14421 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
14422 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
));
14424 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.computer_name
));
14425 if (r
->in
.computer_name
) {
14426 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
14427 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
14428 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.computer_name
, CH_UTF16
)));
14429 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
));
14431 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.credential
));
14432 if (r
->in
.credential
) {
14433 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
14435 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.return_authenticator
));
14436 if (r
->in
.return_authenticator
) {
14437 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
14439 NDR_CHECK(ndr_push_netr_LogonLevel(ndr
, NDR_SCALARS
, r
->in
.logon_level
));
14440 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.logon
, r
->in
.logon_level
));
14441 NDR_CHECK(ndr_push_netr_LogonInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.logon
));
14442 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.validation_level
));
14443 if (r
->in
.flags
== NULL
) {
14444 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14446 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.flags
));
14448 if (flags
& NDR_OUT
) {
14449 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.return_authenticator
));
14450 if (r
->out
.return_authenticator
) {
14451 NDR_CHECK(ndr_push_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
14453 if (r
->out
.validation
== NULL
) {
14454 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14456 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.validation
, r
->in
.validation_level
));
14457 NDR_CHECK(ndr_push_netr_Validation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.validation
));
14458 if (r
->out
.authoritative
== NULL
) {
14459 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14461 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->out
.authoritative
));
14462 if (r
->out
.flags
== NULL
) {
14463 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
14465 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.flags
));
14466 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
14468 return NDR_ERR_SUCCESS
;
14471 static enum ndr_err_code
ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull
*ndr
, int flags
, struct netr_LogonSamLogonWithFlags
*r
)
14473 uint32_t _ptr_server_name
;
14474 uint32_t _ptr_computer_name
;
14475 uint32_t _ptr_credential
;
14476 uint32_t _ptr_return_authenticator
;
14477 TALLOC_CTX
*_mem_save_server_name_0
;
14478 TALLOC_CTX
*_mem_save_computer_name_0
;
14479 TALLOC_CTX
*_mem_save_credential_0
;
14480 TALLOC_CTX
*_mem_save_return_authenticator_0
;
14481 TALLOC_CTX
*_mem_save_validation_0
;
14482 TALLOC_CTX
*_mem_save_authoritative_0
;
14483 TALLOC_CTX
*_mem_save_flags_0
;
14484 if (flags
& NDR_IN
) {
14485 ZERO_STRUCT(r
->out
);
14487 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
14488 if (_ptr_server_name
) {
14489 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
14491 r
->in
.server_name
= NULL
;
14493 if (r
->in
.server_name
) {
14494 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14495 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
14496 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
14497 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
14498 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
14499 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
14501 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
14502 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
14503 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
14505 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_name
));
14506 if (_ptr_computer_name
) {
14507 NDR_PULL_ALLOC(ndr
, r
->in
.computer_name
);
14509 r
->in
.computer_name
= NULL
;
14511 if (r
->in
.computer_name
) {
14512 _mem_save_computer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14513 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.computer_name
, 0);
14514 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.computer_name
));
14515 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.computer_name
));
14516 if (ndr_get_array_length(ndr
, &r
->in
.computer_name
) > ndr_get_array_size(ndr
, &r
->in
.computer_name
)) {
14517 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.computer_name
), ndr_get_array_length(ndr
, &r
->in
.computer_name
));
14519 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t)));
14520 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.computer_name
, ndr_get_array_length(ndr
, &r
->in
.computer_name
), sizeof(uint16_t), CH_UTF16
));
14521 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_name_0
, 0);
14523 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_credential
));
14524 if (_ptr_credential
) {
14525 NDR_PULL_ALLOC(ndr
, r
->in
.credential
);
14527 r
->in
.credential
= NULL
;
14529 if (r
->in
.credential
) {
14530 _mem_save_credential_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14531 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.credential
, 0);
14532 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.credential
));
14533 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_credential_0
, 0);
14535 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_return_authenticator
));
14536 if (_ptr_return_authenticator
) {
14537 NDR_PULL_ALLOC(ndr
, r
->in
.return_authenticator
);
14539 r
->in
.return_authenticator
= NULL
;
14541 if (r
->in
.return_authenticator
) {
14542 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14543 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.return_authenticator
, 0);
14544 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->in
.return_authenticator
));
14545 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, 0);
14547 NDR_CHECK(ndr_pull_netr_LogonLevel(ndr
, NDR_SCALARS
, &r
->in
.logon_level
));
14548 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.logon
, r
->in
.logon_level
));
14549 NDR_CHECK(ndr_pull_netr_LogonInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.logon
));
14550 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.validation_level
));
14551 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14552 NDR_PULL_ALLOC(ndr
, r
->in
.flags
);
14554 _mem_save_flags_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14555 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.flags
, LIBNDR_FLAG_REF_ALLOC
);
14556 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
14557 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_flags_0
, LIBNDR_FLAG_REF_ALLOC
);
14558 NDR_PULL_ALLOC(ndr
, r
->out
.validation
);
14559 ZERO_STRUCTP(r
->out
.validation
);
14560 NDR_PULL_ALLOC(ndr
, r
->out
.authoritative
);
14561 ZERO_STRUCTP(r
->out
.authoritative
);
14562 NDR_PULL_ALLOC(ndr
, r
->out
.flags
);
14563 *r
->out
.flags
= *r
->in
.flags
;
14565 if (flags
& NDR_OUT
) {
14566 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_return_authenticator
));
14567 if (_ptr_return_authenticator
) {
14568 NDR_PULL_ALLOC(ndr
, r
->out
.return_authenticator
);
14570 r
->out
.return_authenticator
= NULL
;
14572 if (r
->out
.return_authenticator
) {
14573 _mem_save_return_authenticator_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14574 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.return_authenticator
, 0);
14575 NDR_CHECK(ndr_pull_netr_Authenticator(ndr
, NDR_SCALARS
, r
->out
.return_authenticator
));
14576 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_return_authenticator_0
, 0);
14578 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14579 NDR_PULL_ALLOC(ndr
, r
->out
.validation
);
14581 _mem_save_validation_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14582 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.validation
, LIBNDR_FLAG_REF_ALLOC
);
14583 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.validation
, r
->in
.validation_level
));
14584 NDR_CHECK(ndr_pull_netr_Validation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.validation
));
14585 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_validation_0
, LIBNDR_FLAG_REF_ALLOC
);
14586 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14587 NDR_PULL_ALLOC(ndr
, r
->out
.authoritative
);
14589 _mem_save_authoritative_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14590 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.authoritative
, LIBNDR_FLAG_REF_ALLOC
);
14591 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->out
.authoritative
));
14592 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authoritative_0
, LIBNDR_FLAG_REF_ALLOC
);
14593 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
14594 NDR_PULL_ALLOC(ndr
, r
->out
.flags
);
14596 _mem_save_flags_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14597 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.flags
, LIBNDR_FLAG_REF_ALLOC
);
14598 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.flags
));
14599 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_flags_0
, LIBNDR_FLAG_REF_ALLOC
);
14600 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
14602 return NDR_ERR_SUCCESS
;
14605 _PUBLIC_
void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_LogonSamLogonWithFlags
*r
)
14607 ndr_print_struct(ndr
, name
, "netr_LogonSamLogonWithFlags");
14609 if (flags
& NDR_SET_VALUES
) {
14610 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14612 if (flags
& NDR_IN
) {
14613 ndr_print_struct(ndr
, "in", "netr_LogonSamLogonWithFlags");
14615 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
14617 if (r
->in
.server_name
) {
14618 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
14621 ndr_print_ptr(ndr
, "computer_name", r
->in
.computer_name
);
14623 if (r
->in
.computer_name
) {
14624 ndr_print_string(ndr
, "computer_name", r
->in
.computer_name
);
14627 ndr_print_ptr(ndr
, "credential", r
->in
.credential
);
14629 if (r
->in
.credential
) {
14630 ndr_print_netr_Authenticator(ndr
, "credential", r
->in
.credential
);
14633 ndr_print_ptr(ndr
, "return_authenticator", r
->in
.return_authenticator
);
14635 if (r
->in
.return_authenticator
) {
14636 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->in
.return_authenticator
);
14639 ndr_print_netr_LogonLevel(ndr
, "logon_level", r
->in
.logon_level
);
14640 ndr_print_set_switch_value(ndr
, &r
->in
.logon
, r
->in
.logon_level
);
14641 ndr_print_netr_LogonInfo(ndr
, "logon", &r
->in
.logon
);
14642 ndr_print_uint16(ndr
, "validation_level", r
->in
.validation_level
);
14643 ndr_print_ptr(ndr
, "flags", r
->in
.flags
);
14645 ndr_print_uint32(ndr
, "flags", *r
->in
.flags
);
14649 if (flags
& NDR_OUT
) {
14650 ndr_print_struct(ndr
, "out", "netr_LogonSamLogonWithFlags");
14652 ndr_print_ptr(ndr
, "return_authenticator", r
->out
.return_authenticator
);
14654 if (r
->out
.return_authenticator
) {
14655 ndr_print_netr_Authenticator(ndr
, "return_authenticator", r
->out
.return_authenticator
);
14658 ndr_print_ptr(ndr
, "validation", r
->out
.validation
);
14660 ndr_print_set_switch_value(ndr
, r
->out
.validation
, r
->in
.validation_level
);
14661 ndr_print_netr_Validation(ndr
, "validation", r
->out
.validation
);
14663 ndr_print_ptr(ndr
, "authoritative", r
->out
.authoritative
);
14665 ndr_print_uint8(ndr
, "authoritative", *r
->out
.authoritative
);
14667 ndr_print_ptr(ndr
, "flags", r
->out
.flags
);
14669 ndr_print_uint32(ndr
, "flags", *r
->out
.flags
);
14671 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
14677 static enum ndr_err_code
ndr_push_netr_NETRSERVERGETTRUSTINFO(struct ndr_push
*ndr
, int flags
, const struct netr_NETRSERVERGETTRUSTINFO
*r
)
14679 if (flags
& NDR_IN
) {
14681 if (flags
& NDR_OUT
) {
14682 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
14684 return NDR_ERR_SUCCESS
;
14687 static enum ndr_err_code
ndr_pull_netr_NETRSERVERGETTRUSTINFO(struct ndr_pull
*ndr
, int flags
, struct netr_NETRSERVERGETTRUSTINFO
*r
)
14689 if (flags
& NDR_IN
) {
14691 if (flags
& NDR_OUT
) {
14692 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
14694 return NDR_ERR_SUCCESS
;
14697 _PUBLIC_
void ndr_print_netr_NETRSERVERGETTRUSTINFO(struct ndr_print
*ndr
, const char *name
, int flags
, const struct netr_NETRSERVERGETTRUSTINFO
*r
)
14699 ndr_print_struct(ndr
, name
, "netr_NETRSERVERGETTRUSTINFO");
14701 if (flags
& NDR_SET_VALUES
) {
14702 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
14704 if (flags
& NDR_IN
) {
14705 ndr_print_struct(ndr
, "in", "netr_NETRSERVERGETTRUSTINFO");
14709 if (flags
& NDR_OUT
) {
14710 ndr_print_struct(ndr
, "out", "netr_NETRSERVERGETTRUSTINFO");
14712 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
14718 static const struct ndr_interface_call netlogon_calls
[] = {
14720 "netr_LogonUasLogon",
14721 sizeof(struct netr_LogonUasLogon
),
14722 (ndr_push_flags_fn_t
) ndr_push_netr_LogonUasLogon
,
14723 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonUasLogon
,
14724 (ndr_print_function_t
) ndr_print_netr_LogonUasLogon
,
14728 "netr_LogonUasLogoff",
14729 sizeof(struct netr_LogonUasLogoff
),
14730 (ndr_push_flags_fn_t
) ndr_push_netr_LogonUasLogoff
,
14731 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonUasLogoff
,
14732 (ndr_print_function_t
) ndr_print_netr_LogonUasLogoff
,
14736 "netr_LogonSamLogon",
14737 sizeof(struct netr_LogonSamLogon
),
14738 (ndr_push_flags_fn_t
) ndr_push_netr_LogonSamLogon
,
14739 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonSamLogon
,
14740 (ndr_print_function_t
) ndr_print_netr_LogonSamLogon
,
14744 "netr_LogonSamLogoff",
14745 sizeof(struct netr_LogonSamLogoff
),
14746 (ndr_push_flags_fn_t
) ndr_push_netr_LogonSamLogoff
,
14747 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonSamLogoff
,
14748 (ndr_print_function_t
) ndr_print_netr_LogonSamLogoff
,
14752 "netr_ServerReqChallenge",
14753 sizeof(struct netr_ServerReqChallenge
),
14754 (ndr_push_flags_fn_t
) ndr_push_netr_ServerReqChallenge
,
14755 (ndr_pull_flags_fn_t
) ndr_pull_netr_ServerReqChallenge
,
14756 (ndr_print_function_t
) ndr_print_netr_ServerReqChallenge
,
14760 "netr_ServerAuthenticate",
14761 sizeof(struct netr_ServerAuthenticate
),
14762 (ndr_push_flags_fn_t
) ndr_push_netr_ServerAuthenticate
,
14763 (ndr_pull_flags_fn_t
) ndr_pull_netr_ServerAuthenticate
,
14764 (ndr_print_function_t
) ndr_print_netr_ServerAuthenticate
,
14768 "netr_ServerPasswordSet",
14769 sizeof(struct netr_ServerPasswordSet
),
14770 (ndr_push_flags_fn_t
) ndr_push_netr_ServerPasswordSet
,
14771 (ndr_pull_flags_fn_t
) ndr_pull_netr_ServerPasswordSet
,
14772 (ndr_print_function_t
) ndr_print_netr_ServerPasswordSet
,
14776 "netr_DatabaseDeltas",
14777 sizeof(struct netr_DatabaseDeltas
),
14778 (ndr_push_flags_fn_t
) ndr_push_netr_DatabaseDeltas
,
14779 (ndr_pull_flags_fn_t
) ndr_pull_netr_DatabaseDeltas
,
14780 (ndr_print_function_t
) ndr_print_netr_DatabaseDeltas
,
14784 "netr_DatabaseSync",
14785 sizeof(struct netr_DatabaseSync
),
14786 (ndr_push_flags_fn_t
) ndr_push_netr_DatabaseSync
,
14787 (ndr_pull_flags_fn_t
) ndr_pull_netr_DatabaseSync
,
14788 (ndr_print_function_t
) ndr_print_netr_DatabaseSync
,
14792 "netr_AccountDeltas",
14793 sizeof(struct netr_AccountDeltas
),
14794 (ndr_push_flags_fn_t
) ndr_push_netr_AccountDeltas
,
14795 (ndr_pull_flags_fn_t
) ndr_pull_netr_AccountDeltas
,
14796 (ndr_print_function_t
) ndr_print_netr_AccountDeltas
,
14800 "netr_AccountSync",
14801 sizeof(struct netr_AccountSync
),
14802 (ndr_push_flags_fn_t
) ndr_push_netr_AccountSync
,
14803 (ndr_pull_flags_fn_t
) ndr_pull_netr_AccountSync
,
14804 (ndr_print_function_t
) ndr_print_netr_AccountSync
,
14809 sizeof(struct netr_GetDcName
),
14810 (ndr_push_flags_fn_t
) ndr_push_netr_GetDcName
,
14811 (ndr_pull_flags_fn_t
) ndr_pull_netr_GetDcName
,
14812 (ndr_print_function_t
) ndr_print_netr_GetDcName
,
14816 "netr_LogonControl",
14817 sizeof(struct netr_LogonControl
),
14818 (ndr_push_flags_fn_t
) ndr_push_netr_LogonControl
,
14819 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonControl
,
14820 (ndr_print_function_t
) ndr_print_netr_LogonControl
,
14824 "netr_GetAnyDCName",
14825 sizeof(struct netr_GetAnyDCName
),
14826 (ndr_push_flags_fn_t
) ndr_push_netr_GetAnyDCName
,
14827 (ndr_pull_flags_fn_t
) ndr_pull_netr_GetAnyDCName
,
14828 (ndr_print_function_t
) ndr_print_netr_GetAnyDCName
,
14832 "netr_LogonControl2",
14833 sizeof(struct netr_LogonControl2
),
14834 (ndr_push_flags_fn_t
) ndr_push_netr_LogonControl2
,
14835 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonControl2
,
14836 (ndr_print_function_t
) ndr_print_netr_LogonControl2
,
14840 "netr_ServerAuthenticate2",
14841 sizeof(struct netr_ServerAuthenticate2
),
14842 (ndr_push_flags_fn_t
) ndr_push_netr_ServerAuthenticate2
,
14843 (ndr_pull_flags_fn_t
) ndr_pull_netr_ServerAuthenticate2
,
14844 (ndr_print_function_t
) ndr_print_netr_ServerAuthenticate2
,
14848 "netr_DatabaseSync2",
14849 sizeof(struct netr_DatabaseSync2
),
14850 (ndr_push_flags_fn_t
) ndr_push_netr_DatabaseSync2
,
14851 (ndr_pull_flags_fn_t
) ndr_pull_netr_DatabaseSync2
,
14852 (ndr_print_function_t
) ndr_print_netr_DatabaseSync2
,
14856 "netr_DatabaseRedo",
14857 sizeof(struct netr_DatabaseRedo
),
14858 (ndr_push_flags_fn_t
) ndr_push_netr_DatabaseRedo
,
14859 (ndr_pull_flags_fn_t
) ndr_pull_netr_DatabaseRedo
,
14860 (ndr_print_function_t
) ndr_print_netr_DatabaseRedo
,
14864 "netr_LogonControl2Ex",
14865 sizeof(struct netr_LogonControl2Ex
),
14866 (ndr_push_flags_fn_t
) ndr_push_netr_LogonControl2Ex
,
14867 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonControl2Ex
,
14868 (ndr_print_function_t
) ndr_print_netr_LogonControl2Ex
,
14872 "netr_NetrEnumerateTrustedDomains",
14873 sizeof(struct netr_NetrEnumerateTrustedDomains
),
14874 (ndr_push_flags_fn_t
) ndr_push_netr_NetrEnumerateTrustedDomains
,
14875 (ndr_pull_flags_fn_t
) ndr_pull_netr_NetrEnumerateTrustedDomains
,
14876 (ndr_print_function_t
) ndr_print_netr_NetrEnumerateTrustedDomains
,
14880 "netr_DsRGetDCName",
14881 sizeof(struct netr_DsRGetDCName
),
14882 (ndr_push_flags_fn_t
) ndr_push_netr_DsRGetDCName
,
14883 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsRGetDCName
,
14884 (ndr_print_function_t
) ndr_print_netr_DsRGetDCName
,
14888 "netr_NETRLOGONDUMMYROUTINE1",
14889 sizeof(struct netr_NETRLOGONDUMMYROUTINE1
),
14890 (ndr_push_flags_fn_t
) ndr_push_netr_NETRLOGONDUMMYROUTINE1
,
14891 (ndr_pull_flags_fn_t
) ndr_pull_netr_NETRLOGONDUMMYROUTINE1
,
14892 (ndr_print_function_t
) ndr_print_netr_NETRLOGONDUMMYROUTINE1
,
14896 "netr_NETRLOGONSETSERVICEBITS",
14897 sizeof(struct netr_NETRLOGONSETSERVICEBITS
),
14898 (ndr_push_flags_fn_t
) ndr_push_netr_NETRLOGONSETSERVICEBITS
,
14899 (ndr_pull_flags_fn_t
) ndr_pull_netr_NETRLOGONSETSERVICEBITS
,
14900 (ndr_print_function_t
) ndr_print_netr_NETRLOGONSETSERVICEBITS
,
14904 "netr_LogonGetTrustRid",
14905 sizeof(struct netr_LogonGetTrustRid
),
14906 (ndr_push_flags_fn_t
) ndr_push_netr_LogonGetTrustRid
,
14907 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonGetTrustRid
,
14908 (ndr_print_function_t
) ndr_print_netr_LogonGetTrustRid
,
14912 "netr_NETRLOGONCOMPUTESERVERDIGEST",
14913 sizeof(struct netr_NETRLOGONCOMPUTESERVERDIGEST
),
14914 (ndr_push_flags_fn_t
) ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST
,
14915 (ndr_pull_flags_fn_t
) ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST
,
14916 (ndr_print_function_t
) ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST
,
14920 "netr_NETRLOGONCOMPUTECLIENTDIGEST",
14921 sizeof(struct netr_NETRLOGONCOMPUTECLIENTDIGEST
),
14922 (ndr_push_flags_fn_t
) ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST
,
14923 (ndr_pull_flags_fn_t
) ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST
,
14924 (ndr_print_function_t
) ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST
,
14928 "netr_ServerAuthenticate3",
14929 sizeof(struct netr_ServerAuthenticate3
),
14930 (ndr_push_flags_fn_t
) ndr_push_netr_ServerAuthenticate3
,
14931 (ndr_pull_flags_fn_t
) ndr_pull_netr_ServerAuthenticate3
,
14932 (ndr_print_function_t
) ndr_print_netr_ServerAuthenticate3
,
14936 "netr_DsRGetDCNameEx",
14937 sizeof(struct netr_DsRGetDCNameEx
),
14938 (ndr_push_flags_fn_t
) ndr_push_netr_DsRGetDCNameEx
,
14939 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsRGetDCNameEx
,
14940 (ndr_print_function_t
) ndr_print_netr_DsRGetDCNameEx
,
14944 "netr_DsRGetSiteName",
14945 sizeof(struct netr_DsRGetSiteName
),
14946 (ndr_push_flags_fn_t
) ndr_push_netr_DsRGetSiteName
,
14947 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsRGetSiteName
,
14948 (ndr_print_function_t
) ndr_print_netr_DsRGetSiteName
,
14952 "netr_LogonGetDomainInfo",
14953 sizeof(struct netr_LogonGetDomainInfo
),
14954 (ndr_push_flags_fn_t
) ndr_push_netr_LogonGetDomainInfo
,
14955 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonGetDomainInfo
,
14956 (ndr_print_function_t
) ndr_print_netr_LogonGetDomainInfo
,
14960 "netr_ServerPasswordSet2",
14961 sizeof(struct netr_ServerPasswordSet2
),
14962 (ndr_push_flags_fn_t
) ndr_push_netr_ServerPasswordSet2
,
14963 (ndr_pull_flags_fn_t
) ndr_pull_netr_ServerPasswordSet2
,
14964 (ndr_print_function_t
) ndr_print_netr_ServerPasswordSet2
,
14968 "netr_ServerPasswordGet",
14969 sizeof(struct netr_ServerPasswordGet
),
14970 (ndr_push_flags_fn_t
) ndr_push_netr_ServerPasswordGet
,
14971 (ndr_pull_flags_fn_t
) ndr_pull_netr_ServerPasswordGet
,
14972 (ndr_print_function_t
) ndr_print_netr_ServerPasswordGet
,
14976 "netr_NETRLOGONSENDTOSAM",
14977 sizeof(struct netr_NETRLOGONSENDTOSAM
),
14978 (ndr_push_flags_fn_t
) ndr_push_netr_NETRLOGONSENDTOSAM
,
14979 (ndr_pull_flags_fn_t
) ndr_pull_netr_NETRLOGONSENDTOSAM
,
14980 (ndr_print_function_t
) ndr_print_netr_NETRLOGONSENDTOSAM
,
14984 "netr_DsRAddressToSitenamesW",
14985 sizeof(struct netr_DsRAddressToSitenamesW
),
14986 (ndr_push_flags_fn_t
) ndr_push_netr_DsRAddressToSitenamesW
,
14987 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsRAddressToSitenamesW
,
14988 (ndr_print_function_t
) ndr_print_netr_DsRAddressToSitenamesW
,
14992 "netr_DsRGetDCNameEx2",
14993 sizeof(struct netr_DsRGetDCNameEx2
),
14994 (ndr_push_flags_fn_t
) ndr_push_netr_DsRGetDCNameEx2
,
14995 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsRGetDCNameEx2
,
14996 (ndr_print_function_t
) ndr_print_netr_DsRGetDCNameEx2
,
15000 "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN",
15001 sizeof(struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
),
15002 (ndr_push_flags_fn_t
) ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
,
15003 (ndr_pull_flags_fn_t
) ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
,
15004 (ndr_print_function_t
) ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
,
15008 "netr_NetrEnumerateTrustedDomainsEx",
15009 sizeof(struct netr_NetrEnumerateTrustedDomainsEx
),
15010 (ndr_push_flags_fn_t
) ndr_push_netr_NetrEnumerateTrustedDomainsEx
,
15011 (ndr_pull_flags_fn_t
) ndr_pull_netr_NetrEnumerateTrustedDomainsEx
,
15012 (ndr_print_function_t
) ndr_print_netr_NetrEnumerateTrustedDomainsEx
,
15016 "netr_DsRAddressToSitenamesExW",
15017 sizeof(struct netr_DsRAddressToSitenamesExW
),
15018 (ndr_push_flags_fn_t
) ndr_push_netr_DsRAddressToSitenamesExW
,
15019 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsRAddressToSitenamesExW
,
15020 (ndr_print_function_t
) ndr_print_netr_DsRAddressToSitenamesExW
,
15024 "netr_DsrGetDcSiteCoverageW",
15025 sizeof(struct netr_DsrGetDcSiteCoverageW
),
15026 (ndr_push_flags_fn_t
) ndr_push_netr_DsrGetDcSiteCoverageW
,
15027 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsrGetDcSiteCoverageW
,
15028 (ndr_print_function_t
) ndr_print_netr_DsrGetDcSiteCoverageW
,
15032 "netr_LogonSamLogonEx",
15033 sizeof(struct netr_LogonSamLogonEx
),
15034 (ndr_push_flags_fn_t
) ndr_push_netr_LogonSamLogonEx
,
15035 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonSamLogonEx
,
15036 (ndr_print_function_t
) ndr_print_netr_LogonSamLogonEx
,
15040 "netr_DsrEnumerateDomainTrusts",
15041 sizeof(struct netr_DsrEnumerateDomainTrusts
),
15042 (ndr_push_flags_fn_t
) ndr_push_netr_DsrEnumerateDomainTrusts
,
15043 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsrEnumerateDomainTrusts
,
15044 (ndr_print_function_t
) ndr_print_netr_DsrEnumerateDomainTrusts
,
15048 "netr_DsrDeregisterDNSHostRecords",
15049 sizeof(struct netr_DsrDeregisterDNSHostRecords
),
15050 (ndr_push_flags_fn_t
) ndr_push_netr_DsrDeregisterDNSHostRecords
,
15051 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsrDeregisterDNSHostRecords
,
15052 (ndr_print_function_t
) ndr_print_netr_DsrDeregisterDNSHostRecords
,
15056 "netr_ServerTrustPasswordsGet",
15057 sizeof(struct netr_ServerTrustPasswordsGet
),
15058 (ndr_push_flags_fn_t
) ndr_push_netr_ServerTrustPasswordsGet
,
15059 (ndr_pull_flags_fn_t
) ndr_pull_netr_ServerTrustPasswordsGet
,
15060 (ndr_print_function_t
) ndr_print_netr_ServerTrustPasswordsGet
,
15064 "netr_DsRGetForestTrustInformation",
15065 sizeof(struct netr_DsRGetForestTrustInformation
),
15066 (ndr_push_flags_fn_t
) ndr_push_netr_DsRGetForestTrustInformation
,
15067 (ndr_pull_flags_fn_t
) ndr_pull_netr_DsRGetForestTrustInformation
,
15068 (ndr_print_function_t
) ndr_print_netr_DsRGetForestTrustInformation
,
15072 "netr_GetForestTrustInformation",
15073 sizeof(struct netr_GetForestTrustInformation
),
15074 (ndr_push_flags_fn_t
) ndr_push_netr_GetForestTrustInformation
,
15075 (ndr_pull_flags_fn_t
) ndr_pull_netr_GetForestTrustInformation
,
15076 (ndr_print_function_t
) ndr_print_netr_GetForestTrustInformation
,
15080 "netr_LogonSamLogonWithFlags",
15081 sizeof(struct netr_LogonSamLogonWithFlags
),
15082 (ndr_push_flags_fn_t
) ndr_push_netr_LogonSamLogonWithFlags
,
15083 (ndr_pull_flags_fn_t
) ndr_pull_netr_LogonSamLogonWithFlags
,
15084 (ndr_print_function_t
) ndr_print_netr_LogonSamLogonWithFlags
,
15088 "netr_NETRSERVERGETTRUSTINFO",
15089 sizeof(struct netr_NETRSERVERGETTRUSTINFO
),
15090 (ndr_push_flags_fn_t
) ndr_push_netr_NETRSERVERGETTRUSTINFO
,
15091 (ndr_pull_flags_fn_t
) ndr_pull_netr_NETRSERVERGETTRUSTINFO
,
15092 (ndr_print_function_t
) ndr_print_netr_NETRSERVERGETTRUSTINFO
,
15095 { NULL
, 0, NULL
, NULL
, NULL
, false }
15098 static const char * const netlogon_endpoint_strings
[] = {
15099 "ncacn_np:[\\pipe\\netlogon]",
15104 static const struct ndr_interface_string_array netlogon_endpoints
= {
15106 .names
= netlogon_endpoint_strings
15109 static const char * const netlogon_authservice_strings
[] = {
15113 static const struct ndr_interface_string_array netlogon_authservices
= {
15115 .names
= netlogon_authservice_strings
15119 const struct ndr_interface_table ndr_table_netlogon
= {
15120 .name
= "netlogon",
15122 {0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0xcf,0xfb}},
15123 NDR_NETLOGON_VERSION
15125 .helpstring
= NDR_NETLOGON_HELPSTRING
,
15127 .calls
= netlogon_calls
,
15128 .endpoints
= &netlogon_endpoints
,
15129 .authservices
= &netlogon_authservices