diff --git a/nagios-plugins-0011-various_bugzilla_fixes.patch b/nagios-plugins-0011-various_bugzilla_fixes.patch index 9bcd4fc..37c5b36 100644 --- a/nagios-plugins-0011-various_bugzilla_fixes.patch +++ b/nagios-plugins-0011-various_bugzilla_fixes.patch @@ -1,6 +1,61 @@ +diff -up ./plugins/check_dns.c.fixes_for_release_201702 ./plugins/check_dns.c +--- ./plugins/check_dns.c.fixes_for_release_201702 2017-01-19 11:01:31.000000000 -0500 ++++ ./plugins/check_dns.c 2017-02-24 16:00:27.484303747 -0500 +@@ -28,9 +28,9 @@ + * + * + *****************************************************************************/ +-#define IF_RECORD(label, querytype, verb_str) if (strstr (chld_out.line[i], label) && (strncmp(query_type, querytype, query_size) == 0 || strncmp(query_type, "-querytype=ANY", query_size) == 0)) { \ ++#define IF_RECORD(label, querytype, verb_str, comp_str) if (strstr (chld_out.line[i], label) && (strncmp(query_type, querytype, query_size) == 0 || strncmp(query_type, "-querytype=ANY", query_size) == 0)) { \ + if (verbose) printf(verb_str); \ +- temp_buffer = rindex (chld_out.line[i], ' '); \ ++ temp_buffer = rindex (chld_out.line[i], comp_str); \ + addresses[n_addresses++] = check_new_address(temp_buffer); \ + memset(query_found, '\0', sizeof(query_found)); \ + strncpy(query_found, querytype, sizeof(query_found)); +@@ -189,22 +189,15 @@ main (int argc, char **argv) + if (strstr (chld_out.line[i], "Name:")) + parse_address = TRUE; + /* begin handling types of records */ +- IF_RECORD("AAAA address", "-querytype=AAAA", "Found AAAA record\n") } +- else IF_RECORD("exchanger =", "-querytype=MX", "Found MX record\n") } +- else IF_RECORD("service =", "-querytype=SRV", "Found SRV record\n") } +- else IF_RECORD("nameserver =", "-querytype=NS", "Found NS record\n") } +- else IF_RECORD("dname =", "-querytype=DNAME", "Found DNAME record\n") } +- else IF_RECORD("protocol =", "-querytype=WKS", "Found WKS record\n") } +- else if (strstr (chld_out.line[i], "text =") && (strncmp(query_type, "-querytype=TXT", query_size) == 0 || strncmp(query_type, "-querytype=ANY", query_size) == 0)) { +- if (verbose) printf("Found TXT record\n"); +- temp_buffer = index(chld_out.line[i], '"'); +- --temp_buffer; +- addresses[n_addresses++] = check_new_address(temp_buffer); +- memset(query_found, '\0', sizeof(query_found)); +- strncpy(query_found, "-querytype=TXT", sizeof(query_found)); +- } ++ IF_RECORD("AAAA address", "-querytype=AAAA", "Found AAAA record\n", ' ') } ++ else IF_RECORD("exchanger =", "-querytype=MX", "Found MX record\n", '=') } ++ else IF_RECORD("service =", "-querytype=SRV", "Found SRV record\n", ' ') } ++ else IF_RECORD("nameserver =", "-querytype=NS", "Found NS record\n", ' ') } ++ else IF_RECORD("dname =", "-querytype=DNAME", "Found DNAME record\n", ' ') } ++ else IF_RECORD("protocol =", "-querytype=WKS", "Found WKS record\n", ' ') } ++ else IF_RECORD("text =", "-querytype=TXT", "Found TXT record\n", '"') } + /* only matching for origin records, if requested other fields could be included at a later date */ +- else IF_RECORD("origin =", "-querytype=SOA", "Found SOA record\n") } ++ else IF_RECORD("origin =", "-querytype=SOA", "Found SOA record\n", ' ') } + /* cnames cannot use macro as we must check for accepting them separately */ + else if (accept_cname && strstr (chld_out.line[i], "canonical name =") && (strncmp(query_type, "-querytype=CNAME", query_size) == 0 || strncmp(query_type, "-querytype=ANY", query_size) == 0)) { + if (verbose) printf("Found CNAME record\n"); +@@ -220,7 +213,7 @@ main (int argc, char **argv) + strncpy(query_found, "-querytype=A", sizeof(query_found)); + } + /* must be after other records with "name" as an identifier, as ptr does not spefify */ +- else IF_RECORD("name =", "-querytype=PTR", "Found PTR record\n") } ++ else IF_RECORD("name =", "-querytype=PTR", "Found PTR record\n", ' ') } + /* needed for non-query ptr\reverse lookup checks */ + else if (strstr(chld_out.line[i], ".in-addr.arpa") && !query_set) { + if ((temp_buffer = strstr(chld_out.line[i], "name = "))) diff -up ./plugins/check_snmp.c.fixes_for_release_201702 ./plugins/check_snmp.c ---- ./plugins/check_snmp.c.fixes_for_release_201702 2017-02-16 17:33:10.450425278 -0500 -+++ ./plugins/check_snmp.c 2017-02-16 17:43:24.968971451 -0500 +--- ./plugins/check_snmp.c.fixes_for_release_201702 2017-01-19 11:01:31.000000000 -0500 ++++ ./plugins/check_snmp.c 2017-02-24 15:59:37.825036429 -0500 @@ -328,12 +328,12 @@ main (int argc, char **argv) command_line[10 + numcontext + i] = authpriv[i]; } diff --git a/nagios-plugins.spec b/nagios-plugins.spec index de0b019..d9da367 100644 --- a/nagios-plugins.spec +++ b/nagios-plugins.spec @@ -1,8 +1,8 @@ %global _hardened_build 1 Name: nagios-plugins -Version: 2.1.4 -Release: 7%{?dist} +Version: 2.2.0 +Release: 1%{?dist} Summary: Host/service/network monitoring program plugins for Nagios Group: Applications/System @@ -15,8 +15,8 @@ Patch2: nagios-plugins-0002-Remove-assignment-of-not-parsed-to-jitter.patch Patch5: nagios-plugins-0005-Prevent-check_swap-from-returning-OK-if-no-swap-acti.patch Patch7: nagios-plugins-0007-Fix-the-use-lib-statement-and-the-external-ntp-comma.patch # Patch 8 no longer needed -Patch9: nagios-plugins-0009-Grab-pre22fixes-from-git.patch -Patch10: nagios-plugins-0010-autoconf-fix-for-openssl110 +# Patch 9 no longer needed +# Patch 10 no longer needed Patch11: nagios-plugins-0011-various_bugzilla_fixes.patch @@ -564,10 +564,7 @@ Provides check_wave support for Nagios. %patch2 -p1 -b .not_parsed %patch5 -p1 -b .fix_missing_swap %patch7 -p1 -b .ext_ntp_cmds -%patch9 -p1 -b .fixes_from_git_20170117 -%if 0%{?fedora} >25 -%patch10 -p1 -b .fix_autotools_for_openssl110 -%endif + %patch11 -p1 -b .fixes_for_release_201702 %build @@ -811,6 +808,12 @@ chmod 644 %{buildroot}/%{_libdir}/nagios/plugins/utils.pm %{_libdir}/nagios/plugins/check_wave %changelog +* Fri Feb 24 2017 Stephen Smoogen - 2.2.0-1 +- Update to 2.2.0 +- Add fix for MX to match old 2.0.3 MX +- Remove patches that were incorporated into 2.2.0 +- Remove autoconf patch for openssl110 + * Thu Feb 16 2017 Stephen Smoogen - 2.1.4-7 - Got feedback on bz 1422993. Put in fix from github