]> git.pld-linux.org Git - packages/nagios-plugins.git/commitdiff
- rel 2; fix check_http ssl test auto/th/nagios-plugins-2.2.1-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 7 Nov 2017 10:06:44 +0000 (11:06 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 7 Nov 2017 10:06:44 +0000 (11:06 +0100)
nagios-plugins-check_http-ssl.patch [new file with mode: 0644]
nagios-plugins.spec

diff --git a/nagios-plugins-check_http-ssl.patch b/nagios-plugins-check_http-ssl.patch
new file mode 100644 (file)
index 0000000..b786447
--- /dev/null
@@ -0,0 +1,44 @@
+From 80ec842a8942fb8c1d10cf68d3e34fe865e081ba Mon Sep 17 00:00:00 2001
+From: Bryan Heden <bheden@nagios.com>
+Date: Sat, 2 Sep 2017 15:05:16 -0500
+Subject: [PATCH] removed conditional 'if result != ok' for certificate
+ checking
+
+---
+ plugins/check_http.c | 9 ++++-----
+ plugins/sslutils.c   | 2 +-
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/plugins/check_http.c b/plugins/check_http.c
+index f46935ec..e7bfcb7a 100644
+--- a/plugins/check_http.c
++++ b/plugins/check_http.c
+@@ -1026,11 +1026,10 @@ check_http (void)
+     elapsed_time_ssl = (double)microsec_ssl / 1.0e6;
+     if (check_cert == TRUE) {
+                       result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
+-                      if (result != STATE_OK) {
+-                              np_net_ssl_cleanup();
+-                              if (sd) close(sd);
+-                              return result;
+-                      }
++                        if (sd)
++                          close(sd);
++                        np_net_ssl_cleanup();
++                        return result;
+     }
+   }
+ #endif /* HAVE_SSL */
+diff --git a/plugins/sslutils.c b/plugins/sslutils.c
+index 8f59d60c..6fe0e45d 100644
+--- a/plugins/sslutils.c
++++ b/plugins/sslutils.c
+@@ -316,7 +316,7 @@ int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit){
+               else
+                       status = STATE_CRITICAL;
+       } else {
+-              printf(_("OK - Certificate '%s' will expire on %s. "), cn, timestamp);
++              printf(_("OK - Certificate '%s' will expire on %s.\n"), cn, timestamp);
+               status = STATE_OK;
+       }
+       X509_free(certificate);
index 69f001bd08748ee21d5210320dfffe5a43da85e1..85c886c80dfa838e278ad5212c58e9a00668f5cc 100644 (file)
@@ -17,7 +17,7 @@ Summary:      Host/service/network monitoring program plugins for Nagios
 Summary(pl.UTF-8):     Wtyczki do monitorowania hostów/usług/sieci dla Nagiosa
 Name:          nagios-plugins
 Version:       2.2.1
-Release:       1
+Release:       2
 License:       GPL v3
 Group:         Networking
 Source0:       http://www.nagios-plugins.org/download/%{name}-%{version}.tar.gz
@@ -29,6 +29,7 @@ Source2:      nagios-utils.php
 #Patch:                %{name}-shared.patch # needs finishing
 Patch0:                %{name}-tainted.patch
 Patch1:                http.patch
+Patch2:                nagios-plugins-check_http-ssl.patch
 Patch4:                %{name}-noroot.patch
 Patch5:                %{name}-check_ping-socket-filter-warning.patch
 Patch7:                %{name}-pgsql.patch
@@ -525,13 +526,20 @@ Wtyczki przekazane do projektu Nagios. Część z nich działa, część nie.
 mv nagios-plugins-config-*/* .
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+
 %patch4 -p1
 %patch5 -p1
+
 %patch7 -p1
+
 %patch13 -p1
+
 %patch21 -p1
+
 %patch23 -p1
 %patch24 -p1
+
 %patch27 -p1
 
 # remove libtool m4 macro copies, breaks when system libtool is older
This page took 0.197949 seconds and 4 git commands to generate.