diff options
author | Dean Deng <deandeng@google.com> | 2020-05-05 10:00:02 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-05 10:01:28 -0700 |
commit | a6dbf9596de58f1a264c236bf5afb8dfcfe78174 (patch) | |
tree | 0118e12216880d5a5e8384f7f372089cc544db7f /pkg/sentry/fsimpl/gofer/filesystem.go | |
parent | b3bd41434c17a95a87d67490f2b9bfd71e1ad705 (diff) |
Update comments for synthetic gofer files in vfs2.
PiperOrigin-RevId: 309966538
Diffstat (limited to 'pkg/sentry/fsimpl/gofer/filesystem.go')
-rw-r--r-- | pkg/sentry/fsimpl/gofer/filesystem.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/gofer/filesystem.go b/pkg/sentry/fsimpl/gofer/filesystem.go index 4a8411371..4a32821bd 100644 --- a/pkg/sentry/fsimpl/gofer/filesystem.go +++ b/pkg/sentry/fsimpl/gofer/filesystem.go @@ -686,6 +686,8 @@ func (fs *filesystem) MknodAt(ctx context.Context, rp *vfs.ResolvingPath, opts v return fs.doCreateAt(ctx, rp, false /* dir */, func(parent *dentry, name string) error { creds := rp.Credentials() _, err := parent.file.mknod(ctx, name, (p9.FileMode)(opts.Mode), opts.DevMajor, opts.DevMinor, (p9.UID)(creds.EffectiveKUID), (p9.GID)(creds.EffectiveKGID)) + // If the gofer does not allow creating a socket or pipe, create a + // synthetic one, i.e. one that is kept entirely in memory. if err == syserror.EPERM { switch opts.Mode.FileType() { case linux.S_IFSOCK: |