diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-02-04 09:14:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 09:14:15 -0500 |
commit | 4ad9e0030bc20826f735cf4ec0d5ecc287647218 (patch) | |
tree | 7d7bdaea0e8993075ff033f1545d8b8b6eadcffa /libpod/container_internal_linux.go | |
parent | 337f706f6118f2c91e9906afcdaa233f7cfdbaf9 (diff) | |
parent | cad3eb78b4b17e7edec1fdec9ce8a948ab2819e1 (diff) | |
download | podman-4ad9e0030bc20826f735cf4ec0d5ecc287647218.tar.gz podman-4ad9e0030bc20826f735cf4ec0d5ecc287647218.tar.bz2 podman-4ad9e0030bc20826f735cf4ec0d5ecc287647218.zip |
Merge pull request #13133 from mheon/bump_400_rc4
Bump to v4.0.0-RC4
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r-- | libpod/container_internal_linux.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 5cc2a78fc..86d8586d0 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -510,6 +510,9 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) { if c.IsReadOnly() && dstPath != "/dev/shm" { newMount.Options = append(newMount.Options, "ro", "nosuid", "noexec", "nodev") } + if dstPath == "/dev/shm" && c.state.BindMounts["/dev/shm"] == c.config.ShmDir { + newMount.Options = append(newMount.Options, "nosuid", "noexec", "nodev") + } if !MountExists(g.Mounts(), dstPath) { g.AddMount(newMount) } else { @@ -1570,6 +1573,9 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti if c.IsReadOnly() && dstPath != "/dev/shm" { newMount.Options = append(newMount.Options, "ro", "nosuid", "noexec", "nodev") } + if dstPath == "/dev/shm" && c.state.BindMounts["/dev/shm"] == c.config.ShmDir { + newMount.Options = append(newMount.Options, "nosuid", "noexec", "nodev") + } if !MountExists(g.Mounts(), dstPath) { g.AddMount(newMount) } |