From fe3890688a693fbfa900e32b05e10861fa4167ba Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 1 May 2018 23:30:53 +0200 Subject: fusefrontend: xattr: return ENOSYS on unsupported flags We previously returned EPERM to prevent the kernel from blacklisting our xattr support once we get an unsupported flag, but this causes lots of trouble on MacOS: Cannot save files from GUI apps, see https://github.com/rfjakob/gocryptfs/issues/229 Returning ENOSYS triggers the dotfiles fallback on MacOS and fixes the issue. --- internal/fusefrontend/xattr.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/fusefrontend/xattr.go b/internal/fusefrontend/xattr.go index f3e7532..36ab4d5 100644 --- a/internal/fusefrontend/xattr.go +++ b/internal/fusefrontend/xattr.go @@ -55,7 +55,8 @@ func (fs *FS) SetXAttr(path string, attr string, data []byte, flags int, context return fuse.EPERM } if flags != 0 { - return fuse.EPERM + // Drop this once https://github.com/pkg/xattr/pull/26 is merged + return fuse.ENOSYS } if disallowedXAttrName(attr) { return fuse.EPERM -- cgit v1.2.3