Don't ignore --user flag in rootless --userns keepid

Currently podman run --userns keep-id --user root:root fedora id

The --user flag is ignored.  Removing this makes the code work correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2020-06-17 14:53:04 -04:00
parent 7b5073b46e
commit c385e6d363
2 changed files with 8 additions and 3 deletions

View File

@@ -89,6 +89,13 @@ var _ = Describe("Podman UserNS support", func() {
Expect(ok).To(BeTrue())
})
It("podman --userns=keep-id --user root:root", func() {
session := podmanTest.Podman([]string{"run", "--userns=keep-id", "--user", "root:root", "alpine", "id", "-u"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(Equal("0"))
})
It("podman --userns=auto", func() {
u, err := user.Current()
Expect(err).To(BeNil())