ima: Log the same audit cause whenever a file has no signature
authorThiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Thu, 8 Jun 2017 01:49:12 +0000 (22:49 -0300)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Wed, 21 Jun 2017 18:37:12 +0000 (14:37 -0400)
commit915d9d255defeba80e1331a2b8bb8a79c0ca4db7
tree1c17768e0bd34096069dee66cb1998a6f0f9f6b8
parent2663218ba6e3dd6f27df9664e00fa3eb63be3a3f
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>
security/integrity/ima/ima_appraise.c