summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-04 21:11:27 -0500
committerGitHub <noreply@github.com>2021-01-04 21:11:27 -0500
commit618c35570de19f1ecdcfb49e87871287205809f2 (patch)
treeb49b62e1b7d966bf514ebd5021ee0da412f4de6d
parentced7c0ab7f347da7bde700d996d5c3d5904c7fa2 (diff)
parent960607a4cd0c2672f28aaeab511770370c547a2c (diff)
downloadpodman-618c35570de19f1ecdcfb49e87871287205809f2.tar.gz
podman-618c35570de19f1ecdcfb49e87871287205809f2.tar.bz2
podman-618c35570de19f1ecdcfb49e87871287205809f2.zip
Merge pull request #8878 from mheon/no_edit_config
Ensure we do not edit container config in Exec
-rw-r--r--libpod/oci_conmon_linux.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 47fa130f1..e7cb5a802 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -1195,7 +1195,10 @@ func prepareProcessExec(c *Container, options *ExecOptions, env []string, sessio
if err != nil {
return nil, err
}
- pspec := c.config.Spec.Process
+ pspec := new(spec.Process)
+ if err := JSONDeepCopy(c.config.Spec.Process, pspec); err != nil {
+ return nil, err
+ }
pspec.SelinuxLabel = c.config.ProcessLabel
pspec.Args = options.Cmd
for _, cap := range options.CapAdd {