[dnstop] * Mon Sep 15 2014 Paul Wouters <pwouters at redhat.com> - 20140915-1 - Updated to 20140915 with new-gtl

Paul Wouters pwouters at fedoraproject.org
Mon Sep 15 19:12:14 UTC 2014


commit 2a2590b4980ec4b51cb37d8ca8a23d8bc7c25548
Author: Paul Wouters <pwouters at redhat.com>
Date:   Mon Sep 15 15:12:05 2014 -0400

    * Mon Sep 15 2014 Paul Wouters <pwouters at redhat.com> - 20140915-1
    - Updated to 20140915 with new-gtlds filter support
    - Updated warning patch (partially merged upstream)
    - Added usage patch that was missing the new filter name new-gtlds
    - Enabled hardening as this application takes in network input.

 .gitignore                         |    2 +
 dnstop-20140915-fix-warnings.patch |   47 ++++++++++++++++++++++++++++++++++++
 dnstop-20140915-usage.patch        |   11 ++++++++
 dnstop.spec                        |   24 ++++++++++--------
 sources                            |    2 +-
 5 files changed, 74 insertions(+), 12 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index dbc586e..51c2826 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
 dnstop-20090128.tar.gz
 /dnstop-20110502.tar.gz
 /dnstop-20121017.tar.gz
+/dnstop-20140912.tar.gz
+/dnstop-20140915.tar.gz
diff --git a/dnstop-20140915-fix-warnings.patch b/dnstop-20140915-fix-warnings.patch
new file mode 100644
index 0000000..24aa49b
--- /dev/null
+++ b/dnstop-20140915-fix-warnings.patch
@@ -0,0 +1,47 @@
+diff -Naur dnstop-20140915-orig/dnstop.c dnstop-20140915/dnstop.c
+--- dnstop-20140915-orig/dnstop.c	2014-09-15 13:54:51.000000000 -0400
++++ dnstop-20140915/dnstop.c	2014-09-15 15:01:07.330360808 -0400
+@@ -18,6 +18,8 @@
+ 
+ #include <netinet/in.h>
+ 
++#include <err.h>
++#include <errno.h>
+ #include <pcap.h>
+ #include <signal.h>
+ #include <stdio.h>
+@@ -328,12 +330,16 @@
+ 	ptr->addr = *orig_addr;
+ 	ptr->data = (void *)(ptr + 1);
+ 	if (4 == inXaddr_version(orig_addr)) {
+-	    (void) read(entropy_fd, buf, 4);
++	    ssize_t rd = read(entropy_fd, buf, 4);
++	    if (rd < 4)
++		err(errno, "read entropy");
+ 	    inXaddr_assign_v4(ptr->data, (struct in_addr *)buf);
+ 	}
+ #if USE_IPV6
+ 	else {
+-	    (void) read(entropy_fd, buf, 16);
++	    ssize_t rd = read(entropy_fd, buf, 16);
++	    if (rd < 16)
++		err(errno, "read entropy");
+ 	    inXaddr_assign_v6(ptr->data, (struct in6_addr *)buf);
+ 	}
+ #endif
+@@ -1581,7 +1587,6 @@
+ UnknownTldFilter(FilterData * fd)
+ {
+     const char *tld = QnameToNld(fd->qname, 1);
+-    unsigned int i;
+     if (NULL == tld)
+ 	return 1;		/* tld is unknown */
+     if (hash_find(tld, KnownTLDs))
+@@ -1593,7 +1598,6 @@
+ NewGTldFilter(FilterData * fd)
+ {
+     const char *tld = QnameToNld(fd->qname, 1);
+-    unsigned int i;
+     if (NULL == tld)
+ 	return 0;		/* tld is unknown */
+     if (hash_find(tld, NewGTLDs))
diff --git a/dnstop-20140915-usage.patch b/dnstop-20140915-usage.patch
new file mode 100644
index 0000000..dbf70cf
--- /dev/null
+++ b/dnstop-20140915-usage.patch
@@ -0,0 +1,11 @@
+diff -Naur dnstop-20140915-orig/dnstop.c dnstop-20140915/dnstop.c
+--- dnstop-20140915-orig/dnstop.c	2014-09-15 15:04:22.269036463 -0400
++++ dnstop-20140915/dnstop.c	2014-09-15 15:05:25.844562897 -0400
+@@ -1808,6 +1808,7 @@
+     fprintf(stderr, "\n");
+     fprintf(stderr, "Available filters:\n");
+     fprintf(stderr, "\tunknown-tlds\n");
++    fprintf(stderr, "\tnew-gtlds\n");
+     fprintf(stderr, "\tA-for-A\n");
+     fprintf(stderr, "\trfc1918-ptr\n");
+     fprintf(stderr, "\trefused\n");
diff --git a/dnstop.spec b/dnstop.spec
index 0b5d262..0e26e28 100644
--- a/dnstop.spec
+++ b/dnstop.spec
@@ -1,16 +1,15 @@
+%global _hardened_build 1
 Name:           dnstop
-Version:        20121017
-Release:        6%{?dist}
+Version:        20140915
+Release:        1%{?dist}
 Summary:        Displays information about DNS traffic on your network
 Group:          Applications/System
 License:        BSD
 URL:            http://dns.measurement-factory.com/tools/dnstop/
 Source0:        http://dns.measurement-factory.com/tools/dnstop/src/dnstop-%{version}.tar.gz
 
-# At one point int[] arrays are passed to a uint* function; since all
-# callers are signed, changed function to take signed ints.
-# Also, check read(2) for entropy data and abort on short reads.
-Patch0:         dnstop-20121017-fix-warnings.diff
+Patch1:         dnstop-20140915-fix-warnings.patch
+Patch2:         dnstop-20140915-usage.patch
 
 BuildRequires:  libpcap-devel
 BuildRequires:  ncurses-devel
@@ -31,28 +30,31 @@ tcpdump savefile.
 
 %prep
 %setup -q
-%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 %configure
 make %{?_smp_mflags}
 
-
 %install
 mkdir -p $RPM_BUILD_ROOT%{_bindir}
 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
 
 make install DESTDIR=$RPM_BUILD_ROOT
 
-
 %files
-%defattr(-,root,root,-)
 %doc LICENSE CHANGES
 %{_bindir}/dnstop
 %{_mandir}/man8/dnstop.8*
 
-
 %changelog
+* Mon Sep 15 2014 Paul Wouters <pwouters at redhat.com> - 20140915-1
+- Updated to 20140915 with new-gtlds filter support
+- Updated warning patch (partially merged upstream)
+- Added usage patch that was missing the new filter name new-gtlds
+- Enabled hardening as this application takes in network input.
+
 * Sat Aug 16 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 20121017-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/sources b/sources
index 0fd37cf..db31200 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0407f08e5788b59268048d00cdddd5b6  dnstop-20121017.tar.gz
+f0fe1690b114e076196a51d63266eadc  dnstop-20140915.tar.gz


More information about the scm-commits mailing list