diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-12-01 16:23:40 -0500 |
---|---|---|
committer | Urvashi Mohnani <umohnani@redhat.com> | 2021-08-09 15:17:22 -0400 |
commit | 221b1add74e17ded10e8f2f832a53065578aa264 (patch) | |
tree | 499c89b26092c92026f3e7532b6bd633d920652f /libpod/container_internal_linux.go | |
parent | 431707c72044154b956944d00b1ba40b303decb2 (diff) | |
download | podman-221b1add74e17ded10e8f2f832a53065578aa264.tar.gz podman-221b1add74e17ded10e8f2f832a53065578aa264.tar.bz2 podman-221b1add74e17ded10e8f2f832a53065578aa264.zip |
Add support for pod inside of user namespace.
Add the --userns flag to podman pod create and keep
track of the userns setting that pod was created with
so that all containers created within the pod will inherit
that userns setting.
Specifically we need to be able to launch a pod with
--userns=keep-id
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r-- | libpod/container_internal_linux.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index f30f622ac..6d2f7bddc 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -659,7 +659,7 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) { } } - if c.config.IDMappings.AutoUserNs { + if c.config.UserNsCtr == "" && c.config.IDMappings.AutoUserNs { if err := g.AddOrReplaceLinuxNamespace(string(spec.UserNamespace), ""); err != nil { return nil, err } @@ -1884,7 +1884,7 @@ func (c *Container) generateResolvConf() (string, error) { return "", err } - return filepath.Join(c.state.RunDir, "resolv.conf"), nil + return destPath, nil } // generateHosts creates a containers hosts file |