On Tue, Dec 06, 2005 at 01:24:34PM +0200, Virolainen Pablo wrote: > On Mon, 5 Dec 2005, Marc Haber wrote: > >> I cannot explain this without looking at the source. I know that > >> "...R}/var/backups" rule is not even checked. > > > > How do you find out? > > Well, I changed verbosity level to get debug messages (and added some > debug messages).
Can you give a patch for these debug messages? I think it would be extremely handy to see which and how rules are considered. Greetings Marc > Then I realised in check_list_for_match breaks the > for-loop after fist match in the *_rx_list. So our check_list_for_match > would look like: > > int check_list_for_match(list* rxrlist,char* text,int* attr) > { > list* r=rxrlist; > int retval=1; > if (r!=NULL) { > r=r->header->tail; > } > for(;r;r=r->prev){ > if((retval=regexec((regex_t*)((rx_rule*)r->data)->crx,text,0,0,0))==0){ > *attr=((rx_rule*)r->data)->attr; > error(231,"\"%s\" matches rule from line #%ld: > %s\n",text,((rx_rule*)r->data)->conf_lineno,((rx_rule*)r->data)->rx); > break; > } else { > error(232,"\"%s\" doesn't match rule from line #%ld: > %s\n",text,((rx_rule*)r->data)->conf_lineno,((rx_rule*)r->data)->rx); > } > } > return retval; > } That is a complete replacement for the gen_list.c function, and from what I see, it reverses from a first-match to a last-match approach by comparing the regexp list starting from the last node? Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835 _______________________________________________ Aide mailing list Aide@cs.tut.fi https://mailman.cs.tut.fi/mailman/listinfo/aide