[nmap/f19] do not print debug messages during normal use (#994376)

Michal Hlavinka mhlavink at fedoraproject.org
Thu Aug 8 14:55:18 UTC 2013


commit 37234cb257c879c2f08acab9a817d264d84d5c40
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Thu Aug 8 16:55:08 2013 +0200

    do not print debug messages during normal use (#994376)

 nmap-6.40-logdebug.patch |   33 +++++++++++++++++++++++++++++++++
 nmap.spec                |    9 ++++++++-
 2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/nmap-6.40-logdebug.patch b/nmap-6.40-logdebug.patch
new file mode 100644
index 0000000..b0b99c2
--- /dev/null
+++ b/nmap-6.40-logdebug.patch
@@ -0,0 +1,33 @@
+diff -up nmap-6.40/ncat/ncat_connect.c.logdebug nmap-6.40/ncat/ncat_connect.c
+--- nmap-6.40/ncat/ncat_connect.c.logdebug	2013-08-08 16:49:23.541312607 +0200
++++ nmap-6.40/ncat/ncat_connect.c	2013-08-08 16:50:07.311943322 +0200
+@@ -420,7 +420,8 @@ static int do_proxy_http(void)
+         goto bail;
+     }
+     code = http_parse_status_line_code(status_line);
+-    logdebug("Proxy returned status code %d.\n", code);
++    if (o.debug)
++        logdebug("Proxy returned status code %d.\n", code);
+     free(status_line);
+     status_line = NULL;
+     if (http_read_header(&sockbuf, &header) != 0) {
+@@ -461,7 +462,8 @@ static int do_proxy_http(void)
+             http_challenge_free(&challenge);
+             goto bail;
+         }
+-        logdebug("Reconnection header:\n%s", request);
++        if (o.debug)
++            logdebug("Reconnection header:\n%s", request);
+         if (send(sd, request, n, 0) < 0) {
+             loguser("Error sending proxy request: %s.\n", socket_strerror(socket_errno()));
+             free(request);
+@@ -478,7 +480,8 @@ static int do_proxy_http(void)
+             goto bail;
+         }
+         code = http_parse_status_line_code(status_line);
+-        logdebug("Proxy returned status code %d.\n", code);
++        if (o.debug)
++            logdebug("Proxy returned status code %d.\n", code);
+         free(status_line);
+         status_line = NULL;
+         if (http_read_header(&sockbuf, &header) != 0) {
diff --git a/nmap.spec b/nmap.spec
index 32d0126..83e42a7 100644
--- a/nmap.spec
+++ b/nmap.spec
@@ -4,7 +4,7 @@ Name: nmap
 Epoch: 2
 Version: 6.40
 #global prerelease TEST5
-Release: 1%{?dist}
+Release: 2%{?dist}
 # nmap is GPLv2
 # zenmap is GPLv2 and LGPLv2+ (zenmap/higwidgets) and GPLv2+ (zenmap/radialnet)
 # libdnet-stripped is BSD (advertising clause rescinded by the Univ. of California in 1999) with some parts as Public Domain (crc32)
@@ -31,6 +31,9 @@ Patch4: zenmap-621887-workaround.patch
 Patch5: ncat_reg_stdin.diff
 Patch6: nmap-6.25-displayerror.patch
 
+#rhbz#994376
+Patch7: nmap-6.40-logdebug.patch
+
 URL: http://nmap.org/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: openssl-devel, gtk2-devel, lua-devel, libpcap-devel, pcre-devel
@@ -86,6 +89,7 @@ uses.
 %patch4 -p1 -b .bz637403
 %patch5 -p1 -b .ncat_reg_stdin
 %patch6 -p1 -b .displayerror
+%patch7 -p1 -b .logdebug
 
 # for aarch64 support, not needed with autotools 2.69+
 for f in acinclude.m4 configure.ac nping/configure.ac
@@ -221,6 +225,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/xnmap.1.gz
 
 %changelog
+* Thu Aug 08 2013 Michal Hlavinka <mhlavink at redhat.com> - 2:6.40-2
+- do not print debug messages during normal use (#994376)
+
 * Tue Jul 30 2013 Michal Hlavinka <mhlavink at redhat.com> - 2:6.40-1
 - nmap updated to 6.40
 


More information about the scm-commits mailing list