/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
*/
/*
* rpcsec_gss.h, RPCSEC_GSS security service interface.
*/
#ifndef _RPCSEC_GSS_H
#define _RPCSEC_GSS_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Interface definitions.
*/
typedef enum {
rpc_gss_svc_default = 0,
/*
* GSS-API based security mechanism type specified as
* object identifiers (OIDs).
* This type is derived from gss_OID_desc/gss_OID.
*/
/*
* Interface data.
* This is already suitable for both LP64 and ILP32.
*/
typedef struct rpc_gss_principal {
int len;
typedef struct {
int req_flags;
int time_req;
typedef struct {
int major_status;
int minor_status;
int ret_flags;
int time_ret;
#ifdef _KERNEL
#else
#endif
/*
* raw credentials
*/
typedef struct {
#ifdef _KERNEL
#else
char *mechanism;
char *qop;
#endif
/*
* unix credentials
*/
typedef struct {
short gidlen;
/*
* for callback routine
*/
typedef struct {
/*
* lock used for the callback routine
*/
typedef struct {
/*
* This is for user RPC applications.
* Structure used to fetch the error code when one of
* the rpc_gss_* routines fails.
*/
typedef struct {
int rpc_gss_error;
int system_error;
#ifdef _SYSCALL32
struct gss_clnt_data32 {
};
#endif
/*
* This is for Kernel RPC applications.
* RPCSEC_GSS flavor specific data in sec_data opaque field.
*/
typedef struct gss_clnt_data {
struct svc_req;
/*
* KERNEL rpc_gss_* interfaces.
*/
#ifdef _KERNEL
void rpc_gss_secfree(AUTH *);
void rpc_gss_secpurge(void *);
#else
/*
* USER rpc_gss_* public interfaces
*/
AUTH *
char *principal, /* server service principal */
char *mechanism, /* security mechanism */
char *qop, /* requested QOP */
);
char *mechanism,
char *user_name,
char *node,
char *secdomain
);
char **rpc_gss_get_mechanisms();
char **rpc_gss_get_mech_info(
char *mechanism,
);
char *mechanism
);
char *mech,
);
char *qop,
char *mech,
);
char *principal,
char *mechanism,
);
char *qop
);
void
);
/*
* User level private interfaces
*/
enum auth_stat __svcrpcsec_gss();
#endif
/*
* USER and KERNEL rpc_gss_* interfaces.
*/
);
void **cookie
);
int
int max_tp_unit_len
);
int
int max_tp_unit_len
);
);
/*
* Protocol data.
*
* The reason to put these definition in this header file
* is for 2.6 snoop to handle the RPCSEC_GSS protocol
* interpretation.
*/
#define RPCSEC_GSS_DATA 0
#ifdef __cplusplus
}
#endif
#endif /* !_RPCSEC_GSS_H */