summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/proc/subtasks.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-03-14 13:46:55 -0700
committergVisor bot <gvisor-bot@google.com>2020-03-14 13:48:06 -0700
commit97127750289b49dd5e29f8ddb4209137e47fe52d (patch)
tree592b9ea2217ede2e7093b01fddac8bb185910797 /pkg/sentry/fsimpl/proc/subtasks.go
parent5e413cad10d2358a21dd08216953faee70e62a0b (diff)
Disallow kernfs.Inode.SetStat for readonly inodes
Updates #1195, #1193 PiperOrigin-RevId: 300950993
Diffstat (limited to 'pkg/sentry/fsimpl/proc/subtasks.go')
-rw-r--r--pkg/sentry/fsimpl/proc/subtasks.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/proc/subtasks.go b/pkg/sentry/fsimpl/proc/subtasks.go
index a3a7c16a5..ea6d60f6e 100644
--- a/pkg/sentry/fsimpl/proc/subtasks.go
+++ b/pkg/sentry/fsimpl/proc/subtasks.go
@@ -127,3 +127,8 @@ func (i *subtasksInode) Stat(vsfs *vfs.Filesystem, opts vfs.StatOptions) (linux.
}
return stat, nil
}
+
+// SetStat implements Inode.SetStat not allowing inode attributes to be changed.
+func (*subtasksInode) SetStat(*vfs.Filesystem, vfs.SetStatOptions) error {
+ return syserror.EPERM
+}