diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-01-11 10:34:27 +0100 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-02-08 15:02:28 -0500 |
commit | 550d39c3e9602096e456172f6d89eaa04712c1fa (patch) | |
tree | 89551fb7c5d20b670c2b17a11ea0526a729713dc /libpod | |
parent | c62efd08f75e97ba27d9e34068bcc2b3bf122896 (diff) | |
download | podman-550d39c3e9602096e456172f6d89eaa04712c1fa.tar.gz podman-550d39c3e9602096e456172f6d89eaa04712c1fa.tar.bz2 podman-550d39c3e9602096e456172f6d89eaa04712c1fa.zip |
spec: add nosuid,noexec,nodev to ro bind mount
runc fails to change the ro mode of a rootless bind mount if the other
flags are not kept.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 2f03d45ea..9c343d051 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -227,7 +227,7 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) { Options: []string{"bind", "private"}, } if c.IsReadOnly() && dstPath != "/dev/shm" { - newMount.Options = append(newMount.Options, "ro") + newMount.Options = append(newMount.Options, "ro", "nosuid", "noexec", "nodev") } if !MountExists(g.Mounts(), dstPath) { g.AddMount(newMount) |