Modernize LibClamAV API usage #30

Merged
blu.256 merged 2 commits from fix/klammail-libclamav into master 3 years ago
Collaborator

Based on official docs and this example.

This change affects Klammail.

This should resolve issue #29.

This change is not backwards-compatible with older versions of ClamAV (but that's probably fine; one wants to use the latest version of ClamAV for security reasons anyway).

Based on official docs and this [example](https://github.com/Cisco-Talos/clamav/blob/main/examples/ex1.c). This change affects Klammail. This should resolve issue #29. This change is not backwards-compatible with older versions of ClamAV (but that's probably fine; one wants to use the latest version of ClamAV for security reasons anyway).
blu.256 added 1 commit 3 years ago
80c548d4be
Modernize LibClamAV API usage
blu.256 added the PR/rfc label 3 years ago
Owner

According to the related ClamAV commit, this change seems to be performed in ClamAV 0.101.0. If I remember well, because of on-access scanning we require ClamAV >= 0.102.0. So the change in this PR should not mean a problem. The question is whether in ConfigureChecks.cmake adjust libclamav detection to libclamav>=0.102.0?

According to the [related ClamAV commit](https://github.com/Cisco-Talos/clamav/commit/d7979d4ff7bab37d37fa32ff615e5a26d6ac1fb3), this change seems to be performed in ClamAV 0.101.0. If I remember well, because of on-access scanning we require ClamAV >= 0.102.0. So the change in this PR should not mean a problem. The question is whether in `ConfigureChecks.cmake` adjust libclamav detection to `libclamav>=0.102.0`?
Owner

The question is whether in ConfigureChecks.cmake adjust libclamav detection to libclamav>=0.102.0?

Probably a good idea IMO

> The question is whether in ConfigureChecks.cmake adjust libclamav detection to libclamav>=0.102.0? Probably a good idea IMO
blu.256 added 1 commit 3 years ago
88c8b7429e
Added ClamAV > 0.102.0 check.
Poster
Collaborator

Check added; successfully tested with ClamAV versions 0.100.2 and 0.103.2.

Check added; successfully tested with ClamAV versions 0.100.2 and 0.103.2.
SlavekB reviewed 3 years ago
SlavekB left a comment
Owner

I made a test on Debian 9.x (Stretch) – the oldest supported for Klamav and everything is okay. However, there is a question on the test in ConfigureChecks.cmake, see below.

I made a test on Debian 9.x (Stretch) – the oldest supported for Klamav and everything is okay. However, there is a question on the test in `ConfigureChecks.cmake`, see below.
if( NOT LIBCLAMAV_FOUND )
tde_message_fatal( "ClamAV is required but not found on your system" )
else()
if( LIBCLAMAV_VERSION VERSION_LESS "0.102.0" )
Owner

Is a question of whether to deal with a separate condition and message or use the condition directly in the library detection and leave the job to CMake:

pkg_search_module( LIBCLAMAV libclamav>=0.102.0 )
Is a question of whether to deal with a separate condition and message or use the condition directly in the library detection and leave the job to CMake: ``` pkg_search_module( LIBCLAMAV libclamav>=0.102.0 ) ```
Poster
Collaborator

Oh, I did not know this was possible. This seems like a better solution.

Oh, I did not know this was possible. This seems like a better solution.
blu.256 marked this conversation as resolved
blu.256 force-pushed fix/klammail-libclamav from 88c8b7429e to ae3079ad20 3 years ago
blu.256 force-pushed fix/klammail-libclamav from ae3079ad20 to 2206a914d6 3 years ago
SlavekB approved these changes 3 years ago
SlavekB left a comment
Owner

It looks good.

It looks good.
blu.256 removed the PR/rfc label 3 years ago
blu.256 merged commit 2206a914d6 into master 3 years ago
blu.256 added this to the R14.0.11 release milestone 3 years ago
SlavekB deleted branch fix/klammail-libclamav 3 years ago

Reviewers

SlavekB approved these changes 3 years ago
The pull request has been merged as 2206a914d6.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/klamav#30
Loading…
There is no content yet.