summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-07-24 17:53:10 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-24 21:50:49 +0000
commit977c8a9cd6db70c3ba2f868ea5b6c5e9615bf7bf (patch)
tree95120f933b921ec2c0773700e3502b1955a7a882 /pkg
parent8223fbaac6d6031359e2370ff11ec4c8f91b37b8 (diff)
downloadpodman-977c8a9cd6db70c3ba2f868ea5b6c5e9615bf7bf.tar.gz
podman-977c8a9cd6db70c3ba2f868ea5b6c5e9615bf7bf.tar.bz2
podman-977c8a9cd6db70c3ba2f868ea5b6c5e9615bf7bf.zip
podman: allow to specify the UTS namespace to join
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1145 Approved by: rhatdan
Diffstat (limited to 'pkg')
-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 2300d268a..4b6b947d7 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -369,6 +369,9 @@ func addNetNS(config *CreateConfig, g *generate.Generator) error {
func addUTSNS(config *CreateConfig, g *generate.Generator) error {
utsMode := config.UtsMode
+ if IsNS(string(utsMode)) {
+ return g.AddOrReplaceLinuxNamespace(string(spec.UTSNamespace), NS(string(utsMode)))
+ }
if utsMode.IsHost() {
return g.RemoveLinuxNamespace(spec.UTSNamespace)
}