From d1e4813e014f444298643ff22a878a58b4b7d3e4 Mon Sep 17 00:00:00 2001 From: Chong Cai Date: Fri, 23 Oct 2020 22:39:59 -0700 Subject: Internal change. PiperOrigin-RevId: 338798433 --- pkg/sentry/fsimpl/verity/verity.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pkg') diff --git a/pkg/sentry/fsimpl/verity/verity.go b/pkg/sentry/fsimpl/verity/verity.go index a0e954efa..b0377ed71 100644 --- a/pkg/sentry/fsimpl/verity/verity.go +++ b/pkg/sentry/fsimpl/verity/verity.go @@ -815,6 +815,16 @@ func (fd *fileDescription) PRead(ctx context.Context, dst usermem.IOSequence, of return n, err } +// PWrite implements vfs.FileDescriptionImpl.PWrite. +func (fd *fileDescription) PWrite(ctx context.Context, src usermem.IOSequence, offset int64, opts vfs.WriteOptions) (int64, error) { + return 0, syserror.EROFS +} + +// Write implements vfs.FileDescriptionImpl.Write. +func (fd *fileDescription) Write(ctx context.Context, src usermem.IOSequence, opts vfs.WriteOptions) (int64, error) { + return 0, syserror.EROFS +} + // LockPOSIX implements vfs.FileDescriptionImpl.LockPOSIX. func (fd *fileDescription) LockPOSIX(ctx context.Context, uid fslock.UniqueID, t fslock.LockType, start, length uint64, whence int16, block fslock.Blocker) error { return fd.lowerFD.LockPOSIX(ctx, uid, t, start, length, whence, block) -- cgit v1.2.3