mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
ima: fix wrong signed policy requirement when not appraising
Kernel booted just with ima_policy=tcb (not with
ima_policy=appraise_tcb) shouldn't require signed policy.
Regression found with LTP test ima_policy.sh.
Fixes: c52657d93b
("ima: refactor ima_init_policy()")
Cc: stable@vger.kernel.org (linux-5.0)
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
558b523d46
commit
f40019475b
1 changed files with 4 additions and 3 deletions
|
@ -498,10 +498,11 @@ static void add_rules(struct ima_rule_entry *entries, int count,
|
||||||
|
|
||||||
list_add_tail(&entry->list, &ima_policy_rules);
|
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);
|
temp_ima_appraise |= ima_appraise_flag(entries[i].func);
|
||||||
if (entries[i].func == POLICY_CHECK)
|
if (entries[i].func == POLICY_CHECK)
|
||||||
temp_ima_appraise |= IMA_APPRAISE_POLICY;
|
temp_ima_appraise |= IMA_APPRAISE_POLICY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue