]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Don't overwrite security labels
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 11 Jun 2012 13:57:19 +0000 (15:57 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 12 Jun 2012 09:14:38 +0000 (11:14 +0200)
commit86032b2276ace5a7977aad2bbae73b4c33e31914
tree33cd9435e54fce8c0b1292e24fcf7061df17f319
parent69dd77149cacc6b12740bd70b729b6cb7506f4e0
qemu: Don't overwrite security labels

Currently, if qemuProcessStart fail at some point, e.g. because
domain being started wants a PCI/USB device already assigned to
a different domain, we jump to cleanup label where qemuProcessStop
is performed. This unconditionally calls virSecurityManagerRestoreAllLabel
which is wrong because the other domain is still using those devices.

However, once we successfully label all devices/paths in
qemuProcessStart() from that point on, we have to perform a rollback
on failure - that is - we have to virSecurityManagerRestoreAllLabel.
src/qemu/qemu_process.c
src/qemu/qemu_process.h