[PATCH] libvirtd: Fix control socket path being incorrectly build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Socket path in 5.7 would result in libvirt//var/run/libvirt-sock instead of /var/run/libvirt/libvirt-sock

Signed-off-by: eater <=@eater.me>
---
 src/remote/remote_daemon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c
index 546328b24d..5d64397062 100644
--- a/src/remote/remote_daemon.c
+++ b/src/remote/remote_daemon.c
@@ -226,14 +226,14 @@ daemonUnixSocketPaths(struct daemonConfig *config,
 
     if (config->unix_sock_dir) {
         if (virAsprintf(sockfile, "%s/%s-sock",
-                        SOCK_PREFIX, config->unix_sock_dir) < 0)
+                        config->unix_sock_dir, SOCK_PREFIX) < 0)
             goto cleanup;
 
         if (privileged) {
             if (virAsprintf(rosockfile, "%s/%s-sock-ro",
-                            SOCK_PREFIX, config->unix_sock_dir) < 0 ||
+                            config->unix_sock_dir, SOCK_PREFIX) < 0 ||
                 virAsprintf(admsockfile, "%s/%s-admin-sock",
-                            SOCK_PREFIX, config->unix_sock_dir) < 0)
+                            config->unix_sock_dir, SOCK_PREFIX) < 0)
                 goto cleanup;
         }
     } else {
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux