1 | /* parser auto-generated by pidl */
|
---|
2 |
|
---|
3 | #include "includes.h"
|
---|
4 | #include "../librpc/gen_ndr/ndr_krb5pac.h"
|
---|
5 |
|
---|
6 | #include "librpc/gen_ndr/ndr_security.h"
|
---|
7 | #include "librpc/gen_ndr/ndr_netlogon.h"
|
---|
8 | #include "librpc/gen_ndr/ndr_samr.h"
|
---|
9 | static enum ndr_err_code ndr_push_PAC_LOGON_NAME(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_NAME *r)
|
---|
10 | {
|
---|
11 | if (ndr_flags & NDR_SCALARS) {
|
---|
12 | NDR_CHECK(ndr_push_align(ndr, 4));
|
---|
13 | NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logon_time));
|
---|
14 | NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->account_name)));
|
---|
15 | NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, 2 * strlen_m(r->account_name), sizeof(uint8_t), CH_UTF16));
|
---|
16 | NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
---|
17 | }
|
---|
18 | if (ndr_flags & NDR_BUFFERS) {
|
---|
19 | }
|
---|
20 | return NDR_ERR_SUCCESS;
|
---|
21 | }
|
---|
22 |
|
---|
23 | static enum ndr_err_code ndr_pull_PAC_LOGON_NAME(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_NAME *r)
|
---|
24 | {
|
---|
25 | uint32_t size_account_name_0 = 0;
|
---|
26 | if (ndr_flags & NDR_SCALARS) {
|
---|
27 | NDR_CHECK(ndr_pull_align(ndr, 4));
|
---|
28 | NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logon_time));
|
---|
29 | NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
|
---|
30 | size_account_name_0 = r->size;
|
---|
31 | NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, size_account_name_0, sizeof(uint8_t), CH_UTF16));
|
---|
32 | NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
---|
33 | }
|
---|
34 | if (ndr_flags & NDR_BUFFERS) {
|
---|
35 | }
|
---|
36 | return NDR_ERR_SUCCESS;
|
---|
37 | }
|
---|
38 |
|
---|
39 | _PUBLIC_ void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r)
|
---|
40 | {
|
---|
41 | ndr_print_struct(ndr, name, "PAC_LOGON_NAME");
|
---|
42 | ndr->depth++;
|
---|
43 | ndr_print_NTTIME(ndr, "logon_time", r->logon_time);
|
---|
44 | ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->account_name):r->size);
|
---|
45 | ndr_print_string(ndr, "account_name", r->account_name);
|
---|
46 | ndr->depth--;
|
---|
47 | }
|
---|
48 |
|
---|
49 | _PUBLIC_ enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r)
|
---|
50 | {
|
---|
51 | {
|
---|
52 | uint32_t _flags_save_STRUCT = ndr->flags;
|
---|
53 | ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
---|
54 | if (ndr_flags & NDR_SCALARS) {
|
---|
55 | NDR_CHECK(ndr_push_align(ndr, 4));
|
---|
56 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
|
---|
57 | {
|
---|
58 | uint32_t _flags_save_DATA_BLOB = ndr->flags;
|
---|
59 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
---|
60 | NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->signature));
|
---|
61 | ndr->flags = _flags_save_DATA_BLOB;
|
---|
62 | }
|
---|
63 | NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
---|
64 | }
|
---|
65 | if (ndr_flags & NDR_BUFFERS) {
|
---|
66 | }
|
---|
67 | ndr->flags = _flags_save_STRUCT;
|
---|
68 | }
|
---|
69 | return NDR_ERR_SUCCESS;
|
---|
70 | }
|
---|
71 |
|
---|
72 | _PUBLIC_ enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r)
|
---|
73 | {
|
---|
74 | {
|
---|
75 | uint32_t _flags_save_STRUCT = ndr->flags;
|
---|
76 | ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
---|
77 | if (ndr_flags & NDR_SCALARS) {
|
---|
78 | NDR_CHECK(ndr_pull_align(ndr, 4));
|
---|
79 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
|
---|
80 | {
|
---|
81 | uint32_t _flags_save_DATA_BLOB = ndr->flags;
|
---|
82 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
---|
83 | NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->signature));
|
---|
84 | ndr->flags = _flags_save_DATA_BLOB;
|
---|
85 | }
|
---|
86 | NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
---|
87 | }
|
---|
88 | if (ndr_flags & NDR_BUFFERS) {
|
---|
89 | }
|
---|
90 | ndr->flags = _flags_save_STRUCT;
|
---|
91 | }
|
---|
92 | return NDR_ERR_SUCCESS;
|
---|
93 | }
|
---|
94 |
|
---|
95 | _PUBLIC_ void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r)
|
---|
96 | {
|
---|
97 | ndr_print_struct(ndr, name, "PAC_SIGNATURE_DATA");
|
---|
98 | {
|
---|
99 | uint32_t _flags_save_STRUCT = ndr->flags;
|
---|
100 | ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
---|
101 | ndr->depth++;
|
---|
102 | ndr_print_uint32(ndr, "type", r->type);
|
---|
103 | ndr_print_DATA_BLOB(ndr, "signature", r->signature);
|
---|
104 | ndr->depth--;
|
---|
105 | ndr->flags = _flags_save_STRUCT;
|
---|
106 | }
|
---|
107 | }
|
---|
108 |
|
---|
109 | static enum ndr_err_code ndr_push_PAC_LOGON_INFO(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO *r)
|
---|
110 | {
|
---|
111 | if (ndr_flags & NDR_SCALARS) {
|
---|
112 | NDR_CHECK(ndr_push_align(ndr, 5));
|
---|
113 | NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
|
---|
114 | NDR_CHECK(ndr_push_unique_ptr(ndr, r->res_group_dom_sid));
|
---|
115 | NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups));
|
---|
116 | NDR_CHECK(ndr_push_trailer_align(ndr, 5));
|
---|
117 | }
|
---|
118 | if (ndr_flags & NDR_BUFFERS) {
|
---|
119 | NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
|
---|
120 | if (r->res_group_dom_sid) {
|
---|
121 | NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid));
|
---|
122 | }
|
---|
123 | NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups));
|
---|
124 | }
|
---|
125 | return NDR_ERR_SUCCESS;
|
---|
126 | }
|
---|
127 |
|
---|
128 | static enum ndr_err_code ndr_pull_PAC_LOGON_INFO(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO *r)
|
---|
129 | {
|
---|
130 | uint32_t _ptr_res_group_dom_sid;
|
---|
131 | TALLOC_CTX *_mem_save_res_group_dom_sid_0;
|
---|
132 | if (ndr_flags & NDR_SCALARS) {
|
---|
133 | NDR_CHECK(ndr_pull_align(ndr, 5));
|
---|
134 | NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
|
---|
135 | NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_res_group_dom_sid));
|
---|
136 | if (_ptr_res_group_dom_sid) {
|
---|
137 | NDR_PULL_ALLOC(ndr, r->res_group_dom_sid);
|
---|
138 | } else {
|
---|
139 | r->res_group_dom_sid = NULL;
|
---|
140 | }
|
---|
141 | NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups));
|
---|
142 | NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
|
---|
143 | }
|
---|
144 | if (ndr_flags & NDR_BUFFERS) {
|
---|
145 | NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
|
---|
146 | if (r->res_group_dom_sid) {
|
---|
147 | _mem_save_res_group_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
---|
148 | NDR_PULL_SET_MEM_CTX(ndr, r->res_group_dom_sid, 0);
|
---|
149 | NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid));
|
---|
150 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_group_dom_sid_0, 0);
|
---|
151 | }
|
---|
152 | NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups));
|
---|
153 | }
|
---|
154 | return NDR_ERR_SUCCESS;
|
---|
155 | }
|
---|
156 |
|
---|
157 | _PUBLIC_ void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r)
|
---|
158 | {
|
---|
159 | ndr_print_struct(ndr, name, "PAC_LOGON_INFO");
|
---|
160 | ndr->depth++;
|
---|
161 | ndr_print_netr_SamInfo3(ndr, "info3", &r->info3);
|
---|
162 | ndr_print_ptr(ndr, "res_group_dom_sid", r->res_group_dom_sid);
|
---|
163 | ndr->depth++;
|
---|
164 | if (r->res_group_dom_sid) {
|
---|
165 | ndr_print_dom_sid2(ndr, "res_group_dom_sid", r->res_group_dom_sid);
|
---|
166 | }
|
---|
167 | ndr->depth--;
|
---|
168 | ndr_print_samr_RidWithAttributeArray(ndr, "res_groups", &r->res_groups);
|
---|
169 | ndr->depth--;
|
---|
170 | }
|
---|
171 |
|
---|
172 | _PUBLIC_ enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r)
|
---|
173 | {
|
---|
174 | if (ndr_flags & NDR_SCALARS) {
|
---|
175 | NDR_CHECK(ndr_push_align(ndr, 5));
|
---|
176 | NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
|
---|
177 | NDR_CHECK(ndr_push_trailer_align(ndr, 5));
|
---|
178 | }
|
---|
179 | if (ndr_flags & NDR_BUFFERS) {
|
---|
180 | if (r->info) {
|
---|
181 | NDR_CHECK(ndr_push_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
|
---|
182 | }
|
---|
183 | }
|
---|
184 | return NDR_ERR_SUCCESS;
|
---|
185 | }
|
---|
186 |
|
---|
187 | _PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r)
|
---|
188 | {
|
---|
189 | uint32_t _ptr_info;
|
---|
190 | TALLOC_CTX *_mem_save_info_0;
|
---|
191 | if (ndr_flags & NDR_SCALARS) {
|
---|
192 | NDR_CHECK(ndr_pull_align(ndr, 5));
|
---|
193 | NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
|
---|
194 | if (_ptr_info) {
|
---|
195 | NDR_PULL_ALLOC(ndr, r->info);
|
---|
196 | } else {
|
---|
197 | r->info = NULL;
|
---|
198 | }
|
---|
199 | NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
|
---|
200 | }
|
---|
201 | if (ndr_flags & NDR_BUFFERS) {
|
---|
202 | if (r->info) {
|
---|
203 | _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
---|
204 | NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
|
---|
205 | NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
|
---|
206 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
|
---|
207 | }
|
---|
208 | }
|
---|
209 | return NDR_ERR_SUCCESS;
|
---|
210 | }
|
---|
211 |
|
---|
212 | _PUBLIC_ void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r)
|
---|
213 | {
|
---|
214 | ndr_print_struct(ndr, name, "PAC_LOGON_INFO_CTR");
|
---|
215 | ndr->depth++;
|
---|
216 | ndr_print_ptr(ndr, "info", r->info);
|
---|
217 | ndr->depth++;
|
---|
218 | if (r->info) {
|
---|
219 | ndr_print_PAC_LOGON_INFO(ndr, "info", r->info);
|
---|
220 | }
|
---|
221 | ndr->depth--;
|
---|
222 | ndr->depth--;
|
---|
223 | }
|
---|
224 |
|
---|
225 | _PUBLIC_ enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r)
|
---|
226 | {
|
---|
227 | NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
|
---|
228 | return NDR_ERR_SUCCESS;
|
---|
229 | }
|
---|
230 |
|
---|
231 | _PUBLIC_ enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r)
|
---|
232 | {
|
---|
233 | uint32_t v;
|
---|
234 | NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
|
---|
235 | *r = v;
|
---|
236 | return NDR_ERR_SUCCESS;
|
---|
237 | }
|
---|
238 |
|
---|
239 | _PUBLIC_ void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r)
|
---|
240 | {
|
---|
241 | const char *val = NULL;
|
---|
242 |
|
---|
243 | switch (r) {
|
---|
244 | case PAC_TYPE_LOGON_INFO: val = "PAC_TYPE_LOGON_INFO"; break;
|
---|
245 | case PAC_TYPE_SRV_CHECKSUM: val = "PAC_TYPE_SRV_CHECKSUM"; break;
|
---|
246 | case PAC_TYPE_KDC_CHECKSUM: val = "PAC_TYPE_KDC_CHECKSUM"; break;
|
---|
247 | case PAC_TYPE_LOGON_NAME: val = "PAC_TYPE_LOGON_NAME"; break;
|
---|
248 | case PAC_TYPE_CONSTRAINED_DELEGATION: val = "PAC_TYPE_CONSTRAINED_DELEGATION"; break;
|
---|
249 | case PAC_TYPE_UNKNOWN_12: val = "PAC_TYPE_UNKNOWN_12"; break;
|
---|
250 | }
|
---|
251 | ndr_print_enum(ndr, name, "ENUM", val, r);
|
---|
252 | }
|
---|
253 |
|
---|
254 | static enum ndr_err_code ndr_push_DATA_BLOB_REM(struct ndr_push *ndr, int ndr_flags, const struct DATA_BLOB_REM *r)
|
---|
255 | {
|
---|
256 | if (ndr_flags & NDR_SCALARS) {
|
---|
257 | NDR_CHECK(ndr_push_align(ndr, 4));
|
---|
258 | {
|
---|
259 | uint32_t _flags_save_DATA_BLOB = ndr->flags;
|
---|
260 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
---|
261 | NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->remaining));
|
---|
262 | ndr->flags = _flags_save_DATA_BLOB;
|
---|
263 | }
|
---|
264 | NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
---|
265 | }
|
---|
266 | if (ndr_flags & NDR_BUFFERS) {
|
---|
267 | }
|
---|
268 | return NDR_ERR_SUCCESS;
|
---|
269 | }
|
---|
270 |
|
---|
271 | static enum ndr_err_code ndr_pull_DATA_BLOB_REM(struct ndr_pull *ndr, int ndr_flags, struct DATA_BLOB_REM *r)
|
---|
272 | {
|
---|
273 | if (ndr_flags & NDR_SCALARS) {
|
---|
274 | NDR_CHECK(ndr_pull_align(ndr, 4));
|
---|
275 | {
|
---|
276 | uint32_t _flags_save_DATA_BLOB = ndr->flags;
|
---|
277 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
---|
278 | NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->remaining));
|
---|
279 | ndr->flags = _flags_save_DATA_BLOB;
|
---|
280 | }
|
---|
281 | NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
---|
282 | }
|
---|
283 | if (ndr_flags & NDR_BUFFERS) {
|
---|
284 | }
|
---|
285 | return NDR_ERR_SUCCESS;
|
---|
286 | }
|
---|
287 |
|
---|
288 | _PUBLIC_ void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r)
|
---|
289 | {
|
---|
290 | ndr_print_struct(ndr, name, "DATA_BLOB_REM");
|
---|
291 | ndr->depth++;
|
---|
292 | ndr_print_DATA_BLOB(ndr, "remaining", r->remaining);
|
---|
293 | ndr->depth--;
|
---|
294 | }
|
---|
295 |
|
---|
296 | _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r)
|
---|
297 | {
|
---|
298 | if (ndr_flags & NDR_SCALARS) {
|
---|
299 | int level = ndr_push_get_switch_value(ndr, r);
|
---|
300 | NDR_CHECK(ndr_push_union_align(ndr, 4));
|
---|
301 | switch (level) {
|
---|
302 | case PAC_TYPE_LOGON_INFO: {
|
---|
303 | {
|
---|
304 | struct ndr_push *_ndr_logon_info;
|
---|
305 | NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_logon_info, 0xFFFFFC01, -1));
|
---|
306 | NDR_CHECK(ndr_push_PAC_LOGON_INFO_CTR(_ndr_logon_info, NDR_SCALARS|NDR_BUFFERS, &r->logon_info));
|
---|
307 | NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_logon_info, 0xFFFFFC01, -1));
|
---|
308 | }
|
---|
309 | break; }
|
---|
310 |
|
---|
311 | case PAC_TYPE_SRV_CHECKSUM: {
|
---|
312 | NDR_CHECK(ndr_push_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->srv_cksum));
|
---|
313 | break; }
|
---|
314 |
|
---|
315 | case PAC_TYPE_KDC_CHECKSUM: {
|
---|
316 | NDR_CHECK(ndr_push_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->kdc_cksum));
|
---|
317 | break; }
|
---|
318 |
|
---|
319 | case PAC_TYPE_LOGON_NAME: {
|
---|
320 | NDR_CHECK(ndr_push_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name));
|
---|
321 | break; }
|
---|
322 |
|
---|
323 | default: {
|
---|
324 | {
|
---|
325 | struct ndr_push *_ndr_unknown;
|
---|
326 | NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_unknown, 0, -1));
|
---|
327 | NDR_CHECK(ndr_push_DATA_BLOB_REM(_ndr_unknown, NDR_SCALARS, &r->unknown));
|
---|
328 | NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_unknown, 0, -1));
|
---|
329 | }
|
---|
330 | break; }
|
---|
331 |
|
---|
332 | }
|
---|
333 | }
|
---|
334 | if (ndr_flags & NDR_BUFFERS) {
|
---|
335 | int level = ndr_push_get_switch_value(ndr, r);
|
---|
336 | switch (level) {
|
---|
337 | case PAC_TYPE_LOGON_INFO:
|
---|
338 | break;
|
---|
339 |
|
---|
340 | case PAC_TYPE_SRV_CHECKSUM:
|
---|
341 | break;
|
---|
342 |
|
---|
343 | case PAC_TYPE_KDC_CHECKSUM:
|
---|
344 | break;
|
---|
345 |
|
---|
346 | case PAC_TYPE_LOGON_NAME:
|
---|
347 | break;
|
---|
348 |
|
---|
349 | default:
|
---|
350 | break;
|
---|
351 |
|
---|
352 | }
|
---|
353 | }
|
---|
354 | return NDR_ERR_SUCCESS;
|
---|
355 | }
|
---|
356 |
|
---|
357 | _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r)
|
---|
358 | {
|
---|
359 | int level;
|
---|
360 | level = ndr_pull_get_switch_value(ndr, r);
|
---|
361 | if (ndr_flags & NDR_SCALARS) {
|
---|
362 | NDR_CHECK(ndr_pull_union_align(ndr, 4));
|
---|
363 | switch (level) {
|
---|
364 | case PAC_TYPE_LOGON_INFO: {
|
---|
365 | {
|
---|
366 | struct ndr_pull *_ndr_logon_info;
|
---|
367 | NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_logon_info, 0xFFFFFC01, -1));
|
---|
368 | NDR_CHECK(ndr_pull_PAC_LOGON_INFO_CTR(_ndr_logon_info, NDR_SCALARS|NDR_BUFFERS, &r->logon_info));
|
---|
369 | NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_logon_info, 0xFFFFFC01, -1));
|
---|
370 | }
|
---|
371 | break; }
|
---|
372 |
|
---|
373 | case PAC_TYPE_SRV_CHECKSUM: {
|
---|
374 | NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->srv_cksum));
|
---|
375 | break; }
|
---|
376 |
|
---|
377 | case PAC_TYPE_KDC_CHECKSUM: {
|
---|
378 | NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->kdc_cksum));
|
---|
379 | break; }
|
---|
380 |
|
---|
381 | case PAC_TYPE_LOGON_NAME: {
|
---|
382 | NDR_CHECK(ndr_pull_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name));
|
---|
383 | break; }
|
---|
384 |
|
---|
385 | default: {
|
---|
386 | {
|
---|
387 | struct ndr_pull *_ndr_unknown;
|
---|
388 | NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_unknown, 0, -1));
|
---|
389 | NDR_CHECK(ndr_pull_DATA_BLOB_REM(_ndr_unknown, NDR_SCALARS, &r->unknown));
|
---|
390 | NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_unknown, 0, -1));
|
---|
391 | }
|
---|
392 | break; }
|
---|
393 |
|
---|
394 | }
|
---|
395 | }
|
---|
396 | if (ndr_flags & NDR_BUFFERS) {
|
---|
397 | switch (level) {
|
---|
398 | case PAC_TYPE_LOGON_INFO:
|
---|
399 | break;
|
---|
400 |
|
---|
401 | case PAC_TYPE_SRV_CHECKSUM:
|
---|
402 | break;
|
---|
403 |
|
---|
404 | case PAC_TYPE_KDC_CHECKSUM:
|
---|
405 | break;
|
---|
406 |
|
---|
407 | case PAC_TYPE_LOGON_NAME:
|
---|
408 | break;
|
---|
409 |
|
---|
410 | default:
|
---|
411 | break;
|
---|
412 |
|
---|
413 | }
|
---|
414 | }
|
---|
415 | return NDR_ERR_SUCCESS;
|
---|
416 | }
|
---|
417 |
|
---|
418 | _PUBLIC_ void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r)
|
---|
419 | {
|
---|
420 | int level;
|
---|
421 | level = ndr_print_get_switch_value(ndr, r);
|
---|
422 | ndr_print_union(ndr, name, level, "PAC_INFO");
|
---|
423 | switch (level) {
|
---|
424 | case PAC_TYPE_LOGON_INFO:
|
---|
425 | ndr_print_PAC_LOGON_INFO_CTR(ndr, "logon_info", &r->logon_info);
|
---|
426 | break;
|
---|
427 |
|
---|
428 | case PAC_TYPE_SRV_CHECKSUM:
|
---|
429 | ndr_print_PAC_SIGNATURE_DATA(ndr, "srv_cksum", &r->srv_cksum);
|
---|
430 | break;
|
---|
431 |
|
---|
432 | case PAC_TYPE_KDC_CHECKSUM:
|
---|
433 | ndr_print_PAC_SIGNATURE_DATA(ndr, "kdc_cksum", &r->kdc_cksum);
|
---|
434 | break;
|
---|
435 |
|
---|
436 | case PAC_TYPE_LOGON_NAME:
|
---|
437 | ndr_print_PAC_LOGON_NAME(ndr, "logon_name", &r->logon_name);
|
---|
438 | break;
|
---|
439 |
|
---|
440 | default:
|
---|
441 | ndr_print_DATA_BLOB_REM(ndr, "unknown", &r->unknown);
|
---|
442 | break;
|
---|
443 |
|
---|
444 | }
|
---|
445 | }
|
---|
446 |
|
---|
447 | _PUBLIC_ size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
|
---|
448 | {
|
---|
449 | return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_PAC_INFO, ic);
|
---|
450 | }
|
---|
451 |
|
---|
452 | _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r)
|
---|
453 | {
|
---|
454 | uint32_t cntr_buffers_0;
|
---|
455 | if (ndr_flags & NDR_SCALARS) {
|
---|
456 | NDR_CHECK(ndr_push_align(ndr, 5));
|
---|
457 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_buffers));
|
---|
458 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
|
---|
459 | for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
|
---|
460 | NDR_CHECK(ndr_push_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
|
---|
461 | }
|
---|
462 | NDR_CHECK(ndr_push_trailer_align(ndr, 5));
|
---|
463 | }
|
---|
464 | if (ndr_flags & NDR_BUFFERS) {
|
---|
465 | for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
|
---|
466 | NDR_CHECK(ndr_push_PAC_BUFFER(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
|
---|
467 | }
|
---|
468 | }
|
---|
469 | return NDR_ERR_SUCCESS;
|
---|
470 | }
|
---|
471 |
|
---|
472 | _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r)
|
---|
473 | {
|
---|
474 | uint32_t size_buffers_0 = 0;
|
---|
475 | uint32_t cntr_buffers_0;
|
---|
476 | TALLOC_CTX *_mem_save_buffers_0;
|
---|
477 | if (ndr_flags & NDR_SCALARS) {
|
---|
478 | NDR_CHECK(ndr_pull_align(ndr, 5));
|
---|
479 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_buffers));
|
---|
480 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
|
---|
481 | size_buffers_0 = r->num_buffers;
|
---|
482 | NDR_PULL_ALLOC_N(ndr, r->buffers, size_buffers_0);
|
---|
483 | _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
---|
484 | NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
|
---|
485 | for (cntr_buffers_0 = 0; cntr_buffers_0 < size_buffers_0; cntr_buffers_0++) {
|
---|
486 | NDR_CHECK(ndr_pull_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
|
---|
487 | }
|
---|
488 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
|
---|
489 | NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
|
---|
490 | }
|
---|
491 | if (ndr_flags & NDR_BUFFERS) {
|
---|
492 | size_buffers_0 = r->num_buffers;
|
---|
493 | _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
---|
494 | NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
|
---|
495 | for (cntr_buffers_0 = 0; cntr_buffers_0 < size_buffers_0; cntr_buffers_0++) {
|
---|
496 | NDR_CHECK(ndr_pull_PAC_BUFFER(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
|
---|
497 | }
|
---|
498 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
|
---|
499 | }
|
---|
500 | return NDR_ERR_SUCCESS;
|
---|
501 | }
|
---|
502 |
|
---|
503 | _PUBLIC_ void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r)
|
---|
504 | {
|
---|
505 | uint32_t cntr_buffers_0;
|
---|
506 | ndr_print_struct(ndr, name, "PAC_DATA");
|
---|
507 | ndr->depth++;
|
---|
508 | ndr_print_uint32(ndr, "num_buffers", r->num_buffers);
|
---|
509 | ndr_print_uint32(ndr, "version", r->version);
|
---|
510 | ndr->print(ndr, "%s: ARRAY(%d)", "buffers", (int)r->num_buffers);
|
---|
511 | ndr->depth++;
|
---|
512 | for (cntr_buffers_0=0;cntr_buffers_0<r->num_buffers;cntr_buffers_0++) {
|
---|
513 | char *idx_0=NULL;
|
---|
514 | if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) {
|
---|
515 | ndr_print_PAC_BUFFER(ndr, "buffers", &r->buffers[cntr_buffers_0]);
|
---|
516 | free(idx_0);
|
---|
517 | }
|
---|
518 | }
|
---|
519 | ndr->depth--;
|
---|
520 | ndr->depth--;
|
---|
521 | }
|
---|
522 |
|
---|
523 | _PUBLIC_ enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r)
|
---|
524 | {
|
---|
525 | if (ndr_flags & NDR_SCALARS) {
|
---|
526 | NDR_CHECK(ndr_push_align(ndr, 5));
|
---|
527 | NDR_CHECK(ndr_push_PAC_TYPE(ndr, NDR_SCALARS, r->type));
|
---|
528 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ndr_size));
|
---|
529 | {
|
---|
530 | uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
|
---|
531 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
|
---|
532 | NDR_CHECK(ndr_push_relative_ptr1(ndr, r->info));
|
---|
533 | ndr->flags = _flags_save_DATA_BLOB_REM;
|
---|
534 | }
|
---|
535 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
|
---|
536 | NDR_CHECK(ndr_push_trailer_align(ndr, 5));
|
---|
537 | }
|
---|
538 | if (ndr_flags & NDR_BUFFERS) {
|
---|
539 | {
|
---|
540 | uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
|
---|
541 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
|
---|
542 | if (r->info) {
|
---|
543 | NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->info));
|
---|
544 | {
|
---|
545 | struct ndr_push *_ndr_info;
|
---|
546 | NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
|
---|
547 | NDR_CHECK(ndr_push_DATA_BLOB_REM(_ndr_info, NDR_SCALARS, r->info));
|
---|
548 | NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
|
---|
549 | }
|
---|
550 | NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->info));
|
---|
551 | }
|
---|
552 | ndr->flags = _flags_save_DATA_BLOB_REM;
|
---|
553 | }
|
---|
554 | }
|
---|
555 | return NDR_ERR_SUCCESS;
|
---|
556 | }
|
---|
557 |
|
---|
558 | _PUBLIC_ enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r)
|
---|
559 | {
|
---|
560 | uint32_t _ptr_info;
|
---|
561 | TALLOC_CTX *_mem_save_info_0;
|
---|
562 | if (ndr_flags & NDR_SCALARS) {
|
---|
563 | NDR_CHECK(ndr_pull_align(ndr, 5));
|
---|
564 | NDR_CHECK(ndr_pull_PAC_TYPE(ndr, NDR_SCALARS, &r->type));
|
---|
565 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ndr_size));
|
---|
566 | {
|
---|
567 | uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
|
---|
568 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
|
---|
569 | NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
|
---|
570 | if (_ptr_info) {
|
---|
571 | NDR_PULL_ALLOC(ndr, r->info);
|
---|
572 | NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->info, _ptr_info));
|
---|
573 | } else {
|
---|
574 | r->info = NULL;
|
---|
575 | }
|
---|
576 | ndr->flags = _flags_save_DATA_BLOB_REM;
|
---|
577 | }
|
---|
578 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad));
|
---|
579 | NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
|
---|
580 | }
|
---|
581 | if (ndr_flags & NDR_BUFFERS) {
|
---|
582 | {
|
---|
583 | uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
|
---|
584 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
|
---|
585 | if (r->info) {
|
---|
586 | uint32_t _relative_save_offset;
|
---|
587 | _relative_save_offset = ndr->offset;
|
---|
588 | NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->info));
|
---|
589 | _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
---|
590 | NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
|
---|
591 | {
|
---|
592 | struct ndr_pull *_ndr_info;
|
---|
593 | NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
|
---|
594 | NDR_CHECK(ndr_pull_DATA_BLOB_REM(_ndr_info, NDR_SCALARS, r->info));
|
---|
595 | NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
|
---|
596 | }
|
---|
597 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
|
---|
598 | ndr->offset = _relative_save_offset;
|
---|
599 | }
|
---|
600 | ndr->flags = _flags_save_DATA_BLOB_REM;
|
---|
601 | }
|
---|
602 | }
|
---|
603 | return NDR_ERR_SUCCESS;
|
---|
604 | }
|
---|
605 |
|
---|
606 | _PUBLIC_ void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r)
|
---|
607 | {
|
---|
608 | ndr_print_struct(ndr, name, "PAC_BUFFER_RAW");
|
---|
609 | ndr->depth++;
|
---|
610 | ndr_print_PAC_TYPE(ndr, "type", r->type);
|
---|
611 | ndr_print_uint32(ndr, "ndr_size", r->ndr_size);
|
---|
612 | ndr_print_ptr(ndr, "info", r->info);
|
---|
613 | ndr->depth++;
|
---|
614 | if (r->info) {
|
---|
615 | ndr_print_DATA_BLOB_REM(ndr, "info", r->info);
|
---|
616 | }
|
---|
617 | ndr->depth--;
|
---|
618 | ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad);
|
---|
619 | ndr->depth--;
|
---|
620 | }
|
---|
621 |
|
---|
622 | _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r)
|
---|
623 | {
|
---|
624 | uint32_t cntr_buffers_0;
|
---|
625 | if (ndr_flags & NDR_SCALARS) {
|
---|
626 | NDR_CHECK(ndr_push_align(ndr, 5));
|
---|
627 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_buffers));
|
---|
628 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
|
---|
629 | for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
|
---|
630 | NDR_CHECK(ndr_push_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
|
---|
631 | }
|
---|
632 | NDR_CHECK(ndr_push_trailer_align(ndr, 5));
|
---|
633 | }
|
---|
634 | if (ndr_flags & NDR_BUFFERS) {
|
---|
635 | for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
|
---|
636 | NDR_CHECK(ndr_push_PAC_BUFFER_RAW(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
|
---|
637 | }
|
---|
638 | }
|
---|
639 | return NDR_ERR_SUCCESS;
|
---|
640 | }
|
---|
641 |
|
---|
642 | _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r)
|
---|
643 | {
|
---|
644 | uint32_t size_buffers_0 = 0;
|
---|
645 | uint32_t cntr_buffers_0;
|
---|
646 | TALLOC_CTX *_mem_save_buffers_0;
|
---|
647 | if (ndr_flags & NDR_SCALARS) {
|
---|
648 | NDR_CHECK(ndr_pull_align(ndr, 5));
|
---|
649 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_buffers));
|
---|
650 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
|
---|
651 | size_buffers_0 = r->num_buffers;
|
---|
652 | NDR_PULL_ALLOC_N(ndr, r->buffers, size_buffers_0);
|
---|
653 | _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
---|
654 | NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
|
---|
655 | for (cntr_buffers_0 = 0; cntr_buffers_0 < size_buffers_0; cntr_buffers_0++) {
|
---|
656 | NDR_CHECK(ndr_pull_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
|
---|
657 | }
|
---|
658 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
|
---|
659 | NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
|
---|
660 | }
|
---|
661 | if (ndr_flags & NDR_BUFFERS) {
|
---|
662 | size_buffers_0 = r->num_buffers;
|
---|
663 | _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
---|
664 | NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
|
---|
665 | for (cntr_buffers_0 = 0; cntr_buffers_0 < size_buffers_0; cntr_buffers_0++) {
|
---|
666 | NDR_CHECK(ndr_pull_PAC_BUFFER_RAW(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
|
---|
667 | }
|
---|
668 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
|
---|
669 | }
|
---|
670 | return NDR_ERR_SUCCESS;
|
---|
671 | }
|
---|
672 |
|
---|
673 | _PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r)
|
---|
674 | {
|
---|
675 | uint32_t cntr_buffers_0;
|
---|
676 | ndr_print_struct(ndr, name, "PAC_DATA_RAW");
|
---|
677 | ndr->depth++;
|
---|
678 | ndr_print_uint32(ndr, "num_buffers", r->num_buffers);
|
---|
679 | ndr_print_uint32(ndr, "version", r->version);
|
---|
680 | ndr->print(ndr, "%s: ARRAY(%d)", "buffers", (int)r->num_buffers);
|
---|
681 | ndr->depth++;
|
---|
682 | for (cntr_buffers_0=0;cntr_buffers_0<r->num_buffers;cntr_buffers_0++) {
|
---|
683 | char *idx_0=NULL;
|
---|
684 | if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) {
|
---|
685 | ndr_print_PAC_BUFFER_RAW(ndr, "buffers", &r->buffers[cntr_buffers_0]);
|
---|
686 | free(idx_0);
|
---|
687 | }
|
---|
688 | }
|
---|
689 | ndr->depth--;
|
---|
690 | ndr->depth--;
|
---|
691 | }
|
---|
692 |
|
---|
693 | _PUBLIC_ enum ndr_err_code ndr_push_PAC_Validate(struct ndr_push *ndr, int ndr_flags, const struct PAC_Validate *r)
|
---|
694 | {
|
---|
695 | if (ndr_flags & NDR_SCALARS) {
|
---|
696 | NDR_CHECK(ndr_push_align(ndr, 4));
|
---|
697 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NETLOGON_GENERIC_KRB5_PAC_VALIDATE));
|
---|
698 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ChecksumLength));
|
---|
699 | NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->SignatureType));
|
---|
700 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SignatureLength));
|
---|
701 | {
|
---|
702 | uint32_t _flags_save_DATA_BLOB = ndr->flags;
|
---|
703 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
---|
704 | NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->ChecksumAndSignature));
|
---|
705 | ndr->flags = _flags_save_DATA_BLOB;
|
---|
706 | }
|
---|
707 | NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
---|
708 | }
|
---|
709 | if (ndr_flags & NDR_BUFFERS) {
|
---|
710 | }
|
---|
711 | return NDR_ERR_SUCCESS;
|
---|
712 | }
|
---|
713 |
|
---|
714 | _PUBLIC_ enum ndr_err_code ndr_pull_PAC_Validate(struct ndr_pull *ndr, int ndr_flags, struct PAC_Validate *r)
|
---|
715 | {
|
---|
716 | if (ndr_flags & NDR_SCALARS) {
|
---|
717 | NDR_CHECK(ndr_pull_align(ndr, 4));
|
---|
718 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MessageType));
|
---|
719 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ChecksumLength));
|
---|
720 | NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->SignatureType));
|
---|
721 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SignatureLength));
|
---|
722 | {
|
---|
723 | uint32_t _flags_save_DATA_BLOB = ndr->flags;
|
---|
724 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
---|
725 | NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->ChecksumAndSignature));
|
---|
726 | ndr->flags = _flags_save_DATA_BLOB;
|
---|
727 | }
|
---|
728 | NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
---|
729 | }
|
---|
730 | if (ndr_flags & NDR_BUFFERS) {
|
---|
731 | }
|
---|
732 | return NDR_ERR_SUCCESS;
|
---|
733 | }
|
---|
734 |
|
---|
735 | _PUBLIC_ void ndr_print_PAC_Validate(struct ndr_print *ndr, const char *name, const struct PAC_Validate *r)
|
---|
736 | {
|
---|
737 | ndr_print_struct(ndr, name, "PAC_Validate");
|
---|
738 | ndr->depth++;
|
---|
739 | ndr_print_uint32(ndr, "MessageType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NETLOGON_GENERIC_KRB5_PAC_VALIDATE:r->MessageType);
|
---|
740 | ndr_print_uint32(ndr, "ChecksumLength", r->ChecksumLength);
|
---|
741 | ndr_print_int32(ndr, "SignatureType", r->SignatureType);
|
---|
742 | ndr_print_uint32(ndr, "SignatureLength", r->SignatureLength);
|
---|
743 | ndr_print_DATA_BLOB(ndr, "ChecksumAndSignature", r->ChecksumAndSignature);
|
---|
744 | ndr->depth--;
|
---|
745 | }
|
---|
746 |
|
---|
747 | _PUBLIC_ enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r)
|
---|
748 | {
|
---|
749 | if (ndr_flags & NDR_SCALARS) {
|
---|
750 | NDR_CHECK(ndr_push_align(ndr, 5));
|
---|
751 | NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
|
---|
752 | NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
|
---|
753 | NDR_CHECK(ndr_push_trailer_align(ndr, 5));
|
---|
754 | }
|
---|
755 | if (ndr_flags & NDR_BUFFERS) {
|
---|
756 | NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
|
---|
757 | }
|
---|
758 | return NDR_ERR_SUCCESS;
|
---|
759 | }
|
---|
760 |
|
---|
761 | _PUBLIC_ enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r)
|
---|
762 | {
|
---|
763 | if (ndr_flags & NDR_SCALARS) {
|
---|
764 | NDR_CHECK(ndr_pull_align(ndr, 5));
|
---|
765 | NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
|
---|
766 | NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
|
---|
767 | NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
|
---|
768 | }
|
---|
769 | if (ndr_flags & NDR_BUFFERS) {
|
---|
770 | NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
|
---|
771 | }
|
---|
772 | return NDR_ERR_SUCCESS;
|
---|
773 | }
|
---|
774 |
|
---|
775 | _PUBLIC_ void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r)
|
---|
776 | {
|
---|
777 | ndr_print_struct(ndr, name, "netsamlogoncache_entry");
|
---|
778 | ndr->depth++;
|
---|
779 | ndr_print_time_t(ndr, "timestamp", r->timestamp);
|
---|
780 | ndr_print_netr_SamInfo3(ndr, "info3", &r->info3);
|
---|
781 | ndr->depth--;
|
---|
782 | }
|
---|
783 |
|
---|
784 | static enum ndr_err_code ndr_push_decode_pac(struct ndr_push *ndr, int flags, const struct decode_pac *r)
|
---|
785 | {
|
---|
786 | if (flags & NDR_IN) {
|
---|
787 | NDR_CHECK(ndr_push_PAC_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
|
---|
788 | }
|
---|
789 | if (flags & NDR_OUT) {
|
---|
790 | }
|
---|
791 | return NDR_ERR_SUCCESS;
|
---|
792 | }
|
---|
793 |
|
---|
794 | static enum ndr_err_code ndr_pull_decode_pac(struct ndr_pull *ndr, int flags, struct decode_pac *r)
|
---|
795 | {
|
---|
796 | if (flags & NDR_IN) {
|
---|
797 | NDR_CHECK(ndr_pull_PAC_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
|
---|
798 | }
|
---|
799 | if (flags & NDR_OUT) {
|
---|
800 | }
|
---|
801 | return NDR_ERR_SUCCESS;
|
---|
802 | }
|
---|
803 |
|
---|
804 | _PUBLIC_ void ndr_print_decode_pac(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac *r)
|
---|
805 | {
|
---|
806 | ndr_print_struct(ndr, name, "decode_pac");
|
---|
807 | ndr->depth++;
|
---|
808 | if (flags & NDR_SET_VALUES) {
|
---|
809 | ndr->flags |= LIBNDR_PRINT_SET_VALUES;
|
---|
810 | }
|
---|
811 | if (flags & NDR_IN) {
|
---|
812 | ndr_print_struct(ndr, "in", "decode_pac");
|
---|
813 | ndr->depth++;
|
---|
814 | ndr_print_PAC_DATA(ndr, "pac", &r->in.pac);
|
---|
815 | ndr->depth--;
|
---|
816 | }
|
---|
817 | if (flags & NDR_OUT) {
|
---|
818 | ndr_print_struct(ndr, "out", "decode_pac");
|
---|
819 | ndr->depth++;
|
---|
820 | ndr->depth--;
|
---|
821 | }
|
---|
822 | ndr->depth--;
|
---|
823 | }
|
---|
824 |
|
---|
825 | static enum ndr_err_code ndr_push_decode_pac_raw(struct ndr_push *ndr, int flags, const struct decode_pac_raw *r)
|
---|
826 | {
|
---|
827 | if (flags & NDR_IN) {
|
---|
828 | NDR_CHECK(ndr_push_PAC_DATA_RAW(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
|
---|
829 | }
|
---|
830 | if (flags & NDR_OUT) {
|
---|
831 | }
|
---|
832 | return NDR_ERR_SUCCESS;
|
---|
833 | }
|
---|
834 |
|
---|
835 | static enum ndr_err_code ndr_pull_decode_pac_raw(struct ndr_pull *ndr, int flags, struct decode_pac_raw *r)
|
---|
836 | {
|
---|
837 | if (flags & NDR_IN) {
|
---|
838 | NDR_CHECK(ndr_pull_PAC_DATA_RAW(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
|
---|
839 | }
|
---|
840 | if (flags & NDR_OUT) {
|
---|
841 | }
|
---|
842 | return NDR_ERR_SUCCESS;
|
---|
843 | }
|
---|
844 |
|
---|
845 | _PUBLIC_ void ndr_print_decode_pac_raw(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_raw *r)
|
---|
846 | {
|
---|
847 | ndr_print_struct(ndr, name, "decode_pac_raw");
|
---|
848 | ndr->depth++;
|
---|
849 | if (flags & NDR_SET_VALUES) {
|
---|
850 | ndr->flags |= LIBNDR_PRINT_SET_VALUES;
|
---|
851 | }
|
---|
852 | if (flags & NDR_IN) {
|
---|
853 | ndr_print_struct(ndr, "in", "decode_pac_raw");
|
---|
854 | ndr->depth++;
|
---|
855 | ndr_print_PAC_DATA_RAW(ndr, "pac", &r->in.pac);
|
---|
856 | ndr->depth--;
|
---|
857 | }
|
---|
858 | if (flags & NDR_OUT) {
|
---|
859 | ndr_print_struct(ndr, "out", "decode_pac_raw");
|
---|
860 | ndr->depth++;
|
---|
861 | ndr->depth--;
|
---|
862 | }
|
---|
863 | ndr->depth--;
|
---|
864 | }
|
---|
865 |
|
---|
866 | static enum ndr_err_code ndr_push_decode_login_info(struct ndr_push *ndr, int flags, const struct decode_login_info *r)
|
---|
867 | {
|
---|
868 | if (flags & NDR_IN) {
|
---|
869 | NDR_CHECK(ndr_push_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon_info));
|
---|
870 | }
|
---|
871 | if (flags & NDR_OUT) {
|
---|
872 | }
|
---|
873 | return NDR_ERR_SUCCESS;
|
---|
874 | }
|
---|
875 |
|
---|
876 | static enum ndr_err_code ndr_pull_decode_login_info(struct ndr_pull *ndr, int flags, struct decode_login_info *r)
|
---|
877 | {
|
---|
878 | if (flags & NDR_IN) {
|
---|
879 | NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon_info));
|
---|
880 | }
|
---|
881 | if (flags & NDR_OUT) {
|
---|
882 | }
|
---|
883 | return NDR_ERR_SUCCESS;
|
---|
884 | }
|
---|
885 |
|
---|
886 | _PUBLIC_ void ndr_print_decode_login_info(struct ndr_print *ndr, const char *name, int flags, const struct decode_login_info *r)
|
---|
887 | {
|
---|
888 | ndr_print_struct(ndr, name, "decode_login_info");
|
---|
889 | ndr->depth++;
|
---|
890 | if (flags & NDR_SET_VALUES) {
|
---|
891 | ndr->flags |= LIBNDR_PRINT_SET_VALUES;
|
---|
892 | }
|
---|
893 | if (flags & NDR_IN) {
|
---|
894 | ndr_print_struct(ndr, "in", "decode_login_info");
|
---|
895 | ndr->depth++;
|
---|
896 | ndr_print_PAC_LOGON_INFO(ndr, "logon_info", &r->in.logon_info);
|
---|
897 | ndr->depth--;
|
---|
898 | }
|
---|
899 | if (flags & NDR_OUT) {
|
---|
900 | ndr_print_struct(ndr, "out", "decode_login_info");
|
---|
901 | ndr->depth++;
|
---|
902 | ndr->depth--;
|
---|
903 | }
|
---|
904 | ndr->depth--;
|
---|
905 | }
|
---|
906 |
|
---|
907 | static enum ndr_err_code ndr_push_decode_pac_validate(struct ndr_push *ndr, int flags, const struct decode_pac_validate *r)
|
---|
908 | {
|
---|
909 | if (flags & NDR_IN) {
|
---|
910 | NDR_CHECK(ndr_push_PAC_Validate(ndr, NDR_SCALARS, &r->in.pac_validate));
|
---|
911 | }
|
---|
912 | if (flags & NDR_OUT) {
|
---|
913 | }
|
---|
914 | return NDR_ERR_SUCCESS;
|
---|
915 | }
|
---|
916 |
|
---|
917 | static enum ndr_err_code ndr_pull_decode_pac_validate(struct ndr_pull *ndr, int flags, struct decode_pac_validate *r)
|
---|
918 | {
|
---|
919 | if (flags & NDR_IN) {
|
---|
920 | NDR_CHECK(ndr_pull_PAC_Validate(ndr, NDR_SCALARS, &r->in.pac_validate));
|
---|
921 | }
|
---|
922 | if (flags & NDR_OUT) {
|
---|
923 | }
|
---|
924 | return NDR_ERR_SUCCESS;
|
---|
925 | }
|
---|
926 |
|
---|
927 | _PUBLIC_ void ndr_print_decode_pac_validate(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_validate *r)
|
---|
928 | {
|
---|
929 | ndr_print_struct(ndr, name, "decode_pac_validate");
|
---|
930 | ndr->depth++;
|
---|
931 | if (flags & NDR_SET_VALUES) {
|
---|
932 | ndr->flags |= LIBNDR_PRINT_SET_VALUES;
|
---|
933 | }
|
---|
934 | if (flags & NDR_IN) {
|
---|
935 | ndr_print_struct(ndr, "in", "decode_pac_validate");
|
---|
936 | ndr->depth++;
|
---|
937 | ndr_print_PAC_Validate(ndr, "pac_validate", &r->in.pac_validate);
|
---|
938 | ndr->depth--;
|
---|
939 | }
|
---|
940 | if (flags & NDR_OUT) {
|
---|
941 | ndr_print_struct(ndr, "out", "decode_pac_validate");
|
---|
942 | ndr->depth++;
|
---|
943 | ndr->depth--;
|
---|
944 | }
|
---|
945 | ndr->depth--;
|
---|
946 | }
|
---|
947 |
|
---|
948 | static const struct ndr_interface_call krb5pac_calls[] = {
|
---|
949 | {
|
---|
950 | "decode_pac",
|
---|
951 | sizeof(struct decode_pac),
|
---|
952 | (ndr_push_flags_fn_t) ndr_push_decode_pac,
|
---|
953 | (ndr_pull_flags_fn_t) ndr_pull_decode_pac,
|
---|
954 | (ndr_print_function_t) ndr_print_decode_pac,
|
---|
955 | false,
|
---|
956 | },
|
---|
957 | {
|
---|
958 | "decode_pac_raw",
|
---|
959 | sizeof(struct decode_pac_raw),
|
---|
960 | (ndr_push_flags_fn_t) ndr_push_decode_pac_raw,
|
---|
961 | (ndr_pull_flags_fn_t) ndr_pull_decode_pac_raw,
|
---|
962 | (ndr_print_function_t) ndr_print_decode_pac_raw,
|
---|
963 | false,
|
---|
964 | },
|
---|
965 | {
|
---|
966 | "decode_login_info",
|
---|
967 | sizeof(struct decode_login_info),
|
---|
968 | (ndr_push_flags_fn_t) ndr_push_decode_login_info,
|
---|
969 | (ndr_pull_flags_fn_t) ndr_pull_decode_login_info,
|
---|
970 | (ndr_print_function_t) ndr_print_decode_login_info,
|
---|
971 | false,
|
---|
972 | },
|
---|
973 | {
|
---|
974 | "decode_pac_validate",
|
---|
975 | sizeof(struct decode_pac_validate),
|
---|
976 | (ndr_push_flags_fn_t) ndr_push_decode_pac_validate,
|
---|
977 | (ndr_pull_flags_fn_t) ndr_pull_decode_pac_validate,
|
---|
978 | (ndr_print_function_t) ndr_print_decode_pac_validate,
|
---|
979 | false,
|
---|
980 | },
|
---|
981 | { NULL, 0, NULL, NULL, NULL, false }
|
---|
982 | };
|
---|
983 |
|
---|
984 | static const char * const krb5pac_endpoint_strings[] = {
|
---|
985 | "ncacn_np:[\\pipe\\krb5pac]",
|
---|
986 | };
|
---|
987 |
|
---|
988 | static const struct ndr_interface_string_array krb5pac_endpoints = {
|
---|
989 | .count = 1,
|
---|
990 | .names = krb5pac_endpoint_strings
|
---|
991 | };
|
---|
992 |
|
---|
993 | static const char * const krb5pac_authservice_strings[] = {
|
---|
994 | "host",
|
---|
995 | };
|
---|
996 |
|
---|
997 | static const struct ndr_interface_string_array krb5pac_authservices = {
|
---|
998 | .count = 1,
|
---|
999 | .names = krb5pac_authservice_strings
|
---|
1000 | };
|
---|
1001 |
|
---|
1002 |
|
---|
1003 | const struct ndr_interface_table ndr_table_krb5pac = {
|
---|
1004 | .name = "krb5pac",
|
---|
1005 | .syntax_id = {
|
---|
1006 | {0x12345778,0x1234,0xabcd,{0x00,0x00},{0x00,0x00,0x00,0x00}},
|
---|
1007 | NDR_KRB5PAC_VERSION
|
---|
1008 | },
|
---|
1009 | .helpstring = NDR_KRB5PAC_HELPSTRING,
|
---|
1010 | .num_calls = 4,
|
---|
1011 | .calls = krb5pac_calls,
|
---|
1012 | .endpoints = &krb5pac_endpoints,
|
---|
1013 | .authservices = &krb5pac_authservices
|
---|
1014 | };
|
---|
1015 |
|
---|