samba-vscan/global vscan-parameter.c,1.1.2.5,1.1.2.6

Rainer Link <[email protected]> Fri, 21 Jan 2005 21:07:03 +0000
Newsgroups gmane.comp.security.virus.openantivirus.cvs
Message-ID <[email protected]>
Update of /cvsroot/openantivirus/samba-vscan/global
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24499

Modified Files:
      Tag: VSCAN_0_3
	vscan-parameter.c 
Log Message:
added some more DEBUG statements
adjust DEBUG level


Index: vscan-parameter.c
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/global/Attic/vscan-parameter.c,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- vscan-parameter.c	18 Jan 2005 21:04:05 -0000	1.1.2.5
+++ vscan-parameter.c	21 Jan 2005 21:07:00 -0000	1.1.2.6
@@ -27,55 +27,59 @@
 
 void set_common_default_settings(vscan_config_struct *vscan_config)
 {
-	DEBUG(0, ("set_common_default_settings\n"));
+	DEBUG(3, ("set_common_default_settings\n"));
 
         /* set default value for max file size */
         vscan_config->common.max_size = VSCAN_MAX_SIZE;
-	DEBUG(0, ("default max size: %d\n", vscan_config->common.max_size));
+	DEBUG(3, ("default max size: %d\n", vscan_config->common.max_size));
 
         /* set default value for file logging */
         vscan_config->common.verbose_file_logging = VSCAN_VERBOSE_FILE_LOGGING;
-	DEBUG(0, ("default verbose logging: %d\n", vscan_config->common.verbose_file_logging));
+	DEBUG(3, ("default verbose logging: %d\n", vscan_config->common.verbose_file_logging));
 
         /* set default value for scan on open() */
         vscan_config->common.scan_on_open = VSCAN_SCAN_ON_OPEN;
-	DEBUG(0, ("default scan on open: %d\n", vscan_config->common.scan_on_open));
+	DEBUG(3, ("default scan on open: %d\n", vscan_config->common.scan_on_open));
 
         /* set default value for scan on close() */
         vscan_config->common.scan_on_close = VSCAN_SCAN_ON_CLOSE;
-	DEBUG(0, ("default value for scan on close: %d\n", vscan_config->common.scan_on_close));
+	DEBUG(3, ("default value for scan on close: %d\n", vscan_config->common.scan_on_close));
 
         /* set default value for deny access on error */
         vscan_config->common.deny_access_on_error = VSCAN_DENY_ACCESS_ON_ERROR;
-	DEBUG(0, ("default value for deny access on error: %d\n", vscan_config->common.deny_access_on_error));
+	DEBUG(3, ("default value for deny access on error: %d\n", vscan_config->common.deny_access_on_error));
 
         /* set default value for deny access on minor error */
         vscan_config->common.deny_access_on_minor_error = VSCAN_DENY_ACCESS_ON_MINOR_ERROR;
-	DEBUG(0, ("default value for deny access on minor error: %d\n", vscan_config->common.deny_access_on_minor_error)); 
+	DEBUG(3, ("default value for deny access on minor error: %d\n", vscan_config->common.deny_access_on_minor_error)); 
 
         /* set default value for send warning message */
         vscan_config->common.send_warning_message = VSCAN_SEND_WARNING_MESSAGE;
-	DEBUG(0, ("default value send warning message: %d\n", vscan_config->common.send_warning_message));
+	DEBUG(3, ("default value send warning message: %d\n", vscan_config->common.send_warning_message));
 
         /* set default value for infected file action */
         vscan_config->common.infected_file_action = VSCAN_INFECTED_FILE_ACTION;
-	DEBUG(0, ("default value infected file action: %d\n", vscan_config->common.infected_file_action));
+	DEBUG(3, ("default value infected file action: %d\n", vscan_config->common.infected_file_action));
 
         /* set default value for quarantine directory */
         fstrcpy(vscan_config->common.quarantine_dir, VSCAN_QUARANTINE_DIRECTORY);
-	DEBUG(0, ("default value quarantine directory: %s\n", vscan_config->common.quarantine_dir));
+	DEBUG(3, ("default value quarantine directory: %s\n", vscan_config->common.quarantine_dir));
 
         /* set default value for quarantine prefix */
         fstrcpy(vscan_config->common.quarantine_prefix, VSCAN_QUARANTINE_PREFIX);
+	DEBUG(3, ("default value for quarantine prefix: %s\n", vscan_config->common.quarantine_prefix));
 
         /* set default value for maximum lrufile entries */
         vscan_config->common.max_lrufiles = VSCAN_MAX_LRUFILES;
+	DEBUG(3, ("default value for max lrufile entries: %d\n", vscan_config->common.max_lrufiles));
 
         /* time after an entry is considered as expired */
         vscan_config->common.lrufiles_invalidate_time = VSCAN_LRUFILES_INVALIDATE_TIME;
+	DEBUG(3, ("default value for invalidate time: %d\n", vscan_config->common.lrufiles_invalidate_time));
 
         /* file type exclude ist */
         pstrcpy(vscan_config->common.exclude_file_types, VSCAN_FT_EXCLUDE_LIST);
+	DEBUG(3, ("default value for file type exclude: %s\n", vscan_config->common.exclude_file_types));
 
 }
 
@@ -156,7 +160,7 @@
                 /* FIXME: sanity check missing! what, if value is out of range?
                    atoi returns int - what about LFS? atoi should be avoided!
                 */
-		/* FIXME: change atoi to atoll, but atoll might not be available
+		/* FIXME: changed atoi to atoll, but atoll might not be available
 		   on all platforms! */
                 vscan_config->common.max_size = atoll(value);
                 DEBUG(3, ("max file size is: %lld\n", (long long)vscan_config->common.max_size));
@@ -205,7 +209,9 @@
                 pstrcpy(vscan_config->common.exclude_file_types, value);
                 DEBUG(3, ("Exclude list is: %s\n", vscan_config->common.exclude_file_types));
 	} else {
-		DEBUG(1, ("unkown common parameter: %s\n", param));
+		/* unknown common parameter, it must be handled by 
+		   corresponding module */
+		DEBUG(5, ("unkown common parameter: %s\n", param));
 		ret = False;
 	}
 



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl