Hi,
I think I found a bug in the code of the permissions module.

The problem was that only the first line of the allow_routing permission files were handled properly. I found the problem in the search_rule() function in rule.c. The left expression was not properly evaluated because it was read from the 'r' pointer and not from the 'r1' that was the iterated one: thus I changed the expression "(!r->left)" into "(!r1->left)" (at line 105 of "rule.c") and everything seems to work correctly now.

I'm attaching a diff file for the "rule.c" patch to this email.

Bye

Giovanni


*** rule.c.orig 2007-09-13 09:33:04.000000000 +0200
--- rule.c      2007-09-13 09:35:46.000000000 +0200
***************
*** 102,108 ****
  
        r1 = r;
        while (r1) {
!               if (( (!r->left) || (search_expression(r1->left, left)) )
                && (!search_expression(r1->left_exceptions, left))
                && ( (!r1->right) || (search_expression(r1->right, right)) )
                && (!search_expression(r1->right_exceptions, right))) return 1;
--- 102,108 ----
  
        r1 = r;
        while (r1) {
!               if (( (!r1->left) || (search_expression(r1->left, left)) )
                && (!search_expression(r1->left_exceptions, left))
                && ( (!r1->right) || (search_expression(r1->right, right)) )
                && (!search_expression(r1->right_exceptions, right))) return 1;

_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to