]> xenbits.xensource.com Git - libvirt.git/commitdiff
virt-aa-helper: put static rules in quotes
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 20 Sep 2017 14:59:09 +0000 (16:59 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 6 Oct 2017 09:14:49 +0000 (11:14 +0200)
To avoid any issues later on if paths ever change (unlikely but
possible) and to match the style of other generated rules the paths
of the static rules have to be quoted as well.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
src/security/virt-aa-helper.c

index 5f4519dc9994c6de11ae8091903876070fd6b911..95906e68a38216a9d3dac26421a9d9e3c907f1d8 100644 (file)
@@ -1149,11 +1149,11 @@ get_files(vahControl * ctl)
         }
     }
     if (needsvhost)
-        virBufferAddLit(&buf, "  /dev/vhost-net rw,\n");
+        virBufferAddLit(&buf, "  \"/dev/vhost-net\" rw,\n");
 
     if (needsVfio) {
-        virBufferAddLit(&buf, "  /dev/vfio/vfio rw,\n");
-        virBufferAddLit(&buf, "  /dev/vfio/[0-9]* rw,\n");
+        virBufferAddLit(&buf, "  \"/dev/vfio/vfio\" rw,\n");
+        virBufferAddLit(&buf, "  \"/dev/vfio/[0-9]*\" rw,\n");
     }
 
     if (ctl->newfile)