summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2021-03-31 18:24:30 +0100
committerSteve McIntyre <steve@einval.com>2021-03-31 18:24:30 +0100
commitec10b2569d63726b826c9afc6f14ff68e6f18d88 (patch)
tree2feb505d3c4358a93987062463937124d3d65464 /shim.c
parentb43a60b29267c5278652a87629434ad4f45c7493 (diff)
parent8119f7183f5f0bebb168fec5239855552020cf66 (diff)
downloadefi-boot-shim-ec10b2569d63726b826c9afc6f14ff68e6f18d88.tar.gz
efi-boot-shim-ec10b2569d63726b826c9afc6f14ff68e6f18d88.zip
Update upstream source from tag 'upstream/15.4'
Update to upstream version '15.4' with Debian dir 93160080661283eee071d2c92a27ce9b39acb998
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();