From: Stéphane Graber Date: Wed, 19 Feb 2014 04:56:31 +0000 (-0500) Subject: rundir: Fix the uid == 0 case X-Git-Tag: lxc-1.0.0.rc4~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6470e7163dd55d4a1953fda3ebb8eea4f97c65d;p=thirdparty%2Flxc.git rundir: Fix the uid == 0 case 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 --- diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 1f868a4ce..db5cc195e 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -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) {