]> xenbits.xensource.com Git - libvirt.git/commit
Fix starting qemu instances when apparmor driver is enabled
authorJim Fehlig <jfehlig@suse.com>
Wed, 27 Feb 2013 23:32:35 +0000 (16:32 -0700)
committerJim Fehlig <jfehlig@suse.com>
Fri, 1 Mar 2013 00:35:59 +0000 (17:35 -0700)
commit438a3850db819fad8a30a06736533010677cd0e7
tree412668520044577920f01d0fb9af6f814878569a
parent4f773a8c30f1a6412358aa4fb02c61ed16302861
Fix starting qemu instances when apparmor driver is enabled

With the apparmor security driver enabled, qemu instances fail
to start

# grep ^security_driver /etc/libvirt/qemu.conf
security_driver = "apparmor"
# virsh start test-kvm
error: Failed to start domain test-kvm
error: internal error security label already defined for VM

The model field of virSecurityLabelDef object is always populated
by virDomainDefGetSecurityLabelDef(), so remove the check for a
NULL model when verifying if a label is already defined for the
instance.

Checking for a NULL model and populating it later in
AppArmorGenSecurityLabel() has been left in the code to be
consistent with virSecuritySELinuxGenSecurityLabel().
src/security/security_apparmor.c