[prev in list] [next in list] [prev in thread] [next in thread] 

List:       clamav-devel
Subject:    Re: [Clamav-devel] [clamav-users] Freshclam 0.100.0 returning 1 on up-to-date
From:       Mark Allan <markjallan () gmail ! com>
Date:       2018-04-11 14:02:13
Message-ID: CAGSVJMzBHVYTKkjtSjej_d0Z84M7ZDboZQqQ=Ua1DJc5_gjXAQ () mail ! gmail ! com
[Download RAW message or body]

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@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@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
>
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

http://www.clamav.net/contact.html#ml
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic