diff options
author | Michael Pratt <mpratt@google.com> | 2019-05-17 13:46:18 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-05-17 13:47:40 -0700 |
commit | 4a842836e560322bb3944b59ff43b9d60cc0f867 (patch) | |
tree | d49985b67ce92bdac5a5a2fab8b18be35d3643b9 /pkg/sentry/fs/gofer | |
parent | 04105781ad558662e1e48bad17197df244ff7841 (diff) |
Return EPERM for mknod
This more directly matches what Linux does with unsupported
nodes.
PiperOrigin-RevId: 248780425
Change-Id: I17f3dd0b244f6dc4eb00e2e42344851b8367fbec
Diffstat (limited to 'pkg/sentry/fs/gofer')
-rw-r--r-- | pkg/sentry/fs/gofer/path.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fs/gofer/path.go b/pkg/sentry/fs/gofer/path.go index babfa4560..148e2f038 100644 --- a/pkg/sentry/fs/gofer/path.go +++ b/pkg/sentry/fs/gofer/path.go @@ -281,9 +281,9 @@ func (i *inodeOperations) Bind(ctx context.Context, dir *fs.Inode, name string, } // CreateFifo implements fs.InodeOperations.CreateFifo. Gofer nodes do not support the -// creation of fifos and always returns EOPNOTSUPP. +// creation of fifos and always returns EPERM. func (*inodeOperations) CreateFifo(context.Context, *fs.Inode, string, fs.FilePermissions) error { - return syscall.EOPNOTSUPP + return syscall.EPERM } // Remove implements InodeOperations.Remove. |