The fanotify_mark(2) manual page claims that AT_FDCWD works with a NULL
path, but there is no kernel code for that: in fanotify_find_path(), in
the `if (filename == NULL)` block, the fd is only used for a normal FD
lookup.
This was also already the case when this manpage was written back in
2014, so remove the bogus documentation.
Fixes: c200b422dfdb (2014-04-25; "fanotify_mark.2: New page documenting fanotify_mark(2)")
Signed-off-by: Jann Horn <jannh@google.com>
Message-ID: <
20260529-fan-mark-cwd-v1-1-
cdfb3b5b6d7c@google.com>
Acked-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <CAOQ4uxiHU5xK=_FsOBkkB0go9ACBb2fYcdVE6T2o=MYDcxaiaQ@mail.gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
.IP \[bu]
If
.I path
-is NULL, and
-.I dirfd
-takes the special value
-.BR AT_FDCWD ,
-the current working directory is to be marked.
-.IP \[bu]
-If
-.I path
is absolute, it defines the filesystem object to be marked, and
.I dirfd
is ignored.