[Nagios-devel] Re: Bug in check_dns plugin

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Re: Bug in check_dns plugin

Post by Guest »

Whoops, the man page is confusing, I retract my error statement. I am
using FreeBSD and the system nslookup won't query an authoritative
name server properly, but the bind 9 one will. I am using bind 9 but
I still have the bind 8 nslookup in my path...

Date: 9 Jan 2003 19:20:41 -0800
From: Mike Harding


the 'nslookup' command apparently needs a '-' before the server name
or address, this is missing in the code. I found this when debugging
a Authoritative server, where I needed to specify the server. I use
freebsd but I checked a linux man page and apparently linux needs the
'-' also...

- Mike Harding

--- check_dns.c~ Thu Nov 14 17:04:51 2002
+++ check_dns.c Thu Jan 9 19:15:55 2003
@@ -88,7 +88,7 @@
}

/* get the command to run */
- asprintf (&command_line, "%s %s %s", NSLOOKUP_COMMAND, query_address, dns_server);
+ asprintf (&command_line, "%s %s -%s", NSLOOKUP_COMMAND, query_address, dns_server);

alarm (timeout_interval);
time (&start_time);








This post was automatically imported from historical nagios-devel mailing list archives
Original poster: mvh@ix.netcom.com
Locked