summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-08-31 17:20:13 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-31 17:37:20 +0000
commit294c3f4cab3c5945e420a55263a7bece8a7030a1 (patch)
treee022620b48d6cbee06eb341401abcd3150a7b3f1
parent6d067fcba2bf84fb5e7c7691b796d42d67028176 (diff)
downloadpodman-294c3f4cab3c5945e420a55263a7bece8a7030a1.tar.gz
podman-294c3f4cab3c5945e420a55263a7bece8a7030a1.tar.bz2
podman-294c3f4cab3c5945e420a55263a7bece8a7030a1.zip
container: resolve rootfs symlinks
Prevent a runc error that doesn't like symlinks as part of the rootfs. Closes: https://github.com/containers/libpod/issues/1389 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1390 Approved by: rhatdan
-rw-r--r--libpod/container_internal.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 1c6143cd2..79bc49c37 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1295,6 +1295,10 @@ func (c *Container) mount() (string, error) {
if err != nil {
return "", errors.Wrapf(err, "error mounting storage for container %s", c.ID())
}
+ mountPoint, err = filepath.EvalSymlinks(mountPoint)
+ if err != nil {
+ return "", errors.Wrapf(err, "error resolving storage path for container %s", c.ID())
+ }
return mountPoint, nil
}