summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-11-01 23:56:12 +0000
committergVisor bot <gvisor-bot@google.com>2021-11-01 23:56:12 +0000
commit53df4a4a2b98254bc33631bbd5a473ec2198e850 (patch)
tree1c602f6068cd48e06680c5c2584e7b345044e747
parentaac9c42f3e58cced50246227469b3c4a300c5678 (diff)
parent58017e655399384afed2cedea0e269cb1ad2dd7e (diff)
Merge release-20211026.0-20-g58017e655 (automated)
-rw-r--r--pkg/sentry/syscalls/linux/vfs2/mount.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/mount.go b/pkg/sentry/syscalls/linux/vfs2/mount.go
index 4d73d46ef..fd0ab4c76 100644
--- a/pkg/sentry/syscalls/linux/vfs2/mount.go
+++ b/pkg/sentry/syscalls/linux/vfs2/mount.go
@@ -136,14 +136,14 @@ func Umount2(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysca
if err != nil {
return 0, nil, err
}
- tpop, err := getTaskPathOperation(t, linux.AT_FDCWD, path, disallowEmptyPath, nofollowFinalSymlink)
+ tpop, err := getTaskPathOperation(t, linux.AT_FDCWD, path, disallowEmptyPath, shouldFollowFinalSymlink(flags&linux.UMOUNT_NOFOLLOW == 0))
if err != nil {
return 0, nil, err
}
defer tpop.Release(t)
opts := vfs.UmountOptions{
- Flags: uint32(flags),
+ Flags: uint32(flags &^ linux.UMOUNT_NOFOLLOW),
}
return 0, nil, t.Kernel().VFS().UmountAt(t, creds, &tpop.pop, &opts)