summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-04-02 18:59:02 +0200
committerJakob Unterwurzacher2018-04-02 18:59:14 +0200
commit4407ca3a4da04c7c43bc6691819ae44f77625f16 (patch)
tree327952894faa01a8f979183cfee07dcbb24215a2 /internal
parenta0fd3eca98218aa7d165080ab20cf234330e5e09 (diff)
fusefrontend: xattr: return ENODATA for security.* and system.*
"ls -l" queries security.selinux, system.posix_acl_access, system.posix_acl_default and throws error messages if it gets something else than ENODATA.
Diffstat (limited to 'internal')
-rw-r--r--internal/fusefrontend/xattr.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/fusefrontend/xattr.go b/internal/fusefrontend/xattr.go
index 03e127f..1d628b7 100644
--- a/internal/fusefrontend/xattr.go
+++ b/internal/fusefrontend/xattr.go
@@ -31,6 +31,11 @@ func (fs *FS) GetXAttr(path string, attr string, context *fuse.Context) ([]byte,
if fs.isFiltered(path) {
return nil, fuse.EPERM
}
+ if !strings.HasPrefix(attr, xattrUserPrefix) {
+ // "ls -l" queries security.selinux, system.posix_acl_access, system.posix_acl_default
+ // and throws error messages if it gets something else than ENODATA.
+ return nil, fuse.ENODATA
+ }
cAttr, err := fs.encryptXattrName(attr)
if err != nil {
return nil, fuse.ToStatus(err)