Skip to content

Commit fe8da3c

Browse files
committed
techdebt: drop _LINUX_CAPABILITY_VERSION_2 support
In starter we are currently allowing _LINUX_CAPABILITY_VERSION_2, but this was specific to kernel 2.6.25, and deprecated in 2.6.26, which is older than used by any system we target / test on. See also: https://github.com/torvalds/linux/blob/v2.6.26/include/linux/capability.h#L34 https://man7.org/linux/man-pages/man2/capset.2.html Kernels prior to 2.6.25 prefer 32-bit capabilities with version _LINUX_CAPABILITY_VERSION_1. Linux 2.6.25 added 64-bit capability sets, with version _LINUX_CAPABILITY_VERSION_2. There was, however, an API glitch, and Linux 2.6.26 added _LINUX_CAPABILITY_VERSION_3 to fix the problem.
1 parent 8c919c9 commit fe8da3c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cmd/starter/c/include/capability.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@
1919
/* 37 is the latest cap since many kernel versions */
2020
#define CAPSET_MAX 37
2121

22-
/* Support only 64 bits sets, since kernel 2.6.25 */
22+
/* Support only 64 bits sets, since kernel 2.6.26 */
2323
#ifdef _LINUX_CAPABILITY_VERSION_3
2424
# define LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3
25-
#elif defined(_LINUX_CAPABILITY_VERSION_2)
26-
# define LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_2
2725
#else
2826
# error Linux 64 bits capability set not supported
2927
#endif /* _LINUX_CAPABILITY_VERSION_3 */

0 commit comments

Comments
 (0)