samba-vscan/include vscan-parameter.h,1.1.2.1,1.1.2.2

Rainer Link <[email protected]> Sun, 26 Sep 2004 16:20:21 +0000
Newsgroups gmane.comp.security.virus.openantivirus.cvs
Message-ID <[email protected]>
Update of /cvsroot/openantivirus/samba-vscan/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23231/include

Modified Files:
      Tag: VSCAN_0_3
	vscan-parameter.h 
Log Message:
some more code re-org; move parsing of configuration to a dedicated
module


Index: vscan-parameter.h
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/include/Attic/vscan-parameter.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- vscan-parameter.h	2 May 2004 19:45:31 -0000	1.1.2.1
+++ vscan-parameter.h	26 Sep 2004 16:20:18 -0000	1.1.2.2
@@ -1,6 +1,81 @@
 #ifndef __VSCAN_PARAMETER_H_
 #define __VSCAN_PARAMETER_H_
 
+/* begin configuration section */
+
+/* default location of samba-style configuration file (needs Samba >= 2.2.4
+ or Samba 3.0 */
+
+#define PARAMCONF "/etc/samba/vscan-oav.conf"
+
+
+/* False = log only infected file, True = log every file access */
+
+#ifndef VSCAN_VERBOSE_FILE_LOGGING
+# define VSCAN_VERBOSE_FILE_LOGGING False   
+#endif
+
+/* if a file is bigger than VSCAN_MAX_SIZE it won't be scanned. Has to be
+   specified in bytes! If it set to 0, the file size check is disabled */
+
+#ifndef VSCAN_MAX_SIZE 
+# define VSCAN_MAX_SIZE 0 
+#endif
+
+
+/* True = scan files on open */
+
+#ifndef VSCAN_SCAN_ON_OPEN 
+# define VSCAN_SCAN_ON_OPEN True 
+#endif
+
+/* True = scan files on close */
+
+#ifndef VSCAN_SCAN_ON_CLOSE
+# define VSCAN_SCAN_ON_CLOSE True 
+#endif
+
+
+/* True = deny access in case of virus scanning failure */
+
+#ifndef VSCAN_DENY_ACCESS_ON_ERROR
+# define VSCAN_DENY_ACCESS_ON_ERROR True
+#endif 
+
+/* True = deny access in case of minor virus scanning failure */
+
+#ifndef VSCAN_DENY_ACCESS_ON_MINOR_ERROR
+# define VSCAN_DENY_ACCESS_ON_MINOR_ERROR True
+#endif
+
+/* True = send a warning message via window messenger service for viruses found */
+
+#ifndef VSCAN_SEND_WARNING_MESSAGE
+# define VSCAN_SEND_WARNING_MESSAGE True
+#endif
+
+/* default infected file action */
+#define VSCAN_INFECTED_FILE_ACTION INFECTED_QUARANTINE
+
+/* default quarantine settings; hopefully the user changes this */
+#define VSCAN_QUARANTINE_DIRECTORY "/tmp"
+#define VSCAN_QUARANTINE_PREFIX    "vir-"
+
+/* set default value for maximum lrufile entries */
+#define VSCAN_MAX_LRUFILES 100
+
+/* time after an entry is considered as expired */
+#define VSCAN_LRUFILES_INVALIDATE_TIME 5
+
+/* MIME-types of files to be exluded from scanning; that's an
+   semi-colon seperated list */
+#define VSCAN_FT_EXCLUDE_LIST ""
+
+
+/* end configuration section. Do not change anything below
+   unless you know what you're doing :)
+*/
+
 typedef struct {
 	struct {
                 ssize_t max_size;               /* do not scan files greater than max_size
@@ -34,6 +109,12 @@
 } vscan_config_struct;
 
 BOOL do_common_parameter(vscan_config_struct *vscan_config, const char *param, const char *value);
+void set_common_default_settings(vscan_config_struct *vscan_config);
+#if (SMB_VFS_INTERFACE_VERSION >= 6)
+const char* get_configuration_file(connection_struct *conn, fstring module_name);
+#else
+const char* get_configuration_file(struct connection_struct *conn, fstring module_name);
+#endif
 
 
 #endif /* __VSCAN_PARAMETER_H_ */



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php