From 90fcdec2e437e7357a8775b17954a83fadf5a8ed9c097f286a217b5437dbc0b1 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Tue, 4 Oct 2022 06:01:45 +0000 Subject: [PATCH] Accepting request 1007215 from home:michael-chang:tmp Added minor fix to safe_tpm_pcr_snapshot.patch OBS-URL: https://build.opensuse.org/request/show/1007215 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=421 --- safe_tpm_pcr_snapshot.patch | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/safe_tpm_pcr_snapshot.patch b/safe_tpm_pcr_snapshot.patch index 388c1ef..1a79db8 100644 --- a/safe_tpm_pcr_snapshot.patch +++ b/safe_tpm_pcr_snapshot.patch @@ -1,7 +1,7 @@ --- grub-core/commands/tpm.c | 28 ++++++++++++++++++++++------ - util/grub-install.c | 7 +++++-- - 2 files changed, 27 insertions(+), 8 deletions(-) + util/grub-install.c | 6 ++++-- + 2 files changed, 26 insertions(+), 8 deletions(-) --- a/grub-core/commands/tpm.c +++ b/grub-core/commands/tpm.c @@ -66,19 +66,18 @@ } --- a/util/grub-install.c +++ b/util/grub-install.c -@@ -1457,8 +1457,10 @@ +@@ -1457,8 +1457,9 @@ grub_util_unlink (load_cfg); - if (1) -+ /* FIXME: It seems config.is_cryptodisk_enabled is missing here */ -+ if (platform == GRUB_INSTALL_PLATFORM_X86_64_EFI) ++ if (platform == GRUB_INSTALL_PLATFORM_X86_64_EFI && have_cryptodisk) { + grub_install_push_module ("tpm"); load_cfg_f = grub_util_fopen (load_cfg, "wb"); have_load_cfg = 1; fprintf (load_cfg_f, "tpm_record_pcrs 0-9\n"); -@@ -1466,7 +1468,8 @@ +@@ -1466,7 +1467,8 @@ if (debug_image && debug_image[0]) {