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:
Nalin Dahyabhai 2017-04-12 13:35:48 -04:00 committed by Atomic Bot
parent dbebeb7235
commit d41ac23a03
1 changed files with 7 additions and 0 deletions

View File

@ -168,6 +168,13 @@ load helpers
run buildah --debug=false run -- $cid id -g
[ "$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 rm $cid
}