[Pkg-clamav-devel] Bug#771911: clamav-daemon: doesn't listen on TCP socket under systemd

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Wed Dec 3 18:49:07 UTC 2014


Control: severity -1 important

Hi,

thanks for reporting this issue.

On 03.12.2014 13:07, darac at winterwolf.co.uk wrote:
> When started by systemd, it appears that clamav-daemon doesn't listen on
> a TCP socket, even when configured to do so. As you can see from the
> configuration below, I have TCPSocket and TCPAddr set in
> /etc/clamav/clamav.conf and debconf agrees that
> clamav-daemon/TcpOrLocal = TCP.
> ...
> netstat/lsof also confirm that clamavd isn't listening. It seems to me,
> then that the initscript isn't honouring the debconf setting/the config.

If systemd is responsible for creating the TCP socket, it has to know 
about it, but it doesn't read /etc/clamav/clamav.conf.

To tell systemd about the TCP socket, you should create a file 
/etc/systemd/system/clamav-daemon.socket.d/extend.conf containing the 
following two lines:
[Socket]
ListenStream=192.168.101.254:3310

After that run:
# systemctl --system daemon-reload
# systemctl restart clamav-daemon.socket
# systemctl restart clamav-daemon.service

But I agree, that having to create this additional configuration file is 
a pain and it should be done automatically when running 
'dpkg-reconfigure clamav-daemon'.

In fact, as upgrades from wheezy to jessie will (probably?) switch to 
systemd, this is a rather important problem. I'm setting the severity to 
important for now, but I think we should definitely fix this for jessie. 
I'll look implementing that now.

Best regards,
Andreas



More information about the Pkg-clamav-devel mailing list