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 * David Groep <davidg@nikhef.nl>, 00015 * NIKHEF Amsterdam, the Netherlands 00016 */ 00017 00034 #ifndef LCAS_H 00035 #define LCAS_H 00036 00037 /****************************************************************************** 00038 Include header files 00039 ******************************************************************************/ 00040 #include <gssapi.h> 00041 #include "lcas_types.h" 00042 00043 /****************************************************************************** 00044 * Module definition 00045 *****************************************************************************/ 00046 00047 /****************************************************************************** 00048 Function: lcas_init 00049 Description: 00050 Initialize LCAS module: 00051 setup logging, error handling 00052 read from LCAS database the plugins to be loaded 00053 00054 Parameters: 00055 fp: file handle for logging (from gatekeeper) 00056 Returns: 00057 0: initialization succeeded 00058 1: initialization failed 00059 ******************************************************************************/ 00076 extern int lcas_init( 00077 FILE* fp 00078 ); 00079 00080 /****************************************************************************** 00081 Function: lcas_init_and_log 00082 Description: 00083 Select logging type 00084 Setup logging, error handling (not yet). 00085 Read from LCAS database the plugins to be loaded. 00086 Initialize the plugins 00087 00088 Parameters: 00089 fp: file handle for logging (from gatekeeper or other previously opened file handle) 00090 If the file handle is zero, assume that only syslogging is requested 00091 logtype: type of logging (usrlog and/or syslog) 00092 00093 Returns: 00094 0: initialization succeeded 00095 1: initialization failed 00096 ******************************************************************************/ 00117 extern int lcas_init_and_log( 00118 FILE* fp, 00119 unsigned short logtype 00120 ); 00121 00122 /****************************************************************************** 00123 Function: lcas_init_and_logfile 00124 Description: 00125 Select logging type 00126 Setup logging by providing a file handle or file name, error handling (not yet). 00127 Read from LCAS database the plugins to be loaded. 00128 Initialize the plugins 00129 00130 Parameters: 00131 logfile: name of logfile 00132 fp: file handle for logging (from gatekeeper or other previously opened file handle) 00133 If the file handle is zero, assume that only syslogging is requested 00134 logtype: type of logging (usrlog and/or syslog) 00135 00136 Returns: 00137 0: initialization succeeded 00138 1: initialization failed 00139 ******************************************************************************/ 00162 extern int lcas_init_and_logfile( 00163 char * logfile, 00164 FILE* fp, 00165 unsigned short logtype 00166 ); 00167 00168 /****************************************************************************** 00169 Function: lcas_term 00170 Description: 00171 Terminate LCAS module: 00172 00173 Parameters: 00174 Returns: 00175 0: termination succeeded 00176 1: termination failed 00177 ******************************************************************************/ 00189 extern int lcas_term(); 00190 00191 /****************************************************************************** 00192 Function: lcas_get_fabric_authorization 00193 Description: 00194 Call LCAS in order to get authorization on the local fabric 00195 00196 Parameters: 00197 request: RSL string 00198 user_cred : user globus credential handle 00199 Returns: 00200 0: authorization succeeded 00201 1: authorization failed 00202 ******************************************************************************/ 00203 #if ALLOW_EMPTY_CREDENTIALS 00204 00223 extern int lcas_get_fabric_authorization( 00224 char * user_dn_tmp, 00225 gss_cred_id_t user_cred, 00226 lcas_request_t request 00227 ); 00228 #else 00229 00244 extern int lcas_get_fabric_authorization( 00245 gss_cred_id_t user_cred, 00246 lcas_request_t request 00247 ); 00248 #endif 00249 00250 extern int getMajorVersionNumber(); 00251 extern int getMinorVersionNumber(); 00252 extern int getPatchVersionNumber(); 00253 00254 #endif /* LCAS_H */ 00255 00256 /****************************************************************************** 00257 CVS Information: 00258 $Source: /cvs/jra1mw/org.glite.security.lcas-interface/interface/lcas.h,v $ 00259 $Date: 2005/04/04 15:23:57 $ 00260 $Revision: 1.4 $ 00261 $Author: msteenba $ 00262 ******************************************************************************/