[Nagiosplug-devel] a patch for check_dns.c

Sam Tilders nagios-devel at jovianprojects.com.au
Wed Jan 8 20:43:02 CET 2003


Hi,

There are a couple of occasions where the check_dns plugin will segmentation
fault. Around line 366 it checks the server to query parameter only if it
wasn't specified. Also the query parameter around line 356.

It wasn't possible to let check_dns use the local resolv.conf settings to do 
the look up.

After negating these checks so they occured if the param was specified, the
is_host function got called with argv[c] where c was always one higher than
the number of parameters provided. Looked like something leftover from an old
way of handling the parameters.

I check the CVS version 1.5 and found that's what I had... so I've included a
patch that seems to fix these issues.

I did see some discussion of this in the archives, but I didn't see any 
patches that fixed it this way.

Cheers.
--
--
Sam Tilders
sam at jovianprojects.com.au

Cogito Ergo Sum - I think, therefore I am.  (Descartes)

-------------------------------------------------------


-- 
-- Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_dns-fixparamschecking.patch
Type: text/x-diff
Size: 1410 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20030108/d22baec2/attachment.patch>


More information about the Devel mailing list