ia64/xen-unstable

changeset 14888:9e44519ee9a2

xenstored: Only dom0 can do XS_DEBUG in non-test environments.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Sat Apr 21 11:37:34 2007 +0100 (2007-04-21)
parents 55135bf6eb44
children 9313d0ce09f8 80304d79a78c
files tools/xenstore/xenstored_core.c
line diff
     1.1 --- a/tools/xenstore/xenstored_core.c	Fri Apr 20 17:56:28 2007 +0100
     1.2 +++ b/tools/xenstore/xenstored_core.c	Sat Apr 21 11:37:34 2007 +0100
     1.3 @@ -1163,6 +1163,13 @@ static void do_debug(struct connection *
     1.4  {
     1.5  	int num;
     1.6  
     1.7 +#ifndef TESTING
     1.8 +	if (conn->id != 0) {
     1.9 +		send_error(conn, EACCES);
    1.10 +		return;
    1.11 +	}
    1.12 +#endif
    1.13 +
    1.14  	num = xs_count_strings(in->buffer, in->used);
    1.15  
    1.16  	if (streq(in->buffer, "print")) {