[patch] cgi: checking if all needed environment variables are set (Was: Re: [hobbit] [bug?] Crash of hobbitsvc.cgi on trends column display)

Gildas Le Nadan gn1 at sanger.ac.uk
Wed Nov 29 18:54:38 CET 2006


Ok, I went thru the /web directory and edited the cgi to add the crude 
environment checking I've been talking on earlier. Compiled cgis have 
been tested individually without parameters and in line as drop-in 
replacements for the existing cgi, "it works for me".

This patch applies to a hobbit-4.2.0 with the all-in-one patch applied 
using "patch -p1 <sanity_check.patch".

As always, feedback are welcome

Cheers
Gildas

Charles Goyard wrote:
> Hi again,
> 
> As an extra info, I found the reason why the program crashes :
> 
> in loadhosts.c, when there :
> 
> if (result || !host->defaulthost || (strcasecmp(host->bbhostname, ".default.") == 0))
> 	return result;
> else
> 	return bbh_find_item(host->defaulthost, item);
> 
> I get in the "else". At that point, host->defaulthost is not null, but
> points to garbage. I dont't get what the default host should be.
> 
> (btw, thanks for the patch Gildas)
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sanity_check.patch
Type: text/x-patch
Size: 10901 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20061129/3be67851/attachment.bin>


More information about the Xymon mailing list