The CAP_INIT macros of INH, BSET, and EFF made sense at one point in time, but now days they aren't helping. Just open code the logic in the init_cred.
Showing the changes to include/linux/capability.h (1 of 3 files). Show all
Unified · Split
| @@ -421,9 +421,6 @@ extern const kernel_cap_t __cap_init_eff_set; · 420 unmodified lines | |||
| 421 | 421 | ||
| 422 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ | 422 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
| 423 | 423 | ||
| 424 | #define CAP_INIT_INH_SET CAP_EMPTY_SET | ||
| 425 | #define CAP_INIT_EFF_SET CAP_FULL_SET | ||
| 426 | |||
| 427 | # define cap_clear(c) do { (c) = __cap_empty_set; } while (0) | 424 | # define cap_clear(c) do { (c) = __cap_empty_set; } while (0) |
| 428 | 425 | ||
| 429 | #define cap_raise(c, flag) ((c).cap[CAP_TO_INDEX(flag)] |= CAP_TO_MASK(flag)) | 426 | #define cap_raise(c, flag) ((c).cap[CAP_TO_INDEX(flag)] |= CAP_TO_MASK(flag)) |