From 3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 7 Aug 2020 22:06:59 +0200 Subject: Linux: Use faccessat2 to implement faccessat (bug 18683) This provides correct AT_EACCESS handling and also takes Linux security modules into account. Reviewed-by: Adhemerval Zanella --- sysdeps/unix/sysv/linux/kernel-features.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sysdeps/unix/sysv/linux/kernel-features.h') diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 32533e94cf..a6bbc3c94e 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -214,4 +214,12 @@ # define __ASSUME_WAITID_PID0_P_PGID #endif +/* The faccessat2 system call was introduced across all architectures + in Linux 5.8. */ +#if __LINUX_KERNEL_VERSION >= 0x050800 +# define __ASSUME_FACCESSAT2 1 +#else +# define __ASSUME_FACCESSAT2 0 +#endif + #endif /* kernel-features.h */ -- cgit v1.2.3-70-g09d2