summaryrefslogtreecommitdiff
path: root/pkg/spec/spec.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-07-24 18:23:10 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-24 21:50:49 +0000
commite43270fc5e594fdb77f9a22f0042105824485e62 (patch)
treeaa8c830d22e0ee19d0c25eea7ffec264f9703dc5 /pkg/spec/spec.go
parent977c8a9cd6db70c3ba2f868ea5b6c5e9615bf7bf (diff)
downloadpodman-e43270fc5e594fdb77f9a22f0042105824485e62.tar.gz
podman-e43270fc5e594fdb77f9a22f0042105824485e62.tar.bz2
podman-e43270fc5e594fdb77f9a22f0042105824485e62.zip
podman: allow to specify the IPC namespace to join
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1145 Approved by: rhatdan
Diffstat (limited to 'pkg/spec/spec.go')
-rw-r--r--pkg/spec/spec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index 4b6b947d7..d9888e999 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -380,6 +380,9 @@ func addUTSNS(config *CreateConfig, g *generate.Generator) error {
func addIpcNS(config *CreateConfig, g *generate.Generator) error {
ipcMode := config.IpcMode
+ if IsNS(string(ipcMode)) {
+ return g.AddOrReplaceLinuxNamespace(string(spec.IPCNamespace), NS(string(ipcMode)))
+ }
if ipcMode.IsHost() {
return g.RemoveLinuxNamespace(spec.IPCNamespace)
}