From: Cole Robinson Date: Tue, 8 Oct 2019 16:07:17 +0000 (-0400) Subject: security: apparmor: Make storage_source_add_files recursively callable X-Git-Tag: v5.9.0-rc1~327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a15c47253f30f6e048bbf2f9b3b8082de9d9ea3;p=thirdparty%2Flibvirt.git security: apparmor: Make storage_source_add_files recursively callable This will simplify adding support for qcow2 external data_file Reviewed-by: Michal Privoznik Signed-off-by: Cole Robinson --- diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index b675572144..d9f6b5638b 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -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; }