From nobody Mon May 13 08:40:33 2024 X-Original-To: dev-commits-src-main@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 4VdCcL0VJ3z5KXXG; Mon, 13 May 2024 08:40:34 +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 4VdCcL00tZz4Zf9; Mon, 13 May 2024 08:40:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715589634; 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=pphJZ3QhwR1ZGfOdXRm2cVcOOGCgdvdpYa0F+2BcSXM=; b=bsCmJ2/hGEFWueVxdbNRp+67ql5j7H2i7q3ceLQmnS3Isgoi43StCLusExzVsv73cUGtcO MMHhD2VPPU2EaI2OZhyWaLQrtfVPIlmeGVH3NWnn7JgQgBs8fk5ek20JhSmyADyrC8xt8u f/nkDUlKG41/BtF+5tKbGH2+dTau7THhKzp/v6S5ZZApFIozbYJNUxllOyH18Sux8BeZge vFjjo8cCEmR5db3P6A/5AJkT5EdmIr3m4MBCOZhdCElxu6qxxWuyUTck2+XhGX84BM5Nt1 MobV3K935PIGwKTG8Zi/S5Wh0oBitnSIRbWuYK5hitjUHyI0Xrls4Pd4afuwfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715589634; a=rsa-sha256; cv=none; b=Y/kI+rFhWkQzJUrCAyB26TjkpNcQgIbJMo5Olz08li1+qattVvbua0jlKtACnEtRdfEqrp +3qf3S2czLlfVum1Q25OebxdKkSJ4QO1D6GG91XyIDMPoktUI5wDfmsHDbwHuvh1WNHZVS VMpVMI93lJPRVHBNnyRo+26FnMHer/3MyRCJN67HrlXyS+Sl2k6L79boem8TtSjkURcO+Z 0hy4jW3lYZCOWOeVxRPDjdczEWSGcWX+9FebT4mKp6z3AJFWR8Ayv2lEaEY4Ho16oy4+L8 2CKo59BsPuraqnP+NZkBQ7MeyyoNLbQVc2dMTXayFaMvKVynQqj7jO1tuor62g== 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=1715589634; 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=pphJZ3QhwR1ZGfOdXRm2cVcOOGCgdvdpYa0F+2BcSXM=; b=m6/gYQsNsev4XRiyTMPSUxVTs+YnjWuDM9I0RPWv7vM9HdKOCyevVWRgcZCZ7+kfMFiOjp 7H8Tnr10ij7uMgZ4GzXAstsw4b+PVBEKdReOeI5CuVMrYTCEWT4GUjuP6J5dCZQ/CmCZuD n9IfkErGyI40DIhHuM395/fI5K46hfi3YlFOt3rRv08pWNMVBMEbkDUBuedMVIA4Vq8K/B 31cFGvVEtyZOY8dBqmS9+1xU60DPjZHMcVOYKXclIOhsT4/nV/GZxNWByzkxnb5hHrpK04 VDhnzFLLLRAKWpSWXAwfod8QNAQjlYaxhUsLgkbrjOYHJg4WHlQrKVPg33T9ow== 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 4VdCcK6jYBzgsX; Mon, 13 May 2024 08:40:33 +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 44D8eX3g014141; Mon, 13 May 2024 08:40:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44D8eXdL014138; Mon, 13 May 2024 08:40:33 GMT (envelope-from git) Date: Mon, 13 May 2024 08:40:33 GMT Message-Id: <202405130840.44D8eXdL014138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 421025a274fb - main - access.2: Mention that lstat(2) should be used for symbolic links List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 421025a274fb5759b3ecc8bdb30b24db830b45ae Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=421025a274fb5759b3ecc8bdb30b24db830b45ae commit 421025a274fb5759b3ecc8bdb30b24db830b45ae Author: Gordon Bergling AuthorDate: 2024-05-13 08:40:12 +0000 Commit: Gordon Bergling CommitDate: 2024-05-13 08:40:12 +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 --- lib/libsys/access.2 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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