From fbba18c477e0d4e79c695a42fc454b2bdd44148e Mon Sep 17 00:00:00 2001 From: Mimi Zohar Date: Mon, 18 Nov 2019 14:37:13 -0500 Subject: [PATCH] ima-evm-utils: include file name on failure to verify signature Include file name on warning/error indication on signature verification. Signed-off-by: Mimi Zohar --- src/libimaevm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libimaevm.c b/src/libimaevm.c index 90eb589..683cfb8 100644 --- a/src/libimaevm.c +++ b/src/libimaevm.c @@ -628,13 +628,13 @@ int ima_verify_signature(const char *file, unsigned char *sig, int siglen, int hashlen, sig_hash_algo; if (sig[0] != 0x03) { - log_err("xattr ima has no signature\n"); + log_err("%s: xattr ima has no signature\n", file); return -1; } sig_hash_algo = imaevm_hash_algo_from_sig(sig + 1); if (sig_hash_algo < 0) { - log_err("Invalid signature\n"); + log_err("%s: Invalid signature\n", file); return -1; } /* Use hash algorithm as retrieved from signature */