]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virt-aa-helper: allow hard links for mounts
authorChristian Schoenebeck <qemu_oss@crudebyte.com>
Thu, 22 Oct 2020 14:58:00 +0000 (16:58 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 26 Oct 2020 08:04:48 +0000 (09:04 +0100)
Guests should be allowed to create hard links on mounted pathes, since
many applications rely on this functionality and would error on guest
with current "rw" AppArmor permission with 9pfs.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/security/virt-aa-helper.c

index 12429278fbdabf65b6fdf0fe7a505b085708d7c7..5a6f4a5f7db9c0e93fa7607c2ffec677d9afe3a1 100644 (file)
@@ -1142,7 +1142,7 @@ get_files(vahControl * ctl)
             /* We don't need to add deny rw rules for readonly mounts,
              * this can only lead to troubles when mounting / readonly.
              */
-            if (vah_add_path(&buf, fs->src->path, fs->readonly ? "R" : "rw", true) != 0)
+            if (vah_add_path(&buf, fs->src->path, fs->readonly ? "R" : "rwl", true) != 0)
                 goto cleanup;
         }
     }