Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net
https://www.clamav.net/
GNU General Public License v2.0
4.42k stars 705 forks source link

Clamav 1.2.0 - clamconf result question #1013

Closed teoberi closed 11 months ago

teoberi commented 1 year ago

Describe the bug

When I run the command ./clamconf the result contains:

Checking configuration files in /opt/clamav/etc Config file: clamd.conf ... MaxScanTime disabled !!! MaxScanSize: UNKNOWN INTERNAL TYPE !!! MaxFileSize = "104857600" ...

I specify that I have not modified the respective option in clamd.conf, it is default.

teoberi commented 1 year ago

The message appears in the clamconf.c file twice, lines 116 and 187, as a default option for switch instructions. Isn't the case missing: case CLOPT_TYPE_SIZE64:

teoberi commented 1 year ago

Maybe adding the missing case to the clamconf.c file would be the solution to solving the problem. After line 103 https://github.com/Cisco-Talos/clamav/blob/7d26bc8f6a801bb35ff7f2b154f33817e5863ea6/clamconf/clamconf.c#L103 will be added case CLOPT_TYPE_SIZE64: After line 171 https://github.com/Cisco-Talos/clamav/blob/7d26bc8f6a801bb35ff7f2b154f33817e5863ea6/clamconf/clamconf.c#L171 will be added case CLOPT_TYPE_SIZE64: The printf message in line 172 will also be modified. https://github.com/Cisco-Talos/clamav/blob/7d26bc8f6a801bb35ff7f2b154f33817e5863ea6/clamconf/clamconf.c#L172

rsundriyal commented 1 year ago

Hi @teoberi, Thanks for sharing the issue. We have created a ticket to track the issue. Will update you on its fix.

dohoangkhiem commented 12 months ago

Hello,

Any update on this? We have the config "MaxScanSize 500M" in our clamd.conf and running "clamconf -n" also gave us the error

!!! MaxScanSize: UNKNOWN INTERNAL TYPE !!!
MaxFileSize = "209715200"

That makes us unsure that our config is really appied and effective, or due to that error clamd will revert to the default MaxScanSize (100M)?

teoberi commented 12 months ago

Have you tried the changes here? It works for me.