From 70fdc0573dced3464e9c31d674559f77c1de3973 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 24 Jun 2021 20:52:24 -0700 Subject: [PATCH] Revert "checkpoint: resolve symlink for external bind mount" This reverts commit da22625f6986f0ef196eaa1f8bb6adce098f0fb7 (PR 2902). Signed-off-by: Kir Kolyshkin --- libcontainer/container_linux.go | 3 --- tests/integration/checkpoint.bats | 13 +------------ 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index ed0d5ef35..0680539dc 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -780,9 +780,6 @@ const descriptorsFilename = "descriptors.json" func (c *linuxContainer) addCriuDumpMount(req *criurpc.CriuReq, m *configs.Mount) { mountDest := strings.TrimPrefix(m.Destination, c.config.Rootfs) - if dest, err := securejoin.SecureJoin(c.config.Rootfs, mountDest); err == nil { - mountDest = dest[len(c.config.Rootfs):] - } extMnt := &criurpc.ExtMountMap{ Key: proto.String(mountDest), Val: proto.String(mountDest), diff --git a/tests/integration/checkpoint.bats b/tests/integration/checkpoint.bats index 4b7e442bb..3cf2fc7f9 100644 --- a/tests/integration/checkpoint.bats +++ b/tests/integration/checkpoint.bats @@ -126,18 +126,7 @@ function simple_cr() { done } -@test "checkpoint and restore" { - simple_cr -} - -@test "checkpoint and restore (bind mount, destination is symlink)" { - mkdir -p rootfs/real/conf - ln -s /real/conf rootfs/conf - update_config ' .mounts += [{ - source: ".", - destination: "/conf", - options: ["bind"] - }]' +@test "checkpoint and restore " { simple_cr }