Page 1 of 1

[Nagios-devel] Bug in check_dns plugin

Posted: Thu Jan 09, 2003 7:20 pm
by Guest
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: [email protected]