Module: check_mk
Branch: master
Commit: 184f01ae11b94ba220c9b139beada2119df210dd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=184f01ae11b94b…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Mar 14 09:50:23 2017 +0100
4430 FIX Fixed logwatch-related Livestatus queries in NEB module
The 'mk_logwatch_files' and 'mk_logwatch_file' columns in the
'hosts' table
didn't work when the Nagios core was used, they were always empty. The net
result was that logwatch-related things in the GUI always looked OK, even
when there were problems. This has been fixed.
Note that the CMC was not affected by this bug.
Change-Id: I9ebc41b848a857dd2513e488e3e323c862b2357f
---
.werks/4430 | 15 +++++++++++++++
livestatus/src/module.cc | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/4430 b/.werks/4430
new file mode 100644
index 0000000..178fd0f
--- /dev/null
+++ b/.werks/4430
@@ -0,0 +1,15 @@
+Title: Fixed logwatch-related Livestatus queries in NEB module
+Level: 1
+Component: livestatus
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1489480904
+Class: fix
+
+The 'mk_logwatch_files' and 'mk_logwatch_file' columns in the
'hosts' table
+didn't work when the Nagios core was used, they were always empty. The net
+result was that logwatch-related things in the GUI always looked OK, even
+when there were problems. This has been fixed.
+
+Note that the CMC was not affected by this bug.
diff --git a/livestatus/src/module.cc b/livestatus/src/module.cc
index 5ef59a1..87ef796 100644
--- a/livestatus/src/module.cc
+++ b/livestatus/src/module.cc
@@ -964,7 +964,7 @@ void livestatus_parse_arguments(const char *args_orig) {
char *pos = slash == nullptr ? g_mkeventd_socket_path : (slash + 1);
strncpy(
pos, "mkeventd/status",
- &g_mkeventd_socket_path[sizeof(g_mkeventd_socket_path)] - slash);
+ &g_mkeventd_socket_path[sizeof(g_mkeventd_socket_path)] - pos);
g_mkeventd_socket_path[sizeof(g_mkeventd_socket_path) - 1] = 0;
}
Warning(fl_logger_nagios) << "g_socket_path=[" <<
g_socket_path