Skip to content

Instantly share code, notes, and snippets.

@julian-klode
Created January 17, 2024 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julian-klode/baaffd0a86f9cca1bd54134039f0ef80 to your computer and use it in GitHub Desktop.
Save julian-klode/baaffd0a86f9cca1bd54134039f0ef80 to your computer and use it in GitHub Desktop.
diff --git a/sbat.c b/sbat.c
index b9f228b..408bb1a 100644
--- a/sbat.c
+++ b/sbat.c
@@ -183,6 +183,10 @@ verify_sbat_helper(list_t *local_sbat_var, size_t n, struct sbat_section_entry *
list_t *pos = NULL;
EFI_STATUS efi_status = EFI_SUCCESS;
struct sbat_var_entry *sbat_var_entry;
+ struct sbat_var_entry temporary_grub_sbat_entry = {
+ "grub",
+ "4",
+ };
if (list_empty(local_sbat_var)) {
dprint(L"%s variable not present\n", SBAT_VAR_NAME);
@@ -199,6 +203,10 @@ verify_sbat_helper(list_t *local_sbat_var, size_t n, struct sbat_section_entry *
if (found)
break;
}
+ bool ignored;
+ efi_status = verify_single_entry(entries[i], &temporary_grub_sbat_entry, &ignored);
+ if (EFI_ERROR(efi_status))
+ goto out;
}
out:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment