aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstored_core.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-04-21 11:37:34 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-04-21 11:37:34 +0100
commit83d7cbcd071f694f0f0c8fcd7101cf6f022945b2 (patch)
tree96bedbeeed59f39995e3f230d610c8e86943cbd3 /tools/xenstore/xenstored_core.c
parentedec108b0652be7ad77e2296a996bcabe2bb0cc4 (diff)
downloadxen-83d7cbcd071f694f0f0c8fcd7101cf6f022945b2.tar.gz
xen-83d7cbcd071f694f0f0c8fcd7101cf6f022945b2.tar.bz2
xen-83d7cbcd071f694f0f0c8fcd7101cf6f022945b2.zip
xenstored: Only dom0 can do XS_DEBUG in non-test environments.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/xenstore/xenstored_core.c')
-rw-r--r--tools/xenstore/xenstored_core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index 461395832a..d128884221 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -1163,6 +1163,13 @@ static void do_debug(struct connection *conn, struct buffered_data *in)
{
int num;
+#ifndef TESTING
+ if (conn->id != 0) {
+ send_error(conn, EACCES);
+ return;
+ }
+#endif
+
num = xs_count_strings(in->buffer, in->used);
if (streq(in->buffer, "print")) {