00001 /* 00002 * Copyright (c) Members of the EGEE Collaboration. 2004. 00003 * See http://eu-egee.org/partners/ for details on the copyright holders. 00004 * For license conditions see the license file or 00005 * http://eu-egee.org/license.html 00006 */ 00007 00008 /* 00009 * Copyright (c) 2001 EU DataGrid. 00010 * For license conditions see http://www.eu-datagrid.org/license.html 00011 * 00012 * Copyright (c) 2001, 2002 by 00013 * Martijn Steenbakkers <martijn@nikhef.nl>, 00014 * Oscar Koeroo <okoeroo@nikhef.nl>, 00015 * David Groep <davidg@nikhef.nl>, 00016 * NIKHEF Amsterdam, the Netherlands 00017 */ 00018 00028 #ifndef LCMAPS_CRED_DATA_H 00029 #define LCMAPS_CRED_DATA_H 00030 00031 /****************************************************************************** 00032 Define constants 00033 ******************************************************************************/ 00034 #define DN 5 00035 #define UID 10 00036 #define PRI_GID 20 00037 #define SEC_GID 30 00038 #define LCMAPS_VO_CRED 90 00039 #define LCMAPS_VO_CRED_STRING 100 00040 #define LCMAPS_VO_CRED_MAPPING 110 00041 #define POOL_INDEX 200 00042 00043 00044 /****************************************************************************** 00045 Include header files 00046 ******************************************************************************/ 00047 00048 #include <pwd.h> 00049 #include "lcmaps_vo_data.h" 00050 00051 /****************************************************************************** 00052 Type definitions 00053 ******************************************************************************/ 00054 00055 00064 typedef struct cred_data_s 00065 { 00066 char *dn; 00067 uid_t *uid; 00068 gid_t *priGid; 00069 gid_t *secGid; 00070 lcmaps_vo_data_t *VoCred; 00071 char **VoCredString; 00072 lcmaps_vo_mapping_t *VoCredMapping; 00073 int cntUid; 00074 int cntPriGid; 00075 int cntSecGid; 00076 int cntVoCred; 00077 int cntVoCredString; 00078 int cntVoCredMapping; 00079 char *pool_index; 00080 } cred_data_t; 00081 00082 00083 /****************************************************************************** 00084 * Module definition 00085 *****************************************************************************/ 00086 00087 /****************************************************************************** 00088 Function: addCredentialData 00089 Description: 00090 Add a credential to the list of found credentials (uids, gids etc) 00091 00092 Parameters: 00093 datatype: type of credential 00094 data: pointer to credential 00095 Returns: 00096 0: success 00097 -1: failure (unknown data type, realloc error) 00098 ******************************************************************************/ 00099 extern int addCredentialData(int datatype, void *data); 00100 00101 /****************************************************************************** 00102 Function: getCredentialData 00103 Description: 00104 Get pointer to a list of credential data of a certain type 00105 00106 Parameters: 00107 datatype: type of credential 00108 count: number of credentials found in list of datatype 00109 Returns: 00110 pointer to list of credential data or NULL in case of failure 00111 ******************************************************************************/ 00112 extern void *getCredentialData(int datatype, int *count); 00113 00114 #endif /* LCMAPS_CRED_DATA_H */ 00115 00116 /****************************************************************************** 00117 CVS Information: 00118 $Source: /cvs/jra1mw/org.glite.security.lcmaps/interface/lcmaps_cred_data.h,v $ 00119 $Date: 2004/10/13 16:37:57 $ 00120 $Revision: 1.2 $ 00121 $Author: msteenba $ 00122 ******************************************************************************/