From nobody Fri May 17 22:12:18 2024 X-Original-To: doc@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 4Vh1R63sdzz5KSFJ for ; Fri, 17 May 2024 22:12:18 +0000 (UTC) (envelope-from bugzilla-noreply@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 4Vh1R62r9Qz4TrL for ; Fri, 17 May 2024 22:12:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715983938; a=rsa-sha256; cv=none; b=f15uGYTSgh2nRwawA2UOrNURMGm+/wYGn92cXSLlr+K7hZZTN/1elYNxFOZsu5ndcBit1I 7TM8YRqy0m805j95cmHEvk1mvnLhV+pLlMzYv8FcY1HLKvrmCVtqYTGdUTns1nQcMksobN HZzq4uPha7XTmm2ItmEPUmyXK61SVIAxMZc+ciz9RLXpre4TcIomC9w49YVUqhbfIP+upN jZIgtSMbTSeVQezSG3vj1dpwWQKL1rPB/p56kzRvqGAh+WQzF4AetZWg6DYBhpMQ+ZWEQl lFCaD+7bwU02W+GTEH1kIKVySMBlgJucaijjP/G520O5mwO3daOnyBnoIT4yRg== 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=1715983938; 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: in-reply-to:in-reply-to:references:references; bh=h8ztZphzhp36UcMtQChBRXLAvhiI2BAHOpWh3qy2/Uw=; b=ljehKOKSJYY89GCmq5S7Ko1AsKnr/2aPlZH4N/oU1WZRALcikgjA8N0t/S01BVSjWTk23E q9nm41N7nqbGP+raUhESnWBJ+SdbHE2fHwBf2D6hYUOwsqgHNi+aTnrDaUbVCJXKWT20Jk DgJJjCOpCSrVLHxmjkXVqEtBLV0evtNdzFBTJwdYvX4j2n+QNHKx+2cGdBXObWUCWUhhBS pXfIkgGM76CBuQhslCsuW44hRjWfe1PRPNROSNqMiZwKvoe2pP5WTvkKkwZa3gtXeBBP9H vYJYif/1GgDawyY6KsScLx1Y5pXvSr+qpV6R34ShUi/ulOfJJWcktEoFJV3AZA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4Vh1R62S3wz1096 for ; Fri, 17 May 2024 22:12:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 44HMCI6Z077933 for ; Fri, 17 May 2024 22:12:18 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44HMCIPE077895 for doc@FreeBSD.org; Fri, 17 May 2024 22:12:18 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: doc@FreeBSD.org Subject: [Bug 262895] access(2) man page should mention softlinks Date: Fri, 17 May 2024 22:12:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Documentation X-Bugzilla-Component: Manual Pages X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jamie@catflap.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gbe@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Documentation project List-Archive: https://lists.freebsd.org/archives/freebsd-doc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-doc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262895 --- Comment #5 from Jamie Landeg-Jones --- (In reply to Dag-Erling Sm=C3=B8rgrav from comment #4) Hi. Thanks for the feedback. I could be wrong, but I'll explain my situation as far as I can remember: I wasn't trying to open the file - I wanted to check the existence of any e= ntry with that name in a directory before renaming a file to said name. Rather than "do it and see", if an entry of the destination name already existed, I wanted the options presented to the user prior to the rename to = be changed appropriately. I saw at the end of the manpage for access(2) : "access() remains useful for providing clues to users as to whether operati= ons make sense for particular filesystem objects (e.g. 'delete' menu item only highlighted in a writable folder ... avoiding interpretation of the st_mode bits that the application might not understand -- e.g. in the case of AFS).= It also allows a cheaper file existence test than stat(2)." Going by that, access seemed the best option for the job, but of course, it failed when I had a softlink in the directory that pointed to a non-existent file, causing an unfriendly error rather than the result I wanted. OK, hard= ly the end of the world, but I had expected a test for whether an entry exists within a directory to not fail in this case, hence why I suggested adding t= he bit about softlinks to that paragraph (Incidentally, I meant "lstat" not "s= tat" - I have already corrected it in the review) --=20 You are receiving this mail because: You are on the CC list for the bug.=