summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2015-11-17 11:40:29 -0500
committerPeter Jones <pjones@redhat.com>2015-11-17 11:40:29 -0500
commit4d70bbd894f9f244a809b3d965eb1c3a8b27b9fa (patch)
tree5383346ad5d8c9d8fc2939c25a18438055bf9ba0
parentb7e59fd9875efe17514310dbba9b62d911223b52 (diff)
downloadefi-boot-shim-4d70bbd894f9f244a809b3d965eb1c3a8b27b9fa.tar.gz
efi-boot-shim-4d70bbd894f9f244a809b3d965eb1c3a8b27b9fa.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);