diff options
author | Craig Chi <craigchi@google.com> | 2020-07-14 15:42:47 -0700 |
---|---|---|
committer | Craig Chi <craigchi@google.com> | 2020-07-14 15:56:41 -0700 |
commit | 8494a0325d2ca7ba7bc9c17e55546f1665500660 (patch) | |
tree | 47942736bccdeddd71b58859eb65007d447ee6f9 /pkg/sentry/fsimpl/proc/subtasks.go | |
parent | 8a0082f5f3aaad053873800feae8d0fb8b504c50 (diff) |
Include context in kernfs.Inode.Stat method
To implement stat(2) in FUSE, we have to embed credentials and pid in request
header. The information should be extracted from the context passed to VFS
layer. Therefore `Stat()` signature in `kernfs.Inode` interface should include
context as first argument. Some other fs implementations need to be modified as
well, such as devpts, host, pipefs, and proc.
Fixes #3235
Diffstat (limited to 'pkg/sentry/fsimpl/proc/subtasks.go')
-rw-r--r-- | pkg/sentry/fsimpl/proc/subtasks.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/proc/subtasks.go b/pkg/sentry/fsimpl/proc/subtasks.go index 36a89540c..dad4db1a7 100644 --- a/pkg/sentry/fsimpl/proc/subtasks.go +++ b/pkg/sentry/fsimpl/proc/subtasks.go @@ -165,8 +165,8 @@ func (i *subtasksInode) Open(ctx context.Context, rp *vfs.ResolvingPath, vfsd *v } // Stat implements kernfs.Inode. -func (i *subtasksInode) Stat(vsfs *vfs.Filesystem, opts vfs.StatOptions) (linux.Statx, error) { - stat, err := i.InodeAttrs.Stat(vsfs, opts) +func (i *subtasksInode) Stat(ctx context.Context, vsfs *vfs.Filesystem, opts vfs.StatOptions) (linux.Statx, error) { + stat, err := i.InodeAttrs.Stat(ctx, vsfs, opts) if err != nil { return linux.Statx{}, err } |