mirror of
https://github.com/containers/podman.git
synced 2025-12-11 09:18:34 +08:00
libpod: enforce noexec,nosuid,nodev for /dev/shm
these mount flags are already used for the /dev/shm mount on the host, but they are not set for the bind mount itself. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@@ -1926,4 +1926,14 @@ WORKDIR /madethis`, BB)
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("i686"))
|
||||
})
|
||||
|
||||
It("podman run /dev/shm has nosuid,noexec,nodev", func() {
|
||||
session := podmanTest.Podman([]string{"run", ALPINE, "grep", "/dev/shm", "/proc/self/mountinfo"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
output := session.OutputToString()
|
||||
Expect(output).To(ContainSubstring("nosuid"))
|
||||
Expect(output).To(ContainSubstring("noexec"))
|
||||
Expect(output).To(ContainSubstring("nodev"))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user