From 7b46d34654735d925bcb2a3e4b27b65dce994519 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 30 May 2014 14:41:42 +0100 Subject: 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 15cec04c..a50c2547 100644 --- a/sos/plugins/filesys.py +++ b/sos/plugins/filesys.py @@ -51,4 +51,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 -- cgit