Clam 2167 freshclam cld incremental update #740
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Freshclam: fix incremental update on CLD database
When adding the
cl_cvdunpack()API that (optionally) verifies thedatabase signature, we used it in libfreshclam in a place where it may
also unpack CLD database archives. CLD's may not be verified, because
the signature information is no longer valid after incremental update.
This commit fixes the issue by only verifying the unpack if the file is
a CVD and not a CLD.
Test: Add test for incremental update twice in a row
This is a regression test to ensure that freshclam can update from a CVD
to a CLD, and then update from the CLD to a (newer) CLD.
Fixes #736