From: Christian Brauner Date: Thu, 18 Mar 2021 09:40:13 +0000 (+0100) Subject: attach: visually separate pids from fds during initalization X-Git-Tag: lxc-5.0.0~197^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f620ed4433db0f57b60267ed4bebbb12ab8e87d6;p=thirdparty%2Flxc.git attach: visually separate pids from fds during initalization Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 04c8efc60..f2f68f5c3 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -181,10 +181,12 @@ static struct attach_context *alloc_attach_context(void) if (!ctx) return ret_set_errno(NULL, ENOMEM); + ctx->init_pid = -ESRCH; + ctx->dfd_self_pid = -EBADF; ctx->dfd_init_pid = -EBADF; ctx->init_pidfd = -EBADF; - ctx->init_pid = -ESRCH; + ctx->setup_ns_uid = LXC_INVALID_UID; ctx->setup_ns_gid = LXC_INVALID_GID; ctx->target_ns_uid = LXC_INVALID_UID;