aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_freebsd.go
AgeCommit message (Collapse)Author
11 dayssyscallcompat: freebsd: Renameat2: don't follow symlinks for RENAME_NOREPLACEJakob Unterwurzacher
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>
2026-07-16sharedstorage: fix darwin & freebsd build failureJakob Unterwurzacher
2026-03-08Added basic support for FreeBSD.Ankush Patel
Freebsd-support: Change bash shebang to use /usr/bin/env Freebsd-support: Fix go vet "undefined" fixes when running make ci freebsd: stub xattr functions /proc/PID/fd does not exist on freebsd. freebsd-support: modify FchmodatNofollow for FreeBSD FreeBSD supports the Fchmodat system call, with the AT_SYMLINK_NOFOLLOW flag. FchmodatNofollow has been modified to use this system call and flag. freebsd-support: PR changes and fixes * Functions in fusefrontend_reverse/node_xattr_freebsd.go have been stubbed for now. * asuser_freebsd.go updated to only run f() when context is nil; otherwise log a warning and return an error. * emulate.go build flags updated, and FreeBSD specific version added. * sys_freebsd.go bug in Renameat2 with RENAME_EXCHANGE flag fixed. FreeBSD does not support atomic file swapping, so this flag now returns an error. * unix2syscall and atime is identical between FreeBSD and Darwin, updated filenames so Go will build the file for FreeBSD and Mac OS. freebsd-support: Addressed more PR comments and fixed build tags