initial commit of file from CVS for smeserver-clamav on Mon 10 Jul 08:35:52 BST 2023
This commit is contained in:
parent
bfd6d39c86
commit
8a58bd853d
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
*.rpm
|
||||
*.log
|
||||
*spec-20*
|
||||
*.tar.xz
|
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
# Makefile for source rpm: smeserver-clamav
|
||||
# $Id: Makefile,v 1.1 2016/02/05 23:45:20 stephdl Exp $
|
||||
NAME := smeserver-clamav
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
21
README.md
21
README.md
@ -1,3 +1,20 @@
|
||||
# smeserver-clamav
|
||||
# <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> smeserver-clamav
|
||||
|
||||
SMEServer Koozali developed git repo for smeserver-clamav smeserver
|
||||
SMEServer Koozali developed git repo for smeserver-clamav smeserver
|
||||
|
||||
## Wiki
|
||||
<br />https://wiki.koozali.org/Clamav:ConfigurationOptions
|
||||
<br />https://wiki.koozali.org/Clamav_unofficial_sigs
|
||||
<br />https://wiki.koozali.org/Clamav:freshclam_update
|
||||
<br />https://wiki.koozali.org/Esmith::FormMagick::Panel::clamav
|
||||
|
||||
## Bugzilla
|
||||
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-clamav&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
||||
|
||||
## Description
|
||||
|
||||
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
|
||||
*Once it has been checked, then this comment will be deleted*
|
||||
<br />
|
||||
|
||||
ClamAV is open source software that provides a powerful antivirus engine for detecting and removing malicious threats such as viruses, trojans, worms, and other malicious software. It can be used as both a standalone antivirus solution as well as an integrated antivirus solution with other security products. It features a regularly updated virus signature database, heuristics scanning, rootkit detection, and advanced rule-based detection. Additionally, it offers a high level of customization, allowing users to tailor the antivirus engine to their specific needs. ClamAV also provides a simple-to-use web-based management console, allowing users to manage ClamAV security features and settings with ease.
|
||||
|
1
contriborbase
Normal file
1
contriborbase
Normal file
@ -0,0 +1 @@
|
||||
sme10
|
65
createlinks
Normal file
65
createlinks
Normal file
@ -0,0 +1,65 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use esmith::Build::CreateLinks qw(:all);
|
||||
|
||||
my $panel = "manager";
|
||||
panel_link("clamav", $panel);
|
||||
|
||||
|
||||
# For templates in all main events
|
||||
|
||||
foreach (qw(
|
||||
/etc/freshclam.conf
|
||||
/etc/clamd.d/scan.conf
|
||||
/etc/logrotate.d/clamd
|
||||
/etc/logrotate.d/clamav-update
|
||||
/etc/logrotate.d/freshclam
|
||||
/usr/lib/tmpfiles.d/clamd.conf
|
||||
/usr/lib/systemd/system/clamd.service.d/50koozali.conf
|
||||
))
|
||||
{
|
||||
templates2events("$_",qw(
|
||||
post-install
|
||||
post-upgrade
|
||||
bootstrap-console-save
|
||||
console-save
|
||||
email-update
|
||||
clamav-update
|
||||
smeserver-clamav-update
|
||||
));
|
||||
}
|
||||
|
||||
# For templates only in certain individual events
|
||||
|
||||
# Not required now
|
||||
templates2events("/etc/cron.daily/freshclam", "bootstrap-console-save");
|
||||
templates2events("/etc/cron.d/clamav-update", "bootstrap-console-save" );
|
||||
|
||||
my $event = "clamav-update";
|
||||
templates2events("/etc/crontab", $event);
|
||||
templates2events("/etc/systemd/system-preset/49-koozali.preset", $event );
|
||||
templates2events("/etc/cron.daily/freshclam", $event );
|
||||
templates2events("/etc/cron.d/clamav-update", $event );
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/clamd");
|
||||
|
||||
|
||||
# clamav-update events
|
||||
my $event = "smeserver-clamav-update";
|
||||
templates2events("/etc/crontab", $event);
|
||||
templates2events("/etc/systemd/system-preset/49-koozali.preset", $event );
|
||||
templates2events("/etc/cron.daily/freshclam", $event );
|
||||
templates2events("/etc/cron.d/clamav-update", $event );
|
||||
|
||||
safe_touch("root/etc/e-smith/templates/etc/cron.d/clamav-update");
|
||||
event_link("systemd-default", $event, "88"); # updates all the service files etc
|
||||
event_link("systemd-reload", $event, "89"); # systemctl daemon-reload
|
||||
event_link("clamav-update", $event, "99");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/clamd");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/freshclam");
|
||||
|
||||
# email-update events - required?
|
||||
$event = "email-update";
|
||||
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/clamd");
|
||||
|
||||
exit 0;
|
||||
|
1
root/etc/e-smith/db/configuration/defaults/clamav/Checks
Normal file
1
root/etc/e-smith/db/configuration/defaults/clamav/Checks
Normal file
@ -0,0 +1 @@
|
||||
24
|
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
current.cvd.clamav.net
|
@ -0,0 +1 @@
|
||||
db.local.clamav.net
|
1
root/etc/e-smith/db/configuration/defaults/clamav/Debug
Normal file
1
root/etc/e-smith/db/configuration/defaults/clamav/Debug
Normal file
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
disabled
|
@ -0,0 +1 @@
|
||||
/proc,/sys,/usr/share,/var
|
@ -0,0 +1 @@
|
||||
/home/e-smith/files
|
@ -0,0 +1 @@
|
||||
admin
|
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
yes
|
@ -0,0 +1 @@
|
||||
60
|
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
yes
|
@ -0,0 +1 @@
|
||||
yes
|
@ -0,0 +1 @@
|
||||
yes
|
@ -0,0 +1 @@
|
||||
6
|
@ -0,0 +1 @@
|
||||
30
|
@ -0,0 +1 @@
|
||||
20
|
@ -0,0 +1 @@
|
||||
15M
|
@ -0,0 +1 @@
|
||||
1500
|
@ -0,0 +1 @@
|
||||
8
|
@ -0,0 +1 @@
|
||||
20
|
@ -0,0 +1 @@
|
||||
disabled
|
@ -0,0 +1 @@
|
||||
/var/spool/clamav/quarantine
|
@ -0,0 +1 @@
|
||||
300
|
@ -0,0 +1 @@
|
||||
yes
|
@ -0,0 +1 @@
|
||||
yes
|
@ -0,0 +1 @@
|
||||
yes
|
@ -0,0 +1 @@
|
||||
yes
|
1
root/etc/e-smith/db/configuration/defaults/clamav/ScanPE
Normal file
1
root/etc/e-smith/db/configuration/defaults/clamav/ScanPE
Normal file
@ -0,0 +1 @@
|
||||
yes
|
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
1800
|
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
unknown
|
@ -0,0 +1 @@
|
||||
disabled
|
@ -0,0 +1 @@
|
||||
disabled
|
@ -0,0 +1 @@
|
||||
disabled
|
1
root/etc/e-smith/db/configuration/defaults/clamav/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/clamav/status
Normal file
@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/clamav/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/clamav/type
Normal file
@ -0,0 +1 @@
|
||||
service
|
@ -0,0 +1 @@
|
||||
1610612736
|
1
root/etc/e-smith/db/configuration/defaults/clamd/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/clamd/status
Normal file
@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/clamd/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/clamd/type
Normal file
@ -0,0 +1 @@
|
||||
service
|
@ -0,0 +1 @@
|
||||
enabled
|
@ -0,0 +1 @@
|
||||
service
|
20
root/etc/e-smith/db/configuration/migrate/40clamav93
Normal file
20
root/etc/e-smith/db/configuration/migrate/40clamav93
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
my $smtpd = $DB->get('clamav') or return;
|
||||
|
||||
if (my $maxFileSize = $DB->get_prop_and_delete('clamav', 'ArchiveMaxFileSize')) {
|
||||
$smtpd->merge_props('MaxFileSize', $maxFileSize);
|
||||
}
|
||||
|
||||
if (my $maxRecursion = $DB->get_prop_and_delete('clamav', 'ArchiveMaxRecursion')) {
|
||||
$smtpd->merge_props('MaxRecursion', $maxRecursion);
|
||||
}
|
||||
|
||||
if (my $maxFiles = $DB->get_prop_and_delete('clamav', 'ArchiveMaxFiles')) {
|
||||
$smtpd->merge_props('MaxFiles', $maxFiles);
|
||||
}
|
||||
|
||||
if (my $AlertEncrypted = $DB->get_prop_and_delete('clamav', 'ArchiveBlockEncrypted')) {
|
||||
$smtpd->merge_props('AlertEncrypted', $AlertEncrypted);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
my $clamav = $DB->get('clamav') or return;
|
||||
|
||||
return unless ($clamav->prop('DatabaseMirror') eq 'db.us.clamav.net');
|
||||
|
||||
$clamav->set_prop('DatabaseMirror','db.local.clamav.net');
|
||||
}
|
7
root/etc/e-smith/db/configuration/migrate/clamavLogTime
Normal file
7
root/etc/e-smith/db/configuration/migrate/clamavLogTime
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
my $clamav = $DB->get('clamav');
|
||||
return unless $clamav;
|
||||
|
||||
my $LogTime = 'yes';
|
||||
$DB->set_prop('clamav', 'LogTime', $LogTime);
|
||||
}
|
7
root/etc/e-smith/db/configuration/migrate/clamdMemLimit
Normal file
7
root/etc/e-smith/db/configuration/migrate/clamdMemLimit
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
my $clamd = $DB->get('clamd');
|
||||
return unless $clamd;
|
||||
|
||||
my $size = 1610612736;
|
||||
$DB->set_prop('clamd', 'MemLimit', $size) if $DB->get_prop('clamd','MemLimit') < $size;
|
||||
}
|
7
root/etc/e-smith/db/configuration/migrate/clamdSelfCheck
Normal file
7
root/etc/e-smith/db/configuration/migrate/clamdSelfCheck
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
my $clamd = $DB->get('clamd');
|
||||
return unless $clamd;
|
||||
|
||||
my $size = 600;
|
||||
$DB->set_prop('clamd', 'SelfCheck', $size);
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
my $clamav = $DB->get('clamav');
|
||||
return unless $clamav;
|
||||
if ($clamav{'DetectBrokenExecutables'}) {
|
||||
$DB->get_prop_and_delete( 'clamav', 'DetectBrokenExecutables' );
|
||||
}
|
||||
}
|
2
root/etc/e-smith/events/actions/clamav-update
Normal file
2
root/etc/e-smith/events/actions/clamav-update
Normal file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/bash
|
||||
#keeping that to help migration from older clamd
|
@ -0,0 +1,44 @@
|
||||
<!-- vim: ft=xml ts=8 sw=4 noet:
|
||||
-->
|
||||
<lexicon lang="en-us">
|
||||
<entry>
|
||||
<base>FORM_TITLE</base>
|
||||
<trans>Antivirus settings</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_FILESYSTEM_SCAN_PERIOD</base>
|
||||
<trans>Scan filesystem</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DESC_FILESYSTEM_SCAN_PERIOD</base>
|
||||
<trans><![CDATA[
|
||||
<h2>General Settings</h2>
|
||||
If this option is enabled then the filesystem will be
|
||||
scanned for viruses. A report of any found viruses will be
|
||||
emailed to the administrator.]]></trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_QUARANTINE</base>
|
||||
<trans>Quarantine infected files</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_CLAM_VERSIONS</base>
|
||||
<trans>ClamAV and db versions</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>WEEKLY</base>
|
||||
<trans>Weekly</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>NEVER</base>
|
||||
<trans>Never</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DAILY</base>
|
||||
<trans>Daily</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>SUCCESS</base>
|
||||
<trans>The new clamav antivirus settings have been saved.</trans>
|
||||
</entry>
|
||||
</lexicon>
|
@ -0,0 +1 @@
|
||||
PERMS=0644
|
@ -0,0 +1 @@
|
||||
DELETE=DELETE
|
@ -0,0 +1 @@
|
||||
DELETE=DELETE
|
1
root/etc/e-smith/templates.metadata/etc/freshclam.conf
Normal file
1
root/etc/e-smith/templates.metadata/etc/freshclam.conf
Normal file
@ -0,0 +1 @@
|
||||
PERMS=0644
|
@ -0,0 +1 @@
|
||||
AlertBrokenExecutables {$clamav{AlertBrokenExecutables} || 'no' }
|
@ -0,0 +1 @@
|
||||
AlertEncrypted { $clamav{AlertEncrypted} || 'no' }
|
@ -0,0 +1 @@
|
||||
AlertExceedsMax { $clamav{AlertExceedsMax} || 'no' }
|
@ -0,0 +1 @@
|
||||
AlertOLE2Macros { $clamav{AlertOLE2Macros} || 'no' }
|
@ -0,0 +1 @@
|
||||
AlertPartitionIntersection { $clamav{AlertPartitionIntersection} || 'no' }
|
@ -0,0 +1 @@
|
||||
AlertPhishingCloak {$clamav{AlertPhishingCloak} || 'no' }
|
@ -0,0 +1 @@
|
||||
AlertPhishingSSLMismatch {$clamav{AlertPhishingSSLMismatch} || 'no' }
|
@ -0,0 +1,4 @@
|
||||
# Enable for 0.103.x
|
||||
# This takes a LOT more ram as it has have the DBs loaded twice
|
||||
# Maybe we should check the memory limit before we allow enabling?
|
||||
ConcurrentDatabaseReload { $clamav{ConcurrentDatabaseReload} || 'no' }
|
@ -0,0 +1 @@
|
||||
DatabaseDirectory /var/lib/clamav
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/Debug
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/Debug
Normal file
@ -0,0 +1 @@
|
||||
Debug { $clamav{Debug} || 'no' }
|
@ -0,0 +1 @@
|
||||
FixStaleSocket yes
|
@ -0,0 +1 @@
|
||||
Foreground no
|
@ -0,0 +1 @@
|
||||
HeuristicAlerts {$clamav{HeuristicAlerts} || 'yes' }
|
@ -0,0 +1 @@
|
||||
HeuristicScanPrecedence { $clamav{HeuristicScanPrecedence} || 'no' }
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Waiting for a new job will timeout after this time (seconds).
|
||||
"IdleTimeout $clamav{IdleTimeout}";
|
||||
}
|
@ -0,0 +1 @@
|
||||
LeaveTemporaryFiles { $clamav{LeaveTemporaryFiles} || 'no' }
|
@ -0,0 +1 @@
|
||||
LocalSocket /run/clamd/clamd.socket
|
@ -0,0 +1 @@
|
||||
LocalSocketMode 666
|
@ -0,0 +1 @@
|
||||
LogClean { $clamav{LogClean} || 'yes' }
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/LogFile
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/LogFile
Normal file
@ -0,0 +1 @@
|
||||
LogFile /var/log/clamd/current
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/LogTime
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/LogTime
Normal file
@ -0,0 +1 @@
|
||||
LogTime { $clamav{LogTime} || 'yes' }
|
@ -0,0 +1 @@
|
||||
LogVerbose { $clamav{LogVerbose} || 'yes' }
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Maximum length the queue of pending connections may grow to.
|
||||
"MaxConnectionQueueLength $clamav{MaxConnectionQueueLength}";
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Maximal depth directories are scanned at.
|
||||
"MaxDirectoryRecursion $clamav{MaxDirectoryRecursion}";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
# Files in archives larger than this limit won't be scanned.
|
||||
# Value of 0 disables the limit.
|
||||
"MaxFileSize $clamav{MaxFileSize}";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
# Number of files to be scanned within an archive.
|
||||
# Value of 0 disables the limit.
|
||||
"MaxFiles $clamav{MaxFiles}";
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
# Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
|
||||
# file, all files within it will also be scanned. This options specifies how
|
||||
# deep the process should be continued.
|
||||
# Value of 0 disables the limit.
|
||||
"MaxRecursion $clamav{MaxRecursion}";
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Maximal number of threads running at the same time.
|
||||
"MaxThreads $clamav{MaxThreads}";
|
||||
}
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/PidFile
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/PidFile
Normal file
@ -0,0 +1 @@
|
||||
PidFile /run/clamd/clamd.pid
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
# Waiting for data from a client socket will timeout after this time (seconds).
|
||||
# Value of 0 disables the timeout.
|
||||
"ReadTimeout $clamav{ReadTimeout}";
|
||||
}
|
@ -0,0 +1 @@
|
||||
ScanArchive { $clamav{ScanArchive} || 'yes' }
|
@ -0,0 +1 @@
|
||||
ScanHTML { $clamav{ScanHTML} || 'yes' }
|
@ -0,0 +1 @@
|
||||
ScanMail { $clamav{ScanMail} || 'yes' }
|
@ -0,0 +1 @@
|
||||
ScanOLE2 { $clamav{ScanOLE2} || 'yes' }
|
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/ScanPE
Normal file
1
root/etc/e-smith/templates/etc/clamd.d/scan.conf/ScanPE
Normal file
@ -0,0 +1 @@
|
||||
ScanPE { $clamav{ScanPE} || 'yes' }
|
@ -0,0 +1,2 @@
|
||||
# Perform internal sanity check (database integrity and freshness).
|
||||
SelfCheck { $clamav{SelfCheck} || '600' }
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user