summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-23 11:35:42 -0400
committerGitHub <noreply@github.com>2021-09-23 11:35:42 -0400
commit07274b86dc5ef634fcf96a295b5d9a6f1f22d8b8 (patch)
tree7227d408c1191205eed084b2b29dd451948365fc
parentc58a677f8edc36c32728a87a6ac2c48d244d7ea2 (diff)
parentf2c676e99ab6958aa5bf018d37a714be5807e4fe (diff)
downloadpodman-07274b86dc5ef634fcf96a295b5d9a6f1f22d8b8.tar.gz
podman-07274b86dc5ef634fcf96a295b5d9a6f1f22d8b8.tar.bz2
podman-07274b86dc5ef634fcf96a295b5d9a6f1f22d8b8.zip
Merge pull request #11723 from vrothberg/3.4-save-remove-signatures
[3.4] podman save: enforce signature removal
-rw-r--r--pkg/api/handlers/libpod/images.go1
-rw-r--r--pkg/domain/entities/images.go2
-rw-r--r--pkg/domain/infra/abi/images.go5
3 files changed, 4 insertions, 4 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go
index b4f08a746..bfef62867 100644
--- a/pkg/api/handlers/libpod/images.go
+++ b/pkg/api/handlers/libpod/images.go
@@ -357,7 +357,6 @@ func ExportImages(w http.ResponseWriter, r *http.Request) {
Format: query.Format,
MultiImageArchive: len(query.References) > 1,
Output: output,
- RemoveSignatures: true,
}
imageEngine := abi.ImageEngine{Libpod: runtime}
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index c575212b1..5a469d981 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -303,8 +303,6 @@ type ImageSaveOptions struct {
MultiImageArchive 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
}
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index a88d38a10..aac9a2507 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -367,7 +367,10 @@ func (ir *ImageEngine) Load(ctx context.Context, options entities.ImageLoadOptio
func (ir *ImageEngine) Save(ctx context.Context, nameOrID string, tags []string, options entities.ImageSaveOptions) error {
saveOptions := &libimage.SaveOptions{}
saveOptions.DirForceCompress = options.Compress
- 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