[PATCH 1/5] manual: Document faccessat
Arjun Shankar
arjun@redhat.com
Wed Dec 18 17:51:44 GMT 2024
---
manual/filesys.texi | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/manual/filesys.texi b/manual/filesys.texi
index aabb68385b..9d198cc10c 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -318,6 +318,11 @@ from the descriptor and file name arguments, using file name lookup, as
described above.
@vtable @code
+@item AT_EACCESS
+This flag when passed to the @code{faccessat} function causes it to perform
+access checks using effective user and group IDs instead of using real IDs,
+which is the default.
+
@item AT_EMPTY_PATH
This flag is used with an empty file name @code{""} and a descriptor
which does not necessarily refer to a directory. It is most useful with
@@ -2980,6 +2985,31 @@ Flag meaning test for execute/search permission.
Flag meaning test for existence of the file.
@end deftypevr
+@deftypefun int faccessat (int @var{filedes}, const char *@var{filename}, int @var{how}, int @var{flags})
+@standards{POSIX.1-2008, unistd.h}
+@comment Unaudited and therefore marked AC-Unsafe and AS-Unsafe by default
+@safety{@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{}}}
+This function is a descriptor-relative version of the @code{access}
+function above. @xref{Descriptor-Relative Access}. The @var{flags}
+argument can contain a combination of the flags @code{AT_EACCESS},
+@code{AT_EMPTY_PATH}, and @code{AT_SYMLINK_NOFOLLOW}.
+
+Compared to @code{access}, the following additional error conditions can
+occur:
+
+@table @code
+@item EBADF
+The @var{filedes} argument is not a valid file descriptor.
+
+@item EINVAL
+The @var{flags} argument is not valid for this function.
+
+@item ENOTDIR
+The descriptor @var{filedes} is not associated with a directory, and
+@var{filename} is a relative file name.
+@end table
+@end deftypefun
+
@node File Times
@subsection File Times
@@ -3760,7 +3790,6 @@ creation always works like @code{open} with @code{O_EXCL}.
The @code{mkdtemp} function comes from OpenBSD.
@c FIXME these are undocumented:
-@c faccessat
@c fchmodat
@c fchownat
@c futimesat
--
2.47.1
More information about the Libc-alpha
mailing list