aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-04-29 15:12:42 +0000
committerastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-04-29 15:12:42 +0000
commita5632a4bcf47065d943af50c8b06a79834c60c8a (patch)
treee30505e001d719574a14fbb1aa84b6969067eff1
parent496f2ac5a20c1d1bd6a5879b9447fb6ea1592539 (diff)
downloadsos-a5632a4bcf47065d943af50c8b06a79834c60c8a.tar.gz
update sanitize plugin to hide IP's and running machine's hostname
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@951 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rw-r--r--sos/plugins/sanitize.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sos/plugins/sanitize.py b/sos/plugins/sanitize.py
index 3a94f971..66f4d264 100644
--- a/sos/plugins/sanitize.py
+++ b/sos/plugins/sanitize.py
@@ -37,6 +37,6 @@ class sanitize(sos.plugintools.PluginBase):
self.addCopySpec(log)
def postproc(self):
- self.doRegexSub('/var/log/messages', r"^\s+(%s)" % (self.hostname,), r"\1sanitized-hostname")
- self.doRegexSub('/var/log/messages', r"([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})", r"\1sanitized-ip")
+ self.doRegexSub('/var/log/messages', r"(%s|localhost)" % (self.hostname,), r"sanitized-hostname")
+ self.doRegexSub('/var/log/messages', r"([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})", r"sanitized-ip")