!32 [sync] PR-30: fix typo and duplicated kernel parameters
From: @openeuler-sync-bot Reviewed-by: @zhujianwei001 Signed-off-by: @zhujianwei001
This commit is contained in:
commit
fcb031dcc1
@ -1,6 +1,6 @@
|
||||
name: digest-list-tools
|
||||
Version: 0.3.95
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Utilities for IMA Digest Lists extension
|
||||
|
||||
Source0: https://gitee.com/openeuler/%{name}/repository/archive/v%{version}.tar.gz
|
||||
@ -10,6 +10,8 @@ Url: https://gitee.com/openeuler/digest-list-tools
|
||||
|
||||
Patch0: fix-multiple-definition-of-pgp_algo_mapping.patch
|
||||
Patch1: fix-digestlist-conf-warning.patch
|
||||
Patch2: fix-a-typo-in-kernel_lib.h.patch
|
||||
Patch3: fix-duplicated-kernel-parameters.patch
|
||||
|
||||
BuildRequires: autoconf automake libcurl-devel libtool rpm-devel dracut gzip
|
||||
BuildRequires: libcap-devel libcmocka-devel libselinux-devel
|
||||
@ -121,6 +123,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/%{name}.1.gz
|
||||
|
||||
%changelog
|
||||
* Thu Dec 2 2021 Anakin Zhang <zhangtianxing3@huawei.com> - 0.3.95-5
|
||||
- Fix typo and duplicated kernel parameters
|
||||
|
||||
* Tue Aug 24 2021 Anakin Zhang <zhangtianxing3@huawei.com> - 0.3.95-4
|
||||
- Fix warning in digestlist.conf
|
||||
|
||||
|
||||
32
fix-a-typo-in-kernel_lib.h.patch
Normal file
32
fix-a-typo-in-kernel_lib.h.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From c84cddd466530de828b3fa5a5dcb4ea7c1ffc816 Mon Sep 17 00:00:00 2001
|
||||
From: Zhang Tianxing <zhangtianxing3@huawei.com>
|
||||
Date: Tue, 20 Apr 2021 23:03:03 +0800
|
||||
Subject: [PATCH] fix a typo in kernel_lib.h
|
||||
|
||||
This patch fixes a typo in kernel_lib.h which causes build failure in
|
||||
i686 context.
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://gitee.com/openeuler/digest-list-tools/commit/0c2657d2b1b10b9d7f8367a9b4364e62d863b287
|
||||
|
||||
Signed-off-by: Zhang Tianxing <zhangtianxing3@huawei.com>
|
||||
---
|
||||
include/kernel_lib.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/kernel_lib.h b/include/kernel_lib.h
|
||||
index 1ee2814..5bdc74b 100644
|
||||
--- a/include/kernel_lib.h
|
||||
+++ b/include/kernel_lib.h
|
||||
@@ -140,7 +140,7 @@ extern const char *const hash_algo_name[HASH_ALGO__LAST];
|
||||
extern const int hash_digest_size[HASH_ALGO__LAST];
|
||||
|
||||
/* hash */
|
||||
-#if __BITB_PER_LONG == 32
|
||||
+#if __BITS_PER_LONG == 32
|
||||
#define GOLDEN_RATIO_PRIME GOLDEN_RATIO_32
|
||||
#define hash_long(val, bits) hash_32(val, bits)
|
||||
#elif __BITS_PER_LONG == 64
|
||||
--
|
||||
2.23.0
|
||||
|
||||
52
fix-duplicated-kernel-parameters.patch
Normal file
52
fix-duplicated-kernel-parameters.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From a40d8506ac5bdbb9e3abaadf7768e9f98fcda99c Mon Sep 17 00:00:00 2001
|
||||
From: Zhang Tianxing <zhangtianxing3@huawei.com>
|
||||
Date: Sat, 8 May 2021 10:09:35 +0800
|
||||
Subject: [PATCH] fix duplicated kernel parameters
|
||||
|
||||
In script setup_grub2, when set "measurement+appraisal", there are some
|
||||
duplicated common kernel parameters. This patch fixes the issue by using
|
||||
a common variable.
|
||||
|
||||
Conflict:NA
|
||||
Reference:
|
||||
|
||||
Signed-off-by: Zhang Tianxing <zhangtianxing3@huawei.com>
|
||||
---
|
||||
scripts/setup_grub2 | 17 ++++++++---------
|
||||
1 file changed, 8 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/scripts/setup_grub2 b/scripts/setup_grub2
|
||||
index e785ef2..2ed628b 100755
|
||||
--- a/scripts/setup_grub2
|
||||
+++ b/scripts/setup_grub2
|
||||
@@ -31,20 +31,19 @@ fi
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
-opts_measurement='ima_template=ima-sig ima_policy=\\\"exec_tcb\\\" initramtmpfs
|
||||
- ima_hash=sha256 ima_digest_list_pcr=11'
|
||||
-opts_appraisal='ima_template=ima-sig
|
||||
- ima_policy=\\\"appraise_exec_tcb|appraise_exec_immutable\\\" initramtmpfs
|
||||
- ima_hash=sha256 ima_appraise=enforce-evm evm=x509 evm=complete
|
||||
- ima_appraise_digest_list=digest'
|
||||
+opts_common='ima_template=ima-sig initramtmpfs ima_hash=sha256 integrity=1'
|
||||
+opts_measurement='ima_policy=\\\"exec_tcb\\\" ima_digest_list_pcr=11'
|
||||
+opts_appraisal='ima_policy=\\\"appraise_exec_tcb|appraise_exec_immutable\\\"
|
||||
+ ima_appraise=enforce-evm ima_appraise_digest_list=digest evm=x509
|
||||
+ evm=complete'
|
||||
opts=""
|
||||
|
||||
if [ "$1" = "measurement" ]; then
|
||||
- opts="$opts_measurement"
|
||||
+ opts="$opts_common $opts_measurement"
|
||||
elif [ "$1" = "appraisal" ]; then
|
||||
- opts="$opts_appraisal"
|
||||
+ opts="$opts_common $opts_appraisal"
|
||||
elif [ "$1" = "measurement+appraisal" ]; then
|
||||
- opts="$opts_measurement $opts_appraisal"
|
||||
+ opts="$opts_common $opts_measurement $opts_appraisal"
|
||||
else
|
||||
echo "Unknown feature $1"
|
||||
exit 1
|
||||
--
|
||||
2.23.0
|
||||
Loading…
x
Reference in New Issue
Block a user