ima: "remove enforce checking duplication" merge fix
authorMimi Zohar <zohar@linux.vnet.ibm.com>
Mon, 25 Feb 2013 04:42:36 +0000 (23:42 -0500)
committerJames Morris <james.l.morris@oracle.com>
Mon, 25 Feb 2013 15:46:38 +0000 (02:46 +1100)
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 <zohar@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/integrity/ima/ima_main.c

index 5127afcc4b8982a4353b87ccc5f4542ec7862f39..5b14a0946d6ed909f90bfb809c4a72c14594bda5 100644 (file)
@@ -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 */
This page took 0.024331 seconds and 5 git commands to generate.