xenstore: set implicit path for socket connections
authorIan Campbell <ian.campbell@citrix.com>
Thu, 16 Dec 2010 18:04:08 +0000 (18:04 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 16 Dec 2010 18:04:08 +0000 (18:04 +0000)
For now assume all such connections come from domain 0.

Failure to do this breaks various scripts which assume that they
operate relative to the domains "home directory".

This matches the behaviour of the ocaml xenstored.

Thanks to report from Olaf Hering.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/xenstore/xenstored_domain.c

index 53fb68f21da2d7032e5238d1bddaaf9e3f887d4a..7aa87cd022ebff9a40928838d17b096af33c1b8f 100644 (file)
@@ -547,7 +547,7 @@ static int close_xc_handle(void *_handle)
 const char *get_implicit_path(const struct connection *conn)
 {
        if (!conn->domain)
-               return NULL;
+               return "/local/domain/0";
        return conn->domain->path;
 }