]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
conf: Fix even implicit labels
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 3 Sep 2014 16:07:45 +0000 (18:07 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 5 Sep 2014 06:35:34 +0000 (08:35 +0200)
commitd869a6ea03eca6cffe8913a541161bb9bbedc8a1
tree2cd1dd52a66589aac6927bc95c39c882529c80e4
parentcefe0ba3db92b50068f5098691b95c8da6cf4428
conf: Fix even implicit labels

https://bugzilla.redhat.com/show_bug.cgi?id=1027096#c8

There are two ways in which security model can make it way into
<seclabel/>. One is as the @model attribute, the second one is
via security_driver knob in qemu.conf. Then, while parsing
<seclabel/> several checks and fix ups of old, stale combinations
are performed. However, iff @model is specified. They are not
done in the latter case. So it's still possible to feed libvirt
with senseless combinations (if qemu.conf is adjusted correctly).

One example of a seclabel that needs some adjustment (in case
security_driver=none in qemu.conf) is:

    <seclabel type='dynamic' relabel='yes'/>

The fixup code is copied from virSecurityLabelDefParseXML
(covering the former case) into virSecurityLabelDefsParseXML
(which handles the latter case).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c