mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
Merge aa.py is_known_rule(): remove obsolete sanity check
We use ProfileStorage everywhere, which makes checking if a specific rule_type exists obsolete. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1405 Approved-by: John Johansen <john@jjmx.net> Merged-by: John Johansen <john@jjmx.net>
This commit is contained in:
@@ -2109,10 +2109,8 @@ def include_list_recursive(profile, in_preamble=False):
|
||||
|
||||
|
||||
def is_known_rule(profile, rule_type, rule_obj):
|
||||
# XXX get rid of get() checks after we have a proper function to initialize a profile
|
||||
if profile.get(rule_type, False):
|
||||
if profile[rule_type].is_covered(rule_obj, False):
|
||||
return True
|
||||
if profile[rule_type].is_covered(rule_obj, False):
|
||||
return True
|
||||
|
||||
includelist = include_list_recursive(profile)
|
||||
|
||||
|
Reference in New Issue
Block a user