-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharing /dev/ with the container breaks /dev/ptmx on the host #80
Comments
This seems to be due to the default SELinux policy for a Fedora system which includes:
This omits the Symlink that replaces the character device. The following resolves the condition in my testing:
I would recommend:
Ninja edit>
|
moby/moby#21808 is hitting this issue again. #96 (comment) introduced runc/libcontainer/rootfs_linux.go Line 56 in 55aabc1
But I'm not sure there is any path that sets
|
setupDev was introduced in opencontainers#96, but broken since opencontainers#536 because spec 0.3.0 introduced default devices. Fix opencontainers#80 again Fix moby/moby#21808
setupDev was introduced in opencontainers#96, but broken since opencontainers#536 because spec 0.3.0 introduced default devices. Fix opencontainers#80 again Fix moby/moby#21808 Signed-off-by: Akihiro Suda <[email protected]>
setupDev was introduced in opencontainers#96, but broken since opencontainers#536 because spec 0.3.0 introduced default devices. Fix opencontainers#80 again Fix moby/moby#21808 Signed-off-by: Akihiro Suda <[email protected]>
setupDev was introduced in opencontainers#96, but broken since opencontainers#536 because spec 0.3.0 introduced default devices. Fix opencontainers#80 again Fix moby/moby#21808 Signed-off-by: Akihiro Suda <[email protected]>
setupDev was introduced in opencontainers#96, but broken since opencontainers#536 because spec 0.3.0 introduced default devices. Fix opencontainers#80 again Fix moby/moby#21808 Signed-off-by: Akihiro Suda <[email protected]>
setupDev was introduced in opencontainers#96, but broken since opencontainers#536 because spec 0.3.0 introduced default devices. Fix opencontainers#80 again Fix moby/moby#21808 Signed-off-by: Akihiro Suda <[email protected]>
setupDev was introduced in opencontainers#96, but broken since opencontainers#536 because spec 0.3.0 introduced default devices. Fix opencontainers#80 again Fix moby/moby#21808 Signed-off-by: Akihiro Suda <[email protected]> Signed-off-by: Alexander Morozov <[email protected]>
setupDev was introduced in opencontainers#96, but broken since opencontainers#536 because spec 0.3.0 introduced default devices. Fix opencontainers#80 again Fix moby/moby#21808 Signed-off-by: Akihiro Suda <[email protected]> Signed-off-by: Alexander Morozov <[email protected]>
specs: fix the description for the [ug]idMappings
When a container is launched with a bind mount between /dev (on the host) and /dev (in the container), all subsequent attempts to open /dev/ptmx fail.
setupPtmx()
inlibcontainer/rootfs_linux.go
will unconditionally remove/dev/ptmx
and then symlink it to/dev/pts/ptmx
, which is a character file that is untouchable by unprivileged users. This prevents unprivileged programs which rely ongetpt
from running on the host (such as X terminals, screen, and tmux).I discovered this via docker, but it happens in any libcontainer app if /dev/ is shared with the container before
setupPtmx
. Is there a reason for libcontainer to touch /dev (at all) if it's mounted directly from the host? I have tested this on Fedora 22 and 21, SELinux is set to permissive, as well as Arch Linux without SELinux.I can reproduce this consistently.
uname -a
:Linux wtemple.localdomain 4.0.6-300.fc22.x86_64 #1 SMP Tue Jun 23 13:58:53 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
config.json
:The text was updated successfully, but these errors were encountered: