s/minor fix/fix crash/ in the title On Wed, Jun 06, 2018 at 04:54:20PM +0200, Katerina Koukiou wrote:
This patch fixes the case when creating a luks encrypted volume
s/This patch fixes/Fix/
via an xml file without 'secret' element. libvirtd was receiving SIGSEGV, now proper error is reported for the missing element.
(see bz 1468422)
Please use a clickable bugzilla link on a separated line: https://bugzilla.redhat.com/show_bug.cgi?id=1468422
Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx> --- src/storage/storage_util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 554fc757ed..18414ddb89 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -1277,6 +1277,13 @@ storageBackendCreateQemuImgSecretPath(virStoragePoolObjPtr pool, return NULL; } + if (!enc->secrets) {
You can use enc->secrets != 1, to match the error message. But the > 1 cause will be caught anyway later in storageBackendCreateQemuImgCheckEncryption which cannot be simply called before here because the code is overly complicated. With the bug link fixed: Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list