aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-11-23 09:16:17 +0000
committerpcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-11-23 09:16:17 +0000
commit383863ef10bc46d5ddc7ca3a943861d9f5624ce2 (patch)
tree7c938360a7a0c0e0a6b0dce33589e0baaa768638
parent57b7a12bc5f1cd86d1d0abe4094624fc93b99f99 (diff)
downloadsos-383863ef10bc46d5ddc7ca3a943861d9f5624ce2.tar.gz
[sos] removal of sanitize.py
Does not belong here. git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@1029 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rw-r--r--sos/plugins/sanitize.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/sos/plugins/sanitize.py b/sos/plugins/sanitize.py
deleted file mode 100644
index 66f4d264..00000000
--- a/sos/plugins/sanitize.py
+++ /dev/null
@@ -1,42 +0,0 @@
-### This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-import os
-import sos.plugintools
-import glob
-import socket
-
-class sanitize(sos.plugintools.PluginBase):
- """ sanitize specified log files, etc
- """
- hostname = socket.gethostname()
-
- def defaultenabled(self):
- # disabled by default b/c still a work in progress
- return False
-
- def setup(self):
- # sanitize ip's, hostnames in logs
- rhelver = self.policy().rhelVersion()
- if rhelver == 5 or rhelver == 4:
- logs=self.doRegexFindAll(r"^\S+\s+(\/.*log.*)\s+$", "/etc/syslog.conf")
- else:
- logs=self.doRegexFindAll(r"^\S+\s+(\/.*log.*)\s+$", "/etc/rsyslog.conf")
- for log in logs:
- self.addCopySpec(log)
-
- def postproc(self):
- 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")
-