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>
This commit is contained in:
Peter Jones 2015-11-17 11:40:29 -05:00
parent b7e59fd987
commit 4d70bbd894

4
shim.c
View File

@ -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);