[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Tomasz Kojm tkojm at clamav.net
Sun Apr 4 01:18:34 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit d32e0d942365d6a857120cb6c2cb34209fa27123
Author: Tomasz Kojm <tkojm at clamav.net>
Date:   Tue Feb 2 14:23:40 2010 +0100

    freshclam: new option Bytecode

diff --git a/ChangeLog b/ChangeLog
index 6c5b198..58d37f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Feb  2 14:23:18 CET 2010 (tk)
+---------------------------------
+ * freshclam: new option Bytecode
+
 Mon Feb  1 19:25:45 CET 2010 (tk)
 ---------------------------------
  * sigtool: add support for bytecode.cvd
diff --git a/etc/freshclam.conf b/etc/freshclam.conf
index 3b0de6b..a481334 100644
--- a/etc/freshclam.conf
+++ b/etc/freshclam.conf
@@ -173,3 +173,8 @@ DatabaseMirror database.clamav.net
 # and http://safebrowsing.clamav.net for more information.
 # Default: disabled
 #SafeBrowsing yes
+
+# This option enables downloading of bytecode.cvd, which includes additional
+# detection mechanisms and improvements to the ClamAV engine.
+# Default: enabled
+#Bytecode yes
diff --git a/freshclam/manager.c b/freshclam/manager.c
index 5159af1..c3cdc88 100644
--- a/freshclam/manager.c
+++ b/freshclam/manager.c
@@ -1859,6 +1859,31 @@ int downloadmanager(const struct optstruct *opts, const char *hostname, const ch
     } else if(ret == 0)
 	updated = 1;
 
+    if(!optget(opts, "Bytecode")->enabled) {
+	    const char *dbname = NULL;
+
+	if(!access("bytecode.cvd", R_OK))
+	    dbname = "bytecode.cvd";
+	else if(!access("bytecode.cld", R_OK))
+            dbname = "bytecode.cld";
+
+	if(dbname) {
+	    if(unlink(dbname))
+		logg("^Bytecode is disabled but can't remove old %s\n", dbname);
+	    else
+		logg("*%s removed\n", dbname);
+	}
+    } else if((ret = updatedb("bytecode", hostname, ipaddr, &signo, opts, dnsreply, localip, outdated, &mdat, logerr)) > 50) {
+	if(dnsreply)
+	    free(dnsreply);
+
+	if(newver)
+	    free(newver);
+
+	mirman_write("mirrors.dat", &mdat);
+	return ret;
+    } else if(ret == 0)
+	updated = 1;
     if(dnsreply)
 	free(dnsreply);
 
diff --git a/shared/optparser.c b/shared/optparser.c
index d4d430a..89e4ac5 100644
--- a/shared/optparser.c
+++ b/shared/optparser.c
@@ -372,6 +372,8 @@ const struct clam_option __clam_options[] = {
 
     { "SafeBrowsing", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_FRESHCLAM, "This option enables support for Google Safe Browsing. When activated for\nthe first time, freshclam will download a new database file (safebrowsing.cvd)\nwhich will be automatically loaded by clamd and clamscan during the next\nreload, provided that the heuristic phishing detection is turned on. This\ndatabase includes information about websites that may be phishing sites or\npossible sources of malware. When using this option, it's mandatory to run\nfreshclam at least every 30 minutes.\nFreshclam uses the ClamAV's mirror infrastructure to distribute the\ndatabase and its updates but all the contents are provided under Google's\nterms of use. See http://code.google.com/support/bin/answer.py?answer=70015\nand http://safebrowsing.clamav.net for more information.", "yes" },
 
+    { "Bytecode", NULL, 0, TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_FRESHCLAM, "This option enables downloading of bytecode.cvd, which includes additional\ndetection mechanisms and improvements to the ClamAV engine.", "yes" },
+
     /* Deprecated options */
 
     { "MailMaxRecursion", NULL, 0, TYPE_NUMBER, NULL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", "" },

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list