]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/pve/0042-PBS-add-master-key-support.patch
bump version to 6.0.0-4
[pve-qemu.git] / debian / patches / pve / 0042-PBS-add-master-key-support.patch
CommitLineData
0b8da688
SR
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Stefan Reiter <s.reiter@proxmox.com>
3Date: Wed, 10 Feb 2021 11:07:06 +0100
4Subject: [PATCH] PBS: add master key support
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9this requires a new enough libproxmox-backup-qemu0, and allows querying
10from the PVE side to avoid QMP calls with unsupported parameters.
11
12Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
13Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
14---
15 block/monitor/block-hmp-cmds.c | 1 +
16 pve-backup.c | 3 +++
17 qapi/block-core.json | 7 +++++++
18 3 files changed, 11 insertions(+)
19
20diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c
8dca018b 21index 89336d93ef..b9e659a0d2 100644
0b8da688
SR
22--- a/block/monitor/block-hmp-cmds.c
23+++ b/block/monitor/block-hmp-cmds.c
8dca018b 24@@ -1028,6 +1028,7 @@ void coroutine_fn hmp_backup(Monitor *mon, const QDict *qdict)
0b8da688
SR
25 false, NULL, // PBS password
26 false, NULL, // PBS keyfile
27 false, NULL, // PBS key_password
28+ false, NULL, // PBS master_keyfile
29 false, NULL, // PBS fingerprint
30 false, NULL, // PBS backup-id
31 false, 0, // PBS backup-time
32diff --git a/pve-backup.c b/pve-backup.c
277d3345 33index f858003a06..04ebfc1e33 100644
0b8da688
SR
34--- a/pve-backup.c
35+++ b/pve-backup.c
8dca018b 36@@ -533,6 +533,7 @@ UuidInfo coroutine_fn *qmp_backup(
0b8da688
SR
37 bool has_password, const char *password,
38 bool has_keyfile, const char *keyfile,
39 bool has_key_password, const char *key_password,
40+ bool has_master_keyfile, const char *master_keyfile,
41 bool has_fingerprint, const char *fingerprint,
42 bool has_backup_id, const char *backup_id,
43 bool has_backup_time, int64_t backup_time,
8dca018b 44@@ -681,6 +682,7 @@ UuidInfo coroutine_fn *qmp_backup(
0b8da688
SR
45 has_password ? password : NULL,
46 has_keyfile ? keyfile : NULL,
47 has_key_password ? key_password : NULL,
48+ has_master_keyfile ? master_keyfile : NULL,
49 has_compress ? compress : true,
50 has_encrypt ? encrypt : has_keyfile,
51 has_fingerprint ? fingerprint : NULL,
8dca018b 52@@ -1044,5 +1046,6 @@ ProxmoxSupportStatus *qmp_query_proxmox_support(Error **errp)
e9b36665 53 ret->pbs_dirty_bitmap_savevm = true;
0b8da688 54 ret->pbs_dirty_bitmap_migration = true;
e9b36665 55 ret->query_bitmap_info = true;
0b8da688
SR
56+ ret->pbs_masterkey = true;
57 return ret;
58 }
59diff --git a/qapi/block-core.json b/qapi/block-core.json
8dca018b 60index 7b6e79df9f..6d3ea72706 100644
0b8da688
SR
61--- a/qapi/block-core.json
62+++ b/qapi/block-core.json
8dca018b 63@@ -756,6 +756,8 @@
0b8da688
SR
64 #
65 # @key-password: password for keyfile (optional for format 'pbs')
66 #
67+# @master-keyfile: PEM-formatted master public keyfile (optional for format 'pbs')
68+#
69 # @fingerprint: server cert fingerprint (optional for format 'pbs')
70 #
71 # @backup-id: backup ID (required for format 'pbs')
8dca018b 72@@ -775,6 +777,7 @@
0b8da688
SR
73 '*password': 'str',
74 '*keyfile': 'str',
75 '*key-password': 'str',
76+ '*master-keyfile': 'str',
77 '*fingerprint': 'str',
78 '*backup-id': 'str',
79 '*backup-time': 'int',
8dca018b 80@@ -827,6 +830,9 @@
0b8da688
SR
81 # migration cap if this is false/unset may lead
82 # to crashes on migration!
83 #
84+# @pbs-masterkey: True if the QMP backup call supports the 'master_keyfile'
85+# parameter.
86+#
87 # @pbs-library-version: Running version of libproxmox-backup-qemu0 library.
88 #
89 ##
8dca018b 90@@ -835,6 +841,7 @@
0b8da688 91 'query-bitmap-info': 'bool',
e9b36665 92 'pbs-dirty-bitmap-savevm': 'bool',
0b8da688
SR
93 'pbs-dirty-bitmap-migration': 'bool',
94+ 'pbs-masterkey': 'bool',
95 'pbs-library-version': 'str' } }
96
97 ##