Re: [Nagios-devel] Segmentation fault when nebmodule returns with

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Segmentation fault when nebmodule returns with

Post by Guest »

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: [email protected]
Web: www.nagios.org





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked