]> xenbits.xensource.com Git - libvirt.git/commit
storage: Don't allow encryption secretPath to be NULL
authorJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jun 2018 16:05:31 +0000 (12:05 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 26 Jun 2018 18:02:43 +0000 (14:02 -0400)
commitb056e09b28758e69c34dbf215219904d9975bc64
tree2008400ea8ccc382d7abf12938c3329ee93f8bf6
parent5b603a7870687a52a77c4c5a247888d6ae3f0487
storage: Don't allow encryption secretPath to be NULL

Allowing a NULL @secretPath for virStorageBackendCreateQemuImgCmdFromVol
would result in a generated command line with a dangling "file=" output.
So let's make sure the @secretPath exists before processing.

This means we should pass a dummy path from the storage test.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
src/storage/storage_util.c
tests/storagevolxml2argvtest.c