summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/tmpfs
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-29 03:17:56 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-29 03:17:56 +0000
commit633d413b30734e629996821342b81d4e67e0cb22 (patch)
tree2def7c27594dc8721649b86df5a9b9e856fbfe47 /pkg/sentry/fsimpl/tmpfs
parentb11d270c40b190c6aef7396d0e5f0941d123a345 (diff)
parentce19497c1c0829af6ba56f0cc68e3a4cb33cf1c8 (diff)
Merge release-20200413.0-18-gce19497 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/tmpfs')
-rwxr-xr-xpkg/sentry/fsimpl/tmpfs/filesystem.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/filesystem.go b/pkg/sentry/fsimpl/tmpfs/filesystem.go
index 388b98bef..36ffcb592 100755
--- a/pkg/sentry/fsimpl/tmpfs/filesystem.go
+++ b/pkg/sentry/fsimpl/tmpfs/filesystem.go
@@ -704,6 +704,9 @@ func (fs *filesystem) BoundEndpointAt(ctx context.Context, rp *vfs.ResolvingPath
if err != nil {
return nil, err
}
+ if err := d.inode.checkPermissions(rp.Credentials(), vfs.MayWrite); err != nil {
+ return nil, err
+ }
switch impl := d.inode.impl.(type) {
case *socketFile:
return impl.ep, nil