summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2014-08-20 08:02:09 +0000
committerJeroen Roovers <jer@gentoo.org>2014-08-20 08:02:09 +0000
commitbdfe91a659989e4ed5fbec2125464f81cb09e2ce (patch)
tree94c397c535dd7ab4dc09a739f306b23dcbacb956 /net-analyzer
parentupdate patches for test phase (diff)
downloadgentoo-2-bdfe91a659989e4ed5fbec2125464f81cb09e2ce.tar.gz
gentoo-2-bdfe91a659989e4ed5fbec2125464f81cb09e2ce.tar.bz2
gentoo-2-bdfe91a659989e4ed5fbec2125464f81cb09e2ce.zip
Remove debug function (bug #458898).
(Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/pktstat/ChangeLog8
-rw-r--r--net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch95
-rw-r--r--net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild35
3 files changed, 137 insertions, 1 deletions
diff --git a/net-analyzer/pktstat/ChangeLog b/net-analyzer/pktstat/ChangeLog
index 4b6ab5d2c7e8..c0f5fbd35ffd 100644
--- a/net-analyzer/pktstat/ChangeLog
+++ b/net-analyzer/pktstat/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-analyzer/pktstat
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pktstat/ChangeLog,v 1.27 2014/07/16 16:37:47 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pktstat/ChangeLog,v 1.28 2014/08/20 08:02:09 jer Exp $
+
+*pktstat-1.8.5-r1 (20 Aug 2014)
+
+ 20 Aug 2014; Jeroen Roovers <jer@gentoo.org> +pktstat-1.8.5-r1.ebuild,
+ +files/pktstat-1.8.5-smtp_line.patch:
+ Remove debug function (bug #458898).
16 Jul 2014; Jeroen Roovers <jer@gentoo.org> pktstat-1.8.5.ebuild,
+files/pktstat-1.8.5-tinfo.patch:
diff --git a/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch b/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch
new file mode 100644
index 000000000000..fd7f61d7bb08
--- /dev/null
+++ b/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch
@@ -0,0 +1,95 @@
+--- a/tcp_smtp.c
++++ b/tcp_smtp.c
+@@ -141,84 +141,6 @@
+ *t = 0;
+ }
+
+-static void
+-smtp_line(f, line)
+- struct flow *f;
+- const char *line;
+-{
+- struct smtp_state *state;
+- const char *s;
+- int addr_changed = 0;
+-FILE*log;
+-
+- state = (struct smtp_state *)f->udata;
+-
+-if ((log = fopen("/tmp/smtp.log", "a")))
+- fprintf(log, "smpt_line [%s]\n", line);
+-
+- if (state->in_data) {
+- if (strcmp(line, ".") == 0) {
+- state->in_data = 0;
+- state->from_addr[0] = 0;
+- state->to_addr[0] = 0;
+- } else if (state->in_header) {
+- if (!*line)
+- state->in_header = 0;
+-#if 0
+- /* Tag the Subject: line inside DATA */
+- else if ((line[0] == 'S' || line[0] == 's') &&
+- (line[1] == 'U' || line[1] == 'u') &&
+- (line[2] == 'B' || line[2] == 'b') &&
+- (line[3] == 'J' || line[3] == 'j') &&
+- (line[4] == 'E' || line[4] == 'e') &&
+- (line[5] == 'C' || line[5] == 'c') &&
+- (line[6] == 'T' || line[6] == 't') &&
+- line[7] == ':')
+- snprintf(f->desc, sizeof f->desc, "%s", line);
+-#endif
+- }
+- } else {
+- /* Normalize the command line */
+- normalize_line(line);
+-if (log)fprintf(log, "normalized to [%s]\n", line);
+- if ((s = strip_prefix(line, "MAIL FROM:"))) {
+- snprintf(state->from_addr, sizeof state->from_addr, "%s", s);
+- normalize_addr(state->from_addr);
+- addr_changed = 1;
+-if (log)fprintf(log, "from_addr = [%s]\n", state->from_addr);
+- }
+- else if ((s = strip_prefix(line, "RCPT TO:"))) {
+- snprintf(state->to_addr, sizeof state->to_addr, "%s", s);
+- normalize_addr(state->to_addr);
+- addr_changed = 1;
+-if (log)fprintf(log, "to_addr = [%s]\n", state->to_addr);
+- }
+- else if (strcmp(line, "DATA") == 0) {
+- state->in_data = 1;
+- state->in_header = 1;
+- }
+- else if (strcmp(line, "STARTTLS") == 0) {
+- state->state = sENCRYPTED;
+- snprintf(f->desc, sizeof f->desc, "STARTTLS");
+- }
+-
+- if ((addr_changed ||
+- strcmp(line, "QUIT") == 0 ||
+- strcmp(line, "DATA") == 0) &&
+- (*state->from_addr && *state->to_addr))
+- {
+- snprintf(f->desc, sizeof f->desc, "%s -> %s",
+- state->from_addr, state->to_addr);
+- } else {
+- if (strcmp(line, "QUIT") != 0)
+- snprintf(f->desc, sizeof f->desc, "%s", line);
+- }
+-if (log)fprintf(log, "set desc to: [%s]\n", f->desc);
+- }
+-
+-if (log)fclose(log);
+-}
+-
+ /*
+ * Look for simple SMTP (RFC 2822) commands.
+ */
+@@ -270,7 +192,6 @@
+ case sEXPECT_LF:
+ if (*d == LF) {
+ state->line[state->line_len] = 0;
+- smtp_line(f, state->line);
+ state->line_len = 0;
+ state->state = sLINE;
+ } else if (*d == CR) {
diff --git a/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild b/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild
new file mode 100644
index 000000000000..da807684d1ad
--- /dev/null
+++ b/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild,v 1.1 2014/08/20 08:02:09 jer Exp $
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A network monitoring tool with bandwidth tracking"
+HOMEPAGE="http://www.adaptive-enterprises.com.au/~d/software/pktstat/"
+SRC_URI="http://www.adaptive-enterprises.com.au/~d/software/pktstat/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND="
+ net-libs/libpcap
+ >=sys-libs/ncurses-5.3-r1
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ epatch "${FILESDIR}"/${P}-smtp_line.patch
+ eautoreconf
+}
+
+src_install() {
+ dosbin pktstat
+ doman pktstat.1
+ dodoc ChangeLog NEWS README TODO
+}