mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 08:44:14 +08:00
ima: Remove redundant policy rule set in add_rules()
Function ima_appraise_flag() returns the flag to be set in temp_ima_appraise depending on the hook identifier passed as an argument. It is not necessary to set the flag again for the POLICY_CHECK hook. Signed-off-by: Krzysztof Struczynski <krzysztof.struczynski@huawei.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
1129d31b55
commit
6ee28442a4
@ -643,11 +643,8 @@ static void add_rules(struct ima_rule_entry *entries, int count,
|
||||
|
||||
list_add_tail(&entry->list, &ima_policy_rules);
|
||||
}
|
||||
if (entries[i].action == APPRAISE) {
|
||||
if (entries[i].action == APPRAISE)
|
||||
temp_ima_appraise |= ima_appraise_flag(entries[i].func);
|
||||
if (entries[i].func == POLICY_CHECK)
|
||||
temp_ima_appraise |= IMA_APPRAISE_POLICY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user