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