]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Disable logpath for unprivileged containers
authorStéphane Graber <stgraber@ubuntu.com>
Wed, 15 Jan 2014 18:32:23 +0000 (13:32 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 15 Jan 2014 19:35:29 +0000 (14:35 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/log.c

index b09885c1b865a561f985854e05cbd14f3c7ac786..4a2b7eb325ba8dd6cf43c50f24c478a56b6d1712 100644 (file)
@@ -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)