From nobody Thu May 23 02:44:09 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 4VlCDV0WCgz5LZGB; Thu, 23 May 2024 02:44:10 +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 4VlCDT5RLVz44D9; Thu, 23 May 2024 02:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432249; 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=wcQ5ONHn5E2MoSdFsZVSDl3TA9q92OLwJxvSbthveAw=; b=OfdA8AoC41ZWFuazHMhflujmLeTc0+goHpm4v+09YuWCjNwI8x0P9toWgB7heiRRUcd9z0 3UoXZfTCApHktNRRv0AcNJ3Tb2aB8X0RpVkLGMUj0VkkuV4DNaC0MopCHTR76DrvG6SyS1 AjGA9YaN5/j0rUCNbACssngfBuN24qBdT+FASpNzDiEGA9yrc2gUTEoS6s5XkhzhVyN1Tn +eozjP0fa01NQuxiwxwghD38UZ0Hjt42KhAv7n22HZaZ0qyvYm6B0eq79Aq1wNGfltILV8 d4tRW7ngHbB6ABZeGBKTAYK9iGFZgNfI8Jqt4TpU6gzmnSBIjVOG/EdOLR3DUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432249; a=rsa-sha256; cv=none; b=nZo8Hl94Felnz5O/xYz+02eZlaEY79zp9HRnPxCgrC4PqUTrHcXalJP81YfraGVuarPIeO NXZ7OF+i49O4JFmpvRTkWnhXQUEYwxC74/MVUjTJmjbNaBP9jOkQ5z0Mgmu2JE0nNv3qc7 KIblHiILeriOGOYBP0RgsGXqHQiqn7fCt+jR8W0xGTyB20QjywjajrCmBtFu9v6l/3iR0j 9vY2nY7FTIbdUxh1/yLV7v8S1o/X6DD5jj9Thz7ezc2vFDY46uZ+NhmpNn0Yrel27ScT+7 MOHgtXGbeAZZk0epp9YETfGuNsMcA3bL6KhY6bcZ40Zxz7i7CzPZcK1Sv2O18w== 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=1716432249; 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=wcQ5ONHn5E2MoSdFsZVSDl3TA9q92OLwJxvSbthveAw=; b=wB1z4TtPuQnLamYeRHlchZFfP82U40IYhC1himit7Xd0BRdkDtogQnf4be1qcN7K6LFutW TGd595mRRF6tEdLXDFP31UVtgchnA5k7CsnsAmy+VoR/C0kmQIm+UDW2XegI0p6YnhVLxY dNp0MsqsPjHrBM/WlA+htqh/a5aI/N9/7jTmBjLE2qnK1/xcfk5d6ZDOjOCr7WouAjo2ED HXCEGYRWeSi/2h2yIBLwXE89WC2JhGtexyP+15N2uoHjCkYf9VbB9Z4bpKY1pw3rJ9Gjb1 gZGYwWaTZ0GKYis2P9hMyIA5k0UJfqYmHlN/dQtX/cG1MdqdpBTlpqdcgiUiow== 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 4VlCDT52QrzXgy; Thu, 23 May 2024 02:44:09 +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 44N2i9Ec056669; Thu, 23 May 2024 02:44:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2i9IW056666; Thu, 23 May 2024 02:44:09 GMT (envelope-from git) Date: Thu, 23 May 2024 02:44:09 GMT Message-Id: <202405230244.44N2i9IW056666@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: 78ea1fcf29a7 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 78ea1fcf29a780fb6bd90e41772d5a3751fb56d7 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=78ea1fcf29a780fb6bd90e41772d5a3751fb56d7 commit 78ea1fcf29a780fb6bd90e41772d5a3751fb56d7 Author: Gordon Bergling AuthorDate: 2024-05-13 08:40:12 +0000 Commit: Dag-Erling Smørgrav 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