From 94b4b82d48f0a846bc565c014035cdf09935356d Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 10 May 2011 19:16:35 +0000 Subject: [PATCH 1/5] fix the array --- debian/bin/gen_plugin_deps.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/bin/gen_plugin_deps.pl b/debian/bin/gen_plugin_deps.pl index 8771870..3674fad 100644 --- a/debian/bin/gen_plugin_deps.pl +++ b/debian/bin/gen_plugin_deps.pl @@ -23,9 +23,9 @@ use strict; use warnings; # actual not needed -#my $extra_deps = { +my $extra_deps = { # sensors => [ 'lm-sensors' ], -#}; +}; my $infile = "debian/README.Debian.plugins.in"; my $outfile = "debian/README.Debian.plugins"; From a48887cae52f2244d697739049687fa6fd2dff1a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 10 May 2011 19:23:10 +0000 Subject: [PATCH 2/5] fix for #623702 --- debian/changelog | 6 +++++ debian/patches/00list | 1 + .../patches/14_check_icmp_multiple_ips.dpatch | 27 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 debian/patches/14_check_icmp_multiple_ips.dpatch diff --git a/debian/changelog b/debian/changelog index 262d67c..1a40308 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,12 @@ nagios-plugins (1.4.15-4) UNRELEASED; urgency=low - Abort immediately if we don't receive a server greeting or if the greeting doesn't contain the "--expect"ed string (by default: "220") instead of blindly sending the EHLO/HELO line. + * Add 14_check_icmp_multiple_ips.dpatch (Closes: #623702), thanks Max Kosmach + for spotting and Sebastian Harl for providing a fix + - When specifying a host-name on the command line, each of its IPs is added + to the host table (and each one is pinged). So, the buffer has to be large + enough to hold all of the respective host objects. (argc - 1) only fits + hosts with a single IP. * Move libraries linked at compile time against checks of nagios-plugins-standard from Depends to Recommends (Closes: #569028) - Add slightly modified bin/gen_plugin_deps.pl from collectd source package diff --git a/debian/patches/00list b/debian/patches/00list index cfc0b18..3828a04 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -6,3 +6,4 @@ 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 diff --git a/debian/patches/14_check_icmp_multiple_ips.dpatch b/debian/patches/14_check_icmp_multiple_ips.dpatch new file mode 100644 index 0000000..d189f21 --- /dev/null +++ b/debian/patches/14_check_icmp_multiple_ips.dpatch @@ -0,0 +1,27 @@ +#! /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; + From 4b15110b1e77e9ff35171d6ed4a567584810234a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 10 May 2011 19:59:30 +0000 Subject: [PATCH 3/5] fix brocken changelog entry --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1a40308..3de1a2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,7 +20,7 @@ nagios-plugins (1.4.15-4) UNRELEASED; urgency=low - Create customized substvars for nagios-plugins-standard via dpkg-shlibdeps in debian/rules - Remove temporary files via clean target in debian/rules - - Add hint to NEWS.DebianAdd hint to NEWS.Debia + - Add hint to NEWS.Debian -- Jan Wagner Mon, 27 Dec 2010 22:13:48 +0100 From 4e53567e602478961bfcfb6e0c3789424a1ebfaf Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 May 2011 14:31:08 +0000 Subject: [PATCH 4/5] draft fixing #615133 --- debian/patches/15_check_sensors_fault.dpatch | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 debian/patches/15_check_sensors_fault.dpatch diff --git a/debian/patches/15_check_sensors_fault.dpatch b/debian/patches/15_check_sensors_fault.dpatch new file mode 100755 index 0000000..b1f97b1 --- /dev/null +++ b/debian/patches/15_check_sensors_fault.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 15_check_sensors_fault.dpatch by Jan Wagner +## +## DP: Report UNKNOWN if sensor is faulty (fixing #615133) + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.15~/plugins-scripts/check_sensors.sh nagios-plugins-1.4.15/plugins-scripts/check_sensors.sh +--- nagios-plugins-1.4.15~/plugins-scripts/check_sensors.sh 2010-07-27 22:47:16.000000000 +0200 ++++ nagios-plugins-1.4.15/plugins-scripts/check_sensors.sh 2011-05-17 22:17:38.000000000 +0200 +@@ -10,7 +10,7 @@ + + + print_usage() { +- echo "Usage: $PROGNAME" ++ echo "Usage: $PROGNAME [--ignore-fault]" + } + + print_help() { +@@ -57,6 +57,13 @@ + if echo ${sensordata} | egrep ALARM > /dev/null; then + echo SENSOR CRITICAL - Sensor alarm detected! + exit 2 ++ elif echo ${sensordata} | egrep FAULT > /dev/null; then ++ echo SENSOR UNKNOWN - Sensor reported fault ++ if test "$1" != "-i" -a "$1" != "--ignore-fault"; then ++ exit 3 ++ else ++ exit 0 ++ fi + else + echo sensor ok + exit 0 From 317f52b727cef5b7c0f7c80a1e36374523bc6e2f Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 May 2011 14:32:07 +0000 Subject: [PATCH 5/5] prepare release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3de1a2b..77534ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nagios-plugins (1.4.15-4) UNRELEASED; urgency=low +nagios-plugins (1.4.15-4) unstable; urgency=low * Add 13_check_smtp_greeting.dpatch (Closes: #611914), thanks Daniel Piddock for spotting and Holger Weiss for providing a fix @@ -22,7 +22,7 @@ nagios-plugins (1.4.15-4) UNRELEASED; urgency=low - Remove temporary files via clean target in debian/rules - Add hint to NEWS.Debian - -- Jan Wagner Mon, 27 Dec 2010 22:13:48 +0100 + -- Jan Wagner Wed, 18 May 2011 16:31:35 +0200 nagios-plugins (1.4.15-3) unstable; urgency=low