summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-08-01 03:41:27 -0400
committerGitHub <noreply@github.com>2019-08-01 03:41:27 -0400
commit39de184b8bfb14954f77190f0e6127c1ddc363c0 (patch)
treeeb76e980bc7d8c7b64e93a2cf6293c0e073db860 /pkg
parenta622f8d345b1853401de2e533e9fbf14ef169fa2 (diff)
parent141c7a5165261b0a75254107b63b2dac22203ebf (diff)
downloadpodman-39de184b8bfb14954f77190f0e6127c1ddc363c0.tar.gz
podman-39de184b8bfb14954f77190f0e6127c1ddc363c0.tar.bz2
podman-39de184b8bfb14954f77190f0e6127c1ddc363c0.zip
Merge pull request #3573 from rhatdan/vendor
Vendor in latest buildah code
Diffstat (limited to 'pkg')
-rw-r--r--pkg/spec/spec.go16
-rw-r--r--pkg/varlinkapi/images.go2
2 files changed, 9 insertions, 9 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")
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index 739a3e582..338499bd4 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -161,7 +161,7 @@ func (i *LibpodAPI) BuildImage(call iopodman.VarlinkCall, config iopodman.BuildI
}
hostNetwork := buildah.NamespaceOption{
- Name: specs.NetworkNamespace,
+ Name: string(specs.NetworkNamespace),
Host: true,
}