https://bugs.koozali.org/show_bug.cgi?id=11820
Terry Fage <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |VERIFIED
--- Comment #3 from Terry Fage <[email protected]> ---
[root@sme10testvm ~]# rpm -q smeserver-dl
smeserver-dl-0.2.3-6.el7.sme.noarch
[root@sme10testvm ~]# cd /var/run/clamd
[root@sme10testvm clamd]# ll
total 4
-rw-rw-r-- 1 root root 5 Dec 22 20:05 clamd.pid
srw-rw-rw- 1 clamscan clamscan 0 Dec 22 20:07 clamd.socket
[root@sme10testvm clamd]# cat /etc/e-smith/templates/etc/dl.php/60ClamScan
{
my $clam = $clamd{'status'} || 'disabled';
return '' unless ($clam eq 'enabled');
my $max = $clamav{StreamMaxLength} || '25M';
my $limit = $max;
$limit =~ s/[KMG]$//;
if ($max =~ m/G$/){
$limit = $limit * 1024 * 1024 * 1024;
}
elsif ($max =~ m/M$/){
$limit = $limit * 1024 * 1024;
}
elsif ($max =~ m/K$/){
$limit = $limit * 1024;
}
# 1MB of margin to be sure we don't go over clamd limit
$limit -= 1024 * 1024;
$OUT .=<<"EOF";
\$clamdSocket = 'unix:///var/run/clam/clamd.socket';
\$scanMax = $limit;
EOF
}
[root@sme10testvm ~]# yum update smeserver-dl --enablerepo=smetest
Loaded plugins: fastestmirror, post-transaction-actions, priorities, smeserver
----snip---
Migrating existing database backups
Creating temporary event 'temp' and populating it...
Adding actions to execute
Adding templates to expand
Adding services to adjust
Executing signal-event temp ...........
Reload yum db for server-manager
Verifying : 9:smeserver-dl-0.2.3-7.el7.sme.noarch
1/2
Verifying : 9:smeserver-dl-0.2.3-6.el7.sme.noarch
2/2
Updated:
smeserver-dl.noarch 9:0.2.3-7.el7.sme
Complete!
[root@sme10testvm ~]# rpm -q smeserver-dl
smeserver-dl-0.2.3-7.el7.sme.noarch
[root@sme10testvm ~]# cat /etc/e-smith/templates/etc/dl.php/60ClamScan
{
my $clam = $clamd{'status'} || 'disabled';
return '' unless ($clam eq 'enabled');
my $max = $clamav{StreamMaxLength} || '25M';
my $limit = $max;
$limit =~ s/[KMG]$//;
if ($max =~ m/G$/){
$limit = $limit * 1024 * 1024 * 1024;
}
elsif ($max =~ m/M$/){
$limit = $limit * 1024 * 1024;
}
elsif ($max =~ m/K$/){
$limit = $limit * 1024;
}
# 1MB of margin to be sure we don't go over clamd limit
$limit -= 1024 * 1024;
$OUT .=<<"EOF";
\$clamdSocket = 'unix:///var/run/clamd/clamd.socket';
\$scanMax = $limit;
EOF
}
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/