Commit 662d0c53 authored by Maxim Levitsky's avatar Maxim Levitsky Committed by Max Reitz
Browse files

block/crypto: disallow write sharing by default

My commit 'block/crypto: implement the encryption key management'
accidently allowed raw luks images to be shared between different
qemu processes without share-rw=on explicit override.
Fix that.

Fixes: bbfdae91 ("block/crypto: implement the encryption key management")
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1857490



Signed-off-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20200719122059.59843-2-mlevitsk@redhat.com>
Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
parent af3d6905
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -881,7 +881,7 @@ block_crypto_child_perms(BlockDriverState *bs, BdrvChild *c,
     * For backward compatibility, manually share the write
     * and resize permission
     */
    *nshared |= (BLK_PERM_WRITE | BLK_PERM_RESIZE);
    *nshared |= shared & (BLK_PERM_WRITE | BLK_PERM_RESIZE);
    /*
     * Since we are not fully a format driver, don't always request
     * the read/resize permission but only when explicitly