samba3-vscan/clamav vscan-clamav.c,1.4,1.5
Rainer Link <[email protected]> Thu, 28 Jul 2005 10:15:10 +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-serv12787/clamav
Modified Files:
vscan-clamav.c
Log Message:
bugfix in kaspersky module
stream-lined vscan_close for all modules
Index: vscan-clamav.c
===================================================================
RCS file: /cvsroot/openantivirus/samba3-vscan/clamav/vscan-clamav.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- vscan-clamav.c 27 Jul 2005 07:59:16 -0000 1.4
+++ vscan-clamav.c 28 Jul 2005 10:15:08 -0000 1.5
@@ -209,7 +209,6 @@
pstrcat(filepath, "/");
pstrcat(filepath, fname);
-
/* scan files while opening? */
if ( !vscan_config.common.scan_on_open ) {
DEBUG(3, ("samba-vscan - open: File '%s' not scanned as scan_on_open is not set\n", fname));
@@ -339,7 +338,7 @@
{
SMB_STRUCT_STAT stat_buf;
pstring filepath;
- int retval = 0, rv = 0;
+ int retval = 0, rv = 0, rc = 0, sockfd;
char client_ip[CLIENT_IP_SIZE];
/* First close the file */
@@ -386,16 +385,13 @@
/* scan only file, do nothing */
rv = vscan_clamav_lib_scanfile(filepath, client_ip);
#else /* LIBCLAMAV */
- {
- int sockfd;
- sockfd = vscan_clamav_init();
- /* Errors are written from vscan_clamav_init() */
- if ( sockfd < 0 )
- return retval;
- /* scan only file, do nothing */
- rv = vscan_clamav_scanfile(sockfd, filepath, client_ip);
- vscan_clamav_end(sockfd);
- }
+ sockfd = vscan_clamav_init();
+ /* Errors are written from vscan_clamav_init() */
+ if ( sockfd < 0 )
+ return retval;
+ /* scan only file, do nothing */
+ rv = vscan_clamav_scanfile(sockfd, filepath, client_ip);
+ vscan_clamav_end(sockfd);
#endif /* LIBCLAMAV */
if ( rv == VSCAN_SCAN_VIRUS_FOUND ) {
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf