aboutsummaryrefslogtreecommitdiff
path: root/docs/tools
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/tools
parentc5b2f559814104f4145f8bc310f4d33c7ead8f49 (diff)
downloadqemu-5afc8df46cdf1a10fc44d43208cf449357009d2a.zip
qemu-5afc8df46cdf1a10fc44d43208cf449357009d2a.tar.gz
qemu-5afc8df46cdf1a10fc44d43208cf449357009d2a.tar.bz2
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/tools')
-rw-r--r--docs/tools/virtiofsd.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/tools/virtiofsd.rst b/docs/tools/virtiofsd.rst
index b208f2a..cc31402 100644
--- a/docs/tools/virtiofsd.rst
+++ b/docs/tools/virtiofsd.rst
@@ -183,6 +183,12 @@ Using ':' as the separator a rule is of the form:
'ok' as either an explicit terminator or for special handling of certain
patterns.
+- 'unsupported' - If a client tries to use a name matching 'key' it's
+ denied using ENOTSUP; when the server passes an attribute
+ name matching 'prepend' it's hidden. In many ways it's use is very like
+ 'ok' as either an explicit terminator or for special handling of certain
+ patterns.
+
**key** is a string tested as a prefix on an attribute name originating
on the client. It maybe empty in which case a 'client' rule
will always match on client names.