Skip to content

Commit

Permalink
syscallcompat: also refactor MkdiratUser on GOOS=darwin
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rfjakob committed May 22, 2021
1 parent e1853e1 commit 09870bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/syscallcompat/sys_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 09870bf

Please sign in to comment.