mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-24 22:35:28 +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>
40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
From a0b42e6003987d194b9780ea91cb3c9245547521 Mon Sep 17 00:00:00 2001
|
|
From: Javier Martinez Canillas <javierm@redhat.com>
|
|
Date: Thu, 26 Mar 2020 15:08:30 +0100
|
|
Subject: [PATCH 199/237] grub-switch-to-blscfg: Update grub2 binary in ESP for
|
|
OSTree systems
|
|
|
|
The grub2 EFI binary in the ESP isn't updated as a part of an OSTree update
|
|
transaction. So let's make the script to update this and also create a file
|
|
to indicate that the installed version has support for the blscfg module.
|
|
|
|
Related: rhbz#1751272
|
|
|
|
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
---
|
|
util/grub-switch-to-blscfg.in | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
diff --git a/util/grub-switch-to-blscfg.in b/util/grub-switch-to-blscfg.in
|
|
index 49b3985fadb..a05a8d98554 100644
|
|
--- a/util/grub-switch-to-blscfg.in
|
|
+++ b/util/grub-switch-to-blscfg.in
|
|
@@ -266,6 +266,15 @@ copy_bls() {
|
|
fi
|
|
}
|
|
|
|
+# The grub2 EFI binary is not copied to the ESP as a part of an ostree
|
|
+# transaction. Make sure a grub2 version with BLS support is installed.
|
|
+if test -f /run/ostree-booted && test -d /sys/firmware/efi/efivars/; then
|
|
+ grub_binary="$(find /usr/lib/ostree-boot/efi/EFI/${EFIDIR}/ -name grub*.efi)"
|
|
+ cp ${grub_binary} ${grubdir} || exit 1
|
|
+ # Create a hidden file to indicate that grub2 now has BLS support.
|
|
+ touch /boot/grub2/.grub2-blscfg-supported
|
|
+fi
|
|
+
|
|
GENERATE=0
|
|
if grep '^GRUB_ENABLE_BLSCFG=.*' "${etcdefaultgrub}" \
|
|
| grep -vq '^GRUB_ENABLE_BLSCFG="*true"*\s*$' ; then
|
|
--
|
|
2.26.2
|
|
|