Skip to content

Commit

Permalink
ima: "remove enforce checking duplication" merge fix
Browse files Browse the repository at this point in the history
Commit "750943a ima: remove enforce checking duplication" combined
the 'in IMA policy' and 'enforcing file integrity' checks.  For
the non-file, kernel module verification, a specific check for
'enforcing file integrity' was not added.  This patch adds the
check.

Signed-off-by: Mimi Zohar <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
Mimi Zohar authored and James Morris committed Feb 25, 2013
1 parent ab78265 commit a2c2c3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion security/integrity/ima/ima_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ int ima_module_check(struct file *file)
{
if (!file) {
#ifndef CONFIG_MODULE_SIG_FORCE
if (ima_appraise & IMA_APPRAISE_MODULES)
if ((ima_appraise & IMA_APPRAISE_MODULES) &&
(ima_appraise & IMA_APPRAISE_ENFORCE))
return -EACCES; /* INTEGRITY_UNKNOWN */
#endif
return 0; /* We rely on module signature checking */
Expand Down

0 comments on commit a2c2c3a

Please sign in to comment.