aboutsummaryrefslogtreecommitdiff
path: root/test/e2e/run_userns_test.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <giuseppe@scrivano.org>2020-09-10 00:19:39 +0200
committerGiuseppe Scrivano <giuseppe@scrivano.org>2020-09-10 19:17:01 +0200
commit686f6eccee0c20e1dc0789bde76a38cba7535e8e (patch)
treee773df0738d922980c806941e2404f5f3473d2f8 /test/e2e/run_userns_test.go
parente1b47296daaf4148d9970b59757a86e71bf8bb10 (diff)
downloadpodman-686f6eccee0c20e1dc0789bde76a38cba7535e8e.tar.gz
podman-686f6eccee0c20e1dc0789bde76a38cba7535e8e.tar.bz2
podman-686f6eccee0c20e1dc0789bde76a38cba7535e8e.zip
libpod: read mappings when joining a container userns
when joining an existing container user namespace, read the existing mappings so the storage can be created with the correct ownership. Closes: https://github.com/containers/podman/issues/7547 Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
Diffstat (limited to 'test/e2e/run_userns_test.go')
-rw-r--r--test/e2e/run_userns_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go
index 25f8d0d15..8d860cfc3 100644
--- a/test/e2e/run_userns_test.go
+++ b/test/e2e/run_userns_test.go
@@ -277,6 +277,13 @@ var _ = Describe("Podman UserNS support", func() {
ok, _ := session.GrepString("4998")
Expect(ok).To(BeTrue())
+
+ session = podmanTest.Podman([]string{"run", "--rm", "--userns=container:" + ctrName, "--net=container:" + ctrName, "alpine", "cat", "/proc/self/uid_map"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ ok, _ = session.GrepString("4998")
+ Expect(ok).To(BeTrue())
})
It("podman --user with volume", func() {