OSDN Git Service

tools/virtiofsd: xattr name mappings: Add option
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Fri, 23 Oct 2020 16:58:08 +0000 (17:58 +0100)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 26 Oct 2020 18:35:32 +0000 (18:35 +0000)
commit6084633dff3a05d63176e06d7012c7e15aba15be
treefa6787648efbe0881cb6fb74924b71672ff57068
parent06844584b62a43384642f7243b0fc01c9fff0fc7
tools/virtiofsd: xattr name mappings: Add option

Add an option to define mappings of xattr names so that
the client and server filesystems see different views.
This can be used to have different SELinux mappings as
seen by the guest, to run the virtiofsd with less privileges
(e.g. in a case where it can't set trusted/system/security
xattrs but you want the guest to be able to), or to isolate
multiple users of the same name; e.g. trusted attributes
used by stacking overlayfs.

A mapping engine is used with 3 simple rules; the rules can
be combined to allow most useful mapping scenarios.
The ruleset is defined by -o xattrmap='rules...'.

This patch doesn't use the rule maps yet.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20201023165812.36028-2-dgilbert@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
docs/tools/virtiofsd.rst
tools/virtiofsd/passthrough_ll.c