aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/xattr_darwin.go
diff options
context:
space:
mode:
authorBolshevik2018-05-01 18:46:51 +0200
committerJakob Unterwurzacher2018-05-07 21:45:40 +0200
commit5ccc06d5cb321b1400e33a7d0819bf617c52600d (patch)
treed9399abae93ddff2f9d549b7cd8290a75f42e7a0 /internal/fusefrontend/xattr_darwin.go
parent95964fb5f0646ffb21d7b67ac9077ba2ef880526 (diff)
xattr: added passing of a "flags" parameter
Pass the "flags" parameter to the lower layer syscall. This makes Apple applications being able to successfully save data.
Diffstat (limited to 'internal/fusefrontend/xattr_darwin.go')
-rw-r--r--internal/fusefrontend/xattr_darwin.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/fusefrontend/xattr_darwin.go b/internal/fusefrontend/xattr_darwin.go
new file mode 100644
index 0000000..b626006
--- /dev/null
+++ b/internal/fusefrontend/xattr_darwin.go
@@ -0,0 +1,15 @@
+// +build darwin
+
+// Package fusefrontend interfaces directly with the go-fuse library.
+package fusefrontend
+
+import "github.com/pkg/xattr"
+
+func disallowedXAttrName(attr string) bool {
+ return false
+}
+
+// On Darwin it is needed to unset XATTR_NOSECURITY 0x0008
+func filterXattrSetFlags(flags int) int {
+ return flags &^ xattr.XATTR_NOSECURITY
+}