[systemd-commits] src/core

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Thu Nov 7 07:28:21 CET 2013


 src/core/main.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 3f6da75bcef8293382ce2674322f6c50428eb39f
Author: Mantas MikulÄ—nas <grawity at gmail.com>
Date:   Wed Oct 9 14:57:13 2013 +0300

    core: require $XDG_RUNTIME_DIR to be set for user instances
    
    It seems that some places use /run otherwise, which isn't going to work.

diff --git a/src/core/main.c b/src/core/main.c
index b62234e..d161968 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1383,6 +1383,12 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
+        if (arg_running_as == SYSTEMD_USER &&
+            !getenv("XDG_RUNTIME_DIR")) {
+                log_error("Trying to run as user instance, but \$XDG_RUNTIME_DIR is not set.");
+                goto finish;
+        }
+
         if (arg_running_as == SYSTEMD_SYSTEM &&
             arg_action == ACTION_RUN &&
             running_in_chroot() > 0) {



More information about the systemd-commits mailing list