aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2009-03-27 11:53:07 +0000
committerRenato Botelho <garga@FreeBSD.org>2009-03-27 11:53:07 +0000
commitb5a9f423503aebaca704f1f6cf4ae2f485fc5ea1 (patch)
treee217dbc778a52087c20ecaea92beea91b2266052 /security
parentd253acf464b19446c05f5daaeadfa06ee7126cb7 (diff)
downloadports-b5a9f423503aebaca704f1f6cf4ae2f485fc5ea1.tar.gz
ports-b5a9f423503aebaca704f1f6cf4ae2f485fc5ea1.zip
Notes
Diffstat (limited to 'security')
-rw-r--r--security/clamassassin/Makefile2
-rw-r--r--security/clamcour/Makefile11
-rw-r--r--security/clamcour/files/patch-src__clam.cpp68
-rw-r--r--security/clamsmtp/Makefile1
-rw-r--r--security/clamtk/Makefile1
-rw-r--r--security/p5-File-Scan-ClamAV/Makefile2
-rw-r--r--security/py-clamav/Makefile4
-rw-r--r--security/py-clamav/files/patch-pyclamav.c120
-rw-r--r--security/spybye/Makefile2
-rw-r--r--security/squidclamav/Makefile2
10 files changed, 192 insertions, 21 deletions
diff --git a/security/clamassassin/Makefile b/security/clamassassin/Makefile
index e3c7b67cda61..ecaca0f65ce2 100644
--- a/security/clamassassin/Makefile
+++ b/security/clamassassin/Makefile
@@ -7,7 +7,7 @@
PORTNAME= clamassassin
PORTVERSION= 1.2.4
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= http://jameslick.com/clamassassin/ \
http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/
diff --git a/security/clamcour/Makefile b/security/clamcour/Makefile
index 6b0ef35743f8..352626875aa0 100644
--- a/security/clamcour/Makefile
+++ b/security/clamcour/Makefile
@@ -7,7 +7,7 @@
PORTNAME= clamcour
PORTVERSION= 0.3.8
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= security mail
MASTER_SITES= http://www.becrux.com/pages/projects/clamcour/
@@ -15,7 +15,7 @@ MAINTAINER= bsd@dino.sk
COMMENT= ClamAV courier filter
BUILD_DEPENDS= courier-config:${PORTSDIR}/mail/courier
-LIB_DEPENDS= clamav.5:${PORTSDIR}/security/clamav
+LIB_DEPENDS= clamav.6:${PORTSDIR}/security/clamav
GNU_CONFIGURE= yes
@@ -24,10 +24,15 @@ CONFIGURE_ARGS= --with-clamav-config=${LOCALBASE}/bin \
CPPFLAGS+= -I${LOCALBASE}/include
CFLAGS+= ${PTHREAD_CFLAGS} -I${LOCALBASE}/include
LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
-CONFIGURE_ENV= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}"
MAN1= clamcour.1
PLIST_DIRS= etc/courier/clamcour
PLIST_FILES= libexec/filters/clamcour
+post-patch:
+ @${REINPLACE_CMD} -e 's/^CXXFLAGS *=/CXXFLAGS?=/g' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e '/cl_limits/d; s/cl_node/cl_engine/' \
+ ${WRKSRC}/src/clam.h
+
.include <bsd.port.mk>
diff --git a/security/clamcour/files/patch-src__clam.cpp b/security/clamcour/files/patch-src__clam.cpp
index f9f8414483a8..0df14d48ad1e 100644
--- a/security/clamcour/files/patch-src__clam.cpp
+++ b/security/clamcour/files/patch-src__clam.cpp
@@ -1,22 +1,66 @@
---- src/clam.cpp.orig Sun Oct 1 20:01:37 2006
-+++ src/clam.cpp Tue Feb 20 16:04:03 2007
-@@ -78,8 +78,8 @@
- memset(&limits,0,sizeof(struct cl_limits));
- root = NULL;
+--- src/clam.cpp.orig 2006-10-01 15:01:37.000000000 -0300
++++ src/clam.cpp 2009-03-25 15:08:59.000000000 -0300
+@@ -52,8 +52,7 @@
+ #include "clam.h"
+ #include "exception.h"
+
+-struct cl_node *cClamAv::root;
+-struct cl_limits cClamAv::limits;
++struct cl_engine *cClamAv::root;
+ int cClamAv::counter = 0;
+ int cClamAv::scanTaskCounter = 0;
+ pthread_mutex_t cClamAv::counterMutex = PTHREAD_MUTEX_INITIALIZER;
+@@ -75,14 +74,16 @@
+
+ if (!(counter++))
+ {
+- memset(&limits,0,sizeof(struct cl_limits));
+- root = NULL;
++ if ((err = cl_init(CL_INIT_DEFAULT)))
++ throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_init",err);
++
++ root = cl_engine_new();
- if ((err = cl_loaddbdir(cl_retdbdir(), &root, &signo)))
- throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_loaddbdir",err);
-+ if ((err = cl_load(cl_retdbdir(), &root, &signo, CL_DB_STDOPT)))
++ if ((err = cl_load(cl_retdbdir(), root, &signo, CL_DB_STDOPT)))
+ throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_load",err);
- if ((err = cl_build(root)))
- throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_build",err);
-@@ -214,7 +214,7 @@
+- if ((err = cl_build(root)))
+- throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_build",err);
++ if ((err = cl_engine_compile(root)))
++ throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_engine_compile",err);
+
+ if ((err = pthread_attr_init(&thattr)))
+ throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"pthread_attr_init",err,1);
+@@ -119,7 +120,7 @@
+ {
+ pthread_kill(thid,SIGUSR2);
+
+- cl_free(root);
++ cl_engine_free(root);
+ root = NULL;
+ }
+ }
+@@ -144,7 +145,6 @@
+ virus_name,
+ NULL,
+ root,
+- &limits,
+ CL_SCAN_ARCHIVE|CL_SCAN_MAIL|CL_SCAN_OLE2|CL_SCAN_PE|
+ CL_SCAN_HTML|CL_SCAN_BLOCKBROKEN) : CL_CLEAN);
+ else
+@@ -212,10 +212,10 @@
+ {
+ if ((err = pthread_mutex_lock(&(ptr->dbMutex))))
throw cException(CLAMAV_TASK_NAME,"taskProc","pthread_mutex_lock(dbMutex)",err);
- cl_free(ptr->root);
+- cl_free(ptr->root);
++ cl_engine_free(ptr->root);
ptr->root = NULL;
- cl_loaddbdir(cl_retdbdir(), &(ptr->root), &signo);
-+ cl_load(cl_retdbdir(), &(ptr->root), &signo, CL_DB_STDOPT);
- cl_build(ptr->root);
+- cl_build(ptr->root);
++ cl_load(cl_retdbdir(), ptr->root, &signo, CL_DB_STDOPT);
++ cl_engine_compile(ptr->root);
if ((err = pthread_mutex_unlock(&(ptr->dbMutex))))
throw cException(CLAMAV_TASK_NAME,"taskProc","pthread_mutex_unlock(dbMutex)",err,1);
+ syslog(LOG_INFO,"cClamDBTask -> database updated");
diff --git a/security/clamsmtp/Makefile b/security/clamsmtp/Makefile
index 8e94c21e962a..088a88cd00db 100644
--- a/security/clamsmtp/Makefile
+++ b/security/clamsmtp/Makefile
@@ -7,6 +7,7 @@
PORTNAME= clamsmtp
PORTVERSION= 1.10
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://memberwebs.com/stef/software/clamsmtp/
diff --git a/security/clamtk/Makefile b/security/clamtk/Makefile
index 7bb46b7e0351..ffa79589f501 100644
--- a/security/clamtk/Makefile
+++ b/security/clamtk/Makefile
@@ -7,6 +7,7 @@
PORTNAME= clamtk
PORTVERSION= 4.10
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= SF
diff --git a/security/p5-File-Scan-ClamAV/Makefile b/security/p5-File-Scan-ClamAV/Makefile
index 28ce26791281..2f12ed6707be 100644
--- a/security/p5-File-Scan-ClamAV/Makefile
+++ b/security/p5-File-Scan-ClamAV/Makefile
@@ -7,7 +7,7 @@
PORTNAME= File-Scan-ClamAV
PORTVERSION= 1.8
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= security perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
diff --git a/security/py-clamav/Makefile b/security/py-clamav/Makefile
index 8af1fd27f40c..999db46cd02e 100644
--- a/security/py-clamav/Makefile
+++ b/security/py-clamav/Makefile
@@ -7,7 +7,7 @@
PORTNAME= clamav
PORTVERSION= 0.4.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security python
MASTER_SITES= http://xael.org/norman/python/pyclamav/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -16,7 +16,7 @@ DISTNAME= py${PORTNAME}-${PORTVERSION}
MAINTAINER= mnag@FreeBSD.org
COMMENT= A python binding to libclamav written in C
-LIB_DEPENDS= clamav.5:${PORTSDIR}/security/clamav
+LIB_DEPENDS= clamav.6:${PORTSDIR}/security/clamav
DIST_SUBDIR= python
USE_PYTHON= yes
diff --git a/security/py-clamav/files/patch-pyclamav.c b/security/py-clamav/files/patch-pyclamav.c
new file mode 100644
index 000000000000..5785478ff497
--- /dev/null
+++ b/security/py-clamav/files/patch-pyclamav.c
@@ -0,0 +1,120 @@
+--- pyclamav.c.orig 2009-03-24 18:25:44.000000000 -0300
++++ pyclamav.c 2009-03-24 18:25:51.000000000 -0300
+@@ -33,25 +33,6 @@
+
+ /* ********************************************************* */
+
+-/* To be able to compile with
+- releases 0.75 of libclamav
+-
+- Where cl_free was cl_freetrie
+- and cl_build was cl_buildtrie
+- CL_SCAN_STDOPT did not exist
+-*/
+-#ifndef CL_SCAN_STDOPT
+-#define CL_SCAN_STDOPT CL_RAW | CL_ARCHIVE | CL_MAIL | CL_DISABLERAR | CL_OLE2 | CL_ENCRYPTED
+-void cl_free(struct cl_node *rootnode) {
+- cl_freetrie(rootnode);
+- return;
+-}
+-
+-int cl_build(struct cl_node *rootnode) {
+- return cl_buildtrie(rootnode);
+-}
+-#endif
+-
+ /* For python prior to 2.3 */
+ #ifndef PyMODINIT_FUNC
+ #define PyMODINIT_FUNC void
+@@ -68,8 +49,7 @@
+ unsigned int signumber = 0;
+
+ /* Structures for clamav */
+-struct cl_node *root = NULL;
+-struct cl_limits limits;
++struct cl_engine *root = NULL;
+ struct cl_stat dbstat;
+
+
+@@ -86,21 +66,22 @@
+ if (cl_statchkdir(&dbstat) == 1)
+ {
+ /* free the tree */
+- cl_free(root);
++ cl_engine_free(root);
+ signumber=0;
+ root=NULL;
+
+ /* Load DB */
+- if((ret = cl_load(cl_retdbdir(), &root, &signumber, CL_DB_STDOPT))) {
++ if((ret = cl_load(cl_retdbdir(), root, &signumber, CL_DB_STDOPT)) != CL_SUCCESS) {
+ /* Raise exception with error message */
+ PyErr_SetString(PyclamavError, cl_strerror(ret));
++ cl_engine_free(root);
+ return -2;
+ }
+
+ /* build the final tree */
+- if((ret = cl_build(root))) {
++ if((ret = cl_engine_compile(root)) != CL_SUCCESS) {
+ /* free the partial tree */
+- cl_free(root);
++ cl_engine_free(root);
+ /* Raise exception with error message */
+ PyErr_SetString(PyclamavError, cl_strerror(ret));
+ return -2;
+@@ -231,7 +212,7 @@
+ return NULL;
+ }
+
+- ret = cl_scanfile(file_to_scan, &virname, &size, root, &limits, CL_SCAN_STDOPT);
++ ret = cl_scanfile(file_to_scan, &virname, &size, root, CL_SCAN_STDOPT);
+
+ /* Test return code */
+ switch (ret) {
+@@ -278,17 +259,28 @@
+ /* Set documentation string for the module */
+ PyDict_SetItemString(dict, "__doc__", PyString_FromString("pyclamav :\n\n This is a python binding to the C libclamav library\n (from the Clamav project - http://www.clamav.net).\n It can be used to easily allow a Python script to scan\n a file or a buffer against known viruses.\n\nAuthor : Alexandre Norman [norman@xael.org]\n\nFunctions :\n - scanfile(string filename) : Scan a file for virus.\n - get_numsig() : Return the number of known signatures.\n - get_version() : Return the version of Clamav.\n - version() : Return the version of pyclamav.\n"));
+
++ if((ret = cl_init(CL_INIT_DEFAULT)) != CL_SUCCESS) {
++ /* Raise exception with error message */
++ PyErr_SetString(PyclamavError, cl_strerror(ret));
++ return;
++ }
+
+- if((ret = cl_load(cl_retdbdir(), &root, &signumber, CL_DB_STDOPT))) {
++ if(!(root = cl_engine_new())) {
++ PyErr_SetString(PyclamavError, "Can't create new engine.");
++ return;
++ }
++
++ if((ret = cl_load(cl_retdbdir(), root, &signumber, CL_DB_STDOPT)) != CL_SUCCESS) {
+ /* Raise exception with error message */
+ PyErr_SetString(PyclamavError, cl_strerror(ret));
++ cl_engine_free(root);
+ return;
+ }
+
+ /* build the final tree */
+- if((ret = cl_build(root))) {
++ if((ret = cl_engine_compile(root)) != CL_SUCCESS) {
+ /* free the partial tree */
+- cl_free(root);
++ cl_engine_free(root);
+ /* Raise exception with error message */
+ PyErr_SetString(PyclamavError, cl_strerror(ret));
+ return;
+@@ -301,13 +293,6 @@
+
+
+
+- /* set up archive limits */
+- memset(&limits, 0, sizeof(struct cl_limits));
+- limits.maxfiles = 1000; /* max files */
+- limits.maxfilesize = 10 * 1048576; /* maximal archived file size == 10 Mb */
+- limits.maxreclevel = 5; /* maximal recursion level */
+- limits.archivememlim = 0; /* disable memory limit for bzip2 scanner */
+-
+ return ;
+ }
+
diff --git a/security/spybye/Makefile b/security/spybye/Makefile
index 7da0ed9064d1..a58efac80a26 100644
--- a/security/spybye/Makefile
+++ b/security/spybye/Makefile
@@ -27,7 +27,7 @@ MAN1= spybye.1
.include <bsd.port.pre.mk>
.if defined(WITH_CLAMAV)
-LIB_DEPENDS+= clamav.5:${PORTSDIR}/security/clamav
+LIB_DEPENDS+= clamav.6:${PORTSDIR}/security/clamav
CONFIGURE_ARGS+= --with-libclamav=${PREFIX}/bin
.endif
diff --git a/security/squidclamav/Makefile b/security/squidclamav/Makefile
index c2ec82d0201a..e7cf0c81460e 100644
--- a/security/squidclamav/Makefile
+++ b/security/squidclamav/Makefile
@@ -7,7 +7,7 @@
PORTNAME= squidclamav
PORTVERSION= 3.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www.samse.fr/GPL/squidclamav/