Closed r1olo closed 2 years ago
Ah yes, my bad, I should have provided more info. This is to make proot work on normal Linux systems that implement the new faccessat2
. I sent the pull request here and not to the original proot repo because Termux's fork doesn't crash and also supports statx
system call (without that ls
and other commands just don't work).
Ok, thanks, merged.
Out of curiosity, is faccessat2
needed for any particular program?
Yes, for example bash
uses it to test whether a file is readable or writable ([[ -r $file]]
and [[ -w $file ]]
), so any script that relied on that was broken. pacman
also uses it to check whether its database exists in the system.
So I've re-checked and it looks like faccessat2
usage was introduced in glibc-2.33, with fallback to faccessat
+fstatat64
. That version wasn't yet released for Arch Linux ARM (aarch64), while Arch Linux (x86_64) ships glibc with fallback enabled (no __ASSUME_FACCESSAT2
), so for Android current default proot fallback implementation return -ENOSYS;
should be sufficient.
Anyway, thanks again, I didn't know about faccessat2
before
Overall looks nice, although it seems
faccessat2
won't be available on Android as it is not on list of syscalls allowed by Androids seccomp policy and probably won't beWhat was this tested with and what program needs
faccessat2
to function? Was this on Android? (or this change is just for running proot on normal Linux)? Iffaccessat2
is required for program operation then on Android it would be necessary to add SIGSYS handler for it.