summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2022-06-01 11:01:24 -0400
committerPeter Jones <pjones@redhat.com>2022-06-01 11:01:24 -0400
commita674edede0b3322b7e1d4f38dc03ec5bce9d81f5 (patch)
treea4544a2fbd1174f037ea7b538362dc73d038d485
parent8ee1e1c132dfacf21dbc460be629fdb17e2304c2 (diff)
downloadefi-boot-shim-a674edede0b3322b7e1d4f38dc03ec5bce9d81f5.tar.gz
efi-boot-shim-a674edede0b3322b7e1d4f38dc03ec5bce9d81f5.zip
sbat: add the parsed SBAT variable entries to the debug log
Signed-off-by: Peter Jones <pjones@redhat.com>
-rw-r--r--sbat.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sbat.c b/sbat.c
index 9b872082..f1d6e98d 100644
--- a/sbat.c
+++ b/sbat.c
@@ -289,6 +289,7 @@ parse_sbat_var(list_t *entries)
UINT8 *data = 0;
UINTN datasize;
EFI_STATUS efi_status;
+ list_t *pos = NULL;
if (!entries) {
dprint(L"entries is NULL\n");
@@ -305,7 +306,20 @@ parse_sbat_var(list_t *entries)
* We've intentionally made sure there's a NUL byte on all variable
* allocations, so use that here.
*/
- return parse_sbat_var_data(entries, data, datasize+1);
+ efi_status = parse_sbat_var_data(entries, data, datasize+1);
+ if (EFI_ERROR(efi_status))
+ return efi_status;
+
+ dprint(L"SBAT variable entries:\n");
+ list_for_each(pos, entries) {
+ struct sbat_var_entry *entry;
+
+ entry = list_entry(pos, struct sbat_var_entry, list);
+ dprint(L"%a, %a, %a\n", entry->component_name,
+ entry->component_generation, entry->sbat_datestamp);
+ }
+
+ return efi_status;
}
static bool