samba3-vscan/clamav vscan-clamav.c,1.3,1.4

Rainer Link <[email protected]> Wed, 27 Jul 2005 07:59:18 +0000
Newsgroups gmane.comp.security.virus.openantivirus.cvs
Message-ID <[email protected]>
Update of /cvsroot/openantivirus/samba3-vscan/clamav
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13444/clamav

Modified Files:
	vscan-clamav.c 
Log Message:
bugfix, to make it compile


Index: vscan-clamav.c
===================================================================
RCS file: /cvsroot/openantivirus/samba3-vscan/clamav/vscan-clamav.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- vscan-clamav.c	25 Jul 2005 14:12:11 -0000	1.3
+++ vscan-clamav.c	27 Jul 2005 07:59:16 -0000	1.4
@@ -202,6 +202,7 @@
 {
 	SMB_STRUCT_STAT stat_buf;
 	pstring filepath;
+	int must_be_checked;
 
 	/* Assemble complete file path */
 	pstrcpy(filepath, conn->connectpath);
@@ -241,7 +242,7 @@
 	else if ( filetype_skipscan(filepath) == VSCAN_FT_SKIP_SCAN ) {
 		if ( verbose_file_logging )
 			vscan_syslog("INFO: File '%s' not scanned as file type is on exclude list", filepath);
-	} else if ( (must_be_checked = lrufiles_must_be_checked(filepath, stat_buf.st_mtime)) == VSCAN_LRU_DENY_ACCESS )
+	} else if ( (must_be_checked = lrufiles_must_be_checked(filepath, stat_buf.st_mtime)) == VSCAN_LRU_DENY_ACCESS ) {
 		/* file has already been checked and marked as infected */
 		/* deny access */
 		if ( vscan_config.common.verbose_file_logging )
@@ -257,7 +258,6 @@
 	} else
 	{
 		char client_ip[CLIENT_IP_SIZE];
-		int must_be_checked;
 
 		safe_strcpy(client_ip, conn->client_address, CLIENT_IP_SIZE -1);
                 /* ok, we must check the file */
@@ -327,7 +327,7 @@
 				/* deny access */
 				errno = EACCES;
 				return -1;
-			}<t_%9>
+			}
 			/* an error occured - can not communicate to daemon - Not scanned */
 			vscan_syslog("ERROR: can not communicate to clamd - file %s Not scanned!", fname);
 		}
@@ -339,7 +339,7 @@
 {
 	SMB_STRUCT_STAT stat_buf;
 	pstring filepath;
-        int retval = 0;
+        int retval = 0, rv = 0;
 	char client_ip[CLIENT_IP_SIZE];
 
         /* First close the file */



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click