]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: check if kernel supports userns as early as possible 231/head
authorDjalal Harouni <djalal@endocode.com>
Tue, 16 Jun 2015 16:30:45 +0000 (17:30 +0100)
committerDjalal Harouni <djalal@endocode.com>
Tue, 16 Jun 2015 16:30:45 +0000 (17:30 +0100)
commitb774fb7f002c9877391e8d4fe8e6b6d0ea8647da
tree96b273cb32a60b9028144928a0b6ecfe0e9be92a
parent265d3f718bf50152d83e9f0d7cab3aa39c0ecae2
nspawn: check if kernel supports userns as early as possible

If the kernel do not support user namespace then one of the children
created by nspawn parent will fail at clone(CLONE_NEWUSER) with the
generic error EINVAL and without logging the error. At the same time
the parent may also try to setup the user namespace and will fail with
another error.

To improve this, check if the kernel supports user namespace as early
as possible.
src/nspawn/nspawn.c