]> git.ipfire.org Git - thirdparty/libvirt.git/commit
apparmor: don't fail on non-apparmor <seclabel>
authorJim Fehlig <jfehlig@suse.com>
Fri, 3 Feb 2017 02:26:13 +0000 (19:26 -0700)
committerJim Fehlig <jfehlig@suse.com>
Tue, 14 Feb 2017 23:53:30 +0000 (16:53 -0700)
commitec94e14b681a671776c8d7ca962d3d7ed5aca5b7
tree9da330eb52b73ab6da3a9141f74da3b24ba3e8a7
parent5cdfc80ba88e8856fbebe78e850b39807ed9b811
apparmor: don't fail on non-apparmor <seclabel>

If the apparmor security driver is loaded/enabled and domain config
contains a <seclabel> element whose type attribute is not 'apparmor',
starting the domain fails when attempting to label resources such
as tap FDs.

Many of the apparmor driver entry points attempt to retrieve the
apparmor security label from the domain def, returning failure if
not found. Functions such as AppArmorSetFDLabel fail even though
domain config contains an explicit 'none' secuirty driver, e.g.

  <seclabel type='none' model='none'/>

Change the entry points to succeed if the domain config <seclabel>
is not apparmor. This matches the behavior of the selinux driver.
src/security/security_apparmor.c