summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/syscalls/linux')
-rw-r--r--pkg/sentry/syscalls/linux/sys_file.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_file.go b/pkg/sentry/syscalls/linux/sys_file.go
index a2dbba7e0..5fbacc15e 100644
--- a/pkg/sentry/syscalls/linux/sys_file.go
+++ b/pkg/sentry/syscalls/linux/sys_file.go
@@ -460,14 +460,11 @@ func accessAt(t *kernel.Task, dirFD kdefs.FD, addr usermem.Addr, resolve bool, m
creds: creds,
}
- if err := d.Inode.CheckPermission(ctx, fs.PermMask{
+ return d.Inode.CheckPermission(ctx, fs.PermMask{
Read: mode&rOK != 0,
Write: mode&wOK != 0,
Execute: mode&xOK != 0,
- }); err != nil {
- return err
- }
- return nil
+ })
})
}