]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virStorageSourceGetMetadata: Use depth limit instead of unique path checking
authorPeter Krempa <pkrempa@redhat.com>
Mon, 22 Mar 2021 16:21:12 +0000 (17:21 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 12 Apr 2021 13:55:09 +0000 (15:55 +0200)
commita43c8763bf5b7a48dc9f14ff335f83f528ce63b7
tree77c97d0aff370bde6d168022656e0a404c4d6cc4
parentdc03aed6a186b2e2d6749beae0a70560a73acc2d
virStorageSourceGetMetadata: Use depth limit instead of unique path checking

Prevent unbounded chains by limiting the recursion depth of
virStorageSourceGetMetadataRecurse to the maximum number of image layers
we limit anyways.

This removes the last use of virStorageSourceGetUniqueIdentifier which
will allow us to delete some crusty old infrastructure which isn't
really needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c
src/security/virt-aa-helper.c
src/storage_file/storage_source.c
src/storage_file/storage_source.h
tests/virstoragetest.c