From 903fc9d077a81d9224de4207d1672c0b1127cf42 Mon Sep 17 00:00:00 2001 From: Ankush Patel Date: Thu, 5 Feb 2026 14:42:40 +1300 Subject: Added basic support for FreeBSD. --- internal/syscallcompat/asuser_freebsd.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 internal/syscallcompat/asuser_freebsd.go (limited to 'internal/syscallcompat/asuser_freebsd.go') diff --git a/internal/syscallcompat/asuser_freebsd.go b/internal/syscallcompat/asuser_freebsd.go new file mode 100644 index 0000000..34ad41f --- /dev/null +++ b/internal/syscallcompat/asuser_freebsd.go @@ -0,0 +1,16 @@ +package syscallcompat + +import ( + "github.com/hanwen/go-fuse/v2/fuse" +) + +// asUser runs `f()` under the effective uid, gid, groups specified +// in `context`. +// +// If `context` is nil, `f()` is executed directly without switching user id. +// +// WARNING this function is not complete, and always runs f() as if context is nil. +// FreeBSD does not support changing uid/gid per thread. +func asUser(f func() (int, error), context *fuse.Context) (int, error) { + return f() +} -- cgit v1.2.3