diff options
author | Aditya R <arajan@redhat.com> | 2022-03-02 15:07:06 +0530 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2022-03-30 13:30:47 -0400 |
commit | 69543d6c7aff9b31d8ad3f151f05267aa34e8e6c (patch) | |
tree | d3e8f79f407907d8549322c03e91a55e8fcbf5c7 /test/e2e/save_test.go | |
parent | 0a839a59ec43ae03c522a1b82224605219256ab1 (diff) | |
download | podman-69543d6c7aff9b31d8ad3f151f05267aa34e8e6c.tar.gz podman-69543d6c7aff9b31d8ad3f151f05267aa34e8e6c.tar.bz2 podman-69543d6c7aff9b31d8ad3f151f05267aa34e8e6c.zip |
container: workdir resolution must consider symlink if explicitly configured
While resolving `workdir` we mostly create a `workdir` when `stat`
fails with `ENOENT` or `ErrNotExist` however following cases are not
true when user explicitly specifies a `workdir` while `running` using
`--workdir` which tells `podman` to only use workdir if its exists on
the container. Following configuration is implicity set with other
`run` mechanism like `podman play kube`
Problem with explicit `--workdir` or similar implicit config in `podman play
kube` is that currently podman ignores the fact that workdir can also be
a `symlink` and actual `link` could be valid.
Hence following commit ensures that in such scenarios when a `workdir`
is not found and we cannot create a `workdir` podman must perform a
check to ensure that if `workdir` is a `symlink` and `link` is resolved
successfully and resolved link is present on the container then we
return as it is.
Docker performs a similar behviour.
Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'test/e2e/save_test.go')
0 files changed, 0 insertions, 0 deletions