apparmor/logprof-skip-cache-d.diff
Christian Boltz 803321a703 Accepting request 602407 from home:cboltz
- exclude the /etc/apparmor.d/cache.d/ directory from aa-logprof parsing
  (logprof-skip-cache-d.diff)

OBS-URL: https://build.opensuse.org/request/show/602407
OBS-URL: https://build.opensuse.org/package/show/security:apparmor/apparmor?expand=0&rev=213
2018-04-29 23:15:47 +00:00

27 lines
987 B
Diff

diff --git a/utils/apparmor/aa.py b/utils/apparmor/aa.py
index e28b8495..88bf2172 100644
--- utils/apparmor/aa.py
+++ utils/apparmor/aa.py
@@ -2048,7 +2048,7 @@ def is_skippable_file(path):
return False
def is_skippable_dir(path):
- if re.search('^(.*/)?(disable|cache|force-complain|lxc|\.git)/?$', path):
+ if re.search('^(.*/)?(disable|cache|cache\.d|force-complain|lxc|\.git)/?$', path):
return True
return False
diff --git a/utils/test/test-aa.py b/utils/test/test-aa.py
index 243283a9..b5f8e94f 100644
--- utils/test/test-aa.py
+++ utils/test/test-aa.py
@@ -484,6 +484,8 @@ class AaTest_is_skippable_dir(AATest):
('lxc', True),
('force-complain', True),
('/etc/apparmor.d/cache', True),
+ ('/etc/apparmor.d/cache.d', True),
+ ('/etc/apparmor.d/cache.d/', True),
('/etc/apparmor.d/lxc/', True),
('/etc/apparmor.d/.git/', True),