mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
parser: add flags to rule_t
In preparation for file rules and rule duplication removal add flags to rule_t with the first flag indicating if the rule is deleted. We do this instead of actually deleting the rule so we can hold on to the rule for debug and printing output in the future. Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -843,6 +843,8 @@ int clear_and_convert_entry(std::string& buffer, char *entry)
|
||||
int post_process_policydb_ents(Profile *prof)
|
||||
{
|
||||
for (RuleList::iterator i = prof->rule_ents.begin(); i != prof->rule_ents.end(); i++) {
|
||||
if ((*i)->flags & RULE_FLAG_DELETED)
|
||||
continue;
|
||||
if ((*i)->gen_policy_re(*prof) == RULE_ERROR)
|
||||
return FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user