#include "lcas_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.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.
| Data Structures | |
| struct | lcas_plugindl_s | 
| the plugin authorization module structure  More... | |
| Defines | |
| #define | NUL '\0' | 
| #define | MAXAUTHMODS 3 | 
| #define | MAXPROCS 3 | 
| #define | FAILED_LCAS_USERALLOW 1 | 
| #define | FAILED_LCAS_USERBAN 2 | 
| #define | FAILED_LCAS_CLOCKCHECK 3 | 
| #define | FAILED_LCAS_OTHER 4 | 
| #define | FAILED_LCAS_PLUGIN 5 | 
| 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 | |
| Enumerations | |
| enum | lcas_proctype_e { INITPROC, AUTHPROC, TERMPROC } | 
| This enumeration type gives the different plugin symbol/function types.  More... | |
| Functions | |
| lcas_plugindl_t * | PluginInit (lcas_db_entry_t *, lcas_plugindl_t **) | 
| Initialize the plugin. | |
| lcas_proc_t | get_procsymbol (void *, char *) | 
| get procedure symbol from dlopen-ed library | |
| int | print_lcas_plugin (int, lcas_plugindl_t *) | 
| print the lcas_plugindl_t structure | |
| int | parse_args_plugin (const char *, const char *, char **, int *) | 
| convert plugin argument string into xargc, xargv | |
| int | clean_plugin_list (lcas_plugindl_t **) | 
| clean (free) the list of plugins and call the plugin termination functions | |
| int | lcas_init_and_logfile (char *logfile, FILE *fp, unsigned short logtype) | 
| Initialize the LCAS module. | |
| int | lcas_init_and_log (FILE *fp, unsigned short logtype) | 
| Initialize the LCAS module. | |
| int | lcas_init (FILE *fp) | 
| Initialize the LCAS module. | |
| int | lcas_get_fabric_authorization (char *user_dn_tmp, gss_cred_id_t user_cred, lcas_request_t request) | 
| submit authorization request to the LCAS | |
| int | lcas_term () | 
| Terminate the LCAS module. | |
Definition in file lcas.c.
| 
 | 
| return value of LCAS because of failure of clockcheck module (obsolete) | 
| 
 | 
| return value of LCAS because of general failure Definition at line 104 of file lcas.c. Referenced by lcas_get_fabric_authorization(). | 
| 
 | 
| return value of LCAS because of failure of plugin authorization module Definition at line 105 of file lcas.c. Referenced by lcas_get_fabric_authorization(). | 
| 
 | 
| return value of LCAS because of failure of userallow module (obsolete) | 
| 
 | 
| return value of LCAS because of failure of userban module (obsolete) | 
| 
 | 
| maximum number of standard authorization modules Definition at line 92 of file lcas.c. Referenced by lcas_init_and_logfile(). | 
| 
 | 
| maximum number of interface symbols in authorization modules Definition at line 93 of file lcas.c. Referenced by PluginInit(). | 
| 
 | 
| NUL character Definition at line 88 of file lcas.c. Referenced by lcas_db_fill_entry(), lcas_db_parse_line(), lcas_db_parse_pair(), lcas_db_parse_string(), lcas_init_and_logfile(), and PluginInit(). | 
| 
 | 
| This enumeration type gives the different plugin symbol/function types. 
 | 
| 
 | 
| clean (free) the list of plugins and call the plugin termination functions 
 
 
 Definition at line 868 of file lcas.c. References lcas_plugindl_s::argc, lcas_plugindl_s::argv, lcas_plugindl_s::handle, lcas_log(), lcas_log_debug(), LCAS_MOD_SUCCESS, lcas_plugindl_t, lcas_plugindl_s::next, lcas_plugindl_s::pluginname, lcas_plugindl_s::procs, and TERMPROC. Referenced by lcas_init_and_logfile(). | 
| 
 | ||||||||||||
| get procedure symbol from dlopen-ed library 
 
 
 Definition at line 828 of file lcas.c. References lcas_log(), and lcas_proc_t. Referenced by PluginInit(). | 
| 
 | ||||||||||||||||
