Re: [clamav-users] Freshclam 0.100.0 returning 1 on up-to-date

Mark Allan <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.devel,gmane.comp.security.virus.clamav.user
Message-ID <CAGSVJMzBHVYTKkjtSjej_d0Z84M7ZDboZQqQ=Ua1DJc5_gjXAQ@mail.gmail.com>
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 <[email protected]> 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
> [email protected]
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.