]> xenbits.xensource.com Git - libvirt.git/commit
Provide missing passphrase when creating a volume.
authorMiloslav Trmač <mitr@redhat.com>
Fri, 14 Aug 2009 18:06:59 +0000 (20:06 +0200)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Sep 2009 13:55:17 +0000 (14:55 +0100)
commitcd6a9334b6b5fb900f479f38e69de07f1a449e5e
tree75d04259efc8f2f03706a14b9ebb643d833282cc
parent2db2c5a186925ce7ffbc9dc5016f2cc1d50214fe
Provide missing passphrase when creating a volume.

If the <encryption format='qcow'> element does not specify a secret
during volume creation, generate a suitable secret and add it to the
<encryption> tag.  The caller can view the updated <encryption> tag
using virStorageVolGetXMLDesc().

Similarly, when <encryption format='default'/> is specified while
creating a qcow or qcow2-formatted volume, change the format to "qcow"
and generate a secret as described above.

* src/storage_encryption_conf.h (VIR_STORAGE_QCOW_PASSPHRASE_SIZE,
  virStorageGenerateQcowPasphrase),
  src/storage_encryption_conf.c (virStorageGenerateQcowPasphrase),
  src/libvirt_private.syms: Add virStorageGenerateQcowPasphrase().
* src/storage_backend.c (virStoragegenerateQcowEncryption,
  virStorageBackendCreateQemuImg): Generate a passphrase and
  <encryption> when creating a qcow-formatted encrypted volume and the
  user did not supply the information.
src/libvirt_private.syms
src/storage_backend.c
src/storage_encryption_conf.c
src/storage_encryption_conf.h