mirror of
https://github.com/containers/podman.git
synced 2025-09-19 12:56:57 +08:00
Add support for --no-new-privs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #369 Approved by: rhatdan
This commit is contained in:

committed by
Atomic Bot

parent
1d9539337b
commit
831dc48883
@ -237,12 +237,13 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) e
|
||||
log: c.LogPath(),
|
||||
}
|
||||
execOpts := runcExecOptions{
|
||||
capAdd: capList,
|
||||
pidFile: filepath.Join(c.state.RunDir, fmt.Sprintf("%s-execpid", stringid.GenerateNonCryptoID()[:12])),
|
||||
env: env,
|
||||
user: user,
|
||||
cwd: c.config.Spec.Process.Cwd,
|
||||
tty: tty,
|
||||
capAdd: capList,
|
||||
pidFile: filepath.Join(c.state.RunDir, fmt.Sprintf("%s-execpid", stringid.GenerateNonCryptoID()[:12])),
|
||||
env: env,
|
||||
noNewPrivs: c.config.NoNewPrivs,
|
||||
user: user,
|
||||
cwd: c.config.Spec.Process.Cwd,
|
||||
tty: tty,
|
||||
}
|
||||
|
||||
return c.runtime.ociRuntime.execContainer(c, cmd, globalOpts, execOpts)
|
||||
|
Reference in New Issue
Block a user