From f7321681d04d65da3b307d1e5e4ba12c42b5c456 Mon Sep 17 00:00:00 2001 From: cdoern Date: Wed, 7 Jul 2021 17:00:30 -0400 Subject: podman pod create --pid flag added support for --pid flag. User can specify ns:file, pod, private, or host. container returns an error since you cannot point the ns of the pods infra container to a container outside of the pod. Signed-off-by: cdoern --- libpod/runtime_pod_linux.go | 1 + 1 file changed, 1 insertion(+) (limited to 'libpod/runtime_pod_linux.go') diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go index 4ede23cac..fce3f38a7 100644 --- a/libpod/runtime_pod_linux.go +++ b/libpod/runtime_pod_linux.go @@ -116,6 +116,7 @@ func (r *Runtime) NewPod(ctx context.Context, options ...PodCreateOption) (_ *Po if pod.config.UsePodCgroup { logrus.Debugf("Got pod cgroup as %s", pod.state.CgroupPath) } + if !pod.HasInfraContainer() && pod.SharesNamespaces() { return nil, errors.Errorf("Pods must have an infra container to share namespaces") } -- cgit v1.2.3-54-g00ecf