diff options
author | Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> | 2017-06-07 22:49:12 -0300 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2017-06-21 14:37:12 -0400 |
commit | 915d9d255defeba80e1331a2b8bb8a79c0ca4db7 (patch) | |
tree | 1c17768e0bd34096069dee66cb1998a6f0f9f6b8 /security | |
parent | 2663218ba6e3dd6f27df9664e00fa3eb63be3a3f (diff) | |
download | linux-915d9d255defeba80e1331a2b8bb8a79c0ca4db7.tar.gz linux-915d9d255defeba80e1331a2b8bb8a79c0ca4db7.tar.bz2 linux-915d9d255defeba80e1331a2b8bb8a79c0ca4db7.zip |
ima: Log the same audit cause whenever a file has no signature
If the file doesn't have an xattr, ima_appraise_measurement sets cause to
"missing-hash" while if there's an xattr but it's a digest instead of a
signature it sets cause to "IMA-signature-required".
Fix it by setting cause to "IMA-signature-required" in both cases.
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/ima/ima_appraise.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c index ea36a4f134f4..809ba70fbbbf 100644 --- a/security/integrity/ima/ima_appraise.c +++ b/security/integrity/ima/ima_appraise.c @@ -217,7 +217,8 @@ int ima_appraise_measurement(enum ima_hooks func, if (rc && rc != -ENODATA) goto out; - cause = "missing-hash"; + cause = iint->flags & IMA_DIGSIG_REQUIRED ? + "IMA-signature-required" : "missing-hash"; status = INTEGRITY_NOLABEL; if (opened & FILE_CREATED) iint->flags |= IMA_NEW_FILE; |