summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-09-19 14:09:46 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-21 10:13:39 +0000
commit6d1eecf7cf10fe736d86479dbb0ac0377fc89488 (patch)
tree7914da853909e46f43b49bcaa124edc529c89341 /cmd
parent1c73404fe142e7ac09200ea26945dddff8f44431 (diff)
downloadpodman-6d1eecf7cf10fe736d86479dbb0ac0377fc89488.tar.gz
podman-6d1eecf7cf10fe736d86479dbb0ac0377fc89488.tar.bz2
podman-6d1eecf7cf10fe736d86479dbb0ac0377fc89488.zip
create, rootless: join the userns of ns:PATH
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1507 Approved by: rhatdan
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/create.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index 134752f88..07e75ad3a 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -838,6 +838,13 @@ func joinOrCreateRootlessUserNamespace(createConfig *cc.CreateConfig, runtime *l
}
}
+ namespacesStr := []string{string(createConfig.IpcMode), string(createConfig.NetMode), string(createConfig.UsernsMode), string(createConfig.PidMode), string(createConfig.UtsMode)}
+ for _, i := range namespacesStr {
+ if cc.IsNS(i) {
+ return rootless.JoinNSPath(cc.NS(i))
+ }
+ }
+
namespaces := []namespace{createConfig.IpcMode, createConfig.NetMode, createConfig.UsernsMode, createConfig.PidMode, createConfig.UtsMode}
for _, i := range namespaces {
if i.IsContainer() {