The IMA_APPRAISE and IMA_HASH policies overlap. Clear IMA_HASH properly.

Fixes: da1b0029f5 ("ima: support new "hash" and "dont_hash" policy actions")
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
This commit is contained in:
Mimi Zohar 2018-03-10 23:07:34 -05:00
Родитель d77ccdc644
Коммит a9a4935d44
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -389,7 +389,7 @@ int ima_match_policy(struct inode *inode, const struct cred *cred, u32 secid,
action |= entry->action & IMA_DO_MASK;
if (entry->action & IMA_APPRAISE) {
action |= get_subaction(entry, func);
action ^= IMA_HASH;
action &= ~IMA_HASH;
}
if (entry->action & IMA_DO_MASK)