Skip to content

Commit

Permalink
Merge pull request containers#8878 from mheon/no_edit_config
Browse files Browse the repository at this point in the history
Ensure we do not edit container config in Exec
  • Loading branch information
openshift-merge-robot authored Jan 5, 2021
2 parents ced7c0a + 960607a commit 618c355
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libpod/oci_conmon_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 618c355

Please sign in to comment.