2 * Copyright (c) 2008 Isilon Inc http://www.isilon.com/
3 * Authors: Doug Rabson <dfr@rabson.org>
4 * Developed with Red Inc: Alfred Perlstein <alfred@freebsd.org>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 %#include <kgssapi/gssapi.h>
35 %#include <gssapi/gssapi.h>
38 %extern bool_t xdr_gss_buffer_desc(XDR *xdrs, gss_buffer_desc *buf);
39 %extern bool_t xdr_gss_OID_desc(XDR *xdrs, gss_OID_desc *oid);
40 %extern bool_t xdr_gss_OID(XDR *xdrs, gss_OID *oidp);
41 %extern bool_t xdr_gss_OID_set_desc(XDR *xdrs, gss_OID_set_desc *set);
42 %extern bool_t xdr_gss_OID_set(XDR *xdrs, gss_OID_set *setp);
43 %extern bool_t xdr_gss_channel_bindings_t(XDR *xdrs, gss_channel_bindings_t *chp);
47 typedef uint64_t gssd_ctx_id_t;
48 typedef uint64_t gssd_cred_id_t;
49 typedef uint64_t gssd_name_t;
51 struct init_sec_context_res {
52 uint32_t major_status;
53 uint32_t minor_status;
55 gss_OID actual_mech_type;
56 gss_buffer_desc output_token;
61 struct init_sec_context_args {
69 gss_channel_bindings_t input_chan_bindings;
70 gss_buffer_desc input_token;
73 struct accept_sec_context_res {
74 uint32_t major_status;
75 uint32_t minor_status;
79 gss_buffer_desc output_token;
82 gssd_cred_id_t delegated_cred_handle;
85 struct accept_sec_context_args {
88 gss_buffer_desc input_token;
89 gss_channel_bindings_t input_chan_bindings;
92 struct delete_sec_context_res {
93 uint32_t major_status;
94 uint32_t minor_status;
95 gss_buffer_desc output_token;
98 struct delete_sec_context_args {
102 enum sec_context_format {
107 struct export_sec_context_res {
108 uint32_t major_status;
109 uint32_t minor_status;
110 enum sec_context_format format;
111 gss_buffer_desc interprocess_token;
114 struct export_sec_context_args {
118 struct import_name_res {
119 uint32_t major_status;
120 uint32_t minor_status;
121 gssd_name_t output_name;
124 struct import_name_args {
125 gss_buffer_desc input_name_buffer;
126 gss_OID input_name_type;
129 struct canonicalize_name_res {
130 uint32_t major_status;
131 uint32_t minor_status;
132 gssd_name_t output_name;
135 struct canonicalize_name_args {
136 gssd_name_t input_name;
140 struct export_name_res {
141 uint32_t major_status;
142 uint32_t minor_status;
143 gss_buffer_desc exported_name;
146 struct export_name_args {
147 gssd_name_t input_name;
150 struct release_name_res {
151 uint32_t major_status;
152 uint32_t minor_status;
155 struct release_name_args {
156 gssd_name_t input_name;
159 struct pname_to_uid_res {
160 uint32_t major_status;
161 uint32_t minor_status;
167 struct pname_to_uid_args {
172 struct acquire_cred_res {
173 uint32_t major_status;
174 uint32_t minor_status;
175 gssd_cred_id_t output_cred;
176 gss_OID_set actual_mechs;
180 struct acquire_cred_args {
182 gssd_name_t desired_name;
184 gss_OID_set desired_mechs;
188 struct set_cred_option_res {
189 uint32_t major_status;
190 uint32_t minor_status;
193 struct set_cred_option_args {
196 gss_buffer_desc option_value;
199 struct release_cred_res {
200 uint32_t major_status;
201 uint32_t minor_status;
204 struct release_cred_args {
208 struct display_status_res {
209 uint32_t major_status;
210 uint32_t minor_status;
211 uint32_t message_context;
212 gss_buffer_desc status_string;
215 struct display_status_args {
216 uint32_t status_value;
219 uint32_t message_context;
224 void GSSD_NULL(void) = 0;
227 GSSD_INIT_SEC_CONTEXT(init_sec_context_args) = 1;
229 accept_sec_context_res
230 GSSD_ACCEPT_SEC_CONTEXT(accept_sec_context_args) = 2;
232 delete_sec_context_res
233 GSSD_DELETE_SEC_CONTEXT(delete_sec_context_args) = 3;
235 export_sec_context_res
236 GSSD_EXPORT_SEC_CONTEXT(export_sec_context_args) = 4;
239 GSSD_IMPORT_NAME(import_name_args) = 5;
241 canonicalize_name_res
242 GSSD_CANONICALIZE_NAME(canonicalize_name_args) = 6;
245 GSSD_EXPORT_NAME(export_name_args) = 7;
248 GSSD_RELEASE_NAME(release_name_args) = 8;
251 GSSD_PNAME_TO_UID(pname_to_uid_args) = 9;
254 GSSD_ACQUIRE_CRED(acquire_cred_args) = 10;
257 GSSD_SET_CRED_OPTION(set_cred_option_args) = 11;
260 GSSD_RELEASE_CRED(release_cred_args) = 12;
263 GSSD_DISPLAY_STATUS(display_status_args) = 13;