From 25c1660f981da11aec02a4749bb3bf46cb191561 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 09:14:10 +0000 Subject: [PATCH] auto-import net-tools-1.60-34 from net-tools-1.60-34.src.rpm --- net-tools-1.60-trunc.patch | 42 ++++++++++++++++++++++++++++++++++++++ net-tools.spec | 7 ++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 net-tools-1.60-trunc.patch diff --git a/net-tools-1.60-trunc.patch b/net-tools-1.60-trunc.patch new file mode 100644 index 0000000..9ff3c0b --- /dev/null +++ b/net-tools-1.60-trunc.patch @@ -0,0 +1,42 @@ +--- net-tools-1.60/netstat.c.trunc 2004-08-31 12:42:08.595426960 +0200 ++++ net-tools-1.60/netstat.c 2004-08-31 12:59:55.766192344 +0200 +@@ -773,8 +773,8 @@ + get_sname(htons(local_port), "tcp", + flag_not & FLAG_NUM_PORT)); + +- if ((strlen(local_addr) + strlen(buffer)) > 22) +- local_addr[22 - strlen(buffer)] = '\0'; ++ if ((strlen(local_addr) + strlen(buffer)) >= 27) ++ local_addr[27 - strlen(buffer) - 1] = '\0'; + + strcat(local_addr, ":"); + strncat(local_addr, buffer, sizeof(local_addr)); +@@ -782,8 +782,8 @@ + snprintf(buffer, sizeof(buffer), "%s", + get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT)); + +- if ((strlen(rem_addr) + strlen(buffer)) > 22) +- rem_addr[22 - strlen(buffer)] = '\0'; ++ if ((strlen(rem_addr) + strlen(buffer)) >= 27) ++ rem_addr[27 - strlen(buffer) - 1] = '\0'; + + strcat(rem_addr, ":"); + strncat(rem_addr, buffer, sizeof(rem_addr)); +@@ -816,7 +816,7 @@ + timer_run, (double) time_len / HZ, retr, timeout); + break; + } +- printf("tcp %6ld %6ld %-23s %-23s %-12s", ++ printf("tcp %6ld %6ld %-27s %-27s %-12s", + rxq, txq, local_addr, rem_addr, _(tcp_state[state])); + + finish_this_one(uid,inode,timers); +@@ -1770,7 +1770,7 @@ + else + printf(_("(w/o servers)")); + } +- printf(_("\nProto Recv-Q Send-Q Local Address Foreign Address State ")); /* xxx */ ++ printf(_("\nProto Recv-Q Send-Q Local Address Foreign Address State ")); /* xxx */ + if (flag_exp > 1) + printf(_(" User Inode ")); + print_progname_banner(); diff --git a/net-tools.spec b/net-tools.spec index a947e52..6e44b85 100644 --- a/net-tools.spec +++ b/net-tools.spec @@ -3,7 +3,7 @@ Summary: Basic networking tools. Name: net-tools Version: 1.60 -Release: 33 +Release: 34 License: GPL Group: System Environment/Base Source0: http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-%{version}.tar.bz2 @@ -30,6 +30,7 @@ Patch16: net-tools-1.60-execshield.patch Patch17: netplug-1.2.7-compiler.patch Patch18: netplug-1.2.7-installopts.patch Patch19: net-tools-1.60-siunits.patch +Patch20: net-tools-1.60-trunc.patch BuildRoot: %{_tmppath}/%{name}-root Requires(post,preun): chkconfig BuildRequires: gettext @@ -59,6 +60,7 @@ ifconfig, netstat, route, and others. %patch17 -p1 -b .compiler %patch18 -p1 -b .installopts %patch19 -p1 -b .siunits +%patch20 -p1 -b .trunc cp %SOURCE2 ./config.h cp %SOURCE3 ./config.make @@ -131,6 +133,9 @@ exit 0 %{_sysconfdir}/rc.d/init.d/netplugd %changelog +* Tue Aug 30 2004 Radek Vokal 1.60-34 +- Trunc patch added (#128359) + * Mon Aug 30 2004 Radek Vokal 1.60-33 - Added patch for SI units by Tom "spot" Callaway #118006