summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2021-03-31 18:24:24 +0100
committerSteve McIntyre <steve@einval.com>2021-03-31 18:24:24 +0100
commit8119f7183f5f0bebb168fec5239855552020cf66 (patch)
tree19f2bf9871d671b570a5ccaabc89ffd743b4cd10 /shim.c
parent031e5cce385d3f96b1caa1d53495332a7eb03749 (diff)
downloadefi-boot-shim-upstream/15.4.tar.gz
efi-boot-shim-upstream/15.4.zip
New upstream version 15.4upstream/15.4
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/shim.c b/shim.c
index 117c8f42..c5cfbb83 100644
--- a/shim.c
+++ b/shim.c
@@ -1895,7 +1895,7 @@ efi_main (EFI_HANDLE passed_image_handle, EFI_SYSTEM_TABLE *passed_systab)
L"shim_init() failed",
L"import of SBAT data failed",
L"SBAT self-check failed",
- L"SBAT UEFI variable setting failed",
+ SBAT_VAR_NAME L" UEFI variable setting failed",
NULL
};
enum {
@@ -1935,12 +1935,12 @@ efi_main (EFI_HANDLE passed_image_handle, EFI_SYSTEM_TABLE *passed_systab)
efi_status = set_sbat_uefi_variable();
if (EFI_ERROR(efi_status) && secure_mode()) {
- perror(L"SBAT variable initialization failed\n");
+ perror(L"%s variable initialization failed\n", SBAT_VAR_NAME);
msg = SET_SBAT;
goto die;
} else if (EFI_ERROR(efi_status)) {
- dprint(L"SBAT variable initialization failed: %r\n",
- efi_status);
+ dprint(L"%s variable initialization failed: %r\n",
+ SBAT_VAR_NAME, efi_status);
}
if (secure_mode()) {
@@ -1950,19 +1950,20 @@ efi_main (EFI_HANDLE passed_image_handle, EFI_SYSTEM_TABLE *passed_systab)
INIT_LIST_HEAD(&sbat_var);
efi_status = parse_sbat_var(&sbat_var);
if (EFI_ERROR(efi_status)) {
- perror(L"Parsing SBAT variable failed: %r\n",
- efi_status);
+ perror(L"Parsing %s variable failed: %r\n",
+ SBAT_VAR_NAME, efi_status);
msg = IMPORT_SBAT;
goto die;
}
- efi_status = handle_sbat(sbat_start, sbat_end - sbat_start);
+ efi_status = handle_sbat(sbat_start, sbat_end - sbat_start - 1);
if (EFI_ERROR(efi_status)) {
perror(L"Verifiying shim SBAT data failed: %r\n",
efi_status);
msg = SBAT_SELF_CHECK;
goto die;
}
+ dprint(L"SBAT self-check succeeded\n");
}
init_openssl();