Merge pull request #11714 from vrothberg/save-remove-signatures

podman save: enforce signature removal
This commit is contained in:
OpenShift Merge Robot
2021-09-23 09:38:25 -04:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@ -359,7 +359,6 @@ func ExportImages(w http.ResponseWriter, r *http.Request) {
MultiImageArchive: len(query.References) > 1,
OciAcceptUncompressedLayers: query.OciAcceptUncompressedLayers,
Output: output,
RemoveSignatures: true,
}
imageEngine := abi.ImageEngine{Libpod: runtime}

View File

@ -305,8 +305,6 @@ type ImageSaveOptions struct {
OciAcceptUncompressedLayers bool
// Output - write image to the specified path.
Output string
// Do not save the signature from the source image
RemoveSignatures bool
// Quiet - suppress output when copying images
Quiet bool
}

View File

@ -368,7 +368,10 @@ func (ir *ImageEngine) Save(ctx context.Context, nameOrID string, tags []string,
saveOptions := &libimage.SaveOptions{}
saveOptions.DirForceCompress = options.Compress
saveOptions.OciAcceptUncompressedLayers = options.OciAcceptUncompressedLayers
saveOptions.RemoveSignatures = options.RemoveSignatures
// Force signature removal to preserve backwards compat.
// See https://github.com/containers/podman/pull/11669#issuecomment-925250264
saveOptions.RemoveSignatures = true
if !options.Quiet {
saveOptions.Writer = os.Stderr