]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Honour current sensitivity and category ranges in SELinux label generation
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 10 Aug 2012 13:27:51 +0000 (14:27 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 21 Aug 2012 10:37:57 +0000 (11:37 +0100)
commit4e365df44fb1b1b93186d6be006ea445e1409a02
tree570c699e821f2d94399d9a512440a4f85ef8ade2
parent2d9df4fca0b92c2d943ed8ff70fe9c1f054c3b6e
Honour current sensitivity and category ranges in SELinux label generation

Currently the dynamic label generation code will create labels
with a sensitivity of s0, and a category pair in the range
0-1023. This is fine when running a standard MCS policy because
libvirtd will run with a label

  system_u:system_r:virtd_t:s0-s0:c0.c1023

With custom policies though, it is possible for libvirtd to have
a different sensitivity, or category range. For example

  system_u:system_r:virtd_t:s2-s3:c512.c1023

In this case we must assign the VM a sensitivity matching the
current lower sensitivity value, and categories in the range
512-1023

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/security/security_selinux.c