diff --git a/libcap-ng-0.8.3-apply-disable.patch b/libcap-ng-0.8.3-apply-disable.patch index a6620b6..57be49a 100644 --- a/libcap-ng-0.8.3-apply-disable.patch +++ b/libcap-ng-0.8.3-apply-disable.patch @@ -1,7 +1,7 @@ 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 +--- libcap-ng-0.8.3.orig/src/cap-ng.c 2021-09-28 12:14:41.000000000 -0400 ++++ libcap-ng-0.8.3/src/cap-ng.c 2021-09-28 12:23:23.551725018 -0400 +@@ -767,6 +767,41 @@ int capng_updatev(capng_act_t action, ca return rc; } @@ -29,16 +29,21 @@ diff -urp libcap-ng-0.8.3.orig/src/cap-ng.c libcap-ng-0.8.3/src/cap-ng.c + "getting new bounding set", + "dropping bounding set due to not having CAP_SETPCAP" + }; ++ static int warned[3] = {0, 0, 0}; + 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]); ++ if (warned[idx] == 0) { ++ // Only warn once ++ syslog(LOG_ERR, "libcap-ng used by %s failed %s in capng_apply", ++ get_exename(exe, 2047), text[idx]); ++ warned[idx] = 1; ++ } +} + int capng_apply(capng_select_t set) { int rc = 0; -@@ -733,19 +763,22 @@ int capng_apply(capng_select_t set) +@@ -788,19 +823,22 @@ if (HAVE_PR_CAPBSET_DROP) { if (capng_have_capability(CAPNG_BOUNDING_SET, i) == 0) { if (prctl(PR_CAPBSET_DROP, i, 0, 0, 0) <0) { @@ -63,4 +68,4 @@ diff -urp libcap-ng-0.8.3.orig/src/cap-ng.c libcap-ng-0.8.3/src/cap-ng.c + log_problem(4); goto try_caps; } - #endif + }