aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorDiego Ongaro <diego.ongaro@citrix.com>2010-09-01 12:18:54 -0400
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-09-01 12:25:41 -0400
commit6d6df2e412297b8047c407b3abcd045a67c96744 (patch)
treee333023929e8669d533598b1437ae8cf9a992c2e /drivers/xen
parentfb27cfbcbd2865b0e731c4aae47df71778da805e (diff)
xenbus: allow any xenbus command over /proc/xen/xenbus
When xenstored is in another domain, we need to be able to send any command over xenbus. This doesn't pose a security problem because its up to xenstored to determine whether a given client is allowed to use a particular command anyway. From linux-2.5.18-xen.hg 68d582b0ad05. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/xenfs/xenbus.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/xen/xenfs/xenbus.c b/drivers/xen/xenfs/xenbus.c
index d2a905826804..46cf4048e60e 100644
--- a/drivers/xen/xenfs/xenbus.c
+++ b/drivers/xen/xenfs/xenbus.c
@@ -486,21 +486,6 @@ static ssize_t xenbus_file_write(struct file *filp,
486 msg_type = u->u.msg.type; 486 msg_type = u->u.msg.type;
487 487
488 switch (msg_type) { 488 switch (msg_type) {
489 case XS_TRANSACTION_START:
490 case XS_TRANSACTION_END:
491 case XS_DIRECTORY:
492 case XS_READ:
493 case XS_GET_PERMS:
494 case XS_RELEASE:
495 case XS_GET_DOMAIN_PATH:
496 case XS_WRITE:
497 case XS_MKDIR:
498 case XS_RM:
499 case XS_SET_PERMS:
500 /* Send out a transaction */
501 ret = xenbus_write_transaction(msg_type, u);
502 break;
503
504 case XS_WATCH: 489 case XS_WATCH:
505 case XS_UNWATCH: 490 case XS_UNWATCH:
506 /* (Un)Ask for some path to be watched for changes */ 491 /* (Un)Ask for some path to be watched for changes */
@@ -508,7 +493,8 @@ static ssize_t xenbus_file_write(struct file *filp,
508 break; 493 break;
509 494
510 default: 495 default:
511 ret = -EINVAL; 496 /* Send out a transaction */
497 ret = xenbus_write_transaction(msg_type, u);
512 break; 498 break;
513 } 499 }
514 if (ret != 0) 500 if (ret != 0)