[Clamav-devel] [clamav-users] Freshclam 0.100.0 returning 1 on up-to-date

Mark Allan markjallan at gmail.com
Wed Apr 11 10:02:13 EDT 2018


Looks like the problem actually stems from a new #define in
"freshclam/freshclamcodes.h".  Change the value of FC_UPTODATE from 1 to 0
and you'll get the old/correct functionality.  Patch below.

Cheers
Mark

diff -Naurw freshclamOrig/freshclamcodes.h freshclam/freshclamcodes.h
--- freshclamOrig/freshclamcodes.h 2018-04-11 14:50:44.000000000 +0100
+++ freshclam/freshclamcodes.h 2018-04-11 14:57:54.000000000 +0100
@@ -20,7 +20,7 @@
 #ifndef __FRESHCLAMCODES_H
 #define __FRESHCLAMCODES_H

-#define FC_UPTODATE        1
+#define FC_UPTODATE        0

 #define FCE_INIT          40
 #define FCE_CHECKS        41

On 10 April 2018 at 13:36, Andreas Schulze <andreas.schulze at datev.de> wrote:

> Am 10.04.2018 um 10:32 schrieb Pertti Karppinen:
> > Freshclam seems to be returning 1 on up-to-date situation, but man page
> > says it should return 0:
> > 0 : Database is up-to-date or successfully updated.
> >
> I think, I had the similar (same?) problem some times ago and fixed it
> with this patch:
>
> Description: freshclam should return 0 if only custom databases
>              are updated and all are up to date
> Author: A. Schulze
> URL: https://bugzilla.clamav.net/show_bug.cgi?id=11812
> ---
> This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> Index: clamav-0.100.0~beta/freshclam/manager.c
> ===================================================================
> --- clamav-0.100.0~beta.orig/freshclam/manager.c
> +++ clamav-0.100.0~beta/freshclam/manager.c
> @@ -2612,6 +2612,7 @@ downloadmanager (const struct optstruct
>                   updatecustomdb (opt->strarg, &signo, opts, localip,
>                                   logerr)) == 0)
>                  updated = 1;
> +            if (custret == 1) { /* not updated but up to date */ custret
> = 0; }
>              opt = opt->nextarg;
>          }
>      }
>
>
> --
> A. Schulze
> DATEV eG
> _______________________________________________
> clamav-users mailing list
> clamav-users at lists.clamav.net
> http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
>
>
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
>
> http://www.clamav.net/contact.html#ml
>



More information about the clamav-devel mailing list