From 70c0368c560bd5866d2bebf3bde22c95348ab413 Mon Sep 17 00:00:00 2001 From: Sean Finney Date: Sat, 2 Sep 2006 21:04:24 +0000 Subject: [PATCH] + * include fix for braindead behaviour in check_tcp based plugins + such as check_simap (closes: #351847). (note: fix also committed in upstream CVS) --- debian/changelog | 4 +- debian/patches/00list | 1 + .../patches/25_check_tcp.c_warncritopts.diff | 39 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 debian/patches/25_check_tcp.c_warncritopts.diff diff --git a/debian/changelog b/debian/changelog index 151a559..9cb229f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ nagios-plugins (1.4.3.0cvs.20060707-4) UNRELEASED; urgency=low * NOT RELEASED YET + * include fix for braindead behaviour in check_tcp based plugins + such as check_simap (closes: #351847). - -- sean finney Fri, 4 Aug 2006 09:01:30 -0700 + -- sean finney Sat, 02 Sep 2006 23:03:45 +0200 nagios-plugins (1.4.3.0cvs.20060707-3) unstable; urgency=high diff --git a/debian/patches/00list b/debian/patches/00list index 59dda5f..b558831 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -5,3 +5,4 @@ 18_check_game_cmdline.dpatch 22_check_smb_hostaddress.dpatch 23_check_axis.dpatch +25_check_tcp.c_warncritopts.diff diff --git a/debian/patches/25_check_tcp.c_warncritopts.diff b/debian/patches/25_check_tcp.c_warncritopts.diff new file mode 100644 index 0000000..49a316c --- /dev/null +++ b/debian/patches/25_check_tcp.c_warncritopts.diff @@ -0,0 +1,39 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +@DPATCH@ +diff -u -u -r1.78 check_tcp.c +--- old/plugins/check_tcp.c 29 Mar 2006 16:33:36 -0000 1.78 ++++ new/plugins/check_tcp.c 2 Sep 2006 20:28:58 -0000 +@@ -373,8 +373,8 @@ + int option = 0; + static struct option longopts[] = { + {"hostname", required_argument, 0, 'H'}, +- {"critical-time", required_argument, 0, 'c'}, +- {"warning-time", required_argument, 0, 'w'}, ++ {"critical", required_argument, 0, 'c'}, ++ {"warning", required_argument, 0, 'w'}, + {"critical-codes", required_argument, 0, 'C'}, + {"warning-codes", required_argument, 0, 'W'}, + {"timeout", required_argument, 0, 't'}, +@@ -454,20 +454,14 @@ + server_address = optarg; + break; + case 'c': /* critical */ +- if (!is_intnonneg (optarg)) +- usage4 (_("Critical threshold must be a positive integer")); +- else +- critical_time = strtod (optarg, NULL); ++ critical_time = strtod (optarg, NULL); + flags |= FLAG_TIME_CRIT; + break; + case 'j': /* hide output */ + flags |= FLAG_HIDE_OUTPUT; + break; + case 'w': /* warning */ +- if (!is_intnonneg (optarg)) +- usage4 (_("Warning threshold must be a positive integer")); +- else +- warning_time = strtod (optarg, NULL); ++ warning_time = strtod (optarg, NULL); + flags |= FLAG_TIME_WARN; + break; + case 'C':