]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
security: apparmor: Make storage_source_add_files recursively callable
authorCole Robinson <crobinso@redhat.com>
Tue, 8 Oct 2019 16:07:17 +0000 (12:07 -0400)
committerCole Robinson <crobinso@redhat.com>
Wed, 9 Oct 2019 18:17:16 +0000 (14:17 -0400)
This will simplify adding support for qcow2 external data_file

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/security/virt-aa-helper.c

index b675572144c0c509c37eaee79d514b95ccfe5fd4..d9f6b5638bd0448a941ce502224ab4f615ed4448 100644 (file)
@@ -939,9 +939,9 @@ add_file_path(virStorageSourcePtr src,
 
 static int
 storage_source_add_files(virStorageSourcePtr src,
-                         virBufferPtr buf)
+                         virBufferPtr buf,
+                         size_t depth)
 {
-    size_t depth = 0;
     virStorageSourcePtr tmp;
 
     for (tmp = src; virStorageSourceIsBacking(tmp); tmp = tmp->backingStore) {
@@ -994,7 +994,7 @@ get_files(vahControl * ctl)
 
          /* XXX should handle open errors more careful than just ignoring them.
          */
-        if (storage_source_add_files(disk->src, &buf) < 0)
+        if (storage_source_add_files(disk->src, &buf, 0) < 0)
             goto cleanup;
     }