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/pipefs/pipefs.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/pipefs/pipefs.go')
-rw-r--r-- | pkg/sentry/fsimpl/pipefs/pipefs.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/pipefs/pipefs.go b/pkg/sentry/fsimpl/pipefs/pipefs.go index dd7eaf4a8..811f80a5f 100644 --- a/pkg/sentry/fsimpl/pipefs/pipefs.go +++ b/pkg/sentry/fsimpl/pipefs/pipefs.go @@ -115,7 +115,7 @@ func (i *inode) Mode() linux.FileMode { } // Stat implements kernfs.Inode.Stat. -func (i *inode) Stat(vfsfs *vfs.Filesystem, opts vfs.StatOptions) (linux.Statx, error) { +func (i *inode) Stat(_ context.Context, vfsfs *vfs.Filesystem, opts vfs.StatOptions) (linux.Statx, error) { ts := linux.NsecToStatxTimestamp(i.ctime.Nanoseconds()) return linux.Statx{ Mask: linux.STATX_TYPE | linux.STATX_MODE | linux.STATX_NLINK | linux.STATX_UID | linux.STATX_GID | linux.STATX_ATIME | linux.STATX_MTIME | linux.STATX_CTIME | linux.STATX_INO | linux.STATX_SIZE | linux.STATX_BLOCKS, |