Module: check_mk
Branch: master
Commit: 18a0d8f72843f9e1e56570accbda15b771291468
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=18a0d8f72843f9…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Fri Jan 26 14:49:51 2018 +0100
5700 FIX Windows agent crashed while unpacking plugins
The agent updater and MSI installer call the Windows agent with a
special parameter 'unpack' in order to extract plugins from the
.cap-archive. The agent crashed if it could not write the batch file
'uninstall_plugins.bat' or any of the extracted plugin files.
Now any errors with writing files are logged before interrupting the
unpack process. After successfully unpacking the plugins, the agent
checks recursively that all files in its installation directory are
writable by the agent. The check stops at the first unwritable file
and logs a corresponding error message before exiting.
---
.werks/5700 | 19 ++
agents/windows/Makefile.am | 2 +
agents/windows/WritableFile.cc | 108 +++++++++++
agents/windows/WritableFile.h | 102 +++++++++++
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent.cc | 234 +++++++++++++-----------
agents/windows/test/CustomActions.h | 10 +
agents/windows/test/EnvironmentTest.cc | 8 +-
agents/windows/test/WritableFileTest.cc | 312 ++++++++++++++++++++++++++++++++
9 files changed, 679 insertions(+), 118 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=18a0d8f728…