summaryrefslogtreecommitdiff
path: root/pkg/spec/spec.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-07-24 17:46:47 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-24 21:50:49 +0000
commit8223fbaac6d6031359e2370ff11ec4c8f91b37b8 (patch)
treed4dd15ebb3d82e43cd8c68275fd2f02af71202b9 /pkg/spec/spec.go
parent819c80712578cce1d5fd1915a351bc739c7fcb72 (diff)
downloadpodman-8223fbaac6d6031359e2370ff11ec4c8f91b37b8.tar.gz
podman-8223fbaac6d6031359e2370ff11ec4c8f91b37b8.tar.bz2
podman-8223fbaac6d6031359e2370ff11ec4c8f91b37b8.zip
podman: allow to specify the PID 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 dcf1c51dd..2300d268a 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -316,6 +316,9 @@ func blockAccessToKernelFilesystems(config *CreateConfig, g *generate.Generator)
func addPidNS(config *CreateConfig, g *generate.Generator) error {
pidMode := config.PidMode
+ if IsNS(string(pidMode)) {
+ return g.AddOrReplaceLinuxNamespace(string(spec.PIDNamespace), NS(string(pidMode)))
+ }
if pidMode.IsHost() {
return g.RemoveLinuxNamespace(string(spec.PIDNamespace))
}