Here's a Works For Me (TM) patch:

--- dansguardian-2.8.0.6-antivirus-6.4.4.1.orig/ClamAV.cpp
+++ dansguardian-2.8.0.6-antivirus-6.4.4.1/ClamAV.cpp
@@ -54,9 +54,36 @@
 #endif
       root = NULL;
     }
-  if ((ret = cl_loaddbdir (dbdir, &root, &no)))
+  unsigned int cl_options = CL_ARCHIVE | CL_MAIL | CL_OLE2
+#ifdef CL_SCAN_PE
+    | CL_SCAN_PE
+#else
+#warning "CL_SCAN_PE scan flag not supported"
+#endif
+#ifdef CL_SCAN_HTML
+    | CL_SCAN_HTML
+#else
+#warning "CL_SCAN_HTML scan flag not supported"
+#endif
+#ifdef CL_SCAN_BLOCKBROKEN
+    | (o.cl_detect_broken == 1 ? CL_SCAN_BLOCKBROKEN : 0)
+#else
+#warning "CL_SCAN_BLOCKBROKEN scan flag not supported"
+#endif
+#ifdef CL_SCAN_BLOCKENCRYPTED
+    | (o.cl_block_encrypted == 1 ? CL_SCAN_BLOCKENCRYPTED : 0)
+#else
+#ifdef CL_ENCRYPTED
+    | (o.cl_block_encrypted == 1 ? CL_ENCRYPTED : 0)
+#else
+#warning "CL_ENCRYPTED/CL_SCAN_BLOCKENCRYPTED scan flags not supported"
+#endif
+#endif
+    ;
+
+  if ((ret = cl_load (dbdir, &root, &no, cl_options)))
     {
-      syslog (LOG_ERR, "Error loading ClamAV DB: %s", cl_perror (ret));
+      syslog (LOG_ERR, "Error loading ClamAV DB: %s", cl_strerror (ret));
       return ret;
     }
   else
only in patch2:
unchanged:
--- dansguardian-2.8.0.6-antivirus-6.4.4.1.orig/ClamAV.hpp
+++ dansguardian-2.8.0.6-antivirus-6.4.4.1/ClamAV.hpp
@@ -39,7 +39,7 @@
 private:
   const char *virname;
   const char *err_str;
-  struct cl_node *root;
+  struct cl_engine *root;
   struct cl_limits limits;
   struct cl_stat dbstat;

-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        [EMAIL PROTECTED] |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

Reply via email to