From ec78c9a0ffd5d3b0cafde30e703d61d8cbcd49c6 Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Fri, 6 Sep 2019 23:36:17 +0200 Subject: [PATCH] remote: fix UNIX socket path being incorrectly built for libvirtd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As a result of changes in commit d5f0c1b6dd51f0fbab2f8a25733c55d8be6b937b Author: Daniel P. Berrangé Date: Thu Jul 18 12:30:22 2019 +0100 remote: stop trying to print help as giant blocks of text The socket path built would be libvirt//var/run/libvirt-sock instead of /var/run/libvirt/libvirt-sock. Fortunately this only affects users who have set the 'unix_sock_dir' config parameter in /etc/libvirt/libvirtd.conf, which is pretty rare/unusual. Signed-off-by: eater <=@eater.me> Exception made for the psuedonym above since patch is considered trivial & thus non-copyrightable material. Signed-off-by: Daniel P. Berrangé --- 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 {