diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-23 23:31:01 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-23 23:31:01 +0000 |
commit | 8e2958434d9fb2d8dc75cd3942be4c90b5c9d7d3 (patch) | |
tree | 8c0693df3dab98d100cc68330669138e86839d5c /runsc/boot | |
parent | 36211dedcc236309759ea793e2fb5d7fbedbd848 (diff) | |
parent | 960155cdaad49ccea07e45152f124beeb7e7fdcc (diff) |
Merge release-20210315.0-17-g960155cda (automated)
Diffstat (limited to 'runsc/boot')
-rw-r--r-- | runsc/boot/fs.go | 7 | ||||
-rw-r--r-- | runsc/boot/vfs.go | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go index d1dacee03..32adde643 100644 --- a/runsc/boot/fs.go +++ b/runsc/boot/fs.go @@ -792,7 +792,7 @@ func (c *containerMounter) getMountNameAndOptions(conf *config.Config, m specs.M case bind: fd := c.fds.remove() fsName = gofervfs2.Name - opts = p9MountData(fd, c.getMountAccessType(m), conf.VFS2) + opts = p9MountData(fd, c.getMountAccessType(conf, m), conf.VFS2) // If configured, add overlay to all writable mounts. useOverlay = conf.Overlay && !mountFlags(m.Options).ReadOnly @@ -802,12 +802,11 @@ func (c *containerMounter) getMountNameAndOptions(conf *config.Config, m specs.M return fsName, opts, useOverlay, nil } -func (c *containerMounter) getMountAccessType(mount specs.Mount) config.FileAccessType { +func (c *containerMounter) getMountAccessType(conf *config.Config, mount specs.Mount) config.FileAccessType { if hint := c.hints.findMount(mount); hint != nil { return hint.fileAccessType() } - // Non-root bind mounts are always shared if no hints were provided. - return config.FileAccessShared + return conf.FileAccessMounts } // mountSubmount mounts volumes inside the container's root. Because mounts may diff --git a/runsc/boot/vfs.go b/runsc/boot/vfs.go index 3fd28e516..9b3dacf46 100644 --- a/runsc/boot/vfs.go +++ b/runsc/boot/vfs.go @@ -494,7 +494,7 @@ func (c *containerMounter) getMountNameAndOptionsVFS2(conf *config.Config, m *mo // but unlikely to be correct in this context. return "", nil, false, fmt.Errorf("9P mount requires a connection FD") } - data = p9MountData(m.fd, c.getMountAccessType(m.Mount), true /* vfs2 */) + data = p9MountData(m.fd, c.getMountAccessType(conf, m.Mount), true /* vfs2 */) iopts = gofer.InternalFilesystemOptions{ UniqueID: m.Destination, } |