Blame SOURCES/0039-Explain-the-logic-in-secure_mode-better.patch
|
|
4210fa |
From 86173dba42ad5ae002ac99cc515e60104da2245c Mon Sep 17 00:00:00 2001
|
|
|
4210fa |
From: Peter Jones <pjones@redhat.com>
|
|
|
4210fa |
Date: Wed, 25 Jun 2014 10:46:19 -0400
|
|
|
4210fa |
Subject: [PATCH 39/74] Explain the logic in secure_mode() better.
|
|
|
4210fa |
|
|
|
4210fa |
I was getting confused reading it, and I wrote it, so clearly it needs
|
|
|
4210fa |
more commentry.
|
|
|
4210fa |
|
|
|
4210fa |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
4210fa |
---
|
|
|
4210fa |
shim.c | 6 ++++++
|
|
|
4210fa |
1 file changed, 6 insertions(+)
|
|
|
4210fa |
|
|
|
4210fa |
diff --git a/shim.c b/shim.c
|
|
|
4210fa |
index 72d6072..210e778 100644
|
|
|
4210fa |
--- a/shim.c
|
|
|
4210fa |
+++ b/shim.c
|
|
|
4210fa |
@@ -499,6 +499,12 @@ static BOOLEAN secure_mode (void)
|
|
|
4210fa |
return FALSE;
|
|
|
4210fa |
}
|
|
|
4210fa |
|
|
|
4210fa |
+ /* If we /do/ have "SecureBoot", but /don't/ have "SetupMode",
|
|
|
4210fa |
+ * then the implementation is bad, but we assume that secure boot is
|
|
|
4210fa |
+ * enabled according to the status of "SecureBoot". If we have both
|
|
|
4210fa |
+ * of them, then "SetupMode" may tell us additional data, and we need
|
|
|
4210fa |
+ * to consider it.
|
|
|
4210fa |
+ */
|
|
|
4210fa |
status = get_variable(L"SetupMode", &Data, &len, global_var);
|
|
|
4210fa |
if (status != EFI_SUCCESS)
|
|
|
4210fa |
return TRUE;
|
|
|
4210fa |
--
|
|
|
4210fa |
1.9.3
|
|
|
4210fa |
|