summaryrefslogtreecommitdiff
path: root/pkg/spec/spec.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-09-13 15:00:58 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-13 21:35:44 +0000
commite2137cd009376af0f66855221bd2605bd3297104 (patch)
treed34f45bd306d65c6cfec122a17797fd711564375 /pkg/spec/spec.go
parentf0a3a4329ecaaadd60331641712d5e9b35e1120f (diff)
downloadpodman-e2137cd009376af0f66855221bd2605bd3297104.tar.gz
podman-e2137cd009376af0f66855221bd2605bd3297104.tar.bz2
podman-e2137cd009376af0f66855221bd2605bd3297104.zip
Swap default mount propagation from private to rprivate
This matches Docker behavior more closely and should resolve an issue we were seeing with /sys mounts Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #1465 Approved by: rhatdan
Diffstat (limited to 'pkg/spec/spec.go')
-rw-r--r--pkg/spec/spec.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index 77dbf8b42..cc3501e1e 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -43,7 +43,7 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
Destination: "/sys",
Type: "sysfs",
Source: "sysfs",
- Options: []string{"private", "nosuid", "noexec", "nodev", "rw"},
+ Options: []string{"rprivate", "nosuid", "noexec", "nodev", "rw"},
}
g.AddMount(sysMnt)
} else if !canMountSys {
@@ -57,7 +57,7 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
Destination: "/sys",
Type: "bind",
Source: "/sys",
- Options: []string{"nosuid", "noexec", "nodev", r, "rbind"},
+ Options: []string{"rprivate", "nosuid", "noexec", "nodev", r, "rbind"},
}
g.AddMount(sysMnt)
}
@@ -67,7 +67,7 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
Destination: "/dev/pts",
Type: "devpts",
Source: "devpts",
- Options: []string{"private", "nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620"},
+ Options: []string{"rprivate", "nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620"},
}
g.AddMount(devPts)
}
@@ -97,7 +97,7 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
Destination: "/sys/fs/cgroup",
Type: "cgroup",
Source: "cgroup",
- Options: []string{"private", "nosuid", "noexec", "nodev", "relatime", cgroupPerm},
+ Options: []string{"rprivate", "nosuid", "noexec", "nodev", "relatime", cgroupPerm},
}
g.AddMount(cgroupMnt)
}
@@ -231,7 +231,7 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
}
for _, i := range config.Tmpfs {
// Default options if nothing passed
- options := []string{"rw", "private", "noexec", "nosuid", "nodev", "size=65536k"}
+ options := []string{"rw", "rprivate", "noexec", "nosuid", "nodev", "size=65536k"}
spliti := strings.SplitN(i, ":", 2)
if len(spliti) > 1 {
if _, _, err := mount.ParseTmpfsOptions(spliti[1]); err != nil {
@@ -385,7 +385,7 @@ func setupSystemd(config *CreateConfig, g *generate.Generator) error {
if err != nil {
return err
}
- options := []string{"rw", "private", "noexec", "nosuid", "nodev"}
+ options := []string{"rw", "rprivate", "noexec", "nosuid", "nodev"}
for _, dest := range []string{"/run", "/run/lock", "/sys/fs/cgroup/systemd"} {
if libpod.MountExists(mounts, dest) {
continue