[systemd-commits] src/core

Kay Sievers kay at kemper.freedesktop.org
Thu Jan 2 18:00:35 PST 2014


 src/core/manager.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 88c59cb3c12b33449e0b8a57a79dd1d418334061
Author: Kay Sievers <kay at vrfy.org>
Date:   Fri Jan 3 02:57:45 2014 +0100

    bus: always create --user bus when kdbus is active
    
    We set the variable in the unit file for --user, so this check is
    always true.

diff --git a/src/core/manager.c b/src/core/manager.c
index 22a3e3e..bbe5efa 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -538,10 +538,6 @@ static int manager_setup_kdbus(Manager *m) {
         if (m->kdbus_fd >= 0)
                 return 0;
 
-        /* If there's already a bus address set, don't set up kdbus */
-        if (m->running_as == SYSTEMD_USER && getenv("DBUS_SESSION_BUS_ADDRESS"))
-                return 0;
-
         m->kdbus_fd = bus_kernel_create_bus(m->running_as == SYSTEMD_SYSTEM ? "system" : "user", m->running_as == SYSTEMD_SYSTEM, &p);
         if (m->kdbus_fd < 0) {
                 log_debug("Failed to set up kdbus: %s", strerror(-m->kdbus_fd));
@@ -554,7 +550,8 @@ static int manager_setup_kdbus(Manager *m) {
          * of that directory is not visible to non-root users. This is
          * necessary to ensure that users cannot get access to busses
          * of virtualized users when no UID namespacing is used. */
-        mkdir_p_label("/dev/kdbus/ns", 0700);
+        if (m->running_as == SYSTEMD_SYSTEM)
+                mkdir_p_label("/dev/kdbus/ns", 0700);
 #endif
 
         return 0;



More information about the systemd-commits mailing list