mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemuDomainStorageSourceHasAuth: Don't decide based on protocol
The validation should be the only point to decide whether authentication is supported for a disk backing protocol. The rest of the code can then simply always enable it. This also fixes a crash when authentication is requested e.g. for a HTTP backed disk as the blockdev props formatter expects that it was already set up. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
4c6498d48a
commit
6fe2ca9ac1
@ -1236,9 +1236,7 @@ qemuDomainStorageSourceHasAuth(virStorageSource *src)
|
||||
{
|
||||
if (!virStorageSourceIsEmpty(src) &&
|
||||
virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK &&
|
||||
src->auth &&
|
||||
(src->protocol == VIR_STORAGE_NET_PROTOCOL_ISCSI ||
|
||||
src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD))
|
||||
src->auth)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user