[libvirt] [PATCH] Move user libvirtd socket out of abstract namespace

From: "Daniel P. Berrange" <berrange@redhat.com> 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 - 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 5830069..2696c54 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 4a9299a..5c87561 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; } -- 1.7.10.1

On 05/14/2012 08:18 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
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
or BSD
- Parent directory permissions don't apply --- daemon/libvirtd.c | 2 +- src/remote/remote_driver.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
ACK. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Daniel P. Berrange
-
Eric Blake