Skip to content

Commit

Permalink
Elide bootloader password in grub plugin
Browse files Browse the repository at this point in the history
The grub.conf configuration file collected by the grub plugin may
contain a plaintext or md5 hashed bootloader password. Add a regex
substitution for all files matching '.*\/grub\.conf' and replace
the password with '*'s.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
  • Loading branch information
bmr-cymru committed Jun 2, 2014
1 parent 5447fac commit 23182c4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sos/plugins/grub.py
Expand Up @@ -30,4 +30,11 @@ def setup(self):
"/etc/grub.d"
])

def postproc(self):
self.do_path_regex_sub(
r".*\/grub.conf",
r"(password)\s(--md5)\s(.*)",
r"\1 \2 ********"
)

# vim: et ts=4 sw=4

0 comments on commit 23182c4

Please sign in to comment.