From f66bebd6e20004ca7c6114a9f21ddcf13c33437a Mon Sep 17 00:00:00 2001 From: zhangruifang2020 Date: Tue, 11 Jun 2024 15:30:24 +0800 Subject: [PATCH] security-tool add grub2 password for legacy --- ...y-tool-add-grub2-password-for-legacy.patch | 25 +++++++++++++++++++ security-tool.spec | 6 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 security-tool-add-grub2-password-for-legacy.patch diff --git a/security-tool-add-grub2-password-for-legacy.patch b/security-tool-add-grub2-password-for-legacy.patch new file mode 100644 index 0000000..0fac7ae --- /dev/null +++ b/security-tool-add-grub2-password-for-legacy.patch @@ -0,0 +1,25 @@ +From 28be480fbcfe18f008948642493cbba612c8c685 Mon Sep 17 00:00:00 2001 +From: yueyuankun +Date: Fri, 9 Jun 2023 17:17:17 +0800 +Subject: [PATCH] add grub2 password for legacy + +--- + security-tool.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/security-tool.sh b/security-tool.sh +index 0877081..5939f44 100644 +--- a/security-tool.sh ++++ b/security-tool.sh +@@ -948,6 +948,8 @@ function fn_harden_grub2() + echo -e "cat <> /etc/grub.d/00_header + if [ -d /boot/efi/EFI/openEuler -a -d /sys/firmware/efi ]; then + grub2-mkconfig -o /boot/efi/EFI/openEuler/grub.cfg ++ else ++ grub2-mkconfig -o /boot/grub2/grub.cfg + fi + } + # Function Name: fn_harden_sysctl +-- +2.33.0 + diff --git a/security-tool.spec b/security-tool.spec index f8dbd26..7e5356c 100644 --- a/security-tool.spec +++ b/security-tool.spec @@ -1,7 +1,7 @@ Summary: openEuler Security Tool Name : security-tool Version: 2.0 -Release: 1.76 +Release: 1.77 Source0: https://gitee.com/openeuler/security-tool/repository/archive/v2.0.tar.gz License: Mulan PSL v2 URL: https://gitee.com/openeuler/security-tool @@ -15,6 +15,7 @@ BuildRequires: xauth Patch0: Use-secure-MACs-and-KexAlgorithms.patch Patch1: do-not-create-allow-file-while-the-command-does-not-.patch +Patch2: security-tool-add-grub2-password-for-legacy.patch %description openEuler Security Tool @@ -119,6 +120,9 @@ fi %attr(0500,root,root) %{_sbindir}/security-tool.sh %changelog +* Tue Jun 11 2024 zhangruifang - 2.0-1.77 +- security-tool add grub2 password for legacy + * Mon Aug 29 2022 liweiganga - 2.0-1.76 - fix sed keyword error in /etc/pam.d/crond -- Gitee