Files
rclone/vfs/vfscommon/vfsflags_non_unix.go
T
36ea20b0cc vfs: build the real uid/gid lookup on OpenBSD too
Mounted files showed up owned by 4294967295 (^uint32(0)) on OpenBSD.
vfsflags_unix.go, which calls unix.Geteuid()/unix.Getegid() to get the
real uid/gid, only builds for linux, darwin and freebsd; OpenBSD fell
through to vfsflags_non_unix.go's zero-value stub instead.

OpenBSD has no linux/darwin/freebsd-specific fields here, just the same
POSIX Geteuid/Getegid/Umask calls golang.org/x/sys/unix already ships
for openbsd on every arch, so this just adds openbsd to both build tags
rather than needing a separate file.

Cross-compiled for GOOS=openbsd (arm64, amd64) and go vet clean; ran the
existing vfs test suite on darwin, no regressions. Not yet verified on a
live OpenBSD mount, only that the right uid/gid syscalls now get called
in this codepath.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-30 19:54:16 +01:00

19 lines
393 B
Go

//go:build !linux && !darwin && !freebsd && !openbsd
package vfscommon
// get the current umask
func getUmask() int {
return 0000
}
// get the current uid
func getUID() uint32 {
return ^uint32(0) // these values instruct WinFSP-FUSE to use the current user
}
// get the current gid
func getGID() uint32 {
return ^uint32(0) // these values instruct WinFSP-FUSE to use the current user
}