8c2bd90b19
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
18 lines
705 B
Bash
18 lines
705 B
Bash
TERMUX_PKG_HOMEPAGE=https://people.redhat.com/sgrubb/libcap-ng/
|
|
TERMUX_PKG_DESCRIPTION="Library making programming with POSIX capabilities easier than traditional libcap"
|
|
TERMUX_PKG_LICENSE="LGPL-2.1"
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
|
TERMUX_PKG_VERSION=0.8.3~pre1
|
|
TERMUX_PKG_SRCURL="https://github.com/stevegrubb/libcap-ng/archive/187ed5355ce23333331187312c54d38390f3d6b6.tar.gz"
|
|
#TERMUX_PKG_SRCURL=https://github.com/stevegrubb/libcap-ng/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
|
TERMUX_PKG_SHA256=108e6be17b4c9b8c6249e5f12041fce4078de91515a00e93af400bfb40cfd538
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|
--without-python
|
|
--without-python3
|
|
"
|
|
|
|
termux_step_pre_configure() {
|
|
./autogen.sh
|
|
}
|