!154 [sync] PR-153: fix grub2 password setting does not take effect
From: @openeuler-sync-bot Reviewed-by: @anonymous_z Signed-off-by: @anonymous_z
This commit is contained in:
commit
4c8be0e7b4
@ -1,42 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Mon, 5 Jul 2021 18:24:22 +0200
|
||||
Subject: [PATCH] grub-set-password: Always use /boot/grub2/user.cfg as
|
||||
password default
|
||||
|
||||
The GRUB configuration file is always placed in /boot/grub2/ now, even for
|
||||
EFI. But the tool is still creating the user.cfg in the ESP and not there.
|
||||
|
||||
Resolves: rhbz#1955294
|
||||
|
||||
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
---
|
||||
util/grub-set-password.in | 9 +--------
|
||||
1 file changed, 1 insertion(+), 8 deletions(-)
|
||||
|
||||
diff --git a/util/grub-set-password.in b/util/grub-set-password.in
|
||||
index c0b5ebbfdc5..d8005e5a142 100644
|
||||
--- a/util/grub-set-password.in
|
||||
+++ b/util/grub-set-password.in
|
||||
@@ -1,11 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
-EFIDIR=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/' -e 's/\"//g')
|
||||
-if [ -d /sys/firmware/efi/efivars/ ]; then
|
||||
- grubdir=`echo "/@bootdirname@/efi/EFI/${EFIDIR}/" | sed 's,//*,/,g'`
|
||||
-else
|
||||
- grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
|
||||
-fi
|
||||
+grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
|
||||
|
||||
PACKAGE_VERSION="@PACKAGE_VERSION@"
|
||||
PACKAGE_NAME="@PACKAGE_NAME@"
|
||||
@@ -116,8 +111,6 @@ if [ -z "${MYPASS}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-# on the ESP, these will fail to set the permissions, but it's okay because
|
||||
-# the directory is protected.
|
||||
install -m 0600 /dev/null "${OUTPUT_PATH}/user.cfg" 2>/dev/null || :
|
||||
chmod 0600 "${OUTPUT_PATH}/user.cfg" 2>/dev/null || :
|
||||
echo "GRUB2_PASSWORD=${MYPASS}" > "${OUTPUT_PATH}/user.cfg"
|
||||
@ -188,7 +188,6 @@ Patch0187: 0187-efinet-Add-DHCP-proxy-support.patch
|
||||
Patch0188: 0188-fs-ext2-Ignore-checksum-seed-incompat-feature.patch
|
||||
Patch0189: 0189-Don-t-update-the-cmdline-when-generating-legacy-menu.patch
|
||||
Patch0190: 0190-Suppress-gettext-error-message.patch
|
||||
Patch0191: 0191-grub-set-password-Always-use-boot-grub2-user.cfg-as-.patch
|
||||
Patch0192: 0192-templates-Check-for-EFI-at-runtime-instead-of-config.patch
|
||||
Patch0193: 0193-efi-Print-an-error-if-boot-to-firmware-setup-is-not-.patch
|
||||
Patch0194: 0194-arm64-Fix-EFI-loader-kernel-image-allocation.patch
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
Name: grub2
|
||||
Epoch: 1
|
||||
Version: 2.06
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/grub/
|
||||
@ -432,6 +432,12 @@ fi
|
||||
%{_datadir}/man/man*
|
||||
|
||||
%changelog
|
||||
* Thu Apr 14 2022 zhangqiumiao <zhangqiumiao1@huawei.com> - 2.06-5
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:fix grub2 password setting does not take effect
|
||||
|
||||
* Fri Mar 25 2022 zhangqiumiao <zhangqiumiao1@huawei.com> - 2.06-4
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user