summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2022-01-07 10:52:34 +0100
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2022-01-07 14:48:29 +0100
commit7dada6d49288379e7e254b4aa9b62b3db91a05aa (patch)
tree0056d761158a1ad6fbb2cae00a0d51049304b090 /libpod/container_internal.go
parent8a2238440635d497dbdacceb6826c850582766ea (diff)
downloadpodman-7dada6d49288379e7e254b4aa9b62b3db91a05aa.tar.gz
podman-7dada6d49288379e7e254b4aa9b62b3db91a05aa.tar.bz2
podman-7dada6d49288379e7e254b4aa9b62b3db91a05aa.zip
Prevent double decoding of storage options
[NO NEW TESTS NEEDED] see #11991 Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 2d12a90d1..33bb35a0b 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -447,17 +447,8 @@ func (c *Container) setupStorage(ctx context.Context) error {
LabelOpts: c.config.LabelOpts,
}
- nopts := len(c.config.StorageOpts)
- if nopts > 0 {
- options.StorageOpt = make(map[string]string, nopts)
- for _, opt := range c.config.StorageOpts {
- split2 := strings.SplitN(opt, "=", 2)
- if len(split2) > 2 {
- return errors.Wrapf(define.ErrInvalidArg, "invalid storage options %q for %s", opt, c.ID())
- }
- options.StorageOpt[split2[0]] = split2[1]
- }
- }
+ options.StorageOpt = c.config.StorageOpts
+
if c.restoreFromCheckpoint && c.config.ProcessLabel != "" && c.config.MountLabel != "" {
// If restoring from a checkpoint, the root file-system needs
// to be mounted with the same SELinux labels as it was mounted