rpms/tcpdump/devel tcpdump-4.0.0-droproot.patch, NONE, 1.1 tcpdump-4.0.0-icmp6msec.patch, NONE, 1.1 tcpdump-4.0.0-portnumbers.patch, NONE, 1.1 .cvsignore, 1.15, 1.16 sources, 1.15, 1.16 tcpdump.spec, 1.75, 1.76 tcpdump-3.9.7-crypto.patch, 1.1, NONE tcpdump-3.9.7-droproot.patch, 1.2, NONE tcpdump-3.9.8-ikev2.patch, 1.1, NONE tcpdump-3.9.8-nosmi.patch, 1.1, NONE tcpdump-3.9.8-portnumbers.patch, 1.1, NONE

Miroslav Lichvar mlichvar at fedoraproject.org
Thu Aug 20 15:11:12 UTC 2009


Author: mlichvar

Update of /cvs/pkgs/rpms/tcpdump/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2723

Modified Files:
	.cvsignore sources tcpdump.spec 
Added Files:
	tcpdump-4.0.0-droproot.patch tcpdump-4.0.0-icmp6msec.patch 
	tcpdump-4.0.0-portnumbers.patch 
Removed Files:
	tcpdump-3.9.7-crypto.patch tcpdump-3.9.7-droproot.patch 
	tcpdump-3.9.8-ikev2.patch tcpdump-3.9.8-nosmi.patch 
	tcpdump-3.9.8-portnumbers.patch 
