]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: don't overwrite file descriptors during namespace preservation
authorChristian Brauner <brauner@kernel.org>
Wed, 29 Jun 2022 16:31:01 +0000 (18:31 +0200)
committerChristian Brauner (Microsoft) <christian.brauner@ubuntu.com>
Wed, 29 Jun 2022 16:31:01 +0000 (18:31 +0200)
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
src/lxc/start.c

index d0a860361a1d8a1cee0541070177b859d2702031..bf1a589ba4bbed03d52c715fd9510f6559426b41 100644 (file)
@@ -150,9 +150,6 @@ static int lxc_try_preserve_namespace(struct lxc_handler *handler,
 static bool lxc_try_preserve_namespaces(struct lxc_handler *handler,
                                        int ns_clone_flags)
 {
-       for (lxc_namespace_t ns_idx = 0; ns_idx < LXC_NS_MAX; ns_idx++)
-               handler->nsfd[ns_idx] = -EBADF;
-
        for (lxc_namespace_t ns_idx = 0; ns_idx < LXC_NS_MAX; ns_idx++) {
                int ret;
                const char *ns = ns_info[ns_idx].proc_name;