The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/2570
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Passing /proc/1/fd/<nr> presupposes that CLONE_NEWPID was specified. This isn't the case when users use lxc.namespace.keep = pid to inherit pid namespaces. Pass /proc/self/fd/<nr> instead. Signed-off-by: Christian Brauner <[email protected]>
From e8f0f7739d5756914b17a391a3c91f62a4054912 Mon Sep 17 00:00:00 2001 From: Christian Brauner <[email protected]> Date: Thu, 23 Aug 2018 17:35:40 +0200 Subject: [PATCH] execute: pass /proc/self/fd/<nr> Passing /proc/1/fd/<nr> presupposes that CLONE_NEWPID was specified. This isn't the case when users use lxc.namespace.keep = pid to inherit pid namespaces. Pass /proc/self/fd/<nr> instead. Signed-off-by: Christian Brauner <[email protected]> --- src/lxc/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/execute.c b/src/lxc/execute.c index 26b8fa864..dc23bb3ea 100644 --- a/src/lxc/execute.c +++ b/src/lxc/execute.c @@ -95,7 +95,7 @@ static int execute_start(struct lxc_handler *handler, void* data) goto out2; } - ret = snprintf(logfile, sizeof(logfile), "/proc/1/fd/%d", logfd); + ret = snprintf(logfile, sizeof(logfile), "/proc/self/fd/%d", logfd); if (ret < 0 || (size_t)ret >= sizeof(logfile)) goto out3;
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
