mirror of
https://github.com/moby/moby.git
synced 2026-08-08 17:11:38 +00:00
integration/volume: Make escaping image symlink storage-independent
The image subpath test uses a fixed number of parent traversals to reach an existing path outside the image root. User namespace remapping adds another directory to the graph root, so the link instead resolves to a nonexistent path and returns ErrNotAccessible. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
@@ -325,7 +325,7 @@ func setupTestImage(t *testing.T, ctx context.Context, apiClient client.APIClien
|
||||
FROM busybox as symlink
|
||||
RUN mkdir /hack \
|
||||
&& ln -s "../subdir" /hack/good \
|
||||
&& ln -s "../../../../../docker" /hack/bad
|
||||
&& ln -s ../../../../../ /hack/bad
|
||||
#--
|
||||
FROM scratch
|
||||
COPY foo /
|
||||
|
||||
Reference in New Issue
Block a user