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.
This commit is contained in:
parent
a0fd3eca98
commit
4407ca3a4d
@ -31,6 +31,11 @@ func (fs *FS) GetXAttr(path string, attr string, context *fuse.Context) ([]byte,
|
|||||||
if fs.isFiltered(path) {
|
if fs.isFiltered(path) {
|
||||||
return nil, fuse.EPERM
|
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)
|
cAttr, err := fs.encryptXattrName(attr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fuse.ToStatus(err)
|
return nil, fuse.ToStatus(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user