[Pkg-nagios-changes] [pkg-nagios-plugins] 145/413: fix check_dig
Jan Wagner
waja at moszumanska.debian.org
Tue Nov 26 23:13:16 UTC 2013
This is an automated email from the git hooks/post-receive script.
waja pushed a commit to branch master
in repository pkg-nagios-plugins.
commit fa8f9047f4678c2de57a5f3c371b1727b2d8b824
Author: Jan Wagner <waja at cyconet.org>
Date: Mon Jun 9 21:14:30 2008 +0000
fix check_dig
---
debian/changelog | 2 ++
debian/patches/00list | 1 +
debian/patches/39_check_dig_options.dpatch | 43 ++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index e41d943..9bb3986 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -49,6 +49,8 @@ nagios-plugins (1.4.12-1) UNRELEASED; urgency=low
* add check_linux_raid into package (Closes: #461999) and add
38_fix_libexec.dpatch to fix libexec path
* Updating standards version to 3.8.0, no changes needed
+ * add 39_check_dig_options.dpatch which provides fix for no check for
+ mandatory parameter -l (Closes: #479013)
[ Alexander Wirt ]
* Call smbclient with -N (supress password prompt) if no password is
diff --git a/debian/patches/00list b/debian/patches/00list
index 0654853..3d52254 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -13,4 +13,5 @@
36_check_ldap_empty_base.dpatch
37_check_radius_nas-ip-address.dpatch
38_fix_libexec.dpatch
+39_check_dig_options.dpatch
50_misc_typos.dpatch
diff --git a/debian/patches/39_check_dig_options.dpatch b/debian/patches/39_check_dig_options.dpatch
new file mode 100755
index 0000000..89c71c7
--- /dev/null
+++ b/debian/patches/39_check_dig_options.dpatch
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 39_check_dig_options.dpatch by Jan Wagner <waja at cyconet.org>
+## patch provided by Matthias Eble <psychotrahe at users.sourceforge.net>
+##
+## DP: Add testcases for check_dig check_dig's -l option is mandatory
+
+ at DPATCH@
+diff -urNad nagios-plugins-1.4.12~/plugins/check_dig.c nagios-plugins-1.4.12/plugins/check_dig.c
+--- nagios-plugins-1.4.12~/plugins/check_dig.c 2008-05-07 12:02:42.000000000 +0200
++++ nagios-plugins-1.4.12/plugins/check_dig.c 2008-06-09 22:31:59.000000000 +0200
+@@ -143,8 +143,10 @@
+ }
+ }
+
+- if (result == STATE_UNKNOWN)
++ if (result == STATE_UNKNOWN) {
+ msg = (char *)_("No ANSWER SECTION found");
++ result = STATE_CRITICAL;
++ }
+
+ /* If we get anything on STDERR, at least set warning */
+ if(chld_err.buflen > 0) {
+@@ -295,7 +297,10 @@
+ int
+ validate_arguments (void)
+ {
+- return OK;
++ if (query_address != NULL)
++ return OK;
++ else
++ return ERROR;
+ }
+
+
+@@ -357,7 +362,7 @@
+ print_usage (void)
+ {
+ printf (_("Usage:"));
+- printf ("%s -H <host> -l <query_address> [-p <server port>]\n", progname);
++ printf ("%s -l <query_address> [-H <host>] [-p <server port>]\n", progname);
+ printf (" [-T <query type>] [-w <warning interval>] [-c <critical interval>]\n");
+ printf (" [-t <timeout>] [-a <expected answer address>] [-v]\n");
+ }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins.git
More information about the Pkg-nagios-changes
mailing list