Fix handling of the entries-per-domain quota. Entries which are created by
authorEwan Mellor <ewan@xensource.com>
Mon, 13 Nov 2006 10:43:29 +0000 (10:43 +0000)
committerEwan Mellor <ewan@xensource.com>
Mon, 13 Nov 2006 10:43:29 +0000 (10:43 +0000)
commitdb34d2aaa5f5eb5826a939fe8eacb91432a87d42
tree3ca8ca28a68e078e67ac2c9e39b539b0fb06a99c
parentede7828af2f265d3a40abe8905611861c0f88867
Fix handling of the entries-per-domain quota.  Entries which are created by
the guest but deleted by dom0 were remaining accounted against the guest,
which meant that the guest would eventually run out of quota.

This patch also prevents unprivileged domains from changing the owner of a
node.  One guest could attack another by creating nodes and then transferring
them to the ownership of another, and though the accounting could be made to
work properly in this case, domains should never be transferring nodes in any
case, so it seems safer just to disallow the operation entirely.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_domain.c
tools/xenstore/xenstored_domain.h