bug in a configuration files parsing logic?

Andreas Ericsson ae at op5.se
Mon Sep 3 14:14:54 CEST 2007


Danila wrote:
> Hi there!
> 
> I have 2 hosts: 1489 and 14894_2108 (14894_2108 is a member of 14894
> group). They both has their own host ext infos. If
> they do have these names, nagios -v tells this:
> 
> 
> Reading configuration data...
> 
> Error: Could not add duplicate hostextinfo entry for host '14894_2108'.
> Error: Could not allocate memory for hostextinfo list to add extended info for host '14894_2108'.
> Segmentation fault
> 
> 
> If I change the names to such: u1489 and 14894_2108, seg fault
> disapperses. It looks like Nagios has somewhere "like" operator,
> not "=". And because of this bug, my network schema in Nagios has to be
> modified. that's bad...
> 

There are no 'like' operators in C.
It's possible that your host names cause a hash-collision. If the code doing
the actual comparison later on does

	strncmp(hst->name, hext->host_name, strlen(hext->host_name));

you would get this error.

> Has anyone already found this bug? Is there any patches to solve it?
> 

No, otherwise it would have been in the CVS code already, and most likely
in a tarball release too.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list