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),