summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-09-21 15:45:55 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-09-21 22:11:09 +0200
commitfb353f6f421656cafba05a885c921ca73daa5d70 (patch)
tree0b90096dfa60a577ef542e05aa86d09478143c49 /test
parent0d95e3aa06baf0613addc69b3d01bb7c262abd34 (diff)
downloadpodman-fb353f6f421656cafba05a885c921ca73daa5d70.tar.gz
podman-fb353f6f421656cafba05a885c921ca73daa5d70.tar.bz2
podman-fb353f6f421656cafba05a885c921ca73daa5d70.zip
execuser: look at the source for /etc/{passwd,group} overrides
look if there are bind mounts that can shadow the /etc/passwd and /etc/group files. In that case, look at the bind mount source. Closes: https://github.com/containers/libpod/pull/4068#issuecomment-533782941 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 55920467c..1e6f1d97d 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -200,6 +200,12 @@ var _ = Describe("Podman run", func() {
match, _ := session.GrepString("/root")
Expect(match).Should(BeTrue())
+ session = podmanTest.Podman([]string{"run", "--rm", "--user", "2", ALPINE, "printenv", "HOME"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ match, _ = session.GrepString("/sbin")
+ Expect(match).Should(BeTrue())
+
session = podmanTest.Podman([]string{"run", "--rm", "--env", "HOME=/foo", ALPINE, "printenv", "HOME"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))