libvirt/src/rpc
Christophe Fergeau efe6c80211 Fix daemon auto-spawning
Commit 32a9aac switched libvirt to use the XDG base directories
to locate most of its data/config. In particular, the per-user socket
for qemu:///session is now stored in the XDG runtime directory.
This directory is located by looking at the XDG_RUNTIME_DIR environment
variable, with a fallback to ~/.cache/libvirt if this variable is not
set.

When the daemon is autospawned because a client application wants
to use qemu:///session, the daemon is ran in a clean environment
which does not contain XDG_RUNTIME_DIR. It will create its socket
in ~/.cache/libvirt. If the client application has XDG_RUNTIME_DIR
set, it will not look for the socket in the fallback place, and will
fail to connect to the autospawned daemon.

This patch adds XDG_RUNTIME_DIR to the daemon environment before
auto-starting it. I've done this in virNetSocketForkDaemon rather
than in virCommandAddEnvPassCommon as I wasn't sure we want to pass
these variables to other commands libvirt spawns. XDG_CACHE_HOME
and XDG_CONFIG_HOME are also added to the daemon env as it makes use
of those as well.
2012-07-12 13:52:36 +02:00
..
gendispatch.pl Consistent style for usage of sizeof operator 2012-03-30 11:47:24 +01:00
genprotocol.pl rpc: generalize solution for VPATH builds 2012-03-08 08:49:38 -07:00
gensystemtap.pl Rewrite all the DTrace/SystemTAP probing 2011-10-11 11:26:13 +01:00
virkeepalive.c rpc: Remove unused parameter in virKeepAliveStopInternal 2012-06-13 15:53:09 +02:00
virkeepalive.h rpc: Remove unused parameter in virKeepAliveStopInternal 2012-06-13 15:53:09 +02:00
virkeepaliveprotocol.x Define keepalive protocol 2011-11-24 11:44:08 +01:00
virnetclient.c client rpc: Fix error checking after poll() 2012-06-13 16:01:27 +02:00
virnetclient.h keepalive: Add ability to disable keepalive messages 2012-04-26 11:35:34 +02:00
virnetclientprogram.c Split virNetClientSend into 2 methods 2011-11-16 10:48:46 +00:00
virnetclientprogram.h Add client side support for FD passing 2011-10-28 10:42:54 +01:00
virnetclientstream.c Fix sync issue in virNetClientStreamEventRemoveCallback 2012-06-04 09:32:37 +02:00
virnetclientstream.h stream: Check for stream EOF 2012-01-12 12:02:40 +01:00
virnetmessage.c rpc: Fix memleak in virNetMessageEncodeHeader 2012-06-11 17:02:49 +02:00
virnetmessage.h rpc: Switch to dynamically allocated message buffer 2012-06-05 17:48:40 +02:00
virnetprotocol.x rpc: Size up RPC limits 2012-06-05 17:48:40 +02:00
virnetsaslcontext.c Consistent style for usage of sizeof operator 2012-03-30 11:47:24 +01:00
virnetsaslcontext.h Generic module for handling SASL authentication & encryption 2011-06-24 11:48:25 +01:00
virnetserver.c Allow RPC server to run single threaded 2012-07-05 10:46:09 +01:00
virnetserver.h Add a opaque parameter to the RPC client init callback 2012-07-05 10:46:09 +01:00
virnetserverclient.c server rpc: Remove APIs for manipulating filters on locked client 2012-06-13 15:56:41 +02:00
virnetserverclient.h Rename APIs for fetching UNIX socket credentials 2012-01-19 15:39:52 +00:00
virnetservermdns.c Fix memory leaks in MDNS code 2011-07-26 08:09:18 +08:00
virnetservermdns.h Introduce generic RPC module for advertising via MDNS 2011-06-24 11:48:41 +01:00
virnetserverprogram.c virterror.c: Fix several spelling mistakes 2012-02-03 11:32:51 -07:00
virnetserverprogram.h Extend RPC server to allow FD passing 2011-10-28 10:43:00 +01:00
virnetserverservice.c Support changing UNIX socket owner in virNetSocketNewListenUNIX 2011-08-15 15:21:31 +02:00
virnetserverservice.h daemon: Unlink unix socket paths on shutdown 2011-08-04 16:54:58 +08:00
virnetsocket.c Fix daemon auto-spawning 2012-07-12 13:52:36 +02:00
virnetsocket.h Rename APIs for fetching UNIX socket credentials 2012-01-19 15:39:52 +00:00
virnettlscontext.c Remove uid param from directory lookup APIs 2012-05-28 10:55:06 +01:00
virnettlscontext.h daemon: Move TLS initialization to virInitialize 2011-08-25 10:22:03 +02:00