From 94b4b82d48f0a846bc565c014035cdf09935356d Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 10 May 2011 19:16:35 +0000 Subject: [PATCH 01/14] 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 02/14] 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 03/14] 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 04/14] 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 05/14] 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 From 05ba85cb9ec9508f071f26e988942ddabc29bca1 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 May 2011 14:57:13 +0000 Subject: [PATCH 06/14] new changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 77534ab..aa42710 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nagios-plugins (1.4.15-5) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Wed, 18 May 2011 16:55:55 +0200 + nagios-plugins (1.4.15-4) unstable; urgency=low * Add 13_check_smtp_greeting.dpatch (Closes: #611914), thanks Daniel Piddock From 238e74a4d59cb0443b78ffd0a31eb1c8cd3fdeab Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 29 May 2011 06:04:30 +0000 Subject: [PATCH 07/14] Enable hardening options (Closes: #542728) --- debian/changelog | 2 +- debian/control | 2 +- debian/rules | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index aa42710..bf1e710 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ nagios-plugins (1.4.15-5) UNRELEASED; urgency=low - * NOT RELEASED YET + * Enable hardening options (Closes: #542728) -- Jan Wagner Wed, 18 May 2011 16:55:55 +0200 diff --git a/debian/control b/debian/control index 762e015..723a5bc 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: net Priority: extra Maintainer: Debian Nagios Maintainer Group Uploaders: Jan Wagner , Alexander Wirt -Build-Depends: debhelper (>= 5), dpatch (>= 2.0.9), perl, autotools-dev, libldap2-dev, libpq-dev, libmysqlclient-dev | libmysqlclient16-dev | libmysqlclient15-dev, libradiusclient-ng-dev, libkrb5-dev, libnet-snmp-perl, procps, mawk | awk +Build-Depends: debhelper (>= 5), dpatch (>= 2.0.9), perl, autotools-dev, libldap2-dev, libpq-dev, libmysqlclient-dev | libmysqlclient16-dev | libmysqlclient15-dev, libradiusclient-ng-dev, libkrb5-dev, libnet-snmp-perl, procps, mawk | awk, hardening-wrapper Homepage: http://nagiosplug.sourceforge.net Vcs-Browser: http://svn.debian.org/wsvn/pkg-nagios/nagios-plugins/ Vcs-Svn: svn://svn.debian.org/pkg-nagios/nagios-plugins/trunk/ diff --git a/debian/rules b/debian/rules index e73c074..9559198 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,9 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +# enable hardnening +export DEB_BUILD_HARDENING=1 + PACKAGE = nagios-plugins include /usr/share/dpatch/dpatch.make From 3487a22a9c50270c481ca3dfdabaf5b25127bf6f Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 29 May 2011 11:20:51 +0000 Subject: [PATCH 08/14] Bump Standards-Version to 3.9.2 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index bf1e710..be0e5a4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ nagios-plugins (1.4.15-5) UNRELEASED; urgency=low * Enable hardening options (Closes: #542728) + * Bump Standards-Version to 3.9.2, no changes needed -- Jan Wagner Wed, 18 May 2011 16:55:55 +0200 diff --git a/debian/control b/debian/control index 723a5bc..384e970 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://svn.debian.org/wsvn/pkg-nagios/nagios-plugins/ Vcs-Svn: svn://svn.debian.org/pkg-nagios/nagios-plugins/trunk/ -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Package: nagios-plugins Architecture: all From 833e0160a418d60a5e956645be1ecbdaa9115acf Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 2 Sep 2011 10:35:13 +0000 Subject: [PATCH 09/14] updating package description --- debian/changelog | 4 +++ debian/control | 67 ++++++++++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 37 deletions(-) diff --git a/debian/changelog b/debian/changelog index be0e5a4..3365a4b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ nagios-plugins (1.4.15-5) UNRELEASED; urgency=low * Enable hardening options (Closes: #542728) * Bump Standards-Version to 3.9.2, no changes needed + * Updating package description (Closes: #640070), thanks to Christoph Anton + Mitterer + - Listing the checks of each package + - Hint added, that nagios-plugins-basic needs more packages (recommands) -- Jan Wagner Wed, 18 May 2011 16:55:55 +0200 diff --git a/debian/control b/debian/control index 384e970..f249c52 100644 --- a/debian/control +++ b/debian/control @@ -13,18 +13,8 @@ Package: nagios-plugins Architecture: all Depends: ${misc:Depends}, nagios-plugins-basic, nagios-plugins-standard Suggests: nagios3 -Description: Plugins for the nagios network monitoring and management system - Nagios is a host/service/network monitoring and management system. It has - the following features: - . - * Monitoring of network services (via TCP port, SMTP, POP3, HTTP, NNTP, - PING, etc.) - * Plugin interface to allow for user-developed service checks - * Contact notifications when problems occur and get resolved (via email, - pager, or user-defined method) - * Ability to define event handlers to be run during service or host events - (for proactive problem resolution) - * Web output (current status, notifications, history, log file, etc.) +Description: Plugins for nagios compatible monitoring systems (metapackage) + Plugins for nagios compatible monitoring systems like Nagios and Icinga. . This metapackage will install the entire suite of plugins for nagios. If you are installing nagios plugins on a remote "satellite" server @@ -37,23 +27,27 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, procps, iputils-ping [linux-any], i Conflicts: nagios-plugins (<= 1.4.2-3) Replaces: nagios-plugins, nagios-plugins-standard Suggests: nagios3 -Description: Plugins for the nagios network monitoring and management system - Nagios is a host/service/network monitoring and management system. It has - the following features: +Description: Plugins for nagios compatible monitoring systems + Plugins for nagios compatible monitoring systems like Nagios and Icinga. It + contains the following plugins: . - * Monitoring of network services (via TCP port, SMTP, POP3, HTTP, NNTP, - PING, etc.) - * Plugin interface to allow for user-developed service checks - * Contact notifications when problems occur and get resolved (via email, - pager, or user-defined method) - * Ability to define event handlers to be run during service or host events - (for proactive problem resolution) - * Web output (current status, notifications, history, log file, etc.) + check_apt, check_by_ssh, check_clamd, check_cluster, + check_dhcp, check_disk, check_dummy, check_file_age, + check_ftp, check_host, check_http, check_icmp, + check_ide_smart, check_imap, check_ircd, check_jabber, + check_load, check_log, check_mrtg, check_mrtgtraf, + check_nagios, check_nntp, check_nntps, check_nt, + check_ntp, check_ntp_peer, check_ntp_time, check_nwstat, + check_overcr, check_ping, check_pop, check_procs, + check_real, check_rta_multi, check_sensors, check_simap, + check_smtp, check_spop, check_ssh, check_ssmtp, + check_swap, check_tcp, check_time, check_udp, + check_ups, check_users . This package provides a basic set of plugins with minimal external dependencies. It is not likely to be useful by itself unless you are - installing a remote "satellite" server (using nagios-nrpe-server or nsca, - for example). + using a remote "satellite" system (using nagios-nrpe-server, check_by_ssh or + nsca, for example). Package: nagios-plugins-standard Architecture: any @@ -62,18 +56,17 @@ Replaces: nagios-plugins Depends: ${shlibs:Depends}, ${misc:Depends}, ucf, nagios-plugins-basic (>= 1.4.5-2) Recommends: ${shlibs:Recommends}, fping, snmp, libnet-snmp-perl, dnsutils, bind9-host | host, smbclient, whois, qstat Suggests: nagios3, postfix | sendmail-bin | exim4-daemon-heavy | exim4-daemon-light -Description: Plugins for the nagios network monitoring and management system - Nagios is a host/service/network monitoring and management system. It has - the following features: +Description: Plugins for nagios compatible monitoring systems + Plugins for nagios compatible monitoring systems like Nagios and Icinga. It + contains the following plugins: . - * Monitoring of network services (via TCP port, SMTP, POP3, HTTP, NNTP, - PING, etc.) - * Plugin interface to allow for user-developed service checks - * Contact notifications when problems occur and get resolved (via email, - pager, or user-defined method) - * Ability to define event handlers to be run during service or host events - (for proactive problem resolution) - * Web output (current status, notifications, history, log file, etc.) + check_bgpstate, check_breeze, check_dig, check_disk_smb, + check_dns, check_flexlm, check_fping, check_game, + check_hpjd, check_ifoperstatus, check_ifstatus, check_ldap, + check_ldaps, check_linux_raid, check_mailq, check_mysql, + check_mysql_query, check_oracle, check_pgsql, check_radius, + check_rpc, check_snmp, check_wave . This package provides the suite of plugins that are most likely to be - useful on a central nagios host. + useful on a central nagios host. Some scripts needs more packages installed + to work, which is implemented as recommands. From d91bc94fc41ba5d65c080befbd58ce5eb9ca5693 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 7 Sep 2011 09:08:26 +0000 Subject: [PATCH 10/14] don't return 0 with UNKOWN --- debian/patches/15_check_sensors_fault.dpatch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/patches/15_check_sensors_fault.dpatch b/debian/patches/15_check_sensors_fault.dpatch index b1f97b1..143e467 100755 --- a/debian/patches/15_check_sensors_fault.dpatch +++ b/debian/patches/15_check_sensors_fault.dpatch @@ -6,7 +6,7 @@ @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 ++++ nagios-plugins-1.4.15/plugins-scripts/check_sensors.sh 2011-09-07 11:05:26.000000000 +0200 @@ -10,7 +10,7 @@ @@ -16,15 +16,16 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' } print_help() { -@@ -57,6 +57,13 @@ +@@ -57,6 +57,14 @@ 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 ++ echo SENSOR UNKNOWN - Sensor reported fault + exit 3 + else ++ echo sensor ok + exit 0 + fi else From 4a3a0d53c62ad5031b38a1f8b4dd4cdefd10c244 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 7 Sep 2011 09:27:21 +0000 Subject: [PATCH 11/14] Fix error in check_radius when compiling with -Werror=format-security --- debian/changelog | 2 ++ debian/patches/00list | 2 ++ ...16_check_raduis_fix_format-security.dpatch | 24 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 debian/patches/16_check_raduis_fix_format-security.dpatch diff --git a/debian/changelog b/debian/changelog index 3365a4b..41f1e23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ nagios-plugins (1.4.15-5) UNRELEASED; urgency=low Mitterer - Listing the checks of each package - Hint added, that nagios-plugins-basic needs more packages (recommands) + * Fix error in check_radius when compiling with -Werror=format-security + (hardening), thanks Thomas Guyot-Sionnesti - LP: #837085 -- Jan Wagner Wed, 18 May 2011 16:55:55 +0200 diff --git a/debian/patches/00list b/debian/patches/00list index 3828a04..aee5376 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -7,3 +7,5 @@ 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 diff --git a/debian/patches/16_check_raduis_fix_format-security.dpatch b/debian/patches/16_check_raduis_fix_format-security.dpatch new file mode 100644 index 0000000..7f0dcfc --- /dev/null +++ b/debian/patches/16_check_raduis_fix_format-security.dpatch @@ -0,0 +1,24 @@ +#! /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); + } + + From 9f780381cf6358accbc57e4a463ed7c304a3f997 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 7 Sep 2011 10:28:20 +0000 Subject: [PATCH 12/14] detect sensors in FAULT state --- debian/changelog | 11 +++++++---- debian/patches/00list | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 41f1e23..4b65547 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nagios-plugins (1.4.15-5) UNRELEASED; urgency=low +nagios-plugins (1.4.15-5) unstable; urgency=low * Enable hardening options (Closes: #542728) * Bump Standards-Version to 3.9.2, no changes needed @@ -6,10 +6,13 @@ nagios-plugins (1.4.15-5) UNRELEASED; urgency=low Mitterer - Listing the checks of each package - Hint added, that nagios-plugins-basic needs more packages (recommands) - * Fix error in check_radius when compiling with -Werror=format-security - (hardening), thanks Thomas Guyot-Sionnesti - LP: #837085 + * Adding 16_check_raduis_fix_format-security.dpatch to fix error in + check_radius when compiling with -Werror=format-security (hardening), + thanks Thomas Guyot-Sionnesti - LP: #837085 + * Adding 15_check_sensors_fault.dpatch to detect sensors in FAULT state + (Closes: #615133) - -- Jan Wagner Wed, 18 May 2011 16:55:55 +0200 + -- Jan Wagner Wed, 07 Sep 2011 12:23:56 +0200 nagios-plugins (1.4.15-4) unstable; urgency=low diff --git a/debian/patches/00list b/debian/patches/00list index aee5376..60a9648 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -7,5 +7,5 @@ 12_check_snmp_1.4.15_regression.dpatch 13_check_smtp_greeting.dpatch 14_check_icmp_multiple_ips.dpatch -# 15_check_sensors_fault.dpatch +15_check_sensors_fault.dpatch 16_check_raduis_fix_format-security.dpatch From a99f2309f11ab0a6db31f6468f21212ab814bfb5 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 7 Sep 2011 12:00:59 +0000 Subject: [PATCH 13/14] remove empty /usr/include --- debian/changelog | 2 ++ debian/rules | 2 ++ 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4b65547..d81be4b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ nagios-plugins (1.4.15-5) unstable; urgency=low thanks Thomas Guyot-Sionnesti - LP: #837085 * Adding 15_check_sensors_fault.dpatch to detect sensors in FAULT state (Closes: #615133) + * Remove empty /usr/include from nagios-plugins-basic, thanks Ferenc Wagner + (Closes: #630711) -- Jan Wagner Wed, 07 Sep 2011 12:23:56 +0200 diff --git a/debian/rules b/debian/rules index 9559198..c1b0b68 100755 --- a/debian/rules +++ b/debian/rules @@ -172,6 +172,8 @@ install: build mkdir -p ${NP_BASIC_DIR}/usr/share/nagios-plugins/dpkg install -t ${NP_BASIC_DIR}/usr/share/nagios-plugins/dpkg \ $(DEBIANDIR)/functions + # remove /usr/include from nagios-plugins-nasic (in case its empty) + rmdir ${NP_BASIC_DIR}/usr/include # generate debian/README.Debian.plugins perl ./debian/bin/gen_plugin_deps.pl From 4e419098e2026d66e68d24edac496924823872b3 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 7 Sep 2011 12:23:19 +0000 Subject: [PATCH 14/14] refresh 15_check_sensors_fault.dpatch from upstream --- debian/changelog | 4 +- debian/patches/15_check_sensors_fault.dpatch | 45 +++++++++++--------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/debian/changelog b/debian/changelog index d81be4b..b1221ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,8 @@ nagios-plugins (1.4.15-5) unstable; urgency=low * Adding 16_check_raduis_fix_format-security.dpatch to fix error in check_radius when compiling with -Werror=format-security (hardening), thanks Thomas Guyot-Sionnesti - LP: #837085 - * Adding 15_check_sensors_fault.dpatch to detect sensors in FAULT state - (Closes: #615133) + * Adding 15_check_sensors_fault.dpatch to detect sensors in FAULT state, + thank Holger Weiss (Closes: #615133) * Remove empty /usr/include from nagios-plugins-basic, thanks Ferenc Wagner (Closes: #630711) diff --git a/debian/patches/15_check_sensors_fault.dpatch b/debian/patches/15_check_sensors_fault.dpatch index 143e467..abbe726 100755 --- a/debian/patches/15_check_sensors_fault.dpatch +++ b/debian/patches/15_check_sensors_fault.dpatch @@ -1,33 +1,40 @@ #! /bin/sh /usr/share/dpatch/dpatch-run -## 15_check_sensors_fault.dpatch by Jan Wagner +## 15_check_sensors_fault.dpatch by Holger Weiss ## -## DP: Report UNKNOWN if sensor is faulty (fixing #615133) +## 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@ -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-09-07 11:05:26.000000000 +0200 -@@ -10,7 +10,7 @@ + +--- 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]" ++ echo "Usage: $PROGNAME" [--ignore-fault] } print_help() { -@@ -57,6 +57,14 @@ +@@ -57,9 +57,12 @@ case "$1" in if echo ${sensordata} | egrep ALARM > /dev/null; then echo SENSOR CRITICAL - Sensor alarm detected! exit 2 -+ elif echo ${sensordata} | egrep FAULT > /dev/null; then -+ if test "$1" != "-i" -a "$1" != "--ignore-fault"; then -+ echo SENSOR UNKNOWN - Sensor reported fault -+ exit 3 -+ else -+ echo sensor ok -+ exit 0 -+ fi - else - echo sensor ok - exit 0 +- 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