]> git.ipfire.org Git - thirdparty/libvirt.git/commit
apparmor: use AppArmorSetFDLabel for both imageFD and tapFD
authorGuannan Ren <gren@redhat.com>
Thu, 7 Mar 2013 16:16:59 +0000 (00:16 +0800)
committerGuannan Ren <gren@redhat.com>
Fri, 8 Mar 2013 02:56:07 +0000 (10:56 +0800)
commitce4557c3ab3702639db73615dd144ddf036321ed
treee43ba12b312cad36ee58ce1cd646805657209919
parentab1ef3bc6ced28d6796eb67151ef5a5328344827
apparmor: use AppArmorSetFDLabel for both imageFD and tapFD

Rename AppArmorSetImageFDLabel to AppArmorSetFDLabel which could
be used as a common function for *ALL* fd relabelling in Linux.

In apparmor profile for specific vm with uuid cdbebdfa-1d6d-65c3-be0f-fd74b978a773
Path: /etc/apparmor.d/libvirt/libvirt-cdbebdfa-1d6d-65c3-be0f-fd74b978a773.files
The last line is for the tapfd relabelling.

 # DO NOT EDIT THIS FILE DIRECTLY. IT IS MANAGED BY LIBVIRT.
  "/var/log/libvirt/**/rhel6qcow2.log" w,
  "/var/lib/libvirt/**/rhel6qcow2.monitor" rw,
  "/var/run/libvirt/**/rhel6qcow2.pid" rwk,
  "/run/libvirt/**/rhel6qcow2.pid" rwk,
  "/var/run/libvirt/**/*.tunnelmigrate.dest.rhel6qcow2" rw,
  "/run/libvirt/**/*.tunnelmigrate.dest.rhel6qcow2" rw,
  "/var/lib/libvirt/images/rhel6u3qcow2.img" rw,
  "/dev/tap45" rw,
src/security/security_apparmor.c