summary refs log tree commit diff stats
path: root/docs/devel
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2021-09-22 15:02:01 -0400
committerDr. David Alan Gilbert <dgilbert@redhat.com>2021-10-25 18:48:23 +0100
commit5afc8df46cdf1a10fc44d43208cf449357009d2a (patch)
treeadbfdc1ac3e6da7cf9bdb05756578c43973e5490 /docs/devel
parentc5b2f559814104f4145f8bc310f4d33c7ead8f49 (diff)
downloadfocaccia-qemu-5afc8df46cdf1a10fc44d43208cf449357009d2a.tar.gz
focaccia-qemu-5afc8df46cdf1a10fc44d43208cf449357009d2a.zip
virtiofsd: xattr mapping add a new type "unsupported"
Right now for xattr remapping, we support types of "prefix", "ok" or "bad".
Type "bad" returns -EPERM on setxattr and hides xattr in listxattr. For
getxattr, mapping code returns -EPERM but getxattr code converts it to -ENODATA.

I need a new semantics where if an xattr is unsupported, then
getxattr()/setxattr() return -ENOTSUP and listxattr() should hide the xattr.
This is needed to simulate that security.selinux is not supported by
virtiofs filesystem and in that case client falls back to some default
label specified by policy.

So add a new type "unsupported" which returns -ENOTSUP on getxattr() and
setxattr() and hides xattrs in listxattr().

For example, one can use following mapping rule to not support
security.selinux xattr and allow others.

"-o xattrmap=/unsupported/all/security.selinux/security.selinux//ok/all///"

Suggested-by: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <YUt9qbmgAfCFfg5t@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'docs/devel')
0 files changed, 0 insertions, 0 deletions