samba-vscan/antivir vscan-antivir.c, 1.1.2.6, 1.1.2.7 vscan-antivir.conf, 1.1.2.4, 1.1.2.5 vscan-antivir_core.c, 1.1.2.5, 1.1.2.6
Rainer Link <[email protected]> Sat, 17 Mar 2007 10:17:03 +0000
| Newsgroups | gmane.comp.security.virus.openantivirus.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/openantivirus/samba-vscan/antivir
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29785
Modified Files:
Tag: VSCAN_0_3
vscan-antivir.c vscan-antivir.conf vscan-antivir_core.c
Log Message:
added scanmode feature
Index: vscan-antivir_core.c
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/antivir/Attic/vscan-antivir_core.c,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- vscan-antivir_core.c 13 Apr 2006 09:59:04 -0000 1.1.2.5
+++ vscan-antivir_core.c 17 Mar 2007 10:16:58 -0000 1.1.2.6
@@ -47,6 +47,7 @@
extern int antivir_detect_pms;
extern int antivir_detect_spy;
extern int antivir_detect_alltypes;
+extern fstring antivir_scan_mode;
/* used to manage the scanner process */
static int conn_count = 0;
@@ -289,6 +290,7 @@
char buff[256];
struct timeval tv;
int fd;
+ char printbuff[40];
/*
* check if the scanner process is alive (handles dangling
@@ -344,8 +346,12 @@
execargc = 0;
ADD_CMD_WORD(antivir_program_name);
ADD_CMD_WORD("--samba-vscan");
+ snprintf(printbuff, sizeof(printbuff), "--with-scan-mode=%s", antivir_scan_mode);
+ /* FIXME: for testing only */
+ vscan_syslog("antivir scan mode param is: %s", printbuff);
+ ADD_CMD_WORD(printbuff);
+
if (antivir_arch_scan_enable) {
- char printbuff[40];
ADD_CMD_WORD("--scan-in-archive");
/* for some reason the %z format spec did not work :( */
Index: vscan-antivir.conf
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/antivir/Attic/vscan-antivir.conf,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -d -r1.1.2.4 -r1.1.2.5
--- vscan-antivir.conf 10 Apr 2005 15:22:50 -0000 1.1.2.4
+++ vscan-antivir.conf 17 Mar 2007 10:16:58 -0000 1.1.2.5
@@ -87,3 +87,6 @@
; a cumulative switch to enable *all* of the above categories
antivir detect alltypes = no
+; scanning mode, either extlist, smart or all
+antivir scan mode = smart
+
Index: vscan-antivir.c
===================================================================
RCS file: /cvsroot/openantivirus/samba-vscan/antivir/Attic/vscan-antivir.c,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -d -r1.1.2.6 -r1.1.2.7
--- vscan-antivir.c 13 Apr 2006 09:59:04 -0000 1.1.2.6
+++ vscan-antivir.c 17 Mar 2007 10:16:58 -0000 1.1.2.7
@@ -66,6 +66,8 @@
BOOL antivir_detect_spy;
BOOL antivir_detect_alltypes;
+fstring antivir_scan_mode; /* scan mode, either extlist, smart or all */
+
/* module version */
static const char module_id[]=VSCAN_MODULE_STR" "SAMBA_VSCAN_VERSION_STR;
@@ -74,39 +76,47 @@
{
if ( do_common_parameter(&vscan_config, param, value) == False ) {
/* parse VFS module specific configuration values */
- if ( StrCaseCmp("antivir program name", param) == 0) {
+ if ( StrCaseCmp("antivir program name", param) == 0 ) {
fstrcpy(antivir_program_name, value);
DEBUG(3, ("antivir program name is %s\n", antivir_program_name));
} else if ( StrCaseCmp("antivir scan in archive", param) == 0) {
set_boolean(&antivir_arch_scan_enable, value);
DEBUG(3, ("antivir scan in archive is %d\n", antivir_arch_scan_enable));
- } else if ( StrCaseCmp("antivir max ratio in archive", param) == 0) {
+ } else if ( StrCaseCmp("antivir max ratio in archive", param) == 0 ) {
antivir_arch_max_ratio = atoi(value);
DEBUG(3, ("antivir max ratio in archive is %d\n", antivir_arch_max_ratio));
- } else if ( StrCaseCmp("antivir max archived file size", param) == 0) {
+ } else if ( StrCaseCmp("antivir max archived file size", param) == 0 ) {
antivir_arch_max_size = atoll(value);
DEBUG(3, ("antivir max archived file size is %lld\n", (long long)antivir_arch_max_size));
- } else if ( StrCaseCmp("antivir max recursion level", param) == 0) {
+ } else if ( StrCaseCmp("antivir max recursion level", param) == 0 ) {
antivir_arch_max_recursion = atoi(value);
DEBUG(3, ("antivir max recursion level is %d\n", antivir_arch_max_recursion));
- } else if ( StrCaseCmp("antivir detect dialer", param) == 0) {
+ } else if ( StrCaseCmp("antivir detect dialer", param) == 0 ) {
set_boolean(&antivir_detect_dialer, value);
DEBUG(3, ("antivir detect dialer is %d\n", antivir_detect_dialer));
- } else if ( StrCaseCmp("antivir detect game", param) == 0) {
+ } else if ( StrCaseCmp("antivir detect game", param) == 0 ) {
set_boolean(&antivir_detect_game, value);
DEBUG(3, ("antivir detect game is %d\n", antivir_detect_game));
- } else if ( StrCaseCmp("antivir detect joke", param) == 0) {
+ } else if ( StrCaseCmp("antivir detect joke", param) == 0 ) {
set_boolean(&antivir_detect_joke, value);
DEBUG(3, ("antivir detect joke is %d\n", antivir_detect_joke));
- } else if ( StrCaseCmp("antivir detect pms", param) == 0) {
+ } else if ( StrCaseCmp("antivir detect pms", param) == 0 ) {
set_boolean(&antivir_detect_pms, value);
DEBUG(3, ("antivir detect pms is %d\n", antivir_detect_pms));
- } else if ( StrCaseCmp("antivir detect spy", param) == 0) {
+ } else if ( StrCaseCmp("antivir detect spy", param) == 0 ) {
set_boolean(&antivir_detect_spy, value);
DEBUG(3, ("antivir detect spy is %d\n", antivir_detect_spy));
- } else if ( StrCaseCmp("antivir detect alltypes", param) == 0) {
+ } else if ( StrCaseCmp("antivir detect alltypes", param) == 0 ) {
set_boolean(&antivir_detect_alltypes, value);
DEBUG(3, ("antivir detect alltypes is %d\n", antivir_detect_alltypes));
+ } else if ( StrCaseCmp("antivir scan mode", param) == 0 ) {
+ fstrcpy(antivir_scan_mode, value);
+ trim_string(antivir_scan_mode, " ", " ");
+ if ( ( StrCaseCmp("extlist", antivir_scan_mode) != 0 ) && ( StrCaseCmp("smart", antivir_scan_mode) != 0 ) && ( StrCaseCmp("all", antivir_scan_mode) != 0 ) ) {
+ DEBUG(3, ("wrong antivir scan mode, now set to 'smart'\n"));
+ fstrcpy(antivir_scan_mode, "smart");
+ }
+ DEBUG(3, ("antivir scan mode is %s\n", antivir_scan_mode));
} else
DEBUG(3, ("unknown parameter: %s\n", param));
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV