From ceceea1e967453d513484516aab4593f21cdbd89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= Date: Wed, 15 Jan 2014 13:32:23 -0500 Subject: [PATCH] Disable logpath for unprivileged containers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- src/lxc/log.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lxc/log.c b/src/lxc/log.c index b09885c1b..4a2b7eb32 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -318,6 +318,11 @@ extern int lxc_log_init(const char *name, const char *file, lxc_logfile_specified = 1; ret = __lxc_log_set_file(file, 1); } else { + + /* For now, unprivileged containers have to set -l to get logging */ + if (geteuid()) + return 0; + ret = -1; if (!lxcpath) -- 2.47.3