mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-03 07:45:50 +00:00
ignore .git in is_skippable_dir()
References: https://bugs.launchpad.net/apparmor/+bug/1440273
This commit is contained in:
committed by
Christian Boltz
parent
130958a4a4
commit
f9eb3fea0f
@@ -2038,7 +2038,7 @@ def is_skippable_file(path):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def is_skippable_dir(path):
|
def is_skippable_dir(path):
|
||||||
if re.search('^(.*/)?(disable|cache|force-complain|lxc)/?$', path):
|
if re.search('^(.*/)?(disable|cache|force-complain|lxc|\.git)/?$', path):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@@ -479,6 +479,7 @@ class AaTest_is_skippable_dir(AATest):
|
|||||||
('force-complain', True),
|
('force-complain', True),
|
||||||
('/etc/apparmor.d/cache', True),
|
('/etc/apparmor.d/cache', True),
|
||||||
('/etc/apparmor.d/lxc/', True),
|
('/etc/apparmor.d/lxc/', True),
|
||||||
|
('/etc/apparmor.d/.git/', True),
|
||||||
|
|
||||||
('dont_disable', False),
|
('dont_disable', False),
|
||||||
('/etc/apparmor.d/cache_foo', False),
|
('/etc/apparmor.d/cache_foo', False),
|
||||||
|
Reference in New Issue
Block a user