/[pdpsoft]/trunk/grid-mw-security/ees/src/eef/eef_common.c
ViewVC logotype

Diff of /trunk/grid-mw-security/ees/src/eef/eef_common.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1234 by aramv, Fri Dec 4 10:07:20 2009 UTC revision 1235 by aramv, Fri Dec 4 11:35:24 2009 UTC
# Line 12  EES_RC EEF_Init(char *config_file, FILE* Line 12  EES_RC EEF_Init(char *config_file, FILE*
12    
13          if (AOS_Init() == EES_SUCCESS){          if (AOS_Init() == EES_SUCCESS){
14      if(start_plugin_manager() == EES_SUCCESS){      if(start_plugin_manager() == EES_SUCCESS){
15        eef_log(LOG_NOTICE, "Loading config file: %s\n", config_file);        return start_pdl_parser(config_file, number_of_policies, names_of_policies);
       if(pdl_init(config_file) == EES_SUCCESS){  
         /* after the config file was successfully read, we can try to set the modules path if one was provided */  
         eef_log(LOG_NOTICE, "Loaded config file: %s\n", config_file);  
   
         /* set the EEF modules path to the path found by the evaluation manager */  
         set_modules_path(get_pdl_path());  
   
         /* retrieve policy list from the evaluation mananger */  
         parsed_policy_tree = get_policies();  
   
         /* strip policies that are not explicitly passed in the names_of_policies array */  
         if(number_of_policies){  
           parsed_policy_tree = reduce_policies(parsed_policy_tree, number_of_policies, names_of_policies);  
         }  
   
         /* this is a callout to the plugin manager, which dlopen()'s the plugin, dlsym()'s the plugin's functions and calls the plugin's initialize function */  
         if(initialize_plugins() == EES_SUCCESS){  
           /* these are callouts to the evaluation manager */  
           return EES_SUCCESS;  
         } else {  
           eef_log(LOG_ERR, "Failed to initialize plug-ins from policy config file %s\n", config_file);  
         }  
       }  
16      }      }
17          }          }
18    return EES_FAILURE;    return EES_FAILURE;
# Line 46  EES_RC EEF_Init(char *config_file, FILE* Line 23  EES_RC EEF_Init(char *config_file, FILE*
23   */   */
24  EES_RC EEF_Term(){  EES_RC EEF_Term(){
25    eef_log(LOG_INFO, "Cleaning up...");    eef_log(LOG_INFO, "Cleaning up...");
26    if((pdl_term(parsed_policy_tree) == EES_SUCCESS) &&    if((pdl_term(parsed_policy_list) == EES_SUCCESS) &&
27       (stop_plugin_manager()        == EES_SUCCESS) &&       (stop_plugin_manager()        == EES_SUCCESS) &&
28       (AOS_Term()                   == EES_SUCCESS)){       (AOS_Term()                   == EES_SUCCESS)){
29      stop_log();      stop_log();

Legend:
Removed from v.1234  
changed lines
  Added in v.1235

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28