]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
security: apparmor: Label externalDataStore
authorCole Robinson <crobinso@redhat.com>
Tue, 8 Oct 2019 16:11:18 +0000 (12:11 -0400)
committerCole Robinson <crobinso@redhat.com>
Tue, 10 Dec 2019 15:14:58 +0000 (10:14 -0500)
Teach virt-aa-helper how to label a qcow2 data_file, tracked internally
as externalDataStore. It should be treated the same as its sibling
disk image

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

index c93dddb2285540411762e24142ed26fcc859da07..f623ff965f637a98446113ccf571d6e01259c94e 100644 (file)
@@ -918,6 +918,10 @@ storage_source_add_files(virStorageSourcePtr src,
         if (add_file_path(tmp, depth, buf) < 0)
             return -1;
 
+        if (tmp->externalDataStore &&
+            storage_source_add_files(tmp->externalDataStore, buf, depth) < 0)
+            return -1;
+
         depth++;
     }