Skip to content

Commit 421025a

Browse files
committed
access.2: Mention that lstat(2) should be used for symbolic links
access(), eaccess() and faccessat() will always dereference symbolic links. So add a note in the manual page, that lstat(2) should be used in the case of symbolic links. PR: 262895 Reviewed by: gbe, pauamma_gundo.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44890
1 parent 9bfd3b4 commit 421025a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/libsys/access.2

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2626
.\" SUCH DAMAGE.
2727
.\"
28-
.Dd March 30, 2021
28+
.Dd May 13, 2024
2929
.Dt ACCESS 2
3030
.Os
3131
.Sh NAME
@@ -147,6 +147,15 @@ Likewise for
147147
.Dv R_OK
148148
and
149149
.Dv W_OK .
150+
.Pp
151+
.Fn access ,
152+
.Fn eaccess
153+
and
154+
.Fn faccessat
155+
will always dereference symbolic links.
156+
If the symbolic link itself needs to be referenced,
157+
.Xr lstat 2
158+
should be used instead.
150159
.Sh RETURN VALUES
151160
.Rv -std
152161
.Sh ERRORS

0 commit comments

Comments
 (0)