Merge pull request #10518 from BKPepe/clamav_update

clamav: Update to version 0.101.4
This commit is contained in:
Rosen Penev 2019-11-23 10:44:07 -08:00 committed by GitHub
commit cf73e1b014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 53 deletions

View file

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=clamav PKG_NAME:=clamav
PKG_VERSION:=0.101.3 PKG_VERSION:=0.101.4
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/ PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
PKG_HASH:=68d42aac4a9cbde293288533a9a3c3d55863de38f2b8707c1ef2d987b1260338 PKG_HASH:=0bf094f0919d158a578421d66bc2569c8c8181233ba162bb51722f98c802bccd
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \ PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
Lucian Cristian <lucian.cristian@gmail.com> Lucian Cristian <lucian.cristian@gmail.com>

View file

@ -19,14 +19,14 @@ config clamav 'clamav'
option ScanPE 'yes' option ScanPE 'yes'
option DisableCertCheck 'no' option DisableCertCheck 'no'
option ScanELF 'yes' option ScanELF 'yes'
option DetectBrokenExecutables 'no' option AlertBrokenExecutables 'no'
option ScanOLE2 'yes' option ScanOLE2 'yes'
option ScanPDF 'yes' option ScanPDF 'yes'
option ScanSWF 'yes' option ScanSWF 'yes'
option ScanMail 'yes' option ScanMail 'yes'
option ScanPartialMessages 'no' option ScanPartialMessages 'no'
option ScanArchive 'yes' option ScanArchive 'yes'
option ArchiveBlockEncrypted 'yes' option AlertEncrypted 'yes'
option MaxFileSize '10M' option MaxFileSize '10M'
option TemporaryDirectory '/tmp' option TemporaryDirectory '/tmp'
option LocalSocket '/var/run/clamav/clamd.sock' option LocalSocket '/var/run/clamav/clamd.sock'

View file

