1 | #ifndef _gssd_mach_user_ |
2 | #define _gssd_mach_user_ |
3 | |
4 | /* Module gssd_mach */ |
5 | |
6 | #include <string.h> |
7 | #include <mach/ndr.h> |
8 | #include <mach/boolean.h> |
9 | #include <mach/kern_return.h> |
10 | #include <mach/notify.h> |
11 | #include <mach/mach_types.h> |
12 | #include <mach/message.h> |
13 | #include <mach/mig_errors.h> |
14 | #include <mach/port.h> |
15 | |
16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ |
17 | |
18 | #if defined(__has_include) |
19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) |
20 | #ifndef USING_MIG_STRNCPY_ZEROFILL |
21 | #define USING_MIG_STRNCPY_ZEROFILL |
22 | #endif |
23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
25 | #ifdef __cplusplus |
26 | extern "C" { |
27 | #endif |
28 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS_CSTRING_ATTR |
29 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS_CSTRING_COUNTEDBY_ATTR(C) __unsafe_indexable |
30 | #endif |
31 | extern int mig_strncpy_zerofill(char * dest, const char * src, int len) __attribute__((weak_import)); |
32 | #ifdef __cplusplus |
33 | } |
34 | #endif |
35 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ |
36 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ |
37 | #endif /* __has_include */ |
38 | |
39 | /* END MIG_STRNCPY_ZEROFILL CODE */ |
40 | |
41 | #if (__MigKernelSpecificCode) || (_MIG_KERNEL_SPECIFIC_CODE_) |
42 | #include <kern/ipc_mig.h> |
43 | #endif /* __MigKernelSpecificCode */ |
44 | |
45 | #ifdef AUTOTEST |
46 | #ifndef FUNCTION_PTR_T |
47 | #define FUNCTION_PTR_T |
48 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); |
49 | typedef struct { |
50 | char * name; |
51 | function_ptr_t function; |
52 | } function_table_entry; |
53 | typedef function_table_entry *function_table_t; |
54 | #endif /* FUNCTION_PTR_T */ |
55 | #endif /* AUTOTEST */ |
56 | |
57 | #ifndef gssd_mach_MSG_COUNT |
58 | #define gssd_mach_MSG_COUNT 9 |
59 | #endif /* gssd_mach_MSG_COUNT */ |
60 | |
61 | #include <Availability.h> |
62 | #include <mach/std_types.h> |
63 | #include <mach/mig.h> |
64 | #include <mach/mig.h> |
65 | #include <mach/mach_types.h> |
66 | #include <gssd/gssd_mach_types.h> |
67 | |
68 | #ifdef __BeforeMigUserHeader |
69 | __BeforeMigUserHeader |
70 | #endif /* __BeforeMigUserHeader */ |
71 | |
72 | #include <sys/cdefs.h> |
73 | __BEGIN_DECLS |
74 | |
75 | |
76 | /* Routine mach_gss_init_sec_context */ |
77 | #ifdef mig_external |
78 | mig_external |
79 | #else |
80 | extern |
81 | #endif /* mig_external */ |
82 | kern_return_t mach_gss_init_sec_context |
83 | ( |
84 | mach_port_t server, |
85 | gssd_mechtype mech, |
86 | gssd_byte_buffer intoken, |
87 | mach_msg_type_number_t intokenCnt, |
88 | uint32_t uid, |
89 | gssd_string princ_namestr, |
90 | gssd_string svc_namestr, |
91 | uint32_t flags, |
92 | uint32_t gssd_flags, |
93 | gssd_ctx *context, |
94 | gssd_cred *cred_handle, |
95 | uint32_t *ret_flags, |
96 | gssd_byte_buffer *key, |
97 | mach_msg_type_number_t *keyCnt, |
98 | gssd_byte_buffer *outtoken, |
99 | mach_msg_type_number_t *outtokenCnt, |
100 | uint32_t *major_stat, |
101 | uint32_t *minor_stat |
102 | ); |
103 | |
104 | /* Routine mach_gss_accept_sec_context */ |
105 | #ifdef mig_external |
106 | mig_external |
107 | #else |
108 | extern |
109 | #endif /* mig_external */ |
110 | kern_return_t mach_gss_accept_sec_context |
111 | ( |
112 | mach_port_t server, |
113 | gssd_byte_buffer intoken, |
114 | mach_msg_type_number_t intokenCnt, |
115 | gssd_string svc_namestr, |
116 | uint32_t gssd_flags, |
117 | gssd_ctx *context, |
118 | gssd_cred *cred_handle, |
119 | uint32_t *flags, |
120 | uint32_t *uid, |
121 | gssd_gid_list gids, |
122 | mach_msg_type_number_t *gidsCnt, |
123 | gssd_byte_buffer *key, |
124 | mach_msg_type_number_t *keyCnt, |
125 | gssd_byte_buffer *outtoken, |
126 | mach_msg_type_number_t *outtokenCnt, |
127 | uint32_t *major_stat, |
128 | uint32_t *minor_stat |
129 | ); |
130 | |
131 | /* SimpleRoutine mach_gss_log_error */ |
132 | #ifdef mig_external |
133 | mig_external |
134 | #else |
135 | extern |
136 | #endif /* mig_external */ |
137 | kern_return_t mach_gss_log_error |
138 | ( |
139 | mach_port_t server, |
140 | gssd_string mnt, |
141 | uint32_t uid, |
142 | gssd_string source, |
143 | uint32_t major_stat, |
144 | uint32_t minor_stat |
145 | ); |
146 | |
147 | /* Routine mach_gss_init_sec_context_v2 */ |
148 | #ifdef mig_external |
149 | mig_external |
150 | #else |
151 | extern |
152 | #endif /* mig_external */ |
153 | kern_return_t mach_gss_init_sec_context_v2 |
154 | ( |
155 | mach_port_t server, |
156 | gssd_mechtype mech, |
157 | gssd_byte_buffer intoken, |
158 | mach_msg_type_number_t intokenCnt, |
159 | uint32_t uid, |
160 | gssd_nametype clnt_nt, |
161 | gssd_byte_buffer clnt_princ, |
162 | mach_msg_type_number_t clnt_princCnt, |
163 | gssd_nametype svc_nt, |
164 | gssd_byte_buffer svc_princ, |
165 | mach_msg_type_number_t svc_princCnt, |
166 | uint32_t flags, |
167 | uint32_t *gssd_flags, |
168 | gssd_ctx *context, |
169 | gssd_cred *cred_handle, |
170 | uint32_t *ret_flags, |
171 | gssd_byte_buffer *key, |
172 | mach_msg_type_number_t *keyCnt, |
173 | gssd_byte_buffer *outtoken, |
174 | mach_msg_type_number_t *outtokenCnt, |
175 | gssd_dstring displayname, |
176 | uint32_t *major_stat, |
177 | uint32_t *minor_stat |
178 | ); |
179 | |
180 | /* Routine mach_gss_accept_sec_context_v2 */ |
181 | #ifdef mig_external |
182 | mig_external |
183 | #else |
184 | extern |
185 | #endif /* mig_external */ |
186 | kern_return_t mach_gss_accept_sec_context_v2 |
187 | ( |
188 | mach_port_t server, |
189 | gssd_byte_buffer intoken, |
190 | mach_msg_type_number_t intokenCnt, |
191 | gssd_nametype svc_nt, |
192 | gssd_byte_buffer svc_princ, |
193 | mach_msg_type_number_t svc_princCnt, |
194 | uint32_t *gssd_flags, |
195 | gssd_ctx *context, |
196 | gssd_cred *cred_handle, |
197 | uint32_t *flags, |
198 | uint32_t *uid, |
199 | gssd_gid_list gids, |
200 | mach_msg_type_number_t *gidsCnt, |
201 | gssd_byte_buffer *key, |
202 | mach_msg_type_number_t *keyCnt, |
203 | gssd_byte_buffer *outtoken, |
204 | mach_msg_type_number_t *outtokenCnt, |
205 | uint32_t *major_stat, |
206 | uint32_t *minor_stat |
207 | ); |
208 | |
209 | /* Routine mach_gss_init_sec_context_v3 */ |
210 | #ifdef mig_external |
211 | mig_external |
212 | #else |
213 | extern |
214 | #endif /* mig_external */ |
215 | kern_return_t mach_gss_init_sec_context_v3 |
216 | ( |
217 | mach_port_t server, |
218 | gssd_mechtype mech, |
219 | gssd_byte_buffer intoken, |
220 | mach_msg_type_number_t intokenCnt, |
221 | uint32_t uid, |
222 | gssd_nametype clnt_nt, |
223 | gssd_byte_buffer clnt_princ, |
224 | mach_msg_type_number_t clnt_princCnt, |
225 | gssd_nametype svc_nt, |
226 | gssd_byte_buffer svc_princ, |
227 | mach_msg_type_number_t svc_princCnt, |
228 | uint32_t flags, |
229 | gssd_etype_list etypes, |
230 | mach_msg_type_number_t etypesCnt, |
231 | uint32_t *gssd_flags, |
232 | gssd_ctx *context, |
233 | gssd_cred *cred_handle, |
234 | uint32_t *ret_flags, |
235 | gssd_byte_buffer *key, |
236 | mach_msg_type_number_t *keyCnt, |
237 | gssd_byte_buffer *outtoken, |
238 | mach_msg_type_number_t *outtokenCnt, |
239 | gssd_dstring displayname, |
240 | uint32_t *major_stat, |
241 | uint32_t *minor_stat |
242 | ); |
243 | |
244 | /* Routine mach_gss_hold_cred */ |
245 | #ifdef mig_external |
246 | mig_external |
247 | #else |
248 | extern |
249 | #endif /* mig_external */ |
250 | kern_return_t mach_gss_hold_cred |
251 | ( |
252 | mach_port_t server, |
253 | gssd_mechtype mech, |
254 | gssd_nametype nt, |
255 | gssd_byte_buffer princ, |
256 | mach_msg_type_number_t princCnt, |
257 | uint32_t *major_stat, |
258 | uint32_t *minor_stat |
259 | ); |
260 | |
261 | /* Routine mach_gss_unhold_cred */ |
262 | #ifdef mig_external |
263 | mig_external |
264 | #else |
265 | extern |
266 | #endif /* mig_external */ |
267 | kern_return_t mach_gss_unhold_cred |
268 | ( |
269 | mach_port_t server, |
270 | gssd_mechtype mech, |
271 | gssd_nametype nt, |
272 | gssd_byte_buffer princ, |
273 | mach_msg_type_number_t princCnt, |
274 | uint32_t *major_stat, |
275 | uint32_t *minor_stat |
276 | ); |
277 | |
278 | /* Routine mach_gss_lookup */ |
279 | #ifdef mig_external |
280 | mig_external |
281 | #else |
282 | extern |
283 | #endif /* mig_external */ |
284 | kern_return_t mach_gss_lookup |
285 | ( |
286 | mach_port_t server, |
287 | uint32_t uid, |
288 | int32_t asid, |
289 | mach_port_t *gssd_session_port |
290 | ); |
291 | |
292 | __END_DECLS |
293 | |
294 | /********************** Caution **************************/ |
295 | /* The following data types should be used to calculate */ |
296 | /* maximum message sizes only. The actual message may be */ |
297 | /* smaller, and the position of the arguments within the */ |
298 | /* message layout may vary from what is presented here. */ |
299 | /* For example, if any of the arguments are variable- */ |
300 | /* sized, and less than the maximum is sent, the data */ |
301 | /* will be packed tight in the actual message to reduce */ |
302 | /* the presence of holes. */ |
303 | /********************** Caution **************************/ |
304 | |
305 | /* typedefs for all requests */ |
306 | |
307 | #ifndef __Request__gssd_mach_subsystem__defined |
308 | #define __Request__gssd_mach_subsystem__defined |
309 | |
310 | #ifdef __MigPackStructs |
311 | #pragma pack(push, 4) |
312 | #endif |
313 | typedef struct { |
314 | mach_msg_header_t Head; |
315 | /* start of the kernel processed data */ |
316 | mach_msg_body_t msgh_body; |
317 | mach_msg_ool_descriptor_t intoken; |
318 | /* end of the kernel processed data */ |
319 | NDR_record_t NDR; |
320 | gssd_mechtype mech; |
321 | mach_msg_type_number_t intokenCnt; |
322 | uint32_t uid; |
323 | mach_msg_type_number_t princ_namestrOffset; /* MiG doesn't use it */ |
324 | mach_msg_type_number_t princ_namestrCnt; |
325 | char princ_namestr[1024]; |
326 | mach_msg_type_number_t svc_namestrOffset; /* MiG doesn't use it */ |
327 | mach_msg_type_number_t svc_namestrCnt; |
328 | char svc_namestr[1024]; |
329 | uint32_t flags; |
330 | uint32_t gssd_flags; |
331 | gssd_ctx context; |
332 | gssd_cred cred_handle; |
333 | } __Request__mach_gss_init_sec_context_t __attribute__((unused)); |
334 | #ifdef __MigPackStructs |
335 | #pragma pack(pop) |
336 | #endif |
337 | |
338 | #ifdef __MigPackStructs |
339 | #pragma pack(push, 4) |
340 | #endif |
341 | typedef struct { |
342 | mach_msg_header_t Head; |
343 | /* start of the kernel processed data */ |
344 | mach_msg_body_t msgh_body; |
345 | mach_msg_ool_descriptor_t intoken; |
346 | /* end of the kernel processed data */ |
347 | NDR_record_t NDR; |
348 | mach_msg_type_number_t intokenCnt; |
349 | mach_msg_type_number_t svc_namestrOffset; /* MiG doesn't use it */ |
350 | mach_msg_type_number_t svc_namestrCnt; |
351 | char svc_namestr[1024]; |
352 | uint32_t gssd_flags; |
353 | gssd_ctx context; |
354 | gssd_cred cred_handle; |
355 | } __Request__mach_gss_accept_sec_context_t __attribute__((unused)); |
356 | #ifdef __MigPackStructs |
357 | #pragma pack(pop) |
358 | #endif |
359 | |
360 | #ifdef __MigPackStructs |
361 | #pragma pack(push, 4) |
362 | #endif |
363 | typedef struct { |
364 | mach_msg_header_t Head; |
365 | NDR_record_t NDR; |
366 | mach_msg_type_number_t mntOffset; /* MiG doesn't use it */ |
367 | mach_msg_type_number_t mntCnt; |
368 | char mnt[1024]; |
369 | uint32_t uid; |
370 | mach_msg_type_number_t sourceOffset; /* MiG doesn't use it */ |
371 | mach_msg_type_number_t sourceCnt; |
372 | char source[1024]; |
373 | uint32_t major_stat; |
374 | uint32_t minor_stat; |
375 | } __Request__mach_gss_log_error_t __attribute__((unused)); |
376 | #ifdef __MigPackStructs |
377 | #pragma pack(pop) |
378 | #endif |
379 | |
380 | #ifdef __MigPackStructs |
381 | #pragma pack(push, 4) |
382 | #endif |
383 | typedef struct { |
384 | mach_msg_header_t Head; |
385 | /* start of the kernel processed data */ |
386 | mach_msg_body_t msgh_body; |
387 | mach_msg_ool_descriptor_t intoken; |
388 | mach_msg_ool_descriptor_t clnt_princ; |
389 | mach_msg_ool_descriptor_t svc_princ; |
390 | /* end of the kernel processed data */ |
391 | NDR_record_t NDR; |
392 | gssd_mechtype mech; |
393 | mach_msg_type_number_t intokenCnt; |
394 | uint32_t uid; |
395 | gssd_nametype clnt_nt; |
396 | mach_msg_type_number_t clnt_princCnt; |
397 | gssd_nametype svc_nt; |
398 | mach_msg_type_number_t svc_princCnt; |
399 | uint32_t flags; |
400 | uint32_t gssd_flags; |
401 | gssd_ctx context; |
402 | gssd_cred cred_handle; |
403 | } __Request__mach_gss_init_sec_context_v2_t __attribute__((unused)); |
404 | #ifdef __MigPackStructs |
405 | #pragma pack(pop) |
406 | #endif |
407 | |
408 | #ifdef __MigPackStructs |
409 | #pragma pack(push, 4) |
410 | #endif |
411 | typedef struct { |
412 | mach_msg_header_t Head; |
413 | /* start of the kernel processed data */ |
414 | mach_msg_body_t msgh_body; |
415 | mach_msg_ool_descriptor_t intoken; |
416 | mach_msg_ool_descriptor_t svc_princ; |
417 | /* end of the kernel processed data */ |
418 | NDR_record_t NDR; |
419 | mach_msg_type_number_t intokenCnt; |
420 | gssd_nametype svc_nt; |
421 | mach_msg_type_number_t svc_princCnt; |
422 | uint32_t gssd_flags; |
423 | gssd_ctx context; |
424 | gssd_cred cred_handle; |
425 | } __Request__mach_gss_accept_sec_context_v2_t __attribute__((unused)); |
426 | #ifdef __MigPackStructs |
427 | #pragma pack(pop) |
428 | #endif |
429 | |
430 | #ifdef __MigPackStructs |
431 | #pragma pack(push, 4) |
432 | #endif |
433 | typedef struct { |
434 | mach_msg_header_t Head; |
435 | /* start of the kernel processed data */ |
436 | mach_msg_body_t msgh_body; |
437 | mach_msg_ool_descriptor_t intoken; |
438 | mach_msg_ool_descriptor_t clnt_princ; |
439 | mach_msg_ool_descriptor_t svc_princ; |
440 | /* end of the kernel processed data */ |
441 | NDR_record_t NDR; |
442 | gssd_mechtype mech; |
443 | mach_msg_type_number_t intokenCnt; |
444 | uint32_t uid; |
445 | gssd_nametype clnt_nt; |
446 | mach_msg_type_number_t clnt_princCnt; |
447 | gssd_nametype svc_nt; |
448 | mach_msg_type_number_t svc_princCnt; |
449 | uint32_t flags; |
450 | mach_msg_type_number_t etypesCnt; |
451 | int32_t etypes[64]; |
452 | uint32_t gssd_flags; |
453 | gssd_ctx context; |
454 | gssd_cred cred_handle; |
455 | } __Request__mach_gss_init_sec_context_v3_t __attribute__((unused)); |
456 | #ifdef __MigPackStructs |
457 | #pragma pack(pop) |
458 | #endif |
459 | |
460 | #ifdef __MigPackStructs |
461 | #pragma pack(push, 4) |
462 | #endif |
463 | typedef struct { |
464 | mach_msg_header_t Head; |
465 | /* start of the kernel processed data */ |
466 | mach_msg_body_t msgh_body; |
467 | mach_msg_ool_descriptor_t princ; |
468 | /* end of the kernel processed data */ |
469 | NDR_record_t NDR; |
470 | gssd_mechtype mech; |
471 | gssd_nametype nt; |
472 | mach_msg_type_number_t princCnt; |
473 | } __Request__mach_gss_hold_cred_t __attribute__((unused)); |
474 | #ifdef __MigPackStructs |
475 | #pragma pack(pop) |
476 | #endif |
477 | |
478 | #ifdef __MigPackStructs |
479 | #pragma pack(push, 4) |
480 | #endif |
481 | typedef struct { |
482 | mach_msg_header_t Head; |
483 | /* start of the kernel processed data */ |
484 | mach_msg_body_t msgh_body; |
485 | mach_msg_ool_descriptor_t princ; |
486 | /* end of the kernel processed data */ |
487 | NDR_record_t NDR; |
488 | gssd_mechtype mech; |
489 | gssd_nametype nt; |
490 | mach_msg_type_number_t princCnt; |
491 | } __Request__mach_gss_unhold_cred_t __attribute__((unused)); |
492 | #ifdef __MigPackStructs |
493 | #pragma pack(pop) |
494 | #endif |
495 | |
496 | #ifdef __MigPackStructs |
497 | #pragma pack(push, 4) |
498 | #endif |
499 | typedef struct { |
500 | mach_msg_header_t Head; |
501 | NDR_record_t NDR; |
502 | uint32_t uid; |
503 | int32_t asid; |
504 | } __Request__mach_gss_lookup_t __attribute__((unused)); |
505 | #ifdef __MigPackStructs |
506 | #pragma pack(pop) |
507 | #endif |
508 | #endif /* !__Request__gssd_mach_subsystem__defined */ |
509 | |
510 | /* union of all requests */ |
511 | |
512 | #ifndef __RequestUnion__gssd_mach_subsystem__defined |
513 | #define __RequestUnion__gssd_mach_subsystem__defined |
514 | union __RequestUnion__gssd_mach_subsystem { |
515 | __Request__mach_gss_init_sec_context_t Request_mach_gss_init_sec_context; |
516 | __Request__mach_gss_accept_sec_context_t Request_mach_gss_accept_sec_context; |
517 | __Request__mach_gss_log_error_t Request_mach_gss_log_error; |
518 | __Request__mach_gss_init_sec_context_v2_t Request_mach_gss_init_sec_context_v2; |
519 | __Request__mach_gss_accept_sec_context_v2_t Request_mach_gss_accept_sec_context_v2; |
520 | __Request__mach_gss_init_sec_context_v3_t Request_mach_gss_init_sec_context_v3; |
521 | __Request__mach_gss_hold_cred_t Request_mach_gss_hold_cred; |
522 | __Request__mach_gss_unhold_cred_t Request_mach_gss_unhold_cred; |
523 | __Request__mach_gss_lookup_t Request_mach_gss_lookup; |
524 | }; |
525 | #endif /* !__RequestUnion__gssd_mach_subsystem__defined */ |
526 | /* typedefs for all replies */ |
527 | |
528 | #ifndef __Reply__gssd_mach_subsystem__defined |
529 | #define __Reply__gssd_mach_subsystem__defined |
530 | |
531 | #ifdef __MigPackStructs |
532 | #pragma pack(push, 4) |
533 | #endif |
534 | typedef struct { |
535 | mach_msg_header_t Head; |
536 | /* start of the kernel processed data */ |
537 | mach_msg_body_t msgh_body; |
538 | mach_msg_ool_descriptor_t key; |
539 | mach_msg_ool_descriptor_t outtoken; |
540 | /* end of the kernel processed data */ |
541 | NDR_record_t NDR; |
542 | gssd_ctx context; |
543 | gssd_cred cred_handle; |
544 | uint32_t ret_flags; |
545 | mach_msg_type_number_t keyCnt; |
546 | mach_msg_type_number_t outtokenCnt; |
547 | uint32_t major_stat; |
548 | uint32_t minor_stat; |
549 | } __Reply__mach_gss_init_sec_context_t __attribute__((unused)); |
550 | #ifdef __MigPackStructs |
551 | #pragma pack(pop) |
552 | #endif |
553 | |
554 | #ifdef __MigPackStructs |
555 | #pragma pack(push, 4) |
556 | #endif |
557 | typedef struct { |
558 | mach_msg_header_t Head; |
559 | /* start of the kernel processed data */ |
560 | mach_msg_body_t msgh_body; |
561 | mach_msg_ool_descriptor_t key; |
562 | mach_msg_ool_descriptor_t outtoken; |
563 | /* end of the kernel processed data */ |
564 | NDR_record_t NDR; |
565 | gssd_ctx context; |
566 | gssd_cred cred_handle; |
567 | uint32_t flags; |
568 | uint32_t uid; |
569 | mach_msg_type_number_t gidsCnt; |
570 | uint32_t gids[16]; |
571 | mach_msg_type_number_t keyCnt; |
572 | mach_msg_type_number_t outtokenCnt; |
573 | uint32_t major_stat; |
574 | uint32_t minor_stat; |
575 | } __Reply__mach_gss_accept_sec_context_t __attribute__((unused)); |
576 | #ifdef __MigPackStructs |
577 | #pragma pack(pop) |
578 | #endif |
579 | |
580 | #ifdef __MigPackStructs |
581 | #pragma pack(push, 4) |
582 | #endif |
583 | typedef struct { |
584 | mach_msg_header_t Head; |
585 | NDR_record_t NDR; |
586 | kern_return_t RetCode; |
587 | } __Reply__mach_gss_log_error_t __attribute__((unused)); |
588 | #ifdef __MigPackStructs |
589 | #pragma pack(pop) |
590 | #endif |
591 | |
592 | #ifdef __MigPackStructs |
593 | #pragma pack(push, 4) |
594 | #endif |
595 | typedef struct { |
596 | mach_msg_header_t Head; |
597 | /* start of the kernel processed data */ |
598 | mach_msg_body_t msgh_body; |
599 | mach_msg_ool_descriptor_t key; |
600 | mach_msg_ool_descriptor_t outtoken; |
601 | /* end of the kernel processed data */ |
602 | NDR_record_t NDR; |
603 | uint32_t gssd_flags; |
604 | gssd_ctx context; |
605 | gssd_cred cred_handle; |
606 | uint32_t ret_flags; |
607 | mach_msg_type_number_t keyCnt; |
608 | mach_msg_type_number_t outtokenCnt; |
609 | mach_msg_type_number_t displaynameOffset; /* MiG doesn't use it */ |
610 | mach_msg_type_number_t displaynameCnt; |
611 | char displayname[128]; |
612 | uint32_t major_stat; |
613 | uint32_t minor_stat; |
614 | } __Reply__mach_gss_init_sec_context_v2_t __attribute__((unused)); |
615 | #ifdef __MigPackStructs |
616 | #pragma pack(pop) |
617 | #endif |
618 | |
619 | #ifdef __MigPackStructs |
620 | #pragma pack(push, 4) |
621 | #endif |
622 | typedef struct { |
623 | mach_msg_header_t Head; |
624 | /* start of the kernel processed data */ |
625 | mach_msg_body_t msgh_body; |
626 | mach_msg_ool_descriptor_t key; |
627 | mach_msg_ool_descriptor_t outtoken; |
628 | /* end of the kernel processed data */ |
629 | NDR_record_t NDR; |
630 | uint32_t gssd_flags; |
631 | gssd_ctx context; |
632 | gssd_cred cred_handle; |
633 | uint32_t flags; |
634 | uint32_t uid; |
635 | mach_msg_type_number_t gidsCnt; |
636 | uint32_t gids[16]; |
637 | mach_msg_type_number_t keyCnt; |
638 | mach_msg_type_number_t outtokenCnt; |
639 | uint32_t major_stat; |
640 | uint32_t minor_stat; |
641 | } __Reply__mach_gss_accept_sec_context_v2_t __attribute__((unused)); |
642 | #ifdef __MigPackStructs |
643 | #pragma pack(pop) |
644 | #endif |
645 | |
646 | #ifdef __MigPackStructs |
647 | #pragma pack(push, 4) |
648 | #endif |
649 | typedef struct { |
650 | mach_msg_header_t Head; |
651 | /* start of the kernel processed data */ |
652 | mach_msg_body_t msgh_body; |
653 | mach_msg_ool_descriptor_t key; |
654 | mach_msg_ool_descriptor_t outtoken; |
655 | /* end of the kernel processed data */ |
656 | NDR_record_t NDR; |
657 | uint32_t gssd_flags; |
658 | gssd_ctx context; |
659 | gssd_cred cred_handle; |
660 | uint32_t ret_flags; |
661 | mach_msg_type_number_t keyCnt; |
662 | mach_msg_type_number_t outtokenCnt; |
663 | mach_msg_type_number_t displaynameOffset; /* MiG doesn't use it */ |
664 | mach_msg_type_number_t displaynameCnt; |
665 | char displayname[128]; |
666 | uint32_t major_stat; |
667 | uint32_t minor_stat; |
668 | } __Reply__mach_gss_init_sec_context_v3_t __attribute__((unused)); |
669 | #ifdef __MigPackStructs |
670 | #pragma pack(pop) |
671 | #endif |
672 | |
673 | #ifdef __MigPackStructs |
674 | #pragma pack(push, 4) |
675 | #endif |
676 | typedef struct { |
677 | mach_msg_header_t Head; |
678 | NDR_record_t NDR; |
679 | kern_return_t RetCode; |
680 | uint32_t major_stat; |
681 | uint32_t minor_stat; |
682 | } __Reply__mach_gss_hold_cred_t __attribute__((unused)); |
683 | #ifdef __MigPackStructs |
684 | #pragma pack(pop) |
685 | #endif |
686 | |
687 | #ifdef __MigPackStructs |
688 | #pragma pack(push, 4) |
689 | #endif |
690 | typedef struct { |
691 | mach_msg_header_t Head; |
692 | NDR_record_t NDR; |
693 | kern_return_t RetCode; |
694 | uint32_t major_stat; |
695 | uint32_t minor_stat; |
696 | } __Reply__mach_gss_unhold_cred_t __attribute__((unused)); |
697 | #ifdef __MigPackStructs |
698 | #pragma pack(pop) |
699 | #endif |
700 | |
701 | #ifdef __MigPackStructs |
702 | #pragma pack(push, 4) |
703 | #endif |
704 | typedef struct { |
705 | mach_msg_header_t Head; |
706 | /* start of the kernel processed data */ |
707 | mach_msg_body_t msgh_body; |
708 | mach_msg_port_descriptor_t gssd_session_port; |
709 | /* end of the kernel processed data */ |
710 | } __Reply__mach_gss_lookup_t __attribute__((unused)); |
711 | #ifdef __MigPackStructs |
712 | #pragma pack(pop) |
713 | #endif |
714 | #endif /* !__Reply__gssd_mach_subsystem__defined */ |
715 | |
716 | /* union of all replies */ |
717 | |
718 | #ifndef __ReplyUnion__gssd_mach_subsystem__defined |
719 | #define __ReplyUnion__gssd_mach_subsystem__defined |
720 | union __ReplyUnion__gssd_mach_subsystem { |
721 | __Reply__mach_gss_init_sec_context_t Reply_mach_gss_init_sec_context; |
722 | __Reply__mach_gss_accept_sec_context_t Reply_mach_gss_accept_sec_context; |
723 | __Reply__mach_gss_log_error_t Reply_mach_gss_log_error; |
724 | __Reply__mach_gss_init_sec_context_v2_t Reply_mach_gss_init_sec_context_v2; |
725 | __Reply__mach_gss_accept_sec_context_v2_t Reply_mach_gss_accept_sec_context_v2; |
726 | __Reply__mach_gss_init_sec_context_v3_t Reply_mach_gss_init_sec_context_v3; |
727 | __Reply__mach_gss_hold_cred_t Reply_mach_gss_hold_cred; |
728 | __Reply__mach_gss_unhold_cred_t Reply_mach_gss_unhold_cred; |
729 | __Reply__mach_gss_lookup_t Reply_mach_gss_lookup; |
730 | }; |
731 | #endif /* !__RequestUnion__gssd_mach_subsystem__defined */ |
732 | |
733 | #ifndef subsystem_to_name_map_gssd_mach |
734 | #define subsystem_to_name_map_gssd_mach \ |
735 | { "mach_gss_init_sec_context", 999 },\ |
736 | { "mach_gss_accept_sec_context", 1000 },\ |
737 | { "mach_gss_log_error", 1001 },\ |
738 | { "mach_gss_init_sec_context_v2", 1002 },\ |
739 | { "mach_gss_accept_sec_context_v2", 1003 },\ |
740 | { "mach_gss_init_sec_context_v3", 1004 },\ |
741 | { "mach_gss_hold_cred", 1005 },\ |
742 | { "mach_gss_unhold_cred", 1006 },\ |
743 | { "mach_gss_lookup", 1007 } |
744 | #endif |
745 | |
746 | #ifdef __AfterMigUserHeader |
747 | __AfterMigUserHeader |
748 | #endif /* __AfterMigUserHeader */ |
749 | |
750 | #endif /* _gssd_mach_user_ */ |
751 | |