diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-07-23 05:56:00 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-07-30 16:48:18 -0400 |
commit | 141c7a5165261b0a75254107b63b2dac22203ebf (patch) | |
tree | aa6b513cf7e28727367ee6d4ba2980fe48bc86f5 /pkg/spec | |
parent | 680a3838748b297b7c3c462f98b58f82e39218e8 (diff) | |
download | podman-141c7a5165261b0a75254107b63b2dac22203ebf.tar.gz podman-141c7a5165261b0a75254107b63b2dac22203ebf.tar.bz2 podman-141c7a5165261b0a75254107b63b2dac22203ebf.zip |
Vendor in buildah 1.9.2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/spec')
-rw-r--r-- | pkg/spec/spec.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index 15c8c77fa..c94746767 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -552,7 +552,7 @@ func addPidNS(config *CreateConfig, g *generate.Generator) error { func addUserNS(config *CreateConfig, g *generate.Generator) error { if IsNS(string(config.UsernsMode)) { - if err := g.AddOrReplaceLinuxNamespace(spec.UserNamespace, NS(string(config.UsernsMode))); err != nil { + if err := g.AddOrReplaceLinuxNamespace(string(spec.UserNamespace), NS(string(config.UsernsMode))); err != nil { return err } // runc complains if no mapping is specified, even if we join another ns. So provide a dummy mapping @@ -561,7 +561,7 @@ func addUserNS(config *CreateConfig, g *generate.Generator) error { } if (len(config.IDMappings.UIDMap) > 0 || len(config.IDMappings.GIDMap) > 0) && !config.UsernsMode.IsHost() { - if err := g.AddOrReplaceLinuxNamespace(spec.UserNamespace, ""); err != nil { + if err := g.AddOrReplaceLinuxNamespace(string(spec.UserNamespace), ""); err != nil { return err } } @@ -572,7 +572,7 @@ func addNetNS(config *CreateConfig, g *generate.Generator) error { netMode := config.NetMode if netMode.IsHost() { logrus.Debug("Using host netmode") - return g.RemoveLinuxNamespace(spec.NetworkNamespace) + return g.RemoveLinuxNamespace(string(spec.NetworkNamespace)) } else if netMode.IsNone() { logrus.Debug("Using none netmode") return nil @@ -584,7 +584,7 @@ func addNetNS(config *CreateConfig, g *generate.Generator) error { return nil } else if IsNS(string(netMode)) { logrus.Debug("Using ns netmode") - return g.AddOrReplaceLinuxNamespace(spec.NetworkNamespace, NS(string(netMode))) + return g.AddOrReplaceLinuxNamespace(string(spec.NetworkNamespace), NS(string(netMode))) } else if IsPod(string(netMode)) { logrus.Debug("Using pod netmode, unless pod is not sharing") return nil @@ -604,7 +604,7 @@ func addUTSNS(config *CreateConfig, g *generate.Generator) error { return g.AddOrReplaceLinuxNamespace(string(spec.UTSNamespace), NS(string(utsMode))) } if utsMode.IsHost() { - return g.RemoveLinuxNamespace(spec.UTSNamespace) + return g.RemoveLinuxNamespace(string(spec.UTSNamespace)) } return nil } @@ -615,7 +615,7 @@ func addIpcNS(config *CreateConfig, g *generate.Generator) error { return g.AddOrReplaceLinuxNamespace(string(spec.IPCNamespace), NS(string(ipcMode))) } if ipcMode.IsHost() { - return g.RemoveLinuxNamespace(spec.IPCNamespace) + return g.RemoveLinuxNamespace(string(spec.IPCNamespace)) } if ipcMode.IsContainer() { logrus.Debug("Using container ipcmode") @@ -630,10 +630,10 @@ func addCgroupNS(config *CreateConfig, g *generate.Generator) error { return g.AddOrReplaceLinuxNamespace(string(spec.CgroupNamespace), NS(string(cgroupMode))) } if cgroupMode.IsHost() { - return g.RemoveLinuxNamespace(spec.CgroupNamespace) + return g.RemoveLinuxNamespace(string(spec.CgroupNamespace)) } if cgroupMode.IsPrivate() { - return g.AddOrReplaceLinuxNamespace(spec.CgroupNamespace, "") + return g.AddOrReplaceLinuxNamespace(string(spec.CgroupNamespace), "") } if cgroupMode.IsContainer() { logrus.Debug("Using container cgroup mode") |