forked from pool/grub2
Accepting request 1100709 from home:michael-chang:branches:Base:System
- Fix error message "unknown command tpm_record_pcrs" with encrypted boot and no tpm device present (bsc#1213547) * 0002-tpm-Disable-tpm-verifier-if-tpm-is-not-present.patch OBS-URL: https://build.opensuse.org/request/show/1100709 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=456
This commit is contained in:
parent
d7b8a8f31b
commit
02325a17e7
@ -94,23 +94,28 @@ Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
|||||||
+}
|
+}
|
||||||
--- a/grub-core/commands/tpm.c
|
--- a/grub-core/commands/tpm.c
|
||||||
+++ b/grub-core/commands/tpm.c
|
+++ b/grub-core/commands/tpm.c
|
||||||
@@ -311,6 +311,8 @@
|
@@ -311,16 +311,19 @@
|
||||||
|
|
||||||
GRUB_MOD_INIT (tpm)
|
GRUB_MOD_INIT (tpm)
|
||||||
{
|
{
|
||||||
|
- grub_verifier_register (&grub_tpm_verifier);
|
||||||
|
-
|
||||||
|
cmd = grub_register_extcmd ("tpm_record_pcrs", grub_tpm_record_pcrs, 0,
|
||||||
|
N_("LIST_OF_PCRS"),
|
||||||
|
N_("Snapshot one or more PCR values and record them in an EFI variable."),
|
||||||
|
grub_tpm_record_pcrs_options);
|
||||||
+ if (!grub_tpm_present())
|
+ if (!grub_tpm_present())
|
||||||
+ return;
|
+ return;
|
||||||
grub_verifier_register (&grub_tpm_verifier);
|
+ grub_verifier_register (&grub_tpm_verifier);
|
||||||
|
}
|
||||||
cmd = grub_register_extcmd ("tpm_record_pcrs", grub_tpm_record_pcrs, 0,
|
|
||||||
@@ -321,6 +323,8 @@
|
|
||||||
|
|
||||||
GRUB_MOD_FINI (tpm)
|
GRUB_MOD_FINI (tpm)
|
||||||
{
|
{
|
||||||
|
- grub_verifier_unregister (&grub_tpm_verifier);
|
||||||
|
grub_unregister_extcmd (cmd);
|
||||||
+ if (!grub_tpm_present())
|
+ if (!grub_tpm_present())
|
||||||
+ return;
|
+ return;
|
||||||
grub_verifier_unregister (&grub_tpm_verifier);
|
+ grub_verifier_unregister (&grub_tpm_verifier);
|
||||||
grub_unregister_extcmd (cmd);
|
|
||||||
}
|
}
|
||||||
--- a/include/grub/tpm.h
|
--- a/include/grub/tpm.h
|
||||||
+++ b/include/grub/tpm.h
|
+++ b/include/grub/tpm.h
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 26 03:04:25 UTC 2023 - Michael Chang <mchang@suse.com>
|
||||||
|
|
||||||
|
- Fix error message "unknown command tpm_record_pcrs" with encrypted boot and
|
||||||
|
no tpm device present (bsc#1213547)
|
||||||
|
* 0002-tpm-Disable-tpm-verifier-if-tpm-is-not-present.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 30 11:03:54 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Tue May 30 11:03:54 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user