Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

lcmaps.h

Go to the documentation of this file.
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  *     David Groep <davidg@nikhef.nl>,
00008  *     NIKHEF Amsterdam, the Netherlands
00009  */
00010 
00028 #ifndef LCMAPS_H
00029 #define LCMAPS_H
00030 
00031 /******************************************************************************
00032                              Include header files
00033 ******************************************************************************/
00034 #include <gssapi.h>
00035 #include "lcmaps_types.h"
00036 
00037 /******************************************************************************
00038  *                 Module definition
00039  *****************************************************************************/
00040 
00041 /******************************************************************************
00042 Function:   lcmaps_init
00043 Description:
00044     Initialize LCMAPS module: 
00045     setup logging, error handling
00046     start PluginManager
00047 
00048 Parameters:
00049     fp: file handle for logging (from gatekeeper)
00050 Returns:
00051     0: initialization succeeded
00052     1: initialization failed
00053 ******************************************************************************/
00054 extern int lcmaps_init(
00055         FILE* fp
00056 );
00057 
00058 /******************************************************************************
00059 Function:   lcmaps_init_and_log
00060 Description:
00061     Select logging type
00062     Start PluginManager:
00063     read from LCMAPS config file, the plugins to be loaded
00064 
00065 Parameters:
00066     fp: file handle for logging (from gatekeeper or other previously opened file handle)
00067         If the file handle is zero, assume that only syslogging is requested
00068     logtype: type of logging (usrlog and/or syslog)
00069 
00070 Returns:
00071     0: initialization succeeded
00072     1: initialization failed
00073 ******************************************************************************/
00074 extern int lcmaps_init_and_log(
00075         FILE* fp,
00076         unsigned short logtype
00077 );
00078 
00079 /******************************************************************************
00080 Function:   lcmaps_term
00081 Description:
00082     Terminate LCMAPS module: 
00083 
00084 Parameters:
00085 Returns:
00086     0: termination succeeded
00087     1: termination failed
00088 ******************************************************************************/
00089 extern int lcmaps_term();
00090 
00091 /******************************************************************************
00092 Function:   lcmaps_run
00093 Description:
00094     do the user mapping
00095 
00096 Parameters:
00097     request: JDL
00098     user_cred : user globus credential handle
00099 Returns:
00100     0: authorization succeeded
00101     1: authorization failed
00102 ******************************************************************************/
00103 #if ALLOW_EMPTY_CREDENTIALS
00104 extern int lcmaps_run(
00105         char * user_dn_tmp,
00106         gss_cred_id_t user_cred,
00107         lcmaps_request_t request
00108 );
00109 #else
00110 extern int lcmaps_run(
00111         gss_cred_id_t user_cred,
00112         lcmaps_request_t request
00113 );
00114 #endif
00115 
00116 /******************************************************************************
00117 Function:   lcmaps_run_and_return_username
00118 Description:
00119     do the user mapping based on the provided list of policies (first successful
00120     policy found in the lcmaps policy file (lcmaps.db) will result in the user
00121     mapping) and return user name (needed for e.g. GridFTP)
00122 
00123 Parameters:
00124     request     : JDL
00125     user_cred   : user globus credential handle
00126     usernamep   : pointer to user name (to be freed by calling application)
00127     npols       : number of policies to be considered for evaluation
00128     policynames : the names of the policies to be considered for evaluation
00129 
00130 Returns:
00131     0: mapping succeeded
00132     1: mapping failed
00133 ******************************************************************************/
00134 #if ALLOW_EMPTY_CREDENTIALS
00135 extern int lcmaps_run_and_return_username(
00136         char * user_dn_tmp,
00137         gss_cred_id_t user_cred,
00138         lcmaps_request_t request,
00139         char ** usernamep,
00140         int npols,
00141         char ** policynames
00142 );
00143 #else
00144 extern int lcmaps_run_and_return_username(
00145         gss_cred_id_t user_cred,
00146         lcmaps_request_t request,
00147         char ** usernamep,
00148         int npols,
00149         char ** policynames
00150 );
00151 #endif
00152 /******************************************************************************
00153 Function:   lcmaps_run_without_credentials
00154 Description:
00155     do the user mapping without credentials, only the user DN
00156 
00157 Parameters:
00158     user_dn_tmp: user DN
00159 Returns:
00160     0: mapping succeeded
00161     1: mapping failed
00162 ******************************************************************************/
00163 extern int lcmaps_run_without_credentials(
00164         char * user_dn_tmp
00165 );
00166 #endif /* LCMAPS_H */
00167 
00168 /******************************************************************************
00169 CVS Information:
00170     $Source: /local/reps/lcgware/fabric_mgt/gridification/lcmaps/include/lcmaps.h,v $
00171     $Date: 2004/10/01 15:17:28 $
00172     $Revision: 1.7 $
00173     $Author: maart $
00174 ******************************************************************************/

Generated on Sat Oct 2 02:18:26 2004 for edg-lcmaps by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002