From 0940031a1496027d3ac38b7ae642ee493d8ae3d5 Mon Sep 17 00:00:00 2001 From: Bryan Quigley Date: Fri, 6 Mar 2015 17:24:25 -0500 Subject: [logs] Remove passwords from rsyslog Specifically this removes passwords from the following patterns $ActionLibdbiPassword pwd= Closes #525 Signed-off-by: Bryan Quigley Signed-off-by: Adam Stokes --- sos/plugins/logs.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sos/plugins/logs.py b/sos/plugins/logs.py index f7bb667a..e423b637 100644 --- a/sos/plugins/logs.py +++ b/sos/plugins/logs.py @@ -50,6 +50,18 @@ class Logs(Plugin): if os.path.isfile(i): self.add_copy_spec_limit(i, sizelimit=self.limit) + def postproc(self): + self.do_path_regex_sub( + r"/etc/rsyslog*", + r"ActionLibdbiPassword (.*)", + r"ActionLibdbiPassword [********]" + ) + self.do_path_regex_sub( + r"/etc/rsyslog*", + r"pwd=.*", + r"pwd=[******]" + ) + class RedHatLogs(Logs, RedHatPlugin): @@ -95,5 +107,4 @@ class DebianLogs(Logs, DebianPlugin, UbuntuPlugin): else: self.add_copy_spec("/var/log/") - # vim: et ts=4 sw=4 -- cgit