12 ms·
here is the present source code for glibc where faccessat2 is used. What you say is true for some cases; if glibc is built for kernel versions below 0x050800 th
by MichaelMoser123 5y ago
here is the present source code for glibc where faccessat2 is used. What you say is true for some cases; if glibc is built for kernel versions below 0x050800 then it doesn't assume faccessat2, here it falls back to faccessat for some cases - and faccessat was added in 2.6.16.
But if you have flags other than AT_SYMLINK_NOFOLLOW or AT_EACCESS the call just fails without doing the fallback. See https://github.com/bminor/glibc/blob/595c22ecd8e87a27fd19270ed30fdbae9ad25426/sysdeps/unix/sysv/linux/faccessat.c#L36 https://github.com/bminor/glibc/blob/595c22ecd8e87a27fd19270...
TIL that this this glibc mirror is kept in sync with the real one https://github.com/bminor/glibc https://github.com/bminor/glibc