VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build
Signed-off-by: yunjia_w <yunjia.wang@huawei.com>
This commit is contained in:
parent
d2c803dd69
commit
aa8b773aee
38
backport-libcap-Ensure-the-XATTR_NAME_CAPS-is-define.patch
Normal file
38
backport-libcap-Ensure-the-XATTR_NAME_CAPS-is-define.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 41997af6891658ab511c014e20f7846945c11742 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Roy Li <rongqing.li@windriver.com>
|
||||||
|
Date: Mon, 9 Aug 2021 17:32:20 +0800
|
||||||
|
Subject: [PATCH] [Backport] libcap: Ensure the XATTR_NAME_CAPS is defined when
|
||||||
|
it is used
|
||||||
|
|
||||||
|
VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build
|
||||||
|
libcap-native in old release, like CentOS release 6.7 (Final), with the blow
|
||||||
|
error:
|
||||||
|
cap_file.c: In function ‘cap_get_fd’:
|
||||||
|
cap_file.c:199: error: ‘XATTR_NAME_CAPS’ undeclared (first use in this function)
|
||||||
|
cap_file.c:199: error: (Each undeclared identifier is reported only once
|
||||||
|
Reference: http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch
|
||||||
|
|
||||||
|
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
||||||
|
Signed-off-by: lichi <lichi7@huawei.com>
|
||||||
|
Signed-off-by: luchangkun <luchangkun@h-partners.com>
|
||||||
|
Signed-off-by: huangyaojun <huangyaojun@huawei.com>
|
||||||
|
---
|
||||||
|
libcap/cap_file.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libcap/cap_file.c b/libcap/cap_file.c
|
||||||
|
index 4178705..1e6a28e 100644
|
||||||
|
--- a/libcap/cap_file.c
|
||||||
|
+++ b/libcap/cap_file.c
|
||||||
|
@@ -45,7 +45,7 @@ extern int fremovexattr(int, const char *);
|
||||||
|
|
||||||
|
#include "libcap.h"
|
||||||
|
|
||||||
|
-#ifdef VFS_CAP_U32
|
||||||
|
+#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS)
|
||||||
|
|
||||||
|
#if VFS_CAP_U32 != __CAP_BLKS
|
||||||
|
# error VFS representation of capabilities is not the same size as kernel
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: libcap
|
Name: libcap
|
||||||
Version: 2.61
|
Version: 2.61
|
||||||
Release: 5
|
Release: 6
|
||||||
Summary: A library for getting and setting POSIX.1e draft 15 capabilities
|
Summary: A library for getting and setting POSIX.1e draft 15 capabilities
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://sites.google.com/site/fullycapable
|
URL: https://sites.google.com/site/fullycapable
|
||||||
@ -14,6 +14,7 @@ Patch4: backport-getpcaps-catch-PID-parsing-errors.patch
|
|||||||
Patch5: backport-Correct-the-check-of-pthread_create-s-return-value.patch
|
Patch5: backport-Correct-the-check-of-pthread_create-s-return-value.patch
|
||||||
Patch6: backport-Large-strings-can-confuse-libcap-s-internal-strdup-c.patch
|
Patch6: backport-Large-strings-can-confuse-libcap-s-internal-strdup-c.patch
|
||||||
Patch7: backport-There-was-a-small-memory-leak-in-pam_cap.so-when-lib.patch
|
Patch7: backport-There-was-a-small-memory-leak-in-pam_cap.so-when-lib.patch
|
||||||
|
Patch8: backport-libcap-Ensure-the-XATTR_NAME_CAPS-is-define.patch
|
||||||
|
|
||||||
BuildRequires: libattr-devel pam-devel perl-interpreter gcc
|
BuildRequires: libattr-devel pam-devel perl-interpreter gcc
|
||||||
|
|
||||||
@ -77,6 +78,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.*
|
|||||||
%{_mandir}/man8/*.gz
|
%{_mandir}/man8/*.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 3 2023 wangyunjia <yunjia.wang@huawei.com> - 2.61-6
|
||||||
|
- VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build
|
||||||
|
|
||||||
* Mon May 29 2023 wangyunjia <yunjia.wang@huawei.com> - 2.61-5
|
* Mon May 29 2023 wangyunjia <yunjia.wang@huawei.com> - 2.61-5
|
||||||
- fix CVE-2023-2602/CVE-2023-2603 && fix memory leaks
|
- fix CVE-2023-2602/CVE-2023-2603 && fix memory leaks
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user