]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Move user libvirtd socket out of abstract namespace
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 3 May 2012 12:40:32 +0000 (13:40 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 15 May 2012 15:29:55 +0000 (16:29 +0100)
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

daemon/libvirtd.c
src/remote/remote_driver.c

index 5830069c90cdbca21112715482641c94258dd7d5..2696c548964be36cc07a4efd7d9520a6f1c20ce3 100644 (file)
@@ -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;
             }
index 4a9299a5e94fd7c82158e5d1ffc758159fe08b3c..5c87561383600e6bcf36949845f0816a2f3f4979 100644 (file)
@@ -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;
                 }