aboutsummaryrefslogtreecommitdiffstats
diff options
authorAleksa Sarai <cyphar@cyphar.com>2025-06-19 04:34:30 +1000
committerAlejandro Colomar <alx@kernel.org>2025-06-19 02:45:19 +0200
commit99c9623cee2a0fdfcadeb571cb9376b32d23f216 (patch)
treed39e1d044b03ded949cfe056b185639b2f50d847
parent86654b987c6f8fdf78902a0c57b2245c180781ba (diff)
downloadman-pages-99c9623cee2a0fdfcadeb571cb9376b32d23f216.tar.gz
man/man2/chmod.2: Document fchmodat(AT_EMPTY_PATH)
The documentation and behaviour is indentical to the equivalent flag for fchownat(2). Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> Message-ID: <20250619-fchmod-empty-path-v1-1-feff2c63abe4@cyphar.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--man/man2/chmod.225
1 files changed, 24 insertions, 1 deletions
diff --git a/man/man2/chmod.2 b/man/man2/chmod.2
index 3075894815..671e256ba5 100644
--- a/man/man2/chmod.2
+++ b/man/man2/chmod.2
@@ -190,7 +190,30 @@ is absolute, then
is ignored.
.P
.I flags
-can either be 0, or include the following flag:
+can either be 0, or include the following flags:
+.TP
+.BR AT_EMPTY_PATH " (since Linux 6.6)"
+.\" commit 5daeb41a6fc9d0d81cb2291884b7410e062d8fa1
+If
+.I path
+is an empty string, operate on the file referred to by
+.I dirfd
+(which may have been obtained using the
+.BR open (2)
+.B O_PATH
+flag).
+In this case,
+.I dirfd
+can refer to any type of file, not just a directory.
+If
+.I dirfd
+is
+.BR AT_FDCWD ,
+the call operates on the current working directory.
+This flag is Linux-specific; define
+.B _GNU_SOURCE
+.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed
+to obtain its definition.
.TP
.B AT_SYMLINK_NOFOLLOW
If