Fix deprecated rule logic if the rule was deleted in policy directory.
The bug scenario: - define deprecated rule in policy folder - start a service - enforce policies - remove the rule in policy folder - enforce policies New default is applied to the rule, but new and old defaults should be applied (OR logic) The patch fixes it. Closes-Bug: 1977549 Change-Id: If11fe2da1163d6d3f16d133aeb207a055cf30de4
This commit is contained in:
parent
e7b9dd1f5a
commit
d80573c612
@ -664,6 +664,7 @@ class Enforcer(object):
|
||||
)
|
||||
elif self.overwrite:
|
||||
self.rules = Rules(default_rule=self.default_rule)
|
||||
self.file_rules = {}
|
||||
for path in existing_policy_dirs:
|
||||
self._walk_through_policy_directory(
|
||||
path, self._load_policy_file, True, False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user