diff options
author | Gordon Bergling <gbe@FreeBSD.org> | 2024-05-13 08:40:12 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2024-05-23 02:41:32 +0000 |
commit | f075b6113726d74342d4af15dfab60709f50b859 (patch) | |
tree | 69c1600e3bd7fdd3a5230b39ac42e62783868ad8 | |
parent | 42e50eaf7f6f4459f1217564fd143ae4f8127154 (diff) | |
download | src-f075b6113726d74342d4af15dfab60709f50b859.tar.gz src-f075b6113726d74342d4af15dfab60709f50b859.zip |
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
(cherry picked from commit 421025a274fb5759b3ecc8bdb30b24db830b45ae)
-rw-r--r-- | lib/libc/sys/access.2 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 681e4483a9e6..64ed1133b23d 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -27,7 +27,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd March 30, 2021 +.Dd May 13, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -149,6 +149,15 @@ Likewise for .Dv R_OK and .Dv W_OK . +.Pp +.Fn access , +.Fn eaccess +and +.Fn faccessat +will always dereference symbolic links. +If the symbolic link itself needs to be referenced, +.Xr lstat 2 +should be used instead. .Sh RETURN VALUES .Rv -std .Sh ERRORS |