mirror of
https://github.com/ipxe/ipxe
synced 2026-02-03 22:49:29 +03:00
[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:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user