linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ima-evm-utils: Change log text of hash in hash_ima
@ 2019-08-17 22:32 Vitaly Chikunov
  2019-08-20 15:23 ` Bruno Meneguele
  0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Chikunov @ 2019-08-17 22:32 UTC (permalink / raw)
  To: Mimi Zohar, Dmitry Kasatkin, linux-integrity

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ima-evm-utils: Change log text of hash in hash_ima
  2019-08-17 22:32 [PATCH] ima-evm-utils: Change log text of hash in hash_ima Vitaly Chikunov
@ 2019-08-20 15:23 ` Bruno Meneguele
  0 siblings, 0 replies; 2+ messages in thread
From: Bruno Meneguele @ 2019-08-20 15:23 UTC (permalink / raw)
  To: Vitaly Chikunov; +Cc: Mimi Zohar, Dmitry Kasatkin, linux-integrity

[-- Attachment #1: Type: text/plain, Size: 921 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-20 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-17 22:32 [PATCH] ima-evm-utils: Change log text of hash in hash_ima Vitaly Chikunov
2019-08-20 15:23 ` Bruno Meneguele

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).