mirror of https://gitee.com/openkylin/libvirt.git
qemu: domain: Forbid TLS setup for disk protocols not supporting it
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
3f5054f145
commit
aa163d2513
|
@ -9988,6 +9988,12 @@ qemuDomainPrepareStorageSourceTLS(virStorageSourcePtr src,
|
||||||
case VIR_STORAGE_NET_PROTOCOL_FTPS:
|
case VIR_STORAGE_NET_PROTOCOL_FTPS:
|
||||||
case VIR_STORAGE_NET_PROTOCOL_TFTP:
|
case VIR_STORAGE_NET_PROTOCOL_TFTP:
|
||||||
case VIR_STORAGE_NET_PROTOCOL_SSH:
|
case VIR_STORAGE_NET_PROTOCOL_SSH:
|
||||||
|
if (src->haveTLS == VIR_TRISTATE_BOOL_YES) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
_("TLS transport is not supported for disk protocol '%s'"),
|
||||||
|
virStorageNetProtocolTypeToString(src->protocol));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_STORAGE_NET_PROTOCOL_NONE:
|
case VIR_STORAGE_NET_PROTOCOL_NONE:
|
||||||
|
|
Loading…
Reference in New Issue