diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-03-14 03:10:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-14 03:12:25 +0100 |
commit | 91b22f21f3824c1766d34f622c5bbb70cbe881a8 (patch) | |
tree | db29bcf8e6c77ea521fa2f8185339c50c606af35 /src/dbus-common.c | |
parent | 88213476187cafc86bea2276199891873000588d (diff) |
core: move abstract namespace sockets to /dev/.run
Now that we have /dev/.run there's no need to use abstract namespace
sockets. So, let's move things to /dev/.run, to make things more easily
discoverable and improve compat with chroot() and fs namespacing.
Diffstat (limited to 'src/dbus-common.c')
-rw-r--r-- | src/dbus-common.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/dbus-common.c b/src/dbus-common.c index 25b718ec02..bb9cf2e2ab 100644 --- a/src/dbus-common.c +++ b/src/dbus-common.c @@ -104,8 +104,16 @@ int bus_connect(DBusBusType t, DBusConnection **_bus, bool *private, DBusError * /* If we are root, then let's not go via the bus */ if (geteuid() == 0 && t == DBUS_BUS_SYSTEM) { - if (!(bus = dbus_connection_open_private("unix:abstract=/org/freedesktop/systemd1/private", error))) - return -EIO; + + if (!(bus = dbus_connection_open_private("unix:path=/dev/.run/systemd/private", error))) { +#ifndef LEGACY + dbus_error_free(error); + + /* Retry with the pre v21 socket name, to ease upgrades */ + if (!(bus = dbus_connection_open_private("unix:abstract=/org/freedesktop/systemd1/private", error))) +#endif + return -EIO; + } dbus_connection_set_exit_on_disconnect(bus, FALSE); |