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