From 905be03d20ef4d20c6356eeb5231718aae18debb Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 3 May 2012 13:40:32 +0100 Subject: [PATCH] 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 --- daemon/libvirtd.c | 2 +- src/remote/remote_driver.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.47.2