connection-based private data & other fixes

"Sven Strickroth" <[email protected]> Fri, 30 Dec 2005 17:30:22 +0100
Newsgroups gmane.comp.security.virus.openantivirus.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.

------=_NextPart_000_002D_01C60D66.B6C8B530
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi,

I created a patch (against current CVS) for samba-vscan (but only for the
clamav-module, because I cannot test the other modules) to store it's data
connection-based and fixed two "bugs" (no max_size check in _close and make
it compile/work with current libclamav).

The vscan-modules are now configured in smb.conf via "vscan-module: scan
archives = yes"

It works for me so far, but I believe it still needs some testing :)

Best regards,

Sven

------=_NextPart_000_002D_01C60D66.B6C8B530
Content-Type: application/octet-stream;
	name="rewrite.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="rewrite.patch"

diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/clamav/vscan-clamav.c =
samba-vscan-0.3.7/clamav/vscan-clamav.c=0A=
--- samba-vscan-0.3.7-orig/clamav/vscan-clamav.c	2005-07-28 =
12:15:08.000000000 +0200=0A=
+++ samba-vscan-0.3.7/clamav/vscan-clamav.c	2005-12-30 =
17:26:00.000000000 +0100=0A=
@@ -7,6 +7,8 @@=0A=
  * Copyright (C) Rainer Link, 2001-2005=0A=
  *               OpenAntiVirus.org <rainer-pBPPa8WU5k41Tgt60Rntydi2O/[email protected]>=0A=
  *               Dariusz Markowicz <[email protected]>, 2003=0A=
+ * Copyright (C) Sven Strickroth, 2005=0A=
+ *               <[email protected]>=0A=
  * Copyright (C) Stefan (metze) Metzmacher, 2003=0A=
  *               <[email protected]>=0A=
  *=0A=
@@ -48,174 +50,136 @@=0A=
 =0A=
 #define VSCAN_MODULE_STR "vscan-clamav"=0A=
 =0A=
-vscan_config_struct vscan_config; /* contains the vscan module =
configuration */=0A=
-=0A=
-BOOL verbose_file_logging;=0A=
-BOOL send_warning_message;=0A=
-=0A=
-#ifdef LIBCLAMAV=0A=
-struct cl_node *clamav_root =3D NULL;=0A=
-struct cl_limits clamav_limits;=0A=
-BOOL clamav_loaded =3D False;=0A=
-#else=0A=
-BOOL scanarchives;=0A=
-fstring clamd_socket_name;      /* name of clamd socket */=0A=
-#endif  =0A=
-=0A=
 /* module version */=0A=
 static const char module_id[]=3DVSCAN_MODULE_STR" =
"SAMBA_VSCAN_VERSION_STR;=0A=
 =0A=
