samba-vscan/clamav vscan-clamav.c,1.1.2.16,1.1.2.17
Rainer Link <[email protected]> Tue, 29 Mar 2005 19:20:24 +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-serv14627/clamav
Modified Files:
Tag: VSCAN_0_3
vscan-clamav.c
Log Message:
skip scanning of file based on regexp. Patch by Sven; currently
only clamav supported, needs to be ported to other modules as well
Index: vscan-clamav.c
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/clamav/vscan-clamav.c,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -u -d -r1.1.2.16 -r1.1.2.17
--- vscan-clamav.c 29 Mar 2005 19:16:45 -0000 1.1.2.16
+++ vscan-clamav.c 29 Mar 2005 19:20:22 -0000 1.1.2.17
@@ -189,6 +189,7 @@
DEBUG(5, ("init file type\n"));
filetype_init(0, vscan_config.common.exclude_file_types);
+ fileregexp_init(vscan_config.common.exclude_file_regexp);
#if (SMB_VFS_INTERFACE_VERSION >= 6)
return SMB_VFS_NEXT_CONNECT(handle, conn, svc, user);
@@ -266,6 +267,10 @@
if ( vscan_config.common.verbose_file_logging )
vscan_syslog("INFO: File %s has size zero! Not scanned!", fname);
}
+ else if ( fileregexp_skipscan(filepath) == 1 ) {
+ if ( verbose_file_logging )
+ vscan_syslog("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);
@@ -417,6 +422,12 @@
return retval;
}
+ if ( fileregexp_skipscan(filepath) == 1 ) {
+ if ( verbose_file_logging )
+ vscan_syslog("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 )
-------------------------------------------------------
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