From d61448ec88f064eba898b566f68324859df5f7ac Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 11 Nov 2026 21:02:25 +0100 Subject: syscallcompat: drop Faccessat helper, use unix.Faccessat with AT_SYMLINK_NOFOLLOW Our helper did Fstatat(AT_SYMLINK_NOFOLLOW) followed by a symlink-following unix.Faccessat(..., 0). If the file is swapped for a symlink in between, we check access on the symlink target. x/sys now handles AT_SYMLINK_NOFOLLOW on all our platforms: faccessat2 with fallback emulation on Linux, libc faccessat on Darwin, and the native syscall on FreeBSD. The Darwin breakage that caused the revert in 3d6b2685 should no longer apply. Co-Authored-By: Claude Opus 5.5 --- internal/fusefrontend/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/fusefrontend/node.go') diff --git a/internal/fusefrontend/node.go b/internal/fusefrontend/node.go index c531876..4f6ae45 100644 --- a/internal/fusefrontend/node.go +++ b/internal/fusefrontend/node.go @@ -132,7 +132,7 @@ func (n *Node) Access(ctx context.Context, mode uint32) syscall.Errno { } defer syscall.Close(dirfd) - err := syscallcompat.Faccessat(dirfd, cName, mode) + err := unix.Faccessat(dirfd, cName, mode, unix.AT_SYMLINK_NOFOLLOW) return fs.ToErrno(err) } -- cgit v1.2.3