qemu-e2k/tools/virtiofsd
Vivek Goyal 5afc8df46c 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>
2021-10-25 18:48:23 +01:00
..
50-qemu-virtiofsd.json.in virtiofsd: add vhost-user.json file 2020-01-23 16:41:36 +00:00
buffer.c tools/virtiofsd/buffer.c: replaced a calloc call with GLib's g_try_new0 2021-05-26 18:39:32 +01:00
fuse_common.h virtiofsd: Fix fuse setxattr() API change issue 2021-07-05 10:51:26 +01:00
fuse_i.h tools/virtiofsd: add support for --socket-group 2020-10-12 12:39:38 +01:00
fuse_log.c Clean up includes 2020-12-10 17:16:44 +01:00
fuse_log.h Clean up includes 2020-12-10 17:16:44 +01:00
fuse_lowlevel.c virtiofsd: Add support for extended setxattr 2021-07-05 10:51:26 +01:00
fuse_lowlevel.h spelling: sytem => system 2021-09-15 15:51:07 +02:00
fuse_misc.h Clean up includes 2020-12-10 17:16:44 +01:00
fuse_opt.c tools/virtiofsd/fuse_opt.c: Replaced a malloc with GLib's g_try_malloc 2021-05-26 18:39:32 +01:00
fuse_opt.h virtiofsd: Format imported files to qemu style 2020-01-23 16:41:36 +00:00
fuse_signals.c Clean up includes 2020-12-10 17:16:44 +01:00
fuse_virtio.c virtiofsd: Reverse req_list before processing it 2021-09-16 14:50:48 +01:00
fuse_virtio.h virtiofsd: cleanup allocated resource in se 2020-01-23 16:41:37 +00:00
helper.c virtiofsd: Add an option to enable/disable posix acls 2021-07-05 10:51:26 +01:00
meson.build libvhost-user: make it a meson subproject 2020-12-08 13:48:58 -05:00
passthrough_helpers.h virtiofsd: Format imported files to qemu style 2020-01-23 16:41:36 +00:00
passthrough_ll.c virtiofsd: xattr mapping add a new type "unsupported" 2021-10-25 18:48:23 +01:00
passthrough_seccomp.c tools/virtiofsd: Add fstatfs64 syscall to the seccomp allowlist 2021-09-16 14:50:48 +01:00
passthrough_seccomp.h Clean up includes 2020-12-10 17:16:44 +01:00