00001 /* 00002 * Copyright (c) 2001 EU DataGrid. 00003 * For license conditions see http://www.eu-datagrid.org/license.html 00004 * 00005 * Copyright (c) 2001, 2002 by 00006 * Martijn Steenbakkers <martijn@nikhef.nl>, 00007 * Oscar Koeroo <okoeroo@nikhef.nl>, 00008 * David Groep <davidg@nikhef.nl>, 00009 * NIKHEF Amsterdam, the Netherlands 00010 */ 00011 00021 #ifndef LCMAPS_CRED_DATA_H 00022 #define LCMAPS_CRED_DATA_H 00023 00024 /****************************************************************************** 00025 Define constants 00026 ******************************************************************************/ 00027 #define DN 5 00028 #define UID 10 00029 #define PRI_GID 20 00030 #define SEC_GID 30 00031 #define LCMAPS_VO_CRED 90 00032 #define LCMAPS_VO_CRED_STRING 100 00033 #define LCMAPS_VO_CRED_MAPPING 110 00034 00035 00036 /****************************************************************************** 00037 Include header files 00038 ******************************************************************************/ 00039 00040 #include <pwd.h> 00041 #include "lcmaps_vo_data.h" 00042 00043 /****************************************************************************** 00044 Type definitions 00045 ******************************************************************************/ 00046 00047 00056 typedef struct cred_data_s 00057 { 00058 char *dn; 00059 uid_t *uid; 00060 gid_t *priGid; 00061 gid_t *secGid; 00062 lcmaps_vo_data_t *VoCred; 00063 char **VoCredString; 00064 lcmaps_vo_mapping_t *VoCredMapping; 00065 int cntUid; 00066 int cntPriGid; 00067 int cntSecGid; 00068 int cntVoCred; 00069 int cntVoCredString; 00070 int cntVoCredMapping; 00071 } cred_data_t; 00072 00073 00074 /****************************************************************************** 00075 * Module definition 00076 *****************************************************************************/ 00077 00078 /****************************************************************************** 00079 Function: addCredentialData 00080 Description: 00081 Add a credential to the list of found credentials (uids, gids etc) 00082 00083 Parameters: 00084 datatype: type of credential 00085 data: pointer to credential 00086 Returns: 00087 0: success 00088 -1: failure (unknown data type, realloc error) 00089 ******************************************************************************/ 00090 extern int addCredentialData(int datatype, void *data); 00091 00092 /****************************************************************************** 00093 Function: getCredentialData 00094 Description: 00095 Get pointer to a list of credential data of a certain type 00096 00097 Parameters: 00098 datatype: type of credential 00099 count: number of credentials found in list of datatype 00100 Returns: 00101 pointer to list of credential data or NULL in case of failure 00102 ******************************************************************************/ 00103 extern void *getCredentialData(int datatype, int *count); 00104 00105 #endif /* LCMAPS_CRED_DATA_H */ 00106 00107 /****************************************************************************** 00108 CVS Information: 00109 $Source: /cvs/fabric_mgt/gridification/lcmaps/include/lcmaps_cred_data.h,v $ 00110 $Date: 2004/01/05 16:44:10 $ 00111 $Revision: 1.7 $ 00112 $Author: martijn $ 00113 ******************************************************************************/