dbus/bus
Simon McVittie 8d8b5eb8a4 config-loader-expat: Tell Expat not to defend against hash collisions
By default, Expat uses cryptographic-quality random numbers as a salt for
its hash algorithm, and since 2.2.1 it gets them from the getrandom
syscall on Linux. That syscall refuses to return any entropy until the
kernel's CSPRNG (random pool) has been initialized. Unfortunately, this
can take as long as 40 seconds on embedded devices with few entropy
sources, which is too long: if the system dbus-daemon blocks for that
length of time, important D-Bus clients like systemd and systemd-logind
time out and fail to connect to it.

We're parsing small configuration files here, and we trust them
completely, so we don't need to defend against hash collisions: nobody
is going to be crafting them to cause pathological performance.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101858
Tested-by: Christopher Hewitt <hewitt@ieee.org>
[smcv: Adjust build-system changes for 1.11.x]
Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2017-07-28 11:17:04 +01:00
..
legacy-config On Windows, load local configuration relative to bus setup 2015-10-02 11:24:05 +01:00
systemd-user dbus-daemon: add --syslog, --nosyslog, --syslog-only 2016-09-30 19:36:50 +01:00
sysusers.d systemd: add sysusers.d snippet for booting up with unpopulated /etc 2017-02-13 14:49:52 +00:00
tmpfiles.d Install a systemd tmpfiles.d snippet to create /var/lib/dbus/machine-id 2017-06-28 19:09:53 +01:00
.gitignore Update .gitignore files 2015-02-03 15:40:01 +00:00
activation-exit-codes.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
activation-helper-bin.c launch-helper: fix error code parsing 2013-10-09 10:51:39 +01:00
activation-helper.c activation-helper: Rename bus_config_parser_get_service_dirs 2017-02-21 13:23:37 +00:00
activation-helper.h Add missing include 2016-02-11 20:31:31 +00:00
activation.c activation: Add support for enforcing strict naming on .service files 2017-02-21 13:23:37 +00:00
activation.h Mediate auto-activation attempts through AppArmor 2016-11-28 12:11:45 +00:00
apparmor.c Mediate auto-activation attempts through AppArmor 2016-11-28 12:11:45 +00:00
apparmor.h Do not auto-activate services if we could not send a message 2016-11-28 12:11:41 +00:00
audit.c _dbus_change_to_daemon_user (audit code path): set DBusError correctly 2016-08-12 17:34:29 +01:00
audit.h audit: use DBUS_SYSTEM_LOG_WARNING if we cannot open the audit fd 2015-08-06 17:12:37 +01:00
bus.c internals: Decouple logging an error from exiting unsuccessfully 2017-07-05 13:12:37 +01:00
bus.h Do not auto-activate services if we could not send a message 2016-11-28 12:11:41 +00:00
config-loader-expat.c config-loader-expat: Tell Expat not to defend against hash collisions 2017-07-28 11:17:04 +01:00
config-parser-common.c Move defaults for some switches into a default case 2017-01-17 17:20:53 +00:00
config-parser-common.h Add apparmor element support to bus config parsing 2015-02-18 17:04:00 +00:00
config-parser-trivial.c activation-helper: Rename bus_config_parser_get_service_dirs 2017-02-21 13:23:37 +00:00
config-parser-trivial.h activation-helper: Rename bus_config_parser_get_service_dirs 2017-02-21 13:23:37 +00:00
config-parser.c config-parser tests: explicitly skip non-comparable elements 2017-04-07 12:08:37 +01:00
config-parser.h activation: Add support for enforcing strict naming on .service files 2017-02-21 13:23:37 +00:00
connection.c Remove calls to sidget/sidput 2017-05-31 13:39:29 +01:00
connection.h Log to syslog if max_completed_connections or max_connections_per_user are exceeded 2016-08-16 16:16:32 +01:00
dbus.service.in dbus-daemon: add --syslog, --nosyslog, --syslog-only 2016-09-30 19:36:50 +01:00
dbus.socket.in systemd: enable the dbus service unconditionally 2010-09-06 03:21:17 +02:00
desktop-file.c Be more const-correct 2016-10-13 17:20:28 +01:00
desktop-file.h Mediate auto-activation attempts through AppArmor 2016-11-28 12:11:45 +00:00
dir-watch-default.c Fix warnings on Windows builds. 2010-04-14 08:26:40 +02:00
dir-watch-inotify.c Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed 2016-09-30 19:36:51 +01:00
dir-watch-kqueue.c Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed 2016-09-30 19:36:51 +01:00
dir-watch.h Clean up inotify watch handling 2010-02-01 16:22:56 -05:00
dispatch.c tests: Don't exercise GetMachineId() or autolaunch if no machine ID 2017-06-08 18:30:39 +01:00
dispatch.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
driver.c bus_driver_send_ack_reply: Make available to other modules 2017-06-29 15:43:25 +01:00
driver.h bus_driver_send_ack_reply: Make available to other modules 2017-06-29 15:43:25 +01:00
example-session-disable-stats.conf.in config: add examples to show how to enable/disable the Stats interface 2014-10-01 16:38:40 +01:00
example-system-enable-stats.conf.in config: add examples to show how to enable/disable the Stats interface 2014-10-01 16:38:40 +01:00
expirelist.c bus: Fix timeout restarts 2017-02-01 10:42:50 +00:00
expirelist.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
main.c driver: Generate child node elements in introspection 2017-06-08 16:59:48 +01:00
Makefile.am Install a systemd tmpfiles.d snippet to create /var/lib/dbus/machine-id 2017-06-28 19:09:53 +01:00
messagebus-config.in Applied patches from cygwin port. 2010-08-10 08:25:24 +02:00
messagebus.in Fix use of $servicename in status 2010-07-09 11:52:59 -04:00
org.freedesktop.dbus-session.plist.in 10.4 is old so set more sensible launchd defaults. 2010-12-09 08:20:07 +01:00
policy.c bus policy: assert that no invalid rule types are seen 2017-04-07 12:08:48 +01:00
policy.h tests to embedded tests: replaced in dbus-daemon 2013-06-28 12:13:28 +01:00
rc.messagebus.in [legacy init script] Fix the use of $servicename 2010-04-23 12:02:19 -04:00
selinux.c Return the dbus-daemon SELinux context when asking about org.freedesktop.DBus 2017-06-12 11:56:13 +01:00
selinux.h Return the dbus-daemon SELinux context when asking about org.freedesktop.DBus 2017-06-12 11:56:13 +01:00
services.c Log when we exceed max_names_per_connection (aka max_services_per_connection) 2016-08-16 17:44:30 +01:00
services.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
session.conf.in On Windows, load local configuration relative to bus setup 2015-10-02 11:24:05 +01:00
signals.c signals: Add some missing assertions to inline unit tests 2017-02-13 14:51:29 +00:00
signals.h Mediation of processes eavesdropping 2015-02-18 18:59:46 +00:00
stats.c driver: Share bus_driver_get_conn_helper with other modules 2017-06-29 15:42:20 +01:00
stats.h Implement GetAllMatchRules on the Stats interface 2014-09-25 12:59:50 +01:00
system.conf.in system.conf: Allow unprivileged users to get dbus-daemon properties 2017-07-06 18:31:51 +01:00
test-launch-helper.c Add missing function attributes suggested by clang (but not by gcc) 2016-10-13 22:44:13 +01:00
test-main.c Add missing function attributes suggested by clang (but not by gcc) 2016-10-13 22:44:13 +01:00
test-system.c Add missing function attributes suggested by clang (but not by gcc) 2016-10-13 22:44:13 +01:00
test.c Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed 2016-09-30 19:36:51 +01:00
test.h tests to embedded tests: replaced in dbus-daemon 2013-06-28 12:13:28 +01:00
utils.c Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
utils.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00