summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/sockfs/sockfs.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-05-05 09:18:21 -0700
committergVisor bot <gvisor-bot@google.com>2020-05-05 09:21:14 -0700
commitb3bd41434c17a95a87d67490f2b9bfd71e1ad705 (patch)
tree8d64b583b1ed34cdab03d5a75cbc38590d380dfe /pkg/sentry/fsimpl/sockfs/sockfs.go
parent35951c3671f3d429399eb581ad9da3b56e2a5f5a (diff)
Return correct name for imported host files
Implement PrependPath() in host.filesystem to correctly format name for host files. Updates #1672 PiperOrigin-RevId: 309959135
Diffstat (limited to 'pkg/sentry/fsimpl/sockfs/sockfs.go')
-rw-r--r--pkg/sentry/fsimpl/sockfs/sockfs.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/pkg/sentry/fsimpl/sockfs/sockfs.go b/pkg/sentry/fsimpl/sockfs/sockfs.go
index dac2389fc..3f085d3ca 100644
--- a/pkg/sentry/fsimpl/sockfs/sockfs.go
+++ b/pkg/sentry/fsimpl/sockfs/sockfs.go
@@ -41,18 +41,13 @@ func (filesystemType) Name() string {
return "sockfs"
}
-// filesystem implements vfs.FilesystemImpl.
-type filesystem struct {
- kernfs.Filesystem
-}
-
// NewFilesystem sets up and returns a new sockfs filesystem.
//
// Note that there should only ever be one instance of sockfs.Filesystem,
// backing a global socket mount.
func NewFilesystem(vfsObj *vfs.VirtualFilesystem) *vfs.Filesystem {
- fs := &filesystem{}
- fs.Init(vfsObj, filesystemType{})
+ fs := &kernfs.Filesystem{}
+ fs.VFSFilesystem().Init(vfsObj, filesystemType{}, fs)
return fs.VFSFilesystem()
}