1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate %/* 23*0Sstevel@tonic-gate % * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*0Sstevel@tonic-gate % * Use is subject to license terms. 25*0Sstevel@tonic-gate % */ 26*0Sstevel@tonic-gate % 27*0Sstevel@tonic-gate %#pragma ident "%Z%%M% %I% %E% SMI" 28*0Sstevel@tonic-gate % 29*0Sstevel@tonic-gate %/* 30*0Sstevel@tonic-gate % * RPC protocol information for gssd, the usermode daemon that 31*0Sstevel@tonic-gate % * assists the kernel with gssapi. It is gssd that executes all 32*0Sstevel@tonic-gate % * gssapi calls except for some such as gss_sign(), and 33*0Sstevel@tonic-gate % * gss_verify(), which are executed in the kernel itself. 34*0Sstevel@tonic-gate % * 35*0Sstevel@tonic-gate % * File generated from gssd.x 36*0Sstevel@tonic-gate % */ 37*0Sstevel@tonic-gate % 38*0Sstevel@tonic-gate %#define NO 0 39*0Sstevel@tonic-gate %#define YES 1 40*0Sstevel@tonic-gate %#define FOREVER 1 41*0Sstevel@tonic-gate % 42*0Sstevel@tonic-gate %#include <sys/types.h> 43*0Sstevel@tonic-gate %#include <sys/time.h> 44*0Sstevel@tonic-gate %#include <rpc/auth_sys.h> 45*0Sstevel@tonic-gate %#ifndef _KERNEL 46*0Sstevel@tonic-gate %#include <locale.h> 47*0Sstevel@tonic-gate %#endif /* not _KERNEL */ 48*0Sstevel@tonic-gate % 49*0Sstevel@tonic-gate 50*0Sstevel@tonic-gate %#ifdef _KERNEL 51*0Sstevel@tonic-gate %extern void killgssd_handle(CLIENT *); 52*0Sstevel@tonic-gate %extern CLIENT *getgssd_handle(void); 53*0Sstevel@tonic-gate %#endif /* _KERNEL */ 54*0Sstevel@tonic-gate % 55*0Sstevel@tonic-gate /* 56*0Sstevel@tonic-gate * These are the definitions for the interface to GSSD. 57*0Sstevel@tonic-gate */ 58*0Sstevel@tonic-gate 59*0Sstevel@tonic-gate typedef unsigned int OM_UINT32; 60*0Sstevel@tonic-gate 61*0Sstevel@tonic-gate typedef opaque GSS_CTX_ID_T<>; 62*0Sstevel@tonic-gate typedef opaque GSS_CRED_ID_T<>; 63*0Sstevel@tonic-gate typedef opaque GSS_OID<>; 64*0Sstevel@tonic-gate typedef opaque GSS_BUFFER_T<>; 65*0Sstevel@tonic-gate typedef gid_t GSSCRED_GIDS<>; 66*0Sstevel@tonic-gate 67*0Sstevel@tonic-gate typedef GSS_OID GSS_OID_SET<>; 68*0Sstevel@tonic-gate 69*0Sstevel@tonic-gate struct GSS_CHANNEL_BINDINGS_STRUCT { 70*0Sstevel@tonic-gate int present; 71*0Sstevel@tonic-gate OM_UINT32 initiator_addrtype; 72*0Sstevel@tonic-gate GSS_BUFFER_T initiator_address; 73*0Sstevel@tonic-gate OM_UINT32 acceptor_addrtype; 74*0Sstevel@tonic-gate GSS_BUFFER_T acceptor_address; 75*0Sstevel@tonic-gate GSS_BUFFER_T application_data; 76*0Sstevel@tonic-gate }; 77*0Sstevel@tonic-gate 78*0Sstevel@tonic-gate typedef struct GSS_CHANNEL_BINDINGS_STRUCT GSS_CHANNEL_BINDINGS; 79*0Sstevel@tonic-gate 80*0Sstevel@tonic-gate struct gss_acquire_cred_arg { 81*0Sstevel@tonic-gate uid_t uid; /* client uid */ 82*0Sstevel@tonic-gate GSS_BUFFER_T desired_name; /* name of cred */ 83*0Sstevel@tonic-gate GSS_OID name_type; /* type of desired name */ 84*0Sstevel@tonic-gate OM_UINT32 time_req; /* context validity interval */ 85*0Sstevel@tonic-gate GSS_OID_SET desired_mechs; /* cred mechanisms */ 86*0Sstevel@tonic-gate int cred_usage; /* init/accept/both */ 87*0Sstevel@tonic-gate }; 88*0Sstevel@tonic-gate 89*0Sstevel@tonic-gate struct gss_acquire_cred_res { 90*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 91*0Sstevel@tonic-gate GSS_CRED_ID_T output_cred_handle; /* returned credential handle */ 92*0Sstevel@tonic-gate OM_UINT32 gssd_cred_verifier; /* verifier for cred handle */ 93*0Sstevel@tonic-gate GSS_OID_SET actual_mechs; /* found cred mechanisms */ 94*0Sstevel@tonic-gate OM_UINT32 time_rec; /* actual context validity */ 95*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 96*0Sstevel@tonic-gate }; 97*0Sstevel@tonic-gate 98*0Sstevel@tonic-gate struct gss_add_cred_arg { 99*0Sstevel@tonic-gate uid_t uid; /* client uid */ 100*0Sstevel@tonic-gate GSS_CRED_ID_T input_cred_handle; /* input credential handle */ 101*0Sstevel@tonic-gate OM_UINT32 gssd_cred_verifier; /* verifier for cred handle */ 102*0Sstevel@tonic-gate GSS_BUFFER_T desired_name; /* name of cred */ 103*0Sstevel@tonic-gate GSS_OID name_type; /* type of desired name */ 104*0Sstevel@tonic-gate GSS_OID desired_mech_type; /* cred mechanisms */ 105*0Sstevel@tonic-gate int cred_usage; /* init/accept/both */ 106*0Sstevel@tonic-gate OM_UINT32 initiator_time_req; /* context validity interval */ 107*0Sstevel@tonic-gate OM_UINT32 acceptor_time_req; /* context validity interval */ 108*0Sstevel@tonic-gate }; 109*0Sstevel@tonic-gate /* Note: For gss_add_cred we always update the underlying credentials of 110*0Sstevel@tonic-gate * input_cred_handle. We always pass NULL as output_cred_handle when the call 111*0Sstevel@tonic-gate * to gss_add_cred is made 112*0Sstevel@tonic-gate */ 113*0Sstevel@tonic-gate struct gss_add_cred_res { 114*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 115*0Sstevel@tonic-gate GSS_OID_SET actual_mechs; /* found cred mechanisms */ 116*0Sstevel@tonic-gate OM_UINT32 initiator_time_rec; /* cred validity interval */ 117*0Sstevel@tonic-gate OM_UINT32 acceptor_time_rec; /* cred validity interval */ 118*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 119*0Sstevel@tonic-gate }; 120*0Sstevel@tonic-gate 121*0Sstevel@tonic-gate struct gss_release_cred_arg { 122*0Sstevel@tonic-gate uid_t uid; /* client uid */ 123*0Sstevel@tonic-gate OM_UINT32 gssd_cred_verifier; /* verifier for cred handles */ 124*0Sstevel@tonic-gate GSS_CRED_ID_T cred_handle; /* credential handle */ 125*0Sstevel@tonic-gate }; 126*0Sstevel@tonic-gate 127*0Sstevel@tonic-gate struct gss_release_cred_res { 128*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 129*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 130*0Sstevel@tonic-gate }; 131*0Sstevel@tonic-gate 132*0Sstevel@tonic-gate struct gss_init_sec_context_arg { 133*0Sstevel@tonic-gate uid_t uid; /* client uid */ 134*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 135*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 136*0Sstevel@tonic-gate GSS_CRED_ID_T claimant_cred_handle; /* must = GSS_C_NO_CREDENTIAL */ 137*0Sstevel@tonic-gate OM_UINT32 gssd_cred_verifier; /* verifier for cred handle */ 138*0Sstevel@tonic-gate GSS_BUFFER_T target_name; /* name of server */ 139*0Sstevel@tonic-gate GSS_OID name_type; /* type of principal name */ 140*0Sstevel@tonic-gate GSS_OID mech_type; /* requested mechanism */ 141*0Sstevel@tonic-gate int req_flags; /* requested context options */ 142*0Sstevel@tonic-gate OM_UINT32 time_req; /* context validity interval */ 143*0Sstevel@tonic-gate GSS_CHANNEL_BINDINGS 144*0Sstevel@tonic-gate input_chan_bindings; /* requested channel bindings */ 145*0Sstevel@tonic-gate GSS_BUFFER_T input_token; /* token to send to peer */ 146*0Sstevel@tonic-gate }; 147*0Sstevel@tonic-gate 148*0Sstevel@tonic-gate struct gss_init_sec_context_res { 149*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to created context */ 150*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 151*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 152*0Sstevel@tonic-gate GSS_OID actual_mech_type; /* actual mechanism used */ 153*0Sstevel@tonic-gate GSS_BUFFER_T output_token; /* where peer token is put */ 154*0Sstevel@tonic-gate OM_UINT32 ret_flags; /* options of context */ 155*0Sstevel@tonic-gate OM_UINT32 time_rec; /* actual context validity */ 156*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 157*0Sstevel@tonic-gate }; 158*0Sstevel@tonic-gate 159*0Sstevel@tonic-gate struct gss_accept_sec_context_arg { 160*0Sstevel@tonic-gate uid_t uid; /* client uid */ 161*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 162*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 163*0Sstevel@tonic-gate GSS_CRED_ID_T verifier_cred_handle; /* must = GSS_C_NO_CREDENTIAL */ 164*0Sstevel@tonic-gate OM_UINT32 gssd_cred_verifier; /* verifier for cred handle */ 165*0Sstevel@tonic-gate GSS_BUFFER_T input_token_buffer; /* token to send to peer */ 166*0Sstevel@tonic-gate GSS_CHANNEL_BINDINGS 167*0Sstevel@tonic-gate input_chan_bindings; /* requested channel bindings */ 168*0Sstevel@tonic-gate }; 169*0Sstevel@tonic-gate 170*0Sstevel@tonic-gate struct gss_accept_sec_context_res { 171*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to created context */ 172*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 173*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 174*0Sstevel@tonic-gate GSS_BUFFER_T src_name; /* authenticated name of peer */ 175*0Sstevel@tonic-gate GSS_OID mech_type; /* mechanism used */ 176*0Sstevel@tonic-gate GSS_BUFFER_T output_token; /* where peer token is put */ 177*0Sstevel@tonic-gate OM_UINT32 ret_flags; /* options of context */ 178*0Sstevel@tonic-gate OM_UINT32 time_rec; /* actual context validity */ 179*0Sstevel@tonic-gate GSS_CRED_ID_T delegated_cred_handle; /* always GSS_C_NO_CREDENTIAL */ 180*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 181*0Sstevel@tonic-gate }; 182*0Sstevel@tonic-gate 183*0Sstevel@tonic-gate struct gss_process_context_token_arg { 184*0Sstevel@tonic-gate uid_t uid; /* client uid */ 185*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 186*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 187*0Sstevel@tonic-gate GSS_BUFFER_T token_buffer; /* token to process */ 188*0Sstevel@tonic-gate }; 189*0Sstevel@tonic-gate 190*0Sstevel@tonic-gate struct gss_process_context_token_res { 191*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 192*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 193*0Sstevel@tonic-gate }; 194*0Sstevel@tonic-gate 195*0Sstevel@tonic-gate struct gss_delete_sec_context_arg { 196*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 197*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 198*0Sstevel@tonic-gate }; 199*0Sstevel@tonic-gate 200*0Sstevel@tonic-gate struct gss_delete_sec_context_res { 201*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 202*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to deleted context */ 203*0Sstevel@tonic-gate GSS_BUFFER_T output_token; /* output token for peer */ 204*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 205*0Sstevel@tonic-gate }; 206*0Sstevel@tonic-gate 207*0Sstevel@tonic-gate struct gss_export_sec_context_arg { 208*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 209*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 210*0Sstevel@tonic-gate }; 211*0Sstevel@tonic-gate 212*0Sstevel@tonic-gate struct gss_export_sec_context_res { 213*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 214*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 215*0Sstevel@tonic-gate GSS_BUFFER_T output_token; /* input token for import_sec_context */ 216*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 217*0Sstevel@tonic-gate }; 218*0Sstevel@tonic-gate 219*0Sstevel@tonic-gate struct gss_import_sec_context_arg { 220*0Sstevel@tonic-gate GSS_BUFFER_T input_token; /* input token for import_sec_context */ 221*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 222*0Sstevel@tonic-gate }; 223*0Sstevel@tonic-gate 224*0Sstevel@tonic-gate struct gss_import_sec_context_res { 225*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 226*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to created context */ 227*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 228*0Sstevel@tonic-gate }; 229*0Sstevel@tonic-gate 230*0Sstevel@tonic-gate struct gss_context_time_arg { 231*0Sstevel@tonic-gate uid_t uid; /* client uid */ 232*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 233*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 234*0Sstevel@tonic-gate }; 235*0Sstevel@tonic-gate 236*0Sstevel@tonic-gate struct gss_context_time_res { 237*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 238*0Sstevel@tonic-gate OM_UINT32 time_rec; /* actual context validity */ 239*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 240*0Sstevel@tonic-gate }; 241*0Sstevel@tonic-gate 242*0Sstevel@tonic-gate struct gss_sign_arg { 243*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 244*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 245*0Sstevel@tonic-gate int qop_req; /* quality of protection */ 246*0Sstevel@tonic-gate GSS_BUFFER_T message_buffer; /* message to sign */ 247*0Sstevel@tonic-gate }; 248*0Sstevel@tonic-gate 249*0Sstevel@tonic-gate struct gss_sign_res { 250*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 251*0Sstevel@tonic-gate GSS_BUFFER_T msg_token; /* msg_token */ 252*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 253*0Sstevel@tonic-gate }; 254*0Sstevel@tonic-gate 255*0Sstevel@tonic-gate struct gss_verify_arg { 256*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 257*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 258*0Sstevel@tonic-gate GSS_BUFFER_T message_buffer; /* message to verify */ 259*0Sstevel@tonic-gate GSS_BUFFER_T token_buffer; /* buffer containg token */ 260*0Sstevel@tonic-gate }; 261*0Sstevel@tonic-gate 262*0Sstevel@tonic-gate struct gss_verify_res { 263*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 264*0Sstevel@tonic-gate int qop_state; /* quality of protection */ 265*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 266*0Sstevel@tonic-gate }; 267*0Sstevel@tonic-gate 268*0Sstevel@tonic-gate %/* EXPORT DELETE START */ 269*0Sstevel@tonic-gate struct gss_seal_arg { 270*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 271*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 272*0Sstevel@tonic-gate int conf_req_flag; /* type of conf requested */ 273*0Sstevel@tonic-gate int qop_req; /* quality of prot. requested */ 274*0Sstevel@tonic-gate GSS_BUFFER_T input_message_buffer; /* message to protect */ 275*0Sstevel@tonic-gate }; 276*0Sstevel@tonic-gate 277*0Sstevel@tonic-gate struct gss_seal_res { 278*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 279*0Sstevel@tonic-gate int conf_state; /* type of conf. applied */ 280*0Sstevel@tonic-gate GSS_BUFFER_T output_message_buffer; /* protected message */ 281*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 282*0Sstevel@tonic-gate }; 283*0Sstevel@tonic-gate 284*0Sstevel@tonic-gate struct gss_unseal_arg { 285*0Sstevel@tonic-gate OM_UINT32 gssd_context_verifier; /* verifier for context handles */ 286*0Sstevel@tonic-gate GSS_CTX_ID_T context_handle; /* handle to existing context */ 287*0Sstevel@tonic-gate GSS_BUFFER_T input_message_buffer; /* message to protect */ 288*0Sstevel@tonic-gate }; 289*0Sstevel@tonic-gate 290*0Sstevel@tonic-gate struct gss_unseal_res { 291*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 292*0Sstevel@tonic-gate GSS_BUFFER_T output_message_buffer; /* protected message */ 293*0Sstevel@tonic-gate int conf_state; /* type of conf. provided */ 294*0Sstevel@tonic-gate int qop_state; /* quality of prot. provided */ 295*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 296*0Sstevel@tonic-gate }; 297*0Sstevel@tonic-gate 298*0Sstevel@tonic-gate %/* EXPORT DELETE END */ 299*0Sstevel@tonic-gate 300*0Sstevel@tonic-gate struct gss_display_status_arg { 301*0Sstevel@tonic-gate uid_t uid; /* client uid */ 302*0Sstevel@tonic-gate int status_value; /* status to be converted */ 303*0Sstevel@tonic-gate int status_type; /* GSS or mech status */ 304*0Sstevel@tonic-gate GSS_OID mech_type; /* mechanism */ 305*0Sstevel@tonic-gate OM_UINT32 message_context; /* recursion flag */ 306*0Sstevel@tonic-gate }; 307*0Sstevel@tonic-gate 308*0Sstevel@tonic-gate struct gss_display_status_res { 309*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 310*0Sstevel@tonic-gate int message_context; /* recursion flag */ 311*0Sstevel@tonic-gate GSS_BUFFER_T status_string; /* text equiv of status */ 312*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 313*0Sstevel@tonic-gate }; 314*0Sstevel@tonic-gate 315*0Sstevel@tonic-gate %/* gss_indicate_mechs_arg is void. This appears in the rpc call def */ 316*0Sstevel@tonic-gate 317*0Sstevel@tonic-gate struct gss_indicate_mechs_res { 318*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 319*0Sstevel@tonic-gate GSS_OID_SET mech_set; /* mechanism set supported */ 320*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 321*0Sstevel@tonic-gate }; 322*0Sstevel@tonic-gate 323*0Sstevel@tonic-gate struct gss_inquire_cred_arg { 324*0Sstevel@tonic-gate uid_t uid; /* client uid */ 325*0Sstevel@tonic-gate OM_UINT32 gssd_cred_verifier; /* verifier for cred handle */ 326*0Sstevel@tonic-gate GSS_CRED_ID_T cred_handle; /* credential handle */ 327*0Sstevel@tonic-gate }; 328*0Sstevel@tonic-gate 329*0Sstevel@tonic-gate struct gss_inquire_cred_res { 330*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 331*0Sstevel@tonic-gate GSS_BUFFER_T name; /* name associated with cred */ 332*0Sstevel@tonic-gate GSS_OID name_type; /* type of name */ 333*0Sstevel@tonic-gate OM_UINT32 lifetime; /* remaining validiy period */ 334*0Sstevel@tonic-gate int cred_usage; /* how creds may be used */ 335*0Sstevel@tonic-gate GSS_OID_SET mechanisms; /* mechs associated with cred */ 336*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 337*0Sstevel@tonic-gate }; 338*0Sstevel@tonic-gate 339*0Sstevel@tonic-gate struct gss_inquire_cred_by_mech_arg { 340*0Sstevel@tonic-gate uid_t uid; /* client uid */ 341*0Sstevel@tonic-gate OM_UINT32 gssd_cred_verifier; /* verifier for cred handle */ 342*0Sstevel@tonic-gate GSS_CRED_ID_T cred_handle; /* credential handle */ 343*0Sstevel@tonic-gate GSS_OID mech_type; /* cred mechanism */ 344*0Sstevel@tonic-gate }; 345*0Sstevel@tonic-gate 346*0Sstevel@tonic-gate struct gss_inquire_cred_by_mech_res { 347*0Sstevel@tonic-gate OM_UINT32 minor_status; /* status from the mechanism */ 348*0Sstevel@tonic-gate OM_UINT32 status; /* status of GSSAPI call */ 349*0Sstevel@tonic-gate }; 350*0Sstevel@tonic-gate 351*0Sstevel@tonic-gate struct gsscred_name_to_unix_cred_arg { 352*0Sstevel@tonic-gate uid_t uid; /* client uid */ 353*0Sstevel@tonic-gate GSS_BUFFER_T pname; /* principal name */ 354*0Sstevel@tonic-gate GSS_OID name_type; /* oid of principal name */ 355*0Sstevel@tonic-gate GSS_OID mech_type; /* for which mechanism to use */ 356*0Sstevel@tonic-gate }; 357*0Sstevel@tonic-gate 358*0Sstevel@tonic-gate struct gsscred_name_to_unix_cred_res { 359*0Sstevel@tonic-gate uid_t uid; /* principal's uid */ 360*0Sstevel@tonic-gate gid_t gid; /* principal's gid */ 361*0Sstevel@tonic-gate GSSCRED_GIDS gids; /* array of principal's gids */ 362*0Sstevel@tonic-gate OM_UINT32 major; /* status of the GSSAPI call */ 363*0Sstevel@tonic-gate }; 364*0Sstevel@tonic-gate 365*0Sstevel@tonic-gate 366*0Sstevel@tonic-gate struct 367*0Sstevel@tonic-gate gsscred_expname_to_unix_cred_arg { 368*0Sstevel@tonic-gate uid_t uid; /* client uid */ 369*0Sstevel@tonic-gate GSS_BUFFER_T expname; /* principal in export format */ 370*0Sstevel@tonic-gate }; 371*0Sstevel@tonic-gate 372*0Sstevel@tonic-gate struct 373*0Sstevel@tonic-gate gsscred_expname_to_unix_cred_res { 374*0Sstevel@tonic-gate uid_t uid; /* principal's uid */ 375*0Sstevel@tonic-gate gid_t gid; /* principal's gid */ 376*0Sstevel@tonic-gate GSSCRED_GIDS gids; /* array of principal's gids */ 377*0Sstevel@tonic-gate OM_UINT32 major; /* major status code */ 378*0Sstevel@tonic-gate }; 379*0Sstevel@tonic-gate 380*0Sstevel@tonic-gate 381*0Sstevel@tonic-gate struct gss_get_group_info_arg { 382*0Sstevel@tonic-gate uid_t uid; /* client uid */ 383*0Sstevel@tonic-gate uid_t puid; /* principal's uid */ 384*0Sstevel@tonic-gate }; 385*0Sstevel@tonic-gate 386*0Sstevel@tonic-gate struct gss_get_group_info_res { 387*0Sstevel@tonic-gate gid_t gid; /* principal's gid */ 388*0Sstevel@tonic-gate GSSCRED_GIDS gids; /* array of principal's gids */ 389*0Sstevel@tonic-gate OM_UINT32 major; /* major status code */ 390*0Sstevel@tonic-gate }; 391*0Sstevel@tonic-gate 392*0Sstevel@tonic-gate 393*0Sstevel@tonic-gate struct gss_get_kmod_arg { 394*0Sstevel@tonic-gate GSS_OID mech_oid; 395*0Sstevel@tonic-gate 396*0Sstevel@tonic-gate }; 397*0Sstevel@tonic-gate 398*0Sstevel@tonic-gate union gss_get_kmod_res switch (bool module_follow) { 399*0Sstevel@tonic-gate case TRUE: 400*0Sstevel@tonic-gate string modname<>; 401*0Sstevel@tonic-gate case FALSE: 402*0Sstevel@tonic-gate void; 403*0Sstevel@tonic-gate }; 404*0Sstevel@tonic-gate 405*0Sstevel@tonic-gate 406*0Sstevel@tonic-gate /* 407*0Sstevel@tonic-gate * The server accepts requests only from the loopback address. 408*0Sstevel@tonic-gate * Unix authentication is used, and the port must be in the reserved range. 409*0Sstevel@tonic-gate */ 410*0Sstevel@tonic-gate 411*0Sstevel@tonic-gate program GSSPROG { 412*0Sstevel@tonic-gate version GSSVERS { 413*0Sstevel@tonic-gate 414*0Sstevel@tonic-gate /* 415*0Sstevel@tonic-gate * Called by the client to acquire a credential. 416*0Sstevel@tonic-gate */ 417*0Sstevel@tonic-gate gss_acquire_cred_res 418*0Sstevel@tonic-gate GSS_ACQUIRE_CRED(gss_acquire_cred_arg) = 1; 419*0Sstevel@tonic-gate 420*0Sstevel@tonic-gate /* 421*0Sstevel@tonic-gate * Called by the client to release a credential. 422*0Sstevel@tonic-gate */ 423*0Sstevel@tonic-gate gss_release_cred_res 424*0Sstevel@tonic-gate GSS_RELEASE_CRED(gss_release_cred_arg) = 2; 425*0Sstevel@tonic-gate 426*0Sstevel@tonic-gate /* 427*0Sstevel@tonic-gate * Called by the client to initialize a security context. 428*0Sstevel@tonic-gate */ 429*0Sstevel@tonic-gate gss_init_sec_context_res 430*0Sstevel@tonic-gate GSS_INIT_SEC_CONTEXT(gss_init_sec_context_arg) = 3; 431*0Sstevel@tonic-gate 432*0Sstevel@tonic-gate /* 433*0Sstevel@tonic-gate * Called by the server to initialize a security context. 434*0Sstevel@tonic-gate */ 435*0Sstevel@tonic-gate gss_accept_sec_context_res 436*0Sstevel@tonic-gate GSS_ACCEPT_SEC_CONTEXT(gss_accept_sec_context_arg) = 4; 437*0Sstevel@tonic-gate 438*0Sstevel@tonic-gate /* 439*0Sstevel@tonic-gate * Called to pass token to underlying mechanism. 440*0Sstevel@tonic-gate */ 441*0Sstevel@tonic-gate gss_process_context_token_res 442*0Sstevel@tonic-gate GSS_PROCESS_CONTEXT_TOKEN(gss_process_context_token_arg) = 5; 443*0Sstevel@tonic-gate 444*0Sstevel@tonic-gate /* 445*0Sstevel@tonic-gate * Called to delete a security context. 446*0Sstevel@tonic-gate */ 447*0Sstevel@tonic-gate gss_delete_sec_context_res 448*0Sstevel@tonic-gate GSS_DELETE_SEC_CONTEXT(gss_delete_sec_context_arg) = 6; 449*0Sstevel@tonic-gate 450*0Sstevel@tonic-gate /* 451*0Sstevel@tonic-gate * Called to get remaining time security context has to live. 452*0Sstevel@tonic-gate */ 453*0Sstevel@tonic-gate gss_context_time_res 454*0Sstevel@tonic-gate GSS_CONTEXT_TIME(gss_context_time_arg) = 7; 455*0Sstevel@tonic-gate 456*0Sstevel@tonic-gate /* 457*0Sstevel@tonic-gate * Called to sign a message. 458*0Sstevel@tonic-gate */ 459*0Sstevel@tonic-gate gss_sign_res GSS_SIGN(gss_sign_arg) = 8; 460*0Sstevel@tonic-gate 461*0Sstevel@tonic-gate /* 462*0Sstevel@tonic-gate * Called to verify a signed message. 463*0Sstevel@tonic-gate */ 464*0Sstevel@tonic-gate gss_verify_res GSS_VERIFY(gss_verify_arg) = 9; 465*0Sstevel@tonic-gate 466*0Sstevel@tonic-gate /* 467*0Sstevel@tonic-gate * Called to translate minor status into a string. 468*0Sstevel@tonic-gate */ 469*0Sstevel@tonic-gate gss_display_status_res 470*0Sstevel@tonic-gate GSS_DISPLAY_STATUS(gss_display_status_arg) = 10; 471*0Sstevel@tonic-gate 472*0Sstevel@tonic-gate /* 473*0Sstevel@tonic-gate * Called to indicate which underlying mechanisms are supported 474*0Sstevel@tonic-gate */ 475*0Sstevel@tonic-gate gss_indicate_mechs_res 476*0Sstevel@tonic-gate GSS_INDICATE_MECHS(void) = 11; 477*0Sstevel@tonic-gate 478*0Sstevel@tonic-gate /* 479*0Sstevel@tonic-gate * Called by the client to inquire about a credential. 480*0Sstevel@tonic-gate */ 481*0Sstevel@tonic-gate gss_inquire_cred_res 482*0Sstevel@tonic-gate GSS_INQUIRE_CRED(gss_inquire_cred_arg) = 12; 483*0Sstevel@tonic-gate 484*0Sstevel@tonic-gate 485*0Sstevel@tonic-gate /* EXPORT DELETE START */ 486*0Sstevel@tonic-gate 487*0Sstevel@tonic-gate /* 488*0Sstevel@tonic-gate * Called to seal a message. 489*0Sstevel@tonic-gate */ 490*0Sstevel@tonic-gate gss_seal_res GSS_SEAL(gss_seal_arg) = 13; 491*0Sstevel@tonic-gate 492*0Sstevel@tonic-gate /* 493*0Sstevel@tonic-gate * Called to unseal a message. 494*0Sstevel@tonic-gate */ 495*0Sstevel@tonic-gate gss_unseal_res GSS_UNSEAL(gss_unseal_arg) = 14; 496*0Sstevel@tonic-gate 497*0Sstevel@tonic-gate /* EXPORT DELETE END */ 498*0Sstevel@tonic-gate 499*0Sstevel@tonic-gate /* 500*0Sstevel@tonic-gate * gsscred interface functions to obtain principal uid and gids 501*0Sstevel@tonic-gate */ 502*0Sstevel@tonic-gate gsscred_expname_to_unix_cred_res 503*0Sstevel@tonic-gate GSSCRED_EXPNAME_TO_UNIX_CRED( 504*0Sstevel@tonic-gate gsscred_expname_to_unix_cred_arg) = 15; 505*0Sstevel@tonic-gate 506*0Sstevel@tonic-gate gsscred_name_to_unix_cred_res 507*0Sstevel@tonic-gate GSSCRED_NAME_TO_UNIX_CRED( 508*0Sstevel@tonic-gate gsscred_name_to_unix_cred_arg) = 16; 509*0Sstevel@tonic-gate 510*0Sstevel@tonic-gate gss_get_group_info_res 511*0Sstevel@tonic-gate GSS_GET_GROUP_INFO(gss_get_group_info_arg) = 17; 512*0Sstevel@tonic-gate 513*0Sstevel@tonic-gate gss_get_kmod_res 514*0Sstevel@tonic-gate GSS_GET_KMOD(gss_get_kmod_arg) = 18; 515*0Sstevel@tonic-gate 516*0Sstevel@tonic-gate gss_export_sec_context_res 517*0Sstevel@tonic-gate GSS_EXPORT_SEC_CONTEXT(gss_export_sec_context_arg) = 19; 518*0Sstevel@tonic-gate 519*0Sstevel@tonic-gate gss_import_sec_context_res 520*0Sstevel@tonic-gate GSS_IMPORT_SEC_CONTEXT(gss_import_sec_context_arg) = 20; 521*0Sstevel@tonic-gate /* 522*0Sstevel@tonic-gate * Called by the client to add to a credential. 523*0Sstevel@tonic-gate */ 524*0Sstevel@tonic-gate gss_add_cred_res 525*0Sstevel@tonic-gate GSS_ADD_CRED(gss_add_cred_arg) = 21; 526*0Sstevel@tonic-gate gss_inquire_cred_by_mech_res 527*0Sstevel@tonic-gate GSS_INQUIRE_CRED_BY_MECH(gss_inquire_cred_by_mech_arg) 528*0Sstevel@tonic-gate = 22; 529*0Sstevel@tonic-gate 530*0Sstevel@tonic-gate } = 1; 531*0Sstevel@tonic-gate } = 100234; 532