]> git.proxmox.com Git - pmg-api.git/commitdiff
freshclam.conf.in: make ScriptedUpdates a variable
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 3 Apr 2020 17:57:59 +0000 (19:57 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 14 Apr 2020 08:29:44 +0000 (10:29 +0200)
The 'ScriptedUpdate' setting in freshclam.conf (5) defines whether signature
updates should be fetched incrementally or whether the whole database should
be downloaded.

Since the upgrade of clamav to 0.102.1 led to some problems when downloading
the complete file [0], and some users who switched to incremental updates
later had problems with that, it seems the most comfortable and futureproof
solution is to have a simple way for users to selectively switch to
whichever mechanism works. AFAIR signature downloads of clamav also had
similar problems in previous versions.

Additionally the rendered boolean value was changed from 'yes' to 'true',
to be a bit more consistent with the other booleans in our template.

[0] https://blog.clamav.net/2020/02/clamav-01022-security-patch-released.html

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/Config.pm
src/templates/freshclam.conf.in

index 4a0ca2c71a119ca0aaa4545ed94fbb15318b3573..458d88e984b621b7c3220dd729ca6f4044a156e2 100755 (executable)
@@ -387,6 +387,11 @@ sub properties {
            type => 'boolean',
            default => 1
        },
+       scriptedupdates => {
+           description => "Enables ScriptedUpdates (incremental download of signatures)",
+           type => 'boolean',
+           default => 0
+       },
     };
 }
 
@@ -400,6 +405,7 @@ sub options {
        dbmirror => { optional => 1 },
        maxcccount => { optional => 1 },
        safebrowsing => { optional => 1 },
+       scriptedupdates => { optional => 1},
     };
 }
 
index 5119ef0ce5d7769157804c0f4591d95cf376a665..14e857375bad13da9d5f447a80f310b5b46a47fc 100644 (file)
@@ -12,7 +12,7 @@ PidFile /var/run/clamav/freshclam.pid
 DatabaseMirror [% pmg.clamav.dbmirror %]
 ConnectTimeout 30
 ReceiveTimeout 30
-ScriptedUpdates no
+ScriptedUpdates [% IF pmg.clamav.scriptedupdates %]true[% ELSE %]false[% END %]
 CompressLocalDatabase no
 NotifyClamd /etc/clamav/clamd.conf
 Bytecode true