Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d6df2e4 authored by Diego Ongaro's avatar Diego Ongaro Committed by Jeremy Fitzhardinge
Browse files

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: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent fb27cfbc
Loading
Loading
Loading
Loading
+2 −16
Original line number Diff line number Diff line
@@ -486,21 +486,6 @@ static ssize_t xenbus_file_write(struct file *filp,
	msg_type = u->u.msg.type;

	switch (msg_type) {
	case XS_TRANSACTION_START:
	case XS_TRANSACTION_END:
	case XS_DIRECTORY:
	case XS_READ:
	case XS_GET_PERMS:
	case XS_RELEASE:
	case XS_GET_DOMAIN_PATH:
	case XS_WRITE:
	case XS_MKDIR:
	case XS_RM:
	case XS_SET_PERMS:
		/* Send out a transaction */
		ret = xenbus_write_transaction(msg_type, u);
		break;

	case XS_WATCH:
	case XS_UNWATCH:
		/* (Un)Ask for some path to be watched for changes */
@@ -508,7 +493,8 @@ static ssize_t xenbus_file_write(struct file *filp,
		break;

	default:
		ret = -EINVAL;
		/* Send out a transaction */
		ret = xenbus_write_transaction(msg_type, u);
		break;
	}
	if (ret != 0)