Re: [clamav-users] Incompatible clamav.h changes

"Micah Snyder (micasnyd)" <[email protected]> Wed, 27 Feb 2019 19:48:44 +0000
Newsgroups gmane.comp.security.virus.clamav.user,gmane.comp.security.virus.clamav.devel
Message-ID <79DB96A5-CD80-4629-8688-3DB37C831BBE__20569.8626510397$1551297050$gmane$org@cisco.com>
Hi Ale,

You're correct, there are non-backwards compatible changes in clamav.h in version 0.101.  The libclamav major version number as also increased to highlight the incompatibility.  

The changes are mentioned somewhat briefly in the release notes:
https://blog.clamav.net/2018/12/clamav-01010-has-been-released.html
https://github.com/Cisco-Talos/clamav-devel/blob/clamav-0.101.1/NEWS.md#some-of-the-more-obvious-changes 

CL_SCAN_STDOPT previously enabled all parsers, plus heuristic alerts (which were sometimes/inconsistently referred to as algorithmic detection): 
https://github.com/Cisco-Talos/clamav-devel/blob/clamav-0.100.2/libclamav/clamav.h#L181

In 0.101, CL_SCAN_STDOPT has gone away.  Instead, you can get the same functionality by setting the following, as shown in the example (https://github.com/Cisco-Talos/clamav-devel/blob/dev/0.101/examples/ex1.c#L93):

    options.parse |= ~0; /* enable all parsers */
    options.general |= CL_SCAN_GENERAL_HEURISTICS; /* enable heuristic alert options */

Regards,
Micah

Micah Snyder
ClamAV Development
Talos
Cisco Systems, Inc.
 

On 2/27/19, 2:02 PM, "clamav-users on behalf of Alessandro Vesely via clamav-users" <[email protected] on behalf of [email protected]> wrote:

    Hi,
    
    clamav.h has changed in version 101, resulting in compile errors like so:
    
    avfilter.c:270:21: error: ‘CL_SCAN_STDOPT’ undeclared (first use in this
    function); did you mean ‘CL_DB_STDOPT’?
       a->scan_options = CL_SCAN_STDOPT;
                         ^~~~~~~~~~~~~~
                         CL_DB_STDOPT
    
    Is there some documentation about those changes, ways to detect them at
    configure time, how to adapt client code, and the like?
    
    Thanks in advance
    Ale
    -- 
    
    
    
    
    
    _______________________________________________
    
    clamav-users mailing list
    [email protected]
    https://lists.clamav.net/mailman/listinfo/clamav-users
    
    
    Help us build a comprehensive ClamAV guide:
    https://github.com/vrtadmin/clamav-faq
    
    http://www.clamav.net/contact.html#ml
    

_______________________________________________

clamav-devel mailing list
[email protected]
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Bugzilla: http://bugzilla.clamav.net

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml