Pullup ticket 2422 - requested by martti latest update for clamav - pkgsrc/mail/clamav/Makefile 1.84 - pkgsrc/mail/clamav/distinfo 1.52 - pkgsrc/mail/clamav/patches/patch-ah 1.15 - pkgsrc/mail/clamav/patches/patch-ba 1.3 Module Name: pkgsrc Committed By: martti Date: Tue Jun 10 08:23:54 UTC 2008 Modified Files: pkgsrc/mail/clamav: Makefile distinfo pkgsrc/mail/clamav/patches: patch-ah patch-ba Log Message: Updated mail/clamav to 0.93.1 * libclamav/petite.c: fix possible invalid memory access (bb#1000) Reported by Damian Put * clamdscan/clamdscan.c: don't show scan summary when clamd cannot be contacted (bb#1041) * libclamav/hashtab.[ch], scanners.c: avoid using C99 flexible array members (bb #1039) * libclamav/unzip.c: correct the previous fix * libclamav/unzip.c: check for unprefixed bz2 - bb#1038 * libclamav/ole2_extract.c: revert last commit * libclamav/ole2_extract.c: use cli_unlink * libclamav/ole2_extract.c: partial scan of broken ole files * contrib/init/RedHat: check for already running clamav-milter (bb #823) * libclamav/regex: avoid name collisions on AIX (bb #947) sync with libc: minor cleanups * doc/clamdoc.tex: add a note about forking daemons (bb#906) * libclamav/Makefile.am: link .la files first, this should avoid linking to old libclamav as in bb #931 * libclamav/readdb.h: read daily.cfg stored inside .cld containers (bb#1006) * libclamav/mbox.c, shared/network.c: prevent uninitialized use of hostent structure (bb #1003). * libclamav/mspack.c: downgrade some error messages (bb#911) * clamav-milter: retrieve db version from daily.cld (bb#942) * libclamav/scanners.c: don't return CL_EMAX* error codes to applications (bb#1001) * clamscan/manager.c: print information about clean files when the RAR code is not compiled-in (bb#999) * libclamav/unzip.c: remove detection of Suspect.Zip and Exploit.Zip.ModifiedHeaders (bb#997) * libclamav: scan for embedded PEs inside OLE2 files (bb#914) * libclamav/cvd.c: add work-around for zlib issues with mixed data (bb#932) * libclamav/others.h: explicitely cast some constants (bb#936) * sigtool/sigtool.c: bb#938 (sigtool --list-sigs not working with .cld files) * libclamav/dconf.h: fix flag code assignment (bb #952) * libclamav/iana_tld.h, libclamav/phishcheck.c: update TLD list (bb #925)diff -r1.82.2.1 -r1.82.2.2 pkgsrc/mail/clamav/Makefile
(ghen)
@@ -1,28 +1,28 @@ | @@ -1,28 +1,28 @@ | |||
1 | # $NetBSD: Makefile,v 1.82.2.1 2008/04/16 19:23:54 ghen Exp $ | 1 | # $NetBSD: Makefile,v 1.82.2.2 2008/06/13 13:57:36 ghen Exp $ | |
2 | 2 | |||
3 | DISTNAME= clamav-${CLAMAV_VERSION} | 3 | DISTNAME= clamav-${CLAMAV_VERSION} | |
4 | PKGNAME= clamav-${CLAMAV_VERSION:S/-/./} | 4 | PKGNAME= clamav-${CLAMAV_VERSION:S/-/./} | |
5 | #PKGREVISION= 1 | 5 | #PKGREVISION= 1 | |
6 | CATEGORIES= mail | 6 | CATEGORIES= mail | |
7 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=clamav/} | 7 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=clamav/} | |
8 | 8 | |||
9 | MAINTAINER= grant@NetBSD.org | 9 | MAINTAINER= grant@NetBSD.org | |
10 | HOMEPAGE= http://www.clamav.net/ | 10 | HOMEPAGE= http://www.clamav.net/ | |
11 | COMMENT= Anti-virus toolkit | 11 | COMMENT= Anti-virus toolkit | |
12 | 12 | |||
13 | PKG_INSTALLATION_TYPES= overwrite pkgviews | 13 | PKG_INSTALLATION_TYPES= overwrite pkgviews | |
14 | 14 | |||
15 | CLAMAV_VERSION= 0.93 | 15 | CLAMAV_VERSION= 0.93.1 | |
16 | 16 | |||
17 | USE_LIBTOOL= yes | 17 | USE_LIBTOOL= yes | |
18 | 18 | |||
19 | GNU_CONFIGURE= yes | 19 | GNU_CONFIGURE= yes | |
20 | CONFIGURE_ARGS+= --disable-clamav | 20 | CONFIGURE_ARGS+= --disable-clamav | |
21 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | 21 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | |
22 | CONFIGURE_ARGS+= --with-dbdir=${CLAMAV_DBDIR} | 22 | CONFIGURE_ARGS+= --with-dbdir=${CLAMAV_DBDIR} | |
23 | CONFIGURE_ARGS+= --with-uid=${CLAMAV_USER} | 23 | CONFIGURE_ARGS+= --with-uid=${CLAMAV_USER} | |
24 | CONFIGURE_ARGS+= --with-group=${CLAMAV_GROUP} | 24 | CONFIGURE_ARGS+= --with-group=${CLAMAV_GROUP} | |
25 | CONFIGURE_ARGS+= --with-tcpwrappers | 25 | CONFIGURE_ARGS+= --with-tcpwrappers | |
26 | CONFIGURE_ARGS+= --with-zlib=${BUILDLINK_PREFIX.zlib} | 26 | CONFIGURE_ARGS+= --with-zlib=${BUILDLINK_PREFIX.zlib} | |
27 | 27 | |||
28 | .include "../../mk/bsd.prefs.mk" | 28 | .include "../../mk/bsd.prefs.mk" |
@@ -1,9 +1,9 @@ | @@ -1,9 +1,9 @@ | |||
1 | $NetBSD: distinfo,v 1.50.2.1 2008/04/16 19:23:54 ghen Exp $ | 1 | $NetBSD: distinfo,v 1.50.2.2 2008/06/13 13:57:36 ghen Exp $ | |
2 | 2 | |||
3 | SHA1 (clamav-0.93.tar.gz) = bae5f70331e8592e9c53a04517038890845d406d | 3 | SHA1 (clamav-0.93.1.tar.gz) = 3306f3cd289aac3793962c9834cd1bd500abfb0c | |
4 | RMD160 (clamav-0.93.tar.gz) = a1f301345983ed0606e2f2e13ef63275bd341cd4 | 4 | RMD160 (clamav-0.93.1.tar.gz) = 22296401b3ce96a268f0db224e72c31e69090895 | |
5 | Size (clamav-0.93.tar.gz) = 16134725 bytes | 5 | Size (clamav-0.93.1.tar.gz) = 17246314 bytes | |
6 | SHA1 (patch-ad) = db632e0e44e5a6c42cbe30726aa492881b5a5384 | 6 | SHA1 (patch-ad) = db632e0e44e5a6c42cbe30726aa492881b5a5384 | |
7 | SHA1 (patch-af) = e8d3f68e8017c5a6e7377cb03fc978a6581b7d5e | 7 | SHA1 (patch-af) = e8d3f68e8017c5a6e7377cb03fc978a6581b7d5e | |
8 | SHA1 (patch-ah) = 24d64a6abbddfb0986d73afbde7db8cf2f08ca3e | 8 | SHA1 (patch-ah) = b61efd44878e0b9a2bbc3c41e2e50d72b833fea3 | |
9 | SHA1 (patch-ba) = dbaeb15f9f52990abfccfd9b0674a300e0d22e05 | 9 | SHA1 (patch-ba) = 80208ac7e447776073a6e539f1deaa45d4195096 |
@@ -1,33 +1,33 @@ | @@ -1,33 +1,33 @@ | |||
1 | $NetBSD: patch-ah,v 1.13.2.1 2008/04/16 19:23:54 ghen Exp $ | 1 | $NetBSD: patch-ah,v 1.13.2.2 2008/06/13 13:57:36 ghen Exp $ | |
2 | 2 | |||
3 | Build fixes. | 3 | Build fixes. | |
4 | 4 | |||
5 | --- clamav-milter/clamav-milter.c.orig 2008-04-09 18:39:18.000000000 +0300 | 5 | --- clamav-milter/clamav-milter.c.orig 2008-05-27 13:40:29.000000000 +0300 | |
6 | +++ clamav-milter/clamav-milter.c 2008-04-15 10:32:16.000000000 +0300 | 6 | +++ clamav-milter/clamav-milter.c 2008-06-10 10:42:12.000000000 +0300 | |
7 | @@ -3824,7 +3824,7 @@ | 7 | @@ -3830,7 +3830,7 @@ | |
8 | * the postmaster, so include | 8 | * the postmaster, so include | |
9 | * some useful information | 9 | * some useful information | |
10 | */ | 10 | */ | |
11 | - fprintf(sendmail, _("The message %1$s sent from %2$s to\n"), | 11 | - fprintf(sendmail, _("The message %1$s sent from %2$s to\n"), | |
12 | + fprintf(sendmail, _("The message %s sent from %s to\n"), | 12 | + fprintf(sendmail, _("The message %s sent from %s to\n"), | |
13 | sendmailId, privdata->from); | 13 | sendmailId, privdata->from); | |
14 | else | 14 | else | |
15 | fprintf(sendmail, _("A message sent from %s to\n"), | 15 | fprintf(sendmail, _("A message sent from %s to\n"), | |
16 | @@ -3838,7 +3838,7 @@ | 16 | @@ -3844,7 +3844,7 @@ | |
17 | fprintf(sendmail, _("\nThe message in question has been quarantined as %s\n"), privdata->filename); | 17 | fprintf(sendmail, _("\nThe message in question has been quarantined as %s\n"), privdata->filename); | |
18 | 18 | |||
19 | if(hflag) { | 19 | if(hflag) { | |
20 | - fprintf(sendmail, _("\nThe message was received by %1$s from %2$s via %3$s\n\n"), | 20 | - fprintf(sendmail, _("\nThe message was received by %1$s from %2$s via %3$s\n\n"), | |
21 | + fprintf(sendmail, _("\nThe message was received by %s from %s via %s\n\n"), | 21 | + fprintf(sendmail, _("\nThe message was received by %s from %s via %s\n\n"), | |
22 | smfi_getsymval(ctx, "j"), privdata->from, | 22 | smfi_getsymval(ctx, "j"), privdata->from, | |
23 | smfi_getsymval(ctx, "_")); | 23 | smfi_getsymval(ctx, "_")); | |
24 | fputs(_("For your information, the original message headers were:\n\n"), sendmail); | 24 | fputs(_("For your information, the original message headers were:\n\n"), sendmail); | |
25 | @@ -5027,7 +5027,7 @@ | 25 | @@ -5034,7 +5034,7 @@ | |
26 | cli_dbgmsg("qfile move '%s' to '%s'\n", privdata->filename, newname); | 26 | cli_dbgmsg("qfile move '%s' to '%s'\n", privdata->filename, newname); | |
27 | 27 | |||
28 | if(move(privdata->filename, newname) < 0) { | 28 | if(move(privdata->filename, newname) < 0) { | |
29 | - logg(_("^Can't rename %1$s to %2$s\n"), | 29 | - logg(_("^Can't rename %1$s to %2$s\n"), | |
30 | + logg(_("^Can't rename %s to %s\n"), | 30 | + logg(_("^Can't rename %s to %s\n"), | |
31 | privdata->filename, newname); | 31 | privdata->filename, newname); | |
32 | free(newname); | 32 | free(newname); | |
33 | return -1; | 33 | return -1; |
@@ -1,19 +1,19 @@ | @@ -1,19 +1,19 @@ | |||
1 | $NetBSD: patch-ba,v 1.1.4.1 2008/04/16 19:23:54 ghen Exp $ | 1 | $NetBSD: patch-ba,v 1.1.4.2 2008/06/13 13:57:36 ghen Exp $ | |
2 | 2 | |||
3 | Fix pkg/36853 | 3 | Fix pkg/36853 | |
4 | 4 | |||
5 | --- clamav-milter/clamav-milter.c.orig 2008-04-15 10:32:16.000000000 +0300 | 5 | --- clamav-milter/clamav-milter.c.orig 2008-06-10 10:42:12.000000000 +0300 | |
6 | +++ clamav-milter/clamav-milter.c 2008-04-15 10:32:35.000000000 +0300 | 6 | +++ clamav-milter/clamav-milter.c 2008-06-10 10:42:58.000000000 +0300 | |
7 | @@ -90,6 +90,9 @@ | 7 | @@ -90,6 +90,9 @@ | |
8 | #if HAVE_RESOLV_H | 8 | #if HAVE_RESOLV_H | |
9 | #include <arpa/nameser.h> /* for HEADER */ | 9 | #include <arpa/nameser.h> /* for HEADER */ | |
10 | #include <resolv.h> | 10 | #include <resolv.h> | |
11 | +#if __RES >= 20030124 | 11 | +#if __RES >= 20030124 | |
12 | +#define HAVE_BIND9 | 12 | +#define HAVE_BIND9 | |
13 | +#endif | 13 | +#endif | |
14 | #endif | 14 | #endif | |
15 | #ifdef HAVE_UNISTD_H | 15 | #ifdef HAVE_UNISTD_H | |
16 | #include <unistd.h> | 16 | #include <unistd.h> | |
17 | @@ -513,6 +516,20 @@ | 17 | @@ -513,6 +516,20 @@ | |
18 | #endif /*SESSION*/ | 18 | #endif /*SESSION*/ | |
19 | 19 | |||
@@ -25,87 +25,87 @@ Fix pkg/36853 | @@ -25,87 +25,87 @@ Fix pkg/36853 | |||
25 | + pthread_mutex_lock(&res_mutex); \ | 25 | + pthread_mutex_lock(&res_mutex); \ | |
26 | + len = res_query((h), (c), (t), (q), (s)); \ | 26 | + len = res_query((h), (c), (t), (q), (s)); \ | |
27 | + pthread_mutex_unlock(&res_mutex); \ | 27 | + pthread_mutex_unlock(&res_mutex); \ | |
28 | + } while (/*CONSTCOND*/0) | 28 | + } while (/*CONSTCOND*/0) | |
29 | +#else | 29 | +#else | |
30 | +static pthread_key_t res_key; | 30 | +static pthread_key_t res_key; | |
31 | +#define RES_QUERY(len, h, c, t, q, s) \ | 31 | +#define RES_QUERY(len, h, c, t, q, s) \ | |
32 | + len = res_nquery((res_state)pthread_getspecific(res_key), \ | 32 | + len = res_nquery((res_state)pthread_getspecific(res_key), \ | |
33 | + (h), (c), (t), (q), (s)) | 33 | + (h), (c), (t), (q), (s)) | |
34 | +#endif | 34 | +#endif | |
35 | 35 | |||
36 | #ifndef SHUT_RD | 36 | #ifndef SHUT_RD | |
37 | #define SHUT_RD 0 | 37 | #define SHUT_RD 0 | |
38 | @@ -2051,12 +2068,19 @@ | 38 | @@ -2053,12 +2070,19 @@ | |
39 | logg(_("Starting %s\n"), clamav_version); | 39 | logg(_("Starting %s\n"), clamav_version); | |
40 | logg(_("*Debugging is on\n")); | 40 | logg(_("*Debugging is on\n")); | |
41 | 41 | |||
42 | +#ifndef HAVE_BIND9 | 42 | +#ifndef HAVE_BIND9 | |
43 | if(!(_res.options&RES_INIT)) | 43 | if(!(_res.options&RES_INIT)) | |
44 | if(res_init() < 0) { | 44 | if(res_init() < 0) { | |
45 | fprintf(stderr, "%s: Can't initialise the resolver\n", | 45 | fprintf(stderr, "%s: Can't initialise the resolver\n", | |
46 | argv[0]); | 46 | argv[0]); | |
47 | return EX_UNAVAILABLE; | 47 | return EX_UNAVAILABLE; | |
48 | } | 48 | } | |
49 | +#else | 49 | +#else | |
50 | + if (pthread_key_create(&res_key, free)) { | 50 | + if (pthread_key_create(&res_key, free)) { | |
51 | + perror("pthread_key_create"); | 51 | + perror("pthread_key_create"); | |
52 | + return EX_UNAVAILABLE; | 52 | + return EX_UNAVAILABLE; | |
53 | + } | 53 | + } | |
54 | +#endif | 54 | +#endif | |
55 | 55 | |||
56 | if(blacklist_time) { | 56 | if(blacklist_time) { | |
57 | char name[MAXHOSTNAMELEN + 1]; | 57 | char name[MAXHOSTNAMELEN + 1]; | |
58 | @@ -2571,6 +2595,18 @@ | 58 | @@ -2574,6 +2598,18 @@ | |
59 | int sock = s->sock; | 59 | int sock = s->sock; | |
60 | struct sockaddr *server = (struct sockaddr *)s->server; | 60 | struct sockaddr *server = (struct sockaddr *)s->server; | |
61 | int server_index = s->server_index; | 61 | int server_index = s->server_index; | |
62 | +#ifdef HAVE_BIND9 | 62 | +#ifdef HAVE_BIND9 | |
63 | + res_state res = cli_calloc(1, sizeof(*res)); | 63 | + res_state res = cli_calloc(1, sizeof(*res)); | |
64 | + if (pthread_setspecific(res_key, res)) { | 64 | + if (pthread_setspecific(res_key, res)) { | |
65 | + perror("pthread_setspecific"); | 65 | + perror("pthread_setspecific"); | |
66 | + free(res); | 66 | + free(res); | |
67 | + return NULL; | 67 | + return NULL; | |
68 | + } | 68 | + } | |
69 | + if (res_ninit(res) < 0) { | 69 | + if (res_ninit(res) < 0) { | |
70 | + perror("res_ninit"); | 70 | + perror("res_ninit"); | |
71 | + return NULL; | 71 | + return NULL; | |
72 | + } | 72 | + } | |
73 | +#endif | 73 | +#endif | |
74 | 74 | |||
75 | if(last_failed_pings[server_index]) { | 75 | if(last_failed_pings[server_index]) { | |
76 | s->rc = 0; | 76 | s->rc = 0; | |
77 | @@ -6172,7 +6208,7 @@ | 77 | @@ -6178,7 +6214,7 @@ | |
78 | return NULL; | 78 | return NULL; | |
79 | } | 79 | } | |
80 | 80 | |||
81 | - len = res_query(host, C_IN, T_MX, (u_char *)&q, sizeof(q)); | 81 | - len = res_query(host, C_IN, T_MX, (u_char *)&q, sizeof(q)); | |
82 | + RES_QUERY(len, host, C_IN, T_MX, (u_char *)&q, sizeof(q)); | 82 | + RES_QUERY(len, host, C_IN, T_MX, (u_char *)&q, sizeof(q)); | |
83 | if(len < 0) | 83 | if(len < 0) | |
84 | return t; /* Host has no MX records */ | 84 | return t; /* Host has no MX records */ | |
85 | 85 | |||
86 | @@ -6241,7 +6277,7 @@ | 86 | @@ -6247,7 +6283,7 @@ | |
87 | if((host == NULL) || (*host == '\0')) | 87 | if((host == NULL) || (*host == '\0')) | |
88 | return t; | 88 | return t; | |
89 | 89 | |||
90 | - len = res_query(host, C_IN, T_A, (u_char *)&q, sizeof(q)); | 90 | - len = res_query(host, C_IN, T_A, (u_char *)&q, sizeof(q)); | |
91 | + RES_QUERY(len, host, C_IN, T_A, (u_char *)&q, sizeof(q)); | 91 | + RES_QUERY(len, host, C_IN, T_A, (u_char *)&q, sizeof(q)); | |
92 | if(len < 0) | 92 | if(len < 0) | |
93 | return t; /* Host has no A records */ | 93 | return t; /* Host has no A records */ | |
94 | 94 | |||
95 | @@ -6300,7 +6336,6 @@ | 95 | @@ -6306,7 +6342,6 @@ | |
96 | * an SPF system, we ONLY use SPF records to reduce phish false positives | 96 | * an SPF system, we ONLY use SPF records to reduce phish false positives | |
97 | * TODO: IPv6? | 97 | * TODO: IPv6? | |
98 | * TODO: cache queries? | 98 | * TODO: cache queries? | |
99 | - * TODO: check res_query is thread safe | 99 | - * TODO: check res_query is thread safe | |
100 | * | 100 | * | |
101 | * INPUT: prevhosts, a list of hosts already searched: stops include loops | 101 | * INPUT: prevhosts, a list of hosts already searched: stops include loops | |
102 | * e.g. mercado.com includes medrcadosw.com which includes mercado.com, | 102 | * e.g. mercado.com includes medrcadosw.com which includes mercado.com, | |
103 | @@ -6352,7 +6387,7 @@ | 103 | @@ -6358,7 +6393,7 @@ | |
104 | *ptr = '\0'; | 104 | *ptr = '\0'; | |
105 | 105 | |||
106 | logg("*SPF query '%s'\n", host); | 106 | logg("*SPF query '%s'\n", host); | |
107 | - len = res_query(host, C_IN, T_TXT, (u_char *)&q, sizeof(q)); | 107 | - len = res_query(host, C_IN, T_TXT, (u_char *)&q, sizeof(q)); | |
108 | + RES_QUERY(len, host, C_IN, T_TXT, (u_char *)&q, sizeof(q)); | 108 | + RES_QUERY(len, host, C_IN, T_TXT, (u_char *)&q, sizeof(q)); | |
109 | if(len < 0) { | 109 | if(len < 0) { | |
110 | free(host); | 110 | free(host); | |
111 | return 0; /* Host has no TXT records */ | 111 | return 0; /* Host has no TXT records */ |