From 3da569797c33da3b32f601f7f292448b1bc0d3b3 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Thu, 5 Jun 2014 12:31:14 -0400 Subject: [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 --- sos/plugins/ovirt.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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') -- cgit