gssapi_ext.h revision ba7b222e36bac28710a7f43739283302b617e7f5
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Private extensions and utilities to the GSS-API.
* These are not part of the GSS-API specification
* but may be useful to GSS-API users.
*/
#ifndef _GSSAPI_EXT_H
#define _GSSAPI_EXT_H
#ifdef _KERNEL
#else
#include <strings.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* MACRO for comparison of gss_OID's */
/*
* MACRO for copying of OIDs - memory must already be allocated
* o2 is copied to o1
*/
/* MACRO to check if input buffer is valid */
/*
* GSSAPI Extension functions -- these functions aren't
* in the GSSAPI specification, but are provided in our
* GSS library.
*/
#ifndef _KERNEL
/*
* qop configuration file handling.
*/
#define MAX_QOP_NUM_PAIRS 128
#define MAX_QOPS_PER_MECH 128
typedef struct _qop_num {
char *qop;
char *mech;
} qop_num;
char *qop, /* input qop string */
char *mech, /* input mech string */
);
char *mech, /* input mech string */
char **qop /* output qop name */
);
char *mech, /* input mech string */
char **qops /* buffer for return qops */
);
char *mech, /* input mech */
int *numqops /* buffer to return numqops */
);
const char *mech, /* mechanism string name */
);
const char *
);
char *mechArray[], /* array to populate with mechs */
int arrayLen /* length of passed in array */
);
);
OM_uint32 *, /* minor status */
const gss_name_t, /* remote user principal name */
const char *, /* local unix user name */
const gss_buffer_t, /* export name */
uid_t *, /* uid out */
gid_t *, /* gid out */
gid_t *[], /* gid array out */
int *); /* gid array length */
const gss_name_t, /* gss name */
const gss_OID, /* mechanim type */
uid_t *, /* uid out */
gid_t *, /* gid out */
gid_t *[], /* gid array out */
int *); /* gid array length */
/*
* The following function will be used to resolve group
* ids from a UNIX uid.
*/
const uid_t, /* entity UNIX uid */
gid_t *, /* gid out */
gid_t *[], /* gid array */
int *); /* length of the gid array */
const gss_name_t desired_name,
const gss_buffer_t password,
const gss_OID_set desired_mechs,
int cred_usage,
const gss_cred_id_t input_cred_handle,
const gss_name_t desired_name,
const gss_OID desired_mech,
const gss_buffer_t password,
/*
* Returns a buffer set with the first member containing the
* session key for SSPI compatibility. The optional second
* member contains an OID identifying the session key type.
*/
extern const gss_OID GSS_C_INQ_SSPI_SESSION_KEY;
#else /* _KERNEL */
const gss_buffer_t expName,
int *gidsLen,
const gss_name_t intName,
int *gidsLen,
int *gidsLen,
#endif
/*
* GGF extensions
*/
typedef struct gss_buffer_set_desc_struct {
#define GSS_C_NO_BUFFER_SET ((gss_buffer_set_t)0)
(OM_uint32 *, /* minor_status */
gss_buffer_set_t *); /* buffer_set */
(OM_uint32 *, /* minor_status */
const gss_buffer_t, /* member_buffer */
gss_buffer_set_t *); /* buffer_set */
(OM_uint32 *, /* minor_status */
gss_buffer_set_t *); /* buffer_set */
(OM_uint32 *, /* minor_status */
const gss_ctx_id_t, /* context_handle */
const gss_OID, /* desired_object */
gss_buffer_set_t *); /* data_set */
#ifdef __cplusplus
}
#endif
#endif /* _GSSAPI_EXT_H */