summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-06-25 14:21:52 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-06-27 20:22:20 +0200
commita4094530bc8b0d5fdbd8ad4ce9a136fe15ee7cee (patch)
treeefe36097400962cd86db865d1f2977722f1e82bb
parent443a2afdb5bf471bca03a6de649e0978b13996ab (diff)
downloadpodman-a4094530bc8b0d5fdbd8ad4ce9a136fe15ee7cee.tar.gz
podman-a4094530bc8b0d5fdbd8ad4ce9a136fe15ee7cee.tar.bz2
podman-a4094530bc8b0d5fdbd8ad4ce9a136fe15ee7cee.zip
volume: drop TODO comment
the two operations are equivalent since securejoin.SecureJoin() has solved the symlinks. Prefer the Lstat version though to make sure symlinks are never resolved and we do not end up using a path on the host. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--libpod/container_internal.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index fe2a19a4e..8112c9a59 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1648,8 +1648,6 @@ func (c *Container) mountNamedVolume(v *ContainerNamedVolume, mountpoint string)
}
// Do a manual stat on the source directory to verify existence.
// Skip the rest if it exists.
- // TODO: Should this be stat or lstat? I'm using lstat because I
- // think copy-up doesn't happen when the source is a link.
srcStat, err := os.Lstat(srcDir)
if err != nil {
if os.IsNotExist(err) {