clamav-base.postinst doesn't check user of clamd when it sets LocalSocketGroup

Bug #568946 reported by Pawel Tecza
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
clamav (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: clamav-base

I've upgraded ClamAV running on Ubuntu Jaunty from version 0.95.3+dfsg-1ubuntu0.09.04.1
to version 0.96+dfsg-1ubuntu2 which I backported using source package for coming Ubuntu Lucid.
Unfortunately ClamAV failed during restart as you can see below:

* Stopping ClamAV daemon clamd [ OK ]
[...]
* Starting ClamAV daemon clamd \
   ERROR: Failed to change socket ownership to group clamav
   Closing the main socket. [fail]

Please note that my ClamAV daemon runs with privileges of "amavis" user, not default
"clamav" user, so its socket has the following owner and group:

# ls -l /var/run/clamav/
total 0
s--------- 1 amavis amavis 0 2010-04-22 16:30 clamd.ctl

# ls -ld /var/run/clamav/
drwxr-xr-x 2 amavis root 60 2010-04-22 16:30 /var/run/clamav/

The reason of the socket problem is that clamav-base.postinst script doesn't check user
of clamd process and set automatically new option "SocketLocalGroup clamav"
in /etc/clamav/clamd.conf file. My ClamAV ran successfully again when I set
"SocketLocalGroup amavis" there and restarted it.

I think that post install script of clamav-base package should be more smart and check
"User" option in the config file of clamd.

Revision history for this message
Pawel Tecza (ptecza) wrote : Re: [Bug 568946] [NEW] clamav-base.postinst doesn't check user of clamd when it sets LocalSocketGroup

Paweł Tęcza pisze:
> Public bug reported:

> The reason of the socket problem is that clamav-base.postinst script doesn't check user
> of clamd process and set automatically new option "SocketLocalGroup clamav"
> in /etc/clamav/clamd.conf file. My ClamAV ran successfully again when I set
> "SocketLocalGroup amavis" there and restarted it.

Sorry for my typo, but the name of option of the clamd is
"LocalSocketGroup", of course.

Chuck Short (zulcss)
Changed in clamav (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.