The set of errors returned by openat2
() includes all of the
errors returned by openat(2), as well as the following additional
errors:
E2BIG
An extension that this kernel does not support was
specified in how. (See the "Extensibility" section of
NOTES
for more detail on how extensions are handled.)
EAGAIN
how.resolve contains either RESOLVE_IN_ROOT
or
RESOLVE_BENEATH
, and the kernel could not ensure that a
".." component didn't escape (due to a race condition or
potential attack). The caller may choose to retry the
openat2
() call.
EAGAIN RESOLVE_CACHED
was set, and the open operation cannot be
performed using only cached information. The caller
should retry without RESOLVE_CACHED
set in how.resolve .
EINVAL
An unknown flag or invalid value was specified in how.
EINVAL
mode is nonzero, but how.flags does not contain O_CREAT
or
O_TMPFILE
.
EINVAL
size was smaller than any known version of struct
open_how.
ELOOP
how.resolve contains RESOLVE_NO_SYMLINKS
, and one of the
path components was a symbolic link (or magic link).
ELOOP
how.resolve contains RESOLVE_NO_MAGICLINKS
, and one of the
path components was a magic link.
EXDEV
how.resolve contains either RESOLVE_IN_ROOT
or
RESOLVE_BENEATH
, and an escape from the root during path
resolution was detected.
EXDEV
how.resolve contains RESOLVE_NO_XDEV
, and a path component
crosses a mount point.