[Pkg-clamav-devel] Bug#777219: upgrade breaks when User != clamav
Sebastian Andrzej Siewior
sebastian at breakpoint.cc
Fri Feb 6 12:49:16 UTC 2015
Package: clamav-freshclam
Version: 0.98.6+dfsg-1
Severity: Important
After upgrade from previous version to the newer where fixed #775400 we
break freshclam from upgrading the database if the owner was != clamav
say Debian-Exim with:
|ERROR: Can't create temporary directory /var/lib/clamav/clamav-431a9586a36e125909ede027609c7aa7.tmp
|Hint: The database directory must be writable for UID 101 or GID 103
it affects s-p-u and unstable. This is the proposed (untested) fix.
diff --git a/debian/clamav-base.postinst.in b/debian/clamav-base.postinst.in
--- a/debian/clamav-base.postinst.in
+++ b/debian/clamav-base.postinst.in
@@ -28,7 +28,16 @@ case "$1" in
DATABASEDIR=/var/lib/clamav
LOGDIR=/var/log/clamav
- user=clamav
+
+ if [ -f /etc/clamav/freshclam.conf ]
+ then
+ user=$(grep ^DatabaseOwner /etc/clamav/freshclam.conf | awk '{print $2}')
+ elif [ -f /etc/clamav/clamd.conf ]
+ then
+ user=$(grep ^User /etc/clamav/clamd.conf | awk '{print $2}')
+ else
+ user=clamav
+ fi
# Set up the clamav user on new install
if [ -z "$2" ]; then
I would test it & prepare s-p-u & unstable package later today. But since
nobody noticed this breakage in unstable for a week it might not be that
serious after all or is it?
Sebastian
More information about the Pkg-clamav-devel
mailing list