]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Don't allow multiple seclabels for same model
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 9 Jul 2014 13:15:27 +0000 (15:15 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 11 Jul 2014 08:36:08 +0000 (10:36 +0200)
commitd1abf819cf1b2fda893c029344de77d5b6cc5ba9
tree37852e9e532d30affb0c315ef6d9abc77e606488
parent0b22a16d7eab6a41e3b0c1ffe8625fbf82d8b4d0
conf: Don't allow multiple seclabels for same model

https://bugzilla.redhat.com/show_bug.cgi?id=1066894

With current code it's possible to have for instance:

virsh dumpxml mydomain | grep seclabel
  <seclabel type='dynamic' model='selinux' relabel='yes'/>
  <seclabel type='dynamic' model='selinux' relabel='yes'/>
  <seclabel type='dynamic' model='selinux' relabel='yes'/>
  <seclabel type='dynamic' model='selinux' relabel='yes'/>
  <seclabel type='dynamic' model='selinux' relabel='yes'/>

what doesn't make any sense. We should reject the XML in the config
parsing phase.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c
tests/qemuxml2argvdata/qemuxml2argv-seclabel-multiple.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c