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"

Include dependency graph for lcas_utils.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

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. More...

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


FILENAME FUNCTIONS

char* lcas_genfilename (char *prefix, char *path, char *suffix)
 Generate an absolute file name. More...

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

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


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

char * 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 308 of file lcas_utils.c.

char * 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:
prefix   string containing the prefix to be prepended.
path   relative/absolute path to file name.
suffix   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 195 of file lcas_utils.c.

char * lcas_get_dn ( lcas_cred_id_t lcas_cred )
 

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 104 of file lcas_utils.c.

gss_cred_id_t lcas_get_gss_cred ( lcas_cred_id_t lcas_cred )
 

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 118 of file lcas_utils.c.

char * 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 283 of file lcas_utils.c.


Generated at Tue Sep 23 15:07:09 2003 for edg-lcas by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001