From: LiFeng Date: Thu, 28 Sep 2017 16:23:30 +0000 (+0800) Subject: start: don't close inherited namespace fds X-Git-Tag: lxc-2.0.9~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96d775b52f8193ce3ce829726dc162dea6b34447;p=thirdparty%2Flxc.git start: don't close inherited namespace fds Otherwise we can never share namespaces. Signed-off-by: LiFeng Acked-by: Christian Brauner --- diff --git a/src/lxc/start.c b/src/lxc/start.c index eedbae50c..73bb82a3d 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -229,6 +229,15 @@ restart: (i < len_fds && fd == fds_to_ignore[i])) continue; + if (conf) { + for (i = 0; i < LXC_NS_MAX; i++) + if (conf->inherit_ns_fd[i] == fd) + break; + + if (i < LXC_NS_MAX) + continue; + } + if (current_config && fd == current_config->logfd) continue;