]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
rundir: Fix the uid == 0 case
authorStéphane Graber <stgraber@ubuntu.com>
Wed, 19 Feb 2014 04:56:31 +0000 (23:56 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 19 Feb 2014 04:56:31 +0000 (23:56 -0500)
This makes get_rundir actually do what I meant it to do... for some
reason I missed that one in testing...

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/utils.c

index 1f868a4ce1460f056f69d19367182f7df64266e4..db5cc195ee5ae6e1e5fea042c11396c9f73bcdf5 100644 (file)
@@ -381,8 +381,10 @@ const char *get_rundir()
        char *rundir;
        const char *homedir;
 
-       if (geteuid() == 0)
+       if (geteuid() == 0) {
                rundir = RUNTIME_PATH;
+               return rundir;
+       }
 
        rundir = getenv("XDG_RUNTIME_DIR");
        if (!rundir) {