summaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_linux.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-05-22 21:44:19 +0200
committerJakob Unterwurzacher2021-05-22 21:44:19 +0200
commite1853e10116e97d7dcce895d6603dae1379a37b7 (patch)
treeecf2388b70f322cf4c659912344ffb789a79351f /internal/syscallcompat/sys_linux.go
parentcb4f9f9e2934400fa0abf9bd6c65455783b2768e (diff)
syscallcompat: refactor MkdiratUser to take fuse.Context
Let's have MkdiratUser take fuse.Context like everybody else.
Diffstat (limited to 'internal/syscallcompat/sys_linux.go')
-rw-r--r--internal/syscallcompat/sys_linux.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/internal/syscallcompat/sys_linux.go b/internal/syscallcompat/sys_linux.go
index 0db8c60..46d039c 100644
--- a/internal/syscallcompat/sys_linux.go
+++ b/internal/syscallcompat/sys_linux.go
@@ -209,18 +209,11 @@ func SymlinkatUser(oldpath string, newdirfd int, newpath string, context *fuse.C
// MkdiratUser runs the Mkdirat syscall in the context of a different user.
//
// See OpenatUser() for how this works.
-func MkdiratUser(dirfd int, path string, mode uint32, caller *fuse.Caller) (err error) {
+func MkdiratUser(dirfd int, path string, mode uint32, context *fuse.Context) (err error) {
f := func() (int, error) {
err := Mkdirat(dirfd, path, mode)
return -1, err
}
- // TODO: refactor MkdiratUser to take context instead of caller
- var context *fuse.Context
- if caller != nil {
- context = &fuse.Context{
- Caller: *caller,
- }
- }
_, err = asUser(f, context)
return err
}