mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests/int: test for /dev/null owner regression
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 1bb6209aa1)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -125,10 +125,25 @@ function teardown() {
|
||||
|
||||
runc exec --user 1000:1000 test_busybox id
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
[[ "${output}" == "uid=1000 gid=1000"* ]]
|
||||
}
|
||||
|
||||
# https://github.com/opencontainers/runc/issues/3674.
|
||||
@test "runc exec --user vs /dev/null ownership" {
|
||||
requires root
|
||||
|
||||
runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
ls -l /dev/null
|
||||
__runc exec -d --user 1000:1000 test_busybox id </dev/null
|
||||
ls -l /dev/null
|
||||
UG=$(stat -c %u:%g /dev/null)
|
||||
|
||||
# Host's /dev/null must be owned by root.
|
||||
[ "$UG" = "0:0" ]
|
||||
}
|
||||
|
||||
@test "runc exec --additional-gids" {
|
||||
requires root
|
||||
|
||||
|
||||
Reference in New Issue
Block a user