summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/vfs')
-rw-r--r--pkg/sentry/vfs/anonfs.go2
-rw-r--r--pkg/sentry/vfs/file_description.go7
-rw-r--r--pkg/sentry/vfs/timerfd.go1
3 files changed, 0 insertions, 10 deletions
diff --git a/pkg/sentry/vfs/anonfs.go b/pkg/sentry/vfs/anonfs.go
index 981bd8caa..adebaeefb 100644
--- a/pkg/sentry/vfs/anonfs.go
+++ b/pkg/sentry/vfs/anonfs.go
@@ -91,8 +91,6 @@ func (fs *anonFilesystem) Sync(ctx context.Context) error {
}
// AccessAt implements vfs.Filesystem.Impl.AccessAt.
-//
-// TODO(gvisor.dev/issue/1965): Implement access permissions.
func (fs *anonFilesystem) AccessAt(ctx context.Context, rp *ResolvingPath, creds *auth.Credentials, ats AccessTypes) error {
if !rp.Done() {
return syserror.ENOTDIR
diff --git a/pkg/sentry/vfs/file_description.go b/pkg/sentry/vfs/file_description.go
index 418d69b96..cfabd936c 100644
--- a/pkg/sentry/vfs/file_description.go
+++ b/pkg/sentry/vfs/file_description.go
@@ -91,10 +91,6 @@ type FileDescriptionOptions struct {
// ESPIPE.
DenyPWrite bool
- // if InvalidWrite is true, calls to FileDescription.Write() return
- // EINVAL.
- InvalidWrite bool
-
// If UseDentryMetadata is true, calls to FileDescription methods that
// interact with file and filesystem metadata (Stat, SetStat, StatFS,
// Listxattr, Getxattr, Setxattr, Removexattr) are implemented by calling
@@ -570,9 +566,6 @@ func (fd *FileDescription) PWrite(ctx context.Context, src usermem.IOSequence, o
// Write is similar to PWrite, but does not specify an offset.
func (fd *FileDescription) Write(ctx context.Context, src usermem.IOSequence, opts WriteOptions) (int64, error) {
- if fd.opts.InvalidWrite {
- return 0, syserror.EINVAL
- }
if !fd.writable {
return 0, syserror.EBADF
}
diff --git a/pkg/sentry/vfs/timerfd.go b/pkg/sentry/vfs/timerfd.go
index 42b880656..cc536ceaf 100644
--- a/pkg/sentry/vfs/timerfd.go
+++ b/pkg/sentry/vfs/timerfd.go
@@ -53,7 +53,6 @@ func (vfs *VirtualFilesystem) NewTimerFD(clock ktime.Clock, flags uint32) (*File
UseDentryMetadata: true,
DenyPRead: true,
DenyPWrite: true,
- InvalidWrite: true,
}); err != nil {
return nil, err
}