summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2014-07-14 16:15:53 +0000
committerJeroen Roovers <jer@gentoo.org>2014-07-14 16:15:53 +0000
commit09be4e3cb8d4288789b4de1456abd21a20eb62fc (patch)
tree14129c6317c3994e48bc26ad133676409637423b /net-analyzer/ndsad
parentalpha stable wrt bug #507070 (diff)
downloadgentoo-2-09be4e3cb8d4288789b4de1456abd21a20eb62fc.tar.gz
gentoo-2-09be4e3cb8d4288789b4de1456abd21a20eb62fc.tar.bz2
gentoo-2-09be4e3cb8d4288789b4de1456abd21a20eb62fc.zip
EAPI bump. Fix a buffer overflow, missing getpid include. Move sed script output to patch. Respect C/XXFLAGS.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'net-analyzer/ndsad')
-rw-r--r--net-analyzer/ndsad/ChangeLog13
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch11
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch23
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-getpid.patch10
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-log-path.patch11
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch12
-rw-r--r--net-analyzer/ndsad/files/ndsad.init6
-rw-r--r--net-analyzer/ndsad/ndsad-1.33-r1.ebuild46
8 files changed, 127 insertions, 5 deletions
diff --git a/net-analyzer/ndsad/ChangeLog b/net-analyzer/ndsad/ChangeLog
index e5d6bd52f409..0a610c22fdea 100644
--- a/net-analyzer/ndsad/ChangeLog
+++ b/net-analyzer/ndsad/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-analyzer/ndsad
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ndsad/ChangeLog,v 1.9 2013/02/16 12:46:38 pacho Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ndsad/ChangeLog,v 1.10 2014/07/14 16:15:53 jer Exp $
+
+*ndsad-1.33-r1 (14 Jul 2014)
+
+ 14 Jul 2014; Jeroen Roovers <jer@gentoo.org> +ndsad-1.33-r1.ebuild,
+ +files/ndsad-1.33-conf_path.patch, +files/ndsad-1.33-gentoo.patch,
+ +files/ndsad-1.33-getpid.patch, +files/ndsad-1.33-log-path.patch,
+ +files/ndsad-1.33-strncpy-overflow.patch, files/ndsad.init:
+ EAPI bump. Fix a buffer overflow, missing getpid include. Move sed script
+ output to patch. Respect C/XXFLAGS.
16 Feb 2013; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Cleanup due bug #96436
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch b/net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch
new file mode 100644
index 000000000000..cf3c827cdde7
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch
@@ -0,0 +1,11 @@
+--- a/ndsad.cc
++++ b/ndsad.cc
+@@ -12,7 +12,7 @@
+ */
+
+
+-#define conf_path "/netup/utm5/ndsad.cfg"
++#define conf_path "/etc/ndsad.conf"
+
+ #include "pcap.local.h"
+
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch b/net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch
new file mode 100644
index 000000000000..3ccbe3432932
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch
@@ -0,0 +1,23 @@
+--- a/configure.in
++++ b/configure.in
+@@ -24,9 +24,6 @@
+ AC_DEFINE(OS_BSD, 2,[BSD OS code])
+ AC_DEFINE(OS_SOLARIS, 3,[SOLARIS on SPARC code])
+
+-CFLAGS=-g
+-CXXFLAGS=-g
+-
+ AC_CHECK_LIB(pcap, pcap_loop, [LIBS="$LIBS -lpcap"; __ac_have_libpcap=1;], [ break ])
+
+ case "$host_os" in
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,6 +1,6 @@
+-bin_PROGRAMS = ndsad
++sbin_PROGRAMS = ndsad
+
+ ndsad_SOURCES = linux_ulog.cc linux_ulog.h debug.h eth-hndl.h handlers.h iflist.h iptonf.h ldefs.h logger.h mempool.h nethdr.h nfc.h nf.h ppp-hndl.h thr.h config.cc debug.cc eth-hndl.cc handlers.cc iflist.cc iptonf.cc logger.cc mempool.cc ndsad.cc nf.cc nfc.cc ppp-hndl.cc thr.cc bsd_divert.cc bsd_divert.h
+
+-ndsad_CXXFLAGS = $(AM_CXXFLAGS) -O0 -fno-inline -g -ftemplate-depth-32
++ndsad_CXXFLAGS = $(AM_CXXFLAGS) -fno-inline -ftemplate-depth-32
+ ndsad_LDFLAGS = $(AM_LDFLAGS)
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-getpid.patch b/net-analyzer/ndsad/files/ndsad-1.33-getpid.patch
new file mode 100644
index 000000000000..c0e6d94a301c
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-getpid.patch
@@ -0,0 +1,10 @@
+--- a/linux_ulog.h
++++ b/linux_ulog.h
+@@ -8,6 +8,7 @@
+ #include <pthread.h>
+ #include <iostream>
+ #include <sys/types.h>
++#include <unistd.h> /* getpid() */
+ #include <sys/socket.h>
+
+ /// linux specific headers!
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-log-path.patch b/net-analyzer/ndsad/files/ndsad-1.33-log-path.patch
new file mode 100644
index 000000000000..fbeab07fb7a0
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-log-path.patch
@@ -0,0 +1,11 @@
+--- a/ndsad.conf
++++ b/ndsad.conf
+@@ -75,7 +75,7 @@
+ # Default:
+ #log (null)
+ # Example:
+-log /tmp/ndsad.log
++log /var/log/ndsad.log
+
+ # Jump to another configuration file
+ # Current file is closed after this line! Beware of loops!
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch b/net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch
new file mode 100644
index 000000000000..5078f1555ec6
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch
@@ -0,0 +1,12 @@
+--- a/handlers.h
++++ b/handlers.h
+@@ -30,7 +30,8 @@
+ #ifdef WIN32
+ #define IFN_SIZE 512 // on windows iface names are VEERY long
+ #else
+-#define IFN_SIZE 32 // iface name size. As in linux/sockios.h
++#include <net/if.h>
++#define IFN_SIZE IFNAMSIZ // iface name size. As in linux/sockios.h
+ #endif
+
+ #define MPH_IFLIST 0x2 // iface type - for mempool
diff --git a/net-analyzer/ndsad/files/ndsad.init b/net-analyzer/ndsad/files/ndsad.init
index c1485b918cb0..049e451cf4dc 100644
--- a/net-analyzer/ndsad/files/ndsad.init
+++ b/net-analyzer/ndsad/files/ndsad.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ndsad/files/ndsad.init,v 1.2 2006/01/15 18:31:41 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ndsad/files/ndsad.init,v 1.3 2014/07/14 16:15:52 jer Exp $
depend() {
need net
@@ -28,6 +28,6 @@ start() {
stop () {
ebegin "Stopping ndsad"
- start-stop-daemon --stop --quiet --pidfile=/var/run/ndsad.pid --retry 20 >/dev/null
+ start-stop-daemon --stop --quiet --pidfile=/run/ndsad.pid --retry 20 >/dev/null
eend $?
}
diff --git a/net-analyzer/ndsad/ndsad-1.33-r1.ebuild b/net-analyzer/ndsad/ndsad-1.33-r1.ebuild
new file mode 100644
index 000000000000..f03faf53e687
--- /dev/null
+++ b/net-analyzer/ndsad/ndsad-1.33-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ndsad/ndsad-1.33-r1.ebuild,v 1.1 2014/07/14 16:15:53 jer Exp $
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Cisco netflow probe from libpcap, ULOG, tee/divert sources."
+HOMEPAGE="http://sourceforge.net/projects/ndsad"
+SRC_URI="mirror://sourceforge/ndsad/ndsad-${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+
+DEPEND=">=net-libs/libpcap-0.8"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-conf_path.patch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-getpid.patch \
+ "${FILESDIR}"/${P}-log-path.patch \
+ "${FILESDIR}"/${P}-strncpy-overflow.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-ulog=yes
+}
+
+DOCS=( ChangeLog AUTHORS README )
+
+src_install() {
+ default
+
+ doman ndsad.conf.5
+
+ insinto /etc
+ newins ndsad.conf ndsad.conf
+
+ newinitd "${FILESDIR}"/ndsad.init ndsad
+ newconfd "${FILESDIR}"/ndsad.conf.d ndsad
+}