summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/resolving_path.go
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-07-01 12:02:59 -0700
committergVisor bot <gvisor-bot@google.com>2021-07-01 12:05:19 -0700
commit590b8d3e99dd24d2bb625d00fa99fbc9296dfe2b (patch)
tree520cfce78c69fc6ec77be9fa78e041152cb6dd8b /pkg/sentry/vfs/resolving_path.go
parent07ffecef83bd31e78786af901c49a7be93b20517 (diff)
[syserror] Update several syserror errors to linuxerr equivalents.
Update/remove most syserror errors to linuxerr equivalents. For list of removed errors, see //pkg/syserror/syserror.go. PiperOrigin-RevId: 382574582
Diffstat (limited to 'pkg/sentry/vfs/resolving_path.go')
-rw-r--r--pkg/sentry/vfs/resolving_path.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/sentry/vfs/resolving_path.go b/pkg/sentry/vfs/resolving_path.go
index 97b898aba..6f58f33ce 100644
--- a/pkg/sentry/vfs/resolving_path.go
+++ b/pkg/sentry/vfs/resolving_path.go
@@ -19,6 +19,7 @@ import (
"gvisor.dev/gvisor/pkg/abi/linux"
"gvisor.dev/gvisor/pkg/context"
+ "gvisor.dev/gvisor/pkg/errors/linuxerr"
"gvisor.dev/gvisor/pkg/fspath"
"gvisor.dev/gvisor/pkg/sentry/kernel/auth"
"gvisor.dev/gvisor/pkg/sync"
@@ -327,7 +328,7 @@ func (rp *ResolvingPath) ShouldFollowSymlink() bool {
// Postconditions: If HandleSymlink returns a nil error, then !rp.Done().
func (rp *ResolvingPath) HandleSymlink(target string) error {
if rp.symlinks >= linux.MaxSymlinkTraversals {
- return syserror.ELOOP
+ return linuxerr.ELOOP
}
if len(target) == 0 {
return syserror.ENOENT
@@ -377,7 +378,7 @@ func (rp *ResolvingPath) relpathPrepend(path fspath.Path) {
// Preconditions: !rp.Done().
func (rp *ResolvingPath) HandleJump(target VirtualDentry) error {
if rp.symlinks >= linux.MaxSymlinkTraversals {
- return syserror.ELOOP
+ return linuxerr.ELOOP
}
rp.symlinks++
// Consume the path component that represented the magic link.