aboutsummaryrefslogtreecommitdiff
path: root/libpod/pod_api.go
diff options
context:
space:
mode:
authorcdoern <cdoern@redhat.com>2022-06-03 11:01:22 -0400
committerMatthew Heon <mheon@redhat.com>2022-06-14 16:12:10 -0400
commitc24d2efa97dfffafee80f066584edd7be9fd83fa (patch)
tree5cc7850da6edfc5fd406536de9c3d29a0491b57e /libpod/pod_api.go
parentb32f4921a51659ed0f348937bef1e4bbfbf490ad (diff)
downloadpodman-c24d2efa97dfffafee80f066584edd7be9fd83fa.tar.gz
podman-c24d2efa97dfffafee80f066584edd7be9fd83fa.tar.bz2
podman-c24d2efa97dfffafee80f066584edd7be9fd83fa.zip
patch for pod host networking & other host namespace handling
this patch included additonal host namespace checks when creating a ctr as well as fixing of the tests to check /proc/self/ns/net see #14461 Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'libpod/pod_api.go')
-rw-r--r--libpod/pod_api.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/pod_api.go b/libpod/pod_api.go
index ba30d878e..6366712b7 100644
--- a/libpod/pod_api.go
+++ b/libpod/pod_api.go
@@ -8,6 +8,7 @@ import (
"github.com/containers/podman/v4/libpod/events"
"github.com/containers/podman/v4/pkg/parallel"
"github.com/containers/podman/v4/pkg/rootless"
+ "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -600,8 +601,8 @@ func (p *Pod) Inspect() (*define.InspectPodData, error) {
infraConfig.CPUPeriod = p.CPUPeriod()
infraConfig.CPUQuota = p.CPUQuota()
infraConfig.CPUSetCPUs = p.ResourceLim().CPU.Cpus
- infraConfig.PidNS = p.PidMode()
- infraConfig.UserNS = p.UserNSMode()
+ infraConfig.PidNS = p.NamespaceMode(specs.PIDNamespace)
+ infraConfig.UserNS = p.NamespaceMode(specs.UserNamespace)
namedVolumes, mounts := infra.SortUserVolumes(infra.config.Spec)
inspectMounts, err = infra.GetMounts(namedVolumes, infra.config.ImageVolumes, mounts)
infraSecurity = infra.GetSecurityOptions()