aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-06-05 12:31:14 -0400
committerBryn M. Reeves <bmr@redhat.com>2014-06-05 12:31:14 -0400
commit3da569797c33da3b32f601f7f292448b1bc0d3b3 (patch)
treec30e70d3c8b4140f5cb054559b833cabbee64241
parentd335f4f09d033008cb6485d2cd8ca371a974d700 (diff)
downloadsos-3da569797c33da3b32f601f7f292448b1bc0d3b3.tar.gz
[ovirt] elide passwords in {iso,image}uploader.conf
These two configuration files may contain passwords of the form: Add do_file_sub() calls to the plugin's postproc to remove these. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/ovirt.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/sos/plugins/ovirt.py b/sos/plugins/ovirt.py
index e245e9be..969440b9 100644
--- a/sos/plugins/ovirt.py
+++ b/sos/plugins/ovirt.py
@@ -120,6 +120,18 @@ class Ovirt(Plugin, RedHatPlugin):
r"proxyPassword=********"
)
+ passwd_files = [
+ "imageuploader.conf",
+ "isouploader.conf"
+ ]
+ for conf_file in passwd_files:
+ conf_path = os.path.join("/etc/ovirt-engine", conf_file)
+ self.do_file_sub(
+ conf_path,
+ r"passwd=(.*)",
+ r"passwd=********"
+ )
+
sensitive_keys = self.DEFAULT_SENSITIVE_KEYS
#Handle --alloptions case which set this to True.
keys_opt = self.get_option('sensitive_keys')