bus-util: Special case when DBUS_SESSION_BUS_ADDRESS is set and XDG_RUNTIME_DIR isn't
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 22 Oct 2024 09:12:17 +0000 (11:12 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 22 Oct 2024 09:17:40 +0000 (11:17 +0200)
commitd0316b7a0d356ba12325ce5a00b0cbe0bc359461
tree3db4926cb62310d632b3a401497c8dc72187b96c
parentc5698fe9076a8dc3472140c7d67f4524430f80a0
bus-util: Special case when DBUS_SESSION_BUS_ADDRESS is set and XDG_RUNTIME_DIR isn't

We noticed some failures because we have code that connects to user
managers by setting DBUS_SESSION_BUS_ADDRESS without setting XDG_RUNTIME_DIR.
If that's the case, connect to the user session bus instead of the
private manager bus as we can't connect to the latter if XDG_RUNTIME_DIR
is not set.
src/shared/bus-util.c