- Update to 0.5.7

+ Support ppc64 events
  + Fix the string comparison for the alternative event
    (bsc#1241957)
- Add the new BuildRequires: libelf-devel and libfdisk-devel

OBS-URL: https://build.opensuse.org/package/show/Base:System/pcr-oracle?expand=0&rev=48
This commit is contained in:
2025-05-29 08:49:17 +00:00
committed by Git OBS Bridge
commit 6570119150
19 changed files with 2437 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
From bfd8520b4af3743a51046c83a1382fe1e66cc95a Mon Sep 17 00:00:00 2001
From: Gary Lin <glin@suse.com>
Date: Thu, 26 Dec 2024 13:46:45 +0800
Subject: [PATCH] Fix event rehash for grub files on system partition
The crypto device logged by grub may not be 'crypto0'. It could begin
with the 'cryptouuid' prefix like this:
cryptouuid/4203418d2b034db5b9476f013ee3dc80
This commit adds the additional prefix matching for 'cryptouuid' to make
pcr-oracle to search the file on system partition.
Signed-off-by: Gary Lin <glin@suse.com>
---
src/eventlog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/eventlog.c b/src/eventlog.c
index 4277d42..c49599d 100644
--- a/src/eventlog.c
+++ b/src/eventlog.c
@@ -578,7 +578,8 @@ __tpm_event_grub_file_rehash(const tpm_event_t *ev, const tpm_parsed_event_t *pa
const tpm_evdigest_t *md = NULL;
debug(" re-hashing %s\n", __tpm_event_grub_file_describe(parsed));
- if (evspec->device == NULL || !strcmp(evspec->device, "crypto0")) {
+ if (evspec->device == NULL || !strcmp(evspec->device, "crypto0") ||
+ !strncmp(evspec->device, "cryptouuid", strlen("cryptouuid"))) {
debug(" assuming the file resides on system partition\n");
md = runtime_digest_rootfs_file(ctx->algo, evspec->path);
} else {
--
2.43.0