forked from Lainports/freebsd-ports
- Bump necessary PORTREVISIONS and fix some ports to new clamav API
This commit is contained in:
parent
d253acf464
commit
b5a9f42350
33 changed files with 346 additions and 51 deletions
|
|
@ -241,7 +241,7 @@ EXTRACT_ONLY+= mod_clamav-0.10.tar.bz2
|
|||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-modules_mod_xfer.c
|
||||
USE_CLAMAV= yes
|
||||
MODULES:=${MODULES}:mod_clamav
|
||||
LIB_DEPENDS+= clamav.5:${PORTSDIR}/security/clamav
|
||||
LIB_DEPENDS+= clamav.6:${PORTSDIR}/security/clamav
|
||||
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
|
||||
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
|
||||
PLIST_SUB= CLAMAV=""
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ EXTRACT_ONLY+= mod_clamav-0.10.tar.bz2
|
|||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-modules_mod_xfer.c
|
||||
USE_CLAMAV= yes
|
||||
MODULES:=${MODULES}:mod_clamav
|
||||
LIB_DEPENDS+= clamav.5:${PORTSDIR}/security/clamav
|
||||
LIB_DEPENDS+= clamav.6:${PORTSDIR}/security/clamav
|
||||
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
|
||||
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
|
||||
PLIST_SUB+= CLAMAV=""
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= assp
|
||||
PORTVERSION= 1.4.3.1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= SF
|
||||
DISTNAME= ${PORTNAME:U}_${PORTVERSION}-Install
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
PORTNAME= clamfilter
|
||||
PORTVERSION= 0.5
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.wyae.de/software/ensita-clamfilter/
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
PORTNAME= dspam-devel
|
||||
PORTVERSION= ${PORTVER_MAJ}${SNAP_DATE}
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= # set later
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
PORTNAME= dspam
|
||||
PORTVERSION= ${PORTVER_MAJ}${SNAP_DATE}
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= # set later
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= MailScanner
|
||||
PORTVERSION= 4.60.5
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.mailscanner.info/files/4/tar/
|
||||
PKGNAMESUFFIX= -devel
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= MailScanner
|
||||
PORTVERSION= 4.67.6
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.mailscanner.info/files/4/tar/
|
||||
DISTNAME= ${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
PORTNAME= ngmp
|
||||
PORTVERSION= 0.1.4
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= mail www
|
||||
MASTER_SITES= ftp://ftp.prevantage.com/releases/ \
|
||||
ftp://ftp2.prevantage.com/releases/
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= Clamd
|
||||
PORTVERSION= 1.04
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail perl5
|
||||
MASTER_SITES= CPAN
|
||||
MASTER_SITE_SUBDIR= ../by-authors/id/M/MS/MSERGEANT
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= Mail-ClamAV
|
||||
PORTVERSION= 0.20
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= mail perl5
|
||||
MASTER_SITES= CPAN
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= qscan
|
||||
PORTVERSION= 1.5
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= mail security
|
||||
MASTER_SITES= http://download.pureftpd.org/pub/qscan/ \
|
||||
ftp://ftp.pureftpd.org/pub/pure-ftpd/misc/qscan/
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= qsheff-II
|
||||
PORTVERSION= 2.1.r3
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.enderunix.org/qsheff/ \
|
||||
SF/qsheff
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= simscan
|
||||
PORTVERSION= 1.4.0
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= mail security
|
||||
MASTER_SITES= SF
|
||||
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.r/rc/}
|
||||
|
|
|
|||
|
|
@ -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}/
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= clamsmtp
|
||||
PORTVERSION= 1.10
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://memberwebs.com/stef/software/clamsmtp/
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= clamtk
|
||||
PORTVERSION= 4.10
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= SF
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= File-Scan-ClamAV
|
||||
PORTVERSION= 1.8
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= security perl5
|
||||
MASTER_SITES= CPAN
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
120
security/py-clamav/files/patch-pyclamav.c
Normal file
120
security/py-clamav/files/patch-pyclamav.c
Normal file
|
|
@ -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 ;
|
||||
}
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= squidclamav
|
||||
PORTVERSION= 3.5
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://www.samse.fr/GPL/squidclamav/
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= dtc
|
||||
PORTVERSION= 0.28.2.1
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= ftp://ftp.gplhost.com/pub/dtc/bsd/ \
|
||||
ftp://ftp.gplhost.fr/pub/dtc/bsd/ \
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ PORTEPOCH= 1
|
|||
CATEGORIES= www
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
DISTNAME= c_icap-${PORTVERSION}
|
||||
DISTNAME= c_icap-${PORTVERSION}rc2
|
||||
|
||||
MAINTAINER= tofig@freebsd.az
|
||||
COMMENT= An implementation of an ICAP server
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
MD5 (c_icap-060708.tar.gz) = 3f66d0647a9f8494b341e275f23cb194
|
||||
SHA256 (c_icap-060708.tar.gz) = 45348651329ef31770cbcd259187acca5fb22bd9c40f472e460edbb11192b7e0
|
||||
SIZE (c_icap-060708.tar.gz) = 481338
|
||||
MD5 (c_icap-060708rc2.tar.gz) = b501c420c071bdd499a117e9b416ed4f
|
||||
SHA256 (c_icap-060708rc2.tar.gz) = b2d3c620f65deb2a237bb8e7a39c8f8c744f8614f06f9837fc24734c756c1453
|
||||
SIZE (c_icap-060708rc2.tar.gz) = 435659
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= gurlchecker
|
||||
PORTVERSION= 0.10.1
|
||||
PORTREVISION= 10
|
||||
PORTREVISION= 11
|
||||
CATEGORIES= www gnome
|
||||
MASTER_SITES= http://labs.libre-entreprise.org/frs/download.php/%SUBDIR%/
|
||||
MASTER_SITE_SUBDIR= 547
|
||||
|
|
@ -51,7 +51,7 @@ CONFIGURE_ARGS+= --disable-tidy
|
|||
.endif
|
||||
|
||||
.if defined(WITH_CLAMAV)
|
||||
LIB_DEPENDS+= clamav.5:${PORTSDIR}/security/clamav
|
||||
LIB_DEPENDS+= clamav.6:${PORTSDIR}/security/clamav
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-clamav
|
||||
.endif
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@
|
|||
#
|
||||
|
||||
PORTNAME= havp
|
||||
PORTVERSION= 0.88
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 0.90
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= http://www.server-side.de/download/ \
|
||||
http://bio3k.softboard.ru/uploads/arch/
|
||||
http://bio3k.softboard.ru/uploads/arch/ \
|
||||
http://havp.hege.li/download/
|
||||
|
||||
MAINTAINER= b3k@mail.ru
|
||||
COMMENT= HTTP Antivirus Proxy
|
||||
|
||||
LIB_DEPENDS= clamav.5:${PORTSDIR}/security/clamav
|
||||
LIB_DEPENDS= clamav.6:${PORTSDIR}/security/clamav
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
MD5 (havp-0.88.tar.gz) = 751d1811bdc3f0d0cbc9e4ae451fdb2a
|
||||
SHA256 (havp-0.88.tar.gz) = 2de6babce45bac9e9b57ec7783ff6719cb3ef996331009c111ad8e263c9e6e3c
|
||||
SIZE (havp-0.88.tar.gz) = 116217
|
||||
MD5 (havp-0.90.tar.gz) = 7f3dc82f8472e2385869223bc0500431
|
||||
SHA256 (havp-0.90.tar.gz) = 01dee1f017bb93378e3fa7b4eab9deec031b8baa5e75442a147a58ee29460d65
|
||||
SIZE (havp-0.90.tar.gz) = 118013
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= mod_clamav
|
||||
PORTVERSION= 0.22
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= www security
|
||||
MASTER_SITES= http://software.othello.ch/mod_clamav/ \
|
||||
http://www.kommunity.net/download/mod_clamav/
|
||||
|
|
@ -27,10 +27,10 @@ IGNORE= mod_clamav only compile and run with apache-2.0.x
|
|||
.endif
|
||||
|
||||
.if defined(WITH_CLAMAVDEVEL)
|
||||
LIB_DEPENDS+= clamav.5:${PORTSDIR}/security/clamav-devel
|
||||
LIB_DEPENDS+= clamav.6:${PORTSDIR}/security/clamav-devel
|
||||
.else
|
||||
CLAMAV_PORT= security/clamav
|
||||
LIB_DEPENDS+= clamav.5:${PORTSDIR}/security/clamav
|
||||
LIB_DEPENDS+= clamav.6:${PORTSDIR}/security/clamav
|
||||
.endif
|
||||
|
||||
CONFIGURE_ARGS= --with-apxs=${PREFIX}/sbin/apxs \
|
||||
|
|
|
|||
122
www/mod_clamav/files/patch-mod_clamav.c
Normal file
122
www/mod_clamav/files/patch-mod_clamav.c
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
--- mod_clamav.c.orig 2008-01-05 14:14:27.000000000 -0200
|
||||
+++ mod_clamav.c 2009-03-25 15:07:37.000000000 -0300
|
||||
@@ -130,7 +130,7 @@
|
||||
} cl_daemon_t;
|
||||
|
||||
typedef struct cl_local_t {
|
||||
- struct cl_node *engine;
|
||||
+ struct cl_engine *engine;
|
||||
time_t lastreload;
|
||||
} cl_local_t;
|
||||
|
||||
@@ -159,7 +159,9 @@
|
||||
const char *dbdir; /* local: where are virus patterns */
|
||||
int port; /* daemon: clamd port number */
|
||||
char *socket; /* daemon: unix domain socket path */
|
||||
- struct cl_limits lim; /* clamav limits structure */
|
||||
+ int maxfiles;
|
||||
+ int maxfilesize;
|
||||
+ int maxreclevel;
|
||||
int trickle_interval;
|
||||
int trickle_size;
|
||||
int sizelimit;
|
||||
@@ -464,11 +466,20 @@
|
||||
unsigned int signo = 0;
|
||||
clamav_ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, "[%d] local init",
|
||||
(int)getpid());
|
||||
+
|
||||
+ /* initializa clam */
|
||||
+ if (0 != (ret = cl_init(CL_INIT_DEFAULT))) {
|
||||
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
|
||||
+ "[%d] cannot initialize clamav: %s", (int)getpid(),
|
||||
+ cl_strerror(ret));
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* make sure that rec->common->local is allocated */
|
||||
if (NULL == rec->common->local) {
|
||||
rec->common->local = (cl_local_t *)apr_palloc(rec->pool,
|
||||
sizeof(cl_local_t));
|
||||
- rec->common->local->engine = NULL;
|
||||
+ rec->common->local->engine = cl_engine_new();
|
||||
rec->common->local->lastreload = 0;
|
||||
}
|
||||
|
||||
@@ -478,7 +489,7 @@
|
||||
}
|
||||
|
||||
/* reload the database from the directory */
|
||||
- if (0 != (ret = cl_load(rec->dbdir, &rec->common->local->engine,
|
||||
+ if (0 != (ret = cl_load(rec->dbdir, rec->common->local->engine,
|
||||
&signo, CL_DB_STDOPT))) {
|
||||
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
|
||||
"[%d] cannot load clamav patterns: %s", (int)getpid(),
|
||||
@@ -706,7 +717,7 @@
|
||||
case MOD_CLAMAV_LOCAL:
|
||||
/* virus scan using local clamav library */
|
||||
return cl_scanfile(ctx->filename, virname, (unsigned long *)len,
|
||||
- rec->common->local->engine, &rec->lim, CL_ARCHIVE);
|
||||
+ rec->common->local->engine, CL_SCAN_ARCHIVE);
|
||||
break;
|
||||
case MOD_CLAMAV_DAEMON:
|
||||
/* set reasonable defaults for virname */
|
||||
@@ -1752,9 +1763,14 @@
|
||||
cfg->extendedlogging = 0;
|
||||
cfg->perms = 0640;
|
||||
cfg->sizelimit = 0;
|
||||
- cfg->lim.maxfiles = 100;
|
||||
- cfg->lim.maxfilesize = 10 * 1048576;
|
||||
- cfg->lim.maxreclevel = 8;
|
||||
+
|
||||
+ cfg->maxfiles = 100;
|
||||
+ cl_engine_set_num(cfg->common->local->engine, CL_ENGINE_MAX_FILES, &cfg->maxfiles);
|
||||
+ cfg->maxfilesize = 10 * 1048576;
|
||||
+ cl_engine_set_num(cfg->common->local->engine, CL_ENGINE_MAX_FILESIZE, &cfg->maxfilesize);
|
||||
+ cfg->maxreclevel = 8;
|
||||
+ cl_engine_set_num(cfg->common->local->engine, CL_ENGINE_MAX_RECURSION, &cfg->maxreclevel);
|
||||
+
|
||||
cfg->safetypes = apr_table_make(p, 0);
|
||||
cfg->safepatterns = apr_array_make(p, 64, sizeof(clamav_safepattern));
|
||||
cfg->safeuris = apr_array_make(p, 64, sizeof(clamav_safeuri));
|
||||
@@ -1800,12 +1816,12 @@
|
||||
child->shmname = parent->shmname;
|
||||
if (child->mutexname == NULL)
|
||||
child->mutexname = parent->mutexname;
|
||||
- if (child->lim.maxfiles == 0)
|
||||
- child->lim.maxfiles = parent->lim.maxfiles;
|
||||
- if (child->lim.maxfilesize == 0)
|
||||
- child->lim.maxfilesize = parent->lim.maxfilesize;
|
||||
- if (child->lim.maxreclevel == 0)
|
||||
- child->lim.maxreclevel = parent->lim.maxreclevel;
|
||||
+ if (child->maxfiles == 0)
|
||||
+ child->maxfiles = parent->maxfiles;
|
||||
+ if (child->maxfilesize == 0)
|
||||
+ child->maxfilesize = parent->maxfilesize;
|
||||
+ if (child->maxreclevel == 0)
|
||||
+ child->maxreclevel = parent->maxreclevel;
|
||||
if ((!child->tmpdir) && (parent->tmpdir))
|
||||
child->tmpdir = (char *)apr_pstrdup(p, parent->tmpdir);
|
||||
if (apr_is_empty_table(child->safetypes))
|
||||
@@ -2065,19 +2081,19 @@
|
||||
),
|
||||
AP_INIT_TAKE1(
|
||||
"ClamavMaxfiles", ap_set_int_slot,
|
||||
- (void *)APR_OFFSETOF(clamav_config_rec, lim.maxfiles),
|
||||
+ (void *)APR_OFFSETOF(clamav_config_rec, maxfiles),
|
||||
RSRC_CONF,
|
||||
"Maximum number of files in an archive"
|
||||
),
|
||||
AP_INIT_TAKE1(
|
||||
"ClamavMaxfilesize", ap_set_int_slot,
|
||||
- (void *)APR_OFFSETOF(clamav_config_rec, lim.maxfilesize),
|
||||
+ (void *)APR_OFFSETOF(clamav_config_rec, maxfilesize),
|
||||
RSRC_CONF,
|
||||
"Maximum archive size"
|
||||
),
|
||||
AP_INIT_TAKE1(
|
||||
"ClamavRecursion", ap_set_int_slot,
|
||||
- (void *)APR_OFFSETOF(clamav_config_rec, lim.maxreclevel),
|
||||
+ (void *)APR_OFFSETOF(clamav_config_rec, maxreclevel),
|
||||
RSRC_CONF,
|
||||
"Maximum recursion depth when analyzing archives"
|
||||
),
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= raqdevil
|
||||
PORTVERSION= 1.0
|
||||
PORTREVISION= 6
|
||||
PORTREVISION= 7
|
||||
CATEGORIES= www sysutils
|
||||
MASTER_SITES= http://www.raqdevil.com/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue