aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/file_api_check.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2026-11-11 21:05:14 +0100
committerJakob Unterwurzacher2026-11-11 21:08:01 +0100
commit8caa5dddeebaf7116c9fa12a64cac1aca567df58 (patch)
treed576b82ed0fe05e0d4d61fa30593e297b048e195 /internal/fusefrontend_reverse/file_api_check.go
parent91ab90b988b890f5f6a65bc02e61e516ab9e2eff (diff)
fusefrontend: openWriteOnlyFile: reopen the same file, not just the same name
openWriteOnlyFile chmods the file via woFd and then reopens it by name. O_NOFOLLOW prevents following symlinks, but cName could still have been replaced by a different regular file in between, and we would return an fd to that file. Add syscallcompat.ReopenFd(): * Linux: open /proc/self/fd/N, which always resolves to the file woFd refers to. * Other platforms: reopen by name and compare dev/ino against woFd, returning EAGAIN on mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/fusefrontend_reverse/file_api_check.go')
0 files changed, 0 insertions, 0 deletions