summaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_darwin.go
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-12 21:22:52 +0100
committerSebastian Lackner2019-01-12 21:22:58 +0100
commitefc280330c68dc5cbf605921f6c840a54d5841bb (patch)
treed531534d3681342ad8a929765ce433d2eb6096f7 /internal/syscallcompat/sys_darwin.go
parent1fbe7798cf879d80cfbd755b05bdadae24bc5519 (diff)
fusefrontend: -allow_other: Use SymlinkatUser in Symlink FUSE call.
Instead of manually adjusting the user after creating the symlink, adjust effective permissions and let the kernel deal with it. Related to https://github.com/rfjakob/gocryptfs/issues/338.
Diffstat (limited to 'internal/syscallcompat/sys_darwin.go')
-rw-r--r--internal/syscallcompat/sys_darwin.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/syscallcompat/sys_darwin.go b/internal/syscallcompat/sys_darwin.go
index c9f3ad7..52803ab 100644
--- a/internal/syscallcompat/sys_darwin.go
+++ b/internal/syscallcompat/sys_darwin.go
@@ -80,6 +80,11 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
return emulateSymlinkat(oldpath, newdirfd, newpath)
}
+func SymlinkatUser(oldpath string, newdirfd int, newpath string, context *fuse.Context) (err error) {
+ // FIXME: take into account context.Owner
+ return Symlinkat(oldpath, newdirfd, newpath)
+}
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
return emulateMkdirat(dirfd, path, mode)
}