-=0A=
-=0A=
-static BOOL do_parameter(const char *param, const char *value)=0A=
+static void do_parameter(connection_struct *conn, fstring module_name, =
vscan_config_struct *vscan_config)=0A=
 {=0A=
+	struct specific_clamav *vscan_config_clamav =3D (void =
*)(vscan_config)->specific;=0A=
 =0A=
-        if ( do_common_parameter(&vscan_config, param, value) =3D=3D =
False ) {=0A=
-                /* parse VFS module specific configuration values */=0A=
-		if ( StrCaseCmp("clamd socket name", param) =3D=3D 0) {=0A=
-#ifdef LIBCLAMAV=0A=
-			DEBUG(3, ("clamd socket name not supported when linked against lib =
clamav\n"));=0A=
-#else=0A=
-			fstrcpy(clamd_socket_name, value);=0A=
-			DEBUG(3, ("clamd socket name is %s\n", clamd_socket_name));=0A=
-#endif=0A=
+	do_common_parameter(conn, module_name, vscan_config);=0A=
 =0A=
-#ifdef LIBCLAMAV=0A=
-		} else if ( StrCaseCmp("libclamav max files in archive", param) =
=3D=3D 0 ) {=0A=
-			/* sanity check? */=0A=
-			clamav_limits.maxfiles =3D atoi(value);=0A=
-			DEBUG(3, ("libclamav maxfiles limit is: %i\n", =
clamav_limits.maxfiles));=0A=
-		} else if ( StrCaseCmp("libclamav max archived file size", param) =
=3D=3D 0) {=0A=
-			/* sanity check? */=0A=
-			clamav_limits.maxfilesize =3D atol(value);=0A=
-			DEBUG(3, ("libclamav max archived files limit is: %li\n", =
clamav_limits.maxfilesize));=0A=
-		} else if ( StrCaseCmp("libclamav max recursion level", param) =3D=3D =
0 ) {=0A=
-			/* sanity check? */=0A=
-			clamav_limits.maxreclevel =3D atoi(value);=0A=
-			DEBUG(3, ("libclamav max recursion level limit is: %i\n", =
clamav_limits.maxreclevel));=0A=
-#else=0A=
-		} else if ( StrCaseCmp("scan archives", param) =3D=3D 0 ) {=0A=
-			set_boolean(&scanarchives, value);=0A=
-			DEBUG(3, ("scan archives: %d\n", scanarchives));=0A=
-#endif=0A=
-		} else=0A=
-        	        DEBUG(3, ("unknown parameter: %s\n", param));=0A=
-	}=0A=
+	/* parse VFS module specific configuration values */=0A=
 =0A=
-        return True;=0A=
-}=0A=
+	DEBUG(3, ("do_parameter\n"));=0A=
 =0A=
-static BOOL do_section(const char *section)=0A=
-{=0A=
-        /* simply return true, there's only one section :-) */=0A=
-        return True;=0A=
-}=0A=
+#ifndef LIBCLAMAV=0A=
+	fstrcpy(vscan_config_clamav->clamd_socket_name, =
lp_parm_const_string(SNUM(conn), module_name, "clamd socket name", =
VSCAN_CLAMD_SOCKET_NAME));=0A=
+	DEBUG(3, ("clamd socket name is: %s\n", =
vscan_config_clamav->clamd_socket_name));=0A=
 =0A=
+	vscan_config_clamav->scanarchives =3D lp_parm_bool(SNUM(conn), =
module_name, "scan archives", VSCAN_SCAN_ARCHIVES);=0A=
+	DEBUG(3, ("scan archives is: %d\n", =
vscan_config_clamav->scanarchives));=0A=
+#else=0A=
+	vscan_config_clamav->clamav_limits.maxfiles =3D (unsigned =
int)lp_parm_ulong(SNUM(conn), module_name, "libclamav max files in =
archive", VSCAN_CL_MAXFILES);=0A=
+	DEBUG(3, ("libclamav max files in archive is: %i\n", =
vscan_config_clamav->clamav_limits.maxfiles));=0A=
 =0A=
+	vscan_config_clamav->clamav_limits.maxfilesize =3D =
lp_parm_ulong(SNUM(conn), module_name, "libclamav max archived file =
size", VSCAN_CL_MAXFILESIZE);=0A=
+	DEBUG(3, ("libclamav max archived file size is: %li\n", =
vscan_config_clamav->clamav_limits.maxfilesize));=0A=
 =0A=
+	vscan_config_clamav->clamav_limits.maxreclevel =3D (unsigned =
int)lp_parm_ulong(SNUM(conn), module_name, "libclamav max recursion =
level", VSCAN_CL_MAXRECLEVEL);=0A=
+	DEBUG(3, ("libclamav max recursion level is: %i\n", =
vscan_config_clamav->clamav_limits.maxreclevel));=0A=
+#endif=0A=
+}=0A=
 =0A=
 /* Implementation of vfs_ops.  */=0A=
 =0A=
 static int vscan_connect(vfs_handle_struct *handle, connection_struct =
*conn, const char *svc, const char *user)=0A=
 {=0A=
-        fstring config_file;            /* location of config file, =
either=0A=
-                                           PARAMCONF or as set via vfs =
options=0A=
-                                        */=0A=
-	int retval;=0A=
-=0A=
-=0A=
-        vscan_syslog("samba-vscan (%s) connected (Samba 3.0), (c) by =
Rainer Link, OpenAntiVirus.org", module_id);=0A=
+	vscan_config_struct *vscan_config =3D NULL;=0A=
 =0A=
-	/* set default value for configuration files */=0A=
-	fstrcpy(config_file, PARAMCONF);=0A=
-=0A=
-       /* set default values */=0A=
-        set_common_default_settings(&vscan_config);=0A=
-=0A=
-#ifdef LIBCLAMAV=0A=
-	memset(&clamav_limits, 0, sizeof(struct cl_limits));=0A=
+	struct specific_clamav *vscan_config_clamav =3D NULL;=0A=
 =0A=
-	clamav_limits.maxfiles =3D VSCAN_CL_MAXFILES;=0A=
-	clamav_limits.maxfilesize =3D VSCAN_CL_MAXFILESIZE;=0A=
-	clamav_limits.maxreclevel =3D VSCAN_CL_MAXRECLEVEL;=0A=
-#else=0A=
-	/* set default value for scanning archives */=0A=
-	scanarchives =3D VSCAN_SCAN_ARCHIVES;=0A=
-=0A=
-        /* name of clamd socket */=0A=
-        fstrcpy(clamd_socket_name, VSCAN_CLAMD_SOCKET_NAME);=0A=
-#endif=0A=
+	/* alloc our private data */=0A=
+	vscan_config =3D (vscan_config_struct =
*)SMB_MALLOC(sizeof(vscan_config_struct));=0A=
+	if (!vscan_config) {=0A=
+		DEBUG(0,("malloc() failed\n"));=0A=
+		return -1;=0A=
+	}=0A=
 =0A=
-	vscan_syslog("INFO: connect to service %s by user %s", =0A=
-	       svc, user);=0A=
+	vscan_config_clamav =3D (struct specific_clamav =
*)SMB_MALLOC(sizeof(struct specific_clamav));=0A=
+	if (!vscan_config_clamav) {=0A=
+		DEBUG(0,("malloc() failed\n"));=0A=
+		return -1;=0A=
+	}=0A=
 =0A=
-	fstrcpy(config_file, get_configuration_file(conn, VSCAN_MODULE_STR, =
PARAMCONF));=0A=
-        DEBUG(3, ("configuration file is: %s\n", config_file));=0A=
+	(vscan_config)->specific =3D (void *)vscan_config_clamav;=0A=
 =0A=
-        retval =3D pm_process(config_file, do_section, do_parameter);=0A=
-        DEBUG(10, ("pm_process returned %d\n", retval));=0A=
+        if ( lp_parm_bool(SNUM(conn), VSCAN_MODULE_STR, "verbose file =
logging", VSCAN_VERBOSE_FILE_LOGGING) ) =0A=
+         vscan_syslog("samba-vscan (%s) connected (Samba 3.0), (c) by =
Rainer Link, OpenAntiVirus.org", module_id);=0A=
 =0A=
-        /* FIXME: this is lame! */=0A=
-        verbose_file_logging =3D =
vscan_config.common.verbose_file_logging;=0A=
-        send_warning_message =3D =
vscan_config.common.send_warning_message;=0A=
+	if ( lp_parm_bool(SNUM(conn), VSCAN_MODULE_STR, "verbose file =
logging", VSCAN_VERBOSE_FILE_LOGGING) ) =0A=
+	 vscan_syslog("INFO: connect to service %s by user %s", =0A=
+	        svc, user);=0A=
 =0A=
-	if (!retval) vscan_syslog("ERROR: could not parse configuration file =
'%s'. File not found or not read-able. Using compiled-in defaults", =
config_file);=0A=
+        do_parameter(conn, VSCAN_MODULE_STR, vscan_config);=0A=
 =0A=
 #ifdef LIBCLAMAV=0A=
 	/* initialise lib clamav */=0A=
-	vscan_clamav_lib_init();=0A=
+	vscan_clamav_lib_init(vscan_config);=0A=
 #endif=0A=
 =0A=
         /* initialise lrufiles list */=0A=
         DEBUG(5, ("init lrufiles list\n"));=0A=
-        lrufiles_init(vscan_config.common.max_lrufiles, =
vscan_config.common.lrufiles_invalidate_time);=0A=
+=0A=
+        lrufiles_init(vscan_config->common.max_lrufiles, =
vscan_config->common.lrufiles_invalidate_time);=0A=
 =0A=
 	/* initialise filetype */=0A=
+#ifdef HAVE_FILETYPE_SUPPORT=0A=
 	DEBUG(5, ("init file type\n"));=0A=
-	filetype_init(0, vscan_config.common.exclude_file_types);=0A=
+	filetype_init(0, vscan_config);=0A=
+#endif=0A=
 =0A=
 	/* initialise file regexp */=0A=
-        DEBUG(5, ("init file regexp\n"));=0A=
-	fileregexp_init(vscan_config.common.exclude_file_regexp);=0A=
+#ifdef HAVE_FILEREGEXP_SUPPORT=0A=
+	DEBUG(5, ("init file regexp\n"));=0A=
+	fileregexp_init(vscan_config);=0A=
+#endif=0A=
 =0A=
-	return SMB_VFS_NEXT_CONNECT(handle, conn, svc, user);=0A=
+	SMB_VFS_HANDLE_SET_DATA(handle, vscan_config, NULL, =
vscan_config_struct, return -1);=0A=
 =0A=
+	return SMB_VFS_NEXT_CONNECT(handle, conn, svc, user);=0A=
 }=0A=
 =0A=
 static void vscan_disconnect(vfs_handle_struct *handle, =
connection_struct *conn)=0A=
 {=0A=
+	vscan_config_struct *vscan_config =3D NULL;=0A=
+=0A=
+	SMB_VFS_HANDLE_GET_DATA(handle, vscan_config, vscan_config_struct, =
return);=0A=
 =0A=
-	vscan_syslog("INFO: disconnected");=0A=
+	if ( lp_parm_bool(SNUM(conn), VSCAN_MODULE_STR, "verbose file =
logging", VSCAN_VERBOSE_FILE_LOGGING) ) =0A=
+	 vscan_syslog("INFO: disconnected");=0A=
 =0A=
 #ifdef LIBCLAMAV=0A=
-	vscan_clamav_lib_done();=0A=
+	vscan_clamav_lib_done(vscan_config);=0A=
 #endif=0A=
 =0A=
-        lrufiles_destroy_all();=0A=
-	filetype_close();=0A=
+	free_vscan_config(&(handle)->data);=0A=
 =0A=
 	SMB_VFS_NEXT_DISCONNECT(handle, conn);=0A=
 }=0A=
 =0A=
-=0A=
 static int vscan_open(vfs_handle_struct *handle, connection_struct =
*conn, const char *fname, int flags, mode_t mode)=0A=
 {=0A=
 	SMB_STRUCT_STAT stat_buf;=0A=
 	pstring filepath;=0A=
 	int must_be_checked;=0A=
 =0A=
+	vscan_config_struct *vscan_config =3D NULL;=0A=
+=0A=
+	SMB_VFS_HANDLE_GET_DATA(handle, vscan_config, vscan_config_struct, =
return -1);=0A=
+=0A=
 	/* Assemble complete file path */=0A=
 	pstrcpy(filepath, conn->connectpath);=0A=
 	pstrcat(filepath, "/");=0A=
 	pstrcat(filepath, fname);=0A=
 =0A=
         /* scan files while opening? */=0A=
-        if ( !vscan_config.common.scan_on_open ) {=0A=
+        if ( !vscan_config->common.scan_on_open ) {=0A=
                 DEBUG(3, ("samba-vscan - open: File '%s' not scanned as =
scan_on_open is not set\n", fname));=0A=
         }=0A=
 	else if ( (SMB_VFS_NEXT_STAT(handle, conn, fname, &stat_buf)) !=3D 0 ) =
{    /* an error occured */ =0A=
 		if ( errno =3D=3D ENOENT ) {=0A=
-			if ( verbose_file_logging )=0A=
+			if ( vscan_config->common.verbose_file_logging )=0A=
 				vscan_syslog("INFO: File %s not found! Not scanned!", fname);=0A=
 		}=0A=
 		else {=0A=
@@ -223,28 +187,30 @@=0A=
 		}=0A=
 	}=0A=
 	else if ( S_ISDIR(stat_buf.st_mode) ) { 	/* is it a directory? */=0A=
-		if ( verbose_file_logging )=0A=
+		if ( vscan_config->common.verbose_file_logging )=0A=
 			vscan_syslog("INFO: File %s is a directory! Not scanned!", fname);=0A=
 	}=0A=
-	else if ( ( stat_buf.st_size > vscan_config.common.max_size ) && ( =
vscan_config.common.max_size > 0 ) ) { /* file is too large */=0A=
-		if ( vscan_config.common.verbose_file_logging )=0A=
+	else if ( ( stat_buf.st_size > vscan_config->common.max_size ) && ( =
vscan_config->common.max_size > 0 ) ) { /* file is too large */=0A=
+		if ( vscan_config->common.verbose_file_logging )=0A=
 			vscan_syslog("INFO: File %s is larger than specified maximum file =
size! Not scanned!", fname);=0A=
 	}=0A=
 	else if ( stat_buf.st_size =3D=3D 0 ) { /* do not scan empty files */=0A=
-		if ( vscan_config.common.verbose_file_logging )=0A=
+		if ( vscan_config->common.verbose_file_logging )=0A=
 			vscan_syslog("INFO: File %s has size zero! Not scanned!", fname);=0A=
-	}=0A=
-	else if ( fileregexp_skipscan(filepath) =3D=3D VSCAN_FR_SKIP_SCAN ) {=0A=
-		if ( vscan_config.common.verbose_file_logging )=0A=
+#ifdef HAVE_FILEREGEXP_SUPPORT=0A=
+	} else if ( fileregexp_skipscan(filepath,vscan_config) =3D=3D =
VSCAN_FR_SKIP_SCAN ) {=0A=
+		if ( vscan_config->common.verbose_file_logging )=0A=
 			vscan_syslog("INFO: File '%s' not scanned as file is machted by =
exclude regexp", filepath);=0A=
-	}=0A=
-	else if ( filetype_skipscan(filepath) =3D=3D VSCAN_FT_SKIP_SCAN ) {=0A=
-		if ( verbose_file_logging )=0A=
+#endif=0A=
+#ifdef HAVE_FILETYPE_SUPPORT=0A=
+	} else if ( filetype_skipscan(filepath,vscan_config) =3D=3D =
VSCAN_FT_SKIP_SCAN ) {=0A=
+		if ( vscan_config->common.verbose_file_logging )=0A=
 			vscan_syslog("INFO: File '%s' not scanned as file type is on exclude =
list", filepath);=0A=
+#endif=0A=
 	} else if ( (must_be_checked =3D lrufiles_must_be_checked(filepath, =
stat_buf.st_mtime)) =3D=3D VSCAN_LRU_DENY_ACCESS ) {=0A=
 		/* file has already been checked and marked as infected */=0A=
 		/* deny access */=0A=
-		if ( vscan_config.common.verbose_file_logging )=0A=
+		if ( vscan_config->common.verbose_file_logging )=0A=
 			vscan_syslog("INFO: File '%s' has already been scanned and marked as =
infected. Not scanned any more. Access denied", filepath);=0A=
 =0A=
 		/* deny access */=0A=
@@ -252,7 +218,7 @@=0A=
 		return -1;=0A=
 	} else if ( must_be_checked =3D=3D VSCAN_LRU_GRANT_ACCESS )  {=0A=
 		/* file has already been checked, not marked as infected and not =
modified */=0A=
-		if ( vscan_config.common.verbose_file_logging )=0A=
+		if ( vscan_config->common.verbose_file_logging )=0A=
 			vscan_syslog("INFO: File '%s' has already been scanned, not marked =
as infected and not modified. Not scanned anymore. Access granted", =
filepath);=0A=
 	} else=0A=
 	{=0A=
@@ -263,14 +229,15 @@=0A=
 		int retval;=0A=
 =0A=
 #ifdef LIBCLAMAV=0A=
-		retval =3D vscan_clamav_lib_scanfile(filepath, client_ip);=0A=
+		retval =3D vscan_clamav_lib_scanfile(filepath, client_ip, =
vscan_config);=0A=
 #else	/* LIBCLAMAV	*/=0A=
 		int sockfd;=0A=
 =0A=
 		/* open socket */=0A=
-		sockfd =3D vscan_clamav_init();=0A=
+		struct specific_clamav *vscan_config_clamav =3D (void =
*)(vscan_config)->specific;=0A=
+		sockfd =3D vscan_clamav_init(vscan_config_clamav->clamd_socket_name);=0A=
                 if ( sockfd =3D=3D VSCAN_SCAN_ERROR ) {=0A=
-			if( vscan_config.common.deny_access_on_error ) {=0A=
+			if( vscan_config->common.deny_access_on_error ) {=0A=
 	                        /* an error occured - can not communicate to =
daemon - deny access */=0A=
 				vscan_syslog("ERROR: can not communicate to daemon - access =
denied");=0A=
 				errno =3D EACCES;=0A=
@@ -281,7 +248,7 @@=0A=
 		} else=0A=
 		{=0A=
 			/* scan file */=0A=
-			retval =3D vscan_clamav_scanfile(sockfd, filepath, client_ip);=0A=
+			retval =3D vscan_clamav_scanfile(sockfd, filepath, client_ip, =
vscan_config);=0A=
 			vscan_clamav_end(sockfd);=0A=
 		}=0A=
 #endif =0A=
@@ -292,7 +259,7 @@=0A=
 		else if ( retval =3D=3D VSCAN_SCAN_VIRUS_FOUND ) {=0A=
 			/* virus found */=0A=
 			/* do action ... */=0A=
-			vscan_do_infected_file_action(handle, conn, filepath, =
vscan_config.common.quarantine_dir, =
vscan_config.common.quarantine_prefix, =
vscan_config.common.infected_file_action);=0A=
+			vscan_do_infected_file_action(handle, conn, filepath, =
vscan_config->common.quarantine_dir, =
vscan_config->common.quarantine_prefix, =
vscan_config->common.infected_file_action);=0A=
 =0A=
                         /* add/update file. mark file as infected! */=0A=
 			lrufiles_add(filepath, stat_buf.st_mtime, True);=0A=
@@ -305,7 +272,7 @@=0A=
 			/* to be safe, remove file from lrufiles */=0A=
 			lrufiles_delete(filepath);=0A=
 =0A=
-			if( vscan_config.common.deny_access_on_minor_error ) {=0A=
+			if( vscan_config->common.deny_access_on_minor_error ) {=0A=
 				/* a minor error occured - deny access */=0A=
 				vscan_syslog("ERROR: daemon failed with a minor error - access to =
file %s denied", fname);=0A=
 =0A=
@@ -319,7 +286,7 @@=0A=
 			/* to be safe, remove file from lrufiles */=0A=
 			lrufiles_delete(filepath);=0A=
 =0A=
-			if ( vscan_config.common.deny_access_on_error ) {=0A=
+			if ( vscan_config->common.deny_access_on_error ) {=0A=
 				/* an error occured - can not communicate to daemon - deny access */=0A=
 				vscan_syslog("ERROR: can not communicate to clamd - access to file =
%s denied", fname);=0A=
 =0A=
@@ -338,9 +305,13 @@=0A=
 {=0A=
 	SMB_STRUCT_STAT stat_buf;=0A=
 	pstring filepath;=0A=
-        int retval =3D 0, rv =3D 0, rc =3D 0, sockfd;=0A=
+        int retval =3D 0, rv =3D 0, sockfd;=0A=
 	char client_ip[CLIENT_IP_SIZE];=0A=
 =0A=
+	vscan_config_struct *vscan_config =3D NULL;=0A=
+=0A=
+	SMB_VFS_HANDLE_GET_DATA(handle, vscan_config, vscan_config_struct, =
return -1);=0A=
+=0A=
         /* First close the file */=0A=
         retval =3D SMB_VFS_NEXT_CLOSE(handle, fsp, fd);=0A=
 =0A=
@@ -349,7 +320,7 @@=0A=
         pstrcat(filepath, "/");=0A=
         pstrcat(filepath, fsp->fsp_name);=0A=
 =0A=
-        if ( !vscan_config.common.scan_on_close ) {=0A=
+        if ( !vscan_config->common.scan_on_close ) {=0A=
                 DEBUG(3, ("samba-vscan - close: File '%s' not scanned =
as scan_on_close is not set\n", fsp->fsp_name));=0A=
         }=0A=
         /* Don't scan directorys */=0A=
@@ -357,46 +328,56 @@=0A=
 		DEBUG(10, ("don't scan directory\n"));=0A=
 	/* Don't scan files which have not been modified */=0A=
 	else if ( !fsp->modified ) {=0A=
-                if ( vscan_config.common.verbose_file_logging ) =0A=
+                if ( vscan_config->common.verbose_file_logging ) =0A=
                         vscan_syslog("INFO: file %s was not modified - =
not scanned", filepath);=0A=
 =0A=
 	}=0A=
         /* dont' scan file which matches exclude regexp */=0A=
-        else if ( fileregexp_skipscan(filepath) =3D=3D =
VSCAN_FR_SKIP_SCAN ) {=0A=
-                if ( vscan_config.common.verbose_file_logging )=0A=
+#ifdef HAVE_FILEREGEXP_SUPPORT=0A=
+        else if ( fileregexp_skipscan(filepath,vscan_config) =3D=3D =
VSCAN_FR_SKIP_SCAN ) {=0A=
+                if ( vscan_config->common.verbose_file_logging )=0A=
                         vscan_syslog("INFO: file '%s' not scanned as =
file is machted by exclude regexp", filepath);=0A=
         }=0A=
+#endif=0A=
 	/* don't scan files which are in the list of exclude file types */=0A=
-	else if ( filetype_skipscan(filepath) =3D=3D VSCAN_FT_SKIP_SCAN ) {=0A=
-                if ( vscan_config.common.verbose_file_logging )=0A=
+#ifdef HAVE_FILETYPE_SUPPORT=0A=
+	else if ( filetype_skipscan(filepath,vscan_config) =3D=3D =
VSCAN_FT_SKIP_SCAN ) {=0A=
+                if ( vscan_config->common.verbose_file_logging )=0A=
                         vscan_syslog("INFO: File '%s' not scanned as =
file type is on exclude list", filepath);=0A=
 	}=0A=
+#endif=0A=
 	else if ( (SMB_VFS_NEXT_STAT(handle, handle->conn, fsp->fsp_name, =
&stat_buf)) !=3D 0 ) {    /* an error occured */ =0A=
 		if( errno =3D=3D ENOENT) {=0A=
-			if ( vscan_config.common.verbose_file_logging )=0A=
+			if ( vscan_config->common.verbose_file_logging )=0A=
 				vscan_syslog("INFO: File %s not found! Not scanned!", =
fsp->fsp_name);=0A=
 		} else {=0A=
 			vscan_syslog("ERROR: File %s not readable or an error occured", =
fsp->fsp_name);=0A=
 		}=0A=
 	}=0A=
+	else if ( ( stat_buf.st_size > vscan_config->common.max_size ) && ( =
vscan_config->common.max_size > 0 ) ) { /* file is too large */=0A=
+		if ( vscan_config->common.verbose_file_logging )=0A=
+			vscan_syslog("INFO: File %s is larger than specified maximum file =
size! Not scanned!", fsp->fsp_name);=0A=
+		return retval;=0A=
+	}=0A=
 	else {=0A=
 		safe_strcpy(client_ip, fsp->conn->client_address, CLIENT_IP_SIZE -1);=0A=
 #ifdef LIBCLAMAV=0A=
 		/* scan only file, do nothing */=0A=
-		rv =3D vscan_clamav_lib_scanfile(filepath, client_ip);=0A=
+		rv =3D vscan_clamav_lib_scanfile(filepath, client_ip, vscan_config);=0A=
 #else	/* LIBCLAMAV */=0A=
-		sockfd =3D vscan_clamav_init();=0A=
+		struct specific_clamav *vscan_config_clamav =3D (void =
*)(vscan_config)->specific;=0A=
+		sockfd =3D vscan_clamav_init(vscan_config_clamav->clamd_socket_name);=0A=
                	/* Errors are written from vscan_clamav_init()	*/=0A=
 		if ( sockfd < 0 )=0A=
 			return retval;=0A=
 		/* scan only file, do nothing */=0A=
-               	rv =3D vscan_clamav_scanfile(sockfd, filepath, =
client_ip);=0A=
+               	rv =3D vscan_clamav_scanfile(sockfd, filepath, =
client_ip, vscan_config);=0A=
                	vscan_clamav_end(sockfd);=0A=
 #endif	/* LIBCLAMAV */=0A=
 =0A=
 		if ( rv =3D=3D VSCAN_SCAN_VIRUS_FOUND ) {=0A=
 			/* virus was found */=0A=
-			vscan_do_infected_file_action(handle, fsp->conn, filepath, =
vscan_config.common.quarantine_dir, =
vscan_config.common.quarantine_prefix, =
vscan_config.common.infected_file_action);=0A=
+			vscan_do_infected_file_action(handle, fsp->conn, filepath, =
vscan_config->common.quarantine_dir, =
vscan_config->common.quarantine_prefix, =
vscan_config->common.infected_file_action);=0A=
 			/* add/update file, mark file as infected! */=0A=
 			lrufiles_add(filepath, stat_buf.st_mtime, True);=0A=
 		}=0A=
@@ -419,7 +400,8 @@=0A=
 	=0A=
 	ret =3D smb_register_vfs(SMB_VFS_INTERFACE_VERSION, VSCAN_MODULE_STR, =
vscan_ops);=0A=
 	openlog("smbd_"VSCAN_MODULE_STR, LOG_PID, SYSLOG_FACILITY);=0A=
-	vscan_syslog("samba-vscan (%s) registered (Samba 3.0), (c) by Rainer =
Link, OpenAntiVirus.org", module_id);=0A=
+	if ( 0 ) =0A=
+	 vscan_syslog("samba-vscan (%s) registered (Samba 3.0), (c) by Rainer =
Link, OpenAntiVirus.org", module_id);=0A=
 	DEBUG(5,("samba-vscan (%s) registered (Samba 3.0), (c) by Rainer Link, =
OpenAntiVirus.org\n", module_id));=0A=
 	=0A=
 	return ret;	=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/clamav/vscan-clamav.conf =
samba-vscan-0.3.7/clamav/vscan-clamav.conf=0A=
--- samba-vscan-0.3.7-orig/clamav/vscan-clamav.conf	2005-07-23 =
16:33:54.000000000 +0200=0A=
+++ samba-vscan-0.3.7/clamav/vscan-clamav.conf	2005-12-30 =
17:33:00.000000000 +0100=0A=
@@ -5,78 +5,82 @@=0A=
 =0A=
 ; do not scan files larger than X bytes. If set to 0 (default),=0A=
 ; this feature is disable (i.e. all files are scanned)=0A=
-max file size =3D 0 =0A=
+vscan-clamav: max file size =3D 0 =0A=
+;set this to 10485760 for 10MB=0A=
 =0A=
 ; log all file access (yes/no). If set to yes, every access will=0A=
 ; be logged. If set to no (default), only access to infected files=0A=
 ; will be logged=0A=
-verbose file logging =3D no  =0A=
+vscan-clamav: verbose file logging =3D no  =0A=
 =0A=
 ; if set to yes (default), a file will be scanned while opening=0A=
-scan on open =3D yes=0A=
+vscan-clamav: scan on open =3D yes=0A=
 ; if set to yes, a file will be scanned while closing (default is yes)=0A=
-scan on close =3D yes =0A=
+vscan-clamav: scan on close =3D yes =0A=
 =0A=
 ; if communication to clamd fails, should access to file denied?=0A=
 ; (default: yes)=0A=
-deny access on error =3D yes=0A=
+vscan-clamav: deny access on error =3D yes=0A=
 =0A=
 ; if daemon files with a minor error (corruption, etc.),=0A=
 ; should access to file denied?=0A=
 ; (default: yes)=0A=
-deny access on minor error =3D yes=0A=
+vscan-clamav: deny access on minor error =3D yes=0A=
 =0A=
 ; send a warning message via Windows Messenger service=0A=
 ; when virus is found?=0A=
 ; (default: yes)=0A=
-send warning message =3D yes=0A=
+vscan-clamav: send warning message =3D yes=0A=
 =0A=
 ; what to do with an infected file=0A=
 ; quarantine: try to move to quantine directory=0A=
 ; delete:     delete infected file=0A=
 ; nothing:    do nothing (default)=0A=
-infected file action =3D nothing=0A=
+vscan-clamav: infected file action =3D nothing=0A=
 =0A=
 ; where to put infected files - you really want to change this!=0A=
-quarantine directory  =3D /tmp=0A=
+vscan-clamav: quarantine directory  =3D /tmp=0A=
 ; prefix for files in quarantine=0A=
-quarantine prefix =3D vir-=0A=
+vscan-clamav: quarantine prefix =3D vir-=0A=
 =0A=
 ; as Windows tries to open a file multiple time in a (very) short time=0A=
 ; of period, samba-vscan use a last recently used file mechanism to =
avoid=0A=
 ; multiple scans of a file. This setting specified the maximum number of=0A=
 ; elements of the last recently used file list. (default: 100)=0A=
-max lru files entries =3D 100=0A=
+vscan-clamav: max lru files entries =3D 100=0A=
 =0A=
 ; an entry is invalidad after lru file entry lifetime (in seconds).=0A=
 ; (Default: 5)=0A=
-lru file entry lifetime =3D 5=0A=
+vscan-clamav: lru file entry lifetime =3D 5=0A=
+=0A=
+; magic-mime file-path, (".mime" as appended automatically; default: =
system-magic.mime-file)=0A=
+vscan-clamav: mime-magic file =3D=0A=
 =0A=
 ; exclude files from being scanned based on the MIME-type! Semi-colon=0A=
 ; seperated list (default: empty list). Use this with care!=0A=
-exclude file types =3D=0A=
+vscan-clamav: exclude file types =3D=0A=
 =0A=
 ; exclude files from being scanned via regular expression (PCRE)=0A=
 ; (default: empty)=0A=
-exclude file regexp =3D=0A=
+vscan-clamav: exclude file regexp =3D=0A=
 =0A=
 ; socket name of clamd (default: /var/run/clamd). Setting will be =
ignored if=0A=
 ; libclamav is used=0A=
-clamd socket name =3D /var/run/clamd=0A=
+vscan-clamav: clamd socket name =3D /var/lib/clamav/clamd.socket=0A=
 =0A=
 ; scan inside of archives (only with clamd)=0A=
 ; (default: yes)=0A=
-;scan archives =3D yes=0A=
+;vscan-clamav: scan archives =3D yes=0A=
 =0A=
 ; limits, if vscan-clamav was build for using the clamav library =
(libclamav)=0A=
 ; instead of clamd=0A=
 =0A=
 ; maximum number of files in archive (default: 1000)=0A=
-libclamav max files in archive =3D 1000=0A=
+vscan-clamav: libclamav max files in archive =3D 1000=0A=
 =0A=
 ; maximum archived file size, in bytes (default: 10 MB)=0A=
-libclamav max archived file size =3D 10485760=0A=
+vscan-clamav: libclamav max archived file size =3D 10485760=0A=
 =0A=
 ; maximum recursion level (default: 5)=0A=
-libclamav max recursion level =3D 5=0A=
+vscan-clamav: libclamav max recursion level =3D 5=0A=
 =0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/clamav/vscan-clamav_core.c =
samba-vscan-0.3.7/clamav/vscan-clamav_core.c=0A=
--- samba-vscan-0.3.7-orig/clamav/vscan-clamav_core.c	2005-07-23 =
16:47:45.000000000 +0200=0A=
+++ samba-vscan-0.3.7/clamav/vscan-clamav_core.c	2005-12-30 =
17:12:13.000000000 +0100=0A=
@@ -16,38 +16,22 @@=0A=
 #include "vscan-clamav_core.h"=0A=
 =0A=
 #ifdef LIBCLAMAV=0A=
-#include <clamav.h>=0A=
-#endif=0A=
-=0A=
-extern BOOL verbose_file_logging;=0A=
-extern BOOL send_warning_message;=0A=
-=0A=
-#ifdef LIBCLAMAV=0A=
-extern struct cl_node *clamav_root;=0A=
-extern struct cl_limits clamav_limits;=0A=
-extern BOOL clamav_loaded;=0A=
-#else=0A=
-extern BOOL scanarchives;=0A=
-extern fstring clamd_socket_name;=0A=
-#endif=0A=
-=0A=
-=0A=
-#ifdef LIBCLAMAV=0A=
-void vscan_clamav_lib_init()=0A=
+void vscan_clamav_lib_init(vscan_config_struct *vscan_config)=0A=
 {=0A=
     int ret;=0A=
-    int no =3D 0;=0A=
+    unsigned int no =3D 0;=0A=
+=0A=
+    struct specific_clamav *vscan_config_clamav =3D (void =
*)(vscan_config)->specific;=0A=
+=0A=
+    vscan_config_clamav->clamav_root =3D NULL;=0A=
 =0A=
-    if ( (ret =3D cl_loaddbdir(cl_retdbdir(), &clamav_root, &no)) ) {=0A=
+    if ( (ret =3D cl_loaddbdir(cl_retdbdir(), =
&(vscan_config_clamav->clamav_root), &no)) ) {=0A=
 	vscan_syslog("ERROR: could not load clamav database, reason '%s'", =
cl_perror(ret));=0A=
-	clamav_loaded =3D False;=0A=
     } else {=0A=
+        DEBUG(0, ("Loaded %d virus signatures\n", no));=0A=
 =0A=
-	clamav_loaded =3D True;=0A=
-        DEBUG(3, ("Loaded %d virus signatures\n", no));=0A=
-=0A=
-	/* build the trie */=0A=
-        cl_buildtrie(clamav_root);=0A=
+	/* build the engine */=0A=
+        cl_build(vscan_config_clamav->clamav_root);=0A=
 =0A=
     }=0A=
 }=0A=
@@ -56,47 +40,48 @@=0A=
 =0A=
 /* initialise socket to clamd=0A=
    returns -1 on error or the socket descriptor  */=0A=
-int vscan_clamav_init(void)=0A=
+int vscan_clamav_init(char *clamd_socket_name)=0A=
 {=0A=
-=0A=
         return vscan_unix_socket_init("clamd", clamd_socket_name);=0A=
 }=0A=
 =0A=
+#endif /* LIBCLAMAV */=0A=
 =0A=
 /*=0A=
   If virus is found, logs the filename/virusname into syslog=0A=
 */=0A=
-void vscan_clamav_log_virus(const char *infected_file, const char =
*results, const char *client_ip)=0A=
+void vscan_clamav_log_virus(const char *infected_file, const char =
*results, const char *client_ip, vscan_config_struct *vscan_config)=0A=
 {=0A=
 =0A=
     vscan_syslog_alert("ALERT - Scan result: '%s' infected with virus =
'%s', client: '%s'", infected_file, results, client_ip);=0A=
-    if ( send_warning_message )=0A=
+    if ( vscan_config->common.send_warning_message )=0A=
         vscan_send_warning_message(infected_file, results, client_ip);=0A=
-        =0A=
 }=0A=
-#endif /* LIBCLAMAV */=0A=
 =0A=
 #ifdef LIBCLAMAV=0A=
 /* Scan a file using lib clamav=0A=
  Returns -2 on minor error,  -1 on error, 0 if a no virus was found,=0A=
  1 if a virus was found=0A=
 */=0A=
-int vscan_clamav_lib_scanfile(char* scan_file, char* client_ip)=0A=
+int vscan_clamav_lib_scanfile(char* scan_file, char* client_ip, =
vscan_config_struct *vscan_config)=0A=
 {=0A=
     int ret;=0A=
     unsigned long int size =3D 0;=0A=
     /* interface change sometime after 0.65 release */=0A=
     const char* virname;=0A=
 =0A=
-    ret =3D cl_scanfile(scan_file, &virname, &size, clamav_root, =
&clamav_limits, CL_ARCHIVE);=0A=
+    struct specific_clamav *vscan_config_clamav =3D (void =
*)(vscan_config)->specific;=0A=
+=0A=
+    ret =3D cl_scanfile(scan_file, &virname, &size, =
vscan_config_clamav->clamav_root, &(vscan_config_clamav->clamav_limits), =
CL_SCAN_STDOPT);=0A=
+=0A=
     if ( ret =3D=3D CL_CLEAN ) {    /* no virus found */=0A=
-	if (verbose_file_logging) {=0A=
+	if (vscan_config->common.verbose_file_logging) {=0A=
 		vscan_syslog("INFO: file %s is clean", scan_file);=0A=
 	}=0A=
 	return VSCAN_SCAN_OK;=0A=
     }=0A=
     if ( ret =3D=3D CL_VIRUS ) {  /* virus found */=0A=
-	vscan_clamav_log_virus(scan_file, virname, client_ip);	=0A=
+	vscan_clamav_log_virus(scan_file, virname, client_ip, vscan_config);=0A=
 	return VSCAN_SCAN_VIRUS_FOUND;=0A=
     }=0A=
     /* error */=0A=
@@ -111,7 +96,7 @@=0A=
   Returns -2 on minor error,  -1 on error, 0 if a no virus was found, =0A=
   1 if a virus was found=0A=
 */=0A=
-int vscan_clamav_scanfile(int sockfd, char *scan_file, char *client_ip)=0A=
+int vscan_clamav_scanfile(int sockfd, char *scan_file, char *client_ip, =
vscan_config_struct *vscan_config)=0A=
 {=0A=
     char *request =3D NULL;=0A=
     size_t len =3D 0;=0A=
@@ -119,6 +104,8 @@=0A=
     char *scanart =3D NULL;=0A=
     FILE *fpin;=0A=
 =0A=
+    struct specific_clamav *vscan_config_clamav =3D (void =
*)(vscan_config)->specific;=0A=
+=0A=
     /* open stream sockets */=0A=
     fpin =3D fdopen(sockfd, "r");=0A=
     if (fpin =3D=3D NULL) {=0A=
@@ -129,7 +116,7 @@=0A=
     memset(buff, 0, sizeof(buff));=0A=
 =0A=
     /* +1 is for '\0' termination --metze */=0A=
-    if ( scanarchives ) {=0A=
+    if ( vscan_config_clamav->scanarchives ) {=0A=
     	scanart =3D "SCAN ";=0A=
     } else {=0A=
     	scanart =3D "RAWSCAN ";=0A=
@@ -137,12 +124,12 @@=0A=
     len =3D strlen(scanart)+strlen(scan_file)+1;=0A=
 =0A=
     /* prepare clamd command */=0A=
-    if (!(request =3D (char *)malloc(len))) {=0A=
+    if (!(request =3D (char *)SMB_MALLOC(len))) {=0A=
         vscan_syslog("ERROR: can not allocate memory");=0A=
         return VSCAN_SCAN_ERROR; /* error allocating memory */=0A=
     }=0A=
 =0A=
-    if (verbose_file_logging)=0A=
+    if (vscan_config->common.verbose_file_logging)=0A=
         vscan_syslog("INFO: Scanning file : '%s'", scan_file);=0A=
 =0A=
     safe_strcpy(request, scanart, len-1);=0A=
@@ -171,11 +158,11 @@=0A=
             for (--p1; (p1 >=3D vir) && (isspace((int)*p1)); p1--);=0A=
             p1[1] =3D '\0';=0A=
 =0A=
-            vscan_clamav_log_virus(scan_file, vir, client_ip);=0A=
+            vscan_clamav_log_virus(scan_file, vir, client_ip, =
vscan_config);=0A=
             return VSCAN_SCAN_VIRUS_FOUND;=0A=
         }=0A=
 	if ((NULL !=3D  strstr(buff, "OK\n"))) {=0A=
-            if (verbose_file_logging)=0A=
+            if (vscan_config->common.verbose_file_logging)=0A=
                 vscan_syslog("INFO: file %s is clean", scan_file);=0A=
 =0A=
             return VSCAN_SCAN_OK;=0A=
@@ -194,9 +181,11 @@=0A=
 =0A=
 =0A=
 #ifdef LIBCLAMAV=0A=
-void vscan_clamav_lib_done()=0A=
+void vscan_clamav_lib_done(vscan_config_struct *vscan_config)=0A=
 {=0A=
-    cl_freetrie(clamav_root);=0A=
+    struct specific_clamav *vscan_config_clamav =3D (void =
*)(vscan_config)->specific;=0A=
+=0A=
+    cl_free(vscan_config_clamav->clamav_root);=0A=
 }=0A=
 #else /* LIBCLAMAV */=0A=
 =0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/clamav/vscan-clamav_core.h =
samba-vscan-0.3.7/clamav/vscan-clamav_core.h=0A=
--- samba-vscan-0.3.7-orig/clamav/vscan-clamav_core.h	2005-07-23 =
16:33:54.000000000 +0200=0A=
+++ samba-vscan-0.3.7/clamav/vscan-clamav_core.h	2005-12-30 =
17:07:39.000000000 +0100=0A=
@@ -5,19 +5,19 @@=0A=
 =0A=
 #ifdef LIBCLAMAV=0A=
 /* load signature tree */=0A=
-void vscan_clamav_lib_init();=0A=
+void vscan_clamav_lib_init(vscan_config_struct *vscan_config);=0A=
 /* cleanup signature tree */=0A=
-void vscan_clamav_lib_done();=0A=
+void vscan_clamav_lib_done(vscan_config_struct *vscan_config);=0A=
 /* scans a file */=0A=
-int vscan_clamav_lib_scanfile(char *scan_file, char *client_ip);=0A=
+int vscan_clamav_lib_scanfile(char* scan_file, char* client_ip, =
vscan_config_struct *vscan_config);=0A=
 =0A=
 #else=0A=
 /* opens socket */=0A=
-int vscan_clamav_init(void);=0A=
+int vscan_clamav_init(char *clamd_socket_name);=0A=
 /* closes socket */=0A=
 void vscan_clamav_end(int sockfd);=0A=
 /* scans a file */=0A=
-int vscan_clamav_scanfile(int sockfd, char *scan_file, char *client_ip);=0A=
+int vscan_clamav_scanfile(int sockfd, char *scan_file, char *client_ip, =
vscan_config_struct *vscan_config);=0A=
 =0A=
 #endif=0A=
 =0A=
Dateien samba-vscan-0.3.7-orig/clamav/vscan-clamav_core.po und =
samba-vscan-0.3.7/clamav/vscan-clamav_core.po sind verschieden.=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/clamav/vscan-clamav.h =
samba-vscan-0.3.7/clamav/vscan-clamav.h=0A=
--- samba-vscan-0.3.7-orig/clamav/vscan-clamav.h	2005-07-23 =
16:47:45.000000000 +0200=0A=
+++ samba-vscan-0.3.7/clamav/vscan-clamav.h	2005-12-30 =
17:00:57.000000000 +0100=0A=
@@ -4,15 +4,14 @@=0A=
 #include "vscan-global.h"=0A=
 #include "vscan-clamav_core.h"=0A=
 =0A=
-/* Configuration Section :-) */=0A=
-=0A=
-#define PARAMCONF "/etc/samba/vscan-clamav.conf"=0A=
-=0A=
 /* Clam AntiVirus (clamd) stuff:=0A=
    socket name of Clam daemon */=0A=
-#define VSCAN_CLAMD_SOCKET_NAME      "/var/run/clamd"=0A=
+#ifndef LIBCLAMAV=0A=
+#define VSCAN_CLAMD_SOCKET_NAME      "/var/lib/clamav/clamd.socket"=0A=
 =0A=
 #define VSCAN_SCAN_ARCHIVES True=0A=
+#else=0A=
+#include <clamav.h>=0A=
 =0A=
 /* Clam AntiVirus (libclamav) stuff:=0A=
    maximum number of files in archive */=0A=
@@ -21,8 +20,17 @@=0A=
 #define VSCAN_CL_MAXFILESIZE 10485670=0A=
 /* maximum recursion level */=0A=
 #define VSCAN_CL_MAXRECLEVEL 5=0A=
-=0A=
-=0A=
+#endif=0A=
 /* End Configuration Section */=0A=
 =0A=
+struct specific_clamav {=0A=
+#ifdef LIBCLAMAV=0A=
+	struct cl_node *clamav_root;=0A=
+	struct cl_limits clamav_limits;=0A=
+#else=0A=
+	BOOL scanarchives;=0A=
+	fstring clamd_socket_name;      /* name of clamd socket */=0A=
+#endif=0A=
+};=0A=
+=0A=
 #endif /* __VSCAN_CLAMAV_H_ */ =0A=
Dateien samba-vscan-0.3.7-orig/clamav/vscan-clamav.po und =
samba-vscan-0.3.7/clamav/vscan-clamav.po sind verschieden.=0A=
Dateien samba-vscan-0.3.7-orig/core.19555 und =
samba-vscan-0.3.7/core.19555 sind verschieden.=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/global/vscan-fileaccesslog.c =
samba-vscan-0.3.7/global/vscan-fileaccesslog.c=0A=
--- samba-vscan-0.3.7-orig/global/vscan-fileaccesslog.c	2005-07-23 =
16:47:46.000000000 +0200=0A=
+++ samba-vscan-0.3.7/global/vscan-fileaccesslog.c	2005-12-29 =
02:14:53.000000000 +0100=0A=
@@ -150,7 +150,7 @@=0A=
 		return found;=0A=
 	} else {=0A=
 		DEBUG(10, ("alloc space for file entry '%s'\n", fname));=0A=
-		new_entry =3D (struct lrufiles_struct *)malloc(sizeof(*new_entry));=0A=
+		new_entry =3D (struct lrufiles_struct =
*)SMB_MALLOC(sizeof(*new_entry));=0A=
 		if (!new_entry) return NULL;=0A=
 =0A=
 		ZERO_STRUCTP(new_entry);=0A=
Dateien samba-vscan-0.3.7-orig/global/vscan-fileaccesslog.po und =
samba-vscan-0.3.7/global/vscan-fileaccesslog.po sind verschieden.=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/global/vscan-fileregexp.c =
samba-vscan-0.3.7/global/vscan-fileregexp.c=0A=
--- samba-vscan-0.3.7-orig/global/vscan-fileregexp.c	2005-07-23 =
16:47:46.000000000 +0200=0A=
+++ samba-vscan-0.3.7/global/vscan-fileregexp.c	2005-12-30 =
03:30:54.000000000 +0100=0A=
@@ -19,21 +19,30 @@=0A=
 =0A=
 #ifdef HAVE_FILEREGEXP_SUPPORT=0A=
 =0A=
-#include <pcre.h>=0A=
-=0A=
 #define OVECCOUNT 30    /* should be a multiple of 3 */=0A=
 =0A=
-static pstring fileregexp_excludepattern =3D "";=0A=
+BOOL fileregexp_init (vscan_config_struct *vscan_config) {=0A=
 =0A=
-BOOL fileregexp_init (pstring filetype_excluderegexp) {=0A=
+	if ( strlen(vscan_config->common.exclude_file_regexp) > 0 ) {=0A=
 =0A=
-	//trim_string(filetype_excluderegexp, " ", " ");=0A=
-	=0A=
-	if ( strlen(filetype_excluderegexp) > 0 ) {=0A=
+		const char *error;=0A=
+		int erroffset;=0A=
 =0A=
-		DEBUG(5, ("exclude regexp is: '%s'\n", filetype_excluderegexp)); =0A=
-		pstrcpy(fileregexp_excludepattern, filetype_excluderegexp);=0A=
+		DEBUG(5, ("exclude regexp is: '%s'\n", =
vscan_config->common.exclude_file_regexp)); =0A=
 =0A=
+		vscan_config->common.exclude_re =3D NULL;=0A=
+=0A=
+		vscan_config->common.exclude_re =3D pcre_compile(=0A=
+		  vscan_config->common.exclude_file_regexp, /* the pattern */=0A=
+		  0,                      /* default options */=0A=
+		  &error,                 /* for error message */=0A=
+		  &erroffset,             /* for error offset */=0A=
+		  NULL);                  /* use default character tables */=0A=
+	=0A=
+		if (vscan_config->common.exclude_re =3D=3D NULL) {=0A=
+			DEBUG(0,("PCRE compilation failed at offset %d: %s\n", erroffset, =
error));=0A=
+			return False;=0A=
+		}=0A=
 	} else {=0A=
 		DEBUG(5, ("exclude regexp is empty - nothing to do\n"));	=0A=
 	} /* end if */=0A=
@@ -54,30 +63,16 @@=0A=
  *=0A=
 */=0A=
 =0A=
-int fileregexp_skipscan(pstring fname) {=0A=
-		if (strlen(fileregexp_excludepattern) > 0) {=0A=
+int fileregexp_skipscan(pstring fname, vscan_config_struct =
*vscan_config) {=0A=
+=0A=
+		if (strlen(vscan_config->common.exclude_file_regexp) > 0 && =
vscan_config->common.exclude_re !=3D NULL) {=0A=
 			int ovector[OVECCOUNT];=0A=
 			int rc;=0A=
-			pcre *exclude_re =3D NULL;=0A=
-			const char *error;=0A=
-			int erroffset;=0A=
-=0A=
-=0A=
-			exclude_re =3D pcre_compile(=0A=
-			  fileregexp_excludepattern, /* the pattern */=0A=
-			  0,                      /* default options */=0A=
-			  &error,                 /* for error message */=0A=
-			  &erroffset,             /* for error offset */=0A=
-			  NULL);                  /* use default character tables */=0A=
-	=0A=
-			if (exclude_re =3D=3D NULL) {=0A=
-				DEBUG(0,("PCRE compilation failed at offset %d: %s\n", erroffset, =
error));=0A=
-				return VSCAN_FR_ERROR_MUST_SCAN;=0A=
-			}=0A=
 =0A=
+			DEBUG(5, ("exclude regexp is: '%s'\n", =
vscan_config->common.exclude_file_regexp)); =0A=
 =0A=
 			rc =3D pcre_exec(=0A=
-			  exclude_re,                   /* the compiled pattern */=0A=
+			  vscan_config->common.exclude_re,                   /* the compiled =
pattern */=0A=
 			  NULL,                 /* no extra data - we didn't study the =
pattern */=0A=
 			  fname,              /* the subject string */=0A=
 			  strlen(fname),       /* the length of the subject */=0A=
@@ -92,7 +87,6 @@=0A=
 			  switch(rc) {=0A=
 			    case PCRE_ERROR_NOMATCH: =0A=
 				DEBUG(5,("No match\n")); =0A=
-				SAFE_FREE(exclude_re);=0A=
 				return VSCAN_FR_MUST_SCAN; =0A=
 				break;=0A=
 			    /*=0A=
@@ -100,14 +94,12 @@=0A=
 			    */=0A=
 			    default: =0A=
 				DEBUG(5,("Matching error %d\n", rc)); =0A=
-				SAFE_FREE(exclude_re);=0A=
 				return VSCAN_FR_ERROR_MUST_SCAN; =0A=
 				break;=0A=
 			    }=0A=
 		  	}=0A=
 		=0A=
 			/* Match succeded */=0A=
-			SAFE_FREE(exclude_re);=0A=
 			DEBUG(5,("matched!\n"));=0A=
 			return VSCAN_FR_SKIP_SCAN;=0A=
 		} /* end if */=0A=
@@ -116,18 +108,4 @@=0A=
 		return VSCAN_FR_MUST_SCAN;=0A=
 }=0A=
 =0A=
-#else /* HAVE_FILEREGEXP_SUPPORT */=0A=
-=0A=
-BOOL fileregexp_init (pstring filetype_excluderegexp)=0A=
-{=0A=
-	DEBUG(5,("Sorry, samba-vscan regexp-exclude support is not compiled =
in\n"));=0A=
-	return True;=0A=
-}=0A=
-=0A=
-int fileregexp_skipscan(pstring fname)=0A=
-{=0A=
-	DEBUG(10,("Sorry, samba-vscan regexp-exclude support is not compiled =
in\n"));	=0A=
-	return 0;=0A=
-}=0A=
 #endif=0A=
-=0A=
Dateien samba-vscan-0.3.7-orig/global/vscan-fileregexp.po und =
samba-vscan-0.3.7/global/vscan-fileregexp.po sind verschieden.=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/global/vscan-filetype.c =
samba-vscan-0.3.7/global/vscan-filetype.c=0A=
--- samba-vscan-0.3.7-orig/global/vscan-filetype.c	2005-07-23 =
16:47:46.000000000 +0200=0A=
+++ samba-vscan-0.3.7/global/vscan-filetype.c	2005-12-30 =
17:37:35.000000000 +0100=0A=
@@ -5,6 +5,8 @@=0A=
  *=0A=
  * Copyright (c) Rainer Link, 2003-2004=0A=
  *	         OpenAntiVirus.org <rainer-pBPPa8WU5k41Tgt60Rntydi2O/[email protected]>=0A=
+ * Copyright (C) Sven Strickroth, 2005=0A=
+ *               <[email protected]>=0A=
  *=0A=
  * This module is used to detected the MIME-type of a file by using =0A=
  * libmagic. It then decides whether a file must be scanned or not=0A=
@@ -19,19 +21,6 @@=0A=
 =0A=
 #ifdef HAVE_FILETYPE_SUPPORT=0A=
 =0A=
-#include "magic.h"=0A=
-=0A=
-=0A=
-/* pointer to magic :-) */=0A=
-static magic_t filetype_magic =3D NULL;=0A=
-=0A=
-/* contains the list of MIME-types which files should be excluded=0A=
-   from scanning */=0A=
-static pstring filetype_excludelist =3D "";=0A=
-=0A=
-/* indicates whether init libmagic was successfull or not */=0A=
-static BOOL filetype_init_magic =3D False;=0A=
-=0A=
 /** =0A=
  * initialise libmagic and load magic=0A=
  * @param flags		flags for libmagic, see man libmagic=0A=
@@ -39,13 +28,14 @@=0A=
  *=0A=
 */=0A=
 =0A=
-BOOL filetype_init (int flags, pstring exclude_list) {=0A=
+BOOL filetype_init (int flags, vscan_config_struct *vscan_config) {=0A=
 =0A=
-	pstrcpy(filetype_excludelist, exclude_list);=0A=
-	trim_string(filetype_excludelist, " ", " ");=0A=
-	=0A=
-	if ( strlen(filetype_excludelist) > 0 ) {=0A=
-		DEBUG(5, ("exclude list is: '%s'\n", filetype_excludelist)); =0A=
+	/* if (vscan_config->common.filetype_magic !=3D NULL) { DEBUG(5, =
("libmagic already loaded\n")); return 0; } */=0A=
+=0A=
+	trim_string(vscan_config->common.exclude_file_types, " ", " ");=0A=
+=0A=
+	if ( strlen(vscan_config->common.exclude_file_types) > 0 ) {=0A=
+		DEBUG(5, ("exclude list is: '%s'\n", =
vscan_config->common.exclude_file_types)); =0A=
 		=0A=
 		/* initialise libmagic */=0A=
 		DEBUG(5, ("initialise libmagic\n"));=0A=
@@ -53,27 +43,31 @@=0A=
 		flags |=3D MAGIC_MIME;=0A=
 		DEBUG(5, ("magic flags: %d\n", flags));=0A=
 =0A=
-		filetype_magic =3D magic_open(flags);=0A=
-		if ( filetype_magic =3D=3D NULL ) {=0A=
+		vscan_config->common.filetype_magic =3D magic_open(flags);=0A=
+		if ( vscan_config->common.filetype_magic =3D=3D NULL ) {=0A=
 			/* FIXME: probably we shouln't use vscan_syslog here */=0A=
 				vscan_syslog("could not initialise libmagic");=0A=
 		} else {=0A=
 			DEBUG(5, ("loading magic\n"));=0A=
-			/* NULL =3D load default file, probably we need another user =0A=
-			 * setting here to specifiy alternative magic files=0A=
-			 */=0A=
-			if ( magic_load(filetype_magic, NULL) !=3D 0 ) {	/* error */=0A=
-				vscan_syslog("%s", magic_error(filetype_magic));=0A=
+			int retval;=0A=
+			if (strlen(vscan_config->common.filetype_magicfile) > 0) {=0A=
+				DEBUG(5, ("trying to load %s =
magic-database\n",vscan_config->common.filetype_magicfile));=0A=
+				retval =3D magic_load(vscan_config->common.filetype_magic, =
vscan_config->common.filetype_magicfile);=0A=
+			} else {=0A=
+				DEBUG(5, ("trying to load default magic.mime file\n"));=0A=
+				retval =3D magic_load(vscan_config->common.filetype_magic, NULL);=0A=
+			}=0A=
+			if ( retval !=3D 0 ) {	/* error */=0A=
+				vscan_syslog("%s", =
magic_error(vscan_config->common.filetype_magic));=0A=
 			} else {=0A=
 				DEBUG(5, ("libmagic init and loading was successfull\n"));=0A=
-				filetype_init_magic =3D True;=0A=
 			} /* end if */=0A=
 		} /* end if */		=0A=
 	} else {=0A=
 		DEBUG(5, ("exclude list is empty - nothing to do\n"));	=0A=
 	} /* end if */=0A=
 =0A=
-	return filetype_init_magic;=0A=
+	return 0;=0A=
 =0A=
 } /* end function */=0A=
 =0A=
@@ -82,13 +76,14 @@=0A=
  * =0A=
 */=0A=
 =0A=
-void filetype_close(void) {=0A=
-	=0A=
-	if ( filetype_init_magic ) {=0A=
-		magic_close(filetype_magic);=0A=
-		filetype_init_magic =3D False;=0A=
+BOOL filetype_close(vscan_config_struct *vscan_config) {=0A=
+	if ( strlen(vscan_config->common.exclude_file_types) =3D=3D 0 || =
vscan_config->common.filetype_magic =3D=3D NULL) {=0A=
+		return 1;=0A=
 	}=0A=
 =0A=
+	magic_close(vscan_config->common.filetype_magic);=0A=
+=0A=
+	return 0;=0A=
 }=0A=
 =0A=
 =0A=
@@ -104,7 +99,7 @@=0A=
  *=0A=
 */=0A=
 =0A=
-int filetype_skipscan(pstring fname) {=0A=
+int filetype_skipscan(pstring fname, vscan_config_struct *vscan_config) =
{=0A=
 =0A=
 		/* as next_token modifies input */=0A=
 		pstring ex_list;=0A=
@@ -112,21 +107,16 @@=0A=
 		const char* p; /* needed to avoid compiler warning */=0A=
 		pstring ft_string, filetype_string;=0A=
 		char* p_ft;=0A=
-		=0A=
 =0A=
-		if ( !filetype_init_magic ) {=0A=
-			if ( strlen(filetype_excludelist) =3D=3D 0 ) {=0A=
-				DEBUG(5, ("exclude list is empty - feature disabled\n"));=0A=
-			} else {=0A=
-				DEBUG(5, ("libmagic init has failed  - feature disabled\n"));=0A=
-			}=0A=
-			return VSCAN_FT_ERROR_MUST_SCAN;=0A=
+		if ( strlen(vscan_config->common.exclude_file_types) =3D=3D 0 || =
vscan_config->common.filetype_magic =3D=3D NULL) {=0A=
+			DEBUG(5, ("exclude list is empty or libmagic init has failed - =
feature disabled\n"));=0A=
+			return VSCAN_FT_MUST_SCAN;=0A=
 		}=0A=
-		=0A=
+=0A=
 		/* get the file type */=0A=
-		pstrcpy(ft_string, magic_file(filetype_magic, fname));=0A=
+		pstrcpy(ft_string, magic_file(vscan_config->common.filetype_magic, =
fname));=0A=
 		if ( ft_string =3D=3D NULL ) {  /* error */=0A=
-			vscan_syslog("could not get file type, %s", =
magic_error(filetype_magic));=0A=
+			vscan_syslog("could not get file type, %s", =
magic_error(vscan_config->common.filetype_magic));=0A=
 			/* error occured */=0A=
 			return VSCAN_FT_ERROR_MUST_SCAN;=0A=
 		} /* end if */ =0A=
@@ -137,7 +127,7 @@=0A=
 		DEBUG(5, ("file type of file %s is %s\n", fname, filetype_string));	=0A=
 =0A=
 		/* next_token modifies input list, so copy it */=0A=
-		pstrcpy(ex_list, filetype_excludelist);=0A=
+		pstrcpy(ex_list, vscan_config->common.exclude_file_types);=0A=
 =0A=
 		/* to avoid compiler warnings */=0A=
 		p =3D ex_list;=0A=
@@ -158,24 +148,4 @@=0A=
 		return VSCAN_FT_MUST_SCAN;=0A=
 }=0A=
 =0A=
-#else /* HAVE_FILETYPE_SUPPORT */=0A=
-=0A=
-BOOL filetype_init (int flags, pstring exclude_list)=0A=
-{=0A=
-	DEBUG(5,("Sorry, samba-vscan filetype support is not compiled in\n"));=0A=
-	return True;=0A=
-}=0A=
-=0A=
-int filetype_skipscan(pstring fname)=0A=
-{=0A=
-	DEBUG(10,("Sorry, samba-vscan filetype support is not compiled =
in\n"));	=0A=
-	return 0;=0A=
-}=0A=
-=0A=
-=0A=
-void filetype_close(void)=0A=
-{=0A=
-	return;=0A=
-}=0A=
-=0A=
-#endif /* HAVE_FILETYPE_SUPPORT */=0A=
+#endif=0A=
Dateien samba-vscan-0.3.7-orig/global/vscan-filetype.po und =
samba-vscan-0.3.7/global/vscan-filetype.po sind verschieden.=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/global/vscan-functions.c =
samba-vscan-0.3.7/global/vscan-functions.c=0A=
--- samba-vscan-0.3.7-orig/global/vscan-functions.c	2005-07-23 =
16:47:46.000000000 +0200=0A=
+++ samba-vscan-0.3.7/global/vscan-functions.c	2005-12-29 =
02:14:26.000000000 +0100=0A=
@@ -145,7 +145,7 @@=0A=
   size_t addition =3D 0;=0A=
 =0A=
  if ( strlen(s) - 1  > MAX_ENC_LENGTH_STR ) /* avoid integer overflow */=0A=
-   return strdup(s);=0A=
+   return SMB_STRDUP(s);=0A=
 =0A=
 =0A=
   for (p1 =3D s; *p1; p1++)=0A=
@@ -153,15 +153,15 @@=0A=
       addition +=3D 2;            /* Two more characters (hex digits) */=0A=
 =0A=
   if (!addition)=0A=
-    return strdup(s);=0A=
+    return SMB_STRDUP(s);=0A=
 =0A=
   newlen =3D (p1 - s) + addition;=0A=
   if ( newlen <=3D 0 )     /* uhm, sth went wrong, return unencode =
string */=0A=
-       return strdup(s);=0A=
+       return SMB_STRDUP(s);=0A=
 =0A=
-  newstr =3D (char *)malloc (newlen + 1);=0A=
+  newstr =3D (char *)SMB_MALLOC (newlen + 1);=0A=
   if ( newstr =3D=3D NULL )        /* not enough memory, return =
unencode string */=0A=
-                return strdup(s);=0A=
+                return SMB_STRDUP(s);=0A=
 =0A=
   p1 =3D s;=0A=
   p2 =3D newstr;=0A=
Dateien samba-vscan-0.3.7-orig/global/vscan-functions.po und =
samba-vscan-0.3.7/global/vscan-functions.po sind verschieden.=0A=
Dateien samba-vscan-0.3.7-orig/global/vscan-message.po und =
samba-vscan-0.3.7/global/vscan-message.po sind verschieden.=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/global/vscan-parameter.c =
samba-vscan-0.3.7/global/vscan-parameter.c=0A=
--- samba-vscan-0.3.7-orig/global/vscan-parameter.c	2005-07-24 =
18:14:50.000000000 +0200=0A=
+++ samba-vscan-0.3.7/global/vscan-parameter.c	2005-12-30 =
17:23:21.000000000 +0100=0A=
@@ -5,6 +5,8 @@=0A=
  *=0A=
  * Copyright (C) Rainer Link, 2004=0A=
  *		 OpenAntiVirus.org <rainer-pBPPa8WU5k41Tgt60Rntydi2O/[email protected]>=0A=
+ * Copyright (C) Sven Strickroth, 2005=0A=
+ *               <[email protected]>=0A=
  *=0A=
  * This module is used to parse commonly-used parameters (i.e. which=0A=
  * are the same for most vscan-samba VFS module) from the corresponding=0A=
@@ -18,173 +20,97 @@=0A=
 #include "vscan-global.h"=0A=
 =0A=
 /**=0A=
- * set default values for common parameters=0A=
+ * parsing common parameters and values from config file=0A=
  *=0A=
- * @param vscan_config	structure containing common parameters=0A=
+ * @param vscan_config	containing common parameters=0A=
+ * @param param		the parameter=0A=
+ * @param value		the value=0A=
  *=0A=
 */=0A=
 =0A=
-=0A=
-void set_common_default_settings(vscan_config_struct *vscan_config)=0A=
+void do_common_parameter(connection_struct *conn, fstring module_name, =
vscan_config_struct *vscan_config)=0A=
 {=0A=
-	DEBUG(3, ("set_common_default_settings\n"));=0A=
+	DEBUG(3, ("do_common_parameter %s %s %s =
%s\n",module_name,conn->dirpath,conn->connectpath,conn->origpath));=0A=
 =0A=
-        /* set default value for max file size */=0A=
-        vscan_config->common.max_size =3D VSCAN_MAX_SIZE;=0A=
-	DEBUG(3, ("default max size: %d\n", vscan_config->common.max_size));=0A=
-=0A=
-        /* set default value for file logging */=0A=
-        vscan_config->common.verbose_file_logging =3D =
VSCAN_VERBOSE_FILE_LOGGING;=0A=
-	DEBUG(3, ("default verbose logging: %d\n", =
vscan_config->common.verbose_file_logging));=0A=
-=0A=
-        /* set default value for scan on open() */=0A=
-        vscan_config->common.scan_on_open =3D VSCAN_SCAN_ON_OPEN;=0A=
-	DEBUG(3, ("default scan on open: %d\n", =
vscan_config->common.scan_on_open));=0A=
-=0A=
-        /* set default value for scan on close() */=0A=
-        vscan_config->common.scan_on_close =3D VSCAN_SCAN_ON_CLOSE;=0A=
-	DEBUG(3, ("default value for scan on close: %d\n", =
vscan_config->common.scan_on_close));=0A=
-=0A=
-        /* set default value for deny access on error */=0A=
-        vscan_config->common.deny_access_on_error =3D =
VSCAN_DENY_ACCESS_ON_ERROR;=0A=
-	DEBUG(3, ("default value for deny access on error: %d\n", =
vscan_config->common.deny_access_on_error));=0A=
-=0A=
-        /* set default value for deny access on minor error */=0A=
-        vscan_config->common.deny_access_on_minor_error =3D =
VSCAN_DENY_ACCESS_ON_MINOR_ERROR;=0A=
-	DEBUG(3, ("default value for deny access on minor error: %d\n", =
vscan_config->common.deny_access_on_minor_error)); =0A=
-=0A=
-        /* set default value for send warning message */=0A=
-        vscan_config->common.send_warning_message =3D =
VSCAN_SEND_WARNING_MESSAGE;=0A=
-	DEBUG(3, ("default value send warning message: %d\n", =
vscan_config->common.send_warning_message));=0A=
-=0A=
-        /* set default value for infected file action */=0A=
-        vscan_config->common.infected_file_action =3D =
VSCAN_INFECTED_FILE_ACTION;=0A=
-	DEBUG(3, ("default value infected file action: %d\n", =
vscan_config->common.infected_file_action));=0A=
-=0A=
-        /* set default value for quarantine directory */=0A=
-        fstrcpy(vscan_config->common.quarantine_dir, =
VSCAN_QUARANTINE_DIRECTORY);=0A=
-	DEBUG(3, ("default value quarantine directory: %s\n", =
vscan_config->common.quarantine_dir));=0A=
-=0A=
-        /* set default value for quarantine prefix */=0A=
-        fstrcpy(vscan_config->common.quarantine_prefix, =
VSCAN_QUARANTINE_PREFIX);=0A=
-	DEBUG(3, ("default value for quarantine prefix: %s\n", =
vscan_config->common.quarantine_prefix));=0A=
-=0A=
-        /* set default value for maximum lrufile entries */=0A=
-        vscan_config->common.max_lrufiles =3D VSCAN_MAX_LRUFILES;=0A=
-	DEBUG(3, ("default value for max lrufile entries: %d\n", =
vscan_config->common.max_lrufiles));=0A=
-=0A=
-        /* time after an entry is considered as expired */=0A=
-        vscan_config->common.lrufiles_invalidate_time =3D =
VSCAN_LRUFILES_INVALIDATE_TIME;=0A=
-	DEBUG(3, ("default value for invalidate time: %d\n", =
vscan_config->common.lrufiles_invalidate_time));=0A=
-=0A=
-        /* file type exclude ist */=0A=
-        pstrcpy(vscan_config->common.exclude_file_types, =
VSCAN_FT_EXCLUDE_LIST);=0A=
-	DEBUG(3, ("default value for file type exclude: %s\n", =
vscan_config->common.exclude_file_types));=0A=
-=0A=
-	/* file regexp exclude regexp */=0A=
-	pstrcpy(vscan_config->common.exclude_file_regexp, =
VSCAN_FR_EXCLUDE_REGEXP);=0A=
-	DEBUG(3, ("default value for file regexep exclude: %s\n", =
vscan_config->common.exclude_file_regexp));=0A=
+	vscan_config->common.max_size =3D (ssize_t)lp_parm_ulong(SNUM(conn), =
module_name, "max file size", VSCAN_MAX_SIZE);=0A=
+	DEBUG(3, ("max file size is: %lld\n", (long =
long)vscan_config->common.max_size));=0A=
 =0A=
-}=0A=
+	vscan_config->common.verbose_file_logging =3D lp_parm_bool(SNUM(conn), =
module_name, "verbose file logging", VSCAN_VERBOSE_FILE_LOGGING);=0A=
+	DEBUG(3, ("verbose file logging is: %d\n", =
vscan_config->common.verbose_file_logging));=0A=
 =0A=
-/** =0A=
- * get name of configuration file=0A=
- *=0A=
- * @param conn		pointer to connection=0A=
- * @param module_name	name of samba-vscan module=0A=
- * @param paramconf	name of default configuration file=0A=
- * @return The correct configuration file=0A=
- *=0A=
-*/=0A=
-/* FIXME: should we use const here? Should we use **conn instead? */=0A=
+	vscan_config->common.scan_on_open =3D lp_parm_bool(SNUM(conn), =
module_name, "scan on open", VSCAN_SCAN_ON_OPEN);=0A=
+	DEBUG(3, ("scan on open is: %d\n", vscan_config->common.scan_on_open));=0A=
 =0A=
-const char* get_configuration_file(const connection_struct *conn, =
fstring module_name, fstring paramconf)=0A=
-{=0A=
-	static fstring config_file;=0A=
+	vscan_config->common.scan_on_close =3D lp_parm_bool(SNUM(conn), =
module_name, "scan on close", VSCAN_SCAN_ON_CLOSE);=0A=
+	DEBUG(3, ("scan on close is: %d\n", =
vscan_config->common.scan_on_close));=0A=
 =0A=
-	fstrcpy(config_file, =
lp_parm_const_string(SNUM(conn),module_name,"config-file",paramconf));=0A=
-	return config_file;=0A=
-}=0A=
+	vscan_config->common.deny_access_on_error =3D lp_parm_bool(SNUM(conn), =
module_name, "deny access on error", VSCAN_DENY_ACCESS_ON_ERROR);=0A=
+	DEBUG(3, ("deny access on error is: %d\n", =
vscan_config->common.deny_access_on_error));=0A=
 =0A=
+	vscan_config->common.deny_access_on_minor_error =3D =
lp_parm_bool(SNUM(conn), module_name, "deny access on minor error", =
VSCAN_DENY_ACCESS_ON_MINOR_ERROR);=0A=
+	DEBUG(3, ("deny access on minor error is: %d\n", =
vscan_config->common.deny_access_on_minor_error));=0A=
 =0A=
+	vscan_config->common.send_warning_message =3D lp_parm_bool(SNUM(conn), =
module_name, "send warning message", VSCAN_SEND_WARNING_MESSAGE);=0A=
+	DEBUG(3, ("send warning message is: %d\n", =
vscan_config->common.send_warning_message));=0A=
 =0A=
-/**=0A=
- * parsing common parameters and values from config file=0A=
- *=0A=
- * @param vscan_config	containing common parameters=0A=
- * @param param		the parameter=0A=
- * @param value		the value=0A=
- *=0A=
-*/=0A=
-=0A=
-BOOL do_common_parameter(vscan_config_struct *vscan_config, const char =
*param, const char *value)=0A=
-{=0A=
-	/* we assume we handled a common parameter */=0A=
-	BOOL ret =3D True;=0A=
-=0A=
-        if ( StrCaseCmp("max file size", param) =3D=3D 0 ) {=0A=
-                /* FIXME: sanity check missing! what, if value is out =
of range?=0A=
-                   atoi returns int - what about LFS? atoi should be =
avoided!=0A=
-                */=0A=
-		/* FIXME: changed atoi to atoll, but atoll might not be available=0A=
-		   on all platforms! */=0A=
-                vscan_config->common.max_size =3D atoll(value);=0A=
-                DEBUG(3, ("max file size is: %lld\n", (long =
long)vscan_config->common.max_size));=0A=
-        } else if ( StrCaseCmp("verbose file logging", param) =3D=3D 0 =
) {=0A=
-                set_boolean(&vscan_config->common.verbose_file_logging, =
value);=0A=
-                DEBUG(3, ("verbose file logging is: %d\n", =
vscan_config->common.verbose_file_logging));=0A=
-        } else if ( StrCaseCmp("scan on open", param) =3D=3D 0 ) {=0A=
-                set_boolean(&vscan_config->common.scan_on_open, value);=0A=
-                DEBUG(3, ("scan on open: %d\n", =
vscan_config->common.scan_on_open));=0A=
-        } else if ( StrCaseCmp("scan on close", param) =3D=3D 0 ) {=0A=
-                set_boolean(&vscan_config->common.scan_on_close, value);=0A=
-                DEBUG(3, ("scan on close is: %d\n", =
vscan_config->common.scan_on_close));=0A=
-        } else if ( StrCaseCmp("deny access on error", param) =3D=3D 0 =
) {=0A=
-                set_boolean(&vscan_config->common.deny_access_on_error, =
value);=0A=
-                DEBUG(3, ("deny access on error is: %d\n", =
vscan_config->common.deny_access_on_error));=0A=
-        } else if ( StrCaseCmp("deny access on minor error", param) =
=3D=3D 0 ) {=0A=
-                =
set_boolean(&vscan_config->common.deny_access_on_minor_error, value);=0A=
-                DEBUG(3, ("deny access on minor error is: %d\n", =
vscan_config->common.deny_access_on_minor_error));=0A=
-        } else if ( StrCaseCmp("send warning message", param) =3D=3D 0 =
) {=0A=
-                set_boolean(&vscan_config->common.send_warning_message, =
value);=0A=
-                DEBUG(3, ("send warning message is: %d\n", =
vscan_config->common.send_warning_message));=0A=
-        } else if ( StrCaseCmp("infected file action", param) =3D=3D 0 =
) {=0A=
-                if (StrCaseCmp("quarantine", value) =3D=3D 0) {=0A=
-                        vscan_config->common.infected_file_action =3D =
INFECTED_QUARANTINE;=0A=
-                } else if (StrCaseCmp("delete", value) =3D=3D 0) {=0A=
-                        vscan_config->common.infected_file_action =3D =
INFECTED_DELETE;=0A=
-                } else if (StrCaseCmp("nothing", value) =3D=3D 0) {=0A=
-                        vscan_config->common.infected_file_action =3D =
INFECTED_DO_NOTHING;=0A=
-                } else {=0A=
-                        DEBUG(2, ("samba-vscan: badly formed infected =
file action in configuration file, parameter %s\n", value));=0A=
-                }=0A=
-                DEBUG(3, ("infected file action is: %d\n", =
vscan_config->common.infected_file_action));=0A=
-        } else if ( StrCaseCmp("quarantine directory", param) =3D=3D 0 =
) {=0A=
-                fstrcpy(vscan_config->common.quarantine_dir, value);=0A=
-                DEBUG(3, ("quarantine directory is: %s\n", =
vscan_config->common.quarantine_dir));=0A=
-        } else if ( StrCaseCmp("quarantine prefix", param) =3D=3D 0 ) {=0A=
-                fstrcpy(vscan_config->common.quarantine_prefix, value);=0A=
-                DEBUG(3, ("quarantine prefix is: %s\n", =
vscan_config->common.quarantine_prefix));=0A=
-        } else if ( StrCaseCmp("max lru files entries", param) =3D=3D 0 =
) {=0A=
-                vscan_config->common.max_lrufiles =3D atoi(value);=0A=
-                DEBUG(3, ("max lru files entries is: %d\n", =
vscan_config->common.max_lrufiles));=0A=
-        } else if ( StrCaseCmp("lru file entry lifetime", param) =3D=3D =
0 ) {=0A=
-                vscan_config->common.lrufiles_invalidate_time =3D =
atol(value);=0A=
-                DEBUG(3, ("lru file entry lifetime is: %li\n", =
(long)vscan_config->common.lrufiles_invalidate_time));=0A=
-        } else if ( StrCaseCmp("exclude file types", param) =3D=3D 0 ) {=0A=
-                pstrcpy(vscan_config->common.exclude_file_types, value);=0A=
-                DEBUG(3, ("exclude file type list is: %s\n", =
vscan_config->common.exclude_file_types));=0A=
-	} else if ( StrCaseCmp("exclude file regexp", param) =3D=3D 0 ) {=0A=
-		pstrcpy(vscan_config->common.exclude_file_regexp, value);=0A=
-		DEBUG(3, ("exclude file regexp is: %s\n", =
vscan_config->common.exclude_file_regexp));=0A=
+	if (StrCaseCmp("quarantine", lp_parm_const_string(SNUM(conn), =
module_name, "infected file action", "")) =3D=3D 0) {=0A=
+		vscan_config->common.infected_file_action =3D INFECTED_QUARANTINE;=0A=
+	} else if (StrCaseCmp("delete", lp_parm_const_string(SNUM(conn), =
module_name, "infected file action", "")) =3D=3D 0) {=0A=
+		vscan_config->common.infected_file_action =3D INFECTED_DELETE;=0A=
+	} else if (StrCaseCmp("nothing", lp_parm_const_string(SNUM(conn), =
module_name, "infected file action", "")) =3D=3D 0) {=0A=
+		vscan_config->common.infected_file_action =3D INFECTED_DO_NOTHING;=0A=
+	} else if (StrCaseCmp("", lp_parm_const_string(SNUM(conn), =
module_name, "infected file action", "")) =3D=3D 0) {=0A=
+		vscan_config->common.infected_file_action =3D =
VSCAN_INFECTED_FILE_ACTION;=0A=
 	} else {=0A=
-		/* unknown common parameter, it must be handled by =0A=
-		   corresponding module */=0A=
-		DEBUG(5, ("unkown common parameter: %s\n", param));=0A=
-		ret =3D False;=0A=
+		DEBUG(2, ("samba-vscan: badly formed infected file action in =
configuration file, parameter %s\n", lp_parm_const_string(SNUM(conn), =
module_name, "infected file action", "")));=0A=
 	}=0A=
+	DEBUG(3, ("infected file action is: %d\n", =
vscan_config->common.infected_file_action));=0A=
+=0A=
+	fstrcpy(vscan_config->common.quarantine_dir, =
lp_parm_const_string(SNUM(conn), module_name, "quarantine directory", =
VSCAN_QUARANTINE_DIRECTORY));=0A=
+	DEBUG(3, ("quarantine directory is: %s\n", =
vscan_config->common.quarantine_dir));=0A=
 =0A=
-	return ret;=0A=
+	fstrcpy(vscan_config->common.quarantine_prefix, =
lp_parm_const_string(SNUM(conn), module_name, "quarantine prefix", =
VSCAN_QUARANTINE_PREFIX));=0A=
+	DEBUG(3, ("quarantine prefix is: %s\n", =
vscan_config->common.quarantine_prefix));=0A=
 =0A=
+	vscan_config->common.max_lrufiles =3D lp_parm_int(SNUM(conn), =
module_name, "max lru files entries", VSCAN_MAX_LRUFILES);=0A=
+	DEBUG(3, ("max lru files entries is: %d\n", =
vscan_config->common.max_lrufiles));=0A=
+=0A=
+	vscan_config->common.lrufiles_invalidate_time =3D =
(time_t)lp_parm_int(SNUM(conn), module_name, "lru file entry lifetime", =
VSCAN_LRUFILES_INVALIDATE_TIME);=0A=
+	DEBUG(3, ("lru file entry lifetime is: %li\n", =
(long)vscan_config->common.lrufiles_invalidate_time));=0A=
+=0A=
+#ifdef HAVE_FILETYPE_SUPPORT=0A=
+	pstrcpy(vscan_config->common.filetype_magicfile, =
lp_parm_const_string(SNUM(conn), module_name, "magic-mime file", =
VSCAN_FT_EXCLUDE_LIST_MAGICFILE));=0A=
+	DEBUG(3, ("magic-mime file is: %s\n", =
vscan_config->common.filetype_magicfile));=0A=
+=0A=
+	pstrcpy(vscan_config->common.exclude_file_types, =
lp_parm_const_string(SNUM(conn), module_name, "exclude file types", =
VSCAN_FT_EXCLUDE_LIST));=0A=
+	DEBUG(3, ("exclude file types is: %s\n", =
vscan_config->common.exclude_file_types));=0A=
+#endif=0A=
+#ifdef HAVE_FILEREGEXP_SUPPORT=0A=
+	pstrcpy(vscan_config->common.exclude_file_regexp, =
lp_parm_const_string(SNUM(conn), module_name, "exclude file regexp", =
VSCAN_FR_EXCLUDE_REGEXP));=0A=
+	DEBUG(3, ("exclude file regexp is: %s\n", =
vscan_config->common.exclude_file_regexp));=0A=
+#endif=0A=
 }=0A=
 =0A=
+void free_vscan_config(void **vscan_configp)=0A=
+{=0A=
+	vscan_config_struct *vscan_config =3D (vscan_config_struct =
*)*vscan_configp;=0A=
+=0A=
+	lrufiles_destroy_all();=0A=
+=0A=
+#ifdef HAVE_FILETYPE_SUPPORT=0A=
+	filetype_close(vscan_config);=0A=
+#endif=0A=
+=0A=
+	ZERO_STRUCTP(vscan_config->specific);=0A=
+=0A=
+	SAFE_FREE(vscan_config->specific);=0A=
+=0A=
+	ZERO_STRUCTP(vscan_config);=0A=
+=0A=
+	SAFE_FREE(vscan_config);=0A=
+=0A=
+	*vscan_configp =3D NULL;=0A=
+=0A=
+	DEBUG(10, ("FREED\n"));=0A=
+	return;=0A=
+}=0A=
Dateien samba-vscan-0.3.7-orig/global/vscan-parameter.po und =
samba-vscan-0.3.7/global/vscan-parameter.po sind verschieden.=0A=
Dateien samba-vscan-0.3.7-orig/global/vscan-quarantine.po und =
samba-vscan-0.3.7/global/vscan-quarantine.po sind verschieden.=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/include/vscan-fileregexp.h =
samba-vscan-0.3.7/include/vscan-fileregexp.h=0A=
--- samba-vscan-0.3.7-orig/include/vscan-fileregexp.h	2005-07-23 =
16:33:56.000000000 +0200=0A=
+++ samba-vscan-0.3.7/include/vscan-fileregexp.h	2005-12-30 =
03:33:51.000000000 +0100=0A=
@@ -1,7 +1,6 @@=0A=
 #ifndef __VSCAN_FILEREGEXP_H_=0A=
 #define __VSCAN_FILEREGEXP_H_=0A=
 =0A=
-=0A=
 /* actions */=0A=
 =0A=
 /* error occured; file must be scanned */=0A=
@@ -13,8 +12,7 @@=0A=
 #define VSCAN_FR_SKIP_SCAN 		 1=0A=
 =0A=
 =0A=
-BOOL fileregexp_init (pstring filetype_excluderegexp);=0A=
-void fileregexp_close(void);=0A=
-int fileregexp_skipscan(pstring fname);=0A=
+BOOL fileregexp_init (vscan_config_struct *vscan_config);=0A=
+int fileregexp_skipscan(pstring fname, vscan_config_struct =
*vscan_config);=0A=
 =0A=
 #endif /* __VSCAN_FILEREGEXP_H_ */=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/include/vscan-filetype.h =
samba-vscan-0.3.7/include/vscan-filetype.h=0A=
--- samba-vscan-0.3.7-orig/include/vscan-filetype.h	2005-07-23 =
16:33:56.000000000 +0200=0A=
+++ samba-vscan-0.3.7/include/vscan-filetype.h	2005-12-30 =
03:33:55.000000000 +0100=0A=
@@ -1,7 +1,6 @@=0A=
 #ifndef __VSCAN_FILETYPE_H_=0A=
 #define __VSCAN_FILETYPE_H_=0A=
 =0A=
-=0A=
 /* actions */=0A=
 =0A=
 /* error occured; file must be scanned */=0A=
@@ -13,8 +12,8 @@=0A=
 #define VSCAN_FT_SKIP_SCAN 		 1=0A=
 =0A=
 =0A=
-BOOL filetype_init (int flags, pstring exclude_list);=0A=
-void filetype_close(void);=0A=
-int filetype_skipscan(pstring fname);=0A=
+BOOL filetype_init (int flags, vscan_config_struct *vscan_config);=0A=
+BOOL filetype_close(vscan_config_struct *vscan_config);=0A=
+int filetype_skipscan(pstring fname, vscan_config_struct *vscan_config);=0A=
 =0A=
 #endif /* __VSCAN_FILETYPE_H_ */=0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/include/vscan-global.h =
samba-vscan-0.3.7/include/vscan-global.h=0A=
--- samba-vscan-0.3.7-orig/include/vscan-global.h	2005-07-23 =
17:09:11.000000000 +0200=0A=
+++ samba-vscan-0.3.7/include/vscan-global.h	2005-12-30 =
03:34:17.000000000 +0100=0A=
@@ -9,10 +9,14 @@=0A=
 #include "vscan-fileaccesslog.h"=0A=
 #include "vscan-message.h"=0A=
 #include "vscan-quarantine.h"=0A=
-#include "vscan-filetype.h"=0A=
 #include "vscan-parameter.h"=0A=
+#ifdef HAVE_FILETYPE_SUPPORT=0A=
+#include "vscan-filetype.h"=0A=
+#endif=0A=
 #include "vscan-scan.h"=0A=
+#ifdef HAVE_FILEREGEXP_SUPPORT=0A=
 #include "vscan-fileregexp.h"=0A=
+#endif=0A=
 =0A=
 #define CLIENT_IP_SIZE 18=0A=
 =0A=
diff -x ltmain.sh -x tst -x Makefile -xconfig.guess -xconfig.log =
-xconfig.status -xconfig.sub -xconfigure -xvscan-config.h =
-xvscan-config.h.in -x .cvsignore -x autom4te.cache -Nur =
samba-vscan-0.3.7-orig/include/vscan-parameter.h =
samba-vscan-0.3.7/include/vscan-parameter.h=0A=
--- samba-vscan-0.3.7-orig/include/vscan-parameter.h	2005-07-24 =
18:14:50.000000000 +0200=0A=
+++ samba-vscan-0.3.7/include/vscan-parameter.h	2005-12-30 =
17:27:25.000000000 +0100=0A=
@@ -6,7 +6,7 @@=0A=
 /* False =3D log only infected file, True =3D log every file access */=0A=
 =0A=
 #ifndef VSCAN_VERBOSE_FILE_LOGGING=0A=
-# define VSCAN_VERBOSE_FILE_LOGGING False   =0A=
+# define VSCAN_VERBOSE_FILE_LOGGING False=0A=
 #endif=0A=
 =0A=
 /* if a file is bigger than VSCAN_MAX_SIZE it won't be scanned. Has to =
be=0A=
@@ -20,13 +20,13 @@=0A=
 /* True =3D scan files on open */=0A=
 =0A=
 #ifndef VSCAN_SCAN_ON_OPEN =0A=
-# define VSCAN_SCAN_ON_OPEN True =0A=
+# define VSCAN_SCAN_ON_OPEN True=0A=
 #endif=0A=
 =0A=
 /* True =3D scan files on close */=0A=
 =0A=
 #ifndef VSCAN_SCAN_ON_CLOSE=0A=
-# define VSCAN_SCAN_ON_CLOSE True =0A=
+# define VSCAN_SCAN_ON_CLOSE True=0A=
 #endif=0A=
 =0A=
 =0A=
@@ -49,7 +49,7 @@=0A=
 #endif=0A=
 =0A=
 /* default infected file action */=0A=
-#define VSCAN_INFECTED_FILE_ACTION INFECTED_QUARANTINE=0A=
+#define VSCAN_INFECTED_FILE_ACTION INFECTED_DO_NOTHING=0A=
 =0A=
 /* default quarantine settings; hopefully the user changes this */=0A=
 #define VSCAN_QUARANTINE_DIRECTORY "/tmp"=0A=
@@ -61,12 +61,23 @@=0A=
 /* time after an entry is considered as expired */=0A=
 #define VSCAN_LRUFILES_INVALIDATE_TIME 5=0A=
 =0A=
+#ifdef HAVE_FILETYPE_SUPPORT=0A=
+#include "magic.h"=0A=
+=0A=
+/* MIME-type magic-file, NULL =3D use default */=0A=
+#define VSCAN_FT_EXCLUDE_LIST_MAGICFILE ""=0A=
+=0A=
 /* MIME-types of files to be exluded from scanning; that's an=0A=
    semi-colon seperated list */=0A=
 #define VSCAN_FT_EXCLUDE_LIST ""=0A=
+#endif=0A=
+=0A=
+#ifdef HAVE_FILEREGEXP_SUPPORT=0A=
+#include <pcre.h>=0A=
 =0A=
 /* PCRE pattern to exclude files based on (path-) filename */=0A=
 #define VSCAN_FR_EXCLUDE_REGEXP ""=0A=
+#endif=0A=
 =0A=
 /* end configuration section. Do not change anything below=0A=
    unless you know what you're doing :)=0A=
@@ -101,12 +112,18 @@=0A=
                                                     of an entry is =
expired and entry will be invalidated */=0A=
                 pstring exclude_file_types;     /* list of file types =
which should be excluded from scanning */=0A=
                 pstring exclude_file_regexp;     /* regexp which should =
be excluded from scanning */=0A=
+#ifdef HAVE_FILEREGEXP_SUPPORT=0A=
+                pcre *exclude_re;=0A=
+#endif=0A=
+#ifdef HAVE_FILETYPE_SUPPORT=0A=
+                pstring filetype_magicfile; /* mime-type magic-file */=0A=
+                magic_t filetype_magic;=0A=
+#endif=0A=
         } common;=0A=
 	void* specific;=0A=
 } vscan_config_struct;=0A=
 =0A=
-BOOL do_common_parameter(vscan_config_struct *vscan_config, const char =
*param, const char *value);=0A=
-void set_common_default_settings(vscan_config_struct *vscan_config);=0A=
-const char* get_configuration_file(const connection_struct *conn, =
fstring module_name, fstring paramconf);=0A=
+void do_common_parameter(connection_struct *conn, fstring module_name, =
vscan_config_struct *vscan_config);=0A=
+void free_vscan_config(void **free_vscan_configp);=0A=
 =0A=
 #endif /* __VSCAN_PARAMETER_H_ */=0A=
Dateien samba-vscan-0.3.7-orig/vscan-clamav.so und =
samba-vscan-0.3.7/vscan-clamav.so sind verschieden.=0A=

------=_NextPart_000_002D_01C60D66.B6C8B530--



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click