summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/permissions.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-21 16:18:31 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-21 16:20:20 -0700
commit23070b2e5fab3c777dfd6389b80472ba9d58572e (patch)
treea10d4332bd2958268e0bb9026629d6cfe3b65469 /pkg/sentry/vfs/permissions.go
parent0ea03f501b6a367d5797bdb430abe8fac121e03c (diff)
Internal change.
PiperOrigin-RevId: 327892274
Diffstat (limited to 'pkg/sentry/vfs/permissions.go')
-rw-r--r--pkg/sentry/vfs/permissions.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/vfs/permissions.go b/pkg/sentry/vfs/permissions.go
index 33389c1df..014b928ed 100644
--- a/pkg/sentry/vfs/permissions.go
+++ b/pkg/sentry/vfs/permissions.go
@@ -271,7 +271,7 @@ func HasCapabilityOnFile(creds *auth.Credentials, cp linux.Capability, kuid auth
// operation must not proceed. Otherwise it returns the max length allowed to
// without violating the limit.
func CheckLimit(ctx context.Context, offset, size int64) (int64, error) {
- fileSizeLimit := limits.FromContext(ctx).Get(limits.FileSize).Cur
+ fileSizeLimit := limits.FromContextOrDie(ctx).Get(limits.FileSize).Cur
if fileSizeLimit > math.MaxInt64 {
return size, nil
}