Resolute Verification
=====================

System info:
------------

lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 26.04.1 LTS
Release:        26.04
Codename:       resolute

dpkg -l | grep clamav
ii  clamav                            1.5.3+dfsg-0ubuntu0.26.04.2               
 amd64        anti-virus utility for Unix - command-line interface
ii  clamav-base                       1.5.3+dfsg-0ubuntu0.26.04.2               
 all          anti-virus utility for Unix - base package
ii  clamav-daemon                     1.5.3+dfsg-0ubuntu0.26.04.2               
 amd64        anti-virus utility for Unix - scanner daemon
ii  clamav-freshclam                  1.5.3+dfsg-0ubuntu0.26.04.2               
 amd64        anti-virus utility for Unix - virus database update utility
ii  libclamav12:amd64                 1.5.3+dfsg-0ubuntu0.26.04.2               
 amd64        anti-virus utility for Unix - library

Test Case #1
------------

Check the TCP socket configurability

sudo dpkg-reconfigure clamav-daemon
# Set IP to 10.108.97.220 and port to 3330

sudo ss -pln | grep 3330
tcp   LISTEN 0      4096                                     10.108.97.220:3330 
            0.0.0.0:*    
users:(("clamd",pid=24369,fd=3),("systemd",pid=1,fd=10)) 

root@clamav-sru-test:~# printf "PING\n" | nc 10.108.97.220 3330
PONG

root@clamav-sru-test:~# systemctl cat clamav-daemon.socket

[Unit]
...

[Socket]
ListenStream=/run/clamav/clamd.ctl
SocketUser=clamav
SocketGroup=clamav

...

# /run/systemd/generator/clamav-daemon.socket.d/listen.conf
# Automatically generated by clamav-daemon-socket-generator
# Based on configuration in /etc/clamav/clamd.conf
[Socket]
# Clear any existing ListenStream directives
ListenStream=
ListenStream=10.108.97.220:3330

Passes test case #1 as the socket is active on the configured IP:port

Test Case #2
------------

Check the UNIX socket configurability

root@clamav-sru-test:~# sudo dpkg-reconfigure clamav-daemon
# Set the socket to clamd-alt.ctl, socketgroup to clamav-user, socketmode to 777

root@clamav-sru-test:~# printf "PING\n" | socat - 
UNIX-CONNECT:/run/clamav/clamd-alt.ctl # Try to ping the socket
PONG

systemctl cat clamav-daemon.socket

[Unit]
...

[Socket]
ListenStream=/run/clamav/clamd.ctl
#ListenStream=1024
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True

...

[Socket]
# Clear any existing ListenStream directives
ListenStream=

ListenStream=/var/run/clamav/clamd-alt.ctl
SocketMode=777
SocketGroup=clamav-user

clamav-daemon is listening on the configured UNIX socket with the
correct SocketGroup and SocketMode, therefore, passes verification

** Tags removed: verification-needed-resolute
** Tags added: verification-done-resolute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2160988

Title:
  [SRU] Duplicate daemon-reload call in clamav-daemon.postinst script

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/2160988/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to