Chapter 10
- SELinux works within the Linux kernel. Xen, however, is a hypervisor that sits between the hardware and the operating systems and does not use a full operating system as its base (unlike, for instance, QEMU and KVM).
When we interact with Xen through Linux, we are actually interacting with Xen through the dom0 guest. Within this guest, SELinux can be running (and we even recommend it), but SELinux will remain within the virtualized guest.
Xen, however, copied the SELinux approach and implemented it in its Xen Security Module framework.
- You can assign a label to a Xen guest by editing its configuration file (inside
/etc/xen
) and adding theseclabel
parameter, like so:seclabel = 'system_u:system_r:prot_domU_t'
You will need to relaunch the guest for the changes to take effect. Once the guest is booted again (using
xl create
), you can see its active label usingxl list -Z
.What are the common Xen commands that deal with XSM labels?
The common commands to use...