SHA256
1
0
forked from pool/grub2

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
This commit is contained in:
Michael Chang 2022-10-04 06:01:45 +00:00 committed by Git OBS Bridge
parent 5912838326
commit 90fcdec2e4

View File

@ -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])
{