From 6a9442909869a949d8930b24f9c0021022528333 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 2 Nov 2020 14:39:00 +0100 Subject: specgen: fix check for root user if the username is specified in the USER:GROUP form, make sure we only check for USER. Signed-off-by: Giuseppe Scrivano --- test/e2e/run_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 010d7aaae..9f86f43aa 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -330,6 +330,11 @@ var _ = Describe("Podman run", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) Expect(session.OutputToString()).To(ContainSubstring("0000000000000000")) + + session = podmanTest.Podman([]string{"run", "--user=0:0", "--cap-add=DAC_OVERRIDE", "--rm", ALPINE, "grep", "CapAmb", "/proc/self/status"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("0000000000000000")) }) It("podman run user capabilities test with image", func() { -- cgit v1.2.3-54-g00ecf