2 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
29 #include <mach/std_types.defs>
30 #include <mach/mach_types.defs>
33 import <gssd/gssd_mach_types.h>;
35 import <System/gssd/gssd_mach_types.h>;
38 type gssd_mechtype = int32_t;
39 type gssd_nametype = int32_t;
40 type gssd_string = c_string[*:1024]; /* MAX_PRINC_STR must be < 1024 */
41 type gssd_dstring = c_string[*:128]; /* MAX_DISPLAY_STR must be < 128 */
42 type gssd_byte_buffer = array [] of uint8_t;
43 type gssd_verifier = uint64_t;
44 type gssd_gid_list = array [*:16] of uint32_t;
45 type gssd_ctx = uint64_t;
46 type gssd_cred = uint64_t;
56 Routine mach_gss_init_sec_context(
58 in mech : gssd_mechtype;
59 in intoken : gssd_byte_buffer;
61 in princ_namestr : gssd_string;
62 in svc_namestr : gssd_string;
64 in gssd_flags : uint32_t;
65 inout context : gssd_ctx;
66 inout cred_handle : gssd_cred;
67 ServerAuditToken atoken : audit_token_t;
68 out ret_flags : uint32_t;
69 out key : gssd_byte_buffer, dealloc;
70 out outtoken : gssd_byte_buffer, dealloc;
71 out major_stat : uint32_t;
72 out minor_stat : uint32_t
75 routine mach_gss_accept_sec_context(
77 in intoken : gssd_byte_buffer;
78 in svc_namestr : gssd_string;
79 in gssd_flags : uint32_t;
80 inout context : gssd_ctx;
81 inout cred_handle : gssd_cred;
82 ServerAuditToken atoken : audit_token_t;
85 out gids : gssd_gid_list;
86 out key : gssd_byte_buffer, dealloc;
87 out outtoken : gssd_byte_buffer, dealloc;
88 out major_stat : uint32_t;
89 out minor_stat : uint32_t
92 simpleroutine mach_gss_log_error(
96 in source : gssd_string;
97 in major_stat : uint32_t;
98 in minor_stat : uint32_t;
99 ServerAuditToken atoken : audit_token_t
102 routine mach_gss_init_sec_context_v2(
103 server : mach_port_t;
104 in mech : gssd_mechtype;
105 in intoken : gssd_byte_buffer;
107 in clnt_nt : gssd_nametype;
108 in clnt_princ : gssd_byte_buffer;
109 in svc_nt : gssd_nametype;
110 in svc_princ : gssd_byte_buffer;
112 inout gssd_flags : uint32_t;
113 inout context : gssd_ctx;
114 inout cred_handle : gssd_cred;
115 ServerAuditToken atoken : audit_token_t;
116 out ret_flags : uint32_t;
117 out key : gssd_byte_buffer, dealloc;
118 out outtoken : gssd_byte_buffer, dealloc;
119 out displayname : gssd_dstring;
120 out major_stat : uint32_t;
121 out minor_stat : uint32_t
124 routine mach_gss_accept_sec_context_v2(
125 server : mach_port_t;
126 in intoken : gssd_byte_buffer;
127 in svc_nt : gssd_nametype;
128 in svc_princ : gssd_byte_buffer;
129 inout gssd_flags : uint32_t;
130 inout context : gssd_ctx;
131 inout cred_handle : gssd_cred;
132 ServerAuditToken atoken : audit_token_t;
133 out flags : uint32_t;
135 out gids : gssd_gid_list;
136 out key : gssd_byte_buffer, dealloc;
137 out outtoken : gssd_byte_buffer, dealloc;
138 out major_stat : uint32_t;
139 out minor_stat : uint32_t
142 routine mach_gss_hold_cred(
143 server : mach_port_t;
144 in mech : gssd_mechtype;
145 in nt : gssd_nametype;
146 in princ : gssd_byte_buffer;
147 ServerAuditToken atoken : audit_token_t;
148 out major_stat : uint32_t;
149 out minor_stat : uint32_t
152 routine mach_gss_unhold_cred(
153 server : mach_port_t;
154 in mech : gssd_mechtype;
155 in nt : gssd_nametype;
156 in princ : gssd_byte_buffer;
157 ServerAuditToken atoken : audit_token_t;
158 out major_stat : uint32_t;
159 out minor_stat : uint32_t
162 routine mach_gss_lookup(
163 server : mach_port_t;
166 ServerAuditToken atoken : audit_token_t;
167 out gssd_session_port : mach_port_t