summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/overlay/overlay.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-11-06 21:18:18 +0000
committergVisor bot <gvisor-bot@google.com>2020-11-06 21:18:18 +0000
commitee435928e3fb01146cf8f749ba0cec94fd75d0e8 (patch)
treeb4a209dec8acb36dfa5169e4d7db21028fc1e828 /pkg/sentry/fsimpl/overlay/overlay.go
parentad0d64d3307cf2a9fdca458f32288dcd645a7f1a (diff)
parent949dc1d096aa9ac58c73cc861b95c8172d82dfcd (diff)
Merge release-20201030.0-43-g949dc1d09 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/overlay/overlay.go')
-rw-r--r--pkg/sentry/fsimpl/overlay/overlay.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/overlay/overlay.go b/pkg/sentry/fsimpl/overlay/overlay.go
index f6c58f2e7..73130bc8d 100644
--- a/pkg/sentry/fsimpl/overlay/overlay.go
+++ b/pkg/sentry/fsimpl/overlay/overlay.go
@@ -696,6 +696,13 @@ func (d *dentry) topLayer() vfs.VirtualDentry {
return vd
}
+func (d *dentry) topLookupLayer() lookupLayer {
+ if d.upperVD.Ok() {
+ return lookupLayerUpper
+ }
+ return lookupLayerLower
+}
+
func (d *dentry) checkPermissions(creds *auth.Credentials, ats vfs.AccessTypes) error {
return vfs.GenericCheckPermissions(creds, ats, linux.FileMode(atomic.LoadUint32(&d.mode)), auth.KUID(atomic.LoadUint32(&d.uid)), auth.KGID(atomic.LoadUint32(&d.gid)))
}