aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Liske <thomas@fiasko-nw.net>2020-08-08 13:34:08 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-08-11 04:46:50 +0000
commitfe7af3c40bec24b908362f412423da21d3460d02 (patch)
tree4063ec1b8fda34294be150210e0f65465bde54e5
parent01423694310e8bb03426a785f3acd3a0ff5bbd8a (diff)
downloadaports-fe7af3c40bec24b908362f412423da21d3460d02.tar.gz
aports-fe7af3c40bec24b908362f412423da21d3460d02.tar.bz2
aports-fe7af3c40bec24b908362f412423da21d3460d02.tar.xz
main/clamav: use checkpath in initd to create non-public files
-rw-r--r--main/clamav/APKBUILD6
-rwxr-xr-xmain/clamav/clamd.initd7
-rw-r--r--main/clamav/freshclam.initd5
3 files changed, 10 insertions, 8 deletions
diff --git a/main/clamav/APKBUILD b/main/clamav/APKBUILD
index 954515ed85..16bf808ebc 100644
--- a/main/clamav/APKBUILD
+++ b/main/clamav/APKBUILD
@@ -4,7 +4,7 @@
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=clamav
pkgver=0.102.4
-pkgrel=0
+pkgrel=1
pkgusers="clamav"
pkggroups="clamav"
pkgdesc="An anti-virus toolkit for UNIX eis-ng backport"
@@ -249,9 +249,9 @@ milter() {
}
sha512sums="29893deb8d2d913dff72331875d3dc3a10356bfb254ddfe1c1933b3ea4f8b76c96a1b840f95e72be36cbc0e00b9ec35e395225ef264761f53e709bb1026a4f09 clamav-0.102.4.tar.gz
-ed81be79bf9a25eec071312252121cc76c96838407377b75077bf94922055f1de99f327982ac4dccd5be85003baa95385e5d002fabab32bb851bb30178475edd clamd.initd
+d886d810de66e8da800384c1e8192f7da4352402ffc3b33cfbca93d81a2235d8c902ca9d436b9be70f00740b4555e1efbf09bf9f84059095a1a297b27581cd20 clamd.initd
59c561b3dcb0b616b647cd8e4ebc46a2cc5e7144c8c7ea0054cc1c3021d1da8f67e4dad5c083c3fe712ed887aaabfca91b538f4759537e7c4c9ab71ba4fd5794 clamd.confd
-00daed8afb67a6e4a29893340246c8840cce970dd9103d26557ecdd26ef60b12551d2291c214fc657faaaa339484052079347411b0cad65e3a33ece56d57cf16 freshclam.initd
+6f0c615b89f0f0d2f0e9f965f025b9ac8c81b2168fa6727dc8a47222abd780f9b656732f289d6061a20126b16126a975d50e8b3b8ff131f55dd8803da8be5dec freshclam.initd
ba181fe1abaac7b898ccb40b0713455aa3c9d5e25ad21d687b6cac09b0105b9e376526e7c776a44636234d8db819709d8d6a6cc76119bc3e98b637b1a3f26c08 freshclam.confd
3ae493dd1610a819402c015f6b8c0f080f926b72dc43d2bded60030bf6a55040e4b88e0f64d3aae299dc1133d7e1b89855e7346b4665a64e8b82592f7b75cf6a clamd.logrotate
30cff378bc28c76b795e00c92ae5ee623f3abe4a19bed61dd8403c96e72658bb02b7f040d26a6258104af754464d25ea7d9646918c4b47d2ba9a8cbf4687056c freshclam.logrotate"
diff --git a/main/clamav/clamd.initd b/main/clamav/clamd.initd
index 5511a5666d..c38868a5c4 100755
--- a/main/clamav/clamd.initd
+++ b/main/clamav/clamd.initd
@@ -76,9 +76,10 @@ logfix() {
local clamav_user=`awk '$1 == "User" { print $2 }' $CONF`
if [ -n "${logfile}" ] && [ -n "${clamav_user}" ]; then
if [ ! -f "${logfile}" ]; then
- touch ${logfile}
+ checkpath -Fm 0640 -o ${clamav_user} ${logfile}
+ else
+ chmod 640 ${logfile}
+ chown ${clamav_user} ${logfile}
fi
- chown ${clamav_user} ${logfile}
- chmod 640 ${logfile}
fi
}
diff --git a/main/clamav/freshclam.initd b/main/clamav/freshclam.initd
index 279b529066..6589da0bca 100644
--- a/main/clamav/freshclam.initd
+++ b/main/clamav/freshclam.initd
@@ -45,9 +45,10 @@ logfix() {
local freshclam_user=$(awk '$1 == "DatabaseOwner" { print $2 }' $CONF)
if [ -n "${logfile}" -a -n "${clamav_user}" ]; then
if [ ! -f "${logfile}" ]; then
- touch ${logfile}
+ checkpath -fm 0640 ${logfile}
+ else
+ chmod 640 ${logfile}
fi
chown ${freshclam_user} ${logfile}
- chmod 640 ${logfile}
fi
}