]> xenbits.xensource.com Git - libvirt.git/commit
apparmor: implement AppArmorSetFDLabel()
authorJamie Strandboge <jamie@canonical.com>
Mon, 20 Jun 2011 03:53:24 +0000 (11:53 +0800)
committerDaniel Veillard <veillard@redhat.com>
Mon, 20 Jun 2011 03:53:24 +0000 (11:53 +0800)
commitb9757fea30785a92aa95ea675b9bc371e4fb2e8c
tree37e7f7011f780c4218e79efc09bcfc984c9a6d34
parentcc743e2314e7673ed7b476f62227fef0aca0a4af
apparmor: implement AppArmorSetFDLabel()

During a savevm operation, libvirt will now use fd migration if qemu
supports it. When the AppArmor driver is enabled, AppArmorSetFDLabel()
is used but since this function simply returns '0', the dynamic AppArmor
profile is not updated and AppArmor blocks access to the save file. This
patch implements AppArmorSetFDLabel() to get the pathname of the file by
resolving the fd symlink in /proc, and then gives that pathname to
reload_profile(), which fixes 'virsh save' when AppArmor is enabled.

Reference: https://launchpad.net/bugs/795800
src/security/security_apparmor.c