diff options
author | Dean Deng <deandeng@google.com> | 2020-04-06 07:30:20 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-04-06 07:31:27 -0700 |
commit | 00d9776a4bb1cc1d7125af7d3e54a939a4f3847a (patch) | |
tree | 4fdeebc6751a19977b42af8756d894a692a8b5da /pkg/sentry/fsimpl/tmpfs/tmpfs.go | |
parent | 748290236408f2c3e33b5f208352f8fd2ecbfa1e (diff) |
Add socket files to tmpfs VFS2.
Updates #1476.
PiperOrigin-RevId: 305024274
Diffstat (limited to 'pkg/sentry/fsimpl/tmpfs/tmpfs.go')
-rw-r--r-- | pkg/sentry/fsimpl/tmpfs/tmpfs.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/tmpfs.go b/pkg/sentry/fsimpl/tmpfs/tmpfs.go index ad47288f8..654e788e3 100644 --- a/pkg/sentry/fsimpl/tmpfs/tmpfs.go +++ b/pkg/sentry/fsimpl/tmpfs/tmpfs.go @@ -331,7 +331,7 @@ func (i *inode) statTo(stat *linux.Statx) { case *deviceFile: stat.RdevMajor = impl.major stat.RdevMinor = impl.minor - case *directory, *namedPipe: + case *socketFile, *directory, *namedPipe: // Nothing to do. default: panic(fmt.Sprintf("unknown inode type: %T", i.impl)) @@ -479,6 +479,8 @@ func (i *inode) direntType() uint8 { return linux.DT_DIR case *symlink: return linux.DT_LNK + case *socketFile: + return linux.DT_SOCK case *deviceFile: switch impl.kind { case vfs.BlockDevice: |