From 781e78fc4cc0d1f2cdf01a210c9e4d18239af4ca Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 18 May 2012 10:28:37 +0000 Subject: [PATCH 01/12] new changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index f66aa84..5c328a4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nagios-plugins (1.4.15-7) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Fri, 18 May 2012 12:27:45 +0200 + nagios-plugins (1.4.15-6) unstable; urgency=low * Add nagios-plugins-common package which ships files possibly needed also by From 425c7443cf0551e407a56b7915619127f50ceec4 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 18 May 2012 11:05:14 +0000 Subject: [PATCH 02/12] Recommand nagios-plugins-contrib --- debian/changelog | 4 +++- debian/control | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5c328a4..a8f37d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ nagios-plugins (1.4.15-7) UNRELEASED; urgency=low - * NOT RELEASED YET + * Recommand nagios-plugins-contrib via nagios-plugins, drop + nagios-plugins-common which gets installed by nagios-plugins-basic + anyways -- Jan Wagner Fri, 18 May 2012 12:27:45 +0200 diff --git a/debian/control b/debian/control index c086ff2..63856b0 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Standards-Version: 3.9.2 Package: nagios-plugins Architecture: all Depends: ${misc:Depends}, nagios-plugins-basic, nagios-plugins-standard -Recommends: nagios-plugins-common +Recommends: nagios-plugins-contrib Suggests: nagios3 | icinga Description: Plugins for nagios compatible monitoring systems (metapackage) Plugins for nagios compatible monitoring systems like Nagios and Icinga. From 68bbbef07c375739906360c39f1b7523693f5cd9 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 22 May 2012 18:03:55 +0000 Subject: [PATCH 03/12] make use of replaces --- debian/changelog | 6 ++++-- debian/control | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index a8f37d8..cc204b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,12 @@ -nagios-plugins (1.4.15-7) UNRELEASED; urgency=low +nagios-plugins (1.4.15-7) unstable; urgency=low * Recommand nagios-plugins-contrib via nagios-plugins, drop nagios-plugins-common which gets installed by nagios-plugins-basic anyways + * Add Replaces: nagios-plugins-basic to nagios-plugins-common + (Closes: #673891), thanks to Christoph Anton Mitterer - -- Jan Wagner Fri, 18 May 2012 12:27:45 +0200 + -- Jan Wagner Tue, 22 May 2012 20:00:03 +0200 nagios-plugins (1.4.15-6) unstable; urgency=low diff --git a/debian/control b/debian/control index 63856b0..be2a07e 100644 --- a/debian/control +++ b/debian/control @@ -25,7 +25,7 @@ Description: Plugins for nagios compatible monitoring systems (metapackage) Package: nagios-plugins-common Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ucf -Breaks: nagios-plugins-basic (<= 1.4.15-5) +Replaces: nagios-plugins-basic (<= 1.4.15-5) Suggests: nagios3 | icinga Description: Common files for plugins for nagios compatible monitoring Common files for plugins for nagios compatible monitoring systems like Nagios @@ -36,7 +36,7 @@ Description: Common files for plugins for nagios compatible monitoring Package: nagios-plugins-basic Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, procps, iputils-ping [linux-any], inetutils-ping [kfreebsd-any hurd-any], ucf -Pre-Depends: nagios-plugins-common +Pre-Depends: nagios-plugins-common (>= 1.4.15-6) Conflicts: nagios-plugins (<= 1.4.2-3) Replaces: nagios-plugins, nagios-plugins-standard Suggests: nagios3 | icinga From b5131092bf62304a0d8506da7fd56d38b1c58e7d Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 22 May 2012 19:08:21 +0000 Subject: [PATCH 04/12] new changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index cc204b1..a04c5be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nagios-plugins (1.4.15-8) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Tue, 22 May 2012 21:07:50 +0200 + nagios-plugins (1.4.15-7) unstable; urgency=low * Recommand nagios-plugins-contrib via nagios-plugins, drop From 87edb050c266aa6d00d9f7e2837cf1c3b86fd5f8 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 13 Jun 2012 10:40:49 +0000 Subject: [PATCH 05/12] new upstream --- debian/changelog | 16 +- debian/patches/00list | 11 -- .../patches/10_check_disk_smb_spaces.dpatch | 29 --- ...ck_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch | 28 --- .../12_check_snmp_1.4.15_regression.dpatch | 180 ------------------ debian/patches/13_check_smtp_greeting.dpatch | 37 ---- .../patches/14_check_icmp_multiple_ips.dpatch | 27 --- debian/patches/15_check_sensors_fault.dpatch | 40 ---- ...16_check_raduis_fix_format-security.dpatch | 24 --- ...eck_smtp_fix_duplicate_cert_message.dpatch | 24 --- ...heck_tcp_fix_duplicate_cert_message.dpatch | 28 --- debian/patches/18_check_snmp_labels.dpatch | 34 ---- debian/patches/19_check_http_help.dpatch | 26 --- 13 files changed, 14 insertions(+), 490 deletions(-) delete mode 100644 debian/patches/10_check_disk_smb_spaces.dpatch delete mode 100644 debian/patches/11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch delete mode 100644 debian/patches/12_check_snmp_1.4.15_regression.dpatch delete mode 100644 debian/patches/13_check_smtp_greeting.dpatch delete mode 100644 debian/patches/14_check_icmp_multiple_ips.dpatch delete mode 100755 debian/patches/15_check_sensors_fault.dpatch delete mode 100644 debian/patches/16_check_raduis_fix_format-security.dpatch delete mode 100644 debian/patches/17_check_smtp_fix_duplicate_cert_message.dpatch delete mode 100644 debian/patches/17_check_tcp_fix_duplicate_cert_message.dpatch delete mode 100755 debian/patches/18_check_snmp_labels.dpatch delete mode 100644 debian/patches/19_check_http_help.dpatch diff --git a/debian/changelog b/debian/changelog index a04c5be..8d7b5eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,18 @@ -nagios-plugins (1.4.15-8) UNRELEASED; urgency=low +nagios-plugins (1.4.16~pre1-1) UNRELEASED; urgency=low - * NOT RELEASED YET + * New upstream snapshot + * Droped the following upstream integrated patches + - 10_check_disk_smb_spaces.dpatch + - 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch + - 12_check_snmp_1.4.15_regression.dpatch + - 13_check_smtp_greeting.dpatch + - 14_check_icmp_multiple_ips.dpatch + - 15_check_sensors_fault.dpatch + - 16_check_raduis_fix_format-security.dpatch + - 17_check_tcp_fix_duplicate_cert_message.dpatch + - 17_check_smtp_fix_duplicate_cert_message.dpatch + - 18_check_snmp_labels.dpatch + - 19_check_http_help.dpatch -- Jan Wagner Tue, 22 May 2012 21:07:50 +0200 diff --git a/debian/patches/00list b/debian/patches/00list index ee54c39..412b7ae 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,14 +1,3 @@ 02_check_icmp_links.dpatch # commited upstream -10_check_disk_smb_spaces.dpatch -11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch -12_check_snmp_1.4.15_regression.dpatch -13_check_smtp_greeting.dpatch -14_check_icmp_multiple_ips.dpatch -15_check_sensors_fault.dpatch -16_check_raduis_fix_format-security.dpatch -17_check_tcp_fix_duplicate_cert_message.dpatch -17_check_smtp_fix_duplicate_cert_message.dpatch 03_check_disk_smb_perfdata.dpatch -18_check_snmp_labels.dpatch -19_check_http_help.dpatch diff --git a/debian/patches/10_check_disk_smb_spaces.dpatch b/debian/patches/10_check_disk_smb_spaces.dpatch deleted file mode 100644 index 5d65732..0000000 --- a/debian/patches/10_check_disk_smb_spaces.dpatch +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 10_check_disk_smb_spaces.dpatch by -## Matthias Eble -## -## From 0892c4ac28c4c2e3b6275187f845813b4cd6d320 Mon Sep 17 00:00:00 2001 -## From: Matthias Eble -## Date: Sun, 28 Nov 2010 21:35:59 +0100 -## Subject: [PATCH] Make check_disk_smb accept spaces in share names -## (#990948, #1370031, Debian #601699) -## -## DP: Enables Support sharenames with spaces (http://bugs.debian.org/601699) -## DP: Upstream bug is: http://sourceforge.net/tracker/?func=detail&aid=990948&group_id=29880&atid=397597 - -@DPATCH@ - -diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl -index 7c81fc2..4698700 100755 ---- a/plugins-scripts/check_disk_smb.pl -+++ b/plugins-scripts/check_disk_smb.pl -@@ -67,7 +67,7 @@ my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/); - ($host) || usage("Invalid host: $opt_H\n"); - - ($opt_s) || ($opt_s = shift @ARGV) || usage("Share volume not specified\n"); --my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9]+\$?)$/); -+my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9 ]+\$?)$/); - ($share) || usage("Invalid share: $opt_s\n"); - - defined($opt_u) || ($opt_u = shift @ARGV) || ($opt_u = "guest"); - diff --git a/debian/patches/11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch b/debian/patches/11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch deleted file mode 100644 index 811da8b..0000000 --- a/debian/patches/11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch by -## Matthias Eble -## -## From 3c67c9cb60a4681a29e509fccbb333e0f6234f54 Mon Sep 17 00:00:00 2001 -## From: Matthias Eble -## Date: Sun, 28 Nov 2010 21:43:48 +0100 -## Subject: [PATCH] check_disk_smb now handles NT_STATUS_ACCESS_DENIED properly -## (Debian #601696) -## -## DP: Handles NT_STATUS_ACCESS_DENIED properly (http://bugs.debian.org/601696) - -@DPATCH@ - -diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl -index 4698700..6783543 100755 ---- a/plugins-scripts/check_disk_smb.pl -+++ b/plugins-scripts/check_disk_smb.pl -@@ -239,7 +239,7 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) { - $answer = "Result from smbclient not suitable\n"; - $state = "UNKNOWN"; - foreach (@lines) { -- if (/(Access denied|NT_STATUS_LOGON_FAILURE)/) { -+ if (/(Access denied|NT_STATUS_LOGON_FAILURE|NT_STATUS_ACCESS_DENIED)/) { - $answer = "Access Denied\n"; - $state = "CRITICAL"; - last; - diff --git a/debian/patches/12_check_snmp_1.4.15_regression.dpatch b/debian/patches/12_check_snmp_1.4.15_regression.dpatch deleted file mode 100644 index ca75278..0000000 --- a/debian/patches/12_check_snmp_1.4.15_regression.dpatch +++ /dev/null @@ -1,180 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 12_check_snmp_1.4.15_regression.dpatch by -## Thomas Guyot-Sionnest -## -## Original patch to make Timeticks works as in check_snmp v1.4.14, it turns -## out is_numeric isn't so useful and treating all types as numeric works -## best for backwards-compatibility. This is how it used to work in 1.4.14. -## -## As a special case, I also make calculate_rate look up for numeric values -## as it would otherwise return the last value instead. -## -## DP: Remove that is_numeric madness - -@DPATCH@ - - -diff --git a/NEWS b/NEWS -index ff92401..e3e8f37 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,5 +1,10 @@ - This file documents the major additions and syntax changes between releases. - -+ ... -+ -+ FIXES -+ Make check_snmp work more like v1.4.14 with regard to using special values (Timeticks, STRING) as numeric thresholds. -+ - 1.4.15 27th July 2010 - ENHANCEMENTS - New check_ntp_peer -m and -n options to check the number of usable time sources ("truechimers") -diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c -index f32a26e..d79da8c 100644 ---- a/plugins/check_snmp.c -+++ b/plugins/check_snmp.c -@@ -169,7 +169,6 @@ main (int argc, char **argv) - char *state_string=NULL; - size_t response_length, current_length, string_length; - char *temp_string=NULL; -- int is_numeric=0; - time_t current_time; - double temp_double; - time_t duration; -@@ -335,29 +334,24 @@ main (int argc, char **argv) - /* We strip out the datatype indicator for PHBs */ - if (strstr (response, "Gauge: ")) { - show = strstr (response, "Gauge: ") + 7; -- is_numeric++; - } - else if (strstr (response, "Gauge32: ")) { - show = strstr (response, "Gauge32: ") + 9; -- is_numeric++; - } - else if (strstr (response, "Counter32: ")) { - show = strstr (response, "Counter32: ") + 11; -- is_numeric++; - is_counter=1; - if(!calculate_rate) - strcpy(type, "c"); - } - else if (strstr (response, "Counter64: ")) { - show = strstr (response, "Counter64: ") + 11; -- is_numeric++; - is_counter=1; - if(!calculate_rate) - strcpy(type, "c"); - } - else if (strstr (response, "INTEGER: ")) { - show = strstr (response, "INTEGER: ") + 9; -- is_numeric++; - } - else if (strstr (response, "STRING: ")) { - show = strstr (response, "STRING: ") + 8; -@@ -396,15 +390,17 @@ main (int argc, char **argv) - } - - } -- else if (strstr (response, "Timeticks: ")) -+ else if (strstr (response, "Timeticks: ")) { - show = strstr (response, "Timeticks: "); -+ } - else - show = response; - - iresult = STATE_DEPENDENT; - - /* Process this block for numeric comparisons */ -- if (is_numeric) { -+ /* Make some special values,like Timeticks numeric only if a threshold is defined */ -+ if (thlds[i]->warning || thlds[i]->critical || calculate_rate) { - ptr = strpbrk (show, "0123456789"); - if (ptr == NULL) - die (STATE_UNKNOWN,_("No valid data returned")); -diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t -index 004ba1a..25a2999 100644 ---- a/plugins/t/check_snmp.t -+++ b/plugins/t/check_snmp.t -@@ -8,7 +8,7 @@ use strict; - use Test::More; - use NPTest; - --my $tests = 8+38+2+2; -+my $tests = 8+42+2+2; - plan tests => $tests; - my $res; - -@@ -124,6 +124,13 @@ SKIP: { - cmp_ok( $res->return_code, '==', 0, "Skipping all thresholds"); - like($res->output, '/^SNMP OK - \d+ \w+ \d+\s.*$/', "Skipping all thresholds, result printed rather than parsed"); - -+ $res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o system.sysUpTime.0 -c 1000000000: -u '1/100 sec'"); -+ cmp_ok( $res->return_code, '==', 2, "Timetick used as a threshold"); -+ like($res->output, '/^SNMP CRITICAL - \*\d+\* 1\/100 sec.*$/', "Timetick used as a threshold, parsed as numeric"); -+ -+ $res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o system.sysUpTime.0"); -+ cmp_ok( $res->return_code, '==', 0, "Timetick used as a string"); -+ like($res->output, '/^SNMP OK - Timeticks:\s\(\d+\)\s+(?:\d+ days?,\s+)?\d+:\d+:\d+\.\d+\s.*$/', "Timetick used as a string, result printed rather than parsed"); - } - - # These checks need a complete command line. An invalid community is used so -diff --git a/plugins/tests/check_snmp.t b/plugins/tests/check_snmp.t -index e7ad192..c960f7b 100755 ---- a/plugins/tests/check_snmp.t -+++ b/plugins/tests/check_snmp.t -@@ -51,7 +51,10 @@ if ($ARGV[0] && $ARGV[0] eq "-d") { - } - } - --my $tests = 33; -+# We should merge that with $ENV{'NPTEST_CACHE'}, use one dir for all test data -+$ENV{'NAGIOS_PLUGIN_STATE_DIRECTORY'} ||= "/var/tmp"; -+ -+my $tests = 39; - if (-x "./check_snmp") { - plan tests => $tests; - } else { -@@ -106,7 +109,7 @@ like($res->output, '/'.quotemeta('SNMP OK - And now have fun with with this: \"C - "And now have fun with with this: \"C:\\\\\" - because we\'re not done yet!"').'/m', "Attempt to confuse parser No.3"); - --system("rm /usr/local/nagios/var/check_snmp/*"); -+system("rm -f ".$ENV{'NAGIOS_PLUGIN_STATE_DIRECTORY'}."/check_snmp/*"); - $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10 --rate -w 600" ); - is($res->return_code, 0, "Returns OK"); - is($res->output, "No previous data to calculate rate - assume okay"); -@@ -170,5 +173,16 @@ $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1 - is($res->return_code, 0, "OK as string doesn't match but inverted" ); - is($res->output, 'SNMP OK - "stringtests" | ', "OK as inverted string no match" ); - -+$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.12 -w 4:5" ); -+is($res->return_code, 1, "Numeric in string test" ); -+is($res->output, 'SNMP WARNING - *3.5* | iso.3.6.1.4.1.8072.3.2.67.12=3.5 ', "WARNING threshold checks for string masquerading as number" ); -+ -+$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.13" ); -+is($res->return_code, 0, "Not really numeric test" ); -+is($res->output, 'SNMP OK - "87.4startswithnumberbutshouldbestring" | ', "Check string with numeric start is still string" ); -+ -+$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.14" ); -+is($res->return_code, 0, "Not really numeric test (trying best to fool it)" ); -+is($res->output, 'SNMP OK - "555\"I said\"" | ', "Check string with a double quote following is still a string (looks like the perl routine will always escape though)" ); - - -diff --git a/plugins/tests/check_snmp_agent.pl b/plugins/tests/check_snmp_agent.pl -index 8784ab1..2ad8516 100644 ---- a/plugins/tests/check_snmp_agent.pl -+++ b/plugins/tests/check_snmp_agent.pl -@@ -33,9 +33,9 @@ ends with with this: C:\\'; - my $multilin5 = 'And now have fun with with this: "C:\\" - because we\'re not done yet!'; - --my @fields = (ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_UNSIGNED, ASN_UNSIGNED, ASN_COUNTER, ASN_COUNTER64, ASN_UNSIGNED, ASN_COUNTER, ASN_OCTET_STR); --my @values = ($multiline, $multilin2, $multilin3, $multilin4, $multilin5, 4294965296, 1000, 4294965296, uint64("18446744073709351616"), int(rand(2**32)), 64000, "stringtests"); --my @incrts = (undef, undef, undef, undef, undef, 1000, -500, 1000, 100000, undef, 666, undef); -+my @fields = (ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_UNSIGNED, ASN_UNSIGNED, ASN_COUNTER, ASN_COUNTER64, ASN_UNSIGNED, ASN_COUNTER, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR ); -+my @values = ($multiline, $multilin2, $multilin3, $multilin4, $multilin5, 4294965296, 1000, 4294965296, uint64("18446744073709351616"), int(rand(2**32)), 64000, "stringtests", "3.5", "87.4startswithnumberbutshouldbestring", '555"I said"' ); -+my @incrts = (undef, undef, undef, undef, undef, 1000, -500, 1000, 100000, undef, 666, undef, undef, undef, undef ); - - # Number of elements in our OID - my $oidelts; - diff --git a/debian/patches/13_check_smtp_greeting.dpatch b/debian/patches/13_check_smtp_greeting.dpatch deleted file mode 100644 index 26e099b..0000000 --- a/debian/patches/13_check_smtp_greeting.dpatch +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 13_check_smtp_greeting.dpatch -## Holger Weiss -## -## From: d16f3fb0a9bb37cc1ce73ef14b5de83e907ef23c Tue, 8 Feb 2011 16:07:52 +0000 (+0100) -## From: Holger Weiss -## Date: Tue, 8 Feb 2011 16:07:52 +0000 (+0100) -## Subject: [PATCH] check_smtp: Abort on missing/unexpected greeting -## (Debian #611914) -## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug%2Fnagiosplug;a=commitdiff_plain;h=d16f3fb0a9bb37cc1ce73ef14b5de83e907ef23c -## -## DP: Abort on missing/unexpected greeting (http://bugs.debian.org/611914) - -@DPATCH@ - -diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c -index 3da724b..ed49163 100644 ---- a/plugins/check_smtp.c -+++ b/plugins/check_smtp.c -@@ -183,7 +183,7 @@ main (int argc, char **argv) - /* return a WARNING status if we couldn't read any data */ - if (recvlines(buffer, MAX_INPUT_BUFFER) <= 0) { - printf (_("recv() failed\n")); -- result = STATE_WARNING; -+ return STATE_WARNING; - } - else { - if (verbose) -@@ -197,7 +197,7 @@ main (int argc, char **argv) - else - printf (_("Invalid SMTP response received from host on port %d: %s\n"), - server_port, buffer); -- result = STATE_WARNING; -+ return STATE_WARNING; - } - } - diff --git a/debian/patches/14_check_icmp_multiple_ips.dpatch b/debian/patches/14_check_icmp_multiple_ips.dpatch deleted file mode 100644 index d189f21..0000000 --- a/debian/patches/14_check_icmp_multiple_ips.dpatch +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 14_check_icmp_multiple_ips.dpatch -## Sebastian Harl -## -## From: 1374f80872412b64bd13f17e6edd70aa59437012 Mon Sep 17 00:00:00 2001 -## From: Sebastian Harl -## Date: Thu, 28 Apr 2011 09:18:21 +0200 -## Subject: [PATCH] check_host: Allocate a large-enough buffer for the host table. -## (Debian #623702) -## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commitdiff_plain;h=1374f80872412b64bd13f17e6edd70aa59437012 -## -## DP: Allocate a large-enough buffer for the host table. (http://bugs.debian.org/623702) - -@DPATCH@ - ---- a/plugins-root/check_icmp.c -+++ b/plugins-root/check_icmp.c -@@ -621,7 +621,7 @@ main(int argc, char **argv) - } - - host = list; -- table = malloc(sizeof(struct rta_host **) * (argc - 1)); -+ table = malloc(sizeof(struct rta_host **) * targets); - i = 0; - while(host) { - host->id = i*packets; - diff --git a/debian/patches/15_check_sensors_fault.dpatch b/debian/patches/15_check_sensors_fault.dpatch deleted file mode 100755 index abbe726..0000000 --- a/debian/patches/15_check_sensors_fault.dpatch +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 15_check_sensors_fault.dpatch by Holger Weiss -## -## From 276c5b98bf619eabd8b0bd5fc3ff60c0a59489a7 Mon Sep 17 00:00:00 2001 -## From: Holger Weiss -## Date: Wed, 7 Sep 2011 13:55:53 +0200 -## Subject: [PATCH] check_sensors: Detect FAULT status -## -## DP: Return an UNKNOWN status if a faulty sensor is detected. This can be -## suppressed with the new "--ignore-fault" option. - -@DPATCH@ - ---- a/plugins-scripts/check_sensors.sh -+++ b/plugins-scripts/check_sensors.sh -@@ -10,7 +10,7 @@ REVISION="@NP_VERSION@" - - - print_usage() { -- echo "Usage: $PROGNAME" -+ echo "Usage: $PROGNAME" [--ignore-fault] - } - - print_help() { -@@ -57,9 +57,12 @@ case "$1" in - if echo ${sensordata} | egrep ALARM > /dev/null; then - echo SENSOR CRITICAL - Sensor alarm detected! - exit 2 -- else -- echo sensor ok -- exit 0 -+ elif echo ${sensordata} | egrep FAULT > /dev/null \ -+ && test "$1" != "-i" -a "$1" != "--ignore-fault"; then -+ echo SENSOR UNKNOWN - Sensor reported fault -+ exit 3 - fi -+ echo sensor ok -+ exit 0 - ;; - esac diff --git a/debian/patches/16_check_raduis_fix_format-security.dpatch b/debian/patches/16_check_raduis_fix_format-security.dpatch deleted file mode 100644 index 7f0dcfc..0000000 --- a/debian/patches/16_check_raduis_fix_format-security.dpatch +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 16_check_raduis_fix_format-security.dpatch -## From 055b2570eddff9a312dc1445bb7de4a6d7c4887d Mon Sep 17 00:00:00 2001 -## From: Thomas Guyot-Sionnest -## Date: Tue, 6 Sep 2011 23:20:21 -0400 -## Subject: [PATCH] Make GCC happy -## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commitdiff_plain;h=055b2570eddff9a312dc1445bb7de4a6d7c4887d -## -## DP: It won't trust us about msg containing no format string, and fail miserably -## when compiled with -Werror=format-security. (https://bugs.launchpad.net/bugs/837085) - -@DPATCH@ - ---- a/plugins/check_radius.c -+++ b/plugins/check_radius.c -@@ -211,7 +211,7 @@ main (int argc, char **argv) - if (result == OK_RC) - die (STATE_OK, _("Auth OK")); - (void)snprintf(msg, sizeof(msg), _("Unexpected result code %d"), result); -- die (STATE_UNKNOWN, msg); -+ die (STATE_UNKNOWN, "%s", msg); - } - - diff --git a/debian/patches/17_check_smtp_fix_duplicate_cert_message.dpatch b/debian/patches/17_check_smtp_fix_duplicate_cert_message.dpatch deleted file mode 100644 index c5a1410..0000000 --- a/debian/patches/17_check_smtp_fix_duplicate_cert_message.dpatch +++ /dev/null @@ -1,24 +0,0 @@ -#! /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 -## 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 - -@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 deleted file mode 100644 index 4b6999e..0000000 --- a/debian/patches/17_check_tcp_fix_duplicate_cert_message.dpatch +++ /dev/null @@ -1,28 +0,0 @@ -#! /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 -## 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 - -@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; diff --git a/debian/patches/18_check_snmp_labels.dpatch b/debian/patches/18_check_snmp_labels.dpatch deleted file mode 100755 index 3d943cf..0000000 --- a/debian/patches/18_check_snmp_labels.dpatch +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 18_check_snmp_labels.dpatch -## From 0e3fa54782f8cbb47af058c4bf13688e8b23865b Mon Sep 17 00:00:00 2001 -## From: Holger Weiss -## Date: Fri, 24 Feb 2012 12:29:00 +0100 -## Subject: [PATCH] Accept multiple labels specified with "-l" -## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=patch;h=0e3fa54782f8cbb47af058c4bf13688e8b23865b -## -## DP: check_snmp: fix multiple labels. (http://bugs.debian.org/647020) - -@DPATCH@ - ---- a/plugins/check_snmp.c -+++ b/plugins/check_snmp.c -@@ -749,7 +749,7 @@ process_arguments (int argc, char **argv) - if (labels == NULL) - die (STATE_UNKNOWN, _("Could not reallocate labels\n")); - } -- labels++; -+ nlabels++; - ptr = thisarg (ptr); - if (strstr (ptr, "'") == ptr) - labels[nlabels - 1] = ptr + 1; -@@ -1072,8 +1072,8 @@ print_help (void) - - printf ("\n"); - printf ("%s\n", _("Notes:")); -- printf (" %s\n", _("- Multiple OIDs may be indicated by a comma or space-delimited list (lists with")); -- printf (" %s %i %s\n", _("internal spaces must be quoted). Maximum:"), MAX_OIDS, _("OIDs.")); -+ printf (" %s\n", _("- Multiple OIDs (and labels) may be indicated by a comma or space-delimited ")); -+ printf (" %s %i %s\n", _("list (lists with internal spaces must be quoted). Maximum:"), MAX_OIDS, _("OIDs.")); - - printf(" -%s", UT_THRESHOLDS_NOTES); - diff --git a/debian/patches/19_check_http_help.dpatch b/debian/patches/19_check_http_help.dpatch deleted file mode 100644 index d6ceec4..0000000 --- a/debian/patches/19_check_http_help.dpatch +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 18_check_snmp_labels.dpatch -## From d796c16327e6e315dd528f17e8bd597c5f506730 Mon Sep 17 00:00:00 2001 -## From: Holger Weiss -## Date: Fri, 24 Feb 2012 13:24:56 +0100 -## Subject: [PATCH] Clarify that check_http won't verify certificates -## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=patch;h=d796c16327e6e315dd528f17e8bd597c5f506730 -## -## DP: check_http: clarify that check_http won't verify certificates (http://bugs.debian.org/644627) - -@DPATCH@ - ---- a/plugins/check_http.c -+++ b/plugins/check_http.c -@@ -1400,6 +1400,10 @@ print_help (void) - printf (" %s\n", _("serve content (optionally within a specified time) or whether the X509 ")); - printf (" %s\n", _("certificate is still valid for the specified number of days.")); - printf ("\n"); -+ printf (" %s\n", _("Please note that this plugin does not check if the presented server")); -+ printf (" %s\n", _("certificate matches the hostname of the server, or if the certificate")); -+ printf (" %s\n", _("has a valid chain of trust to one of the locally installed CAs.")); -+ printf ("\n"); - printf ("%s\n", _("Examples:")); - printf (" %s\n\n", "CHECK CONTENT: check_http -w 5 -c 10 --ssl -H www.verisign.com"); - printf (" %s\n", _("When the 'www.verisign.com' server returns its content within 5 seconds,")); - From 549ad2cc972027707f4d0e45c5bd6017388a3e82 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 13 Jun 2012 10:45:49 +0000 Subject: [PATCH 06/12] fix release version --- debian/changelog | 1 + debian/patches/00_fix_release_version.dpatch | 12 ++++++++++++ debian/patches/00list | 1 + 3 files changed, 14 insertions(+) create mode 100755 debian/patches/00_fix_release_version.dpatch diff --git a/debian/changelog b/debian/changelog index 8d7b5eb..92c85e8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ nagios-plugins (1.4.16~pre1-1) UNRELEASED; urgency=low - 17_check_smtp_fix_duplicate_cert_message.dpatch - 18_check_snmp_labels.dpatch - 19_check_http_help.dpatch + * Add 00_fix_release_version.dpatch to fix release version -- Jan Wagner Tue, 22 May 2012 21:07:50 +0200 diff --git a/debian/patches/00_fix_release_version.dpatch b/debian/patches/00_fix_release_version.dpatch new file mode 100755 index 0000000..285e001 --- /dev/null +++ b/debian/patches/00_fix_release_version.dpatch @@ -0,0 +1,12 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 00_fix_release_version.dpatch by Jan Wagner +## +## DP: Fix release version + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.16~pre1~/release nagios-plugins-1.4.16~pre1/release +--- nagios-plugins-1.4.16~pre1~/release 2012-06-12 00:01:32.000000000 +0200 ++++ nagios-plugins-1.4.16~pre1/release 2012-06-13 12:42:38.000000000 +0200 +@@ -1 +1 @@ +-1.4.15-59-ga80e ++1.4.16~pre1 diff --git a/debian/patches/00list b/debian/patches/00list index 412b7ae..f97bac6 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,3 +1,4 @@ 02_check_icmp_links.dpatch +00_fix_release_version.dpatch # commited upstream 03_check_disk_smb_perfdata.dpatch From 3c3bee9df10a52886f881229f69ec67788e6aa7e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 13 Jun 2012 11:01:25 +0000 Subject: [PATCH 07/12] bump standards to 3.9.3 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 92c85e8..b439c81 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ nagios-plugins (1.4.16~pre1-1) UNRELEASED; urgency=low - 18_check_snmp_labels.dpatch - 19_check_http_help.dpatch * Add 00_fix_release_version.dpatch to fix release version + * Bump Standards-Version to 3.9.3, no changes needed -- Jan Wagner Tue, 22 May 2012 21:07:50 +0200 diff --git a/debian/control b/debian/control index be2a07e..67fceb8 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 5), dpatch (>= 2.0.9), perl, autotools-dev, libldap Homepage: http://nagiosplug.sourceforge.net Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-nagios/nagios-plugins/ Vcs-Svn: svn://svn.debian.org/pkg-nagios/nagios-plugins/trunk/ -Standards-Version: 3.9.2 +Standards-Version: 3.9.3 Package: nagios-plugins Architecture: all From b248f7fd511d17a52f34cfebc77b81cd16a2f237 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 13 Jun 2012 11:06:14 +0000 Subject: [PATCH 08/12] fixing all version strings --- debian/patches/00_fix_release_version.dpatch | 110 ++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) diff --git a/debian/patches/00_fix_release_version.dpatch b/debian/patches/00_fix_release_version.dpatch index 285e001..ef6cfde 100755 --- a/debian/patches/00_fix_release_version.dpatch +++ b/debian/patches/00_fix_release_version.dpatch @@ -4,9 +4,117 @@ ## DP: Fix release version @DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.16~pre1~/NP-VERSION-GEN nagios-plugins-1.4.16~pre1/NP-VERSION-GEN +--- nagios-plugins-1.4.16~pre1~/NP-VERSION-GEN 2012-04-10 12:00:04.000000000 +0200 ++++ nagios-plugins-1.4.16~pre1/NP-VERSION-GEN 2012-06-13 13:01:42.000000000 +0200 +@@ -6,7 +6,7 @@ + SRC_ROOT=`dirname $0` + + NPVF=NP-VERSION-FILE +-DEF_VER=1.4.15.git ++DEF_VER=1.4.16~pre1 + + LF=' + ' +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.16~pre1~/configure nagios-plugins-1.4.16~pre1/configure +--- nagios-plugins-1.4.16~pre1~/configure 2012-06-12 00:00:37.000000000 +0200 ++++ nagios-plugins-1.4.16~pre1/configure 2012-06-13 13:03:32.000000000 +0200 +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.61 for nagios-plugins 1.4.15. ++# Generated by GNU Autoconf 2.61 for nagios-plugins 1.4.16~pre1. + # + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, + # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +@@ -721,8 +721,8 @@ + # Identity of this package. + PACKAGE_NAME='nagios-plugins' + PACKAGE_TARNAME='nagios-plugins' +-PACKAGE_VERSION='1.4.15' +-PACKAGE_STRING='nagios-plugins 1.4.15' ++PACKAGE_VERSION='1.4.16~pre1' ++PACKAGE_STRING='nagios-plugins 1.4.16~pre1' + PACKAGE_BUGREPORT='' + + ac_unique_file="NPTest.pm" +@@ -2110,7 +2110,7 @@ + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures nagios-plugins 1.4.15 to adapt to many kinds of systems. ++\`configure' configures nagios-plugins 1.4.16~pre1 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -2180,7 +2180,7 @@ + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of nagios-plugins 1.4.15:";; ++ short | recursive ) echo "Configuration of nagios-plugins 1.4.16~pre1:";; + esac + cat <<\_ACEOF + +@@ -2328,7 +2328,7 @@ + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-nagios-plugins configure 1.4.15 ++nagios-plugins configure 1.4.16~pre1 + generated by GNU Autoconf 2.61 + + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +@@ -2342,7 +2342,7 @@ + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by nagios-plugins $as_me 1.4.15, which was ++It was created by nagios-plugins $as_me 1.4.16~pre1, which was + generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ +@@ -3090,7 +3090,7 @@ + + # Define the identity of the package. + PACKAGE='nagios-plugins' +- VERSION='1.4.15' ++ VERSION='1.4.16~pre1' + + + cat >>confdefs.h <<_ACEOF +@@ -56186,7 +56186,7 @@ + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by nagios-plugins $as_me 1.4.15, which was ++This file was extended by nagios-plugins $as_me 1.4.16~pre1, which was + generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -56239,7 +56239,7 @@ + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ +-nagios-plugins config.status 1.4.15 ++nagios-plugins config.status 1.4.16~pre1 + configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.16~pre1~/configure.in nagios-plugins-1.4.16~pre1/configure.in +--- nagios-plugins-1.4.16~pre1~/configure.in 2012-06-12 00:00:01.000000000 +0200 ++++ nagios-plugins-1.4.16~pre1/configure.in 2012-06-13 13:02:11.000000000 +0200 +@@ -1,6 +1,6 @@ + dnl Process this file with autoconf to produce a configure script. + AC_PREREQ(2.59) +-AC_INIT(nagios-plugins,1.4.15) ++AC_INIT(nagios-plugins,1.4.16~pre1) + AC_CONFIG_SRCDIR(NPTest.pm) + AC_CONFIG_FILES([gl/Makefile + nagios-plugins.spec]) diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.16~pre1~/release nagios-plugins-1.4.16~pre1/release --- nagios-plugins-1.4.16~pre1~/release 2012-06-12 00:01:32.000000000 +0200 -+++ nagios-plugins-1.4.16~pre1/release 2012-06-13 12:42:38.000000000 +0200 ++++ nagios-plugins-1.4.16~pre1/release 2012-06-13 13:01:13.000000000 +0200 @@ -1 +1 @@ -1.4.15-59-ga80e +1.4.16~pre1 From e1dc4691a7ff04d44fff889e6ddfa47657ba7d1a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 13 Jun 2012 11:50:46 +0000 Subject: [PATCH 09/12] fixes ping6 related problems --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b439c81..a96ad89 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ nagios-plugins (1.4.16~pre1-1) UNRELEASED; urgency=low - * New upstream snapshot + * New upstream snapshot (Closes: #662638, #514588) * Droped the following upstream integrated patches - 10_check_disk_smb_spaces.dpatch - 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch From ef45c1c49d672de4b0612bc07349eb250e9a562e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 14 Jun 2012 06:21:23 +0000 Subject: [PATCH 10/12] add some fixes from upstream for check_dhcp --- debian/changelog | 3 + debian/patches/00list | 2 + ...ck_dhcp_Fix-handling-of-pad-options.dpatch | 50 +++++++++++++++ ...Don-t-misinterpret-the-siaddr-field.dpatch | 62 +++++++++++++++++++ 4 files changed, 117 insertions(+) create mode 100644 debian/patches/10_check_dhcp_Fix-handling-of-pad-options.dpatch create mode 100644 debian/patches/11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch diff --git a/debian/changelog b/debian/changelog index a96ad89..2553f55 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ nagios-plugins (1.4.16~pre1-1) UNRELEASED; urgency=low - 17_check_smtp_fix_duplicate_cert_message.dpatch - 18_check_snmp_labels.dpatch - 19_check_http_help.dpatch + * Added the following upstream patches + - 10_check_dhcp_Fix-handling-of-pad-options.dpatch + - 11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch * Add 00_fix_release_version.dpatch to fix release version * Bump Standards-Version to 3.9.3, no changes needed diff --git a/debian/patches/00list b/debian/patches/00list index f97bac6..bd6fb69 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -2,3 +2,5 @@ 00_fix_release_version.dpatch # commited upstream 03_check_disk_smb_perfdata.dpatch +10_check_dhcp_Fix-handling-of-pad-options.dpatch +11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch diff --git a/debian/patches/10_check_dhcp_Fix-handling-of-pad-options.dpatch b/debian/patches/10_check_dhcp_Fix-handling-of-pad-options.dpatch new file mode 100644 index 0000000..daed958 --- /dev/null +++ b/debian/patches/10_check_dhcp_Fix-handling-of-pad-options.dpatch @@ -0,0 +1,50 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_check_dhcp_Fix-handling-of-pad-options.dpatch +## From f091d59e0f9abec9304d9d230fafc2dec001baba Mon Sep 17 00:00:00 2001 +## From: Holger Weiss +## Date: Wed, 13 Jun 2012 12:36:42 +0200 +## Subject: [PATCH] check_dhcp: Fix handling of "pad" options +## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=patch;h=d796c16327e6e315dd528f17e8bd597c5f506730 +## +## DP: Don't let "pad" options[*] terminate the parsing of DHCP options. This bug was triggered by using check_dhcp against Windows 2003 DHCP servers (see #3503921). [*] Cf. RFC 2132, 3.1. + +diff --git a/NEWS b/NEWS +index 7452a6b..b138084 100644 +--- a/NEWS ++++ b/NEWS +@@ -24,6 +24,7 @@ This file documents the major additions and syntax changes between releases. + Fix segfault in check_host when hostname returns multiple IP addresses (Sebastian Harl) + Fix check_smtp and check_tcp where duplicate messages were displayed for certificate errors + Fix check_ping's parsing of the output of Debian's ping6(1) implementation (#1894850 - Matej Vela) ++ Fix a check_dhcp bug which was triggered by using it to check Windows 2003 DHCP servers (#3503921) + Disable RFC4507 support, to work around SSL negotiation issues with (at least) some Tomcat versions + + 1.4.15 27th July 2010 +diff --git a/plugins-root/check_dhcp.c b/plugins-root/check_dhcp.c +index 2a1875c..ac89274 100644 +--- a/plugins-root/check_dhcp.c ++++ b/plugins-root/check_dhcp.c +@@ -839,8 +839,7 @@ int add_dhcp_offer(struct in_addr source,dhcp_packet *offer_packet){ + /* process all DHCP options present in the packet */ + for(x=4;xoptions[x]==-1 || (int)offer_packet->options[x]==0) ++ if((int)offer_packet->options[x]==-1) + break; + + /* get option type */ +@@ -872,7 +871,9 @@ int add_dhcp_offer(struct in_addr source,dhcp_packet *offer_packet){ + } + + /* skip option data we're ignoring */ +- if(option_type!=DHCP_OPTION_REBINDING_TIME) ++ if(option_type==0) /* "pad" option, see RFC 2132 (3.1) */ ++ x+=1; ++ else + x+=option_length; + } + +-- +1.7.10.4 + diff --git a/debian/patches/11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch b/debian/patches/11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch new file mode 100644 index 0000000..efa7900 --- /dev/null +++ b/debian/patches/11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch @@ -0,0 +1,62 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch +## From 4d5276273287ef59881b541ba96279e91974a4b2 Mon Sep 17 00:00:00 2001 +## From: Holger Weiss +## Date: Thu, 14 Jun 2012 00:39:55 +0200 +## Subject: [PATCH] check_dhcp: Don't misinterpret the "siaddr" field +## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=patch;h=d796c16327e6e315dd528f17e8bd597c5f506730 +## +## DP: RFC 2131 (2.) says: "DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process." So, we shouldn't interpret this field as the DHCP server's own address. (#3503921 - Jason Ellison) + +@DPATCH@ + +diff --git a/THANKS.in b/THANKS.in +index 32a8868..943acdb 100644 +--- a/THANKS.in ++++ b/THANKS.in +@@ -273,3 +273,4 @@ Jason Lunn + Alex Griffin + Marc Remy + Matej Vela ++Jason Ellison +diff --git a/plugins-root/check_dhcp.c b/plugins-root/check_dhcp.c +index ac89274..b02ee49 100644 +--- a/plugins-root/check_dhcp.c ++++ b/plugins-root/check_dhcp.c +@@ -141,7 +141,7 @@ typedef struct dhcp_packet_struct{ + u_int16_t flags; /* flags */ + struct in_addr ciaddr; /* IP address of this machine (if we already have one) */ + struct in_addr yiaddr; /* IP address of this machine (offered by the DHCP server) */ +- struct in_addr siaddr; /* IP address of DHCP server */ ++ struct in_addr siaddr; /* IP address of next server */ + struct in_addr giaddr; /* IP address of DHCP relay */ + unsigned char chaddr [MAX_DHCP_CHADDR_LENGTH]; /* hardware address of this machine */ + char sname [MAX_DHCP_SNAME_LENGTH]; /* name of DHCP server */ +@@ -587,11 +587,6 @@ int get_dhcp_offer(int sock){ + /* Save a copy of "source" into "via" even if it's via itself */ + memcpy(&via,&source,sizeof(source)) ; + +- /* If siaddr is non-zero, set "source" to siaddr */ +- if(offer_packet.siaddr.s_addr != 0L){ +- source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; +- } +- + if(verbose){ + printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); + printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); +@@ -904,9 +899,9 @@ int add_dhcp_offer(struct in_addr source,dhcp_packet *offer_packet){ + * the next bootstrap service (e.g., delivery of an operating system + * executable image). A DHCP server always returns its own address in + * the 'server identifier' option." 'serv_ident' is the 'server +- * identifier' option, 'source' is the 'siaddr' field or (if 'siaddr' +- * wasn't available) the IP address we received the DHCPOFFER from. If +- * 'serv_ident' isn't available for some reason, we use 'source'. ++ * identifier' option, 'source' is the IP address we received the ++ * DHCPOFFER from. If 'serv_ident' isn't available for some reason, we ++ * use 'source'. + */ + new_offer->server_address=serv_ident.s_addr?serv_ident:source; + new_offer->offered_address=offer_packet->yiaddr; +-- +1.7.10.4 + From 9d4ffeb978f3bdd8b57a3b3e3cb6a285b8499239 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 14 Jun 2012 06:36:25 +0000 Subject: [PATCH 11/12] fix patches --- ...ck_dhcp_Fix-handling-of-pad-options.dpatch | 9 +++++++-- ...Don-t-misinterpret-the-siaddr-field.dpatch | 19 +++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/debian/patches/10_check_dhcp_Fix-handling-of-pad-options.dpatch b/debian/patches/10_check_dhcp_Fix-handling-of-pad-options.dpatch index daed958..2b96a5b 100644 --- a/debian/patches/10_check_dhcp_Fix-handling-of-pad-options.dpatch +++ b/debian/patches/10_check_dhcp_Fix-handling-of-pad-options.dpatch @@ -4,10 +4,15 @@ ## From: Holger Weiss ## Date: Wed, 13 Jun 2012 12:36:42 +0200 ## Subject: [PATCH] check_dhcp: Fix handling of "pad" options -## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=patch;h=d796c16327e6e315dd528f17e8bd597c5f506730 +## X-Git-Url: https://github.com/nagios-plugins/nagios-plugins/commit/f091d59e0f9abec9304d9d230fafc2dec001baba.patch ## ## DP: Don't let "pad" options[*] terminate the parsing of DHCP options. This bug was triggered by using check_dhcp against Windows 2003 DHCP servers (see #3503921). [*] Cf. RFC 2132, 3.1. +--- + NEWS | 1 + + plugins-root/check_dhcp.c | 7 ++++--- + 2 files changed, 5 insertions(+), 3 deletions(-) + diff --git a/NEWS b/NEWS index 7452a6b..b138084 100644 --- a/NEWS @@ -46,5 +51,5 @@ index 2a1875c..ac89274 100644 } -- -1.7.10.4 +1.7.10 diff --git a/debian/patches/11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch b/debian/patches/11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch index efa7900..e3a5f03 100644 --- a/debian/patches/11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch +++ b/debian/patches/11_check_dhcp_Don-t-misinterpret-the-siaddr-field.dpatch @@ -4,26 +4,21 @@ ## From: Holger Weiss ## Date: Thu, 14 Jun 2012 00:39:55 +0200 ## Subject: [PATCH] check_dhcp: Don't misinterpret the "siaddr" field -## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=patch;h=d796c16327e6e315dd528f17e8bd597c5f506730 +## X-Git-Url: https://github.com/nagios-plugins/nagios-plugins/commit/4d5276273287ef59881b541ba96279e91974a4b2.patch ## ## DP: RFC 2131 (2.) says: "DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process." So, we shouldn't interpret this field as the DHCP server's own address. (#3503921 - Jason Ellison) @DPATCH@ -diff --git a/THANKS.in b/THANKS.in -index 32a8868..943acdb 100644 ---- a/THANKS.in -+++ b/THANKS.in -@@ -273,3 +273,4 @@ Jason Lunn - Alex Griffin - Marc Remy - Matej Vela -+Jason Ellison +--- + plugins-root/check_dhcp.c | 13 ++++--------- + 1 file changed, 4 insertions(+), 9 deletions(-) + diff --git a/plugins-root/check_dhcp.c b/plugins-root/check_dhcp.c index ac89274..b02ee49 100644 --- a/plugins-root/check_dhcp.c +++ b/plugins-root/check_dhcp.c -@@ -141,7 +141,7 @@ typedef struct dhcp_packet_struct{ +@@ -141,7 +141,7 @@ u_int16_t flags; /* flags */ struct in_addr ciaddr; /* IP address of this machine (if we already have one) */ struct in_addr yiaddr; /* IP address of this machine (offered by the DHCP server) */ @@ -58,5 +53,5 @@ index ac89274..b02ee49 100644 new_offer->server_address=serv_ident.s_addr?serv_ident:source; new_offer->offered_address=offer_packet->yiaddr; -- -1.7.10.4 +1.7.10 From 9b5128e5d2b6243c577ac5c69687385b382daaf1 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 14 Jun 2012 08:56:08 +0000 Subject: [PATCH 12/12] prepare release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2553f55..e8ac544 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nagios-plugins (1.4.16~pre1-1) UNRELEASED; urgency=low +nagios-plugins (1.4.16~pre1-1) unstable; urgency=medium * New upstream snapshot (Closes: #662638, #514588) * Droped the following upstream integrated patches @@ -19,7 +19,7 @@ nagios-plugins (1.4.16~pre1-1) UNRELEASED; urgency=low * Add 00_fix_release_version.dpatch to fix release version * Bump Standards-Version to 3.9.3, no changes needed - -- Jan Wagner Tue, 22 May 2012 21:07:50 +0200 + -- Jan Wagner Thu, 14 Jun 2012 10:39:44 +0200 nagios-plugins (1.4.15-7) unstable; urgency=low