aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Quigley <bryan.quigley@canonical.com>2015-03-27 17:35:07 -0400
committerAdam Stokes <adam.stokes@ubuntu.com>2015-04-01 10:23:26 -0400
commitd3ea1d0a4e176d84434e0de6d4cccbce59c811f6 (patch)
treea4cb8d93998b38db0cbec3b26032bb0f4e128b72
parentde58e4ef2bc1300d797d5da9fbdadb3368d4ef3b (diff)
downloadsos-d3ea1d0a4e176d84434e0de6d4cccbce59c811f6.tar.gz
[apparmor] Capture AppArmor profiles and status
Captures /etc/apparmor.d for profiles Excludes /cache - because it's not config. Excludes libvirt/libvirt because it can grow quite large and the TEMPLATE file should usually be enough. Excludes abstractions because they are usually not modified and are large. For both libvirt and abstractions capture an ls just to be sure permissions are correct. Captures apparmor_status to get the effective profiles. Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r--sos/plugins/apparmor.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/sos/plugins/apparmor.py b/sos/plugins/apparmor.py
index cb66bba9..360f58b8 100644
--- a/sos/plugins/apparmor.py
+++ b/sos/plugins/apparmor.py
@@ -25,7 +25,15 @@ class Apparmor(Plugin, UbuntuPlugin):
def setup(self):
self.add_copy_spec([
- "/etc/apparmor"
+ "/etc/apparmor*"
+ ])
+ self.add_forbidden_path("/etc/apparmor.d/cache")
+ self.add_forbidden_path("/etc/apparmor.d/libvirt/libvirt*")
+ self.add_forbidden_path("/etc/apparmor.d/abstractions")
+ self.add_cmd_output([
+ "apparmor_status",
+ "ls -alh /etc/apparmor.d/abstractions",
+ "ls -alh /etc/apparmor.d/libvirt",
])
# vim: et ts=4 sw=4