Blame SOURCES/bz1241648-fence_ipmilan_password_verbose.patch
|
|
e4ffb1 |
From 48bf31cb12ddca8df530739943744f2da7aa94c8 Mon Sep 17 00:00:00 2001
|
|
|
e4ffb1 |
From: Marek 'marx' Grac <mgrac@redhat.com>
|
|
|
e4ffb1 |
Date: Fri, 10 Jul 2015 10:55:23 +0200
|
|
|
e4ffb1 |
Subject: [PATCH 3/3] fence_ipmilan: Do not print password to debug info
|
|
|
e4ffb1 |
|
|
|
e4ffb1 |
Resolves: rhbz#1241648
|
|
|
e4ffb1 |
---
|
|
|
e4ffb1 |
fence/agents/lib/fencing.py.py | 6 +++++-
|
|
|
e4ffb1 |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
e4ffb1 |
|
|
|
e4ffb1 |
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
|
|
|
e4ffb1 |
index 9a16aee..7fddc47 100644
|
|
|
e4ffb1 |
--- a/fence/agents/lib/fencing.py.py
|
|
|
e4ffb1 |
+++ b/fence/agents/lib/fencing.py.py
|
|
|
e4ffb1 |
@@ -1182,7 +1182,11 @@ def run_command(options, command, timeout=None, env=None):
|
|
|
e4ffb1 |
if timeout is not None:
|
|
|
e4ffb1 |
timeout = float(timeout)
|
|
|
e4ffb1 |
|
|
|
e4ffb1 |
- logging.info("Executing: %s\n", command)
|
|
|
e4ffb1 |
+ # For IPMI password occurs on command line, it should not be part of debug info
|
|
|
e4ffb1 |
+ log_command = command
|
|
|
e4ffb1 |
+ if "ipmitool" in log_command:
|
|
|
e4ffb1 |
+ log_command = re.sub("-P (.+?) -p", "-P [set] -p", log_command)
|
|
|
e4ffb1 |
+ logging.info("Executing: %s\n", log_command)
|
|
|
e4ffb1 |
|
|
|
e4ffb1 |
try:
|
|
|
e4ffb1 |
process = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
|
|
|
e4ffb1 |
--
|
|
|
e4ffb1 |
1.9.3
|
|
|
e4ffb1 |
|