1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-clamav-1.2.0/root/sbin/e-smith/smeserver-clamscan mezzanine_patched_smeserver-clamav-1.2.0/root/sbin/e-smith/smeserver-clamscan |
2 |
--- smeserver-clamav-1.2.0/root/sbin/e-smith/smeserver-clamscan 2006-12-13 03:43:25.000000000 -0700 |
3 |
+++ mezzanine_patched_smeserver-clamav-1.2.0/root/sbin/e-smith/smeserver-clamscan 2006-12-13 03:43:20.000000000 -0700 |
4 |
@@ -29,6 +29,8 @@ |
5 |
|
6 |
my $MailReport = $db->get_prop("clamav", "FilesystemScanReportTo") || 'admin'; |
7 |
|
8 |
+my $ArchiveRatio = $db->get_prop("clamav", "ArchiveMaxCompressionRatio") || 0; |
9 |
+ |
10 |
my $clamscan_opts = " --recursive --infected --stdout" . |
11 |
" --log /var/log/clamd/clamscan.log"; |
12 |
|
13 |
@@ -42,10 +44,18 @@ |
14 |
|
15 |
$clamscan_opts .= " --exclude=$_" for (@exclude); |
16 |
|
17 |
+$clamscan_opts .= " --max-ratio=$ArchiveRatio"; |
18 |
+ |
19 |
+$clamscan_opts .= " --no-html" |
20 |
+ if ($db->get_prop("clamav", "ScanHTML") || "yes") eq "no"; |
21 |
+ |
22 |
+$clamscan_opts .= " --no-mail" |
23 |
+ if ($db->get_prop("clamav", "ScanMail") || "yes") eq "no"; |
24 |
+ |
25 |
$clamscan_opts .= " --move=$quarantine_dir" |
26 |
if ($db->get_prop("clamav", "Quarantine") || "disabled") eq "enabled"; |
27 |
|
28 |
-open CLAMSCAN, "-|", "nice /usr/bin/clamscan $clamscan_opts $filesystems 2>\&1"; |
29 |
+open CLAMSCAN, "-|", "nice /usr/bin/clamscan $clamscan_opts $filesystems 2> /var/log/clamd/smeserver-clamscan.log"; |
30 |
|
31 |
my @report = <CLAMSCAN>; |
32 |
close CLAMSCAN; |