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

lcas.c File Reference

LCAS - the local centre authorization service. More...

#include "lcas_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <dlfcn.h>
#include <gssapi.h>
#include "lcas_types.h"
#include "_lcas_utils.h"
#include "_lcas_defines.h"
#include "_lcas_log.h"
#include "_lcas_db_read.h"

Go to the source code of this file.

Namespaces

namespace  lcas_proctype_e

Data Structures

struct  lcas_plugindl_s
 the plugin authorization module structure. More...


Typedefs

typedef int(* lcas_proc_t )()
 this type corresponds to the types of the plugin interface functions.

typedef lcas_plugindl_s lcas_plugindl_t
 the type definition of the plugin authorization module structure.


Functions

lcas_plugindl_tPluginInit (lcas_db_entry_t *, lcas_plugindl_t **)
 Initialize the plugin. More...

lcas_proc_t get_procsymbol (void *, char *)
 get procedure symbol from dlopen-ed library. More...

int print_lcas_plugin (int, lcas_plugindl_t *)
 print the lcas_plugindl_t structure. More...

int parse_args_plugin (const char *, const char *, char **, int *)
 convert plugin argument string into xargc, xargv. More...

int clean_plugin_list (lcas_plugindl_t **)
 clean (free) the list of plugins and call the plugin termination functions. More...


Detailed Description

LCAS - the local centre authorization service.

Author:
Martijn Steenbakkers for the EU DataGrid.
The interface to the LCAS module is composed of:
  1. lcas_init(): To initialize the LCAS module
  2. lcas_get_fabric_authorization(): to place an authorization request
  3. lcas_term(): To cleanly terminate the module

Definition in file lcas.c.


Function Documentation

int clean_plugin_list lcas_plugindl_t **    list [static]
 

clean (free) the list of plugins and call the plugin termination functions.

Parameters:
list 
list  pointer to list of plugins which has to be freeed.
Return values:
0  succes.
1  failure.

Definition at line 832 of file lcas.c.

References lcas_plugindl_s::argc, lcas_plugindl_s::argv, lcas_plugindl_s::handle, lcas_plugindl_s::next, lcas_plugindl_s::pluginname, and lcas_plugindl_s::procs.

lcas_proc_t get_procsymbol void *    handle,
char *    symname
[static]
 

get procedure symbol from dlopen-ed library.

Parameters:
handle  handle of dynamic library
symname  name of procedure symbol
Returns:
handle to procedure symbol or NUll

Definition at line 792 of file lcas.c.

References lcas_proc_t.

Referenced by PluginInit.

int parse_args_plugin const char *    name,
const char *    argstring,
char **    xargv,
int *    xargc
[static]
 

convert plugin argument string into xargc, xargv.

Parse the argument string of the plugin and create xargv and xargc

Parameters:
name  name of the plugin (goes into xargv[0])
argstring  string containing the arguments
xargv  array of argument strings (has to be freed later)
xargc  number of arguments
Return values:
0  succes.
1  failure.

Definition at line 731 of file lcas.c.

Referenced by PluginInit.

lcas_plugindl_t * PluginInit lcas_db_entry_t   db_handle,
lcas_plugindl_t **    list
[static]
 

Initialize the plugin.

This function takes a plugin LCAS database entry and performs the following tasks:

  • Create entry in (plugin)list
  • Open the plugins and check the symbols plugin_init and confirm_authorization
  • run plugin_init
Parameters:
db_handle  handle to LCAS db (containing pluginname and pluginargs)
list  pointer to plugin structure list to which (plugin) module has to be added
Returns:
pointer to newly created plugin structure or NULL in case of failure

Definition at line 479 of file lcas.c.

References lcas_plugindl_s::argc, lcas_plugindl_s::argv, get_procsymbol, lcas_plugindl_s::handle, lcas_proc_t, lcas_plugindl_s::next, parse_args_plugin, lcas_plugindl_s::pluginargs, lcas_db_entry_s::pluginargs, lcas_plugindl_s::pluginname, lcas_db_entry_s::pluginname, and lcas_plugindl_s::procs.

int print_lcas_plugin int    debug_lvl,
lcas_plugindl_t   plugin
[static]
 

print the lcas_plugindl_t structure.

Parameters:
debug_lvl  debugging level
plugin  plugin structure
Return values:
0  succes.
1  failure.

Definition at line 895 of file lcas.c.

References lcas_plugindl_s::argc, lcas_plugindl_s::argv, lcas_plugindl_s::handle, lcas_plugindl_s::next, lcas_plugindl_s::pluginargs, lcas_plugindl_s::pluginname, and lcas_plugindl_s::procs.


Variable Documentation

char* authmods[MAXAUTHMODS][2] [static]
 

Initial value:

 {
                             {(char *) NULL, (char *) NULL},
                             {(char *) NULL, (char *) NULL},
                             {(char *) NULL, (char *) NULL}
}

Definition at line 174 of file lcas.c.


Generated on Mon Sep 20 15:14:15 2004 for edg-lcas by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002