diff options
-rw-r--r-- | sos/report/plugins/iscsi.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sos/report/plugins/iscsi.py b/sos/report/plugins/iscsi.py index 74d2704d..70b130ee 100644 --- a/sos/report/plugins/iscsi.py +++ b/sos/report/plugins/iscsi.py @@ -33,6 +33,20 @@ class Iscsi(Plugin): "iscsiadm -m node --op=show" ]) + def postproc(self): + # Example for scrubbing node.session.auth.password + # + # node.session.auth.password = jfaiu1nNQJcsa,sti4lho'jZia=ia + # + # to + # + # node.session.auth.password = ******** + nodesessionpwd = r"(node\.session\.auth\.password\s+=\s+)(\S+)" + discoverypwd = r"(discovery\.sendtargets\.auth\.password\s+=\s+)(\S+)" + repl = r"\1********\n" + self.do_path_regex_sub('/etc/iscsi/iscsid.conf', nodesessionpwd, repl) + self.do_path_regex_sub('/etc/iscsi/iscsid.conf', discoverypwd, repl) + class RedHatIscsi(Iscsi, RedHatPlugin): |