1
0
mirror of https://git.code.sf.net/p/linux-ima/ima-evm-utils synced 2025-07-01 13:21:12 +02:00

Fix tpm2_pcr_supported() output messages

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

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
Mimi Zohar
2022-09-14 08:26:39 -04:00
parent 27e91006d8
commit 7aaf923d0b
2 changed files with 3 additions and 13 deletions

View File

@ -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);
log_info("Using ibmtss to read PCRs\n");
if (get_cmd_path(CMD, path, sizeof(path))) {
log_debug("Couldn't find '%s' in $PATH\n", CMD);
return 0;
}
log_debug("Found '%s' in $PATH\n", CMD);
return 1;
}

View File

@ -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;
}