aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-05-22 22:01:46 +0200
committerJakob Unterwurzacher2021-05-22 22:01:46 +0200
commit09870bfac51995a0a8875137ed9e6d60688240f1 (patch)
tree9c4056430727ee7346068cbd8b5a6fcec5225db8
parente1853e10116e97d7dcce895d6603dae1379a37b7 (diff)
syscallcompat: also refactor MkdiratUser on GOOS=darwin
Breakage was: +GOOS=darwin +GOARCH=amd64 +go build -tags without_openssl internal/fusefrontend/node_dir_ops.go:45:34: cannot use context (type *fuse.Context) as type *fuse.Caller in argument to syscallcompat.MkdiratUser internal/fusefrontend/node_dir_ops.go:83:35: cannot use context (type *fuse.Context) as type *fuse.Caller in argument to syscallcompat.MkdiratUser
-rw-r--r--internal/syscallcompat/sys_darwin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/syscallcompat/sys_darwin.go b/internal/syscallcompat/sys_darwin.go
index 90d5ed6..a14a4ee 100644
--- a/internal/syscallcompat/sys_darwin.go
+++ b/internal/syscallcompat/sys_darwin.go
@@ -134,12 +134,12 @@ func SymlinkatUser(oldpath string, newdirfd int, newpath string, context *fuse.C
return Symlinkat(oldpath, newdirfd, newpath)
}
-func MkdiratUser(dirfd int, path string, mode uint32, caller *fuse.Caller) (err error) {
- if caller != nil {
+func MkdiratUser(dirfd int, path string, mode uint32, context *fuse.Context) (err error) {
+ if context != nil {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
- err = pthread_setugid_np(caller.Uid, caller.Gid)
+ err = pthread_setugid_np(context.Owner.Uid, context.Owner.Gid)
if err != nil {
return err
}