mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-25 15:10:16 +01:00
In Debian bug <https://bugs.debian.org/829348>, lightdm appears to
have been starting dbus-launch with at least one of the three
standard fds 0, 1, 2 (stdin, stdout, stderr) closed. This resulted
in the dbus-daemon's epoll_create1() returning a fd less than 3.
Later, _dbus_become_daemon() replaces fds 0-2 with /dev/null. As a
result, a subsequent call to _dbus_loop_add_watch() for the reload
pipe resulted in calling epoll_ctl on the non-epoll fd pointing to
/dev/null, which fails with EINVAL, resulting in the dbus-daemon
exiting unsuccessfully.
Unix programs are not normally expected to behave correctly when
launched with the standard fds not already open; but at the same time,
X11 autolaunching means that dbus-launch (and hence the dbus-daemon)
can get started from an arbitrarily precarious situation.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97008
Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Thiago Macieira <thiago@kde.org>
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| ci-build.sh | ||
| dbus-cleanup-sockets.c | ||
| dbus-echo.c | ||
| dbus-launch-win.c | ||
| dbus-launch-x11.c | ||
| dbus-launch.c | ||
| dbus-launch.h | ||
| dbus-monitor.c | ||
| dbus-print-message.c | ||
| dbus-print-message.h | ||
| dbus-run-session.c | ||
| dbus-send.c | ||
| dbus-spam.c | ||
| dbus-update-activation-environment.c | ||
| dbus-uuidgen.c | ||
| GetAllMatchRules.py | ||
| lcov.am | ||
| Makefile.am | ||
| run-with-tmp-session-bus.sh | ||
| strtoll.c | ||
| strtoull.c | ||
| test-tool.c | ||
| test-tool.h | ||
| tool-common.c | ||
| tool-common.h | ||