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>
This commit is contained in:
Socialpranker
2026-07-30 19:54:16 +01:00
committed by Nick Craig-Wood
co-authored by Claude Opus 4.8
parent 9d41369d77
commit 36ea20b0cc
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build !linux && !darwin && !freebsd
//go:build !linux && !darwin && !freebsd && !openbsd
package vfscommon
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build linux || darwin || freebsd
//go:build linux || darwin || freebsd || openbsd
package vfscommon