summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shim.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/shim.c b/shim.c
index 00813425..23dd0eeb 100644
--- a/shim.c
+++ b/shim.c
@@ -471,11 +471,9 @@ static BOOLEAN secure_mode (void)
}
status = get_variable(L"SetupMode", &Data, &len, global_var);
- if (status == EFI_SUCCESS) {
- if (verbose)
- console_notify(L"Platform is in setup mode\n");
- return FALSE;
- }
+ if (status != EFI_SUCCESS)
+ return TRUE;
+
setupmode = *Data;
FreePool(Data);
@@ -1509,14 +1507,15 @@ static EFI_STATUS check_mok_sb (void)
UINTN MokSBStateSize = 0;
UINT32 attributes;
+ insecure_mode = 0;
+ ignore_db = 0;
+
status = get_variable_attr(L"MokSBState", &MokSBState, &MokSBStateSize,
shim_lock_guid, &attributes);
if (status != EFI_SUCCESS)
return EFI_ACCESS_DENIED;
- insecure_mode = 0;
-
/*
* Delete and ignore the variable if it's been set from or could be
* modified by the OS