From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- ...ID-2946553-Match-the-server-used-in-the-l.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 web/attachments/399439-0001-Fix-bug-ID-2946553-Match-the-server-used-in-the-l.patch (limited to 'web/attachments/399439-0001-Fix-bug-ID-2946553-Match-the-server-used-in-the-l.patch') diff --git a/web/attachments/399439-0001-Fix-bug-ID-2946553-Match-the-server-used-in-the-l.patch b/web/attachments/399439-0001-Fix-bug-ID-2946553-Match-the-server-used-in-the-l.patch new file mode 100644 index 0000000..cf33a5a --- /dev/null +++ b/web/attachments/399439-0001-Fix-bug-ID-2946553-Match-the-server-used-in-the-l.patch @@ -0,0 +1,45 @@ +From ab90d186ad54de0fe73304bae5771f10a167fd3f Mon Sep 17 00:00:00 2001 +From: Matthew Kent +Date: Fri, 21 Jan 2011 11:54:30 -0800 +Subject: [PATCH] Fix bug ID: 2946553 - Match the server used in the lookup for older versions of bind. + +--- + plugins/check_dns.c | 22 ++++++++++++++++++++++ + 1 files changed, 22 insertions(+), 0 deletions(-) + +diff --git a/plugins/check_dns.c b/plugins/check_dns.c +index 73b560c..04b8baf 100644 +--- a/plugins/check_dns.c ++++ b/plugins/check_dns.c +@@ -136,6 +136,28 @@ main (int argc, char **argv) + } + } + ++ /* bug ID: 2946553 - Older versions of bind will use all available dns ++ servers, we have to match the one specified */ ++ if (strstr (chld_out.line[i], "Server:") && strlen(dns_server) > 0) { ++ temp_buffer = index (chld_out.line[i], ':'); ++ temp_buffer++; ++ ++ /* Strip leading tabs */ ++ for (; *temp_buffer != '\0' && *temp_buffer == '\t'; temp_buffer++) ++ /* NOOP */; ++ ++ strip(temp_buffer); ++ if (temp_buffer==NULL || strlen(temp_buffer)==0) { ++ die (STATE_CRITICAL, ++ _("DNS CRITICAL - '%s' returned empty server string\n"), ++ NSLOOKUP_COMMAND); ++ } ++ ++ if (strcmp(temp_buffer, dns_server) != 0) { ++ die (STATE_CRITICAL, _("No response from DNS %s\n"), dns_server); ++ } ++ } ++ + /* the server is responding, we just got the host name... */ + if (strstr (chld_out.line[i], "Name:")) + parse_address = TRUE; +-- +1.5.5.6 + -- cgit v1.2.3-74-g34f1