mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-28 15:46:53 +00:00
3b94406a9e
CVE-2020-10713 CVE-2020-14308 CVE-2020-14309 CVE-2020-14310 CVE-2020-14311 CVE-2020-15705 CVE-2020-15706 CVE-2020-15707 Signed-off-by: Peter Jones <pjones@redhat.com>
50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
From b987476a6bd5462e6258f4e4c6e3c4553a2a5b6a Mon Sep 17 00:00:00 2001
|
|
From: Javier Martinez Canillas <javierm@redhat.com>
|
|
Date: Tue, 14 Jan 2020 17:41:29 +0100
|
|
Subject: [PATCH 197/237] blscfg: Always use the root variable to search for
|
|
BLS snippets
|
|
|
|
The boot and root variables are set by grub2-mkconfig to tell GRUB what
|
|
are the devices and partitions used as the EFI System Partition (ESP)
|
|
and to store the /boot directory (or used as the /boot mount point).
|
|
|
|
But the boot variable is not needed anymore, this was added because the
|
|
blscfg module used to search for the BLS snippets in the ESP, but was
|
|
later changed to always search for the BLS files in /boot even for EFI.
|
|
|
|
When doing that change, the logic was made backwards and so the boot
|
|
variable is wrongly used for legacy BIOS. This only works because this
|
|
is set to the same value as the root variable.
|
|
|
|
So the correct thing to do is to always use the root variable to search
|
|
the BLS snippets, since that is set to the partition that stores them.
|
|
|
|
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
---
|
|
grub-core/commands/blscfg.c | 6 ++----
|
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
|
|
index 286a5b88d12..aa4e624905e 100644
|
|
--- a/grub-core/commands/blscfg.c
|
|
+++ b/grub-core/commands/blscfg.c
|
|
@@ -968,14 +968,12 @@ bls_load_entries (const char *path)
|
|
if (!devid) {
|
|
#ifdef GRUB_MACHINE_EMU
|
|
devid = "host";
|
|
-#elif defined(GRUB_MACHINE_EFI)
|
|
+#else
|
|
devid = grub_env_get ("root");
|
|
-#else
|
|
- devid = grub_env_get ("boot");
|
|
#endif
|
|
if (!devid)
|
|
return grub_error (GRUB_ERR_FILE_NOT_FOUND,
|
|
- N_("variable `%s' isn't set"), "boot");
|
|
+ N_("variable `%s' isn't set"), "root");
|
|
}
|
|
|
|
grub_dprintf ("blscfg", "opening %s\n", devid);
|
|
--
|
|
2.26.2
|
|
|