[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/25] qcow2: don't permit changing encryption parame
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 04/25] qcow2: don't permit changing encryption parameters |
Date: |
Fri, 17 Nov 2017 19:16:32 +0100 |
From: "Daniel P. Berrange" <address@hidden>
Currently if trying to change encryption parameters on a qcow2 image, qemu-img
will abort. We already explicitly check for attempt to change encrypt.format
but missed other parameters like encrypt.key-secret. Rather than list each
parameter, just blacklist changing of all parameters with a 'encrypt.' prefix.
Signed-off-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index b3d66a0e88..92e5d548e3 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -4069,6 +4069,9 @@ static int qcow2_amend_options(BlockDriverState *bs,
QemuOpts *opts,
error_report("Changing the encryption format is not
supported");
return -ENOTSUP;
}
+ } else if (g_str_has_prefix(desc->name, "encrypt.")) {
+ error_report("Changing the encryption parameters is not
supported");
+ return -ENOTSUP;
} else if (!strcmp(desc->name, BLOCK_OPT_CLUSTER_SIZE)) {
cluster_size = qemu_opt_get_size(opts, BLOCK_OPT_CLUSTER_SIZE,
cluster_size);
--
2.13.6
- [Qemu-devel] [PULL 00/25] Block layer patches for 2.11.0-rc2, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 02/25] qemu-iotests: Use -nographic in 182, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 03/25] block: Fix error path in bdrv_backing_update_filename(), Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 04/25] qcow2: don't permit changing encryption parameters,
Kevin Wolf <=
- [Qemu-devel] [PULL 01/25] replication: Fix replication open fail, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 05/25] block: Deprecate bdrv_set_read_only() and users, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 07/25] block: Fix permissions in image activation, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 06/25] qcow2: fix image corruption after committing qcow2 image into base, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 13/25] block: qobject_is_equal() in bdrv_reopen_prepare(), Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 08/25] iotests: test clearing unknown autoclear_features by qcow2, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 11/25] qapi/qlist: Add qlist_append_null() macro, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 10/25] qapi/qnull: Add own header, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 09/25] qcow2: fix image corruption on commit with persistent bitmap, Kevin Wolf, 2017/11/17
- [Qemu-devel] [PULL 12/25] qapi: Add qobject_is_equal(), Kevin Wolf, 2017/11/17