c-icap / c-icap-server

GNU Lesser General Public License v2.1
45 stars 32 forks source link

clamd not available results in no virus check #36

Open elelayan opened 2 years ago

elelayan commented 2 years ago

Having a not yet started clamd daemon, for instance due to a race condition between systemd services, results in a warning in c-icap logs main proc, clamd_connect: Can not connect to clamd server on ... and clamd_init: Error while sending command to clamd server but it doesn't prevent startup.

Afterward, each virus_scan request passes with 204 and log Antivirus engine is not available, allow 204.

Would it be possible to either fail on startup when a condition for a module is not met or to not 204 in virus_scan in this case?

Otherwise it's just a huge hole waiting to happen in any antivirus filtering service.