]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Need to properly read the crypt offset value
authorJohn Ferlan <jferlan@redhat.com>
Tue, 6 Sep 2016 21:00:30 +0000 (17:00 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 12 Sep 2016 14:05:21 +0000 (10:05 -0400)
commit2f6b750ecaff0e1d87e17d3a7c5a01218a527220
treee3e6ba92ebfa8f865e21c6b0eca19e5e7542a3c2
parentb68487c917a2cd576bbd80d423b80860c46d6d0f
storage: Need to properly read the crypt offset value

Commit id 'a48c7141' altered how to determine if a volume was encrypted
by adding a peek at an offset into the file at a specific buffer location.
Unfortunately, all that was compared was the first "char" of the buffer
against the expect "int" value.

Restore the virReadBufInt32BE to get the complete field in order to
compare against the expected value from the qcow2EncryptionInfo or
qcow1EncryptionInfo "modeValue" field.

This restores the capability to create a volume with encryption, then
refresh the pool, and still find the encryption for the volume.
src/util/virstoragefile.c