cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-vnc-allow-to-connect-with-add_client-when-vnc-none.patch

9ae3a8
From d8e67658b944a2b0f235c4384909c2efce4671bd Mon Sep 17 00:00:00 2001
9ae3a8
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
9ae3a8
Date: Fri, 9 Jun 2017 14:23:37 +0200
9ae3a8
Subject: [PATCH 1/4] vnc: allow to connect with add_client when -vnc none
9ae3a8
MIME-Version: 1.0
9ae3a8
Content-Type: text/plain; charset=UTF-8
9ae3a8
Content-Transfer-Encoding: 8bit
9ae3a8
9ae3a8
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
9ae3a8
Message-id: <20170609142337.10457-1-marcandre.lureau@redhat.com>
9ae3a8
Patchwork-id: 75568
9ae3a8
O-Subject: [RHEL-7.4 qemu-kvm PATCH] vnc: allow to connect with add_client when -vnc none
9ae3a8
Bugzilla: 1435352
9ae3a8
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
9ae3a8
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
9ae3a8
Do not skip VNC initialization, in particular of auth method when vnc is
9ae3a8
configured without sockets, since we should still allow connections
9ae3a8
through QMP add_client.
9ae3a8
9ae3a8
Upstream-status: similar to commit fa03cb7fd212. However, the upstream
9ae3a8
code changed significantly, so the patch is different.
9ae3a8
9ae3a8
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 ui/vnc.c | 4 +---
9ae3a8
 1 file changed, 1 insertion(+), 3 deletions(-)
9ae3a8
9ae3a8
diff --git a/ui/vnc.c b/ui/vnc.c
9ae3a8
index 1834db0..29b216c 100644
9ae3a8
--- a/ui/vnc.c
9ae3a8
+++ b/ui/vnc.c
9ae3a8
@@ -2993,8 +2993,6 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
9ae3a8
         return;
9ae3a8
     }
9ae3a8
     vnc_display_close(ds);
9ae3a8
-    if (strcmp(display, "none") == 0)
9ae3a8
-        return;
9ae3a8
 
9ae3a8
     vs->display = g_strdup(display);
9ae3a8
     vs->share_policy = VNC_SHARE_POLICY_ALLOW_EXCLUSIVE;
9ae3a8
@@ -3219,7 +3217,7 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
9ae3a8
             goto fail;
9ae3a8
         }
9ae3a8
         vnc_connect(vs, csock, 0, 0);
9ae3a8
-    } else {
9ae3a8
+    } else if (strcmp(display, "none")) {
9ae3a8
         /* listen for connects */
9ae3a8
         char *dpy;
9ae3a8
         dpy = g_malloc(256);
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8