From: Stéphane Graber Date: Wed, 15 Jan 2014 18:32:23 +0000 (-0500) Subject: Disable logpath for unprivileged containers X-Git-Tag: lxc-1.0.0.beta2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ceceea1e967453d513484516aab4593f21cdbd89;p=thirdparty%2Flxc.git Disable logpath for unprivileged containers Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- 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)