new upstream release

This commit is contained in:
Jan Wagner 2012-06-27 19:39:22 +00:00
parent ea745cdb08
commit 891a8f8cf4
6 changed files with 7 additions and 340 deletions

9
debian/changelog vendored
View file

@ -1,6 +1,11 @@
nagios-plugins (1.4.16~pre1-2) UNRELEASED; urgency=low
nagios-plugins (1.4.16-1) UNRELEASED; urgency=low
* NOT RELEASED YET
* New upstream release
- Drop 00_fix_release_version.dpatch
* Droped the following upstream integrated patches
- 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
-- Jan Wagner <waja@cyconet.org> Thu, 14 Jun 2012 10:55:42 +0200

View file

@ -1,120 +0,0 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 00_fix_release_version.dpatch by Jan Wagner <waja@cyconet.org>
##
## 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 13:01:13.000000000 +0200
@@ -1 +1 @@
-1.4.15-59-ga80e
+1.4.16~pre1

View file

@ -1,6 +1,2 @@
02_check_icmp_links.dpatch
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

View file

@ -1,102 +0,0 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_check_disk_smb_perfdata.dpatch by G. Leimua <gaufrettes.aumiel@gmail.com>
##
## DP: Add perfdata fo check_disk_smb (http://bugs.debian.org/654259)
@DPATCH@
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl
index 7c81fc2..bca9552 100755
--- a/plugins-scripts/check_disk_smb.pl
+++ b/plugins-scripts/check_disk_smb.pl
@@ -166,6 +166,7 @@ my $address = $1 if (defined($opt_a) && $opt_a =~ /(.*)/);
my $state = "OK";
my $answer = undef;
my $res = undef;
+my $perfdata = "";
my @lines = undef;
# Just in case of problems, let's not hang Nagios
@@ -204,11 +205,23 @@ $_ = $lines[$#lines];
#If line does not match required regexp, return an UNKNOWN error
if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) {
- my ($avail) = ($3*$2)/1024;
- my ($avail_bytes) = $avail;
+ my ($avail_bytes) = $3 * $2;
+ my ($total_bytes) = $1 * $2;
+ my ($occupied_bytes) = $1 * $2 - $avail_bytes;
+ my ($avail) = $avail_bytes/1024;
my ($capper) = int(($3/$1)*100);
my ($mountpt) = "\\\\$host\\$share";
+ # TODO : why is the kB the standard unit for args ?
+ my ($warn_bytes) = $total_bytes - $warn * 1024;
+ if ($warn_type eq "P") {
+ $warn_bytes = $warn * $1 * $2 / 100;
+ }
+ my ($crit_bytes) = $total_bytes - $crit * 1024;
+ if ($crit_type eq "P") {
+ $crit_bytes = $crit * $1 * $2 / 100;
+ }
+
if (int($avail / 1024) > 0) {
$avail = int($avail / 1024);
@@ -225,32 +238,37 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) {
#print ":$warn:$warn_type:\n";
#print ":$crit:$crit_type:\n";
#print ":$avail:$avail_bytes:$capper:$mountpt:\n";
+ $perfdata = "'" . $share . "'=" . $occupied_bytes . 'B;'
+ . $warn_bytes . ';'
+ . $crit_bytes . ';'
+ . '0;'
+ . $total_bytes;
- if ((($warn_type eq "P") && (100 - $capper) < $warn) || (($warn_type eq "K") && ($avail_bytes > $warn))) {
- $answer = "Disk ok - $avail ($capper%) free on $mountpt\n";
- } elsif ((($crit_type eq "P") && (100 - $capper) < $crit) || (($crit_type eq "K") && ($avail_bytes > $crit))) {
+ if ($occupied_bytes > $crit_bytes) {
+ $state = "CRITICAL";
+ $answer = "CRITICAL: Only $avail ($capper%) free on $mountpt";
+ } elsif ( $occupied_bytes > $warn_bytes ) {
$state = "WARNING";
- $answer = "WARNING: Only $avail ($capper%) free on $mountpt\n";
+ $answer = "WARNING: Only $avail ($capper%) free on $mountpt";
} else {
- $state = "CRITICAL";
- $answer = "CRITICAL: Only $avail ($capper%) free on $mountpt\n";
+ $answer = "Disk ok - $avail ($capper%) free on $mountpt";
}
} else {
- $answer = "Result from smbclient not suitable\n";
+ $answer = "Result from smbclient not suitable";
$state = "UNKNOWN";
foreach (@lines) {
if (/(Access denied|NT_STATUS_LOGON_FAILURE|NT_STATUS_ACCESS_DENIED)/) {
- $answer = "Access Denied\n";
+ $answer = "Access Denied";
$state = "CRITICAL";
last;
}
if (/(Unknown host \w*|Connection.*failed)/) {
- $answer = "$1\n";
+ $answer = "$1";
$state = "CRITICAL";
last;
}
if (/(You specified an invalid share name|NT_STATUS_BAD_NETWORK_NAME)/) {
- $answer = "Invalid share name \\\\$host\\$share\n";
+ $answer = "Invalid share name \\\\$host\\$share";
$state = "CRITICAL";
last;
}
@@ -259,6 +277,8 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) {
print $answer;
+print " | " . $perfdata if ($perfdata);
+print "\n";
print "$state\n" if ($verbose);
exit $ERRORS{$state};

View file

@ -1,55 +0,0 @@
#! /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 <holger@zedat.fu-berlin.de>
## Date: Wed, 13 Jun 2012 12:36:42 +0200
## Subject: [PATCH] check_dhcp: Fix handling of "pad" options
## 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
+++ 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;x<MAX_DHCP_OPTIONS_LENGTH;){
- /* end of options (0 is really just a pad, but bail out anyway) */
- if((int)offer_packet->options[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

View file

@ -1,57 +0,0 @@
#! /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 <holger@zedat.fu-berlin.de>
## Date: Thu, 14 Jun 2012 00:39:55 +0200
## Subject: [PATCH] check_dhcp: Don't misinterpret the "siaddr" field
## 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@
---
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 @@
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