[Pkg-nagios-changes] [pkg-nagios-plugins] 288/413: check_tcp and check_smtp: fixing duplicate messages at cert errors

Jan Wagner waja at moszumanska.debian.org
Tue Nov 26 23:13:33 UTC 2013


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository pkg-nagios-plugins.

commit c79d5ca02d214f182f335fc296eecf8abadc9da3
Author: Jan Wagner <waja at cyconet.org>
Date:   Tue Feb 21 14:04:16 2012 +0000

    check_tcp and check_smtp: fixing duplicate messages at cert errors
---
 debian/changelog                                   |  4 ++++
 ...17_check_smtp_fix_duplicate_cert_message.dpatch | 24 +++++++++++++++++++
 .../17_check_tcp_fix_duplicate_cert_message.dpatch | 28 ++++++++++++++++++++++
 3 files changed, 56 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index acd275b..557f0dc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@ nagios-plugins (1.4.15-6) UNRELEASED; urgency=low
   * Add '-w %d' as ping argument for check_ping on non-linux plattforms, as
     inetutils-ping is now supporting this, thanks Guillem Jover for bringing
     this up (Closes: #655023)
+  * Adding 17_check_smtp_fix_duplicate_cert_message.dpatch and
+    17_check_tcp_fix_duplicate_cert_message.dpatch (Closes: #654682), to fix
+    duplicate messages when certificate errors occures, thanks Sebastian Harl
+    for reporting
 
  -- Jan Wagner <waja at cyconet.org>  Wed, 07 Sep 2011 15:33:55 +0200
 
diff --git a/debian/patches/17_check_smtp_fix_duplicate_cert_message.dpatch b/debian/patches/17_check_smtp_fix_duplicate_cert_message.dpatch
new file mode 100644
index 0000000..c5a1410
--- /dev/null
+++ b/debian/patches/17_check_smtp_fix_duplicate_cert_message.dpatch
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 17_check_smtp_fix_duplicate_cert_message.dpatch
+## From 4d06603060fc1233861b164870f0d3a2e0d8d2eb Fri, 15 Jul 2011 20:19:15 +0000 (+0100)
+## From: Ton Voon <ton.voon at opsera.com>
+## Date: Tue, 6 Sep 2011 23:20:21 -0400
+## Subject: [PATCH] Fix check_smtp and check_tcp where duplicate messages were displayed for certificate... 
+## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commitdiff_plain;h=4d06603060fc1233861b164870f0d3a2e0d8d2eb
+##
+## DP: Fix check_smtp where duplicate messages were displayed for certificate errors
+
+ at DPATCH@
+
+--- a/plugins/check_smtp.c
++++ b/plugins/check_smtp.c
+@@ -276,9 +276,6 @@ main (int argc, char **argv)
+ #  ifdef USE_OPENSSL
+ 		  if ( check_cert ) {
+ 		    result = np_net_ssl_check_cert(days_till_exp);
+-		    if(result != STATE_OK){
+-		      printf ("%s\n", _("CRITICAL - Cannot retrieve server certificate."));
+-		    }
+ 		    my_close();
+ 		    return result;
+ 		  }
diff --git a/debian/patches/17_check_tcp_fix_duplicate_cert_message.dpatch b/debian/patches/17_check_tcp_fix_duplicate_cert_message.dpatch
new file mode 100644
index 0000000..4b6999e
--- /dev/null
+++ b/debian/patches/17_check_tcp_fix_duplicate_cert_message.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 17_check_tcp_fix_duplicate_cert_message.dpatch
+## From 4d06603060fc1233861b164870f0d3a2e0d8d2eb Fri, 15 Jul 2011 20:19:15 +0000 (+0100)
+## From: Ton Voon <ton.voon at opsera.com>
+## Date: Tue, 6 Sep 2011 23:20:21 -0400
+## Subject: [PATCH] Fix check_smtp and check_tcp where duplicate messages were displayed for certificate... 
+## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commitdiff_plain;h=4d06603060fc1233861b164870f0d3a2e0d8d2eb
+##
+## DP: Fix check_tcp where duplicate messages were displayed for certificate errors
+
+ at DPATCH@
+
+--- a/plugins/check_tcp.c
++++ b/plugins/check_tcp.c
+@@ -236,12 +236,9 @@ main (int argc, char **argv)
+ 		result = np_net_ssl_init(sd);
+ 		if (result == STATE_OK && check_cert == TRUE) {
+ 			result = np_net_ssl_check_cert(days_till_exp);
+-			if(result != STATE_OK) {
+-				printf(_("CRITICAL - Cannot retrieve server certificate.\n"));
+-			}
+ 		}
+ 	}
+-	if(result != STATE_OK){
++	if(result != STATE_OK || check_cert == TRUE){
+ 		np_net_ssl_cleanup();
+ 		if(sd) close(sd);
+ 		return result;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins.git



More information about the Pkg-nagios-changes mailing list