aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-05-30 14:41:42 +0100
committerBryn M. Reeves <bmr@redhat.com>2014-05-30 14:42:49 +0100
commit7b46d34654735d925bcb2a3e4b27b65dce994519 (patch)
tree4e9ff47fc8be56617eea3bc820ba4930c0e3cace
parenta5d07b2e5178503f45128be6d0685e060dea46a5 (diff)
downloadsos-7b46d34654735d925bcb2a3e4b27b65dce994519.tar.gz
Add postprocessing for /etc/fstab passwords
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/filesys.py7
1 files changed, 7 insertions, 0 deletions
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