summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2014-08-20 08:07:57 +0000
committerJeroen Roovers <jer@gentoo.org>2014-08-20 08:07:57 +0000
commitec98e7b3645690d5036daf1f0dfb36003f768298 (patch)
tree8df71d4be4023dbf2166b2d830aceed6fc6162a1 /net-analyzer
parentRemove debug function (bug #458898). (diff)
downloadgentoo-2-ec98e7b3645690d5036daf1f0dfb36003f768298.tar.gz
gentoo-2-ec98e7b3645690d5036daf1f0dfb36003f768298.tar.bz2
gentoo-2-ec98e7b3645690d5036daf1f0dfb36003f768298.zip
Just remove the offending lines instead.
(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/ChangeLog6
-rw-r--r--net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch115
2 files changed, 38 insertions, 83 deletions
diff --git a/net-analyzer/pktstat/ChangeLog b/net-analyzer/pktstat/ChangeLog
index c0f5fbd35ffd..dfa1f44b6d69 100644
--- a/net-analyzer/pktstat/ChangeLog
+++ b/net-analyzer/pktstat/ChangeLog
@@ -1,6 +1,10 @@
# 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.28 2014/08/20 08:02:09 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pktstat/ChangeLog,v 1.29 2014/08/20 08:07:57 jer Exp $
+
+ 20 Aug 2014; Jeroen Roovers <jer@gentoo.org> pktstat-1.8.5-r1.ebuild,
+ files/pktstat-1.8.5-smtp_line.patch:
+ Just remove the offending lines instead.
*pktstat-1.8.5-r1 (20 Aug 2014)
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
index fd7f61d7bb08..67ea9e9181e8 100644
--- a/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch
+++ b/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch
@@ -1,95 +1,46 @@
--- 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;
+@@ -149,13 +149,9 @@
+ struct smtp_state *state;
+ const char *s;
+ int addr_changed = 0;
-FILE*log;
--
-- state = (struct smtp_state *)f->udata;
--
+
+ 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 (state->in_data) {
+ if (strcmp(line, ".") == 0) {
+ state->in_data = 0;
+@@ -180,18 +176,15 @@
+ } 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 ((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;
+ }
+ 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);
-- }
+ }
+ else if (strcmp(line, "DATA") == 0) {
+ state->in_data = 1;
+@@ -213,10 +206,7 @@
+ 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) {