aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Bergling <gbe@FreeBSD.org>2024-05-13 08:40:12 +0000
committerGordon Bergling <gbe@FreeBSD.org>2024-05-13 08:40:12 +0000
commit421025a274fb5759b3ecc8bdb30b24db830b45ae (patch)
tree917cfa620e75d83fb4a5c6fe862fc1537b8aef8b
parent9bfd3b4076a7b0dfd27ab22318e5113dc84fea28 (diff)
downloadsrc-421025a274fb5759b3ecc8bdb30b24db830b45ae.tar.gz
src-421025a274fb5759b3ecc8bdb30b24db830b45ae.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
-rw-r--r--lib/libsys/access.211
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libsys/access.2 b/lib/libsys/access.2
index 1dab63afccde..91fe50a08cc4 100644
--- a/lib/libsys/access.2
+++ b/lib/libsys/access.2
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 30, 2021
+.Dd May 13, 2024
.Dt ACCESS 2
.Os
.Sh NAME
@@ -147,6 +147,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