Cisco-Talos / cvdupdate

ClamAV Private Database Mirror Updater Tool
Apache License 2.0
98 stars 35 forks source link

Change CVD to *only* delete signatures it manages. #34

Closed brentclark closed 2 years ago

brentclark commented 3 years ago

Good day I would like to report and make a pull request for cvdupdate.

What we found is. If cvdupdate co-shares a folder (in this case '/var/lib/clamav' ) with any third party signatures or files, on cleanup, cvdupdate will try to remove files it does not need too. e.g. clamav@mirror:~$ /opt/cvdupdate/bin/cvd clean all 2021-09-15 11:40:40 cvdupdate-1.0.2 INFO Deleting databases... 2021-09-15 11:40:40 cvdupdate-1.0.2 INFO Deleted: /var/lib/clamav/malware.expert.hdb 2021-09-15 11:40:40 cvdupdate-1.0.2 INFO Deleted: /var/lib/clamav/.bash_history 2021-09-15 11:40:40 cvdupdate-1.0.2 INFO Deleted: /var/lib/clamav/rfxn.ndb 2021-09-15 11:40:40 cvdupdate-1.0.2 INFO Deleted: /var/lib/clamav/shelter.ldb 2021-09-15 11:40:40 cvdupdate-1.0.2 INFO Deleted: /var/lib/clamav/daily-26290.cdiff

Please will you consider my pull request.

Many thanks Kind Regards Brent Clark

micahsnyder commented 3 years ago

This seems like a reasonable change to me. While I wouldn't recommend using cvdupdate in place of freshclam for a generic clamav install, I can see the value in using the default database directory so you can easily co-locate and serve both official and 3rd party signatures from one directory.

micahsnyder commented 3 years ago

I suppose cvd clean dbs should probably also clear the last modified, last checked, and local version fields as well.

brentclark commented 3 years ago

Hi there Many thanks Ill work on your suggestions. Im currently away.

Brent

micahsnyder commented 3 years ago

I'll work on your suggestions. I'm currently away.

Safe travels! Whenever you're ready is good.

micahsnyder commented 2 years ago

Sorry didn't realize this PR was abandoned in favor of the other. Will close.