diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2012-01-28 13:49:05 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2012-01-28 13:49:05 +0000 |
commit | e60e5c9642a733ac951203e4d349ccb2609c97ef (patch) | |
tree | e8c8793fd78dad9b1eb0ce8d7f86b1731eedd953 /xen/xsm | |
parent | 4c4b722d452e99db6c42f356b8dd8f91f6a854da (diff) | |
download | xen-e60e5c9642a733ac951203e4d349ccb2609c97ef.tar.gz xen-e60e5c9642a733ac951203e4d349ccb2609c97ef.tar.bz2 xen-e60e5c9642a733ac951203e4d349ccb2609c97ef.zip |
xen: use XSM instead of IS_PRIV for getdomaininfo
The XEN_DOMCTL_getdomaininfo domctl does not allow manipulation of
domains, only basic information such as size and state, so its use
does not fully justify making a domain privileged. XSM modules can
also provide fine-grained control over what domains are visible to
domains that call getdomaininfo.
If XSM is disabled (either at compile time or by using the dummy XSM
module) then there is no change in behavior: only IS_PRIV domains can
use this domctl. If enabled, the XSM module controls access.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/xsm')
-rw-r--r-- | xen/xsm/dummy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c index acf9c8a9d2..d99f8860d1 100644 --- a/xen/xsm/dummy.c +++ b/xen/xsm/dummy.c @@ -66,6 +66,8 @@ static int dummy_scheduler (struct domain *d) static int dummy_getdomaininfo (struct domain *d) { + if ( !IS_PRIV(current->domain) ) + return -EPERM; return 0; } |