mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
flask/policy: split out rules for system_r
When the all_system_role module is enabled, any domain type can be created using the system_r role, which was the default. When it is disabled, domains not using the default types (dom0_t and domU_t) must use another role such as vm_r. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
This commit is contained in:
1 parent
31689dcb0f
commit
a2c8399a91
4 files changed
+19
-8
No files matched your search
@@ -0,0 +1,8 @@
|
||||
# Allow all domains to use system_r so that systems that are not using the
|
||||
# user/role separation feature will work properly.
|
||||
role system_r types domain_type;
|
||||
|
||||
# The vm role is used as part of user separation. Allow all domain types to use
|
||||
# this role except dom0.
|
||||
role vm_r;
|
||||
role vm_r types { domain_type -dom0_t };
|
||||
@@ -23,3 +23,6 @@ make_device_model(dom0_t, dm_dom_t, domU_t)
|
||||
|
||||
# This is required for PCI (or other device) passthrough
|
||||
delegate_devices(dom0_t, domU_t)
|
||||
|
||||
# Both of these domain types can be created using the default (system) role
|
||||
role system_r types { domU_t dm_dom_t };
|
||||
@@ -32,3 +32,8 @@ nomigrate = on
|
||||
|
||||
# Example device policy. Also see policy/device_contexts.
|
||||
nic_dev = on
|
||||
|
||||
# This allows any domain type to be created using the system_r role. When it is
|
||||
# disabled, domains not using the default types (dom0_t and domU_t) must use
|
||||
# another role (such as vm_r) from the vm_role module.
|
||||
all_system_role = on
|
||||
@@ -78,12 +78,7 @@ neverallow * ~event_type:event { create send status };
|
||||
# The object role (object_r) is used for devices, resources, and event channels;
|
||||
# it does not need to be defined here and should not be used for domains.
|
||||
|
||||
# The system role is used for utility domains and pseudo-domains
|
||||
# The system role is used for utility domains and pseudo-domains. If roles are
|
||||
# not being used for separation, all domains can use the system role.
|
||||
role system_r;
|
||||
role system_r types { xen_type domain_type };
|
||||
# If you want to prevent domUs from being placed in system_r:
|
||||
##role system_r types { xen_type dom0_t };
|
||||
|
||||
# The vm role is used for customer virtual machines
|
||||
role vm_r;
|
||||
role vm_r types { domain_type -dom0_t };
|
||||
role system_r types { xen_type dom0_t };
|
||||