Date: Thu, 23 May 2024 02:44:09 GMT From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 78ea1fcf29a7 - stable/13 - access.2: Mention that lstat(2) should be used for symbolic links Message-ID: <202405230244.44N2i9IW056666@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=78ea1fcf29a780fb6bd90e41772d5a3751fb56d7 commit 78ea1fcf29a780fb6bd90e41772d5a3751fb56d7 Author: Gordon Bergling <gbe@FreeBSD.org> AuthorDate: 2024-05-13 08:40:12 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:43:49 +0000 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) --- lib/libc/sys/access.2 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405230244.44N2i9IW056666>