mirror of
https://github.com/containers/podman.git
synced 2025-12-01 18:49:18 +08:00
runtime: do not chown idmapped volumes
do not chown a volume when idmap is used. Closes: https://github.com/containers/podman/issues/16724 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@@ -109,13 +109,13 @@ var _ = Describe("Podman UserNS support", func() {
|
||||
})
|
||||
|
||||
It("podman uidmapping and gidmapping with an idmapped volume", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--uidmap=0:1:500", "--gidmap=0:200:5000", "-v", "my-foo-volume:/foo:Z,idmap", "alpine", "echo", "hello"})
|
||||
session := podmanTest.Podman([]string{"run", "--uidmap=0:1:500", "--gidmap=0:200:5000", "-v", "my-foo-volume:/foo:Z,idmap", "alpine", "stat", "-c", "#%u:%g#", "/foo"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
if strings.Contains(session.ErrorToString(), "Operation not permitted") {
|
||||
Skip("not sufficiently privileged")
|
||||
}
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("hello"))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("#0:0#"))
|
||||
})
|
||||
|
||||
It("podman uidmapping and gidmapping --net=host", func() {
|
||||
|
||||
Reference in New Issue
Block a user