mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
- Update to version 0.23
PR: ports/133876 Submitted by: garga Approved by: maintainer timeout (> 2 weeks)
This commit is contained in:
parent
8fd14a66d0
commit
9df6f0239a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=233543
@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= mod_clamav
|
||||
PORTVERSION= 0.22
|
||||
PORTREVISION= 4
|
||||
PORTVERSION= 0.23
|
||||
CATEGORIES= www security
|
||||
MASTER_SITES= http://software.othello.ch/mod_clamav/ \
|
||||
http://www.kommunity.net/download/mod_clamav/
|
||||
@ -16,7 +15,7 @@ MAINTAINER= tmueko@kommunity.net
|
||||
COMMENT= Scans content delivered by the Apache20 proxy module for viruses
|
||||
|
||||
USE_AUTOTOOLS= libtool:15
|
||||
USE_APACHE= 2.0
|
||||
USE_APACHE= 2.2
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
.if defined(WITH_CLAMAVDEVEL)
|
||||
@ -36,6 +35,12 @@ LDFLAGS+= -L${LOCALBASE}/lib \
|
||||
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \
|
||||
LDFLAGS="${LDFLAGS}"
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,REG_EXTENDED,AP_REG_EXTENDED,' \
|
||||
${WRKSRC}/config.c
|
||||
@${REINPLACE_CMD} -e '/^AC_CHECK_HEADERS/ s,regex.h ,,g' \
|
||||
${WRKSRC}/configure.in
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (mod_clamav-0.22.tar.gz) = 63d1a1fd02418a870e483a1a642dfb92
|
||||
SHA256 (mod_clamav-0.22.tar.gz) = f13c18ccfb6e40b7315db32c26c3602e14a4c9b7bf8e2ff23df87aca2e5f4341
|
||||
SIZE (mod_clamav-0.22.tar.gz) = 308718
|
||||
MD5 (mod_clamav-0.23.tar.gz) = 32c7b285dfdff5d13371b92ebe73b352
|
||||
SHA256 (mod_clamav-0.23.tar.gz) = 42e2e24c2b5dd816c6de72b60a1ad1647f6dc3ceeb400061edeba03ff231c192
|
||||
SIZE (mod_clamav-0.23.tar.gz) = 344930
|
||||
|
@ -1,122 +0,0 @@
|
||||
--- 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"
|
||||
),
|
13
www/mod_clamav/files/patch-mod_clamav.h
Normal file
13
www/mod_clamav/files/patch-mod_clamav.h
Normal file
@ -0,0 +1,13 @@
|
||||
--- mod_clamav.h.orig 2009-04-11 10:31:32.000000000 -0300
|
||||
+++ mod_clamav.h 2009-04-11 10:32:11.000000000 -0300
|
||||
@@ -70,9 +70,7 @@
|
||||
#ifdef HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#endif /* HAVE_ALLOCA_H */
|
||||
-#ifdef HAVE_REGEX_H
|
||||
-#include <regex.h>
|
||||
-#endif /* HAVE_REGEX_H */
|
||||
+#include <ap_regex.h>
|
||||
|
||||
#ifndef CLAMAV_DEBUG
|
||||
#define CLAMAV_DEBUG 0
|
@ -1,3 +1,3 @@
|
||||
libexec/apache2/mod_clamav.so
|
||||
%%APACHEMODDIR%%/mod_clamav.so
|
||||
@exec %D/sbin/apxs -e -A -n clamav %D/%f
|
||||
@exec %D/sbin/apxs -e -A -n clamav %D/%f
|
||||
|
Loading…
Reference in New Issue
Block a user