]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: fix UNIX socket chardevs operating in client mode
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 6 Jul 2018 10:00:11 +0000 (11:00 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 6 Jul 2018 13:31:35 +0000 (14:31 +0100)
commit6aedf9bfad3aad1139d1413cf9b9b0327c735097
tree7a7aebc48446baf05ee9b119a350b73e88abf66f
parent78920738ca20f8b34b759eeb28e9fa9f939524f1
qemu: fix UNIX socket chardevs operating in client mode

When support was adding for passing a pre-opened listener socket to UNIX
chardevs, it accidentally passed the listener socket for client mode
chardevs too with predictable amounts of fail resulting. This affects
libvirt when using QEMU >= 2.12

Expand the unit test coverage to validate that we are only doing FD
passing when operating in server mode.

  https://bugzilla.redhat.com/show_bug.cgi?id=1598440

Tested-by: Richard W.M. Jones <rjones@redhat.com>
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit 1bc1a7e3205f7ef75ebd8fd1ef7653f8e181e3d2)
src/qemu/qemu_command.c
tests/qemuxml2argvdata/serial-unix-chardev.args
tests/qemuxml2argvdata/serial-unix-chardev.x86_64-latest.args [new file with mode: 0644]
tests/qemuxml2argvdata/serial-unix-chardev.xml
tests/qemuxml2argvtest.c