#include "lcmaps_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lcmaps_types.h"
#include "lcmaps_log.h"
#include "lcmaps_arguments.h"
#include "lcmaps_defines.h"
#include "_lcmaps_utils.h"
#include "_lcmaps_db_read.h"
#include "_lcmaps_runvars.h"
#include "_lcmaps_cred_data.h"
#include "../evaluationmanager/evaluationmanager.h"
Go to the source code of this file.
Data Structures | |
struct | lcmaps_plugindl_s |
the lcmaps plugin module structure More... | |
Defines | |
#define | NUL '\0' |
#define | MAXPROCS 4 |
Typedefs | |
typedef int(* | lcmaps_proc_t )() |
this type corresponds to the types of the plugin interface functions | |
typedef lcmaps_plugindl_s | lcmaps_plugindl_t |
the type definition of the lcmaps plugin module structure | |
Enumerations | |
enum | lcmaps_proctype_e { INITPROC, RUNPROC, TERMPROC, INTROPROC } |
This enumeration type gives the different plugin symbol/function types. More... | |
Functions | |
lcmaps_plugindl_t * | PluginInit (lcmaps_db_entry_t *, lcmaps_plugindl_t **) |
Initialize the plugin. | |
lcmaps_proc_t | get_procsymbol (void *, char *) |
get procedure symbol from dlopen-ed library | |
int | print_lcmaps_plugin (int, lcmaps_plugindl_t *) |
print the lcmaps_plugindl_t structure | |
int | parse_args_plugin (const char *, const char *, char **, int *) |
convert plugin argument string into xargc, xargv | |
int | clean_plugin_list (lcmaps_plugindl_t **) |
clean (free) the list of plugins and call the plugin termination functions | |
int | startPluginManager () |
start the PluginManager | |
int | runPluginManager (lcmaps_request_t request, lcmaps_cred_id_t lcmaps_cred, int npols, char **policynames) |
Run the PluginManager. | |
int | resetCredentialData () |
Reset the Credential data. | |
int | runPlugin (const char *pluginname) |
Run a plugin. | |
int | stopPluginManager () |
Terminate the PluginManager module. |
Definition in file lcmaps_pluginmanager.c.
|
maximum number of interface symbols in plugin modules Definition at line 70 of file lcmaps_pluginmanager.c. Referenced by PluginInit(). |
|
NUL character Definition at line 66 of file lcmaps_pluginmanager.c. |
|
This enumeration type gives the different plugin symbol/function types.
Definition at line 82 of file lcmaps_pluginmanager.c. |
|
clean (free) the list of plugins and call the plugin termination functions
Definition at line 791 of file lcmaps_pluginmanager.c. References lcmaps_plugindl_s::handle, lcmaps_plugindl_s::init_argc, lcmaps_plugindl_s::init_argv, lcmaps_log(), lcmaps_log_debug(), LCMAPS_MOD_SUCCESS, lcmaps_plugindl_t, lcmaps_plugindl_s::next, lcmaps_plugindl_s::pluginname, lcmaps_plugindl_s::procs, and TERMPROC. Referenced by startPluginManager(), and stopPluginManager(). |
|
get procedure symbol from dlopen-ed library
Definition at line 649 of file lcmaps_pluginmanager.c. References lcmaps_log(), and lcmaps_proc_t. Referenced by PluginInit(). |
|
convert plugin argument string into xargc, xargv Parse the argument string of the plugin and create xargv and xargc
Definition at line 588 of file lcmaps_pluginmanager.c. References lcmaps_log(), lcmaps_log_debug(), LCMAPS_MAXARGS, LCMAPS_MAXPATHLEN, and lcmaps_tokenize(). Referenced by PluginInit(). |
|
Initialize the plugin. This function takes a plugin LCMAPS database entry and performs the following tasks:
Definition at line 365 of file lcmaps_pluginmanager.c. References get_procsymbol(), lcmaps_plugindl_s::handle, lcmaps_plugindl_s::init_argc, lcmaps_plugindl_s::init_argv, INITPROC, INTROPROC, lcmaps_db_entry_t, lcmaps_findfile(), lcmaps_log(), lcmaps_log_debug(), LCMAPS_MAXARGSTRING, LCMAPS_MAXPATHLEN, LCMAPS_MOD_SUCCESS, lcmaps_plugindl_t, lcmaps_proc_t, MAXPROCS, lcmaps_plugindl_s::next, parse_args_plugin(), lcmaps_plugindl_s::pluginargs, lcmaps_db_entry_s::pluginargs, lcmaps_plugindl_s::pluginname, lcmaps_db_entry_s::pluginname, lcmaps_plugindl_s::procs, lcmaps_plugindl_s::run_argc, lcmaps_plugindl_s::run_argv, RUNPROC, and TERMPROC. Referenced by startPluginManager(). |
|
print the lcmaps_plugindl_t structure
Definition at line 690 of file lcmaps_pluginmanager.c. References lcmaps_plugindl_s::handle, lcmaps_plugindl_s::init_argc, lcmaps_plugindl_s::init_argv, INITPROC, INTROPROC, lcmaps_getArgValue(), lcmaps_log_debug(), lcmaps_plugindl_t, lcmaps_plugindl_s::next, lcmaps_plugindl_s::pluginargs, lcmaps_plugindl_s::pluginname, lcmaps_plugindl_s::procs, lcmaps_plugindl_s::run_argc, lcmaps_plugindl_s::run_argv, RUNPROC, and TERMPROC. Referenced by runPluginManager(), and startPluginManager(). |
|
Reset the Credential data. Wrapper around cleanCredentialData() to be used by the Evaluation Manager, before a new policy is evaluated
Definition at line 982 of file lcmaps_pluginmanager.c. References cleanCredentialData(), and lcmaps_log_debug(). Referenced by pdl_next_plugin(). |
|
Run a plugin. Run a plugin for the Evaluation Manager the result (succes or not will be passed to the Evaluation Manager)
Definition at line 1014 of file lcmaps_pluginmanager.c. References lcmaps_log(), lcmaps_log_debug(), lcmaps_log_time(), lcmaps_plugindl_t, lcmaps_plugindl_s::next, lcmaps_plugindl_s::pluginname, lcmaps_plugindl_s::procs, lcmaps_plugindl_s::run_argc, lcmaps_plugindl_s::run_argv, and RUNPROC. Referenced by runEvaluationManager(), and runPluginManager(). |
|
Run the PluginManager. This function runs the PluginManager for user mapping. Contact Evaluation Manager --> runs plugins
Definition at line 866 of file lcmaps_pluginmanager.c. References lcmaps_cred_id_t, lcmaps_extractRunVars(), lcmaps_getRunVars(), lcmaps_log(), lcmaps_log_debug(), lcmaps_plugindl_t, lcmaps_request_t, lcmaps_setArgValue(), lcmaps_plugindl_s::next, lcmaps_plugindl_s::pluginname, print_lcmaps_plugin(), lcmaps_plugindl_s::run_argc, lcmaps_plugindl_s::run_argv, runEvaluationManager(), and runPlugin(). Referenced by lcmaps_run(), lcmaps_run_and_return_poolindex(), lcmaps_run_and_return_username(), lcmaps_run_with_fqans_and_return_account(), and lcmaps_run_without_credentials_and_return_username(). |
|
start the PluginManager start the PluginManager --> load plugins, start evaluation manager
Definition at line 160 of file lcmaps_pluginmanager.c. References clean_plugin_list(), getPluginNameAndArgs(), lcmaps_db_clean(), lcmaps_db_entry_t, lcmaps_db_read(), LCMAPS_ETC_HOME, lcmaps_genfilename(), lcmaps_log(), lcmaps_log_debug(), lcmaps_log_time(), LCMAPS_MAXPATHLEN, lcmaps_plugindl_t, lcmaps_db_entry_s::next, lcmaps_plugindl_s::next, PluginInit(), lcmaps_plugindl_s::pluginname, lcmaps_db_entry_s::pluginname, print_lcmaps_plugin(), and startEvaluationManager(). Referenced by lcmaps_init_and_logfile(). |
|
Terminate the PluginManager module. stop the PluginManager --> terminate plugins, clean plugin list, (stop evaluation manager)
Definition at line 1070 of file lcmaps_pluginmanager.c. References clean_plugin_list(), cleanCredentialData(), lcmaps_log(), lcmaps_log_debug(), printCredData(), and stopEvaluationManager(). Referenced by lcmaps_term(). |