aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornavid <navid@ef72aa8b-4018-0410-8976-d6e080ef94d8>2007-12-10 10:44:52 +0000
committernavid <navid@ef72aa8b-4018-0410-8976-d6e080ef94d8>2007-12-10 10:44:52 +0000
commit883294ceedbd38918a0d52a6d5cd0c3dc0173e8d (patch)
tree582c94f152f851be96274cbcbdb357902d80efcb /src
parentd6870455869b7828efc59cad37103ab38b1c9962 (diff)
downloadsos-883294ceedbd38918a0d52a6d5cd0c3dc0173e8d.tar.gz
allows use of globs for forbidden paths
add some forbidden paths to x11 and selinux plugins git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@469 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src')
-rw-r--r--src/lib/sos/plugins/selinux.py3
-rw-r--r--src/lib/sos/plugins/x11.py4
-rw-r--r--src/lib/sos/plugintools.py5
3 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/sos/plugins/selinux.py b/src/lib/sos/plugins/selinux.py
index e692297b..5f0c1f40 100644
--- a/src/lib/sos/plugins/selinux.py
+++ b/src/lib/sos/plugins/selinux.py
@@ -24,6 +24,9 @@ class selinux(sos.plugintools.PluginBase):
self.collectExtOutput("/usr/bin/selinuxconfig")
self.eta_weight += 120 # this plugins takes 120x longer (for ETA)
self.collectExtOutput("/sbin/fixfiles check")
+
+ self.addForbiddenPath("/etc/selinux/targeted")
+
return
def checkenabled(self):
diff --git a/src/lib/sos/plugins/x11.py b/src/lib/sos/plugins/x11.py
index 5de25153..755352ef 100644
--- a/src/lib/sos/plugins/x11.py
+++ b/src/lib/sos/plugins/x11.py
@@ -29,5 +29,9 @@ class x11(sos.plugintools.PluginBase):
self.addCopySpec("/var/log/Xorg.*.log")
self.addCopySpec("/var/log/XFree86.*.log")
self.collectExtOutput("/bin/dmesg | grep -e 'agpgart.'")
+
+ self.addForbiddenPath("/etc/X11/X")
+ self.addForbiddenPath("/etc/X11/fontpath.d")
+
return
diff --git a/src/lib/sos/plugintools.py b/src/lib/sos/plugintools.py
index 3e195b4d..f9e10ae1 100644
--- a/src/lib/sos/plugintools.py
+++ b/src/lib/sos/plugintools.py
@@ -244,9 +244,10 @@ class PluginBase:
def addForbiddenPath(self, forbiddenPath):
"""Specify a path to not copy, even if it's part of a copyPaths[] entry.
- Note: do NOT use globs here.
"""
- self.forbiddenPaths.append(forbiddenPath)
+ # Glob case handling is such that a valid non-glob is a reduced glob
+ for filespec in glob.glob(forbiddenPath):
+ self.forbiddenPaths.append(filespec)
def getAllOptions(self):
"""