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