blob: 34ad41fcd3ed3c6197b74394579153bbbfd52b62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()
}
|