aboutsummaryrefslogblamecommitdiffstats
path: root/main/libcap-ng/apply-disable.patch
blob: a476c1ae5b16c6172e266715d98fa6b4f4b7c49e (plain) (tree)




























                                                                                
Upstream: Fedora patch
Reason: Remove error codes that nobody handles and crashes everything

diff -urp libcap-ng-0.8.2.orig/src/cap-ng.c libcap-ng-0.8.2/src/cap-ng.c
--- libcap-ng-0.8.2.orig/src/cap-ng.c	2020-11-20 15:04:09.000000000 -0500
+++ libcap-ng-0.8.2/src/cap-ng.c	2020-11-20 16:04:55.425496426 -0500
@@ -698,19 +698,19 @@ 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;
 					goto try_caps;
 				    }
 				}
 			}
 			m.state = CAPNG_APPLIED;
 			if (get_bounding_set() < 0) {
-				rc = -3;
+//				rc = -3;
 				goto try_caps;
 			}
 		} else {
 			memcpy(&m, &state, sizeof(m)); /* restore state */
-			rc = -4;
+//			rc = -4;
 			goto try_caps;
 		}
 #endif