Module: check_mk
Branch: master
Commit: 6fb65e528c7627beab3e62508caaa822bd3e8f6c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6fb65e528c7627…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Fri Jul 15 10:40:32 2016 +0200
bugfix on password store from werk 3154
---
bin/pwquery.sh | 15 +++++++++++++++
checks/check_http | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/bin/pwquery.sh b/bin/pwquery.sh
new file mode 100755
index 0000000..86d5f36
--- /dev/null
+++ b/bin/pwquery.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# this is run from active checks with empty environment, so we somehow need to figure
out
+# where python, the passwordstore.py and the passwordstore itself reside
+
+OMD_ROOT=$1
+shift
+
+export PYTHONPATH=$OMD_ROOT/lib/python:$OMD_ROOT/local/lib/python
+
+$OMD_ROOT/bin/python $OMD_ROOT/lib/python/cmk/passwordstore.py\
+ --get $1 --user $2\
+ --keydir $OMD_ROOT/var/check_mk/private_keys\
+ --file $OMD_ROOT/var/check_mk/passwords.json
+
diff --git a/checks/check_http b/checks/check_http
index 891c561..0f8a4f8 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -97,7 +97,7 @@ def check_http_arguments(params):
user, password = settings["auth"]
if password.startswith("store:"):
group, password = password[6:].split(":", 1)
- args += ' -a %s:%s --password-safe %s' %\
+ args += ' -a %s:%s --password-store %s' %\
(quote_shell_string(user), quote_shell_string(password),
quote_shell_string(group))
else: