From nobody Thu May 23 02:47:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCJ23pmbz5LZXC; Thu, 23 May 2024 02:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCJ21bGdz45yQ; Thu, 23 May 2024 02:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lFFnT922PQT8Jgkz+34Br5kZUU0y5zdt50OwrXxmArM=; b=gWZ+bGimf1Dikj52VJxKEF/+1w9UND7u3TaD0tVcBtRxVjGfc+1mbVhYBgjmiPC0HVL918 +HJubLrmypWnFMqr3D7h+uFmH5D8878kap1SuvJR6r/RL3KPYhLUFLu2W51SyrpXwGD/Wv zJWVwLxdqMQnBuLxM1xCqRAujFDHpU4h2HG/YTsg+3BivFA/Tyhw6vKKdw87ls+PtFquC5 zrEoVW+k8vjOdjkps0KqI+S3R+KU9RWMxLwJDHLfiNbI6KDvU05+yyemtVM03gtI4aGIYR Z4i8Sn7XU2yLEe42yFgB85YnJMUYExN01VvRoaXExNy+xqNKH1vwIo8IRWl71Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432434; a=rsa-sha256; cv=none; b=aqyAgpEgUaES70/eV9WnIAsyQXDLBAX/eJMocjHj5CajwQtGKana1gB8L+F7+MFkz4hmV2 mtoQBxnM6ym1+lxaooOHTwdPMpMVl6oNAB8xhwKq9a2/RAFZelQjBwoKy3+lQqHT5IiDif 8FrKVuy/p7PkL3E8ZmVvfc9bnk2Bho+NgXG64tbJJ/SBGcwlB42Qi4yUsWV6kQFbfrwMLV dPCxb36BWUZX5SGZakxNBpWtJ5oRpnb5ZNJogENCRrkszS9AyRObLSyYEy89vjFLxDQz7w SauC6Km4PQMjszTSXnLEw54yLe9gCpUDxu8IR5uMvsT8LZqUlzOk5MgRPXFTsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lFFnT922PQT8Jgkz+34Br5kZUU0y5zdt50OwrXxmArM=; b=i5/2R0bDOZhNk5uHEA5S24k0p+giBfvQDY4SGqE4VipjUcGuibrcrUkKs/QDVeHee8KhfG fXE2fYucgBSKN8hYpgB1rYgcHOY2uRCE+3+tg85/M94s4D9ojx5QdLIrTxA4mbexV3i6dQ Kml/o0Wu/EzHcHyN5y74zrJONYUq61nhTivVHmGD0bsUs1GrKCYQ20uuE189qxe9pxqAM9 zfpUzDmzIMfeajgebv2v8K0+R9XOp2HzGHmPWsuiK6U0Bg8gfv1J1npfsTBI3rhpjf9zEE ELRElIWdXEsfSA840mDwNbqdbnLwg1lBo4/xN+vM3smukYF+S72FpR43E89TCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlCJ20mwhzXsH; Thu, 23 May 2024 02:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2lElK057456; Thu, 23 May 2024 02:47:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2lENF057453; Thu, 23 May 2024 02:47:14 GMT (envelope-from git) Date: Thu, 23 May 2024 02:47:14 GMT Message-Id: <202405230247.44N2lENF057453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 8766ae10d3b7 - releng/14.1 - access.2: Mention that lstat(2) should be used for symbolic links List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 8766ae10d3b792caf7c31b583afcaf43b1a6543f Auto-Submitted: auto-generated The branch releng/14.1 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8766ae10d3b792caf7c31b583afcaf43b1a6543f commit 8766ae10d3b792caf7c31b583afcaf43b1a6543f Author: Gordon Bergling AuthorDate: 2024-05-13 08:40:12 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-23 02:45: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) (cherry picked from commit f075b6113726d74342d4af15dfab60709f50b859) Approved by: re (cperciva) --- 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