summaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_darwin.go
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-12 21:19:23 +0100
committerSebastian Lackner2019-01-12 21:20:16 +0100
commit1fbe7798cf879d80cfbd755b05bdadae24bc5519 (patch)
tree43fdd12317feaebd3fa8d318ba09a9fce60d2d1f /internal/syscallcompat/sys_darwin.go
parenta525e33eaa59c6561653a5fc40e5c4d5a9a3184b (diff)
fusefrontend: -allow_other: Use MknodatUser in Mknod FUSE call.
Instead of manually adjusting the user and mode after creating the device file, 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 3c431b9..c9f3ad7 100644
--- a/internal/syscallcompat/sys_darwin.go
+++ b/internal/syscallcompat/sys_darwin.go
@@ -63,6 +63,11 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
return emulateMknodat(dirfd, path, mode, dev)
}
+func MknodatUser(dirfd int, path string, mode uint32, dev int, context *fuse.Context) (err error) {
+ // FIXME: take into account context.Owner
+ return Mknodat(dirfd, path, mode, dev)
+}
+
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
return emulateFchmodat(dirfd, path, mode, flags)
}