4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 1997-2002 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 * Manages mapping between a security principal
37 #pragma ident "%Z%%M% %I% %E% SMI"
41 #include <gssapi/gssapi.h>
48 #if !defined(TEXT_DOMAIN)
49 #define TEXT_DOMAIN "SUNW_OST_OSCMD"
52 #define GSSCRED_FLAT_FILE -1
54 /* Structure to hold GSS credentials for each entry */
55 typedef struct GssCredEntry_t
{
59 struct GssCredEntry_t
*next
;
63 * Misc functions in gsscred.
65 int gsscred_AsHex(const gss_buffer_t inBuf
, gss_buffer_t outBuf
);
66 int gsscred_MakeName(const gss_OID mechOid
, const char *name
,
67 const char *nameOid
, gss_buffer_t OutName
);
68 int gsscred_read_config_file(void);
69 int gsscred_MakeNameHeader(const gss_OID mechOid
, gss_buffer_t outNameHdr
);
73 * Flat file based gsscred functions.
75 int file_addGssCredEntry(const gss_buffer_t hexName
, const char *uid
,
76 const char *comment
, char **errDetails
);
77 int file_getGssCredEntry(const gss_buffer_t name
, const char *uid
,
79 int file_deleteGssCredEntry(const gss_buffer_t name
, const char *uid
,
81 int file_getGssCredUid(const gss_buffer_t name
, uid_t
*uidOut
);
85 * GSS entry point for retrieving user uid information based on
86 * exported name buffer.
88 int gss_getGssCredEntry(const gss_buffer_t expName
, uid_t
*uid
);
94 #endif /* _GSSCRED_H */