]> git.saurik.com Git - apple/xnu.git/blob - osfmk/gssd/gssd_mach.defs
xnu-1699.26.8.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 out ret_flags : uint32_t;
68 out key : gssd_byte_buffer, dealloc;
69 out outtoken : gssd_byte_buffer, dealloc;
70 out major_stat : uint32_t;
71 out minor_stat : uint32_t
72 );
73
74 routine mach_gss_accept_sec_context(
75 server : mach_port_t;
76 in intoken : gssd_byte_buffer;
77 in svc_namestr : gssd_string;
78 in gssd_flags : uint32_t;
79 inout context : gssd_ctx;
80 inout cred_handle : gssd_cred;
81 out flags : uint32_t;
82 out uid : uint32_t;
83 out gids : gssd_gid_list;
84 out key : gssd_byte_buffer, dealloc;
85 out outtoken : gssd_byte_buffer, dealloc;
86 out major_stat : uint32_t;
87 out minor_stat : uint32_t
88 );
89
90 simpleroutine mach_gss_log_error(
91 server : mach_port_t;
92 in mnt : gssd_string;
93 in uid : uint32_t;
94 in source : gssd_string;
95 in major_stat : uint32_t;
96 in minor_stat : uint32_t
97 );
98
99 routine mach_gss_init_sec_context_v2(
100 server : mach_port_t;
101 in mech : gssd_mechtype;
102 in intoken : gssd_byte_buffer;
103 in uid : uint32_t;
104 in clnt_nt : gssd_nametype;
105 in clnt_princ : gssd_byte_buffer;
106 in svc_nt : gssd_nametype;
107 in svc_princ : gssd_byte_buffer;
108 in flags : uint32_t;
109 inout gssd_flags : uint32_t;
110 inout context : gssd_ctx;
111 inout cred_handle : gssd_cred;
112 out ret_flags : uint32_t;
113 out key : gssd_byte_buffer, dealloc;
114 out outtoken : gssd_byte_buffer, dealloc;
115 out displayname : gssd_dstring;
116 out major_stat : uint32_t;
117 out minor_stat : uint32_t
118 );
119
120 routine mach_gss_accept_sec_context_v2(
121 server : mach_port_t;
122 in intoken : gssd_byte_buffer;
123 in svc_nt : gssd_nametype;
124 in svc_princ : gssd_byte_buffer;
125 inout gssd_flags : uint32_t;
126 inout context : gssd_ctx;
127 inout cred_handle : gssd_cred;
128 out flags : uint32_t;
129 out uid : uint32_t;
130 out gids : gssd_gid_list;
131 out key : gssd_byte_buffer, dealloc;
132 out outtoken : gssd_byte_buffer, dealloc;
133 out major_stat : uint32_t;
134 out minor_stat : uint32_t
135 );
136
137 routine mach_gss_hold_cred(
138 server : mach_port_t;
139 in mech : gssd_mechtype;
140 in nt : gssd_nametype;
141 in princ : gssd_byte_buffer;
142 out major_stat : uint32_t;
143 out minor_stat : uint32_t
144 );
145
146 routine mach_gss_unhold_cred(
147 server : mach_port_t;
148 in mech : gssd_mechtype;
149 in nt : gssd_nametype;
150 in princ : gssd_byte_buffer;
151 out major_stat : uint32_t;
152 out minor_stat : uint32_t
153 );