mirror of
https://github.com/containers/podman.git
synced 2025-10-25 02:04:43 +08:00
run, create: add new security-opt proc-opts
it allows to customize the options passed down to the OCI runtime for setting up the /proc mount. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -827,6 +827,15 @@ USER mail`
|
||||
Expect(isSharedOnly).Should(BeTrue())
|
||||
})
|
||||
|
||||
It("podman run --security-opts proc-opts=", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--security-opt", "proc-opts=nosuid,exec", fedoraMinimal, "findmnt", "-noOPTIONS", "/proc"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
output := session.OutputToString()
|
||||
Expect(output).To(ContainSubstring("nosuid"))
|
||||
Expect(output).To(Not(ContainSubstring("exec")))
|
||||
})
|
||||
|
||||
It("podman run --mount type=bind,bind-nonrecursive", func() {
|
||||
SkipIfRootless()
|
||||
session := podmanTest.Podman([]string{"run", "--mount", "type=bind,bind-nonrecursive,slave,src=/,target=/host", fedoraMinimal, "findmnt", "-nR", "/host"})
|
||||
|
||||
Reference in New Issue
Block a user