hulk inclusion category: feature feature: digest-lists
---------------------------
This patch adds the file name to the log messages, so that it is possible to find why digest list lookup was disabled.
Signed-off-by: Roberto Sassu roberto.sassu@huawei.com --- security/integrity/ima/ima_digest_list.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/security/integrity/ima/ima_digest_list.c b/security/integrity/ima/ima_digest_list.c index 7e901bdb4340..c7610d9d603c 100644 --- a/security/integrity/ima/ima_digest_list.c +++ b/security/integrity/ima/ima_digest_list.c @@ -217,7 +217,8 @@ void ima_check_measured_appraised(struct file *file)
iint = integrity_iint_find(file_inode(file)); if (!iint) { - pr_err("disabling digest lists lookup\n"); + pr_err("%s not processed, disabling digest lists lookup\n", + file_dentry(file)->d_name.name); ima_digest_list_actions = 0; return; } @@ -225,14 +226,16 @@ void ima_check_measured_appraised(struct file *file) mutex_lock(&iint->mutex); if ((ima_digest_list_actions & IMA_MEASURE) && !(iint->flags & IMA_MEASURED)) { - pr_err("disabling digest lists lookup for measurement\n"); + pr_err("%s not measured, disabling digest lists lookup " + "for measurement\n", file_dentry(file)->d_name.name); ima_digest_list_actions &= ~IMA_MEASURE; }
if ((ima_digest_list_actions & IMA_APPRAISE) && (!(iint->flags & IMA_APPRAISED) || !test_bit(IMA_DIGSIG, &iint->atomic_flags))) { - pr_err("disabling digest lists lookup for appraisal\n"); + pr_err("%s not appraised, disabling digest lists lookup " + "for appraisal\n", file_dentry(file)->d_name.name); ima_digest_list_actions &= ~IMA_APPRAISE; }