Comment 40 for bug 545795

Revision history for this message
In , Jamie (jamie-redhat-bugs) wrote :

Someone reported a bug in Ubuntu on pcidev devices not being correctly added with the AppArmor driver and a patch was submitted:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/545795/comments/29

This patch is not tested but suggests that more than just the AppArmor driver is affected, so I am forwarding it here. That bug is kinda all over the place and has various things unrelated to this report.

Here is the comment and submitted patch:

"Patch to allow PCI pass through to work woth app armor. It's currently missing a couple of files"

--- libvirt-0.7.5.orig/src/util/pci.c 2010-06-11 01:43:41 +0000
+++ libvirt-0.7.5/src/util/pci.c 2010-06-11 01:45:06 +0000
@@ -1089,6 +1089,8 @@
          */
         if (STREQ(ent->d_name, "config") ||
             STRPREFIX(ent->d_name, "resource") ||
+ STREQ(ent->d_name, "vendor") ||
+ STREQ(ent->d_name, "device") ||
             STREQ(ent->d_name, "rom")) {
             if (virAsprintf(&file, "%s/%s", pcidir, ent->d_name) < 0) {
                 virReportOOMError(conn);