summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/sys_mount.go
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2019-06-19 11:55:22 -0700
committergVisor bot <gvisor-bot@google.com>2019-06-19 11:56:34 -0700
commit29f9e4fa876a8f4f6cda8c54e99de59982692962 (patch)
tree95f59391e1846ba43724fe0bdc3ed96e38a13ba0 /pkg/sentry/syscalls/linux/sys_mount.go
parentf7428af9c11cd47e6252a3fbf24db411e513c241 (diff)
fileOp{On,At} should pass the remaning symlink traversal count.
And methods that do more traversals should use the remaining count rather than resetting. PiperOrigin-RevId: 254041720
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_mount.go')
-rw-r--r--pkg/sentry/syscalls/linux/sys_mount.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_mount.go b/pkg/sentry/syscalls/linux/sys_mount.go
index f933ce63f..9080a10c3 100644
--- a/pkg/sentry/syscalls/linux/sys_mount.go
+++ b/pkg/sentry/syscalls/linux/sys_mount.go
@@ -109,7 +109,7 @@ func Mount(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscall
return 0, nil, syserror.EINVAL
}
- return 0, nil, fileOpOn(t, linux.AT_FDCWD, targetPath, true /* resolve */, func(root *fs.Dirent, d *fs.Dirent) error {
+ return 0, nil, fileOpOn(t, linux.AT_FDCWD, targetPath, true /* resolve */, func(root *fs.Dirent, d *fs.Dirent, _ uint) error {
return t.MountNamespace().Mount(t, d, rootInode)
})
}
@@ -140,7 +140,7 @@ func Umount2(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysca
resolve := flags&linux.UMOUNT_NOFOLLOW != linux.UMOUNT_NOFOLLOW
detachOnly := flags&linux.MNT_DETACH == linux.MNT_DETACH
- return 0, nil, fileOpOn(t, linux.AT_FDCWD, path, resolve, func(root *fs.Dirent, d *fs.Dirent) error {
+ return 0, nil, fileOpOn(t, linux.AT_FDCWD, path, resolve, func(root *fs.Dirent, d *fs.Dirent, _ uint) error {
return t.MountNamespace().Unmount(t, d, detachOnly)
})
}