diff --git a/0238-fw_path-don-t-prepend-unless-we-re-on-http-s.patch b/0238-fw_path-don-t-prepend-unless-we-re-on-http-s.patch new file mode 100644 index 0000000..29974a4 --- /dev/null +++ b/0238-fw_path-don-t-prepend-unless-we-re-on-http-s.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 10 Sep 2018 17:29:21 -0400 +Subject: [PATCH] fw_path: don't prepend / unless we're on http(s) + +Signed-off-by: Peter Jones +--- + grub-core/kern/main.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c +index fc8d8c6c9d4..c59b89f0a09 100644 +--- a/grub-core/kern/main.c ++++ b/grub-core/kern/main.c +@@ -130,8 +130,12 @@ grub_set_prefix_and_root (void) + if (fwdevice && fwpath) + { + char *fw_path; ++ char separator = '\x0'; + +- fw_path = grub_xasprintf ("(%s)%s%s", fwdevice, fwpath[0] == '/' ? "" : "/", fwpath); ++ if (!grub_strncmp(fwdevice, "http", 4) && fwpath[0] != '/') ++ separator = '/'; ++ ++ fw_path = grub_xasprintf ("(%s)%c%s", fwdevice, seperator, fwpath); + if (fw_path) + { + grub_env_set ("fw_path", fw_path); diff --git a/grub.patches b/grub.patches index 58ff267..74a86e9 100644 --- a/grub.patches +++ b/grub.patches @@ -235,3 +235,4 @@ Patch0234: 0234-arm-arm64-loader-Better-memory-allocation-and-error-.patch Patch0235: 0235-Fix-GRUB_EFI_MAX_USABLE_ADDRESS-to-be-64-bit-on-x86_.patch Patch0236: 0236-Try-to-pick-better-locations-for-kernel-and-initrd.patch Patch0237: 0237-Try-again-to-pick-better-locations-for-kernel-and-in.patch +Patch0238: 0238-fw_path-don-t-prepend-unless-we-re-on-http-s.patch diff --git a/grub2.spec b/grub2.spec index 7984bcd..73808c6 100644 --- a/grub2.spec +++ b/grub2.spec @@ -499,9 +499,10 @@ fi %changelog * Mon Sep 10 2018 Peter Jones - 2.02-55 -- Fix UEFI booting in a different way. - Related: rhbz#1626844 +- Fix UEFI memory problem in a different way. Related: rhbz#1624532 +- Don't mangle fw_path with a / unless we're on http + Resolves: rhbz#1626844 * Fri Sep 07 2018 Kevin Fenzi - 2.02-54 - Add patch from https://github.com/rhboot/grub2/pull/30 to fix uefi booting