From 03b9d65cce53fb95b7d489ecd03d0853b9b923fb Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 12 Jan 2019 20:42:05 +0100 Subject: fusefrontend: -allow_other: Use OpenatUser in Create FUSE call. Revert commit b22cc03c7516b2003880db8375d26c76d6dff093. Instead of manually adjusting the user and mode after creating the file, adjust effective permissions and let the kernel deal with it. Related to https://github.com/rfjakob/gocryptfs/issues/338. --- internal/syscallcompat/sys_darwin.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal/syscallcompat/sys_darwin.go') diff --git a/internal/syscallcompat/sys_darwin.go b/internal/syscallcompat/sys_darwin.go index 993c229..7defc5f 100644 --- a/internal/syscallcompat/sys_darwin.go +++ b/internal/syscallcompat/sys_darwin.go @@ -46,6 +46,11 @@ func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) return emulateOpenat(dirfd, path, flags, mode) } +func OpenatUser(dirfd int, path string, flags int, mode uint32, context *fuse.Context) (fd int, err error) { + // FIXME: take into account context.Owner + return Openat(dirfd, path, flags, mode) +} + func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { return emulateRenameat(olddirfd, oldpath, newdirfd, newpath) } -- cgit v1.2.3