chiark / gitweb /
nspawn: don't try mknod() of /dev/console with the correct major/minor
authorLennart Poettering <lennart@poettering.net>
Mon, 10 Mar 2014 20:36:01 +0000 (21:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 10 Mar 2014 20:36:01 +0000 (21:36 +0100)
commiteb0f0863f5af48865fb4569e2076d5f9e2313995
tree4047c89fae039078eecb7ad3881dae8ce9d15c9b
parent1b9e5b126359a2a2ec37de1f94f046093abc74b8
nspawn: don't try mknod() of /dev/console with the correct major/minor

We overmount /dev/console with an external pty anyway, hence there's no
point in using the real major/minor when we create the node to
overmount. Instead, use the one of /dev/null now.

This fixes a race against the cgroup device controller setup we are
using. In case /dev/console was create before the cgroup policy was
applied all was good, but if created in the opposite order the mknod()
would fail, since creating /dev/console is not allowed by it. Creating
/dev/null instances is however permitted, and hence use it.
src/nspawn/nspawn.c