[Aide] aide snapshot 2005-12-15 interprets configuration very differently
Marc Haber
mh+aide at zugschlus.de
Sat Dec 17 14:12:03 EET 2005
Hi,
something changed between the CVS snapshots of 2005-11-22 and
2005-12-15 has completely changed aide's behavior. With unchanged
configuration, what used to deliver a 17 MB database now seems to
ignore quite some negative rules. I stopped database creation at 108 MB.
Going back to the 2005-11-22 snapshot solved the issue for me.
A change to the config interpretation _that_ large doesn't look like
being acceptable to me.
I suspect that this part of the patch, especially the for statement,
is causing the issue.
Not knowing much about the datastructure, the code looks wrong to me
since initializing a loop which in the old version traverses towards
the end (r=r->next) while it in the new version traverses towards the
beginning (r=r->prev) looks wrong to me. Or is it a cyclical data
structure? If yes, I don't understand the loop end condition.
@@ -633,13 +638,15 @@
int check_list_for_match(list* rxrlist,char* text,int* attr)
{
- list* r=NULL;
+ list* r=rxrlist;
int retval=1;
- for(r=rxrlist;r;r=r->next){
+ 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,"Matches rule from line #%ld: %s\n",((rx_rule*)r->data)->conf_lineno,((rx_rule*)r->data)->rx);
+ 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;
The two error statements seem ok though.
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
More information about the Aide
mailing list