mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Fix directory perms vs umask for tmpcopyup
Bump fileutils to v0.5.1, which fixes permissions of newly created directories
to not depend on the value of umask.
Add a test case which fails like this before the fix:
mounts.bats
✗ runc run [tmpcopyup]
(in test file tests/integration/mounts.bats, line 28)
`[[ "${lines[0]}" == *'drwxrwxrwx'* ]]' failed
runc spec (status=0):
runc run test_busybox (status=0):
drwxr-xr-x 2 root root 40 Oct 4 22:35 /dir1/dir2
Fixes 3991.
(cherry picked from commit 730bc84418)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -10,6 +10,24 @@ function teardown() {
|
||||
teardown_bundle
|
||||
}
|
||||
|
||||
# https://github.com/opencontainers/runc/issues/3991
|
||||
@test "runc run [tmpcopyup]" {
|
||||
mkdir -p rootfs/dir1/dir2
|
||||
chmod 777 rootfs/dir1/dir2
|
||||
update_config ' .mounts += [{
|
||||
source: "tmpfs",
|
||||
destination: "/dir1",
|
||||
type: "tmpfs",
|
||||
options: ["tmpcopyup"]
|
||||
}]
|
||||
| .process.args |= ["ls", "-ld", "/dir1/dir2"]'
|
||||
|
||||
umask 022
|
||||
runc run test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "${lines[0]}" == *'drwxrwxrwx'* ]]
|
||||
}
|
||||
|
||||
@test "runc run [bind mount]" {
|
||||
update_config ' .mounts += [{
|
||||
source: ".",
|
||||
|
||||
Reference in New Issue
Block a user