]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/pve/0016-PVE-qapi-modify-spice-query.patch
update patches for v4.0.0
[pve-qemu.git] / debian / patches / pve / 0016-PVE-qapi-modify-spice-query.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 Date: Wed, 9 Dec 2015 14:32:11 +0100
4 Subject: [PATCH] PVE: qapi: modify spice query
5
6 Provide the last ticket in the SpiceInfo struct optionally.
7
8 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 ---
10 qapi/ui.json | 3 +++
11 ui/spice-core.c | 5 +++++
12 2 files changed, 8 insertions(+)
13
14 diff --git a/qapi/ui.json b/qapi/ui.json
15 index 59e412139a..bcd781a1b9 100644
16 --- a/qapi/ui.json
17 +++ b/qapi/ui.json
18 @@ -211,11 +211,14 @@
19 #
20 # @channels: a list of @SpiceChannel for each active spice channel
21 #
22 +# @ticket: The last ticket set with set_password
23 +#
24 # Since: 0.14.0
25 ##
26 { 'struct': 'SpiceInfo',
27 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
28 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
29 + '*ticket': 'str',
30 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
31 'if': 'defined(CONFIG_SPICE)' }
32
33 diff --git a/ui/spice-core.c b/ui/spice-core.c
34 index 5593dfcb06..bd80c18210 100644
35 --- a/ui/spice-core.c
36 +++ b/ui/spice-core.c
37 @@ -538,6 +538,11 @@ SpiceInfo *qmp_query_spice(Error **errp)
38 micro = SPICE_SERVER_VERSION & 0xff;
39 info->compiled_version = g_strdup_printf("%d.%d.%d", major, minor, micro);
40
41 + if (auth_passwd) {
42 + info->has_ticket = true;
43 + info->ticket = g_strdup(auth_passwd);
44 + }
45 +
46 if (port) {
47 info->has_port = true;
48 info->port = port;
49 --
50 2.20.1
51