newsnowlabs/runcvm

alpine /dev/tty and /dev/null permissions are wrong

struanb opened this issue · 1 comments

Compare alpine and debian, using runcvm and runc, below:

$ docker run --rm --runtime=runcvm alpine ash -c 'ls -l /dev/tty /dev/null'
crw-rw----    1 root     root        1,   3 Nov 16 23:48 /dev/null
crw-rw----    1 root     root        5,   0 Nov 16 23:48 /dev/tty

$ docker run --rm --runtime=runc alpine ash -c 'ls -l /dev/tty /dev/null'
crw-rw-rw-    1 root     root        1,   3 Nov 16 23:48 /dev/null
crw-rw-rw-    1 root     root        5,   0 Nov 16 23:48 /dev/tty

$ docker run --rm --runtime=runcvm debian bash -c 'ls -l /dev/tty /dev/null'
crw-rw-rw- 1 root root 1, 3 Nov 16 23:49 /dev/null
crw-rw-rw- 1 root root 5, 0 Nov 16 23:49 /dev/tty

$ docker run --rm --runtime=runc debian bash -c 'ls -l /dev/tty /dev/null'
crw-rw-rw- 1 root root 1, 3 Nov 16 23:49 /dev/null
crw-rw-rw- 1 root root 5, 0 Nov 16 23:49 /dev/tty

Fixed in commit b27dea7

$ docker run --rm --runtime=runcvm alpine ash -c 'ls -l /dev/tty /dev/null'
crw-rw-rw-    1 root     root        1,   3 Nov 21 22:28 /dev/null
crw-rw-rw-    1 root     tty         5,   0 Nov 21 22:28 /dev/tty