pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/clamav rename cl_fmap's gets to my_gets to al...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/807aa81796cf
branches:  trunk
changeset: 365722:807aa81796cf
user:      maya <maya%pkgsrc.org@localhost>
date:      Mon Jul 24 09:39:42 2017 +0000

description:
rename cl_fmap's gets to my_gets to allow gets to be overriden by macro,
allows us to force-enable fortify. as far as I can tell this is an opaque
type.

drop workaround for netbsd 1.x

bump pkgrevision

diffstat:

 security/clamav/Makefile                       |  13 ++-----------
 security/clamav/Makefile.common                |   4 ++--
 security/clamav/distinfo                       |   4 +++-
 security/clamav/patches/patch-libclamav_fmap.c |  25 +++++++++++++++++++++++++
 security/clamav/patches/patch-libclamav_fmap.h |  25 +++++++++++++++++++++++++
 5 files changed, 57 insertions(+), 14 deletions(-)

diffs (124 lines):

diff -r 9c8f20632113 -r 807aa81796cf security/clamav/Makefile
--- a/security/clamav/Makefile  Mon Jul 24 08:53:45 2017 +0000
+++ b/security/clamav/Makefile  Mon Jul 24 09:39:42 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2017/07/10 00:22:15 gdt Exp $
+# $NetBSD: Makefile,v 1.36 2017/07/24 09:39:42 maya Exp $
 
 .include "Makefile.common"
 
@@ -22,24 +22,15 @@
 CONFIGURE_ARGS+=       --with-pcre=${BUILDLINK_PREFIX.pcre}
 CONFIGURE_ARGS+=       --with-xml=${BUILDLINK_PREFIX.libxml2}
 CONFIGURE_ARGS+=       --with-zlib=${BUILDLINK_PREFIX.zlib}
+CONFIGURE_ARGS+=       --enable-readdir_r
 # pkgsrc enforces a "secure" version of zlib, so don't let this check
 # bomb the build
 CONFIGURE_ARGS+=       --disable-zlib-vcheck
 
