[Nagios-devel] [PATCH] NDOUtils: fix save_custom_variables o_id type, size of es array

Michael Friedrich michael.friedrich at univie.ac.at
Thu Feb 11 22:55:54 UTC 2010


I recently ran into those problems and fixed them in IDOUtils. I thought 
it would be nice to get them resolved in NDOUtils too.

1/ There was a patch regarding save custom variables function, which 
takes o_id as argument of type int. This is wrong because internal 
handling of this variable is unsigned long - handed over to function 
call and internally used as asprintf %lu too. This patch fixes that.

2/ Having custom variables defined, they will be written to the 
database. There are two handlers for es[] - es[0] and es[1]. But the 
definition only defines size 1, not 2. When writing es[1] = ... this 
will lead to a segfault of ndo2db causing ndomod to produce "error 
writing to datasink" outputs in syslog.

By applying this fix, those issues will resolve.
Attached is a git diff patch (I don't use cvs).

Kind regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-save_custom_variables-o_id-type-size-of-es-arra.patch
Type: text/x-diff
Size: 1624 bytes
Desc: not available
URL: <http://lists.nagios.com/pipermail/nagios-devel/attachments/20100211/04144d7e/attachment.bin>

More information about the Nagios-devel mailing list