mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
remote: Refuse connecting to remote socket
If users wants to connect to remote unix socket, e.g. 'qemu+unix://<remote>/system' currently the <remote> part is ignored, ending up connecting to localhost. Connecting to remote socket is not supported and user should have used TLS/TCP/SSH instead.
This commit is contained in:
parent
6c7299d47d
commit
c4f91b144c
@ -325,9 +325,17 @@ doRemoteOpen (virConnectPtr conn,
|
||||
} else {
|
||||
if (STRCASEEQ (transport_str, "tls"))
|
||||
transport = trans_tls;
|
||||
else if (STRCASEEQ (transport_str, "unix"))
|
||||
transport = trans_unix;
|
||||
else if (STRCASEEQ (transport_str, "ssh"))
|
||||
else if (STRCASEEQ (transport_str, "unix")) {
|
||||
if (conn->uri->server) {
|
||||
remoteError(VIR_ERR_INVALID_ARG,
|
||||
_("using unix socket and remote "
|
||||
"server '%s' is not supported."),
|
||||
conn->uri->server);
|
||||
return VIR_DRV_OPEN_ERROR;
|
||||
} else {
|
||||
transport = trans_unix;
|
||||
}
|
||||
} else if (STRCASEEQ (transport_str, "ssh"))
|
||||
transport = trans_ssh;
|
||||
else if (STRCASEEQ (transport_str, "ext"))
|
||||
transport = trans_ext;
|
||||
|
Loading…
x
Reference in New Issue
Block a user