[tcpdump] Fix manpage, handling of bad date format(tcpslice)

Michal Sekletar msekleta at fedoraproject.org
Thu Aug 25 07:56:16 UTC 2011


commit 18ebd1c2d965be2faa571ccc9c579c85b8439bf9
Author: Michal Sekletar <msekleta at redhat.com>
Date:   Wed Aug 24 14:56:22 2011 +0200

    Fix manpage, handling of bad date format(tcpslice)
    
    Fix manpage (#663739)
    Fix improper handling of bad date format in tcpslice (#684005)
    Spec file clean up

 tcpdump-4.1.1-manpagefix.patch  |   39 +++++++++++++++++++++++++++++++++++++++
 tcpdump.spec                    |   16 ++++++++++------
 tcpslice-1.2a3-dateformat.patch |   14 ++++++++++++++
 3 files changed, 63 insertions(+), 6 deletions(-)
---
diff --git a/tcpdump-4.1.1-manpagefix.patch b/tcpdump-4.1.1-manpagefix.patch
new file mode 100644
index 0000000..b97630e
--- /dev/null
+++ b/tcpdump-4.1.1-manpagefix.patch
@@ -0,0 +1,39 @@
+diff -up ./tcpdump.1.in.orig ./tcpdump.1.in
+--- ./tcpdump.1.in.orig	2010-03-12 02:56:44.000000000 +0100
++++ ./tcpdump.1.in	2011-08-24 14:47:56.000000000 +0200
+@@ -256,7 +256,7 @@ Print the link-level header on each dump
+ .B \-E
+ Use \fIspi at ipaddr algo:secret\fP for decrypting IPsec ESP packets that
+ are addressed to \fIaddr\fP and contain Security Parameter Index value
+-\fIspi\fP. This combination may be repeated with comma or newline seperation.
++\fIspi\fP. This combination may be repeated with comma or newline separation.
+ .IP
+ Note that setting the secret for IPv4 ESP packets is supported at this time.
+ .IP
+@@ -272,7 +272,7 @@ The ability to decrypt packets is only p
+ with cryptography enabled.
+ .IP
+ \fIsecret\fP is the ASCII text for ESP secret key. 
+-If preceeded by 0x, then a hex value will be read.
++If preceded by 0x, then a hex value will be read.
+ .IP
+ The option assumes RFC2406 ESP, not RFC1827 ESP.
+ The option is only for debugging purposes, and
+@@ -998,7 +998,7 @@ Recall the structure of a TCP header wit
+ -----------------------------------------------------------------
+ |                        sequence number                        |
+ -----------------------------------------------------------------
+-|                     acknowledgment number                     |
++|                     acknowledgement number                    |
+ -----------------------------------------------------------------
+ |  HL   | rsvd  |C|E|U|A|P|R|S|F|        window size            |
+ -----------------------------------------------------------------
+@@ -1281,7 +1281,7 @@ Be warned that with -v a single SMB pack
+ may take up a page or more, so only use -v if you really want all the
+ gory details.
+ 
+-For information on SMB packet formats and what all te fields mean see
++For information on SMB packet formats and what all the fields mean see
+ www.cifs.org or the pub/samba/specs/ directory on your favorite
+ samba.org mirror site.
+ The SMB patches were written by Andrew Tridgell
diff --git a/tcpdump.spec b/tcpdump.spec
index cf99dc4..e3e6f7d 100644
--- a/tcpdump.spec
+++ b/tcpdump.spec
@@ -2,14 +2,13 @@ Summary: A network traffic monitoring tool
 Name: tcpdump
 Epoch: 14
 Version: 4.1.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: BSD with advertising
 URL: http://www.tcpdump.org
 Group: Applications/Internet
 Requires(pre): shadow-utils 
 BuildRequires: openssl-devel libpcap-devel
 BuildRequires: automake sharutils
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Source0: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz
 Source1: ftp://ftp.ee.lbl.gov/tcpslice-1.2a3.tar.gz
@@ -20,6 +19,8 @@ Patch4: tcpdump-4.1.1-testsuite.patch
 Patch5: tcpslice-1.2a3-time.patch
 Patch6: tcpslice-CVS.20010207-bpf.patch
 Patch7: tcpdump-3.9.8-gethostby.patch
+Patch8: tcpdump-4.1.1-manpagefix.patch
+Patch9: tcpslice-1.2a3-dateformat.patch
 
 %define tcpslice_dir tcpslice-1.2a3
 
@@ -39,10 +40,12 @@ Install tcpdump if you need a program to monitor network traffic.
 %patch3 -p1 -b .icmp6msec
 %patch4 -p1 -b .testsuite
 %patch7 -p1 -b .gethostby
+%patch8 -p1 -b .manpagefix
 
 pushd %{tcpslice_dir}
 %patch5 -p1 -b .time
 %patch6 -p1 -b .bpf
+%patch9 -p1 -b .dateformat
 popd
 
 find . -name '*.c' -o -name '*.h' | xargs chmod 644
@@ -64,7 +67,6 @@ make %{?_smp_mflags}
 make check
 
 %install
-rm -rf ${RPM_BUILD_ROOT}
 mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
 mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
 mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
@@ -81,9 +83,6 @@ install -m644 tcpdump.1 ${RPM_BUILD_ROOT}%{_mandir}/man8/tcpdump.8
 sed -i 's/\(\.TH[a-zA-Z ]*\)[1-9]\(.*\)/\18\2/' \
 	${RPM_BUILD_ROOT}%{_mandir}/man8/*
 
-%clean
-rm -rf ${RPM_BUILD_ROOT}
-
 %pre
 /usr/sbin/groupadd -g 72 tcpdump 2> /dev/null
 /usr/sbin/useradd -u 72 -g 72 -s /sbin/nologin -M -r \
@@ -99,6 +98,11 @@ exit 0
 %{_mandir}/man8/tcpdump.8*
 
 %changelog
+* Wed Aug 24 2011 Michal Sekletar <msekleta at redhat.com> - 14:4.1.1-3
+- Fix manpage (#663739) 
+- Fix improper handling of bad date format in tcpslice (#684005)
+- Spec file clean up
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 14:4.1.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
diff --git a/tcpslice-1.2a3-dateformat.patch b/tcpslice-1.2a3-dateformat.patch
new file mode 100644
index 0000000..dd59457
--- /dev/null
+++ b/tcpslice-1.2a3-dateformat.patch
@@ -0,0 +1,14 @@
+diff -up tcpslice-1.2a3/tcpslice.c.orig tcpslice-1.2a3/tcpslice.c
+--- tcpslice-1.2a3/tcpslice.c.orig	2005-10-25 00:06:26.000000000 +0200
++++ tcpslice-1.2a3/tcpslice.c	2011-08-24 13:12:53.215962428 +0200
+@@ -404,7 +404,9 @@ fill_tm(char *time_string, int is_delta,
+ 
+ 		while (isdigit(*t_stop))
+ 			++t_stop;
+-		if (! t_stop)
++		
++        if (!(*t_stop))
++            /* we've reached end of string -> bad date format */
+ 			error("bad date format %s, problem starting at %s",
+ 			      time_string, t_start);
+ 


More information about the scm-commits mailing list