]> git.proxmox.com Git - efi-boot-shim.git/commitdiff
shim: check for EFI\BOOT\BOOT${ARCH}.EFI as well as the leading \ version
authorPeter Jones <pjones@redhat.com>
Tue, 17 Nov 2015 16:40:29 +0000 (11:40 -0500)
committerPeter Jones <pjones@redhat.com>
Tue, 17 Nov 2015 16:40:29 +0000 (11:40 -0500)
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>
shim.c

diff --git a/shim.c b/shim.c
index d64d15bed870428297863b23d51390e0161d19f2..c93d96d238b0eb2ed1d39f1f73d5cf70704cea0d 100644 (file)
--- 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);