[image] Propagate trust flag to extracted archive images

An extracted image is wholly derived from the original archive image.
If the original archive image has been verified and marked as trusted,
then this trust logically extends to any image extracted from it.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2021-05-12 14:13:01 +01:00
parent 191f8825cb
commit 62f732207e

View File

@@ -82,6 +82,10 @@ int image_extract ( struct image *image, const char *name,
if ( ( rc = register_image ( *extracted ) ) != 0 )
goto err_register;
/* Propagate trust flag */
if ( image->flags & IMAGE_TRUSTED )
image_trust ( *extracted );
/* Drop local reference to image */
image_put ( *extracted );