When the default driver mode requests the modular daemons, we still
defaulted to spawning libvirtd if the URI was NULL, because we don't
know which driver specific daemon to spawn. virtproxyd has logic
that can handle this as it is used for compatibility when accepting
incoming TCP connections with a NULL URI.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/remote/remote_sockets.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/remote/remote_sockets.c b/src/remote/remote_sockets.c
index cce6703e75..ed4e4a329c 100644
--- a/src/remote/remote_sockets.c
+++ b/src/remote/remote_sockets.c
@@ -171,14 +171,15 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
remoteDriverModeTypeToString(mode),
driver, flags);
- if (driver)
+ if (driver) {
direct_daemon = g_strdup_printf("virt%sd", driver);
-
- legacy_daemon = g_strdup("libvirtd");
-
- if (driver)
direct_sock_name = remoteGetUNIXSocketHelper(transport, direct_daemon, flags);
+ } else {
+ direct_daemon = g_strdup("virtproxyd");
+ direct_sock_name = remoteGetUNIXSocketHelper(transport, "libvirt",
flags);
+ }
+ legacy_daemon = g_strdup("libvirtd");
legacy_sock_name = remoteGetUNIXSocketHelper(transport, "libvirt", flags);
if (mode == REMOTE_DRIVER_MODE_AUTO) {
@@ -187,14 +188,12 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
mode = REMOTE_DRIVER_MODE_DIRECT;
} else if (virFileExists(legacy_sock_name)) {
mode = REMOTE_DRIVER_MODE_LEGACY;
- } else if (driver) {
+ } else {
/*
* This constant comes from the configure script and
* maps to either the direct or legacy mode constant
*/
mode = REMOTE_DRIVER_MODE_DEFAULT;
- } else {
- mode = REMOTE_DRIVER_MODE_LEGACY;
}
} else {
mode = REMOTE_DRIVER_MODE_LEGACY;
--
2.31.1