misc/131632: www/c-icap + latest clamav does not compile
Tofig Suleymanov
tofig at freebsd.az
Fri Feb 13 01:40:01 PST 2009
>Number: 131632
>Category: misc
>Synopsis: www/c-icap + latest clamav does not compile
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 13 09:40:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Tofig Suleymanov
>Release: FreeBSD 7.0-RELEASE-p4
>Organization:
BP
>Environment:
gw# uname -a
FreeBSD gw 7.0-RELEASE-p4 FreeBSD 7.0-RELEASE-p4 #1: Wed Sep 24 23:39:08 AZST 2008 root at gw:/usr/obj/usr/src/sys/GW i386
gw#
>Description:
www/c-icap is marked broken most probably because of problems compiling with latest versions of security/clamav.
According to the clamav changelog, the cl_load() function was introduced as a successor of cl_loaddb() and cl_loaddbdir() starting from Sat, Nov 12, 2005.
www/c-icap in its turn still tries to use cl_loaddbdir() which leads to compile-time errors.
>How-To-Repeat:
In order to repeat the problem just try to compile www/c-icap.
>Fix:
Patch file attached below utilizes cl_load() function instead old cl_loaddbdir() so that compilation finishes fine.
Place the patch to port's root directory: www/c-icap and do patch < c_icap.patch.txt
Patch attached with submission follows:
diff -ruN work/c_icap-030606rc1/services/clamav/srv_clamav.c work.patched/c_icap-030606rc1/services/clamav/srv_clamav.c
--- work/c_icap-030606rc1/services/clamav/srv_clamav.c 2006-06-06 22:08:13.000000000 +0500
+++ work.patched/c_icap-030606rc1/services/clamav/srv_clamav.c 2009-02-13 11:33:57.000000000 +0400
@@ -137,17 +137,18 @@
int srvclamav_init_service(service_module_t *this,struct icap_server_conf *server_conf){
- int ret,no=0,i;
+ int ret,i;
+ unsigned int no = 0;
+ unsigned int options = 0;
+ options = options & CL_DB_STDOPT;
magic_db=server_conf->MAGIC_DB;
scantypes=(int *)malloc(ci_magic_types_num(magic_db)*sizeof(int));
scangroups=(int *)malloc(ci_magic_groups_num(magic_db)*sizeof(int));
for(i=0;i<ci_magic_types_num(magic_db);i++) scantypes[i]=0;
for(i=0;i<ci_magic_groups_num(magic_db);i++) scangroups[i]=0;
-
-
ci_debug_printf(10,"Going to initialize srvclamav\n");;
- if((ret = cl_loaddbdir(cl_retdbdir(), &root, &no))) {
+ if((ret = cl_load(cl_retdbdir(), &root, &no, options))) {
ci_debug_printf(1,"cl_loaddbdir: %s\n", cl_perror(ret));
return 0;
}
@@ -161,7 +162,7 @@
limits.maxfiles = 0/*1000*/; /* max files */
limits.maxfilesize = 100 * 1048576; /* maximal archived file size == 100 Mb */
limits.maxreclevel = 5; /* maximal recursion level */
- limits.maxratio = 200; /* maximal compression ratio */
+ //limits.maxratio = 200; /* maximal compression ratio */
limits.archivememlim = 0; /* disable memory limit for bzip2 scanner */
return 1;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list