From b3404e2cebdaa1bb8e10687fe544a21b72285f50 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 30 May 2014 14:41:42 +0100 Subject: [PATCH 74/77] Add postprocessing for /etc/fstab passwords Signed-off-by: Bryn M. Reeves --- sos/plugins/filesys.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sos/plugins/filesys.py b/sos/plugins/filesys.py index 9deb75d..2dcfc59 100644 --- a/sos/plugins/filesys.py +++ b/sos/plugins/filesys.py @@ -49,4 +49,11 @@ class Filesys(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): for dev in zip(self.do_regex_find_all(ext_fs_regex, mounts)): self.add_cmd_output("dumpe2fs -h %s" % (dev)) + def postproc(self): + self.do_file_sub( + "/etc/fstab", + r"(password=)[^\s]*", + r"\1********" + ) + # vim: et ts=4 sw=4 -- 1.9.3