]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/namespace.c
namespace: only make the symlink /dev/ptmx if it was already a symlink 7886/head
authorДамјан Георгиевски <gdamjan@gmail.com>
Tue, 16 Jan 2018 20:50:36 +0000 (21:50 +0100)
committerДамјан Георгиевски <gdamjan@gmail.com>
Wed, 17 Jan 2018 00:19:46 +0000 (01:19 +0100)
commit414b304ba2ffabf85057b133e7aa0573f0cbd029
treece343c8f857c5be156d3b85eca4cbbdff9863ba4
parentb5e99f23ed6054b3c62b9ff304d5843100dbf7e7
namespace: only make the symlink /dev/ptmx if it was already a symlink

…otherwise try to clone it as a device node

On most contemporary distros /dev/ptmx is a device node, and
/dev/pts/ptmx has 000 inaccessible permissions. In those cases
the symlink /dev/ptmx -> /dev/pts/ptmx breaks the pseudo tty support.

In that case we better clone the device node.

OTOH, in nspawn containers (and possibly others), /dev/pts/ptmx has
normal permissions, and /dev/ptmx is a symlink. In that case make the
same symlink.

fixes #7878
src/core/namespace.c