[packages/nagios-plugins] - up to 2.3.1

arekm arekm at pld-linux.org
Thu Feb 6 22:16:21 CET 2020


commit b0b100147621b3fc2984c8a369bdc5f61634106c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Feb 6 22:16:14 2020 +0100

    - up to 2.3.1

 nagios-plugins-check_http-ssl.patch | 44 -----------------------
 nagios-plugins-tainted.patch        | 10 ++++--
 nagios-plugins.spec                 | 12 +++----
 sni.patch                           | 69 -------------------------------------
 4 files changed, 12 insertions(+), 123 deletions(-)
---
diff --git a/nagios-plugins.spec b/nagios-plugins.spec
index 921ab41..475bad3 100644
--- a/nagios-plugins.spec
+++ b/nagios-plugins.spec
@@ -15,19 +15,19 @@
 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:	9
+Version:	2.3.1
+Release:	1
 License:	GPL v3
 Group:		Networking
 Source0:	http://www.nagios-plugins.org/download/%{name}-%{version}.tar.gz
-# Source0-md5:	fb521d5c05897f165b0b1862c1e5cb27
+# Source0-md5:	57d4e201e2ec90d8f0bda09e320a0439
 # https://git.pld-linux.org/projects/nagios-config
 Source1:	%{name}-config-20171120.tar.xz
 # Source1-md5:	384c340b1f7579722652acfe90f3d064
 Source2:	nagios-utils.php
 #Patch:		%{name}-shared.patch # needs finishing
 Patch0:		%{name}-tainted.patch
-Patch2:		%{name}-check_http-ssl.patch
+
 Patch3:		%{name}-noroot.patch
 Patch4:		%{name}-check_ping-socket-filter-warning.patch
 Patch5:		%{name}-pgsql.patch
@@ -38,7 +38,6 @@ Patch9:		%{name}-paths.patch
 Patch10:	%{name}-ping.patch
 Patch11:	dns-config.patch
 Patch12:	%{name}-check_http-nocache.patch
-Patch13:	sni.patch
 URL:		http://www.nagiosplugins.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -525,7 +524,7 @@ Wtyczki przekazane do projektu Nagios. Część z nich działa, część nie.
 %setup -q -a1
 mv nagios-plugins-config-*/* .
 %patch0 -p1
-%patch2 -p1
+
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
@@ -536,7 +535,6 @@ mv nagios-plugins-config-*/* .
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
-%patch13 -p1
 
 # remove libtool m4 macro copies, breaks when system libtool is older
 %{__rm} gl/m4/libtool.m4 gl/m4/lt*.m4
diff --git a/nagios-plugins-check_http-ssl.patch b/nagios-plugins-check_http-ssl.patch
deleted file mode 100644
index b786447..0000000
--- a/nagios-plugins-check_http-ssl.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-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);
diff --git a/nagios-plugins-tainted.patch b/nagios-plugins-tainted.patch
index a18e3a8..c021ac6 100644
--- a/nagios-plugins-tainted.patch
+++ b/nagios-plugins-tainted.patch
@@ -18,12 +18,16 @@
  
  Getopt::Long::Configure('bundling');
  GetOptions
-@@ -50,34 +51,34 @@
+@@ -53,7 +53,7 @@ my $critical = $1 if ($opt_c =~ /([0-9]+
  ($opt_w) || ($opt_w = shift) || ($opt_w = 60);
  my $warning = $1 if ($opt_w =~ /([0-9]+)/);
  
--$low1 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
-+$low1 = `/usr/bin/snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
+-$low1 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1 2>/dev/null`;
++$low1 = `/usr/bin/snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1 2>/dev/null`;
+ unless ($low1) {
+ 	print "UNKNOWN - Could not find the 'snmpget' command Please install\n";
+ 	print "the snmp commands (usually net-snmp) before using $PROGNAME\n";
+@@ -62,30 +62,30 @@ unless ($low1) {
  @test = split(/ /,$low1);
  $low1 = $test[2];
  
diff --git a/sni.patch b/sni.patch
deleted file mode 100644
index 99c76fd..0000000
--- a/sni.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- nagios-plugins-2.2.1/plugins/check_smtp.org	2019-08-30 11:23:27.030644413 +0200
-+++ nagios-plugins-2.2.1/plugins/check_smtp.c	2019-08-30 11:23:46.804575703 +0200
-@@ -106,6 +106,7 @@ double critical_time = 0;
- int check_critical_time = FALSE;
- int verbose = 0;
- int use_ssl = FALSE;
-+int use_sni = FALSE;
- short use_ehlo = FALSE;
- short use_lhlo = FALSE;
- short ssl_established = 0;
-@@ -250,7 +251,7 @@ main (int argc, char **argv)
- 		    smtp_quit();
- 		    return STATE_UNKNOWN;
- 		  }
--		  result = np_net_ssl_init(sd);
-+		  result = np_net_ssl_init_with_hostname(sd, (use_sni ? server_address : NULL));
- 		  if(result != STATE_OK) {
- 		    printf (_("CRITICAL - Cannot create SSL context.\n"));
- 		    close(sd);
-@@ -460,6 +461,10 @@ process_arguments (int argc, char **argv
- 	int c;
- 	char* temp;
- 
-+	enum {
-+	  SNI_OPTION
-+	};
-+
- 	int option = 0;
- 	static struct option longopts[] = {
- 		{"hostname", required_argument, 0, 'H'},
-@@ -482,6 +487,7 @@ process_arguments (int argc, char **argv
- 		{"help", no_argument, 0, 'h'},
- 		{"lmtp", no_argument, 0, 'L'},
- 		{"starttls",no_argument,0,'S'},
-+		{"sni", no_argument, 0, SNI_OPTION},
- 		{"certificate",required_argument,0,'D'},
- 		{"ignore-quit-failure",no_argument,0,'q'},
- 		{0, 0, 0, 0}
-@@ -622,6 +628,13 @@ process_arguments (int argc, char **argv
- 			use_ssl = TRUE;
- 			use_ehlo = TRUE;
- 			break;
-+		case SNI_OPTION:
-+#ifdef HAVE_SSL
-+			use_sni = TRUE;
-+#else
-+			usage (_("SSL support not available - install OpenSSL and recompile"));
-+#endif
-+			break;
- 		case 'L':
- 			use_lhlo = TRUE;
- 			break;
-@@ -825,6 +838,8 @@ print_help (void)
-   printf ("    %s\n", _("Minimum number of days a certificate has to be valid."));
-   printf (" %s\n", "-S, --starttls");
-   printf ("    %s\n", _("Use STARTTLS for the connection."));
-+  printf (" %s\n", "--sni");
-+  printf ("    %s\n", _("Enable SSL/TLS hostname extension support (SNI)"));
- #endif
- 
- 	printf (" %s\n", "-A, --authtype=STRING");
-@@ -861,6 +876,6 @@ print_usage (void)
-   printf ("%s\n", _("Usage:"));
-   printf ("%s -H host [-p port] [-4|-6] [-e expect] [-C command] [-R response] [-f from addr]\n", progname);
-   printf ("[-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout] [-q]\n");
--  printf ("[-F fqdn] [-S] [-L] [-D warn days cert expire[,crit days cert expire]] [-v] \n");
-+  printf ("[-F fqdn] [-S] [-L] [-D warn days cert expire[,crit days cert expire]] [--sni] [-v] \n");
- }
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugins.git/commitdiff/b0b100147621b3fc2984c8a369bdc5f61634106c



More information about the pld-cvs-commit mailing list