1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
/*-
* Copyright (c) 2008 Isilon Inc http://www.isilon.com/
* Authors: Doug Rabson <dfr@rabson.org>
* Developed with Red Inc: Alfred Perlstein <alfred@freebsd.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* $FreeBSD$ */
#ifdef RPC_HDR
%#ifdef _KERNEL
%#include <kgssapi/gssapi.h>
%#else
%#include <gssapi/gssapi.h>
%#endif
%extern bool_t xdr_gss_buffer_desc(XDR *xdrs, gss_buffer_desc *buf);
%extern bool_t xdr_gss_OID_desc(XDR *xdrs, gss_OID_desc *oid);
%extern bool_t xdr_gss_OID(XDR *xdrs, gss_OID *oidp);
%extern bool_t xdr_gss_OID_set_desc(XDR *xdrs, gss_OID_set_desc *set);
%extern bool_t xdr_gss_OID_set(XDR *xdrs, gss_OID_set *setp);
%extern bool_t xdr_gss_channel_bindings_t(XDR *xdrs, gss_channel_bindings_t *chp);
#endif
typedef uint64_t gssd_ctx_id_t;
typedef uint64_t gssd_cred_id_t;
typedef uint64_t gssd_name_t;
struct init_sec_context_res {
uint32_t major_status;
uint32_t minor_status;
gssd_ctx_id_t ctx;
gss_OID actual_mech_type;
gss_buffer_desc output_token;
uint32_t ret_flags;
uint32_t time_rec;
};
struct init_sec_context_args {
uint32_t uid;
gssd_cred_id_t cred;
gssd_ctx_id_t ctx;
gssd_name_t name;
gss_OID mech_type;
uint32_t req_flags;
uint32_t time_req;
gss_channel_bindings_t input_chan_bindings;
gss_buffer_desc input_token;
};
struct accept_sec_context_res {
uint32_t major_status;
uint32_t minor_status;
gssd_ctx_id_t ctx;
gssd_name_t src_name;
gss_OID mech_type;
gss_buffer_desc output_token;
uint32_t ret_flags;
uint32_t time_rec;
gssd_cred_id_t delegated_cred_handle;
};
struct accept_sec_context_args {
gssd_ctx_id_t ctx;
gssd_cred_id_t cred;
gss_buffer_desc input_token;
gss_channel_bindings_t input_chan_bindings;
};
struct delete_sec_context_res {
uint32_t major_status;
uint32_t minor_status;
gss_buffer_desc output_token;
};
struct delete_sec_context_args {
gssd_ctx_id_t ctx;
};
enum sec_context_format {
KGSS_HEIMDAL_0_6,
KGSS_HEIMDAL_1_1
};
struct export_sec_context_res {
uint32_t major_status;
uint32_t minor_status;
enum sec_context_format format;
gss_buffer_desc interprocess_token;
};
struct export_sec_context_args {
gssd_ctx_id_t ctx;
};
struct import_name_res {
uint32_t major_status;
uint32_t minor_status;
gssd_name_t output_name;
};
struct import_name_args {
gss_buffer_desc input_name_buffer;
gss_OID input_name_type;
};
struct canonicalize_name_res {
uint32_t major_status;
uint32_t minor_status;
gssd_name_t output_name;
};
struct canonicalize_name_args {
gssd_name_t input_name;
gss_OID mech_type;
};
struct export_name_res {
uint32_t major_status;
uint32_t minor_status;
gss_buffer_desc exported_name;
};
struct export_name_args {
gssd_name_t input_name;
};
struct release_name_res {
uint32_t major_status;
uint32_t minor_status;
};
struct release_name_args {
gssd_name_t input_name;
};
struct pname_to_uid_res {
uint32_t major_status;
uint32_t minor_status;
uint32_t uid;
uint32_t gid;
uint32_t gidlist<>;
};
struct pname_to_uid_args {
gssd_name_t pname;
gss_OID mech;
};
struct acquire_cred_res {
uint32_t major_status;
uint32_t minor_status;
gssd_cred_id_t output_cred;
gss_OID_set actual_mechs;
uint32_t time_rec;
};
struct acquire_cred_args {
uint32_t uid;
gssd_name_t desired_name;
uint32_t time_req;
gss_OID_set desired_mechs;
int cred_usage;
};
struct set_cred_option_res {
uint32_t major_status;
uint32_t minor_status;
};
struct set_cred_option_args {
gssd_cred_id_t cred;
gss_OID option_name;
gss_buffer_desc option_value;
};
struct release_cred_res {
uint32_t major_status;
uint32_t minor_status;
};
struct release_cred_args {
gssd_cred_id_t cred;
};
struct display_status_res {
uint32_t major_status;
uint32_t minor_status;
uint32_t message_context;
gss_buffer_desc status_string;
};
struct display_status_args {
uint32_t status_value;
int status_type;
gss_OID mech_type;
uint32_t message_context;
};
program GSSD {
version GSSDVERS {
void GSSD_NULL(void) = 0;
init_sec_context_res
GSSD_INIT_SEC_CONTEXT(init_sec_context_args) = 1;
accept_sec_context_res
GSSD_ACCEPT_SEC_CONTEXT(accept_sec_context_args) = 2;
delete_sec_context_res
GSSD_DELETE_SEC_CONTEXT(delete_sec_context_args) = 3;
export_sec_context_res
GSSD_EXPORT_SEC_CONTEXT(export_sec_context_args) = 4;
import_name_res
GSSD_IMPORT_NAME(import_name_args) = 5;
canonicalize_name_res
GSSD_CANONICALIZE_NAME(canonicalize_name_args) = 6;
export_name_res
GSSD_EXPORT_NAME(export_name_args) = 7;
release_name_res
GSSD_RELEASE_NAME(release_name_args) = 8;
pname_to_uid_res
GSSD_PNAME_TO_UID(pname_to_uid_args) = 9;
acquire_cred_res
GSSD_ACQUIRE_CRED(acquire_cred_args) = 10;
set_cred_option_res
GSSD_SET_CRED_OPTION(set_cred_option_args) = 11;
release_cred_res
GSSD_RELEASE_CRED(release_cred_args) = 12;
display_status_res
GSSD_DISPLAY_STATUS(display_status_args) = 13;
} = 1;
} = 0x40677373;
|