nspawn: move network namespace creation to a separate step (#8430)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Mar 2018 17:07:17 +0000 (18:07 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Mar 2018 17:07:17 +0000 (18:07 +0100)
commit0441378080489e4ab6704cd0a2d78cb1ceaca899
tree66032a6e69612cfd84dd88400cfbea1bcc901905
parent5c24d6367597ac99327676c3c8df69bdf67952a3
nspawn: move network namespace creation to a separate step (#8430)

Fixes #8427.

Unsharing the namespace in a separate step changes the ownership of
/proc/net/ip_tables_names (and related files) from nobody:nobody to
root:root. See [1] and [2] for all the details.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f13f2aeed154da8e48f90b85e720f8ba39b1e881
[2] https://bugzilla.netfilter.org/show_bug.cgi?id=1064#c9
src/nspawn/nspawn.c