mirror of https://github.com/containers/podman.git
Merge pull request #8878 from mheon/no_edit_config
Ensure we do not edit container config in Exec
This commit is contained in:
commit
618c35570d
|
|
@ -1195,7 +1195,10 @@ func prepareProcessExec(c *Container, options *ExecOptions, env []string, sessio
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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.SelinuxLabel = c.config.ProcessLabel
|
||||||
pspec.Args = options.Cmd
|
pspec.Args = options.Cmd
|
||||||
for _, cap := range options.CapAdd {
|
for _, cap := range options.CapAdd {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue