diff options
author | Rohan Sable <rohanjsable@yahoo.com> | 2020-07-24 17:42:58 +0530 |
---|---|---|
committer | BryanQuigley <code@bryanquigley.com> | 2020-07-27 16:43:13 -0700 |
commit | 7644b6d9865049f4ee99dfe1507f63200c520677 (patch) | |
tree | 521222affec1c9882e244bd1f0af6908d0009c92 | |
parent | 7341823258791f13f24a8f61f93253aa426dd335 (diff) | |
download | sos-7644b6d9865049f4ee99dfe1507f63200c520677.tar.gz |
[autofs]: obsfucate password in `automount -m` cmd
This patch adds scrubbing of plain text password
from the output of `automount -m` command.
Before Patch :
test | -fstype=cifs,username=user,password=pass //server/sambashare
After Patch :
test | -fstype=cifs,username=user,password=**** //server/sambashare
Signed-off-by: Rohan Sable <rohanjsable@yahoo.com>
-rw-r--r-- | sos/report/plugins/autofs.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sos/report/plugins/autofs.py b/sos/report/plugins/autofs.py index 9ece75d3..57d7bcdb 100644 --- a/sos/report/plugins/autofs.py +++ b/sos/report/plugins/autofs.py @@ -54,6 +54,11 @@ class Autofs(Plugin): r"(password=)[^,\s]*", r"\1********" ) + self.do_cmd_output_sub( + "automount -m", + r"(password=)[^,\s]*", + r"\1********" + ) class RedHatAutofs(Autofs, RedHatPlugin): |