From: Michal Grzedzicki Date: Tue, 21 Jul 2015 08:29:00 +0000 (+0200) Subject: Only use LOGPATH if lxcpath is unset or default X-Git-Tag: lxc-1.0.8~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b123355b27bbf3124587feeb1697a977db1f375;p=thirdparty%2Flxc.git Only use LOGPATH if lxcpath is unset or default Signed-off-by: Michał Grzędzicki --- diff --git a/src/lxc/log.c b/src/lxc/log.c index c2dba7b95..4796fe91e 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -350,8 +350,8 @@ extern int lxc_log_init(const char *name, const char *file, if (!lxcpath) lxcpath = LOGPATH; - /* try LOGPATH if lxcpath is the default */ - if (strcmp(lxcpath, lxc_global_config_value("lxc.lxcpath")) == 0) + /* try LOGPATH if lxcpath is the default for the privileged containers */ + if (!geteuid() && strcmp(LXCPATH, lxcpath) == 0) ret = _lxc_log_set_file(name, NULL, 0); /* try in lxcpath */