summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-04-22 12:38:19 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-04-23 18:05:03 +0200
commit48530acbd9a622cf88dbbb10cbc8e91575c476e5 (patch)
tree87ba5a727ec653d514e18e2686aa58453e20f70b /pkg/specgen/generate
parent2fd6a84c09c4361c16f0bfe086dd4a190c5635b3 (diff)
downloadpodman-48530acbd9a622cf88dbbb10cbc8e91575c476e5.tar.gz
podman-48530acbd9a622cf88dbbb10cbc8e91575c476e5.tar.bz2
podman-48530acbd9a622cf88dbbb10cbc8e91575c476e5.zip
podman: handle namespaces specified on the CLI
and handle differently the user namespace as it supports additional options. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/specgen/generate')
-rw-r--r--pkg/specgen/generate/namespaces.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/specgen/generate/namespaces.go b/pkg/specgen/generate/namespaces.go
index 4ec1e859c..2aaeb9513 100644
--- a/pkg/specgen/generate/namespaces.go
+++ b/pkg/specgen/generate/namespaces.go
@@ -58,8 +58,7 @@ func GetDefaultNamespaceMode(nsType string, cfg *config.Config, pod *libpod.Pod)
case "uts":
return specgen.ParseNamespace(cfg.Containers.UTSNS)
case "user":
- // TODO: This may not work for --userns=auto
- return specgen.ParseNamespace(cfg.Containers.UserNS)
+ return specgen.ParseUserNamespace(cfg.Containers.UserNS)
case "net":
ns, _, err := specgen.ParseNetworkNamespace(cfg.Containers.NetNS)
return ns, err