[libvirt] [PATCH] apparmor: implement AppArmorSetFDLabel()

Jamie Strandboge jamie at canonical.com
Thu Jun 16 19:01:34 UTC 2011


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.

Passes 'check' and 'syntax-check' (though po_check failed for unrelated
reasons).

Reference: https://launchpad.net/bugs/795800

-- 
Jamie Strandboge             | http://www.canonical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lp795800.patch
Type: text/x-patch
Size: 1971 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110616/4004fda7/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110616/4004fda7/attachment-0001.sig>


More information about the libvir-list mailing list