From f27180723270a6b25eb35eba03fc1ad151e4ceee Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 21 2020 18:37:12 +0000 Subject: import libcap-ng-0.7.9-5.el8 --- diff --git a/SOURCES/libcap-ng-0.7.9-fixatfork.patch b/SOURCES/libcap-ng-0.7.9-fixatfork.patch new file mode 100644 index 0000000..fc21e04 --- /dev/null +++ b/SOURCES/libcap-ng-0.7.9-fixatfork.patch @@ -0,0 +1,28 @@ +--- libcap-ng-0.7.9/src/cap-ng.c.noatfork ++++ libcap-ng-0.7.9/src/cap-ng.c +@@ -153,15 +153,6 @@ + CAPNG_NEW, + {0, 0} }; + +- +-/* +- * The pthread_atfork function is being made weak so that we can use it +- * if the program is linked with pthreads and not requiring it for +- * everything that uses libcap-ng. +- */ +-extern int __attribute__((weak)) pthread_atfork(void (*prepare)(void), +- void (*parent)(void), void (*child)(void)); +- + /* + * Reset the state so that init gets called to erase everything + */ +@@ -173,8 +164,7 @@ + static void init_lib(void) __attribute__ ((constructor)); + static void init_lib(void) + { +- if (pthread_atfork) +- pthread_atfork(NULL, NULL, deinit); ++ pthread_atfork(NULL, NULL, deinit); + } + + static void init(void) diff --git a/SPECS/libcap-ng.spec b/SPECS/libcap-ng.spec index 6d93453..858c185 100644 --- a/SPECS/libcap-ng.spec +++ b/SPECS/libcap-ng.spec @@ -3,14 +3,15 @@ Summary: An alternate posix capabilities library Name: libcap-ng Version: 0.7.9 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2+ URL: http://people.redhat.com/sgrubb/libcap-ng Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz Patch1: libcap-ng-0.8-permitted.patch Patch2: libcap-ng-filecap-enodata.patch +Patch3: libcap-ng-0.7.9-fixatfork.patch BuildRequires: gcc -BuildRequires: kernel-headers >= 2.6.11 +BuildRequires: kernel-headers >= 2.6.11 BuildRequires: libattr-devel %description @@ -49,8 +50,9 @@ lets you set the file system based capabilities. %prep %setup -q -%patch1 -p1 -%patch2 -p1 +%patch1 -p1 -b .permitted +%patch2 -p1 -b .filecap-enodata +%patch3 -p1 -b .fixatfork %build %configure --libdir=/%{_lib} --with-python=no --with-python3 @@ -103,6 +105,9 @@ make check %attr(0644,root,root) %{_mandir}/man8/* %changelog +* Tue Nov 05 2019 Marek Tamaskovic 0.7.9-5 +resolves: rhbz#1740775 - segfault after dlclose + * Tue Jan 08 2019 Steve Grubb 0.7.9-4 resolves: rhbz#1599364 - filecap fails of files with no capabilities