naemon/naemon-livestatus — pull request #5 by pengi (2014-05-14 11:59:43+00:00)
Title: Make TableDownComm storage thread safe

The tables downtimes and comments uses an internal storage for
downtimes and comments, probably because the nagios and now naemons
internal storage doesn't provide thread safety, since objects can be
added and removed.

By some reason, the livestatus uses the non-thread safe storage map<>
from the standard library without synchronization. So adding or
removing downtimes at the same time as listing those can end up in
unexpected behaviour, and probably a segfault.

Easiest fix is to protect that map in a mutex.

More information can be found in the bugtracker at op5:
https://bugs.op5.com/view.php?id=8708

Signed-off-by: Max Sikstrom