[Aide] aide reporting directory changes even if not configured to

Virolainen Pablo pablo at cs.tut.fi
Tue Dec 6 13:24:34 EET 2005


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). 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;
}

Duke NEMO / C.O.M.A
alias pablo the pallo virolainen


More information about the Aide mailing list