File cb182f7e-skip-authentication-only-for-VNC-with-listen-type-none.patch of Package virt-manager
Subject: graphics: skip authentication only for VNC with listen type none
From: Pavel Hrdina phrdina@redhat.com Thu Mar 23 15:26:19 2017 +0100
Date: Thu Mar 23 15:26:19 2017 +0100:
Git: cb182f7e3a569bde926818a4c55bb8427fba2728
This is in fact a bug in QEMU so we have to workaround this issue
to allow to connect to guest with VNC and listen type none.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1434551
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
diff --git a/virtManager/domain.py b/virtManager/domain.py
index 3478cc58..fc5f54a6 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -1190,8 +1190,17 @@ class vmmDomain(vmmLibvirtObject):
return self._backend.openConsole(devname, stream, flags)
def open_graphics_fd(self):
- return self._backend.openGraphicsFD(0,
- libvirt.VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH)
+ flags = 0
+
+ # Ugly workaround for VNC bug where the display cannot be opened
+ # if the listen type is "none". When this gets fixed in QEMU
+ # we should skip auth only for broken QEMUs.
+ graphics = self.get_graphics_devices()[0]
+ if (graphics.type == "vnc" and
+ graphics.get_first_listen_type() == "none"):
+ flags = libvirt.VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH
+
+ return self._backend.openGraphicsFD(0, flags)
def refresh_snapshots(self):
self._snapshot_list = None