From: Daniel P. Berrange Date: Thu, 3 May 2012 12:40:32 +0000 (+0100) Subject: Move user libvirtd socket out of abstract namespace X-Git-Tag: v0.9.13-rc1~267 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=905be03d20ef4d20c6356eeb5231718aae18debb;p=thirdparty%2Flibvirt.git Move user libvirtd socket out of abstract namespace The current unprivileged user libvirtd sockets are in the abstract namespace. This has a number of problems - You can't connect to them remotely using the nc/ssh tunnel - This is not portable for OS-X, BSD & probably others - Parent directory permissions don't apply --- diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 5830069c90..2696c54896 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -300,7 +300,7 @@ daemonUnixSocketPaths(struct daemonConfig *config, } umask(old_umask); - if (virAsprintf(sockfile, "@%s/libvirt-sock", rundir) < 0) { + if (virAsprintf(sockfile, "%s/libvirt-sock", rundir) < 0) { VIR_FREE(rundir); goto no_memory; } diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 4a9299a5e9..5c87561383 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -583,7 +583,7 @@ doRemoteOpen (virConnectPtr conn, if (!userdir) goto failed; - if (virAsprintf(&sockname, "@%s/" LIBVIRTD_USER_UNIX_SOCKET, userdir) < 0) { + if (virAsprintf(&sockname, "%s/" LIBVIRTD_USER_UNIX_SOCKET, userdir) < 0) { VIR_FREE(userdir); goto out_of_memory; }