diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2019-11-12 22:49:22 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-11-12 23:01:47 -0800 |
commit | c2d3dc0c13e1adfc182c33d57e410c46fe12415f (patch) | |
tree | 172637d44e69e7643bb0f0e457478c78fbbac660 /pkg | |
parent | 2c6c9af904c99371fe4381517375cd114917db59 (diff) |
Use overlay MountSource when binding socket in overlay.
PiperOrigin-RevId: 280131840
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/sentry/fs/inode_overlay.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/fs/inode_overlay.go b/pkg/sentry/fs/inode_overlay.go index 5a388dad1..a09147080 100644 --- a/pkg/sentry/fs/inode_overlay.go +++ b/pkg/sentry/fs/inode_overlay.go @@ -462,7 +462,9 @@ func overlayBind(ctx context.Context, o *overlayEntry, parent *Dirent, name stri inode.DecRef() return nil, err } - return NewDirent(ctx, newOverlayInode(ctx, entry, inode.MountSource), name), nil + // Use the parent's MountSource, since that corresponds to the overlay, + // and not the upper filesystem. + return NewDirent(ctx, newOverlayInode(ctx, entry, parent.Inode.MountSource), name), nil } func overlayBoundEndpoint(o *overlayEntry, path string) transport.BoundEndpoint { |