From 2f7dfb53828f3f62d10aaa4484e6fc889439108e Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Mon, 23 Jun 2014 17:53:39 +0100
Subject: [PATCH] [tomcat] update for tomcat6 and add password filtering

---
 sos/plugins/tomcat.py | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/sos/plugins/tomcat.py b/sos/plugins/tomcat.py
index a6dc905..a73be4c 100644
--- a/sos/plugins/tomcat.py
+++ b/sos/plugins/tomcat.py
@@ -17,12 +17,18 @@ import sos.plugintools
 class tomcat(sos.plugintools.PluginBase):
     """Tomcat related information
     """
-    def checkenabled(self):
-        if self.cInfo["policy"].pkgByName("tomcat5"):
-            return True
-        return False
-        
+
+    packages = ('tomcat6',)
+
     def setup(self):
-        self.addCopySpec("/etc/tomcat5")
-        self.addCopySpec("/var/log/tomcat5")
+        self.addCopySpec("/etc/tomcat6")
+        self.addCopySpec("/var/log/tomcat6/catalina.out")
         return
+
+    def postproc(self):
+        self.doRegexSub(
+            "/etc/tomcat6/tomcat-users.xml",
+            r"password=(\S*)",
+            r'password="********"'
+        )
+
-- 
1.9.3

