termux-packages/packages/libcap-ng
agnostic-apollo 8c2bd90b19 Changed: Bump libcap-ng to 0.8.3~pre1
Added `setpriv` in `util-linux` which requires `libcap-ng` to be updated as well for it work.

Android 7 and some Android devices 8 do not support ambient capabilities and will return `activate capabilities: Invalid argument` when running `setpriv`.

strace shows `"prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_CHOWN, 0, 0) = -1 EINVAL (Invalid argument)"`

This was an issue with `libcap-ng` where support for `PR_CAP_AMBIENT` was checked at compile time, so `setpriv` only worked on Android > `7`/`8` when `capng_apply()` was called.

`4.3    kernel   PR_CAP_AMBIENT`

https://github.com/util-linux/util-linux/blob/v2.37.1/sys-utils/setpriv.c#L1010
https://github.com/stevegrubb/libcap-ng/blob/v0.8.2/src/cap-ng.c#L59
https://github.com/stevegrubb/libcap-ng/blob/v0.8.2/src/cap-ng.c#L716
https://source.android.com/devices/architecture/kernel/android-common

This has been fixed in `libcap-ng` by checking `PR_CAP_AMBIENT` at runtime with `187ed535`. `libcap-ng` `0.8.3` has not been released yet and so we use a pre release version `0.8.3~pre1`.

https://github.com/stevegrubb/libcap-ng/issues/28
https://github.com/stevegrubb/libcap-ng/commit/187ed535
2021-12-11 21:32:49 +05:00
..
build.sh Changed: Bump libcap-ng to 0.8.3~pre1 2021-12-11 21:32:49 +05:00