fix cap_struct to adapter libcap 2.61
This commit is contained in:
parent
a98e857496
commit
1433a45cda
@ -1,6 +1,6 @@
|
||||
name: digest-list-tools
|
||||
Version: 0.3.95
|
||||
Release: 10
|
||||
Release: 11
|
||||
Summary: Utilities for IMA Digest Lists extension
|
||||
|
||||
Source0: https://gitee.com/openeuler/%{name}/repository/archive/v%{version}.tar.gz
|
||||
@ -16,9 +16,11 @@ Patch4: Fix-sm3-algorithm-name.patch
|
||||
Patch5: fix-faulty-code.patch
|
||||
Patch6: fix-file-resource-leakage-and-memory-leakage.patch
|
||||
Patch7: fix-error-exit-in-dracut-program.patch
|
||||
Patch8: fix-cap_struct-to-adapter-libcap-2.61.patch
|
||||
|
||||
Requires: libcap = 2.61
|
||||
BuildRequires: autoconf automake libcurl-devel libtool rpm-devel dracut gzip
|
||||
BuildRequires: libcap-devel libcmocka-devel libselinux-devel
|
||||
BuildRequires: libcap-devel = 2.61 libcmocka-devel libselinux-devel
|
||||
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: libopenssl-devel glibc-devel-static
|
||||
@ -127,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/%{name}.1.gz
|
||||
|
||||
%changelog
|
||||
* Wed May 24 2023 zhoushuiqing <zhoushuiqing2@huawei.com> - 0.3.95-11
|
||||
- Fix cap_struct to adapter libcap 2.61
|
||||
|
||||
* Tue Dec 20 2022 gaoyusong <gaoyusong2@huawei.com> - 0.3.95-10
|
||||
- Fix error exit in dracut program
|
||||
|
||||
|
||||
37
fix-cap_struct-to-adapter-libcap-2.61.patch
Normal file
37
fix-cap_struct-to-adapter-libcap-2.61.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From e063ba3535c35a6fb5f66c00d733b9bd7dffa8ff Mon Sep 17 00:00:00 2001
|
||||
From: luhuaxin <luhuaxin1@huawei.com>
|
||||
Date: Sun, 13 Mar 2022 12:03:34 +0800
|
||||
Subject: [PATCH] fix cap_struct to adapter libcap 2.61
|
||||
|
||||
Signed-off-by: luhuaxin <luhuaxin1@huawei.com>
|
||||
---
|
||||
lib/cap.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/cap.c b/lib/cap.c
|
||||
index f7a91fe..c21d025 100644
|
||||
--- a/lib/cap.c
|
||||
+++ b/lib/cap.c
|
||||
@@ -28,15 +28,17 @@
|
||||
#endif
|
||||
|
||||
#define NUMBER_OF_CAP_SETS 3 /* effective, inheritable, permitted */
|
||||
-#define __CAP_BLKS (_LINUX_CAPABILITY_U32S)
|
||||
+#define __CAP_BLKS (_LINUX_CAPABILITY_U32S_3)
|
||||
#define CAP_SET_SIZE (__CAP_BLKS * sizeof(__u32))
|
||||
|
||||
struct _cap_struct {
|
||||
+ __u8 mutex;
|
||||
struct __user_cap_header_struct head;
|
||||
union {
|
||||
struct __user_cap_data_struct set;
|
||||
__u32 flat[NUMBER_OF_CAP_SETS];
|
||||
- } u[_LINUX_CAPABILITY_U32S];
|
||||
+ } u[_LINUX_CAPABILITY_U32S_3];
|
||||
+ uid_t rootid;
|
||||
};
|
||||
|
||||
cap_t _fcaps_load(struct vfs_cap_data *rawvfscap, cap_t result, int bytes)
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user