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;
47 type gssd_etype_list = array [*:64] of int32_t;
57 Routine mach_gss_init_sec_context(
59 in mech : gssd_mechtype;
60 in intoken : gssd_byte_buffer;
62 in princ_namestr : gssd_string;
63 in svc_namestr : gssd_string;
65 in gssd_flags : uint32_t;
66 inout context : gssd_ctx;
67 inout cred_handle : gssd_cred;
68 ServerAuditToken atoken : audit_token_t;
69 out ret_flags : uint32_t;
70 out key : gssd_byte_buffer, dealloc;
71 out outtoken : gssd_byte_buffer, dealloc;
72 out major_stat : uint32_t;
73 out minor_stat : uint32_t
76 routine mach_gss_accept_sec_context(
78 in intoken : gssd_byte_buffer;
79 in svc_namestr : gssd_string;
80 in gssd_flags : uint32_t;
81 inout context : gssd_ctx;
82 inout cred_handle : gssd_cred;
83 ServerAuditToken atoken : audit_token_t;
86 out gids : gssd_gid_list;
87 out key : gssd_byte_buffer, dealloc;
88 out outtoken : gssd_byte_buffer, dealloc;
89 out major_stat : uint32_t;
90 out minor_stat : uint32_t
93 simpleroutine mach_gss_log_error(
97 in source : gssd_string;
98 in major_stat : uint32_t;
99 in minor_stat : uint32_t;
100 ServerAuditToken atoken : audit_token_t
103 routine mach_gss_init_sec_context_v2(
104 server : mach_port_t;
105 in mech : gssd_mechtype;
106 in intoken : gssd_byte_buffer;
108 in clnt_nt : gssd_nametype;
109 in clnt_princ : gssd_byte_buffer;
110 in svc_nt : gssd_nametype;
111 in svc_princ : gssd_byte_buffer;
113 inout gssd_flags : uint32_t;
114 inout context : gssd_ctx;
115 inout cred_handle : gssd_cred;
116 ServerAuditToken atoken : audit_token_t;
117 out ret_flags : uint32_t;
118 out key : gssd_byte_buffer, dealloc;
119 out outtoken : gssd_byte_buffer, dealloc;
120 out displayname : gssd_dstring;
121 out major_stat : uint32_t;
122 out minor_stat : uint32_t
125 routine mach_gss_accept_sec_context_v2(
126 server : mach_port_t;
127 in intoken : gssd_byte_buffer;
128 in svc_nt : gssd_nametype;
129 in svc_princ : gssd_byte_buffer;
130 inout gssd_flags : uint32_t;
131 inout context : gssd_ctx;
132 inout cred_handle : gssd_cred;
133 ServerAuditToken atoken : audit_token_t;
134 out flags : uint32_t;
136 out gids : gssd_gid_list;
137 out key : gssd_byte_buffer, dealloc;
138 out outtoken : gssd_byte_buffer, dealloc;
139 out major_stat : uint32_t;
140 out minor_stat : uint32_t
143 routine mach_gss_init_sec_context_v3(
144 server : mach_port_t;
145 in mech : gssd_mechtype;
146 in intoken : gssd_byte_buffer;
148 in clnt_nt : gssd_nametype;
149 in clnt_princ : gssd_byte_buffer;
150 in svc_nt : gssd_nametype;
151 in svc_princ : gssd_byte_buffer;
153 in etypes : gssd_etype_list;
154 inout gssd_flags : uint32_t;
155 inout context : gssd_ctx;
156 inout cred_handle : gssd_cred;
157 ServerAuditToken atoken : audit_token_t;
158 out ret_flags : uint32_t;
159 out key : gssd_byte_buffer, dealloc;
160 out outtoken : gssd_byte_buffer, dealloc;
161 out displayname : gssd_dstring;
162 out major_stat : uint32_t;
163 out minor_stat : uint32_t
166 routine mach_gss_hold_cred(
167 server : mach_port_t;
168 in mech : gssd_mechtype;
169 in nt : gssd_nametype;
170 in princ : gssd_byte_buffer;
171 ServerAuditToken atoken : audit_token_t;
172 out major_stat : uint32_t;
173 out minor_stat : uint32_t
176 routine mach_gss_unhold_cred(
177 server : mach_port_t;
178 in mech : gssd_mechtype;
179 in nt : gssd_nametype;
180 in princ : gssd_byte_buffer;
181 ServerAuditToken atoken : audit_token_t;
182 out major_stat : uint32_t;
183 out minor_stat : uint32_t
186 routine mach_gss_lookup(
187 server : mach_port_t;
190 ServerAuditToken atoken : audit_token_t;
191 out gssd_session_port : mach_port_t