Module: check_mk
Branch: master
Commit: 1aa523e01d1b85ec5a02158a3a81ba504619e6d0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1aa523e01d1b85…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Dec 12 13:08:17 2016 +0100
4158 FIX fileinfo: fixed file handling containing spaces
Change-Id: Id1ab3646e7708e5d0d02f400184ce69498b1f7d9
---
.werks/4158 | 10 ++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/4158 b/.werks/4158
new file mode 100644
index 0000000..d6922f3
--- /dev/null
+++ b/.werks/4158
@@ -0,0 +1,10 @@
+Title: fileinfo: fixed file handling containing spaces
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i3
+Date: 1481544427
+
+
diff --git a/ChangeLog b/ChangeLog
index 8110a97..e0515c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,7 @@
* 4157 FIX: netapp_api_cluster: fixed None item
* 4001 FIX: Windows Agent: windows agent couldn't handle surrounding quotes and
spaces at command specification...
* 4138 FIX: statgrab: Fixed issue in FreeBSD agent when statgrab is not installed
+ * 4158 FIX: fileinfo: fixed file handling containing spaces
Multisite:
* 4070 Added a painter for the service check period
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index fef4c13..2e806af 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -761,7 +761,7 @@ if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
date +%s
for line in $(cat "$MK_CONFDIR/fileinfo.cfg")
do
- stat -c "%n|%s|%Y" $line 2>/dev/null
+ stat -c "%n|%s|%Y" "${line}" 2>/dev/null
if [ $? -ne 0 ]; then
echo "$line|missing|$(date +%s)"