From b3bd41434c17a95a87d67490f2b9bfd71e1ad705 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Tue, 5 May 2020 09:18:21 -0700 Subject: Return correct name for imported host files Implement PrependPath() in host.filesystem to correctly format name for host files. Updates #1672 PiperOrigin-RevId: 309959135 --- pkg/sentry/fsimpl/sockfs/sockfs.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'pkg/sentry/fsimpl/sockfs/sockfs.go') 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() } -- cgit v1.2.3