Use overlay MountSource when binding socket in overlay.

PiperOrigin-RevId: 280131840
This commit is contained in:
Nicolas Lacasse
2019-11-12 23:01:47 -08:00
committed by gVisor bot
parent 2c6c9af904
commit c2d3dc0c13
+3 -1
View File
@@ -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 {