/[pdpsoft]/trunk/grid-mw-security/ees/src/eval_man/pdl.c
ViewVC logotype

Contents of /trunk/grid-mw-security/ees/src/eval_man/pdl.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1202 - (show annotations) (download) (as text)
Mon Nov 30 17:14:03 2009 UTC (12 years, 1 month ago) by aramv
File MIME type: text/x-chdr
File size: 22654 byte(s)
Trying to fix open ended rules
1 #include "pdl.h"
2
3 /* Lex/Yacc stuff */
4 extern FILE * yyin;
5 extern unsigned int lineno;
6 extern int yyparse(void);
7 extern int yylex(void);
8
9 /* Lex/Yacc cleanup functions */
10 extern void delete_lex_buffer(void);
11 #if HAVE_YYLEX_DESTROY
12 extern int yylex_destroy(void);
13 #endif
14
15 /* internal data */
16 static const char* config_file_s;
17 FILE* config_file_fp;
18 static char* _pdl_path;
19
20 var_t* variables_list;
21 var_t* variables_list_last;
22 var_t* current_variable;
23
24 rule_t* rules_list;
25 rule_t* rules_list_last;
26 rule_t* current_rule;
27
28 policy_t* policies_list;
29 policy_t* policies_list_last;
30 policy_t* current_policy;
31
32 /*! initializes the parsing of the configuration file */
33 EES_RC pdl_init(const char* config_file_name){
34 config_file_s = config_file_name;
35
36 if((config_file_fp = fopen(config_file_s,"r")) != NULL){
37 yyin = config_file_fp;
38 yyparse();
39 if(add_prepared_plugins() == EES_SUCCESS){
40 return EES_SUCCESS;
41 } else {
42 eef_log(LOG_ERR, "Failed to load plug-ins from policy config file %s\n", config_file_s);
43 }
44 } else {
45 eef_log(LOG_ERR, "Failed to open policy config file %s", config_file_s);
46 }
47 return EES_FAILURE;
48 }
49
50 policy_t* get_policies(){
51 return policies_list;
52 }
53
54 /*! sets the path to modules directory */
55 void set_pdl_path(record_t* path){
56 size_t path_size = 0;
57 size_t string_size = (sizeof(char) * (strlen(path->string)+2)); /* size of string + extra slash + null byte */
58 _pdl_path = "";
59
60 /*struct stat sb;*/
61 /*if stat(MODUL*/
62
63 if(string_size < FILENAME_MAX){
64 path_size = string_size;
65 } else {
66 path_size = FILENAME_MAX;
67 }
68
69 if((_pdl_path = calloc(1, path_size))){
70 strncpy(_pdl_path, path->string, path_size);
71 strncat(_pdl_path, "/", 1);
72 }
73
74 eef_log(LOG_DEBUG, "Found a new modules path: %s\n", _pdl_path);
75
76 free(path->string);
77 free(path);
78 }
79
80 /*! Handles a variable representing a plug-in; creates a structure containing its values and adds it to the list of var_t structs variables_list */
81 void add_variable(record_t* name, record_t* value){
82 eef_log(LOG_DEBUG, "Added variable name: %s\n", name->string);
83 eef_log(LOG_DEBUG, "Added variable value: %s\n", value->string);
84
85 /* allocate struct and populate fields */
86 if((current_variable = calloc(1,sizeof(var_t)))){
87 current_variable->name = strdup(name->string);
88 current_variable->value = strdup(value->string);
89 current_variable->lineno = name->lineno;
90 current_variable->next = NULL;
91 } else {
92 eef_log(LOG_ERR, "Out of memory!");
93 }
94
95 /* append to the end of the list */
96 if(variables_list){
97 variables_list_last->next = current_variable;
98 } else {
99 variables_list = current_variable;
100 }
101 variables_list_last = current_variable;
102
103 /* clean up */
104 free(name->string);
105 free(name);
106 free(value->string);
107 free(value);
108 }
109
110 /* TODO I think this function is a bit of a kludge and could probably be rewritten to be more efficient and more legible - I think it might do too much, so extracting some functions might help */
111 /*! Appends a rule to the global rules_list, which is to be added to a policy when add_policy is called
112 Will return an error when:
113 - adding the rule to the list will create a recursion in the tree of rules
114 - an unknown variable is referenced
115 */
116 rule_t* add_rule(record_t* state, record_t* true_branch, record_t* false_branch){
117 rule_t *new_rule = NULL, *new_false_branch = NULL, *new_true_branch = NULL, *recursive_rule = NULL;
118 var_t *temp_var = NULL;
119 char *unknown_var_format_string = "Unknown variable %s at line %i in config file %s";
120
121 if((new_rule = get_left_hand_rule(rules_list, state->string))){
122 eef_log(LOG_WARNING, "State %s at line %i is already in use at line %i.\n", state->string, state->lineno, new_rule->lineno);
123 } else {
124 /*find variables for rule */
125 temp_var = get_variable_by_name(state->string);
126 if(temp_var == NULL){
127 /* Errorous state - variable referenced in rule not previously defined */
128 eef_log(LOG_ERR, unknown_var_format_string, state->string, state->lineno, config_file_s);
129 }
130 if(temp_var != NULL){
131 if((new_rule = calloc(1, sizeof(rule_t)))){
132 /* populate fields of current state */
133 new_rule->state = strdup(state->string);
134 new_rule->lineno = state->lineno;
135
136 /* populate fields of branches */
137 if(false_branch){
138 temp_var = get_variable_by_name(false_branch->string);
139 if(temp_var == NULL){
140 /* Errorous state - variable referenced in rule not previously defined */
141 eef_log(LOG_ERR, unknown_var_format_string, false_branch->string, false_branch->lineno, config_file_s);
142 return NULL;
143 }
144 if((new_false_branch = get_rule(rules_list, false_branch->string))){
145 new_rule->false_branch = new_false_branch;
146 } else {
147 if((new_false_branch = calloc(1, sizeof(rule_t)))){
148 new_false_branch->state = strdup(false_branch->string);
149 new_false_branch->lineno = false_branch->lineno;
150 new_rule->false_branch = new_false_branch;
151 }
152 }
153 }
154
155 if(true_branch){
156 temp_var = get_variable_by_name(true_branch->string);
157 if(temp_var == NULL){
158 /* Errorous state - variable referenced in rule not previously defined */
159 eef_log(LOG_ERR, unknown_var_format_string, true_branch->string, true_branch->lineno, config_file_s);
160 return NULL;
161 }
162 if((new_true_branch = get_rule(rules_list, true_branch->string))){
163 new_rule->true_branch = new_true_branch;
164 } else {
165 if((new_true_branch = calloc(1, sizeof(rule_t)))){
166 new_true_branch->state = strdup(true_branch->string);
167 new_true_branch->lineno = true_branch->lineno;
168 new_rule->true_branch = new_true_branch;
169 }
170
171 }
172 }
173
174 /* check for recursion */
175 if((recursive_rule = check_for_recursion(rules_list, new_rule))){
176 eef_log(LOG_WARNING, "Rule %s at line %i leads to recursion into state %s", new_rule->state, new_rule->lineno, recursive_rule->state);
177 new_rule = NULL;
178 } else {
179 /* add new rule at the end of the rules list */
180 if(rules_list){
181 rules_list_last->next = new_rule;
182 } else {
183 rules_list = new_rule;
184 }
185 rules_list_last = new_rule;
186
187 eef_log(LOG_DEBUG, "Added a new rule: %s\n", new_rule->state);
188 if(new_rule->true_branch){
189 printf("New true branch %s\n", new_rule->true_branch->state);
190 }
191 if(new_rule->false_branch){
192 printf("New false branch %s\n", new_rule->false_branch->state);
193 }
194 }
195
196 } else {
197 eef_log(LOG_ERR, "Out of memory!");
198 }
199 }
200 }
201
202 /* clean up */
203 if(state != NULL){
204 free(state->string);
205 free(state);
206 }
207 if(true_branch != NULL){
208 free(true_branch->string);
209 free(true_branch);
210 }
211 if(false_branch != NULL){
212 free(false_branch->string);
213 free(false_branch);
214 }
215
216 return new_rule;
217 }
218
219 /* Tries to find a recursion in the list of rules by iterating through all the tree branches. When the same rule is encountered in the current list a recursion has been found */
220 rule_t* check_for_recursion(rule_t* rule_l, rule_t* rule_r){
221 rule_t* temp_rule = rule_l;
222
223 /* right hand rule leads to its own recursive state */
224 /* still need to find a way to reuse the code from the while loop to do this check */
225 if(rule_r){
226 if(rule_r->true_branch){
227 if(strcmp(rule_r->state, rule_r->true_branch->state) == 0){
228 return rule_r->true_branch;
229 }
230 }
231
232 if(rule_r->false_branch){
233 if(strcmp(rule_r->state, rule_r->false_branch->state) == 0){
234 return rule_r->false_branch;
235 }
236 }
237 }
238
239 /* iterate list of rules */
240 while(temp_rule){
241 if((temp_rule != NULL) && (rule_r != NULL)){
242 /* left hand and right hand state are equal */
243 if(strcmp(temp_rule->state, rule_r->state) == 0){
244 return rule_r;
245 }
246
247 /* start state and true branch of right hand rule are equal */
248 if(rule_r->true_branch){
249 if(strcmp(temp_rule->state, rule_r->true_branch->state) == 0){
250 return rule_r->true_branch;
251 }
252 }
253
254 /* start state and false branch of right hand side are equal */
255 if(rule_r->false_branch){
256 if(strcmp(temp_rule->state, rule_r->false_branch->state) == 0){
257 return rule_r->false_branch;
258 }
259 }
260 }
261
262 /* move to next rule */
263 temp_rule = temp_rule->next;
264 }
265 return NULL;
266 }
267
268 /*! Tries to find specified state in the rules_list */
269 rule_t* get_rule(rule_t* temp_rule, const char* name){
270 if(!temp_rule || !name){
271 return NULL;
272 }
273
274 /* iterate while the rule isn't associated with the given state */
275 while(temp_rule){
276 if(!strcmp(name, temp_rule->true_branch->state)){
277 return temp_rule->true_branch;
278 }
279 if(!strcmp(name, temp_rule->false_branch->state)){
280 return temp_rule->false_branch;
281 }
282 if(!strcmp(name, temp_rule->state)){
283 return temp_rule;
284 }
285 temp_rule = temp_rule->next;
286 }
287 return NULL;
288 }
289
290 rule_t* get_left_hand_rule(rule_t* temp_rule, const char* name){
291 if(!temp_rule || !name){
292 return NULL;
293 }
294
295 /* iterate while the rule isn't associated with the given state */
296 while(temp_rule){
297 if(!strcmp(name, temp_rule->state)){
298 return temp_rule;
299 }
300 temp_rule = temp_rule->next;
301 }
302 return NULL;
303 }
304
305 EES_RC link_dead_end_rules_in_policy(policy_t* policy){
306 policy_t *temp_policy = policy;
307 while(temp_policy){
308 link_dead_end_rules(temp_policy, temp_policy->rules);
309 temp_policy = temp_policy->next;
310 }
311 }
312
313 void link_dead_end_rules(policy_t* policy, rule_t* rule){
314 rule_t *temp_rule, *true_rule = NULL, *false_rule = NULL;
315 if(temp_rule = get_rule(policy->rules, rule->state)){
316 if(rule->true_branch){
317 if(true_rule = get_rule(policy->rules, rule->true_branch->state)){
318 printf("Linking temp_rule->true_branch: %s to %s\n", rule->state, true_rule->state);
319 rule = temp_rule;
320 rule->true_branch = true_rule;
321 link_dead_end_rules(policy, rule->true_branch);
322 } else {
323 printf("Err: True branch not found\n");
324 }
325 }
326 if(rule->false_branch){
327 if((false_rule = get_rule(policy->rules, rule->false_branch->state))){
328 printf("Linking temp_rule->false_branch: %s to %s\n", rule->state, false_rule->state);
329 rule = temp_rule;
330 rule->false_branch = false_rule;
331 link_dead_end_rules(policy, rule->false_branch);
332 } else {
333 printf("Err: False branch not found\n");
334 }
335 }
336 }
337 }
338
339 /*! Adds a new policy_t structure to the policies_list which will hold the current rules_list. rules_list is nulled after creating a policy so a new list can be created for the next policy */
340 void add_policy(record_t* policy, rule_t* top_rule){
341 policy_t* new_policy = NULL;
342 /*eef_log(LOG_DEBUG, "Found a new policy: %s\n", policy->string);*/
343
344 if((new_policy = calloc(1, sizeof(policy_t)))){
345 new_policy->name = strdup(policy->string);
346 new_policy->lineno = policy->lineno;
347 new_policy->rules = top_rule;
348 }
349
350 /* append to the end of the list */
351 if(policies_list){
352 policies_list_last->next = new_policy;
353 } else {
354 policies_list = new_policy;
355 }
356 policies_list_last = new_policy;
357
358 rules_list = NULL;
359
360 free(policy->string);
361 free(policy);
362 }
363
364 /* prints the list of policies */
365 void print_policies(policy_t* policies){
366 policy_t* temp_policy = policies;
367 while(temp_policy){
368 eef_log(LOG_DEBUG, "Policy: %s\n", temp_policy->name);
369 print_rules(temp_policy->rules);
370 temp_policy = temp_policy->next;
371 }
372 return;
373 }
374
375
376 /* prints the list of rules */
377 void print_rules(rule_t* rules){
378 if(rules){
379 eef_log(LOG_DEBUG, " | Rule %s\n", rules->state);
380 eef_log(LOG_DEBUG, " -------------------------\n");
381 print_rules(rules->true_branch);
382 print_rules(rules->false_branch);
383 }
384 return;
385 }
386
387 /* tries to link all policy rules to a plugin in the plugin manager */
388 EES_RC link_rules_to_plugins(policy_t* policies){
389 policy_t *temp_policy = policies;
390 rule_t *temp_rule = NULL;
391
392 while(temp_policy){
393 temp_rule = temp_policy->rules;
394 while(temp_rule){
395 link_rule_to_plugin(temp_policy, temp_rule);
396 temp_rule = temp_rule->next;
397 }
398 temp_policy = temp_policy->next;
399 }
400 return EES_SUCCESS;
401 }
402
403 void link_rule_to_plugin(policy_t *policy, rule_t *rule){
404 var_t *temp_var = NULL;
405 char** argv;
406 int argc;
407
408 eef_plugindl_t *temp_plugin = NULL;
409 if(rule){
410 temp_var = get_variable_by_name(rule->state);
411 temp_plugin = rule->plugin;
412 if(rule->plugin){
413 printf("Plugin already linked?\n");
414 } else {
415 argv = _var_to_argv(temp_var->value, &argc);
416 printf("Trying to find plugin: %s\n", argv[0]);
417
418 temp_plugin = get_plugin(argv[0]);
419 if(temp_plugin){
420 rule->plugin = temp_plugin;
421 } else {
422 printf("Unknown plugin in variable %s\n", temp_var->value);
423 }
424 free_args(argc, argv);
425 }
426 /*if(rule->true_branch){*/
427 /*rule->true_branch = get_rule(policy->rules, rule->true_branch->state);*/
428 /*}*/
429 /*if(rule->false_branch){*/
430 /*rule->false_branch = get_rule(policy->rules, rule->false_branch->state);*/
431 /*}*/
432 link_rule_to_plugin(policy, rule->true_branch);
433 link_rule_to_plugin(policy, rule->false_branch);
434 }
435 return;
436 }
437
438 /* iterates the policies and removes those that are not explicitly named in the passed array of strings */
439 policy_t* reduce_policy_tree(policy_t* policies, int number_of_policies, char* names_of_policies[]){
440 int i, policy_should_be_removed;
441 policy_t *temp_policy = policies;
442 while(temp_policy){
443 policy_should_be_removed = 1;
444 printf("Checking policy: %s\n", temp_policy->name);
445 for(i = 0; i < number_of_policies; i++){
446 if(strcmp(temp_policy->name, names_of_policies[i]) == 0){
447 /* if the policy is in the named list, we can continue to the next plugin */
448 printf("Allowed policy: %s\n", names_of_policies[i]);
449 policy_should_be_removed = 0;
450 break;
451 }
452 }
453
454 if(policy_should_be_removed){
455 printf("Removing not-allowed policy: %s\n", temp_policy->name);
456 remove_policy_by_name(temp_policy->name);
457 }
458 /* Move to next policy */
459 temp_policy = temp_policy->next;
460 }
461 return policies;
462 }
463
464 /*! concatenates two strings */
465 record_t* concat_strings(record_t* r1, record_t* r2){
466 record_t* new_record;
467 /*eef_log(LOG_DEBUG, "Concating: %s with %s\n", r1->string, r2->string);*/
468 if((new_record = malloc(sizeof(record_t)))){
469 if((new_record->string =
470 calloc(1, sizeof(char)*(strlen(r1->string) + strlen(r2->string)+1)))){
471 strncat(new_record->string, r1->string, strlen(r1->string));
472 strncat(new_record->string, r2->string, strlen(r2->string));
473 free(r1->string);
474 free(r1);
475 free(r2->string);
476 free(r2);
477 return new_record;
478 }
479 }
480 return NULL;
481 }
482
483 /*! concatenates two strings with a space in between */
484 record_t* concat_strings_with_space(record_t *r1, record_t* r2){
485 record_t *r;
486 /*eef_log(LOG_DEBUG, "Concating: %s with %s with spaces\n", r1->string, r2->string);*/
487 if((r = malloc(sizeof(record_t)))){
488 r->string = calloc(1,(sizeof(char)*(strlen(r1->string)+strlen(r2->string)+2)));
489 strncat(r->string, r1->string, strlen(r1->string));
490 strncat(r->string, " ", 1);
491 strncat(r->string, r2->string, strlen(r2->string));
492 free(r1->string);
493 free(r1);
494 free(r2->string);
495 free(r2);
496 return r;
497 }
498 return NULL;
499 }
500
501 /*! logs errors encountered during parsing */
502 int yyerror(char* string){
503 eef_log(LOG_ERR, "Parse error: %s at line %i in config file %s", string, lineno, config_file_s);
504 return 0;
505 }
506
507 /*! get variable from list */
508 var_t* get_variable_by_name(char* name){
509 for(current_variable = variables_list; current_variable != NULL; current_variable = current_variable->next){
510 if(!strncmp(name, current_variable->name, strlen(current_variable->name))){
511 return current_variable;
512 }
513 }
514 return NULL;
515 }
516
517 /*! Removes a policy from the list of policies */
518 void remove_policy(record_t* policy){
519 policy_t *temp_policy = policies_list, *next_policy = NULL;
520 eef_log(LOG_DEBUG, "Deleted policy: %s\n", policy->string);
521
522 while(temp_policy){
523 if(strcmp(temp_policy->name, policy->string) == 0){
524 /* target policy was found */
525 next_policy = temp_policy->next;
526
527 /* Clean policy fields */
528 clean_rules_list(temp_policy->rules);
529 free(temp_policy->name);
530 free(temp_policy);
531 }
532
533 /* Move to next policy */
534 temp_policy = next_policy;
535 }
536
537 free(policy->string);
538 free(policy);
539 return;
540 }
541
542 /*! Removes a policy from the list of policies */
543 void remove_policy_by_name(char* policy){
544 policy_t *temp_policy = policies_list, *next_policy = NULL;
545 eef_log(LOG_DEBUG, "Deleted policy: %s\n", policy);
546
547 while(temp_policy){
548 if(strcmp(temp_policy->name, policy) == 0){
549 /* target policy was found */
550 next_policy = temp_policy->next;
551
552 /* Clean policy fields */
553 clean_rules_list(temp_policy->rules);
554 free(temp_policy->name);
555 free(temp_policy);
556 }
557
558 /* Move to next policy */
559 temp_policy = next_policy;
560 }
561 return;
562 }
563
564 /*! converts a string to an array of strings by splitting it at each \t delimiter
565 - overwrites the second argument with a pointer to the number of elements in the array */
566 char** _var_to_argv(char* value, int *argc){
567 char *start_of_arg = NULL, *copy_of_value = NULL, **argv = NULL;
568 char *delimiters = " \t";
569 size_t size_of_arg = 0, size_of_array, i = 0;
570 char *str_ptr;
571 copy_of_value = strdup(value);
572 size_of_array = (sizeof(char)*(strlen(copy_of_value)+1));
573 if((argv = calloc(1, size_of_array)) != NULL){
574 start_of_arg = strtok_r(copy_of_value, delimiters, &str_ptr);
575 while(start_of_arg != NULL){
576 size_of_arg = (sizeof(char)*(strlen(start_of_arg)+1));
577 if((argv[i] = calloc(1, size_of_arg))){
578 memcpy(argv[i], start_of_arg, size_of_arg);
579 start_of_arg = strtok_r(NULL, delimiters, &str_ptr);
580 i++;
581 }
582 }
583 }
584 free(copy_of_value);
585 if(i < ARG_MAX){
586 *argc = i;
587 } else {
588 *argc = ARG_MAX;
589 }
590 return argv;
591 }
592
593 /*! returns pdl path found in parsed config file */
594 const char* get_pdl_path(){
595 return _pdl_path;
596 }
597
598 /*! Iterates list of policies and the rules they contain and tries to let the plugin manager prepare plugin structs*/
599 EES_RC add_prepared_plugins(){
600 char** argv;
601 int argc;
602 EES_RC plugin_initialized_ok = EES_SUCCESS;
603 var_t *temp_var = variables_list;
604
605 while((temp_var != NULL) && (plugin_initialized_ok == EES_SUCCESS)){
606 argv = _var_to_argv(temp_var->value, &argc);
607
608 /* this is a callout to the plug-in manager, which adds a struct describing a single plug-in to its list */
609 plugin_initialized_ok = add_prepared_plugin(argc, argv);
610
611 /* Move to next variable */
612 temp_var = temp_var->next;
613 }
614
615 return plugin_initialized_ok;
616 }
617
618 /*! Iterates the list of var_t structures and tries to free them */
619 EES_RC clean_variables_list(){
620 current_variable = variables_list;
621 while(current_variable){
622 free(current_variable->name);
623 free(current_variable->value);
624
625 /* Move to next variable */
626 variables_list_last = current_variable;
627 current_variable = current_variable->next;
628
629 /* Clean last variable struct */
630 free(variables_list_last);
631 }
632 return EES_SUCCESS;
633 }
634
635 /*! Iterates the list of rule_t structures starting with the passed rule and tries to free them and their true/false branches */
636 EES_RC clean_rules_list(rule_t* top_rule){
637 rule_t* temp_rule = top_rule;
638 rule_t* last_rule;
639 if(temp_rule){
640 /* Clean rules in true branch */
641
642 /* Clean rule state */
643 free(temp_rule->state);
644
645 /**//* Move to next rule */
646 /*clean_rules_list(temp_rule->true_branch);*/
647 /*clean_rules_list(temp_rule->false_branch);*/
648
649 if(temp_rule->true_branch){
650 clean_rules_list(temp_rule->true_branch);
651 }
652
653 /* Clean rules in false branch */
654 if(temp_rule->false_branch){
655 clean_rules_list(temp_rule->false_branch);
656 }
657
658 /* Clean rule struct */
659 free(temp_rule);
660 }
661 return EES_SUCCESS;
662 }
663
664 void free_args(int argc, char** argv){
665 for(; argc > 0; argc--){
666 free(argv[argc-1]);
667 }
668 free(argv);
669 }
670
671 /*! Iterates the list of policy_t structures and tries to free them and their rules */
672 EES_RC clean_policies_list(){
673 policy_t *temp_policy = policies_list, *last_policy = NULL;
674 while(temp_policy){
675 /* Clean policy fields */
676 clean_rules_list(temp_policy->rules);
677 free(temp_policy->name);
678
679 /* Move to next policy */
680 last_policy = temp_policy;
681 temp_policy = temp_policy->next;
682 free(last_policy);
683 }
684 return EES_SUCCESS;
685 }
686
687 /*! Terminates the parser and tries to free all used memory */
688 EES_RC pdl_term(){
689 clean_variables_list();
690 clean_policies_list();
691 free(_pdl_path);
692
693 if(config_file_fp != NULL){
694 /* This is the preferred way of cleaning up various flex versions - See: http://flex.sourceforge.net/manual/Memory-leak-_002d-16386-bytes-allocated-by-malloc_002e.html#Memory-leak-_002d-16386-bytes-allocated-by-malloc_002e */
695 #if HAVE_YYLEX_DESTROY /* macro set by configure script */
696 yylex_destroy();
697 #else
698 /*eef_log(LOG_WARNING, "Lex function yylex_destroy() not available - possibly unable to free allocated memory for evaluation manager\n");*/
699 #if HAVE_FLEX
700 delete_lex_buffer(); /* this function is defined in pdl_lex.l */
701 /*eef_log(LOG_INFO, "Managed to free allocated memory for evaluation manager\n"); */
702 #else
703 eef_log(LOG_WARNING, "Lex functions yylex_destroy() and yy_delete_buffer() are both not available - unable to free allocated memory for evaluation manager\n");
704 #endif
705 #endif
706
707 if((fclose(config_file_fp)==0) ){
708 return EES_SUCCESS;
709 }
710 }
711 return EES_FAILURE;
712 }
713
714 /*! TODO */
715 EES_RC allow_rules(int val){
716 /*printf("Allowed rule: %i\n", val);*/
717 return EES_SUCCESS;
718 }
719
720 /*! TODO */
721 EES_RC allowed_policy_rule(const char* label){
722 /*printf("Allowed policy rule: %s\n", label);*/
723 return EES_SUCCESS;
724 }

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