There has been comments on this patch, but i forgot adding this patch to
the list, just forward it again.
Recently I'm working on a fd passing issue, selinux forbids qemu to
create a unix socket for a chardev when managing VMs with libvirt,
because qemu don't have sufficient permissions in this case, and
proposal from libvirt team is opening the 'fd' in libvirt and merely
passing it to qemu.
I finished a RFC patch for Unix socket after a glance of the code,
and not sure if this is right or there maybe other side-effects,
please point me out.
I tested it for both server and client mode 'PF_UNIX' socket with a VM
running vhost-user.
Old command line:
-chardev socket,id=char0,path=/var/run/openvswitch/vhost-user1,server
New command line:
-chardev
socket,id=char0,path=/var/run/openvswitch/vhost-user1,server,sockfd=$n
because unix socket is bundled with a path, so it should be kept even
with the
'fd' is indicated, this looks odd, any comments?
Wei Xu (3):
chardev: add new socket fd parameter for unix socket
chardev: save the passed in 'fd' parameter during parsing
sockets: replace creating a new socket with the record one
qapi-schema.json | 3 ++-
qemu-char.c | 10 ++++++++++
util/qemu-sockets.c | 25 +++++++++++++++++--------
3 files changed, 29 insertions(+), 9 deletions(-)
--
2.7.1