diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-21 12:15:16 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-21 12:15:58 +0000 |
commit | 72d47b678d5cae58df6ea8c2c44e2e7ec4b5c3e5 (patch) | |
tree | 8dd44f4134913ae824816f6bda16c298d680d0e9 /main/clamav | |
parent | 0e9949e1c4475d8e77cfffbe2bf9daf75050872f (diff) | |
download | aports-72d47b678d5cae58df6ea8c2c44e2e7ec4b5c3e5.tar.bz2 aports-72d47b678d5cae58df6ea8c2c44e2e7ec4b5c3e5.tar.xz |
main/clamav: fix creation of socket dir
fixes #4175
Diffstat (limited to 'main/clamav')
-rw-r--r-- | main/clamav/APKBUILD | 8 | ||||
-rwxr-xr-x | main/clamav/clamd.initd | 12 |
2 files changed, 16 insertions, 4 deletions
diff --git a/main/clamav/APKBUILD b/main/clamav/APKBUILD index 824346c6d1..f36e06d8a2 100644 --- a/main/clamav/APKBUILD +++ b/main/clamav/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: Carlo Landmeter <clandmeter@gmail.com> pkgname=clamav pkgver=0.98.7 -pkgrel=0 +pkgrel=1 pkgusers="clamav" pkggroups="clamav" pkgdesc="An anti-virus toolkit for UNIX" @@ -188,21 +188,21 @@ daemon() { } md5sums="157c601161da1c2d5a0e48ea1b49e067 clamav-0.98.7.tar.gz -9b8163aebbfe87bcc0a91c14f364b3e0 clamd.initd +64ca44466837bcd69f28e01f6c96e2a9 clamd.initd e8a03fad6ce603631e8fe71a24d387c6 clamd.confd d29c888953097041f27b2dbc21b6e94c freshclam.initd e48466ddfb56f66c623b83e58777b778 freshclam.confd ae1e48ab56a0fff1acdde023c1f6f350 clamd.logrotate 226824214c021b2366f0be1289561d17 freshclam.logrotate" sha256sums="282417b707740de13cd8f18d4cbca9ddd181cf96b444db2cad98913a5153e272 clamav-0.98.7.tar.gz -7563924ac0f7cc44fc4982c67efb26c42b162aab65ce7efad2b875bd44a1cc8a clamd.initd +500fc4e6ec43f7a87cf159b0c56ca594f0a3f855ab6c80f7aa91315dcc4da941 clamd.initd 4d978313004f66d871564b873df27c5459d3cc504788b179e41edba0f04b74dc clamd.confd cf945febd186528798df2e5567e108d1bcf3618c74615d8c5edee3cfad756c9c freshclam.initd 75551ce7e04bbef4a889bc94a357b160d9da88f06eba32df594ba3cbb2c81ed1 freshclam.confd ec5e60f7efca02ed151f625e9a44404346991ed6608c6e2088db2436bbd03d49 clamd.logrotate 84006ac3d2e8dc2e13a01f5e313c20e4978cdc93d831c181e0075badcbf4ada0 freshclam.logrotate" sha512sums="acf01961472c13ccb219420cc3fa3c3e6f8a733edef371dbc04ce5867900aa1535e956ec8ad50d31c8f872a0a1d79fcccac944cd86e29ecdfa4af18f7fd5afb9 clamav-0.98.7.tar.gz -6ea6eb24d255703d5107191d078d77c576128eef552fb0c39ac97a2c975d714428de5844912c6145254de887d26c616cdcd904321c5bbec98b0cc8c1d3fcbb46 clamd.initd +9abb547591170ab07da6238a47db00bfa8eb0f962e430e9e701ff12542b81d02b86092edc0fe49aa9cfbb263cdd62db8f55d255cf1625f8532da2deee79ccc42 clamd.initd 59c561b3dcb0b616b647cd8e4ebc46a2cc5e7144c8c7ea0054cc1c3021d1da8f67e4dad5c083c3fe712ed887aaabfca91b538f4759537e7c4c9ab71ba4fd5794 clamd.confd 7371e12ce6efa33684ac90a03c244b2cf626322ac8fc1e9fa8ca67a9353badea3f3eb0b3d966e286519956f94d1b5752b3d03aabb901105270010eadb0aedf72 freshclam.initd ba181fe1abaac7b898ccb40b0713455aa3c9d5e25ad21d687b6cac09b0105b9e376526e7c776a44636234d8db819709d8d6a6cc76119bc3e98b637b1a3f26c08 freshclam.confd diff --git a/main/clamav/clamd.initd b/main/clamav/clamd.initd index f4d5cb27cc..37e29ecd0e 100755 --- a/main/clamav/clamd.initd +++ b/main/clamav/clamd.initd @@ -16,6 +16,7 @@ start() { local clamd_socket=$(awk '$1 == "LocalSocket" { print $2 }' $CONF) logfix + socketfix if [ -S "${clamd_socket:=/tmp/clamd}" ]; then rm -f ${clamd_socket} @@ -77,3 +78,14 @@ logfix() { chmod 640 ${logfile} fi } + +socketfix() { + # fix clamd run permissions + local socket=`awk '$1 == "LocalSocket" { print $2 }' $CONF` + local socketdir=${socket%/*} + local clamav_user=`awk '$1 == "User" { print $2 }' $CONF` + checkpath --directory --owner ${clamav_user:-clamav} \ + ${socketdir:-/var/run/clamav} +} + + |