All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: linux-integrity@vger.kernel.org
Cc: Mimi Zohar <zohar@linux.ibm.com>, Petr Vorel <pvorel@suse.cz>,
	Stefan Berger <stefanb@linux.ibm.com>
Subject: [PATCH ima-evm-utils 4/4] Fix tpm2_pcr_supported() output messages
Date: Wed, 14 Sep 2022 10:22:25 -0400	[thread overview]
Message-ID: <20220914142225.1381077-5-zohar@linux.ibm.com> (raw)
In-Reply-To: <20220914142225.1381077-1-zohar@linux.ibm.com>

Remove unnecessary path check in pcr_ibmtss.c and update the syntax
in the other.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
---
 src/pcr_ibmtss.c     | 12 +-----------
 src/pcr_tsspcrread.c |  4 ++--
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/src/pcr_ibmtss.c b/src/pcr_ibmtss.c
index b8700ddd5da8..6b38d280e80c 100644
--- a/src/pcr_ibmtss.c
+++ b/src/pcr_ibmtss.c
@@ -20,21 +20,11 @@
 #undef MAX_DIGEST_SIZE	/* imaevm uses a different value than the TSS */
 #include <ibmtss/tss.h>
 
-#define CMD "tsspcrread"
-
-static char path[PATH_MAX];
-
 int tpm2_pcr_supported(void)
 {
 	if (imaevm_params.verbose > LOG_INFO)
-		log_info("Using %s to read PCRs.\n", CMD);
-
-	if (get_cmd_path(CMD, path, sizeof(path))) {
-		log_debug("Couldn't find '%s' in $PATH\n", CMD);
-		return 0;
-	}
+		log_info("Using ibmtss to read PCRs.\n");
 
-	log_debug("Found '%s' in $PATH\n", CMD);
 	return 1;
 }
 
diff --git a/src/pcr_tsspcrread.c b/src/pcr_tsspcrread.c
index 95048f8a5469..39ff8f7fc14d 100644
--- a/src/pcr_tsspcrread.c
+++ b/src/pcr_tsspcrread.c
@@ -60,11 +60,11 @@ int tpm2_pcr_supported(void)
 		log_info("Using %s to read PCRs.\n", CMD);
 
 	if (get_cmd_path(CMD, path, sizeof(path))) {
-		log_debug("Couldn't find '%s' in $PATH\n", CMD);
+		log_info("Couldn't find '%s' in %s\n", CMD, path);
 		return 0;
 	}
 
-	log_debug("Found '%s' in $PATH\n", CMD);
+	log_debug("Found '%s' in %s\n", CMD, path);
 	return 1;
 }
 
-- 
2.31.1


  parent reply	other threads:[~2022-09-14 14:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 14:22 [PATCH ima-evm-utils 0/4] misc bug and other fixes Mimi Zohar
2022-09-14 14:22 ` [PATCH ima-evm-utils 1/4] Don't ignore number of items read Mimi Zohar
2022-09-14 21:30   ` Stefan Berger
2022-09-15 12:07     ` Mimi Zohar
2022-09-14 14:22 ` [PATCH ima-evm-utils 2/4] Define and verify the template data length upper bounds Mimi Zohar
2022-09-14 21:28   ` Stefan Berger
2022-09-14 14:22 ` [PATCH ima-evm-utils 3/4] Sanity check the template data field sizes Mimi Zohar
2022-09-14 21:25   ` Stefan Berger
2022-09-14 14:22 ` Mimi Zohar [this message]
2022-09-14 21:21   ` [PATCH ima-evm-utils 4/4] Fix tpm2_pcr_supported() output messages Stefan Berger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220914142225.1381077-5-zohar@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=pvorel@suse.cz \
    --cc=stefanb@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.