Systemd/src
Alan Jenkins d3243f55ca core: remove support for API bus "started outside our own logic"
Looking at a recent Bad Day, my log contains over 100 lines of

    systemd[23895]: Failed to connect to API bus: Connection refused

It is due to "systemd --user" retrying to connect to an API bus.[*]  I
would prefer to avoid spamming the logs.  I don't think it is good for us
to retry so much like this.

systemd was mislead by something setting DBUS_SESSION_BUS_ADDRESS.  My best
guess is an unfortunate series of events caused gdm to set this.  gdm has
code to start a session dbus if there is not a bus available already (and
in this case it exports the environment variable).  I believe it does not
normally do this when running under systemd, because "systemd --user" and
hence "dbus.service" would already have been started by pam_systemd.

I see two possibilities

1. Rip out the check for DBUS_SESSION_BUS_ADDRESS entirely.
2. Only check for DBUS_SESSION_BUS_ADDRESS on startup.  Not in the
   "recheck" logic.

The justification for 2), is that the recheck is called from unit_notify(),
this is used to check whether the service just started (or stopped) was
"dbus.service".  This reason for rechecking does not apply if we think
the session bus was started outside our logic.

But I think we can justify 1).  dbus-daemon ships a statically-enabled
/usr/lib/systemd/user/dbus.service, which would conflict with an attempt to
use an external dbus.  Also "systemd --user" is started from user@.service;
if you try to start it manually so that it inherits an environment
variable, it will conflict if user@.service was started by pam_systemd
(or loginctl enable-linger).
2018-07-20 15:25:55 +02:00
..
ac-power tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
activate Drop my copyright headers 2018-06-14 13:03:20 +02:00
analyze analyze: fix width calculation in plot command 2018-07-20 12:51:31 +02:00
ask-password tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
backlight tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
basic Merge pull request #9516 from keszybz/module-load-unification 2018-07-20 13:55:56 +02:00
binfmt tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
boot Merge pull request #9398 from yuwata/lgtm-fixes 2018-06-25 13:12:44 +02:00
busctl busctl: make parameter const 2018-06-25 18:26:17 +02:00
cgls tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
cgroups-agent tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
cgtop tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
core core: remove support for API bus "started outside our own logic" 2018-07-20 15:25:55 +02:00
coredump tree-wide: drop MSG_NOSIGNAL flag from recvmsg() invocations 2018-06-20 16:12:55 +02:00
cryptsetup cryptsetup: Add dependency on loopback setup to generated units 2018-06-27 16:57:17 +02:00
debug-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
delta Drop my copyright headers 2018-06-14 13:03:20 +02:00
detect-virt tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dissect tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
environment-d-generator Drop my copyright headers 2018-06-14 13:03:20 +02:00
escape escape: add --instance option 2018-06-25 11:17:55 +02:00
firstboot tree-wide: use instead of #ifdef for HAVE_* 2018-06-29 11:40:15 +02:00
fsck tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
fstab-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
fuzz tree-wide: add multiple inclusion guard 2018-06-25 13:04:59 +09:00
getty-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
gpt-auto-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
hibernate-resume tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
hostname hostname: set sd_event_add_signal() 2018-07-20 15:00:02 +09:00
hwdb tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
import pull: initialize libgcrypt before calling any functions provided by libgcrypt 2018-07-13 19:47:49 +02:00
initctl tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journal Merge pull request #9346 from keszybz/journald-exact2 2018-07-18 21:00:43 +02:00
journal-remote Merge pull request #9422 from yuwata/conf-files 2018-06-28 10:17:54 +02:00
kernel-install tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
libsystemd sd-bus: make bus_slot_disconnect() also unref the slot object 2018-07-18 20:54:19 +02:00
libsystemd-network network/link: Fix logic error in matching devices by MAC 2018-07-07 13:48:59 +02:00
libudev tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
locale locale: set sd_event_add_signal() 2018-07-20 14:59:36 +09:00
login login: fix typo in log message 2018-07-17 03:10:32 +09:00
machine machinectl: fix verbosity of import-raw or friends 2018-07-13 19:49:19 +02:00
machine-id-setup tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
modules-load udev-builtin-kmod: use the generic module_load() function 2018-07-19 18:28:21 +02:00
mount mount: do not output (null) in option 2018-06-19 08:27:47 +02:00
network network: voidify sd_event_add_signal() and sd_event_set_watchdog() 2018-07-20 11:29:49 +09:00
notify tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nspawn summary: update nspawn description string a bit 2018-06-28 11:55:44 +09:00
nss-myhostname tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nss-mymachines tree-wide: do not assign values if not used 2018-06-19 08:44:55 +02:00
nss-resolve tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nss-systemd tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
partition Drop my copyright headers 2018-06-14 13:03:20 +02:00
path tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
portable portable: fix error handling 2018-06-25 13:56:27 +09:00
quotacheck tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
random-seed tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
rc-local-generator tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
remount-fs tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
reply-password tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
resolve resolve: voidify sd_event_add_signal() and sd_event_set_watchdog() 2018-07-20 11:29:59 +09:00
rfkill tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
run tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
shared Merge pull request #9516 from keszybz/module-load-unification 2018-07-20 13:55:56 +02:00
sleep sleep: tiny coding style updates 2018-07-17 21:41:56 +02:00
socket-proxy tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
stdio-bridge tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
sulogin-shell tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
sysctl tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
system-update-generator Correct a number of trivial typos. 2018-06-18 22:44:44 +02:00
systemctl Merge pull request #9600 from keszybz/systemctl-mask-check 2018-07-18 21:03:02 +02:00
systemd sd-bus: make BUS_DEFAULT_TIMEOUT configurable 2018-07-16 15:11:50 +02:00
sysusers Merge pull request #9274 from poettering/comment-header-cleanup 2018-06-14 11:26:50 +02:00
sysv-generator tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test parse-util: make sure "3.+1s" or "3. 1s" are not considered valid time specification 2018-07-19 22:09:54 -07:00
time-wait-sync tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
timedate timedate: set sd_event_add_signal() 2018-07-20 14:59:23 +09:00
timesync timesync: voidify sd_event_add_signal() and sd_event_set_watchdog() 2018-07-20 11:30:11 +09:00
tmpfiles tmpfiles: set only default acls to folders #9545 (#9599) 2018-07-16 16:56:01 +02:00
tty-ask-password-agent tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
udev udev-builtin-kmod: adjust logging 2018-07-19 18:28:21 +02:00
update-done tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
update-utmp tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
user-sessions tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
vconsole tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
veritysetup tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
volatile-root tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00