]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Only use LOGPATH if lxcpath is unset or default
authorMichal Grzedzicki <lazy404@gmail.com>
Tue, 21 Jul 2015 08:29:00 +0000 (10:29 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 13 Aug 2015 21:00:56 +0000 (17:00 -0400)
Signed-off-by: Michał Grzędzicki <lazy404@gmail.com>
src/lxc/log.c

index a257f6718994939836123af56cdc678b2a5c97b3..6726cf0374a3f9964c36b7429cd75164c94dfd6c 100644 (file)
@@ -350,7 +350,7 @@ extern int lxc_log_init(const char *name, const char *file,
                        lxcpath = LOGPATH;
 
                /* try LOGPATH if lxcpath is the default for the privileged containers */
-               if (!geteuid() && strcmp(lxcpath, lxc_global_config_value("lxc.lxcpath")) == 0)
+               if (!geteuid() && strcmp(LXCPATH, lxcpath) == 0)
                        ret = _lxc_log_set_file(name, NULL, 0);
 
                /* try in lxcpath */