From 68e5ee57889a27d09ed09179a9af2a69e17feed2 Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Tue, 29 Mar 2022 16:32:55 -0400 Subject: [PATCH] New upstream bugfix release --- .gitignore | 1 + libcap-ng-0.8.2-apply-disable.patch | 66 ----------------------------- libcap-ng.spec | 9 ++-- sources | 2 +- 4 files changed, 8 insertions(+), 70 deletions(-) delete mode 100644 libcap-ng-0.8.2-apply-disable.patch diff --git a/.gitignore b/.gitignore index 01da846..c44d7f2 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ libcap-ng-0.6.4.tar.gz /libcap-ng-0.8.tar.gz /libcap-ng-0.8.1.tar.gz /libcap-ng-0.8.2.tar.gz +/libcap-ng-0.8.3.tar.gz diff --git a/libcap-ng-0.8.2-apply-disable.patch b/libcap-ng-0.8.2-apply-disable.patch deleted file mode 100644 index a6620b6..0000000 --- a/libcap-ng-0.8.2-apply-disable.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -urp libcap-ng-0.8.3.orig/src/cap-ng.c libcap-ng-0.8.3/src/cap-ng.c ---- libcap-ng-0.8.3.orig/src/cap-ng.c 2021-01-30 09:26:33.000000000 -0500 -+++ libcap-ng-0.8.3/src/cap-ng.c 2021-01-30 09:52:43.507967643 -0500 -@@ -713,6 +713,36 @@ int capng_updatev(capng_act_t action, ca - return rc; - } - -+#include -+static char *get_exename(char *exename, int size) -+{ -+ char tmp[PATH_MAX+1]; -+ int res; -+ -+ /* get the name of the current executable */ -+ if ((res = readlink("/proc/self/exe", tmp, PATH_MAX)) < 0) -+ strcpy(exename, "\"?\""); -+ else { -+ tmp[res] = '\0'; -+ snprintf(exename, size, "\"%s\"", tmp); -+ } -+ return exename; -+} -+ -+#include -+static void log_problem(unsigned int msg) -+{ -+ static const char *text[3] = { -+ "dropping bounding set", -+ "getting new bounding set", -+ "dropping bounding set due to not having CAP_SETPCAP" -+ }; -+ unsigned idx = msg - 2; -+ char exe[2048]; -+ syslog(LOG_ERR, "libcap-ng used by %s failed %s in capng_apply", -+ get_exename(exe, 2047), text[idx]); -+} -+ - int capng_apply(capng_select_t set) - { - int rc = 0; -@@ -733,19 +763,22 @@ int capng_apply(capng_select_t set) - if (capng_have_capability(CAPNG_BOUNDING_SET, - i) == 0) { - if (prctl(PR_CAPBSET_DROP, i, 0, 0, 0) <0) { -- rc = -2; -+// rc = -2; -+ log_problem(2); - goto try_caps; - } - } - } - m.state = CAPNG_APPLIED; - if (get_bounding_set() < 0) { -- rc = -3; -+// rc = -3; -+ log_problem(3); - goto try_caps; - } - } else { - memcpy(&m, &state, sizeof(m)); /* restore state */ -- rc = -4; -+// rc = -4; -+ log_problem(4); - goto try_caps; - } - #endif diff --git a/libcap-ng.spec b/libcap-ng.spec index f258fd1..140367e 100644 --- a/libcap-ng.spec +++ b/libcap-ng.spec @@ -1,12 +1,12 @@ Summary: Alternate posix capabilities library Name: libcap-ng -Version: 0.8.2 -Release: 9%{?dist} +Version: 0.8.3 +Release: 1%{?dist} License: LGPLv2+ URL: https://people.redhat.com/sgrubb/libcap-ng/ Source0: https://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz # This patch can be removed when 1899540 is resolved -Patch1: libcap-ng-0.8.2-apply-disable.patch +Patch1: libcap-ng-0.8.3-apply-disable.patch BuildRequires: gcc BuildRequires: make BuildRequires: kernel-headers >= 2.6.11 @@ -95,6 +95,9 @@ make check %attr(0644,root,root) %{_mandir}/man8/* %changelog +* Tue Mar 29 2022 Steve Grubb 0.8.3-1 +- New upstream bugfix release + * Thu Jan 20 2022 Fedora Release Engineering - 0.8.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index da5c102..dccc591 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libcap-ng-0.8.2.tar.gz) = 0ac6e55c03b1fba3a849048b721e250951afb59190d9646704d4fd9938eccc3bd0767380fbddc42f186b4f55695475e31f34f537ae91c04a37662577a5b7a19b +SHA512 (libcap-ng-0.8.3.tar.gz) = 0ef9bc7bc6b7b59991f43b79aa6cde3e8d2c22c4b9ced2af8deae501e01d51e893033d109cb8aa0fdcba190140110993089245346334d7b114d18f1bb1b55b97