diff options
| author | Ankush Patel | 2026-02-05 14:42:40 +1300 |
|---|---|---|
| committer | Ankush Patel | 2026-02-14 03:32:14 +1300 |
| commit | 903fc9d077a81d9224de4207d1672c0b1127cf42 (patch) | |
| tree | 05ae39d5ebbe41bb64d41d7e0f03df7dac596dae /internal/syscallcompat/asuser_freebsd.go | |
| parent | 3191c18f67346c95e4dbdfd16b44256ddfe20b4f (diff) | |
Added basic support for FreeBSD.
Diffstat (limited to 'internal/syscallcompat/asuser_freebsd.go')
| -rw-r--r-- | internal/syscallcompat/asuser_freebsd.go | 16 |
1 files changed, 16 insertions, 0 deletions
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() +} |
