summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/mounts.go
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-07-12 15:24:04 -0700
committergVisor bot <gvisor-bot@google.com>2021-07-12 15:26:20 -0700
commite3fdd1593217894328d5a917bbc356d0a7d145f0 (patch)
tree1913cf79abb68fda218f249ffa32a7bf309330ac /pkg/sentry/fs/mounts.go
parentebe99977a47d93ee769121f9463650cfb924e243 (diff)
[syserror] Update syserror to linuxerr for more errors.
Update the following from syserror to the linuxerr equivalent: EEXIST EFAULT ENOTDIR ENOTTY EOPNOTSUPP ERANGE ESRCH PiperOrigin-RevId: 384329869
Diffstat (limited to 'pkg/sentry/fs/mounts.go')
-rw-r--r--pkg/sentry/fs/mounts.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/sentry/fs/mounts.go b/pkg/sentry/fs/mounts.go
index 3de1c5561..10146af4e 100644
--- a/pkg/sentry/fs/mounts.go
+++ b/pkg/sentry/fs/mounts.go
@@ -24,7 +24,6 @@ import (
"gvisor.dev/gvisor/pkg/refs"
"gvisor.dev/gvisor/pkg/sentry/kernel/auth"
"gvisor.dev/gvisor/pkg/sync"
- "gvisor.dev/gvisor/pkg/syserror"
)
// DefaultTraversalLimit provides a sensible default traversal limit that may
@@ -498,7 +497,7 @@ func (mns *MountNamespace) FindLink(ctx context.Context, root, wd *Dirent, path
if current != root {
if !IsDir(current.Inode.StableAttr) {
current.DecRef(ctx) // Drop reference from above.
- return nil, syserror.ENOTDIR
+ return nil, linuxerr.ENOTDIR
}
if err := current.Inode.CheckPermission(ctx, PermMask{Execute: true}); err != nil {
current.DecRef(ctx) // Drop reference from above.