-# clamav shadows gets with a macro, which confuses FORTIFY.  Disable
-# until resolved.
-PKGSRC_USE_FORTIFY=no
-
 CHECK_PORTABILITY_SKIP=        contrib/* unit_tests/* win32/*
 
 .include "../../mk/bsd.prefs.mk"
 
-.if ${OPSYS} == "NetBSD" && !empty(OS_VERSION:M1.*)
-CONFIGURE_ARGS+=       --disable-readdir-r
-.else
-CONFIGURE_ARGS+=       --enable-readdir_r
-.endif
-
 NOT_PAX_MPROTECT_SAFE+=        sbin/clamd
 NOT_PAX_MPROTECT_SAFE+=        bin/clamscan
 NOT_PAX_MPROTECT_SAFE+=        bin/freshclam
diff -r 9c8f20632113 -r 807aa81796cf security/clamav/Makefile.common
--- a/security/clamav/Makefile.common   Mon Jul 24 08:53:45 2017 +0000
+++ b/security/clamav/Makefile.common   Mon Jul 24 09:39:42 2017 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile.common,v 1.6 2017/01/01 16:06:35 adam Exp $
+# $NetBSD: Makefile.common,v 1.7 2017/07/24 09:39:42 maya Exp $
 #
 # used by clamav/Makefile
 # used by clamav-doc/Makefile
 
 DISTNAME=      clamav-0.99.2
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    security
 MASTER_SITES=  http://www.clamav.net/downloads/production/
 
diff -r 9c8f20632113 -r 807aa81796cf security/clamav/distinfo
--- a/security/clamav/distinfo  Mon Jul 24 08:53:45 2017 +0000
+++ b/security/clamav/distinfo  Mon Jul 24 09:39:42 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2016/06/12 16:06:01 taca Exp $
+$NetBSD: distinfo,v 1.23 2017/07/24 09:39:42 maya Exp $
 
 SHA1 (clamav-0.99.2.tar.gz) = c1a47411834d8527f7b40727aebee63f01d488af
 RMD160 (clamav-0.99.2.tar.gz) = 4ddb7c4ff32b1233a5210da54f162a154043c48e
@@ -13,3 +13,5 @@
 SHA1 (patch-etc_clamav-milter.conf.sample) = 0cbf22bf380213c9e9f2b9baf15d7eba745afd46
 SHA1 (patch-etc_clamd.conf.sample) = 74c995c7df2d5b083bb4465d2ab4cb0cab8670b6
 SHA1 (patch-etc_freshclam.conf.sample) = 520ffbca5421ef2dc270e3c5a13cfb36a469e676
+SHA1 (patch-libclamav_fmap.c) = a4c08f96e3d3aae57533e8e8294358fcb26a6db4
+SHA1 (patch-libclamav_fmap.h) = c486e4fd957f2cc9811c5a0422db69c85f0f9e0f
diff -r 9c8f20632113 -r 807aa81796cf security/clamav/patches/patch-libclamav_fmap.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/clamav/patches/patch-libclamav_fmap.c    Mon Jul 24 09:39:42 2017 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-libclamav_fmap.c,v 1.1 2017/07/24 09:39:42 maya Exp $
+
+rename gets to my_gets to avoid conflict with fortify/ssp - they use
+macros to override libc functions
+
+--- libclamav/fmap.c.orig      2016-04-22 15:02:19.000000000 +0000
++++ libclamav/fmap.c
+@@ -274,7 +274,7 @@ extern cl_fmap_t *cl_fmap_open_handle(vo
+     m->unmap = use_aging ? unmap_mmap : unmap_malloc;
+     m->need = handle_need;
+     m->need_offstr = handle_need_offstr;
+-    m->gets = handle_gets;
++    m->my_gets = handle_gets;
+     m->unneed_off = handle_unneed_off;
+     return m;
+ }
+@@ -664,7 +664,7 @@ extern cl_fmap_t *cl_fmap_open_memory(co
+     m->unmap = unmap_malloc;
+     m->need = mem_need;
+     m->need_offstr = mem_need_offstr;
+-    m->gets = mem_gets;
++    m->my_gets = mem_gets;
+     m->unneed_off = mem_unneed_off;
+     return m;
+ }
diff -r 9c8f20632113 -r 807aa81796cf security/clamav/patches/patch-libclamav_fmap.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/clamav/patches/patch-libclamav_fmap.h    Mon Jul 24 09:39:42 2017 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-libclamav_fmap.h,v 1.1 2017/07/24 09:39:42 maya Exp $
+
+rename gets to my_gets to avoid conflict with fortify/ssp - they use
+macros to override libc functions
+
+--- libclamav/fmap.h.orig      2016-04-22 15:02:19.000000000 +0000
++++ libclamav/fmap.h
+@@ -74,7 +74,7 @@ struct cl_fmap {
+     void        (*unmap)(fmap_t*);
+     const void* (*need)(fmap_t*, size_t at, size_t len, int lock);
+     const void* (*need_offstr)(fmap_t*, size_t at, size_t len_hint);
+-    const void* (*gets)(fmap_t*, char *dst, size_t *at, size_t max_len);
++    const void* (*my_gets)(fmap_t*, char *dst, size_t *at, size_t max_len);
+     void        (*unneed_off)(fmap_t*, size_t at, size_t len);
+ #ifdef _WIN32
+     HANDLE fh;
+@@ -156,7 +156,7 @@ static inline const void *fmap_need_offs
+ }
+ 
+ static inline const void *fmap_gets(fmap_t *m, char *dst, size_t *at, size_t max_len) {
+-    return m->gets(m, dst, at, max_len);
++    return m->my_gets(m, dst, at, max_len);
+ }
+ 
+ static inline const void *fmap_need_off_once_len(fmap_t *m, size_t at, size_t len, size_t *lenout)



Home | Main Index | Thread Index | Old Index