Menu

#112 ClamAV 0.101.0 Change API

modules-0.5.x
open
nobody
None
1
2019-01-13
2019-01-08
No

The ClamAV folks have changed the API slightly in 0.101.0 and this breaks the compilation of clamav_mod.c, and hence the whole clamav module.

Has anyone looked at it yet?

Discussion

  • fest3er

    fest3er - 2019-01-10

    Specifically, it starts with:
    clamav_mod.c:126:33: error: 'CL_SCAN_STDOPT' undeclared here (not in a function)
    See https://blog.clamav.net/2018/12/clamav-01010-has-been-released.html

    Also, from their NEWS.md:

    • Libclamav API changes:
    • The following scanning functions now require a filename argument.
      This will enable ClamAV to report more details warning and error
      information in the future, and will also allow for more sensible temp
      file names. The filename argument may be NULL if a filename is not
      available.
      • cl_scandesc
      • cl_scandesc_callback
      • cl_scanmap_callback
    • Scanning options have been converted from a single flag bit-field into
      a structure of multiple categorized flag bit-fields. This change enabled
      us to add new scanning options requested by the community. In addition,
      the name of each scan option has changed a little.
      As a result, the API changes will require libclamav users to modify
      how they initialize and pass scan options into calls such as cl_scandesc().
      For details:
     

    Last edit: fest3er 2019-01-10
  • Frank Crawford

    Frank Crawford - 2019-01-10

    Yes, although it all really lies around the changes to cl_scandesc, both in the argument count, and the scanning options.

     
  • Frank Crawford

    Frank Crawford - 2019-01-10

    P.S. and you need to ensure you get 0.101.1 (released in the last few days), as 0.101.0 is broken anyway, and won't compile correctly.

     
  • Frank Crawford

    Frank Crawford - 2019-01-13

    Here is a patch I created that seems to fix the issue.

    Note, that I've defined a new definition HAVE_LIBCLAMAV_0101, similar to previous ones, but it is just an increment as it still requires the earlier values also set.

    Note, though, all I'll promise is that it seems to work for me.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB