aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthew Daley <mattjd@gmail.com>2013-09-18 15:37:54 +1200
committerIan Campbell <ian.campbell@citrix.com>2013-09-25 13:23:12 +0100
commitb865bda00f7cf5b0703e3d23ca22c8d1f607a1dd (patch)
tree6a299b8299eba93cae1e3f386e258aad36348344 /tools
parent1a0f10a8c8673ed62c7b0cff8f8de5b97c402b7d (diff)
downloadxen-b865bda00f7cf5b0703e3d23ca22c8d1f607a1dd.tar.gz
xen-b865bda00f7cf5b0703e3d23ca22c8d1f607a1dd.tar.bz2
xen-b865bda00f7cf5b0703e3d23ca22c8d1f607a1dd.zip
xenstored: handle unlikely failure better in ask_parents
Coverity-ID: 1055277 Signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/xenstore/xenstored_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index a2cf2a66a3..0f8ba64499 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -523,8 +523,10 @@ static enum xs_perm_type ask_parents(struct connection *conn, const char *name)
} while (!streq(name, "/"));
/* No permission at root? We're in trouble. */
- if (!node)
+ if (!node) {
corrupt(conn, "No permissions file at root");
+ return XS_PERM_NONE;
+ }
return perm_for_conn(conn, node->perms, node->num_perms);
}