aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/xattr.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend/xattr.go')
-rw-r--r--internal/fusefrontend/xattr.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/internal/fusefrontend/xattr.go b/internal/fusefrontend/xattr.go
index 36ab4d5..9833368 100644
--- a/internal/fusefrontend/xattr.go
+++ b/internal/fusefrontend/xattr.go
@@ -54,14 +54,12 @@ func (fs *FS) SetXAttr(path string, attr string, data []byte, flags int, context
if fs.isFiltered(path) {
return fuse.EPERM
}
- if flags != 0 {
- // Drop this once https://github.com/pkg/xattr/pull/26 is merged
- return fuse.ENOSYS
- }
if disallowedXAttrName(attr) {
return fuse.EPERM
}
+ flags = filterXattrSetFlags(flags)
+
cPath, err := fs.getBackingPath(path)
if err != nil {
return fuse.ToStatus(err)
@@ -69,7 +67,7 @@ func (fs *FS) SetXAttr(path string, attr string, data []byte, flags int, context
cAttr := fs.encryptXattrName(attr)
// xattr data is encrypted like a symlink target
cData64 := []byte(fs.encryptSymlinkTarget(string(data)))
- return unpackXattrErr(xattr.Set(cPath, cAttr, cData64))
+ return unpackXattrErr(xattr.SetWithFlags(cPath, cAttr, cData64, flags))
}
// RemoveXAttr implements pathfs.Filesystem.