diff options
| author | Jakob Unterwurzacher | 2026-11-11 21:12:21 +0100 |
|---|---|---|
| committer | Jakob Unterwurzacher | 2026-11-11 21:12:21 +0100 |
| commit | 3bfeb314d993e9bf88e343b446f4b247dead3695 (patch) | |
| tree | 14c00aed50edae7e86ff5f7e3ad610ff1cdb3707 /tests/reverse/force_owner_test.go | |
| parent | dfdf47d790fa758a9f443764ad296e86c9007ece (diff) | |
syscallcompat: freebsd: Renameat2: don't follow symlinks for RENAME_NOREPLACE
The RENAME_NOREPLACE emulation checked for an existing newpath with
Fstatat(..., 0), which follows symlinks. A dangling symlink at newpath
returned ENOENT, so we went ahead and replaced it, violating NOREPLACE.
Use AT_SYMLINK_NOFOLLOW.
Also return errors other than ENOENT instead of proceeding with the
rename, and drop a duplicated NOREPLACE|EXCHANGE check.
The check-then-rename emulation remains inherently racy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/reverse/force_owner_test.go')
0 files changed, 0 insertions, 0 deletions
