[packages/nagios-plugins] - rel 2; fix check_http ssl test
arekm
arekm at pld-linux.org
Tue Nov 7 11:06:50 CET 2017
commit c61305fb608af1ae473bf1406ed3673850923792
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Nov 7 11:06:44 2017 +0100
- rel 2; fix check_http ssl test
nagios-plugins-check_http-ssl.patch | 44 +++++++++++++++++++++++++++++++++++++
nagios-plugins.spec | 10 ++++++++-
2 files changed, 53 insertions(+), 1 deletion(-)
---
diff --git a/nagios-plugins.spec b/nagios-plugins.spec
index 69f001b..85c886c 100644
--- a/nagios-plugins.spec
+++ b/nagios-plugins.spec
@@ -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
diff --git a/nagios-plugins-check_http-ssl.patch b/nagios-plugins-check_http-ssl.patch
new file mode 100644
index 0000000..b786447
--- /dev/null
+++ b/nagios-plugins-check_http-ssl.patch
@@ -0,0 +1,44 @@
+From 80ec842a8942fb8c1d10cf68d3e34fe865e081ba Mon Sep 17 00:00:00 2001
+From: Bryan Heden <bheden at 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);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugins.git/commitdiff/c61305fb608af1ae473bf1406ed3673850923792
More information about the pld-cvs-commit
mailing list