diff mbox series

ima-evm-utils: Change log text of hash in hash_ima

Message ID 20190817223229.22623-1-vt@altlinux.org (mailing list archive)
State New, archived
Headers show
Series ima-evm-utils: Change log text of hash in hash_ima | expand

Commit Message

Vitaly Chikunov Aug. 17, 2019, 10:32 p.m. UTC
Output value is not just a hash, but hash prefixed with header. User may
be confused to see invalid hash value. Thus, change text so that is
obvious this is not a raw hash.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
---
 src/evmctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bruno Meneguele Aug. 20, 2019, 3:23 p.m. UTC | #1
On Sun, Aug 18, 2019 at 01:32:29AM +0300, Vitaly Chikunov wrote:
> Output value is not just a hash, but hash prefixed with header. User may
> be confused to see invalid hash value. Thus, change text so that is
> obvious this is not a raw hash.
> 
> Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
> ---
>  src/evmctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/evmctl.c b/src/evmctl.c
> index ef1f289..53711f4 100644
> --- a/src/evmctl.c
> +++ b/src/evmctl.c
> @@ -606,7 +606,7 @@ static int hash_ima(const char *file)
>  	len += offset;
>  
>  	if (imaevm_params.verbose >= LOG_INFO)
> -		log_info("hash(%s): ", imaevm_params.hash_algo);
> +		log_info("hdr+hash(%s): ", imaevm_params.hash_algo);
>  
>  	if (sigdump || imaevm_params.verbose >= LOG_INFO)
>  		imaevm_hexdump(hash, len);
> -- 
> 2.11.0
> 

Haha, simple but really useful change :)
Thanks.
diff mbox series

Patch

diff --git a/src/evmctl.c b/src/evmctl.c
index ef1f289..53711f4 100644
--- a/src/evmctl.c
+++ b/src/evmctl.c
@@ -606,7 +606,7 @@  static int hash_ima(const char *file)
 	len += offset;
 
 	if (imaevm_params.verbose >= LOG_INFO)
-		log_info("hash(%s): ", imaevm_params.hash_algo);
+		log_info("hdr+hash(%s): ", imaevm_params.hash_algo);
 
 	if (sigdump || imaevm_params.verbose >= LOG_INFO)
 		imaevm_hexdump(hash, len);