summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-11-02 14:39:00 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-11-02 14:39:02 +0100
commit6a9442909869a949d8930b24f9c0021022528333 (patch)
tree0321cd657151ebd07fa4102ea3ce19de3bb16b9b /test
parentbce8f851c1e891aa6159e61c56ccd712b60c31b7 (diff)
downloadpodman-6a9442909869a949d8930b24f9c0021022528333.tar.gz
podman-6a9442909869a949d8930b24f9c0021022528333.tar.bz2
podman-6a9442909869a949d8930b24f9c0021022528333.zip
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 <gscrivan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_test.go5
1 files changed, 5 insertions, 0 deletions
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() {