]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Add two new security label types
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 25 Jan 2012 14:12:52 +0000 (14:12 +0000)
committerEric Blake <eblake@redhat.com>
Fri, 3 Feb 2012 00:44:37 +0000 (17:44 -0700)
commitb170eb99f53412b6955f76aa986ff81bc96259f7
tree491130ff18012b8494f0a95f49f1e1a45d59f529
parent87c39f0e20a2e3f64398b6ed926c3dc0b0455f5e
Add two new security label types

Curently security labels can be of type 'dynamic' or 'static'.
If no security label is given, then 'dynamic' is assumed. The
current code takes advantage of this default, and avoids even
saving <seclabel> elements with type='dynamic' to disk. This
means if you temporarily change security driver, the guests
can all still start.

With the introduction of sVirt to LXC though, there needs to be
a new default of 'none' to allow unconfined LXC containers.

This patch introduces two new security label types

 - default:  the host configuration decides whether to run the
             guest with type 'none' or 'dynamic' at guest start
 - none:     the guest will run unconfined by security policy

The 'none' label type will obviously be undesirable for some
deployments, so a new qemu.conf option allows a host admin to
mandate confined guests. It is also possible to turn off default
confinement

  security_default_confined = 1|0  (default == 1)
  security_require_confined = 1|0  (default == 0)

* src/conf/domain_conf.c, src/conf/domain_conf.h: Add new
  seclabel types
* src/security/security_manager.c, src/security/security_manager.h:
  Set default sec label types
* src/security/security_selinux.c: Handle 'none' seclabel type
* src/qemu/qemu.conf, src/qemu/qemu_conf.c, src/qemu/qemu_conf.h,
  src/qemu/libvirtd_qemu.aug: New security config options
* src/qemu/qemu_driver.c: Tell security driver about default
  config
14 files changed:
docs/formatdomain.html.in
docs/schemas/domaincommon.rng
po/POTFILES.in
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/libvirtd_qemu.aug
src/qemu/qemu.conf
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/qemu_driver.c
src/security/security_manager.c
src/security/security_manager.h
src/security/security_selinux.c
tests/seclabeltest.c