dbus-daemon Dan

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Aug 22 04:15:24 PDT 2013


On 21/08/13 21:58, Thiago Macieira wrote:
> On quarta-feira, 21 de agosto de 2013 14:37:21, m.roth at 5-cent.us
> wrote:
>> We recently upgraded several systems from FC17 to FC19, and now,
>> in the log, we see on all of them dbus-daemon[pid]: Dan

This is stdout or stderr output from a non-systemd, activatable
service (one with a file in /usr/share/dbus-1/system-services that
does not contain the SystemdService setting). On a sysvinit system, it
would have gone to /dev/null, but on a systemd system, it gets logged.

Look for files in /usr/share/dbus-1/system-services that do not have a
SystemdService, then either turn them into systemd services (which
would let you control their logging individually), or use strings(1)
to find out which one mentions "Dan".

> Somehow services launched by the system bus fool syslog into
> thinking the message comes from the D-Bus daemon. I don't know how
> that is possible.

D-Bus-activated system services that are not started via systemd
inherit stdout and stderr from the system dbus-daemon. On a sysvinit
system, that means /dev/null, but on a systemd system, the
dbus-daemon's stdout and stderr go to the Journal, and from there to
syslog.

I'd accept patches that made dbus-daemon open a new systemd logging fd
with sd_journal_stream_fd() and pass it to the activated child process
as its stdout/stderr, when compiled with systemd support. The right
place to start looking would be near the end of
bus_activation_activate_service(), but the actual implementation would
probably have to be by adding a new parameter to
_dbus_spawn_async_with_babysitter(). I would suggest
sd_journal_stream_fd (service_name, LOG_WARNING, FALSE) for stderr and
sd_journal_stream_fd (service_name, LOG_INFO, FALSE) for stdout.

Please don't add any extra systemd support code in
dbus-daemon-launch-helper, which is particularly security-sensitive
(setuid root).

    S



More information about the dbus mailing list