diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-23 18:46:32 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-23 18:46:32 +0000 |
commit | 81ebcec22a2709694aa5894157258ee7de076d3b (patch) | |
tree | 8e87dacb88b3934b4803babcf329ae693636a7c9 /pkg/sentry/fsimpl/sockfs | |
parent | 3e591e286dac3ca86406ce35da61163b7de38016 (diff) | |
parent | 6ee3520b611ea2b487d4f2e12e0a0a50c62836da (diff) |
Merge release-20201019.0-41-g6ee3520b6 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/sockfs')
-rw-r--r-- | pkg/sentry/fsimpl/sockfs/sockfs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/sockfs/sockfs.go b/pkg/sentry/fsimpl/sockfs/sockfs.go index cf91ea36c..fda1fa942 100644 --- a/pkg/sentry/fsimpl/sockfs/sockfs.go +++ b/pkg/sentry/fsimpl/sockfs/sockfs.go @@ -108,13 +108,13 @@ func (i *inode) StatFS(ctx context.Context, fs *vfs.Filesystem) (linux.Statfs, e // NewDentry constructs and returns a sockfs dentry. // // Preconditions: mnt.Filesystem() must have been returned by NewFilesystem(). -func NewDentry(creds *auth.Credentials, mnt *vfs.Mount) *vfs.Dentry { +func NewDentry(ctx context.Context, mnt *vfs.Mount) *vfs.Dentry { fs := mnt.Filesystem().Impl().(*filesystem) // File mode matches net/socket.c:sock_alloc. filemode := linux.FileMode(linux.S_IFSOCK | 0600) i := &inode{} - i.InodeAttrs.Init(creds, linux.UNNAMED_MAJOR, fs.devMinor, fs.Filesystem.NextIno(), filemode) + i.InodeAttrs.Init(ctx, auth.CredentialsFromContext(ctx), linux.UNNAMED_MAJOR, fs.devMinor, fs.Filesystem.NextIno(), filemode) d := &kernfs.Dentry{} d.Init(&fs.Filesystem, i) |