open.2: Clarify that openat()'s dirfd must be opened with O_RDONLY or O_PATH

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2021-08-12 02:47:23 +02:00
parent 56dddcbad5
commit a9db6c1ba3
1 changed files with 7 additions and 0 deletions

View File

@ -959,6 +959,13 @@ referred to by the file descriptor
the calling process, as is done by
.BR open ()
for a relative pathname).
In this case,
.I dirfd
must be a directory that was opened for reading
.RB ( O_RDONLY )
or using the
.B O_PATH
flag.
.\"
.SS openat2(2)
The