Log Message:
- update to post 4.0.0 git snapshot 20090818git832d2c
- print retrans and reachable times in ICMPv6 as milliseconds (#474264)


tcpdump-4.0.0-droproot.patch:
 tcpdump.1.in |    7 ++++++-
 tcpdump.c    |    7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

--- NEW FILE tcpdump-4.0.0-droproot.patch ---
--- tcpdump-3.9.7/tcpdump.c.droproot	2006-09-19 21:07:57.000000000 +0200
+++ tcpdump-3.9.7/tcpdump.c	2007-07-24 16:15:54.000000000 +0200
@@ -958,6 +958,11 @@ main(int argc, char **argv)
 		(void)setsignal(SIGHUP, oldhandler);
 #endif /* WIN32 */
 
+	if (Cflag != 0 && (getuid() == 0 || geteuid() == 0)) {
+		if (username || chroot_dir)
+			droproot(username, chroot_dir);
+	}
+
 	if (pcap_setfilter(pd, &fcode) < 0)
 		error("%s", pcap_geterr(pd));
 	if (WFileName) {
@@ -999,7 +1004,7 @@ main(int argc, char **argv)
 	 * We cannot do this earlier, because we want to be able to open
 	 * the file (if done) for writing before giving up permissions.
 	 */
-	if (getuid() == 0 || geteuid() == 0) {
+	if (Cflag == 0 && (getuid() == 0 || geteuid() == 0)) {
 		if (username || chroot_dir)
 			droproot(username, chroot_dir);
 	}
--- tcpdump-3.9.7/tcpdump.1.in.droproot	2007-07-24 16:15:54.000000000 +0200
+++ tcpdump-3.9.7/tcpdump.1.in	2007-07-24 16:15:54.000000000 +0200
@@ -264,6 +264,9 @@ have the name specified with the
 flag, with a number after it, starting at 1 and continuing upward.
 The units of \fIfile_size\fP are millions of bytes (1,000,000 bytes,
 not 1,048,576 bytes).
+
+Note that when used with \fB\-Z\fR option (enabled by default), privileges
+are dropped before opening first savefile.
 .TP
 .B \-d
 Dump the compiled packet-matching code in a human readable form to
@@ -592,7 +595,9 @@ Drops privileges (if root) and changes u
 and the group ID to the primary group of
 .IR user .
 .IP
-This behavior can also be enabled by default at compile time.
+This behavior is enabled by default (\fB\-Z tcpdump\fR), and can
+be disabled by \fB\-Z root\fR.
+
 .IP "\fI expression\fP"
 .RS
 selects which packets will be dumped.

tcpdump-4.0.0-icmp6msec.patch:
 print-icmp6.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE tcpdump-4.0.0-icmp6msec.patch ---
diff -up tcpdump/print-icmp6.c.icmp6msec tcpdump/print-icmp6.c
--- tcpdump/print-icmp6.c.icmp6msec	2009-08-19 00:02:37.000000000 +0200
+++ tcpdump/print-icmp6.c	2009-08-20 16:33:59.000000000 +0200
@@ -397,7 +397,7 @@ icmp6_print(const u_char *bp, u_int leng
 			p = (struct nd_router_advert *)dp;
 			TCHECK(p->nd_ra_retransmit);
 			printf("\n\thop limit %u, Flags [%s]" \
-                               ", pref %s, router lifetime %us, reachable time %us, retrans time %us",
+                               ", pref %s, router lifetime %us, reachable time %ums, retrans time %ums",
                                (u_int)p->nd_ra_curhoplimit,
                                bittok2str(icmp6_opt_ra_flag_values,"none",(p->nd_ra_flags_reserved)),
                                get_rtpref(p->nd_ra_flags_reserved),

tcpdump-4.0.0-portnumbers.patch:
 addrtoname.c |    4 ++--
 tcpdump.1    |    6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

--- NEW FILE tcpdump-4.0.0-portnumbers.patch ---
diff -up tcpdump-3.9.8/addrtoname.c.portnumbers tcpdump-3.9.8/addrtoname.c
--- tcpdump-3.9.8/addrtoname.c.portnumbers	2007-09-26 03:59:52.000000000 +0200
+++ tcpdump-3.9.8/addrtoname.c	2008-08-29 13:53:12.000000000 +0200
@@ -704,7 +704,7 @@ init_servarray(void)
 
 		while (table->name)
 			table = table->nxt;
-		if (nflag) {
+		if (nflag > 1) {
 			(void)snprintf(buf, sizeof(buf), "%d", port);
 			table->name = strdup(buf);
 		} else
@@ -1104,7 +1104,7 @@ init_addrtoname(u_int32_t localnet, u_in
 		f_localnet = localnet;
 		f_netmask = mask;
 	}
-	if (nflag)
+	if (nflag > 1)
 		/*
 		 * Simplest way to suppress names.
 		 */
diff -up tcpdump-3.9.8/tcpdump.1.portnumbers tcpdump-3.9.8/tcpdump.1
--- tcpdump-3.9.8/tcpdump.1.in.portnumbers	2008-08-29 13:53:12.000000000 +0200
+++ tcpdump-3.9.8/tcpdump.1.in	2008-08-29 13:53:12.000000000 +0200
@@ -403,7 +403,11 @@ Use \fIsecret\fP as a shared secret for 
 TCP segments with the TCP-MD5 option (RFC 2385), if present.
 .TP
 .B \-n
-Don't convert addresses (i.e., host addresses, port numbers, etc.) to names.
+Don't convert host addresses to names.  This can be used to avoid 
+DNS lookups.
+.TP
+.B \-nn
+Don't convert protocol and port numbers etc. to names either.  
 .TP
 .B \-N
 Don't print domain name qualification of host names.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/tcpdump/devel/.cvsignore,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- .cvsignore	24 Oct 2007 16:39:01 -0000	1.15
+++ .cvsignore	20 Aug 2009 15:11:11 -0000	1.16
@@ -1,2 +1,2 @@
 tcpslice-1.2a3.tar.gz
-tcpdump-3.9.8.tar.gz
+tcpdump-4.0.0-20090818git832d2c.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/tcpdump/devel/sources,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- sources	24 Oct 2007 16:39:01 -0000	1.15
+++ sources	20 Aug 2009 15:11:11 -0000	1.16
@@ -1,2 +1,2 @@
 e329cbeb7e589f132d92c3447c477190  tcpslice-1.2a3.tar.gz
-c491a78c52fe73f1f7271aa5d8c6ab2e  tcpdump-3.9.8.tar.gz
+4875284ec22ec84e42fba34d4ce6f20c  tcpdump-4.0.0-20090818git832d2c.tar.gz


Index: tcpdump.spec
===================================================================
RCS file: /cvs/pkgs/rpms/tcpdump/devel/tcpdump.spec,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -p -r1.75 -r1.76
--- tcpdump.spec	27 Jul 2009 05:39:23 -0000	1.75
+++ tcpdump.spec	20 Aug 2009 15:11:12 -0000	1.76
@@ -1,8 +1,8 @@
 Summary: A network traffic monitoring tool
 Name: tcpdump
 Epoch: 14
-Version: 3.9.8
-Release: 9%{?dist}
+Version: 4.0.0
+Release: 1.20090818git832d2c%{?dist}
 License: BSD with advertising
 URL: http://www.tcpdump.org
 Group: Applications/Internet
@@ -11,16 +11,16 @@ BuildRequires: openssl-devel libpcap-dev
 BuildRequires: automake
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-Source0: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz
+#Source0: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz
+# git snapshot from git://bpf.tcpdump.org/tcpdump
+Source0: tcpdump-4.0.0-20090818git832d2c.tar.gz
 Source1: ftp://ftp.ee.lbl.gov/tcpslice-1.2a3.tar.gz
-Patch1: tcpdump-3.9.7-droproot.patch
-Patch2: tcpdump-3.9.8-portnumbers.patch
-Patch3: tcpdump-3.9.7-crypto.patch
-Patch4: tcpdump-3.9.8-ikev2.patch
+Patch1: tcpdump-4.0.0-droproot.patch
+Patch2: tcpdump-4.0.0-portnumbers.patch
+Patch3: tcpdump-4.0.0-icmp6msec.patch
 Patch5: tcpslice-1.2a3-time.patch
 Patch6: tcpslice-CVS.20010207-bpf.patch
 Patch7: tcpdump-3.9.8-gethostby.patch
-Patch8: tcpdump-3.9.8-nosmi.patch
 
 %define tcpslice_dir tcpslice-1.2a3
 
@@ -33,14 +33,12 @@ the packet headers, or just the ones tha
 Install tcpdump if you need a program to monitor network traffic.
 
 %prep
-%setup -q -a 1
+%setup -q -a 1 -n tcpdump
 
 %patch1 -p1 -b .droproot
 %patch2 -p1 -b .portnumbers
-%patch3 -p1 -b .crypto
-%patch4 -p1 -b .ikev2
+%patch3 -p1 -b .icmp6msec
 %patch7 -p1 -b .gethostby
-%patch8 -p1 -b .nosmi
 
 pushd %{tcpslice_dir}
 %patch5 -p1 -b .time
@@ -49,11 +47,6 @@ popd
 
 find . -name '*.c' -o -name '*.h' | xargs chmod 644
 
-for f in CREDITS; do
-	iconv -f iso8859-1 -t utf8 -o ${f}{_,} &&
-		touch -r ${f}{,_} && mv -f ${f}{_,}
-done
-
 %build
 export CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS) -fno-strict-aliasing"
 
@@ -64,7 +57,7 @@ automake -a -f 2> /dev/null || :
 make %{?_smp_mflags}
 popd
 
-%configure --with-user=tcpdump
+%configure --with-crypto --with-user=tcpdump --without-smi
 make %{?_smp_mflags}
 
 %install
@@ -103,6 +96,10 @@ exit 0
 %{_mandir}/man8/tcpdump.8*
 
 %changelog
+* Thu Aug 20 2009 Miroslav Lichvar <mlichvar at redhat.com> - 14:4.0.0-1.20090818git832d2c
+- update to post 4.0.0 git snapshot 20090818git832d2c
+- print retrans and reachable times in ICMPv6 as milliseconds (#474264)
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 14:3.9.8-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 


--- tcpdump-3.9.7-crypto.patch DELETED ---


--- tcpdump-3.9.7-droproot.patch DELETED ---


--- tcpdump-3.9.8-ikev2.patch DELETED ---


--- tcpdump-3.9.8-nosmi.patch DELETED ---


--- tcpdump-3.9.8-portnumbers.patch DELETED ---




More information about the fedora-extras-commits mailing list