summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/shim.c b/shim.c
index 6d577afa..5712d480 100644
--- a/shim.c
+++ b/shim.c
@@ -1682,6 +1682,9 @@ EFI_STATUS init_grub(EFI_HANDLE image_handle)
if (efi_status != EFI_SUCCESS)
efi_status = start_image(image_handle, MOK_MANAGER);
+ Print(L"start_image() returned %r\n", efi_status);
+ uefi_call_wrapper(BS->Stall, 1, 2000000);
+
return efi_status;
}
@@ -1985,6 +1988,10 @@ install_shim_protocols(void)
{
EFI_GUID shim_lock_guid = SHIM_LOCK_GUID;
EFI_STATUS efi_status;
+
+ if (!secure_mode())
+ return EFI_SUCCESS;
+
/*
* Install the protocol
*/
@@ -2011,6 +2018,10 @@ void
uninstall_shim_protocols(void)
{
EFI_GUID shim_lock_guid = SHIM_LOCK_GUID;
+
+ if (!secure_mode())
+ return;
+
#if defined(OVERRIDE_SECURITY_POLICY)
/*
* Clean up the security protocol hook