@ -30,7 +30,7 @@ validate_clamav_section() {
'ScanPE:string' \ 'ScanPE:string' \
'DisableCertCheck:string' \ 'DisableCertCheck:string' \
'ScanELF:string' \ 'ScanELF:string' \
'DetectBrokenExecutables:string' \ 'AlertBrokenExecutables:string' \
'ScanOLE2:string' \ 'ScanOLE2:string' \
'ScanPDF:string' \ 'ScanPDF:string' \
'ScanSWF:string' \ 'ScanSWF:string' \
@ -38,7 +38,7 @@ validate_clamav_section() {
'ScanPartialMessages:string' \ 'ScanPartialMessages:string' \
'ScanArchive:string' \ 'ScanArchive:string' \
'TemporaryDirectory:string' \ 'TemporaryDirectory:string' \
'ArchiveBlockEncrypted:string' \ 'AlertEncrypted:string' \
'MaxFileSize:string' \ 'MaxFileSize:string' \
'LocalSocket:string' \ 'LocalSocket:string' \
'User:string' \ 'User:string' \
@ -52,47 +52,49 @@ start_clamav_instance() {
return 1 return 1
} }
mkdir -p $DatabaseDirectory mkdir -p "$DatabaseDirectory"
mkdir -p /etc/clamav/ mkdir -p /etc/clamav/
mkdir -p /var/run/clamav/ mkdir -p /var/run/clamav/
chmod a+rw /var/run/clamav chmod a+rw /var/run/clamav
mkdir -p $(dirname $CLAMD_CONFIGFILE) mkdir -p "$(dirname $CLAMD_CONFIGFILE)"
ln -sf $clamd_config_file $CLAMD_CONFIGFILE ln -sf "$clamd_config_file" "$CLAMD_CONFIGFILE"
echo "LogFile " $LogFile > $CLAMD_CONFIGFILE {
echo "LogFileMaxSize " $LogFileMaxSize >> $CLAMD_CONFIGFILE echo "LogFile " "$LogFile"
echo "LogVerbose " $LogVerbose >> $CLAMD_CONFIGFILE echo "LogFileMaxSize " "$LogFileMaxSize"
echo "ExtendedDetectionInfo " $ExtendedDetectionInfo >> $CLAMD_CONFIGFILE echo "LogVerbose " "$LogVerbose"
echo "LogTime " $LogTime >> $CLAMD_CONFIGFILE echo "ExtendedDetectionInfo " "$ExtendedDetectionInfo"
echo "OfficialDatabaseOnly " $OfficialDatabaseOnly >> $CLAMD_CONFIGFILE echo "LogTime " "$LogTime"
echo "StreamMinPort " $StreamMinPort >> $CLAMD_CONFIGFILE echo "OfficialDatabaseOnly " "$OfficialDatabaseOnly"
echo "StreamMaxPort " $StreamMaxPort >> $CLAMD_CONFIGFILE echo "StreamMinPort " "$StreamMinPort"
echo "MaxThreads " $MaxThreads >> $CLAMD_CONFIGFILE echo "StreamMaxPort " "$StreamMaxPort"
echo "ReadTimeout " $ReadTimeout >> $CLAMD_CONFIGFILE echo "MaxThreads " "$MaxThreads"
echo "CommandReadTimeout " $CommandReadTimeout >> $CLAMD_CONFIGFILE echo "ReadTimeout " "$ReadTimeout"
echo "MaxDirectoryRecursion " $MaxDirectoryRecursion >> $CLAMD_CONFIGFILE echo "CommandReadTimeout " "$CommandReadTimeout"
echo "FollowDirectorySymlinks " $FollowDirectorySymlinks >> $CLAMD_CONFIGFILE echo "MaxDirectoryRecursion " "$MaxDirectoryRecursion"
echo "FollowFileSymlinks " $FollowFileSymlinks >> $CLAMD_CONFIGFILE echo "FollowDirectorySymlinks " "$FollowDirectorySymlinks"
echo "SelfCheck " $SelfCheck >> $CLAMD_CONFIGFILE echo "FollowFileSymlinks " "$FollowFileSymlinks"
echo "DetectPUA " $DetectPUA >> $CLAMD_CONFIGFILE echo "SelfCheck " "$SelfCheck"
echo "ScanPE " $ScanPE >> $CLAMD_CONFIGFILE echo "DetectPUA " "$DetectPUA"
echo "DisableCertCheck " $DisableCertCheck >> $CLAMD_CONFIGFILE echo "ScanPE " "$ScanPE"
echo "ScanELF " $ScanELF >> $CLAMD_CONFIGFILE echo "DisableCertCheck " "$DisableCertCheck"
echo "DetectBrokenExecutables " $DetectBrokenExecutables >> $CLAMD_CONFIGFILE echo "ScanELF " "$ScanELF"
echo "ScanOLE2 " $ScanOLE2 >> $CLAMD_CONFIGFILE echo "AlertBrokenExecutables " "$AlertBrokenExecutables"
echo "ScanPDF " $ScanPDF >> $CLAMD_CONFIGFILE echo "ScanOLE2 " "$ScanOLE2"
echo "ScanSWF " $ScanSWF >> $CLAMD_CONFIGFILE echo "ScanPDF " "$ScanPDF"
echo "ScanMail " $ScanMail >> $CLAMD_CONFIGFILE echo "ScanSWF " "$ScanSWF"
echo "ScanPartialMessages " $ScanPartialMessages >> $CLAMD_CONFIGFILE echo "ScanMail " "$ScanMail"
echo "ScanArchive " $ScanArchive >> $CLAMD_CONFIGFILE echo "ScanPartialMessages " "$ScanPartialMessages"
echo "TemporaryDirectory " $TemporaryDirectory >> $CLAMD_CONFIGFILE echo "ScanArchive " "$ScanArchive"
echo "ArchiveBlockEncrypted " $ArchiveBlockEncrypted >> $CLAMD_CONFIGFILE echo "TemporaryDirectory " "$TemporaryDirectory"
echo "MaxFileSize " $MaxFileSize >> $CLAMD_CONFIGFILE echo "AlertEncrypted " "$AlertEncrypted"
echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE echo "MaxFileSize " "$MaxFileSize"
echo "User " $User >> $CLAMD_CONFIGFILE echo "LocalSocket " "$LocalSocket"
echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE echo "User " "$User"
echo "DatabaseDirectory " $DatabaseDirectory >> $CLAMD_CONFIGFILE echo "ExitOnOOM " "$ExitOnOOM"
echo "DatabaseDirectory " "$DatabaseDirectory"
} > "$CLAMD_CONFIGFILE"
procd_open_instance procd_open_instance
procd_set_param command $PROG -c $CLAMD_CONFIGFILE procd_set_param command $PROG -c $CLAMD_CONFIGFILE

View file

@ -27,20 +27,22 @@ start_freshclam_instance() {
[ -f /tmp/freshclam.pid ] && echo "already running" && return 0 [ -f /tmp/freshclam.pid ] && echo "already running" && return 0
mkdir -p $DatabaseDirectory mkdir -p "$DatabaseDirectory"
mkdir -p /etc/clamav mkdir -p /etc/clamav
touch /tmp/freshclam.log touch /tmp/freshclam.log
touch /tmp/freshclam.pid touch /tmp/freshclam.pid
mkdir -p $(dirname $FRESHCLAM_CONFIGFILE) mkdir -p "$(dirname $FRESHCLAM_CONFIGFILE)"
ln -sf $freshclam_config_file $FRESHCLAM_CONFIGFILE ln -sf "$freshclam_config_file" "$FRESHCLAM_CONFIGFILE"
echo "UpdateLogFile " $UpdateLogFile > $FRESHCLAM_CONFIGFILE {
echo "DatabaseMirror " $DatabaseMirror >> $FRESHCLAM_CONFIGFILE echo "UpdateLogFile " "$UpdateLogFile"
echo "NotifyClamd " $NotifyClamd >> $FRESHCLAM_CONFIGFILE echo "DatabaseMirror " "$DatabaseMirror"
echo "DatabaseOwner " $DatabaseOwner >> $FRESHCLAM_CONFIGFILE echo "NotifyClamd " "$NotifyClamd"
echo "CompressLocalDatabase " $CompressLocalDatabase >> $FRESHCLAM_CONFIGFILE echo "DatabaseOwner " "$DatabaseOwner"
echo "DatabaseDirectory " $DatabaseDirectory >> $FRESHCLAM_CONFIGFILE echo "CompressLocalDatabase " "$CompressLocalDatabase"
echo "DatabaseDirectory " "$DatabaseDirectory"
} > "$FRESHCLAM_CONFIGFILE"
procd_open_instance procd_open_instance
procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings
@ -56,8 +58,8 @@ start_service()
stop_service() stop_service()
{ {
[ ! -f /tmp/freshclam.pid ] && echo "not running" && return 0 [ ! -f /tmp/freshclam.pid ] && echo "not running" && return 0
PID=`cat /tmp/freshclam.pid` PID=$(cat /tmp/freshclam.pid)
kill $PID kill "$PID"
rm -f /tmp/freshclam.pid rm -f /tmp/freshclam.pid
} }