diff --unif --rec /usr/src/misc/aide-0.10/src/aide.c aide/src/aide.c --- /usr/src/misc/aide-0.10/src/aide.c 2003-11-28 15:03:58.000000000 +0000 +++ aide/src/aide.c 2004-06-26 22:54:57.000000000 +0000 @@ -380,7 +380,7 @@ conf->action=DO_COMPARE; } if(conf->verbose_level==-1){ - conf->verbose_level=5; + conf->verbose_level=10; } } @@ -530,6 +530,10 @@ populate_tree(conf->tree); + if(conf->action&DO_INIT) { + error(6, "### AIDE database initialized.\n\n"); + } + if(conf->action&DO_COMPARE || conf->action&DO_DIFF) { /* First terse report */ totalchanges=report_tree(conf->tree,0,stat); if(totalchanges>0){ @@ -543,14 +547,12 @@ stat[0]=1; report_tree(conf->tree,4,stat); } else { - printf("\nAIDE, version " AIDEVERSION "\n\n"); + error(6, "\nAIDE, version " AIDEVERSION "\n\n"); if(conf->action&DO_COMPARE) { - printf("### All files match AIDE database. Looks okay!\n\n"); - } - if(conf->action&DO_INIT) { - printf("### AIDE database initialized.\n\n"); + error(6, "### All files match AIDE database. Looks okay!\n\n"); } } + } db_close(conf); exit(RETOK); diff --unif --rec /usr/src/misc/aide-0.10/src/gen_list.c aide/src/gen_list.c --- /usr/src/misc/aide-0.10/src/gen_list.c 2003-11-04 15:39:48.000000000 +0000 +++ aide/src/gen_list.c 2004-06-26 23:15:48.000000000 +0000 @@ -1261,7 +1261,8 @@ } i++; }else if(!initdbwarningprinted){ - error(5,_("WARNING: Old db contains a file that shouldn\'t be there, run --init or --update\n")); + error(5,_("WARNING: Old db contains a file that shouldn\'t be there, " + "run --init or --update\n")); initdbwarningprinted=1; } if(i<100){ @@ -1306,7 +1307,11 @@ db_writeline(new,conf); } /* Populate tree only if it is needed later */ - if(conf->action&DO_COMPARE){ + /* It's always needed later. The NODE_ADD_CHILDREN attribute + determines whether its children get added to the database. It also + seems to be needed by db_writeline(), which otherwise does not write + all the records. + if(conf->action&DO_COMPARE) */ { if((add=check_rxtree(new->filename,tree,&attr))>0){ if(add==1){ add_file_to_tree(tree,new,DB_NEW,NODE_ADD_CHILDREN,attr);