Segmentation fault when nebmodule returns with something else than 0

Ethan Galstad nagios at nagios.org
Fri Dec 14 23:56:09 CET 2007


Tobias Mucke wrote:
> Hi list,
> 
> found the problem, at least I think to have found the problem.
> Actually function neb_set_module_info does not operate on the
> nebmodule struct but on the mod_handle it got from its caller. The
> latter is from type lt_dlhandle. To set an info of type
> NEBMODULE_MODINFO_* does not make sense.
> Two problems arose by this and I fall into both. Writing informations
> to the module by neb_set_module_info works for some of the
> NEBMODULE_MODINFO_*. Some other lead to a segfault. The second problem
> is, if you have overwritten the NEBMODULE_MODINFO_TITLE you overwrite
> the filename of the lt_dlhandle and the module can't be unloaded
> anymore.
> 
> I have written a patch. Since I am not a very experienced C programmer
> please review it carefully before applying to official Nagios code.
> 

Excellent patch Tobias!  This bug has been around for quite a while, and 
affects the Nagios 2.x code as well as 3.x.  I'll get the patch into CVS 
shortly.


Ethan Galstad
Nagios Developer
___
Email: nagios at nagios.org
Web:   www.nagios.org

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace




More information about the Developers mailing list