mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon/setMounts(): do not make /dev/shm ro
It has been pointed out that if --read-only flag is given, /dev/shm also becomes read-only in case of --ipc private. This happens because in this case the mount comes from OCI spec (since commit7120976d74
), and is a regression caused by that commit. The meaning of --read-only flag is to only have a "main" container filesystem read-only, not the auxiliary stuff (that includes /dev/shm, other mounts and volumes, --tmpfs, /proc, /dev and so on). So, let's make sure /dev/shm that comes from OCI spec is not made read-only. Fixes:7120976d74
("Implement none, private, and shareable ipc modes") Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
33dd562e3a
commit
cad74056c0
1 changed files with 1 additions and 1 deletions
|
@ -667,7 +667,7 @@ func setMounts(daemon *Daemon, s *specs.Spec, c *container.Container, mounts []c
|
|||
if s.Root.Readonly {
|
||||
for i, m := range s.Mounts {
|
||||
switch m.Destination {
|
||||
case "/proc", "/dev/pts", "/dev/mqueue", "/dev":
|
||||
case "/proc", "/dev/pts", "/dev/shm", "/dev/mqueue", "/dev":
|
||||
continue
|
||||
}
|
||||
if _, ok := userMounts[m.Destination]; !ok {
|
||||
|
|
Loading…
Add table
Reference in a new issue