diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-12 01:06:00 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-12 01:06:00 +0000 |
commit | 8a7964657411d80c685128531099d6c246216f12 (patch) | |
tree | 43a12cad4774774951da1548519e59ecff0050ae /pkg/sentry/fsimpl/fuse/fusefs.go | |
parent | 3bbc07ece91af55682430e6ae2a30060f5f7fd9c (diff) | |
parent | c5667022b6617d732e0c0bcb8ca3b58d588ceafb (diff) |
Merge release-20210301.0-37-gc5667022b (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/fuse/fusefs.go')
-rw-r--r-- | pkg/sentry/fsimpl/fuse/fusefs.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/fuse/fusefs.go b/pkg/sentry/fsimpl/fuse/fusefs.go index 204d8d143..fb0ba2c6d 100644 --- a/pkg/sentry/fsimpl/fuse/fusefs.go +++ b/pkg/sentry/fsimpl/fuse/fusefs.go @@ -47,6 +47,9 @@ type FilesystemType struct{} // +stateify savable type filesystemOptions struct { + // mopts contains the raw, unparsed mount options passed to this filesystem. + mopts string + // userID specifies the numeric uid of the mount owner. // This option should not be specified by the filesystem owner. // It is set by libfuse (or, if libfuse is not used, must be set @@ -108,7 +111,7 @@ func (fsType FilesystemType) GetFilesystem(ctx context.Context, vfsObj *vfs.Virt return nil, nil, err } - var fsopts filesystemOptions + fsopts := filesystemOptions{mopts: opts.Data} mopts := vfs.GenericParseMountOptions(opts.Data) deviceDescriptorStr, ok := mopts["fd"] if !ok { @@ -260,6 +263,11 @@ func (fs *filesystem) Release(ctx context.Context) { fs.Filesystem.Release(ctx) } +// MountOptions implements vfs.FilesystemImpl.MountOptions. +func (fs *filesystem) MountOptions() string { + return fs.opts.mopts +} + // inode implements kernfs.Inode. // // +stateify savable |