Revert "virnetsocket: Provide socket address format in a more standard form"

This partially reverts commit 9b45c9f049.

It changed the default format of socket address from the one SASL
requires, but did not adjust all the callers.

It also removed the test coverage for it.

Revert most of the changes except the virSocketAddrFormatFull support
for URI-formatted strings.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1345743 while
reverting the format used by virt-admin's client-info command from
the URI one to the SASL one.

https://bugzilla.redhat.com/show_bug.cgi?id=1345743
This commit is contained in:
Ján Tomko
2016-06-20 15:22:44 +02:00
parent 6d7ba87359
commit 0f7eeb20ad
9 changed files with 9 additions and 67 deletions

View File

@@ -3016,8 +3016,6 @@ remoteDispatchAuthSaslInit(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetSASLSessionPtr sasl = NULL;
struct daemonClientPrivate *priv =
virNetServerClientGetPrivateData(client);
char *localAddr = NULL;
char *remoteAddr = NULL;
virMutexLock(&priv->lock);
@@ -3028,17 +3026,10 @@ remoteDispatchAuthSaslInit(virNetServerPtr server ATTRIBUTE_UNUSED,
goto authfail;
}
localAddr = virNetServerClientLocalAddrFormatSASL(client);
remoteAddr = virNetServerClientRemoteAddrFormatSASL(client);
sasl = virNetSASLSessionNewServer(saslCtxt,
"libvirt",
localAddr,
remoteAddr);
VIR_FREE(localAddr);
VIR_FREE(remoteAddr);
virNetServerClientLocalAddrString(client),
virNetServerClientRemoteAddrString(client));
if (!sasl)
goto authfail;