From cf81f364e898fe060dd914c255244dc5857be294 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 16 May 2014 11:09:45 +0200 Subject: [PATCH] access.2: Glibc falls back to using access() on kernels that lack faccessat() Signed-off-by: Michael Kerrisk --- man2/access.2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/man2/access.2 b/man2/access.2 index 5938fc9ad..fe0ce5b9a 100644 --- a/man2/access.2 +++ b/man2/access.2 @@ -336,6 +336,24 @@ flags are actually implemented within the glibc wrapper function for If either of these flags is specified, then the wrapper function employs .BR fstatat (2) to determine access permissions. +.SS Glibc notes +On older kernels where +.BR faccessat () +is unavailable (and when the +.B AT_EACCESS +and +.B AT_SYMLINK_NOFOLLOW +flags are not specified), +the glibc wrapper function falls back to the use of +.BR access (). +When +.I pathname +is a relative pathname, +glibc constructs a pathname based on the symbolic link in +.IR /proc/self/fd +that corresponds to the +.IR dirfd +argument. .SH BUGS In kernel 2.4 (and earlier) there is some strangeness in the handling of .B X_OK