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

lcas_utils.h File Reference

API for the utilities for the LCAS. More...

#include <gssapi.h>
#include "lcas_types.h"

Go to the source code of this file.

CREDENTIAL FUNCTIONS

char * lcas_get_dn (lcas_cred_id_t lcas_credential)
 Retrieve user DN from (LCAS) credential.

gss_cred_id_t lcas_get_gss_cred (lcas_cred_id_t lcas_credential)
 Retrieve globus gss credential from (LCAS) credential.


FILENAME FUNCTIONS

char * lcas_genfilename (char *prefixp, char *pathp, char *suffixp)
 Generate an absolute file name.

char * lcas_getfexist (int n,...)
 Picks the first existing file in argument list.

char * lcas_findfile (char *name)
 Checks for file in standard directories.


Detailed Description

API for the utilities for the LCAS.

Author:
Martijn Steenbakkers for the EU DataGrid.
This header contains the declarations of the LCAS utility functions:
  1. lcas_get_dn():
  2. lcas_genfilename():
  3. lcas_getfexist():
  4. lcas_findfile():

Definition in file lcas_utils.h.


Function Documentation

lcas_findfile char *  name  ) 
 

Checks for file in standard directories.

The directories that are checked are:

  • current directory
  • "modules"
  • LCAS_ETC_HOME
  • LCAS_MOD_HOME
  • LCAS_LIB_HOME

Parameters:
name string containing the file name
Returns:
pointer to a string containing the absolute path to the file, which has to be freed or NULL.

Definition at line 315 of file lcas_utils.c.

References LCAS_ETC_HOME, lcas_genfilename(), lcas_getfexist(), LCAS_LIB_HOME, and LCAS_MOD_HOME.

Referenced by plugin_initialize(), and PluginInit().

lcas_genfilename char *  prefixp,
char *  pathp,
char *  suffixp
 

Generate an absolute file name.

Given a starting prefix, a relative or absolute path, and a suffix an absolute file name is generated. Uses the prefix only if the path is relative. (Copied (and modified) from GLOBUS gatekeeper.c)

Parameters:
prefixp string containing the prefix to be prepended.
pathp relative/absolute path to file name.
suffixp string containing the suffix to be appended.
Returns:
pointer to a string containing the absolute path to the file, which has to be freed.

Definition at line 202 of file lcas_utils.c.

Referenced by lcas_findfile(), lcas_init_and_logfile(), lcas_setup(), and PluginInit().

lcas_get_dn lcas_cred_id_t  lcas_credential  ) 
 

Retrieve user DN from (LCAS) credential.

This function takes an LCAS credential as input and returns the corresponding user distinguished name (DN).

(Internal:) If the GLOBUS credential part of the LCAS credential is empty the user DN is already included in the LCAS credential.

Parameters:
lcas_credential the LCAS credential
Returns:
a string containing the user DN

Definition at line 111 of file lcas_utils.c.

References lcas_cred_id_s::dn, and lcas_cred_id_t.

Referenced by lcas_get_fabric_authorization(), and plugin_confirm_authorization().

lcas_get_gss_cred lcas_cred_id_t  lcas_credential  ) 
 

Retrieve globus gss credential from (LCAS) credential.

This function takes an LCAS credential as input and returns the corresponding globus gss credential.

Parameters:
lcas_credential the LCAS credential
Returns:
globus gss credential

Definition at line 125 of file lcas_utils.c.

References lcas_cred_id_s::cred, and lcas_cred_id_t.

lcas_getfexist int  n,
... 
 

Picks the first existing file in argument list.

Parameters:
n the number of paths presented in the following argument list.
... variable argument list of paths.
Returns:
filename found or NULL

Definition at line 290 of file lcas_utils.c.

References fexist().

Referenced by lcas_findfile(), plugin_initialize(), and PluginInit().


Generated on Fri May 27 18:10:49 2005 for lcas by doxygen 1.3.5