summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2015-11-09 14:33:56 -0500
committerPeter Jones <pjones@redhat.com>2015-11-17 11:40:29 -0500
commitedeb313e6e7257b858da06d562ac74468a48129f (patch)
tree5383346ad5d8c9d8fc2939c25a18438055bf9ba0
parent4794822464ea0ff4073fdfd3526fd059a2c1f05e (diff)
downloadefi-boot-shim-edeb313e6e7257b858da06d562ac74468a48129f.tar.gz
efi-boot-shim-edeb313e6e7257b858da06d562ac74468a48129f.zip
shim: check for EFI\BOOT\BOOT${ARCH}.EFI as well as the leading \ version
I found a machine whose BDS gives us relative paths, yay! The rest of the code still works without that leading slash, so just make it one more item we let through our StrnCaseCmp() filter. Signed-off-by: Peter Jones <pjones@redhat.com>
-rw-r--r--shim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shim.c b/shim.c
index d64d15be..c93d96d2 100644
--- a/shim.c
+++ b/shim.c
@@ -1290,7 +1290,9 @@ should_use_fallback(EFI_HANDLE image_handle)
* L"\\EFI\\BOOT\\/BOOTX64.EFI". So just handle that here...
*/
if (StrnCaseCmp(bootpath, L"\\EFI\\BOOT\\BOOT", 14) &&
- StrnCaseCmp(bootpath, L"\\EFI\\BOOT\\/BOOT", 15))
+ StrnCaseCmp(bootpath, L"\\EFI\\BOOT\\/BOOT", 15) &&
+ StrnCaseCmp(bootpath, L"EFI\\BOOT\\BOOT", 13) &&
+ StrnCaseCmp(bootpath, L"EFI\\BOOT\\/BOOT", 14))
goto error;
pathlen = StrLen(bootpath);