summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/gofer/filesystem.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-05-05 17:06:15 +0000
committergVisor bot <gvisor-bot@google.com>2020-05-05 17:06:15 +0000
commit2e0241989cbd0c035766917abcadacdf58921fc0 (patch)
treed53bb50bb2a060c73382df07ba16a1714d09a295 /pkg/sentry/fsimpl/gofer/filesystem.go
parent0d55bbfaf332c52ca6edc547947e7c05dfbd5fa2 (diff)
parenta6dbf9596de58f1a264c236bf5afb8dfcfe78174 (diff)
Merge release-20200422.0-28-ga6dbf95 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/gofer/filesystem.go')
-rwxr-xr-xpkg/sentry/fsimpl/gofer/filesystem.go2
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 100755
--- 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: