[Avcheck] Pre-announce: avcheck-0.9

Michael Tokarev mjt@tls.msk.ru
Sat, 27 Jul 2002 16:34:44 +0400


Ralf Hildebrandt wrote:
> 
> On Sat, Jul 13, 2002 at 05:20:14PM +0200, Ralf Hildebrandt wrote:
> 
> > > This is probably a good idea.
> >
> > Especially since I have another virusscanner behind avcheck (which
> > NEVER gets to get any viruses, since avcheck gets them all)
> 
> So, what's the patch?

Oh well... ;)  Ok, here it is.  But please wait some more time.
And kill me please if I'll not release 0.9 today. ;)

Index: avcheck.c
===================================================================
RCS file: /var/cvs/avcheck/avcheck.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- avcheck.c   27 Jul 2002 12:28:40 -0000      1.16
+++ avcheck.c   27 Jul 2002 12:32:22 -0000      1.17
@@ -1,4 +1,4 @@
-/* $Id: avcheck.c,v 1.16 2002/07/27 12:28:40 mjt Exp $
+/* $Id: avcheck.c,v 1.17 2002/07/27 12:32:22 mjt Exp $
  * avcheck mail virus scanner client.
  * Michael Tokarev <mjt@corpit.ru>
  * Public domain.
@@ -424,6 +424,12 @@
      if it encountered some error(s), so that this is not really
      "OK result." */
     return 0;
+  case 1: /*XXXX virus scan was incomplete */
+    /* this returned when AVP is unable to parse file structure for
+       various reasons.  It's bad idea to ignore this code in general,
+       but for now it seems it should be ignored.  Maybe next time I
+       should add some logging here instead of *silently* ignoring it. */
+    return 0;
   case 4: /* known virus(es) detected */
   case 3: /* suspicious object(s) found */
   case 2: /* Found corrupted or changed virus (usually false positive,
@@ -431,8 +437,7 @@
     break;
   default:
   /* some more additional codes to help diagnose problem(s) */
-  if ((r & 0xcf) == 1) p = "virus scan was incomplete";
-  else if ((r & 0xcf) == 7) p = "kavdaemon is corrupted";
+  if ((r & 0xcf) == 7) p = "kavdaemon is corrupted";
   else if ((r & 0xcf) == 0x0f)
     p = "kavdaemon wants confirmation -- set InfectedAction to 0";
   else if (r & 0x80) p = "kavdaemon integrity failed";