samba-vscan/clamav vscan-clamav.c,1.1.2.18,1.1.2.19

Rainer Link <[email protected]> Sun, 10 Apr 2005 15:22:53 +0000
Newsgroups gmane.comp.security.virus.openantivirus.cvs
Message-ID <[email protected]>
Update of /cvsroot/openantivirus/samba-vscan/clamav
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8392/clamav

Modified Files:
      Tag: VSCAN_0_3
	vscan-clamav.c 
Log Message:
use file regexp stuff
modified some syslog satements to contain the INFO tag
some other small changes


Index: vscan-clamav.c
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/clamav/vscan-clamav.c,v
retrieving revision 1.1.2.18
retrieving revision 1.1.2.19
diff -u -d -r1.1.2.18 -r1.1.2.19
--- vscan-clamav.c	8 Apr 2005 09:06:31 -0000	1.1.2.18
+++ vscan-clamav.c	10 Apr 2005 15:22:50 -0000	1.1.2.19
@@ -268,12 +268,12 @@
 			vscan_syslog("INFO: File %s has size zero! Not scanned!", fname);
 	}
 	else if ( fileregexp_skipscan(filepath) == VSCAN_FR_SKIP_SCAN ) {
-		if ( verbose_file_logging )
-			vscan_syslog("File '%s' not scanned as file is machted by exclude regexp", filepath);
+		if ( vscan_config.common.verbose_file_logging )
+			vscan_syslog("INFO: File '%s' not scanned as file is machted by exclude regexp", filepath);
 	}
 	else if ( filetype_skipscan(filepath) == VSCAN_FT_SKIP_SCAN ) {
 		if ( verbose_file_logging )
-			vscan_syslog("File '%s' not scanned as file type is on exclude list", filepath);
+			vscan_syslog("INFO: File '%s' not scanned as file type is on exclude list", filepath);
 	} else
 	{
 		char client_ip[CLIENT_IP_SIZE];
@@ -286,7 +286,7 @@
                         /* file has already been checked and marked as infected */
                         /* deny access */
                         if ( vscan_config.common.verbose_file_logging )
-                                vscan_syslog("File '%s' has already been scanned and marked as infected. Not scanned any more. Access denied", filepath);
+                                vscan_syslog("INFO: File '%s' has already been scanned and marked as infected. Not scanned any more. Access denied", filepath);
 
 			/* deny access */
                         errno = EACCES;
@@ -294,7 +294,7 @@
                 } else if ( must_be_checked == VSCAN_LRU_GRANT_ACCESS )  {
                         /* file has already been checked, not marked as infected and not modified */
                         if ( vscan_config.common.verbose_file_logging )
-                                vscan_syslog("File '%s' has already been scanned, not marked as infected and not modified. Not scanned anymore. Access granted", filepath);
+                                vscan_syslog("INFO: File '%s' has already been scanned, not marked as infected and not modified. Not scanned anymore. Access granted", filepath);
                 }
 		else {
                         /* ok, we must check the file */
@@ -422,16 +422,17 @@
 		return retval;
 	}
 
-	if ( fileregexp_skipscan(filepath) == VSCAN_FR_SKIP_SCAN ) {
-		if ( verbose_file_logging )
-			vscan_syslog("File '%s' not scanned as file is machted by exclude regexp", filepath);
-		return retval;
-	}
+        /* dont' scan file which matches exclude regexp */
+        if ( fileregexp_skipscan(filepath) == VSCAN_FR_SKIP_SCAN ) {
+                if ( vscan_config.common.verbose_file_logging )
+                        vscan_syslog("INFO: file '%s' not scanned as file is machted by exclude regexp", filepath);
+                return retval;
+        }
 
 	/* don't scan files which are in the list of exclude file types */
 	if ( filetype_skipscan(filepath) == VSCAN_FT_SKIP_SCAN ) {
                 if ( vscan_config.common.verbose_file_logging )
-                        vscan_syslog("File '%s' not scanned as file type is on exclude list", filepath);
+                        vscan_syslog("INFO: File '%s' not scanned as file type is on exclude list", filepath);
 		return retval;
 	}
 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click