]> git.saurik.com Git - apple/xnu.git/blame - osfmk/gssd/gssd_mach.defs
xnu-6153.41.3.tar.gz
[apple/xnu.git] / osfmk / gssd / gssd_mach.defs
CommitLineData
2d21ac55
A
1/*
2 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
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.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
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.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29#include <mach/std_types.defs>
30#include <mach/mach_types.defs>
31
32#ifdef KERNEL
33import <gssd/gssd_mach_types.h>;
34#else
6d2010ae 35import <System/gssd/gssd_mach_types.h>;
2d21ac55
A
36#endif
37
6d2010ae
A
38type gssd_mechtype = int32_t;
39type gssd_nametype = int32_t;
40type gssd_string = c_string[*:1024]; /* MAX_PRINC_STR must be < 1024 */
41type gssd_dstring = c_string[*:128]; /* MAX_DISPLAY_STR must be < 128 */
42type gssd_byte_buffer = array [] of uint8_t;
2d21ac55 43type gssd_verifier = uint64_t;
6d2010ae
A
44type gssd_gid_list = array [*:16] of uint32_t;
45type gssd_ctx = uint64_t;
46type gssd_cred = uint64_t;
39037602 47type gssd_etype_list = array [*:64] of int32_t;
2d21ac55
A
48
49subsystem
50#if KERNEL_USER
51KernelUser
52#endif
53gssd_mach 999;
54
55serverprefix svc_;
56
316670eb 57Routine mach_gss_init_sec_context(
2d21ac55 58 server : mach_port_t;
6d2010ae
A
59 in mech : gssd_mechtype;
60 in intoken : gssd_byte_buffer;
2d21ac55 61 in uid : uint32_t;
6d2010ae
A
62 in princ_namestr : gssd_string;
63 in svc_namestr : gssd_string;
2d21ac55 64 in flags : uint32_t;
b0d623f7 65 in gssd_flags : uint32_t;
6d2010ae
A
66 inout context : gssd_ctx;
67 inout cred_handle : gssd_cred;
316670eb 68 ServerAuditToken atoken : audit_token_t;
b0d623f7 69 out ret_flags : uint32_t;
6d2010ae
A
70 out key : gssd_byte_buffer, dealloc;
71 out outtoken : gssd_byte_buffer, dealloc;
2d21ac55
A
72 out major_stat : uint32_t;
73 out minor_stat : uint32_t
74);
75
76routine mach_gss_accept_sec_context(
77 server : mach_port_t;
6d2010ae
A
78 in intoken : gssd_byte_buffer;
79 in svc_namestr : gssd_string;
b0d623f7 80 in gssd_flags : uint32_t;
6d2010ae
A
81 inout context : gssd_ctx;
82 inout cred_handle : gssd_cred;
316670eb 83 ServerAuditToken atoken : audit_token_t;
b0d623f7 84 out flags : uint32_t;
2d21ac55 85 out uid : uint32_t;
6d2010ae
A
86 out gids : gssd_gid_list;
87 out key : gssd_byte_buffer, dealloc;
88 out outtoken : gssd_byte_buffer, dealloc;
2d21ac55
A
89 out major_stat : uint32_t;
90 out minor_stat : uint32_t
91);
92
93simpleroutine mach_gss_log_error(
94 server : mach_port_t;
6d2010ae 95 in mnt : gssd_string;
2d21ac55 96 in uid : uint32_t;
6d2010ae 97 in source : gssd_string;
2d21ac55 98 in major_stat : uint32_t;
316670eb
A
99 in minor_stat : uint32_t;
100 ServerAuditToken atoken : audit_token_t
2d21ac55 101);
6d2010ae
A
102
103routine mach_gss_init_sec_context_v2(
104 server : mach_port_t;
105 in mech : gssd_mechtype;
106 in intoken : gssd_byte_buffer;
107 in uid : uint32_t;
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;
112 in flags : uint32_t;
113 inout gssd_flags : uint32_t;
114 inout context : gssd_ctx;
115 inout cred_handle : gssd_cred;
316670eb 116 ServerAuditToken atoken : audit_token_t;
6d2010ae
A
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
123);
124
125routine 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;
316670eb 133 ServerAuditToken atoken : audit_token_t;
6d2010ae
A
134 out flags : uint32_t;
135 out uid : 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
141);
142
39037602
A
143routine mach_gss_init_sec_context_v3(
144 server : mach_port_t;
145 in mech : gssd_mechtype;
146 in intoken : gssd_byte_buffer;
147 in uid : uint32_t;
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;
152 in flags : uint32_t;
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
164);
165
6d2010ae
A
166routine 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;
316670eb 171 ServerAuditToken atoken : audit_token_t;
6d2010ae
A
172 out major_stat : uint32_t;
173 out minor_stat : uint32_t
174);
175
176routine 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;
316670eb 181 ServerAuditToken atoken : audit_token_t;
6d2010ae
A
182 out major_stat : uint32_t;
183 out minor_stat : uint32_t
184);
316670eb
A
185
186routine mach_gss_lookup(
187 server : mach_port_t;
188 in uid : uint32_t;
189 in asid : int32_t;
190 ServerAuditToken atoken : audit_token_t;
191 out gssd_session_port : mach_port_t
192);