]> git.saurik.com Git - apple/xnu.git/blob - osfmk/gssd/gssd_mach.defs
xnu-2782.40.9.tar.gz
[apple/xnu.git] / osfmk / gssd / gssd_mach.defs
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
33 import <gssd/gssd_mach_types.h>;
34 #else
35 import <System/gssd/gssd_mach_types.h>;
36 #endif
37
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
48 subsystem
49 #if KERNEL_USER
50 KernelUser
51 #endif
52 gssd_mach 999;
53
54 serverprefix svc_;
55
56 Routine mach_gss_init_sec_context(
57 server : mach_port_t;
58 in mech : gssd_mechtype;
59 in intoken : gssd_byte_buffer;
60 in uid : uint32_t;
61 in princ_namestr : gssd_string;
62 in svc_namestr : gssd_string;
63 in flags : uint32_t;
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
73 );
74
75 routine mach_gss_accept_sec_context(
76 server : mach_port_t;
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;
83 out flags : uint32_t;
84 out uid : uint32_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
90 );
91
92 simpleroutine mach_gss_log_error(
93 server : mach_port_t;
94 in mnt : gssd_string;
95 in uid : uint32_t;
96 in source : gssd_string;
97 in major_stat : uint32_t;
98 in minor_stat : uint32_t;
99 ServerAuditToken atoken : audit_token_t
100 );
101
102 routine mach_gss_init_sec_context_v2(
103 server : mach_port_t;
104 in mech : gssd_mechtype;
105 in intoken : gssd_byte_buffer;
106 in uid : uint32_t;
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;
111 in flags : uint32_t;
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
122 );
123
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;
134 out uid : 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
140 );
141
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
150 );
151
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
160 );
161
162 routine mach_gss_lookup(
163 server : mach_port_t;
164 in uid : uint32_t;
165 in asid : int32_t;
166 ServerAuditToken atoken : audit_token_t;
167 out gssd_session_port : mach_port_t
168 );