summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinlun <869793317@qq.com>2024-11-02 17:21:22 +0800
committerPeter Jones <pjones@redhat.com>2025-01-15 15:56:05 -0500
commitac85ba4342314c3e6f248d4946138de2f977dd52 (patch)
treeea2f7b9b5b0257e246ff8ea45106112e34cc50ca
parent314aecf89318d31697a3fabf14cf49a0dc359331 (diff)
downloadefi-boot-shim-ac85ba4342314c3e6f248d4946138de2f977dd52.tar.gz
efi-boot-shim-ac85ba4342314c3e6f248d4946138de2f977dd52.zip
Fix the issue that the gBS->LoadImage pointer was empty.
The interface shouldn't be replaced at the shim_fini stage When the vendor certificate doesn't exist. Signed-off-by: jinlun <869793317@qq.com>
-rw-r--r--shim.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/shim.c b/shim.c
index b9d33d6b..8d5ff589 100644
--- a/shim.c
+++ b/shim.c
@@ -1744,11 +1744,12 @@ shim_fini(void)
uninstall_shim_protocols();
if (secure_mode()) {
-
- /*
- * Remove our hooks from system services.
- */
- unhook_system_services();
+ if (vendor_authorized_size || vendor_deauthorized_size) {
+ /*
+ * Remove our hooks from system services.
+ */
+ unhook_system_services();
+ }
}
unhook_exit();