summaryrefslogtreecommitdiff
path: root/libpod/pod.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-09 23:06:51 +0200
committerGitHub <noreply@github.com>2020-05-09 23:06:51 +0200
commitdc7d6f4818f4b986cfd15208d53f6765d8fad986 (patch)
treefe6e50f86caace33f971446d2356dffecaea5c4c /libpod/pod.go
parent3ff96383f306cecfeed75986078144ad757e3d70 (diff)
parent8238b7e70688e637d58305287a19e4080f619587 (diff)
downloadpodman-dc7d6f4818f4b986cfd15208d53f6765d8fad986.tar.gz
podman-dc7d6f4818f4b986cfd15208d53f6765d8fad986.tar.bz2
podman-dc7d6f4818f4b986cfd15208d53f6765d8fad986.zip
Merge pull request #6152 from mheon/fix_pod_join_cgroupns
Fix bug where pods would unintentionally share cgroupns
Diffstat (limited to 'libpod/pod.go')
-rw-r--r--libpod/pod.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/libpod/pod.go b/libpod/pod.go
index 8eb06ae2f..34ceef5ef 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -51,12 +51,13 @@ type PodConfig struct {
// The following UsePod{kernelNamespace} indicate whether the containers
// in the pod will inherit the namespace from the first container in the pod.
- UsePodPID bool `json:"sharesPid,omitempty"`
- UsePodIPC bool `json:"sharesIpc,omitempty"`
- UsePodNet bool `json:"sharesNet,omitempty"`
- UsePodMount bool `json:"sharesMnt,omitempty"`
- UsePodUser bool `json:"sharesUser,omitempty"`
- UsePodUTS bool `json:"sharesUts,omitempty"`
+ UsePodPID bool `json:"sharesPid,omitempty"`
+ UsePodIPC bool `json:"sharesIpc,omitempty"`
+ UsePodNet bool `json:"sharesNet,omitempty"`
+ UsePodMount bool `json:"sharesMnt,omitempty"`
+ UsePodUser bool `json:"sharesUser,omitempty"`
+ UsePodUTS bool `json:"sharesUts,omitempty"`
+ UsePodCgroupNS bool `json:"sharesCgroupNS,omitempty"`
InfraContainer *InfraContainerConfig `json:"infraConfig"`
@@ -167,7 +168,7 @@ func (p *Pod) SharesUTS() bool {
// SharesCgroup returns whether containers in the pod will default to this pod's
// cgroup instead of the default libpod parent
func (p *Pod) SharesCgroup() bool {
- return p.config.UsePodCgroup
+ return p.config.UsePodCgroupNS
}
// CgroupPath returns the path to the pod's CGroup