]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/pve/0044-PBS-add-master-key-support.patch
update submodule and patches to QEMU 8.0.0
[pve-qemu.git] / debian / patches / pve / 0044-PBS-add-master-key-support.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Stefan Reiter <s.reiter@proxmox.com>
3 Date: Wed, 10 Feb 2021 11:07:06 +0100
4 Subject: [PATCH] PBS: add master key support
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 this requires a new enough libproxmox-backup-qemu0, and allows querying
10 from the PVE side to avoid QMP calls with unsupported parameters.
11
12 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
13 Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
14 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 [FE: adapt to QAPI change dropping redundant has_*]
16 Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
17 ---
18 block/monitor/block-hmp-cmds.c | 1 +
19 pve-backup.c | 3 +++
20 qapi/block-core.json | 7 +++++++
21 3 files changed, 11 insertions(+)
22
23 diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c
24 index bcf5849196..fb881056e9 100644
25 --- a/block/monitor/block-hmp-cmds.c
26 +++ b/block/monitor/block-hmp-cmds.c
27 @@ -1051,6 +1051,7 @@ void coroutine_fn hmp_backup(Monitor *mon, const QDict *qdict)
28 NULL, // PBS password
29 NULL, // PBS keyfile
30 NULL, // PBS key_password
31 + NULL, // PBS master_keyfile
32 NULL, // PBS fingerprint
33 NULL, // PBS backup-id
34 false, 0, // PBS backup-time
35 diff --git a/pve-backup.c b/pve-backup.c
36 index 378e4a9a63..504c11657a 100644
37 --- a/pve-backup.c
38 +++ b/pve-backup.c
39 @@ -531,6 +531,7 @@ UuidInfo coroutine_fn *qmp_backup(
40 const char *password,
41 const char *keyfile,
42 const char *key_password,
43 + const char *master_keyfile,
44 const char *fingerprint,
45 const char *backup_id,
46 bool has_backup_time, int64_t backup_time,
47 @@ -679,6 +680,7 @@ UuidInfo coroutine_fn *qmp_backup(
48 password,
49 keyfile,
50 key_password,
51 + master_keyfile,
52 has_compress ? compress : true,
53 has_encrypt ? encrypt : !!keyfile,
54 fingerprint,
55 @@ -1038,5 +1040,6 @@ ProxmoxSupportStatus *qmp_query_proxmox_support(Error **errp)
56 ret->pbs_dirty_bitmap_savevm = true;
57 ret->pbs_dirty_bitmap_migration = true;
58 ret->query_bitmap_info = true;
59 + ret->pbs_masterkey = true;
60 return ret;
61 }
62 diff --git a/qapi/block-core.json b/qapi/block-core.json
63 index 93d924ef79..568feb63ad 100644
64 --- a/qapi/block-core.json
65 +++ b/qapi/block-core.json
66 @@ -908,6 +908,8 @@
67 #
68 # @key-password: password for keyfile (optional for format 'pbs')
69 #
70 +# @master-keyfile: PEM-formatted master public keyfile (optional for format 'pbs')
71 +#
72 # @fingerprint: server cert fingerprint (optional for format 'pbs')
73 #
74 # @backup-id: backup ID (required for format 'pbs')
75 @@ -927,6 +929,7 @@
76 '*password': 'str',
77 '*keyfile': 'str',
78 '*key-password': 'str',
79 + '*master-keyfile': 'str',
80 '*fingerprint': 'str',
81 '*backup-id': 'str',
82 '*backup-time': 'int',
83 @@ -979,6 +982,9 @@
84 # migration cap if this is false/unset may lead
85 # to crashes on migration!
86 #
87 +# @pbs-masterkey: True if the QMP backup call supports the 'master_keyfile'
88 +# parameter.
89 +#
90 # @pbs-library-version: Running version of libproxmox-backup-qemu0 library.
91 #
92 ##
93 @@ -987,6 +993,7 @@
94 'query-bitmap-info': 'bool',
95 'pbs-dirty-bitmap-savevm': 'bool',
96 'pbs-dirty-bitmap-migration': 'bool',
97 + 'pbs-masterkey': 'bool',
98 'pbs-library-version': 'str' } }
99
100 ##