Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > f12afe0724c8dd117f06968b86afb581 > files > 4

aide-0.13.1-2.0.4.el5.src.rpm

--- aide-0.13.1/src/db_file.c.warning	2006-11-24 09:07:32.000000000 -0500
+++ aide-0.13.1/src/db_file.c	2007-08-09 17:38:50.000000000 -0400
@@ -215,7 +215,14 @@
       (*db_order)[*db_osize]=db_unknown;
       
       for (l=0;l<db_unknown;l++){
-	
+
+	// Added Check for database generated with buggy version
+	if (strcmp(dbtext, "unknown")==0) {
+	  error(0,"This database contains errors due to a bug in the previous version of aide.\nYou must create a new database.\n");
+	  exit(1);
+	}
+	// end of added check
+
 	if (strcmp(db_names[l],dbtext)==0) {
 	  
 	  if (check_db_order(*db_order, *db_osize,
@@ -592,7 +599,12 @@
   a=db_scan();
 
   if (a!=TNEWLINE&&a!=TEOF) {
-    error(0,"Newline expected in database. Reading until end of line\n");
+    // Begin Added check for problem from initial RHEL5 release
+    error(0,"There is an error in the database, probably due to a bug in the previous version of aide.\nYou must recreate the database.\n");
+    exit(1);
+    // end added check
+
+    // error(0,"Newline expected in database. Reading until end of line\n");
     do {
       
       error(0,"Skipped value %s\n",dbtext);