| submit authorization request to the LCAS This function calls the plugins for authorization. As a back-up for empty credentials the user DN may be specified as well. For this ALLOW_EMPTY_CREDENTIALS should be defined. 
 
 
 Definition at line 971 of file lcas.c. References AUTHPROC, FAILED_LCAS_OTHER, FAILED_LCAS_PLUGIN, lcas_fill_cred(), lcas_get_dn(), lcas_log(), lcas_log_debug(), lcas_log_time(), LCAS_MOD_SUCCESS, lcas_plugindl_t, lcas_release_cred(), lcas_request_t, lcas_plugindl_s::next, lcas_plugindl_s::pluginname, and lcas_plugindl_s::procs. | 
| 
 | 
| Initialize the LCAS module. The function does the following: 
 
 
 
 Definition at line 465 of file lcas.c. References DO_SYSLOG, DO_USRLOG, and lcas_init_and_log(). | 
| 
 | ||||||||||||
| Initialize the LCAS module. The function does the following: 
 
 
 
 Definition at line 443 of file lcas.c. References lcas_init_and_logfile(). Referenced by lcas_init(). | 
| 
 | ||||||||||||||||
| Initialize the LCAS module. The function does the following: 
 
 
 
 Definition at line 222 of file lcas.c. References clean_plugin_list(), lcas_db_clean(), lcas_db_clean_list(), lcas_db_entry_t, lcas_db_fill_entry(), lcas_db_read(), LCAS_ETC_HOME, lcas_genfilename(), lcas_log(), lcas_log_debug(), lcas_log_open(), lcas_log_time(), LCAS_MAXARGSTRING, LCAS_MAXPATHLEN, lcas_plugindl_t, MAXAUTHMODS, lcas_plugindl_s::next, lcas_db_entry_s::next, NUL, lcas_db_entry_s::pluginargs, PluginInit(), lcas_plugindl_s::pluginname, lcas_db_entry_s::pluginname, and print_lcas_plugin(). Referenced by lcas_init_and_log(). | 
| 
 | 
| Terminate the LCAS module. The function does the following: 
 
 
 Definition at line 1106 of file lcas.c. References lcas_plugindl_s::argc, lcas_plugindl_s::argv, lcas_log(), lcas_log_close(), lcas_log_debug(), lcas_log_time(), LCAS_MOD_SUCCESS, lcas_plugindl_t, lcas_plugindl_s::next, lcas_plugindl_s::pluginname, lcas_plugindl_s::procs, and TERMPROC. | 
| 
 | ||||||||||||||||||||
| convert plugin argument string into xargc, xargv Parse the argument string of the plugin and create xargv and xargc 
 
 Definition at line 767 of file lcas.c. References lcas_log(), lcas_log_debug(), LCAS_MAXARGS, LCAS_MAXPATHLEN, and lcas_tokenize(). Referenced by PluginInit(). | 
| 
 | ||||||||||||
| Initialize the plugin. This function takes a plugin LCAS database entry and performs the following tasks: 
 
 
 
 Definition at line 515 of file lcas.c. References lcas_plugindl_s::argc, lcas_plugindl_s::argv, AUTHPROC, get_procsymbol(), lcas_plugindl_s::handle, INITPROC, lcas_db_entry_t, LCAS_ETC_HOME, lcas_findfile(), lcas_genfilename(), lcas_getfexist(), LCAS_LIB_HOME, lcas_log(), lcas_log_debug(), LCAS_MAXARGSTRING, LCAS_MAXPATHLEN, LCAS_MOD_HOME, LCAS_MOD_SUCCESS, lcas_plugindl_t, lcas_proc_t, MAXPROCS, lcas_plugindl_s::next, NUL, parse_args_plugin(), lcas_plugindl_s::pluginargs, lcas_db_entry_s::pluginargs, lcas_plugindl_s::pluginname, lcas_db_entry_s::pluginname, lcas_plugindl_s::procs, and TERMPROC. Referenced by lcas_init_and_logfile(). | 
| 
 | ||||||||||||
| print the lcas_plugindl_t structure 
 
 
 Definition at line 931 of file lcas.c. References lcas_plugindl_s::argc, lcas_plugindl_s::argv, AUTHPROC, lcas_plugindl_s::handle, INITPROC, lcas_log_debug(), lcas_plugindl_t, lcas_plugindl_s::next, lcas_plugindl_s::pluginargs, lcas_plugindl_s::pluginname, lcas_plugindl_s::procs, and TERMPROC. Referenced by lcas_init_and_logfile(). | 
 1.3.5
 
1.3.5