Add a test for USER symlink resolution
Add a test that makes sure we catch cases where we attempt to open a file in the container's tree that's actually a symlink that points out of the tree. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> Closes: #313 Approved by: rhatdan
This commit is contained in:
parent
dbebeb7235
commit
d41ac23a03
|
@ -168,6 +168,13 @@ load helpers
|
||||||
run buildah --debug=false run -- $cid id -g
|
run buildah --debug=false run -- $cid id -g
|
||||||
[ "$output" = $testgroupid ]
|
[ "$output" = $testgroupid ]
|
||||||
|
|
||||||
|
ln -vsf /etc/passwd $root/etc/passwd
|
||||||
|
buildah config $cid -u ${testuser}:${testgroup}
|
||||||
|
run buildah --debug=false run -- $cid id -u
|
||||||
|
echo "$output"
|
||||||
|
[ "$status" -ne 0 ]
|
||||||
|
[[ "$output" =~ "unknown user" ]]
|
||||||
|
|
||||||
buildah unmount $cid
|
buildah unmount $cid
|
||||||
buildah rm $cid
|
buildah rm $cid
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue