qcow2: don't permit changing encryption parameters
commitf66afbe26f0c093d639610d70d16d7cc3183b652
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 3 Nov 2017 14:39:02 +0000 (3 14:39 +0000)
committerKevin Wolf <kwolf@redhat.com>
Fri, 17 Nov 2017 12:35:59 +0000 (17 13:35 +0100)
treec0e99bd4c9af4d32a156c60e91f74efdf79814d9
parent6473069416ddbb0ef4dccca9bffe87c1424f45fa
qcow2: don't permit changing encryption parameters

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 <berrange@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2.c