Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_auth.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 : #include "librpc/gen_ndr/ndr_lsa.h"
9 : #include "librpc/gen_ndr/ndr_krb5pac.h"
10 0 : _PUBLIC_ enum ndr_err_code ndr_push_auth_method(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum auth_method r)
11 : {
12 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
13 0 : return NDR_ERR_SUCCESS;
14 : }
15 :
16 0 : _PUBLIC_ enum ndr_err_code ndr_pull_auth_method(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum auth_method *r)
17 : {
18 0 : uint16_t v;
19 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
20 0 : *r = v;
21 0 : return NDR_ERR_SUCCESS;
22 : }
23 :
24 0 : _PUBLIC_ void ndr_print_auth_method(struct ndr_print *ndr, const char *name, enum auth_method r)
25 : {
26 0 : const char *val = NULL;
27 :
28 0 : switch (r) {
29 0 : case SEC_AUTH_METHOD_UNAUTHENTICATED: val = "SEC_AUTH_METHOD_UNAUTHENTICATED"; break;
30 0 : case SEC_AUTH_METHOD_NTLM: val = "SEC_AUTH_METHOD_NTLM"; break;
31 0 : case SEC_AUTH_METHOD_KERBEROS: val = "SEC_AUTH_METHOD_KERBEROS"; break;
32 : }
33 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
34 0 : }
35 :
36 414615 : _PUBLIC_ enum ndr_err_code ndr_push_auth_user_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct auth_user_info *r)
37 : {
38 414615 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
39 414615 : if (ndr_flags & NDR_SCALARS) {
40 414615 : NDR_CHECK(ndr_push_align(ndr, 5));
41 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
42 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_principal_name));
43 414615 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->user_principal_constructed));
44 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
45 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain_name));
46 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->full_name));
47 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->logon_script));
48 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->profile_path));
49 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->home_directory));
50 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->home_drive));
51 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->logon_server));
52 414615 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
53 414615 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
54 414615 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
55 414615 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
56 414615 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
57 414615 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
58 414615 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
59 414615 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
60 414615 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acct_flags));
61 414615 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
62 414615 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
63 : }
64 414615 : if (ndr_flags & NDR_BUFFERS) {
65 414615 : if (r->account_name) {
66 414615 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
67 414615 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
68 414615 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
69 414615 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
70 : }
71 414615 : if (r->user_principal_name) {
72 70690 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_principal_name, CH_UTF8)));
73 70690 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
74 70690 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_principal_name, CH_UTF8)));
75 70690 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_principal_name, ndr_charset_length(r->user_principal_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
76 : }
77 414615 : if (r->domain_name) {
78 414615 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF8)));
79 414615 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
80 414615 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF8)));
81 414615 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
82 : }
83 414615 : if (r->dns_domain_name) {
84 70690 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_name, CH_UTF8)));
85 70690 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
86 70690 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_name, CH_UTF8)));
87 70690 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_domain_name, ndr_charset_length(r->dns_domain_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
88 : }
89 414615 : if (r->full_name) {
90 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->full_name, CH_UTF8)));
91 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
92 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->full_name, CH_UTF8)));
93 413905 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->full_name, ndr_charset_length(r->full_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
94 : }
95 414615 : if (r->logon_script) {
96 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->logon_script, CH_UTF8)));
97 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
98 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->logon_script, CH_UTF8)));
99 413905 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->logon_script, ndr_charset_length(r->logon_script, CH_UTF8), sizeof(uint8_t), CH_UTF8));
100 : }
101 414615 : if (r->profile_path) {
102 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->profile_path, CH_UTF8)));
103 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
104 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->profile_path, CH_UTF8)));
105 413905 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->profile_path, ndr_charset_length(r->profile_path, CH_UTF8), sizeof(uint8_t), CH_UTF8));
106 : }
107 414615 : if (r->home_directory) {
108 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->home_directory, CH_UTF8)));
109 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
110 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->home_directory, CH_UTF8)));
111 413905 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->home_directory, ndr_charset_length(r->home_directory, CH_UTF8), sizeof(uint8_t), CH_UTF8));
112 : }
113 414615 : if (r->home_drive) {
114 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->home_drive, CH_UTF8)));
115 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
116 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->home_drive, CH_UTF8)));
117 413905 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->home_drive, ndr_charset_length(r->home_drive, CH_UTF8), sizeof(uint8_t), CH_UTF8));
118 : }
119 414615 : if (r->logon_server) {
120 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->logon_server, CH_UTF8)));
121 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
122 413905 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->logon_server, CH_UTF8)));
123 413905 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->logon_server, ndr_charset_length(r->logon_server, CH_UTF8), sizeof(uint8_t), CH_UTF8));
124 : }
125 : }
126 407662 : return NDR_ERR_SUCCESS;
127 : }
128 :
129 296201 : _PUBLIC_ enum ndr_err_code ndr_pull_auth_user_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct auth_user_info *r)
130 : {
131 4846 : uint32_t _ptr_account_name;
132 296201 : uint32_t size_account_name_1 = 0;
133 296201 : uint32_t length_account_name_1 = 0;
134 296201 : TALLOC_CTX *_mem_save_account_name_0 = NULL;
135 4846 : uint32_t _ptr_user_principal_name;
136 296201 : uint32_t size_user_principal_name_1 = 0;
137 296201 : uint32_t length_user_principal_name_1 = 0;
138 296201 : TALLOC_CTX *_mem_save_user_principal_name_0 = NULL;
139 4846 : uint32_t _ptr_domain_name;
140 296201 : uint32_t size_domain_name_1 = 0;
141 296201 : uint32_t length_domain_name_1 = 0;
142 296201 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
143 4846 : uint32_t _ptr_dns_domain_name;
144 296201 : uint32_t size_dns_domain_name_1 = 0;
145 296201 : uint32_t length_dns_domain_name_1 = 0;
146 296201 : TALLOC_CTX *_mem_save_dns_domain_name_0 = NULL;
147 4846 : uint32_t _ptr_full_name;
148 296201 : uint32_t size_full_name_1 = 0;
149 296201 : uint32_t length_full_name_1 = 0;
150 296201 : TALLOC_CTX *_mem_save_full_name_0 = NULL;
151 4846 : uint32_t _ptr_logon_script;
152 296201 : uint32_t size_logon_script_1 = 0;
153 296201 : uint32_t length_logon_script_1 = 0;
154 296201 : TALLOC_CTX *_mem_save_logon_script_0 = NULL;
155 4846 : uint32_t _ptr_profile_path;
156 296201 : uint32_t size_profile_path_1 = 0;
157 296201 : uint32_t length_profile_path_1 = 0;
158 296201 : TALLOC_CTX *_mem_save_profile_path_0 = NULL;
159 4846 : uint32_t _ptr_home_directory;
160 296201 : uint32_t size_home_directory_1 = 0;
161 296201 : uint32_t length_home_directory_1 = 0;
162 296201 : TALLOC_CTX *_mem_save_home_directory_0 = NULL;
163 4846 : uint32_t _ptr_home_drive;
164 296201 : uint32_t size_home_drive_1 = 0;
165 296201 : uint32_t length_home_drive_1 = 0;
166 296201 : TALLOC_CTX *_mem_save_home_drive_0 = NULL;
167 4846 : uint32_t _ptr_logon_server;
168 296201 : uint32_t size_logon_server_1 = 0;
169 296201 : uint32_t length_logon_server_1 = 0;
170 296201 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
171 296201 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
172 296201 : if (ndr_flags & NDR_SCALARS) {
173 296201 : NDR_CHECK(ndr_pull_align(ndr, 5));
174 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
175 296201 : if (_ptr_account_name) {
176 296201 : NDR_PULL_ALLOC(ndr, r->account_name);
177 : } else {
178 0 : r->account_name = NULL;
179 : }
180 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_principal_name));
181 296201 : if (_ptr_user_principal_name) {
182 45089 : NDR_PULL_ALLOC(ndr, r->user_principal_name);
183 : } else {
184 251112 : r->user_principal_name = NULL;
185 : }
186 296201 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->user_principal_constructed));
187 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
188 296201 : if (_ptr_domain_name) {
189 296201 : NDR_PULL_ALLOC(ndr, r->domain_name);
190 : } else {
191 0 : r->domain_name = NULL;
192 : }
193 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain_name));
194 296201 : if (_ptr_dns_domain_name) {
195 45089 : NDR_PULL_ALLOC(ndr, r->dns_domain_name);
196 : } else {
197 251112 : r->dns_domain_name = NULL;
198 : }
199 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_full_name));
200 296201 : if (_ptr_full_name) {
201 295527 : NDR_PULL_ALLOC(ndr, r->full_name);
202 : } else {
203 674 : r->full_name = NULL;
204 : }
205 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_script));
206 296201 : if (_ptr_logon_script) {
207 295527 : NDR_PULL_ALLOC(ndr, r->logon_script);
208 : } else {
209 674 : r->logon_script = NULL;
210 : }
211 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_profile_path));
212 296201 : if (_ptr_profile_path) {
213 295527 : NDR_PULL_ALLOC(ndr, r->profile_path);
214 : } else {
215 674 : r->profile_path = NULL;
216 : }
217 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_home_directory));
218 296201 : if (_ptr_home_directory) {
219 295527 : NDR_PULL_ALLOC(ndr, r->home_directory);
220 : } else {
221 674 : r->home_directory = NULL;
222 : }
223 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_home_drive));
224 296201 : if (_ptr_home_drive) {
225 295527 : NDR_PULL_ALLOC(ndr, r->home_drive);
226 : } else {
227 674 : r->home_drive = NULL;
228 : }
229 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
230 296201 : if (_ptr_logon_server) {
231 295527 : NDR_PULL_ALLOC(ndr, r->logon_server);
232 : } else {
233 674 : r->logon_server = NULL;
234 : }
235 296201 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
236 296201 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
237 296201 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
238 296201 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
239 296201 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
240 296201 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
241 296201 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
242 296201 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
243 296201 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acct_flags));
244 296201 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
245 296201 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
246 : }
247 296201 : if (ndr_flags & NDR_BUFFERS) {
248 296201 : if (r->account_name) {
249 296201 : _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
250 296201 : NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
251 296201 : NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
252 296201 : NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
253 296201 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_1));
254 296201 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_1));
255 296201 : if (length_account_name_1 > size_account_name_1) {
256 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
257 : }
258 296201 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint8_t)));
259 296201 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_1, sizeof(uint8_t), CH_UTF8));
260 296201 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
261 : }
262 296201 : if (r->user_principal_name) {
263 45089 : _mem_save_user_principal_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
264 45089 : NDR_PULL_SET_MEM_CTX(ndr, r->user_principal_name, 0);
265 45089 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user_principal_name));
266 45089 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user_principal_name));
267 45089 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_principal_name, &size_user_principal_name_1));
268 45089 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_principal_name, &length_user_principal_name_1));
269 45089 : if (length_user_principal_name_1 > size_user_principal_name_1) {
270 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_principal_name_1, length_user_principal_name_1);
271 : }
272 45089 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_principal_name_1, sizeof(uint8_t)));
273 45089 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_principal_name, length_user_principal_name_1, sizeof(uint8_t), CH_UTF8));
274 45089 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_principal_name_0, 0);
275 : }
276 296201 : if (r->domain_name) {
277 296201 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
278 296201 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
279 296201 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
280 296201 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
281 296201 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
282 296201 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
283 296201 : if (length_domain_name_1 > size_domain_name_1) {
284 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
285 : }
286 296201 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint8_t)));
287 296201 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint8_t), CH_UTF8));
288 296201 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
289 : }
290 296201 : if (r->dns_domain_name) {
291 45089 : _mem_save_dns_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
292 45089 : NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain_name, 0);
293 45089 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain_name));
294 45089 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain_name));
295 45089 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_domain_name, &size_dns_domain_name_1));
296 45089 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_domain_name, &length_dns_domain_name_1));
297 45089 : if (length_dns_domain_name_1 > size_dns_domain_name_1) {
298 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_domain_name_1, length_dns_domain_name_1);
299 : }
300 45089 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_domain_name_1, sizeof(uint8_t)));
301 45089 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain_name, length_dns_domain_name_1, sizeof(uint8_t), CH_UTF8));
302 45089 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_name_0, 0);
303 : }
304 296201 : if (r->full_name) {
305 295527 : _mem_save_full_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
306 295527 : NDR_PULL_SET_MEM_CTX(ndr, r->full_name, 0);
307 295527 : NDR_CHECK(ndr_pull_array_size(ndr, &r->full_name));
308 295527 : NDR_CHECK(ndr_pull_array_length(ndr, &r->full_name));
309 295527 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->full_name, &size_full_name_1));
310 295527 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->full_name, &length_full_name_1));
311 295527 : if (length_full_name_1 > size_full_name_1) {
312 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_full_name_1, length_full_name_1);
313 : }
314 295527 : NDR_CHECK(ndr_check_string_terminator(ndr, length_full_name_1, sizeof(uint8_t)));
315 295527 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->full_name, length_full_name_1, sizeof(uint8_t), CH_UTF8));
316 295527 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_full_name_0, 0);
317 : }
318 296201 : if (r->logon_script) {
319 295527 : _mem_save_logon_script_0 = NDR_PULL_GET_MEM_CTX(ndr);
320 295527 : NDR_PULL_SET_MEM_CTX(ndr, r->logon_script, 0);
321 295527 : NDR_CHECK(ndr_pull_array_size(ndr, &r->logon_script));
322 295527 : NDR_CHECK(ndr_pull_array_length(ndr, &r->logon_script));
323 295527 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->logon_script, &size_logon_script_1));
324 295527 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->logon_script, &length_logon_script_1));
325 295527 : if (length_logon_script_1 > size_logon_script_1) {
326 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_script_1, length_logon_script_1);
327 : }
328 295527 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_script_1, sizeof(uint8_t)));
329 295527 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->logon_script, length_logon_script_1, sizeof(uint8_t), CH_UTF8));
330 295527 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_script_0, 0);
331 : }
332 296201 : if (r->profile_path) {
333 295527 : _mem_save_profile_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
334 295527 : NDR_PULL_SET_MEM_CTX(ndr, r->profile_path, 0);
335 295527 : NDR_CHECK(ndr_pull_array_size(ndr, &r->profile_path));
336 295527 : NDR_CHECK(ndr_pull_array_length(ndr, &r->profile_path));
337 295527 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->profile_path, &size_profile_path_1));
338 295527 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->profile_path, &length_profile_path_1));
339 295527 : if (length_profile_path_1 > size_profile_path_1) {
340 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_profile_path_1, length_profile_path_1);
341 : }
342 295527 : NDR_CHECK(ndr_check_string_terminator(ndr, length_profile_path_1, sizeof(uint8_t)));
343 295527 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->profile_path, length_profile_path_1, sizeof(uint8_t), CH_UTF8));
344 295527 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_profile_path_0, 0);
345 : }
346 296201 : if (r->home_directory) {
347 295527 : _mem_save_home_directory_0 = NDR_PULL_GET_MEM_CTX(ndr);
348 295527 : NDR_PULL_SET_MEM_CTX(ndr, r->home_directory, 0);
349 295527 : NDR_CHECK(ndr_pull_array_size(ndr, &r->home_directory));
350 295527 : NDR_CHECK(ndr_pull_array_length(ndr, &r->home_directory));
351 295527 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->home_directory, &size_home_directory_1));
352 295527 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->home_directory, &length_home_directory_1));
353 295527 : if (length_home_directory_1 > size_home_directory_1) {
354 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_home_directory_1, length_home_directory_1);
355 : }
356 295527 : NDR_CHECK(ndr_check_string_terminator(ndr, length_home_directory_1, sizeof(uint8_t)));
357 295527 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->home_directory, length_home_directory_1, sizeof(uint8_t), CH_UTF8));
358 295527 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_home_directory_0, 0);
359 : }
360 296201 : if (r->home_drive) {
361 295527 : _mem_save_home_drive_0 = NDR_PULL_GET_MEM_CTX(ndr);
362 295527 : NDR_PULL_SET_MEM_CTX(ndr, r->home_drive, 0);
363 295527 : NDR_CHECK(ndr_pull_array_size(ndr, &r->home_drive));
364 295527 : NDR_CHECK(ndr_pull_array_length(ndr, &r->home_drive));
365 295527 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->home_drive, &size_home_drive_1));
366 295527 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->home_drive, &length_home_drive_1));
367 295527 : if (length_home_drive_1 > size_home_drive_1) {
368 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_home_drive_1, length_home_drive_1);
369 : }
370 295527 : NDR_CHECK(ndr_check_string_terminator(ndr, length_home_drive_1, sizeof(uint8_t)));
371 295527 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->home_drive, length_home_drive_1, sizeof(uint8_t), CH_UTF8));
372 295527 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_home_drive_0, 0);
373 : }
374 296201 : if (r->logon_server) {
375 295527 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
376 295527 : NDR_PULL_SET_MEM_CTX(ndr, r->logon_server, 0);
377 295527 : NDR_CHECK(ndr_pull_array_size(ndr, &r->logon_server));
378 295527 : NDR_CHECK(ndr_pull_array_length(ndr, &r->logon_server));
379 295527 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->logon_server, &size_logon_server_1));
380 295527 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->logon_server, &length_logon_server_1));
381 295527 : if (length_logon_server_1 > size_logon_server_1) {
382 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
383 : }
384 295527 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint8_t)));
385 295527 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->logon_server, length_logon_server_1, sizeof(uint8_t), CH_UTF8));
386 295527 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
387 : }
388 : }
389 291355 : return NDR_ERR_SUCCESS;
390 : }
391 :
392 0 : static void ndr_print_flags_auth_user_info(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct auth_user_info *r)
393 : {
394 0 : ndr_print_auth_user_info(ndr, name, r);
395 0 : }
396 :
397 0 : _PUBLIC_ void ndr_print_auth_user_info(struct ndr_print *ndr, const char *name, const struct auth_user_info *r)
398 : {
399 0 : ndr_print_struct(ndr, name, "auth_user_info");
400 0 : if (r == NULL) { ndr_print_null(ndr); return; }
401 0 : ndr->depth++;
402 0 : ndr_print_ptr(ndr, "account_name", r->account_name);
403 0 : ndr->depth++;
404 0 : if (r->account_name) {
405 0 : ndr_print_string(ndr, "account_name", r->account_name);
406 : }
407 0 : ndr->depth--;
408 0 : ndr_print_ptr(ndr, "user_principal_name", r->user_principal_name);
409 0 : ndr->depth++;
410 0 : if (r->user_principal_name) {
411 0 : ndr_print_string(ndr, "user_principal_name", r->user_principal_name);
412 : }
413 0 : ndr->depth--;
414 0 : ndr_print_uint8(ndr, "user_principal_constructed", r->user_principal_constructed);
415 0 : ndr_print_ptr(ndr, "domain_name", r->domain_name);
416 0 : ndr->depth++;
417 0 : if (r->domain_name) {
418 0 : ndr_print_string(ndr, "domain_name", r->domain_name);
419 : }
420 0 : ndr->depth--;
421 0 : ndr_print_ptr(ndr, "dns_domain_name", r->dns_domain_name);
422 0 : ndr->depth++;
423 0 : if (r->dns_domain_name) {
424 0 : ndr_print_string(ndr, "dns_domain_name", r->dns_domain_name);
425 : }
426 0 : ndr->depth--;
427 0 : ndr_print_ptr(ndr, "full_name", r->full_name);
428 0 : ndr->depth++;
429 0 : if (r->full_name) {
430 0 : ndr_print_string(ndr, "full_name", r->full_name);
431 : }
432 0 : ndr->depth--;
433 0 : ndr_print_ptr(ndr, "logon_script", r->logon_script);
434 0 : ndr->depth++;
435 0 : if (r->logon_script) {
436 0 : ndr_print_string(ndr, "logon_script", r->logon_script);
437 : }
438 0 : ndr->depth--;
439 0 : ndr_print_ptr(ndr, "profile_path", r->profile_path);
440 0 : ndr->depth++;
441 0 : if (r->profile_path) {
442 0 : ndr_print_string(ndr, "profile_path", r->profile_path);
443 : }
444 0 : ndr->depth--;
445 0 : ndr_print_ptr(ndr, "home_directory", r->home_directory);
446 0 : ndr->depth++;
447 0 : if (r->home_directory) {
448 0 : ndr_print_string(ndr, "home_directory", r->home_directory);
449 : }
450 0 : ndr->depth--;
451 0 : ndr_print_ptr(ndr, "home_drive", r->home_drive);
452 0 : ndr->depth++;
453 0 : if (r->home_drive) {
454 0 : ndr_print_string(ndr, "home_drive", r->home_drive);
455 : }
456 0 : ndr->depth--;
457 0 : ndr_print_ptr(ndr, "logon_server", r->logon_server);
458 0 : ndr->depth++;
459 0 : if (r->logon_server) {
460 0 : ndr_print_string(ndr, "logon_server", r->logon_server);
461 : }
462 0 : ndr->depth--;
463 0 : ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
464 0 : ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
465 0 : ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
466 0 : ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
467 0 : ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
468 0 : ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
469 0 : ndr_print_uint16(ndr, "logon_count", r->logon_count);
470 0 : ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
471 0 : ndr_print_uint32(ndr, "acct_flags", r->acct_flags);
472 0 : ndr_print_uint32(ndr, "user_flags", r->user_flags);
473 0 : ndr->depth--;
474 : }
475 :
476 0 : _PUBLIC_ enum ndr_err_code ndr_push_auth_user_info_torture(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct auth_user_info_torture *r)
477 : {
478 0 : uint32_t cntr_dc_sids_0;
479 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
480 0 : if (ndr_flags & NDR_SCALARS) {
481 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_dc_sids));
482 0 : NDR_CHECK(ndr_push_align(ndr, 4));
483 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_dc_sids));
484 0 : for (cntr_dc_sids_0 = 0; cntr_dc_sids_0 < (r->num_dc_sids); cntr_dc_sids_0++) {
485 0 : NDR_CHECK(ndr_push_auth_SidAttr(ndr, NDR_SCALARS, &r->dc_sids[cntr_dc_sids_0]));
486 : }
487 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
488 : }
489 0 : if (ndr_flags & NDR_BUFFERS) {
490 0 : }
491 0 : return NDR_ERR_SUCCESS;
492 : }
493 :
494 0 : _PUBLIC_ enum ndr_err_code ndr_pull_auth_user_info_torture(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct auth_user_info_torture *r)
495 : {
496 0 : uint32_t size_dc_sids_0 = 0;
497 0 : uint32_t cntr_dc_sids_0;
498 0 : TALLOC_CTX *_mem_save_dc_sids_0 = NULL;
499 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
500 0 : if (ndr_flags & NDR_SCALARS) {
501 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_sids));
502 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
503 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_dc_sids));
504 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->dc_sids, &size_dc_sids_0));
505 0 : NDR_PULL_ALLOC_N(ndr, r->dc_sids, size_dc_sids_0);
506 0 : _mem_save_dc_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
507 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dc_sids, 0);
508 0 : for (cntr_dc_sids_0 = 0; cntr_dc_sids_0 < (size_dc_sids_0); cntr_dc_sids_0++) {
509 0 : NDR_CHECK(ndr_pull_auth_SidAttr(ndr, NDR_SCALARS, &r->dc_sids[cntr_dc_sids_0]));
510 : }
511 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_sids_0, 0);
512 0 : if (r->dc_sids) {
513 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->dc_sids, r->num_dc_sids));
514 : }
515 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
516 : }
517 0 : if (ndr_flags & NDR_BUFFERS) {
518 0 : }
519 0 : return NDR_ERR_SUCCESS;
520 : }
521 :
522 0 : static void ndr_print_flags_auth_user_info_torture(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct auth_user_info_torture *r)
523 : {
524 0 : ndr_print_auth_user_info_torture(ndr, name, r);
525 0 : }
526 :
527 0 : _PUBLIC_ void ndr_print_auth_user_info_torture(struct ndr_print *ndr, const char *name, const struct auth_user_info_torture *r)
528 : {
529 0 : uint32_t cntr_dc_sids_0;
530 0 : ndr_print_struct(ndr, name, "auth_user_info_torture");
531 0 : if (r == NULL) { ndr_print_null(ndr); return; }
532 0 : ndr->depth++;
533 0 : ndr_print_uint32(ndr, "num_dc_sids", r->num_dc_sids);
534 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "dc_sids", (uint32_t)(r->num_dc_sids));
535 0 : ndr->depth++;
536 0 : for (cntr_dc_sids_0 = 0; cntr_dc_sids_0 < (r->num_dc_sids); cntr_dc_sids_0++) {
537 0 : ndr_print_auth_SidAttr(ndr, "dc_sids", &r->dc_sids[cntr_dc_sids_0]);
538 : }
539 0 : ndr->depth--;
540 0 : ndr->depth--;
541 : }
542 :
543 391499 : _PUBLIC_ enum ndr_err_code ndr_push_auth_user_info_unix(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct auth_user_info_unix *r)
544 : {
545 391499 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
546 391499 : if (ndr_flags & NDR_SCALARS) {
547 391499 : NDR_CHECK(ndr_push_align(ndr, 5));
548 391499 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->unix_name));
549 391499 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sanitized_username));
550 391499 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
551 : }
552 391499 : if (ndr_flags & NDR_BUFFERS) {
553 391499 : if (r->unix_name) {
554 391499 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unix_name, CH_UTF8)));
555 391499 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
556 391499 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unix_name, CH_UTF8)));
557 391499 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unix_name, ndr_charset_length(r->unix_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
558 : }
559 391499 : if (r->sanitized_username) {
560 391499 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sanitized_username, CH_UTF8)));
561 391499 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
562 391499 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sanitized_username, CH_UTF8)));
563 391499 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sanitized_username, ndr_charset_length(r->sanitized_username, CH_UTF8), sizeof(uint8_t), CH_UTF8));
564 : }
565 : }
566 385897 : return NDR_ERR_SUCCESS;
567 : }
568 :
569 274499 : _PUBLIC_ enum ndr_err_code ndr_pull_auth_user_info_unix(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct auth_user_info_unix *r)
570 : {
571 3495 : uint32_t _ptr_unix_name;
572 274499 : uint32_t size_unix_name_1 = 0;
573 274499 : uint32_t length_unix_name_1 = 0;
574 274499 : TALLOC_CTX *_mem_save_unix_name_0 = NULL;
575 3495 : uint32_t _ptr_sanitized_username;
576 274499 : uint32_t size_sanitized_username_1 = 0;
577 274499 : uint32_t length_sanitized_username_1 = 0;
578 274499 : TALLOC_CTX *_mem_save_sanitized_username_0 = NULL;
579 274499 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
580 274499 : if (ndr_flags & NDR_SCALARS) {
581 274499 : NDR_CHECK(ndr_pull_align(ndr, 5));
582 274499 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unix_name));
583 274499 : if (_ptr_unix_name) {
584 274499 : NDR_PULL_ALLOC(ndr, r->unix_name);
585 : } else {
586 0 : r->unix_name = NULL;
587 : }
588 274499 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sanitized_username));
589 274499 : if (_ptr_sanitized_username) {
590 274499 : NDR_PULL_ALLOC(ndr, r->sanitized_username);
591 : } else {
592 0 : r->sanitized_username = NULL;
593 : }
594 274499 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
595 : }
596 274499 : if (ndr_flags & NDR_BUFFERS) {
597 274499 : if (r->unix_name) {
598 274499 : _mem_save_unix_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
599 274499 : NDR_PULL_SET_MEM_CTX(ndr, r->unix_name, 0);
600 274499 : NDR_CHECK(ndr_pull_array_size(ndr, &r->unix_name));
601 274499 : NDR_CHECK(ndr_pull_array_length(ndr, &r->unix_name));
602 274499 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->unix_name, &size_unix_name_1));
603 274499 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->unix_name, &length_unix_name_1));
604 274499 : if (length_unix_name_1 > size_unix_name_1) {
605 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_unix_name_1, length_unix_name_1);
606 : }
607 274499 : NDR_CHECK(ndr_check_string_terminator(ndr, length_unix_name_1, sizeof(uint8_t)));
608 274499 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unix_name, length_unix_name_1, sizeof(uint8_t), CH_UTF8));
609 274499 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unix_name_0, 0);
610 : }
611 274499 : if (r->sanitized_username) {
612 274499 : _mem_save_sanitized_username_0 = NDR_PULL_GET_MEM_CTX(ndr);
613 274499 : NDR_PULL_SET_MEM_CTX(ndr, r->sanitized_username, 0);
614 274499 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sanitized_username));
615 274499 : NDR_CHECK(ndr_pull_array_length(ndr, &r->sanitized_username));
616 274499 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->sanitized_username, &size_sanitized_username_1));
617 274499 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->sanitized_username, &length_sanitized_username_1));
618 274499 : if (length_sanitized_username_1 > size_sanitized_username_1) {
619 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_sanitized_username_1, length_sanitized_username_1);
620 : }
621 274499 : NDR_CHECK(ndr_check_string_terminator(ndr, length_sanitized_username_1, sizeof(uint8_t)));
622 274499 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sanitized_username, length_sanitized_username_1, sizeof(uint8_t), CH_UTF8));
623 274499 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sanitized_username_0, 0);
624 : }
625 : }
626 271004 : return NDR_ERR_SUCCESS;
627 : }
628 :
629 0 : static void ndr_print_flags_auth_user_info_unix(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct auth_user_info_unix *r)
630 : {
631 0 : ndr_print_auth_user_info_unix(ndr, name, r);
632 0 : }
633 :
634 0 : _PUBLIC_ void ndr_print_auth_user_info_unix(struct ndr_print *ndr, const char *name, const struct auth_user_info_unix *r)
635 : {
636 0 : ndr_print_struct(ndr, name, "auth_user_info_unix");
637 0 : if (r == NULL) { ndr_print_null(ndr); return; }
638 0 : ndr->depth++;
639 0 : ndr_print_ptr(ndr, "unix_name", r->unix_name);
640 0 : ndr->depth++;
641 0 : if (r->unix_name) {
642 0 : ndr_print_string(ndr, "unix_name", r->unix_name);
643 : }
644 0 : ndr->depth--;
645 0 : ndr_print_ptr(ndr, "sanitized_username", r->sanitized_username);
646 0 : ndr->depth++;
647 0 : if (r->sanitized_username) {
648 0 : ndr_print_string(ndr, "sanitized_username", r->sanitized_username);
649 : }
650 0 : ndr->depth--;
651 0 : ndr->depth--;
652 : }
653 :
654 414615 : static enum ndr_err_code ndr_push_ticket_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ticket_type r)
655 : {
656 414615 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
657 407662 : return NDR_ERR_SUCCESS;
658 : }
659 :
660 296201 : static enum ndr_err_code ndr_pull_ticket_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ticket_type *r)
661 : {
662 4846 : uint16_t v;
663 296201 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
664 296201 : *r = v;
665 296201 : return NDR_ERR_SUCCESS;
666 : }
667 :
668 0 : _PUBLIC_ void ndr_print_ticket_type(struct ndr_print *ndr, const char *name, enum ticket_type r)
669 : {
670 0 : const char *val = NULL;
671 :
672 0 : switch (r) {
673 0 : case TICKET_TYPE_UNKNOWN: val = "TICKET_TYPE_UNKNOWN"; break;
674 0 : case TICKET_TYPE_TGT: val = "TICKET_TYPE_TGT"; break;
675 0 : case TICKET_TYPE_NON_TGT: val = "TICKET_TYPE_NON_TGT"; break;
676 : }
677 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
678 0 : }
679 :
680 0 : _PUBLIC_ enum ndr_err_code ndr_push_auth_SidAttr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct auth_SidAttr *r)
681 : {
682 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
683 0 : if (ndr_flags & NDR_SCALARS) {
684 0 : NDR_CHECK(ndr_push_align(ndr, 4));
685 0 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
686 0 : NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->attrs));
687 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
688 : }
689 0 : if (ndr_flags & NDR_BUFFERS) {
690 0 : }
691 0 : return NDR_ERR_SUCCESS;
692 : }
693 :
694 0 : _PUBLIC_ enum ndr_err_code ndr_pull_auth_SidAttr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct auth_SidAttr *r)
695 : {
696 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
697 0 : if (ndr_flags & NDR_SCALARS) {
698 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
699 0 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sid));
700 0 : NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->attrs));
701 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
702 : }
703 0 : if (ndr_flags & NDR_BUFFERS) {
704 0 : }
705 0 : return NDR_ERR_SUCCESS;
706 : }
707 :
708 0 : static void ndr_print_flags_auth_SidAttr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct auth_SidAttr *r)
709 : {
710 0 : ndr_print_auth_SidAttr(ndr, name, r);
711 0 : }
712 :
713 0 : _PUBLIC_ void ndr_print_auth_SidAttr(struct ndr_print *ndr, const char *name, const struct auth_SidAttr *r)
714 : {
715 0 : ndr_print_struct(ndr, name, "auth_SidAttr");
716 0 : if (r == NULL) { ndr_print_null(ndr); return; }
717 0 : ndr->depth++;
718 0 : ndr_print_dom_sid(ndr, "sid", &r->sid);
719 0 : ndr_print_security_GroupAttrs(ndr, "attrs", r->attrs);
720 0 : ndr->depth--;
721 : }
722 :
723 0 : _PUBLIC_ enum ndr_err_code ndr_push_auth_user_info_dc(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct auth_user_info_dc *r)
724 : {
725 0 : uint32_t cntr_sids_0;
726 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
727 0 : if (ndr_flags & NDR_SCALARS) {
728 0 : NDR_CHECK(ndr_push_align(ndr, 5));
729 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
730 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
731 0 : for (cntr_sids_0 = 0; cntr_sids_0 < (r->num_sids); cntr_sids_0++) {
732 0 : NDR_CHECK(ndr_push_auth_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
733 : }
734 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
735 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->user_session_key));
736 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->lm_session_key));
737 0 : NDR_CHECK(ndr_push_ticket_type(ndr, NDR_SCALARS, r->ticket_type));
738 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
739 : }
740 0 : if (ndr_flags & NDR_BUFFERS) {
741 0 : if (r->info) {
742 0 : NDR_CHECK(ndr_push_auth_user_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
743 : }
744 : }
745 0 : return NDR_ERR_SUCCESS;
746 : }
747 :
748 0 : _PUBLIC_ enum ndr_err_code ndr_pull_auth_user_info_dc(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct auth_user_info_dc *r)
749 : {
750 0 : uint32_t size_sids_0 = 0;
751 0 : uint32_t cntr_sids_0;
752 0 : TALLOC_CTX *_mem_save_sids_0 = NULL;
753 0 : uint32_t _ptr_info;
754 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
755 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
756 0 : if (ndr_flags & NDR_SCALARS) {
757 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
758 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
759 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
760 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_0));
761 0 : NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_0);
762 0 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
763 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
764 0 : for (cntr_sids_0 = 0; cntr_sids_0 < (size_sids_0); cntr_sids_0++) {
765 0 : NDR_CHECK(ndr_pull_auth_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
766 : }
767 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
768 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
769 0 : if (_ptr_info) {
770 0 : NDR_PULL_ALLOC(ndr, r->info);
771 : } else {
772 0 : r->info = NULL;
773 : }
774 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->user_session_key));
775 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->lm_session_key));
776 0 : NDR_CHECK(ndr_pull_ticket_type(ndr, NDR_SCALARS, &r->ticket_type));
777 0 : if (r->sids) {
778 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->sids, r->num_sids));
779 : }
780 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
781 : }
782 0 : if (ndr_flags & NDR_BUFFERS) {
783 0 : if (r->info) {
784 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
785 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
786 0 : NDR_CHECK(ndr_pull_auth_user_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
787 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
788 : }
789 : }
790 0 : return NDR_ERR_SUCCESS;
791 : }
792 :
793 0 : static void ndr_print_flags_auth_user_info_dc(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct auth_user_info_dc *r)
794 : {
795 0 : ndr_print_auth_user_info_dc(ndr, name, r);
796 0 : }
797 :
798 0 : _PUBLIC_ void ndr_print_auth_user_info_dc(struct ndr_print *ndr, const char *name, const struct auth_user_info_dc *r)
799 : {
800 0 : uint32_t cntr_sids_0;
801 0 : ndr_print_struct(ndr, name, "auth_user_info_dc");
802 0 : if (r == NULL) { ndr_print_null(ndr); return; }
803 0 : ndr->depth++;
804 0 : ndr_print_uint32(ndr, "num_sids", r->num_sids);
805 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sids", (uint32_t)(r->num_sids));
806 0 : ndr->depth++;
807 0 : for (cntr_sids_0 = 0; cntr_sids_0 < (r->num_sids); cntr_sids_0++) {
808 0 : ndr_print_auth_SidAttr(ndr, "sids", &r->sids[cntr_sids_0]);
809 : }
810 0 : ndr->depth--;
811 0 : ndr_print_ptr(ndr, "info", r->info);
812 0 : ndr->depth++;
813 0 : if (r->info) {
814 0 : ndr_print_auth_user_info(ndr, "info", r->info);
815 : }
816 0 : ndr->depth--;
817 0 : ndr_print_ticket_type(ndr, "ticket_type", r->ticket_type);
818 0 : ndr->depth--;
819 : }
820 :
821 414615 : _PUBLIC_ enum ndr_err_code ndr_push_auth_session_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct auth_session_info *r)
822 : {
823 414615 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
824 414615 : if (ndr_flags & NDR_SCALARS) {
825 414615 : NDR_CHECK(ndr_push_align(ndr, 5));
826 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->security_token));
827 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->unix_token));
828 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
829 414615 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->unix_info));
830 414615 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
831 : /* [ignore] 'torture' */
832 414615 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->session_key));
833 414615 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
834 : /* [ignore] 'credentials' */
835 414615 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->unique_session_token));
836 421568 : NDR_CHECK(ndr_push_ticket_type(ndr, NDR_SCALARS, r->ticket_type));
837 414615 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
838 : }
839 414615 : if (ndr_flags & NDR_BUFFERS) {
840 414615 : if (r->security_token) {
841 414615 : NDR_CHECK(ndr_push_security_token(ndr, NDR_SCALARS|NDR_BUFFERS, r->security_token));
842 : }
843 414615 : if (r->unix_token) {
844 391499 : NDR_CHECK(ndr_push_security_unix_token(ndr, NDR_SCALARS, r->unix_token));
845 : }
846 414615 : if (r->info) {
847 414615 : NDR_CHECK(ndr_push_auth_user_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
848 : }
849 414615 : if (r->unix_info) {
850 391499 : NDR_CHECK(ndr_push_auth_user_info_unix(ndr, NDR_SCALARS|NDR_BUFFERS, r->unix_info));
851 : }
852 : /* [ignore] 'torture' */
853 : /* [ignore] 'credentials' */
854 : }
855 407662 : return NDR_ERR_SUCCESS;
856 : }
857 :
858 296201 : _PUBLIC_ enum ndr_err_code ndr_pull_auth_session_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct auth_session_info *r)
859 : {
860 4846 : uint32_t _ptr_security_token;
861 296201 : TALLOC_CTX *_mem_save_security_token_0 = NULL;
862 4846 : uint32_t _ptr_unix_token;
863 296201 : TALLOC_CTX *_mem_save_unix_token_0 = NULL;
864 4846 : uint32_t _ptr_info;
865 296201 : TALLOC_CTX *_mem_save_info_0 = NULL;
866 4846 : uint32_t _ptr_unix_info;
867 296201 : TALLOC_CTX *_mem_save_unix_info_0 = NULL;
868 4846 : uint32_t _ptr_torture;
869 4846 : uint32_t _ptr_credentials;
870 296201 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
871 296201 : if (ndr_flags & NDR_SCALARS) {
872 296201 : NDR_CHECK(ndr_pull_align(ndr, 5));
873 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_security_token));
874 296201 : if (_ptr_security_token) {
875 296201 : NDR_PULL_ALLOC(ndr, r->security_token);
876 : } else {
877 0 : r->security_token = NULL;
878 : }
879 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unix_token));
880 296201 : if (_ptr_unix_token) {
881 274499 : NDR_PULL_ALLOC(ndr, r->unix_token);
882 : } else {
883 21702 : r->unix_token = NULL;
884 : }
885 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
886 296201 : if (_ptr_info) {
887 296201 : NDR_PULL_ALLOC(ndr, r->info);
888 : } else {
889 0 : r->info = NULL;
890 : }
891 296201 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unix_info));
892 296201 : if (_ptr_unix_info) {
893 274499 : NDR_PULL_ALLOC(ndr, r->unix_info);
894 : } else {
895 21702 : r->unix_info = NULL;
896 : }
897 296201 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_torture));
898 296201 : _ptr_torture = 0;
899 296201 : if (_ptr_torture) {
900 : } else {
901 296201 : r->torture = NULL;
902 : }
903 : /* [ignore] 'torture' */
904 296201 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->session_key));
905 296201 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_credentials));
906 296201 : _ptr_credentials = 0;
907 296201 : if (_ptr_credentials) {
908 : } else {
909 296201 : r->credentials = NULL;
910 : }
911 : /* [ignore] 'credentials' */
912 296201 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->unique_session_token));
913 301047 : NDR_CHECK(ndr_pull_ticket_type(ndr, NDR_SCALARS, &r->ticket_type));
914 296201 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
915 : }
916 296201 : if (ndr_flags & NDR_BUFFERS) {
917 296201 : if (r->security_token) {
918 296201 : _mem_save_security_token_0 = NDR_PULL_GET_MEM_CTX(ndr);
919 296201 : NDR_PULL_SET_MEM_CTX(ndr, r->security_token, 0);
920 296201 : NDR_CHECK(ndr_pull_security_token(ndr, NDR_SCALARS|NDR_BUFFERS, r->security_token));
921 296201 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_security_token_0, 0);
922 : }
923 296201 : if (r->unix_token) {
924 274499 : _mem_save_unix_token_0 = NDR_PULL_GET_MEM_CTX(ndr);
925 274499 : NDR_PULL_SET_MEM_CTX(ndr, r->unix_token, 0);
926 274499 : NDR_CHECK(ndr_pull_security_unix_token(ndr, NDR_SCALARS, r->unix_token));
927 274499 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unix_token_0, 0);
928 : }
929 296201 : if (r->info) {
930 296201 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
931 296201 : NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
932 296201 : NDR_CHECK(ndr_pull_auth_user_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
933 296201 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
934 : }
935 296201 : if (r->unix_info) {
936 274499 : _mem_save_unix_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
937 274499 : NDR_PULL_SET_MEM_CTX(ndr, r->unix_info, 0);
938 274499 : NDR_CHECK(ndr_pull_auth_user_info_unix(ndr, NDR_SCALARS|NDR_BUFFERS, r->unix_info));
939 274499 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unix_info_0, 0);
940 : }
941 : /* [ignore] 'torture' */
942 : /* [ignore] 'credentials' */
943 : }
944 291355 : return NDR_ERR_SUCCESS;
945 : }
946 :
947 0 : static void ndr_print_flags_auth_session_info(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct auth_session_info *r)
948 : {
949 0 : ndr_print_auth_session_info(ndr, name, r);
950 0 : }
951 :
952 0 : _PUBLIC_ void ndr_print_auth_session_info(struct ndr_print *ndr, const char *name, const struct auth_session_info *r)
953 : {
954 0 : ndr_print_struct(ndr, name, "auth_session_info");
955 0 : if (r == NULL) { ndr_print_null(ndr); return; }
956 0 : ndr->depth++;
957 0 : ndr_print_ptr(ndr, "security_token", r->security_token);
958 0 : ndr->depth++;
959 0 : if (r->security_token) {
960 0 : ndr_print_security_token(ndr, "security_token", r->security_token);
961 : }
962 0 : ndr->depth--;
963 0 : ndr_print_ptr(ndr, "unix_token", r->unix_token);
964 0 : ndr->depth++;
965 0 : if (r->unix_token) {
966 0 : ndr_print_security_unix_token(ndr, "unix_token", r->unix_token);
967 : }
968 0 : ndr->depth--;
969 0 : ndr_print_ptr(ndr, "info", r->info);
970 0 : ndr->depth++;
971 0 : if (r->info) {
972 0 : ndr_print_auth_user_info(ndr, "info", r->info);
973 : }
974 0 : ndr->depth--;
975 0 : ndr_print_ptr(ndr, "unix_info", r->unix_info);
976 0 : ndr->depth++;
977 0 : if (r->unix_info) {
978 0 : ndr_print_auth_user_info_unix(ndr, "unix_info", r->unix_info);
979 : }
980 0 : ndr->depth--;
981 0 : ndr_print_ptr(ndr, "torture", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NULL:r->torture);
982 : /* [ignore] 'torture' */
983 0 : ndr_print_ptr(ndr, "credentials", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NULL:r->credentials);
984 : /* [ignore] 'credentials' */
985 0 : ndr_print_GUID(ndr, "unique_session_token", &r->unique_session_token);
986 0 : ndr_print_ticket_type(ndr, "ticket_type", r->ticket_type);
987 0 : ndr->depth--;
988 : }
989 :
990 169096 : _PUBLIC_ enum ndr_err_code ndr_push_auth_session_info_transport(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct auth_session_info_transport *r)
991 : {
992 169096 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
993 169096 : if (ndr_flags & NDR_SCALARS) {
994 169096 : NDR_CHECK(ndr_push_align(ndr, 5));
995 169096 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->session_info));
996 169096 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->exported_gssapi_credentials));
997 169096 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
998 : }
999 169096 : if (ndr_flags & NDR_BUFFERS) {
1000 169096 : if (r->session_info) {
1001 169096 : NDR_CHECK(ndr_push_auth_session_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->session_info));
1002 : }
1003 : }
1004 167856 : return NDR_ERR_SUCCESS;
1005 : }
1006 :
1007 112934 : _PUBLIC_ enum ndr_err_code ndr_pull_auth_session_info_transport(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct auth_session_info_transport *r)
1008 : {
1009 628 : uint32_t _ptr_session_info;
1010 112934 : TALLOC_CTX *_mem_save_session_info_0 = NULL;
1011 112934 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1012 112934 : if (ndr_flags & NDR_SCALARS) {
1013 112934 : NDR_CHECK(ndr_pull_align(ndr, 5));
1014 112934 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_session_info));
1015 112934 : if (_ptr_session_info) {
1016 112934 : NDR_PULL_ALLOC(ndr, r->session_info);
1017 : } else {
1018 0 : r->session_info = NULL;
1019 : }
1020 112934 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->exported_gssapi_credentials));
1021 112934 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1022 : }
1023 112934 : if (ndr_flags & NDR_BUFFERS) {
1024 112934 : if (r->session_info) {
1025 112934 : _mem_save_session_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
1026 112934 : NDR_PULL_SET_MEM_CTX(ndr, r->session_info, 0);
1027 112934 : NDR_CHECK(ndr_pull_auth_session_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->session_info));
1028 112934 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_session_info_0, 0);
1029 : }
1030 : }
1031 112306 : return NDR_ERR_SUCCESS;
1032 : }
1033 :
1034 0 : static void ndr_print_flags_auth_session_info_transport(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct auth_session_info_transport *r)
1035 : {
1036 0 : ndr_print_auth_session_info_transport(ndr, name, r);
1037 0 : }
1038 :
1039 0 : _PUBLIC_ void ndr_print_auth_session_info_transport(struct ndr_print *ndr, const char *name, const struct auth_session_info_transport *r)
1040 : {
1041 0 : ndr_print_struct(ndr, name, "auth_session_info_transport");
1042 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1043 0 : ndr->depth++;
1044 0 : ndr_print_ptr(ndr, "session_info", r->session_info);
1045 0 : ndr->depth++;
1046 0 : if (r->session_info) {
1047 0 : ndr_print_auth_session_info(ndr, "session_info", r->session_info);
1048 : }
1049 0 : ndr->depth--;
1050 0 : ndr->depth--;
1051 : }
1052 :
1053 : #ifndef SKIP_NDR_TABLE_auth
1054 : static const struct ndr_interface_public_struct auth_public_structs[] = {
1055 : {
1056 : .name = "auth_user_info",
1057 : .struct_size = sizeof(struct auth_user_info ),
1058 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_auth_user_info,
1059 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_auth_user_info,
1060 : .ndr_print = (ndr_print_function_t) ndr_print_flags_auth_user_info,
1061 : },
1062 : {
1063 : .name = "auth_user_info_torture",
1064 : .struct_size = sizeof(struct auth_user_info_torture ),
1065 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_auth_user_info_torture,
1066 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_auth_user_info_torture,
1067 : .ndr_print = (ndr_print_function_t) ndr_print_flags_auth_user_info_torture,
1068 : },
1069 : {
1070 : .name = "auth_user_info_unix",
1071 : .struct_size = sizeof(struct auth_user_info_unix ),
1072 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_auth_user_info_unix,
1073 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_auth_user_info_unix,
1074 : .ndr_print = (ndr_print_function_t) ndr_print_flags_auth_user_info_unix,
1075 : },
1076 : {
1077 : .name = "auth_SidAttr",
1078 : .struct_size = sizeof(struct auth_SidAttr ),
1079 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_auth_SidAttr,
1080 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_auth_SidAttr,
1081 : .ndr_print = (ndr_print_function_t) ndr_print_flags_auth_SidAttr,
1082 : },
1083 : {
1084 : .name = "auth_user_info_dc",
1085 : .struct_size = sizeof(struct auth_user_info_dc ),
1086 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_auth_user_info_dc,
1087 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_auth_user_info_dc,
1088 : .ndr_print = (ndr_print_function_t) ndr_print_flags_auth_user_info_dc,
1089 : },
1090 : {
1091 : .name = "auth_session_info",
1092 : .struct_size = sizeof(struct auth_session_info ),
1093 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_auth_session_info,
1094 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_auth_session_info,
1095 : .ndr_print = (ndr_print_function_t) ndr_print_flags_auth_session_info,
1096 : },
1097 : {
1098 : .name = "auth_session_info_transport",
1099 : .struct_size = sizeof(struct auth_session_info_transport ),
1100 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_auth_session_info_transport,
1101 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_auth_session_info_transport,
1102 : .ndr_print = (ndr_print_function_t) ndr_print_flags_auth_session_info_transport,
1103 : },
1104 : { .name = NULL }
1105 : };
1106 :
1107 : static const struct ndr_interface_call auth_calls[] = {
1108 : { .name = NULL }
1109 : };
1110 :
1111 : static const char * const auth_endpoint_strings[] = {
1112 : "ncacn_np:[\\pipe\\auth]",
1113 : };
1114 :
1115 : static const struct ndr_interface_string_array auth_endpoints = {
1116 : .count = 1,
1117 : .names = auth_endpoint_strings
1118 : };
1119 :
1120 : static const char * const auth_authservice_strings[] = {
1121 : "host",
1122 : };
1123 :
1124 : static const struct ndr_interface_string_array auth_authservices = {
1125 : .count = 1,
1126 : .names = auth_authservice_strings
1127 : };
1128 :
1129 :
1130 : const struct ndr_interface_table ndr_table_auth = {
1131 : .name = "auth",
1132 : .num_calls = 0,
1133 : .calls = auth_calls,
1134 : .num_public_structs = 7,
1135 : .public_structs = auth_public_structs,
1136 : .endpoints = &auth_endpoints,
1137 : .authservices = &auth_authservices
1138 : };
1139 :
1140 : #endif /* SKIP_NDR_TABLE_auth */
|