gssapi_ext.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 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
#pragma ident "%Z%%M% %I% %E% SMI"
#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,
#else /* _KERNEL */
const gss_buffer_t expName,
int *gidsLen,
const gss_name_t intName,
int *gidsLen,
int *gidsLen,
#endif
#ifdef __cplusplus
}
#endif
#endif /* _GSSAPI_EXT_H */