diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-07 19:23:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 19:23:27 +0200 |
commit | 54d16f3b5fc4210c7c46e4cca240f988fa5f39f5 (patch) | |
tree | 5cd32e61758c7c43ed44b2529cafc8281b46a910 /cmd/podman/common/specgen.go | |
parent | cd084853b6187d8b236ea327818277cc02e0b916 (diff) | |
parent | 6c6670f12a3e6b91c1ebb09e7d9e4f49f89dccc0 (diff) | |
download | podman-54d16f3b5fc4210c7c46e4cca240f988fa5f39f5.tar.gz podman-54d16f3b5fc4210c7c46e4cca240f988fa5f39f5.tar.bz2 podman-54d16f3b5fc4210c7c46e4cca240f988fa5f39f5.zip |
Merge pull request #6829 from rhatdan/keepid
Add username to /etc/passwd inside of container if --userns keep-id
Diffstat (limited to 'cmd/podman/common/specgen.go')
-rw-r--r-- | cmd/podman/common/specgen.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go index 0948e78f1..eca0da32b 100644 --- a/cmd/podman/common/specgen.go +++ b/cmd/podman/common/specgen.go @@ -241,6 +241,8 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string // If some mappings are specified, assume a private user namespace if userNS.IsDefaultValue() && (!s.IDMappings.HostUIDMapping || !s.IDMappings.HostGIDMapping) { s.UserNS.NSMode = specgen.Private + } else { + s.UserNS.NSMode = specgen.NamespaceMode(userNS) } s.Terminal = c.TTY |