summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-06-11NEWSSimon McVittie1-1/+5
2014-06-11dbus-launch: kill bus if we can't attach to a session when requestedРоман Донченко1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74698 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-06-10reset versionSimon McVittie2-1/+6
2014-06-05Prepare embargoed security releasedbus-1.8.4Simon McVittie2-3/+11
2014-06-05CVE-2014-3477: deliver activation errors correctly, fixing Denial of ServiceAlban Crequy3-11/+24
How it should work: When a D-Bus message activates a service, LSMs (SELinux or AppArmor) check whether the message can be delivered after the service has been activated. The service is considered activated when its well-known name is requested with org.freedesktop.DBus.RequestName. When the message delivery is denied, the service stays activated but should not receive the activating message (the message which triggered the activation). dbus-daemon is supposed to drop the activating message and reply to the sender with a D-Bus error message. However, it does not work as expected: 1. The error message is delivered to the service instead of being delivered to the sender. As an example, the error message could be something like: An SELinux policy prevents this sender from sending this message to this recipient, [...] member="MaliciousMethod" If the sender and the service are malicious confederates and agree on a protocol to insert information in the member name, the sender can leak information to the service, even though the LSM attempted to block the communication between the sender and the service. 2. The error message is delivered as a reply to the RequestName call from service. It means the activated service will believe it cannot request the name and might exit. The sender could activate the service frequently and systemd will give up activating it. Thus the denial of service. The following changes fix the bug: - bus_activation_send_pending_auto_activation_messages() only returns an error in case of OOM. The prototype is changed to return TRUE, or FALSE on OOM (and its only caller sets the OOM error). - When a client is not allowed to talk to the service, a D-Bus error message is pre-allocated to be delivered to the client as part of the transaction. The error is not propagated to the caller so RequestName will not fail (except on OOM). [fixed a misleading comment -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=78979 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Colin Walters <walters@verbum.org>
2014-04-30development versionSimon McVittie2-1/+4
2014-04-301.8.2dbus-1.8.2Simon McVittie2-3/+8
2014-04-30Handle 0x0d0a EOLs in spawn_dbus_daemon()Руслан Ижбулатов2-0/+4
On W32 dbus daemon will print output in text mode, with 0x0d0a EOLs instead of just 0x0a. Be able to handle that. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75863 Reviewed-by: Simon McVittie
2014-04-30NEWSSimon McVittie1-0/+3
2014-04-30Avoid killing all available processes if an X error arrives early onРоман Донченко1-1/+7
The timeline of events in dbus-launch's main process goes something like this: * do initial X calls [1] * do some other stuff * fork (child process starts doing some other stuff) * return "intermediate parent" pid from fork() * obtain bus daemon pid from bus_pid_to_launcher_pipe [2] * do things that might include X11 calls or killing the dbus-daemon Meanwhile, the "babysitter" child goes like this: * return 0 from fork() [3] * obtain bus daemon pid from parent process via bus_pid_to_babysitter_pipe [4] * do things that might include X11 calls or killing the bus daemon Before [1] or [3], the right thing to do about an X error is to just exit. The current implementation called kill(-1) first, which is undesirable: it kills unrelated processes. With this change, we just exit. After [2] or [4], the right thing to do is to kill the dbus-daemon, and that's what the existing code did. Between [1] and [2], or between [3] and [4], there is no correct thing that we can do immediately: we would have to wait for the end of the "critical section", *then* kill the dbus-daemon. This has not yet been implemented, so this patch relies for its correctness on the fact that there are no libX11 calls between those points, so we cannot receive an X error between them. dbus-launch deserves more comments, or a reimplementation that is easier to understand, but this change is certainly better than nothing. [Commit message added, summarizing reviewers' comments -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74698 Reviewed-by: Simon McVittie Reviewed-by: Thiago Macieira
2014-04-28NEWS for 1.8Simon McVittie1-0/+6
2014-04-28Add "Documentation=man:dbus-daemon(1)" line to systemd serviceCameron Norman1-0/+1
Enhances usability under systemd by making the documentation available with systemctl status or systemctl help. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77447 Reviewed-by: Simon McVittie
2014-04-28Try to read /etc/machine-id before inventing a new /var/lib/dbus/machine-idSimon McVittie1-2/+21
It's least confusing if the two files have the same contents. systemd already knows how to pick up our /var/lib/dbus/machine-id if it exists and /etc/machine-id doesn't, but the converse is not currently true. We should make it true, so that it doesn't matter what order systemd-machine-id-setup and "dbus-uuidgen --ensure" were invoked in. In Debian, systemd currently Recommends dbus, so "dbus-uuidgen --ensure" will *usually* - but not always! - run first, and the two files will match. However, if you install systemd without dbus, and then install dbus later, there will be a mismatch. With this change, it doesn't matter which one is installed first: whichever one happens to come first, it will generate the machine ID, and then the other one will copy it. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77941 Reviewed-by: Lennart Poettering
2014-04-28_dbus_write_uuid_file: factor out function to write a known UUIDSimon McVittie2-7/+18
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77941 Reviewed-by: Lennart Poettering
2014-03-13Update email-address for David Zeuthen.David Zeuthen1-2/+1
I no longer have the email address davidz@redhat.com so update it to my current address. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75288
2014-03-06Update .gitignore filesLukasz Skalski2-0/+7
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75833 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-03-03NEWS for dbus-1.8Simon McVittie1-1/+10
2014-01-27Fix of 'dbus-daemon can only handle 64 simultaneous connections on Windows'.Cristian Onet3-0/+9
[Slightly modified by -rh] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71297 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-21Give cmake users some hints/requirements when cross compiling for Windows on ↵Ralf Habacker2-0/+31
Linux. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-201.8.1Simon McVittie2-1/+6
2014-01-20D-Bus 1.8.0dbus-1.8.0Simon McVittie2-7/+37
2014-01-20Revert "start spec 0.24"Simon McVittie1-10/+2
It hasn't otherwise changed since 1.7.10. This reverts commit fb16f80d457a66610f615b44158330bf7ba68697.
2014-01-17Let cmake 'make check' run test applications as test group.Ralf Habacker1-11/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename bus-test-launch-helper to test-bus-launch_helper to match common test ↵Ralf Habacker4-8/+8
application naming scheme. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename bus-test-system to test-bus-system to match common test application ↵Ralf Habacker3-5/+5
naming scheme. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename bus-test to test-bus to match common test application naming scheme.Ralf Habacker6-12/+12
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename spawn-test to test-spawn to match common test application naming scheme.Ralf Habacker3-6/+7
[Same change as for shell-test in the previous commit. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename shell-test to test-shell to match common test application naming scheme.Ralf Habacker3-7/+8
[Add its source file to SOURCES: this test was previously relying on the Automake feature that the default value of foo_bar_SOURCES is foo-bar.c. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename dbus-test to test-dbus to match common test application naming scheme.Ralf Habacker8-17/+17
[reverted the dbus-specification part -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Correct test for LIBTOOLIZE by quoting itSimon McVittie1-1/+1
Based on a patch from Roland <blueburn85 gmail com>. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73278
2014-01-17CMake warning--.Ralf Habacker1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-14NEWSSimon McVittie1-0/+30
2014-01-14Don't forget allow_anonymous when merging configsMatt Hoosier1-0/+3
The algorithm to collapse a subsidiary config file's data into the master data structure forgot to examine this flag. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73475 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10Fix compile error on opensuse 12.2 with systemd 44 and glibc-2.15.Ralf Habacker1-0/+3
The specific systemd/glibc version do not include syslog.h by default. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73455 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10tests: don't block and wait for a debugger on abortSimon McVittie2-2/+0
In general, I think developers running the tests would expect them to terminate rather than hanging. Developers who want to debug such an abort by attaching a debugger to a live process can still set DBUS_BLOCK_ON_ABORT in the environment. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2014-01-10Use macros for test and helper executable targets on cmake build system.Ralf Habacker5-101/+61
The new macros add_test_executables and add helper_executables provides a platform independent way for specifing dbus test and service applications. On native Windows and Linux/UNIX systems the test applications are directly runable. When cross compiling for Windows on Linux test applications could be executed on the Linux host system with the help of wine and activated binfmt_misc support for wine. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10Add 'check' cmake target to keep in sync with autotools.Ralf Habacker1-0/+14
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10Fix mentioned files in Building section.Ralf Habacker1-3/+1
2014-01-10Create session.conf and system.conf for test/data/valid-config-files from ↵Ralf Habacker1-2/+5
*.in files on cmake. We need to patch the listen address. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10Define TEST_BUS_LAUNCH_BINARY for cmake to keep in sync with autotools.Ralf Habacker3-4/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10Use cmake build in executable suffix.Ralf Habacker1-3/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-08Remove obsolete cmake project tags in sub directories; we only have one project.Ralf Habacker4-7/+0
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68506 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-07test/dbus-daemon, test/dbus-daemon-eavesdrop: allow external dbus-daemonSimon McVittie2-2/+24
It's easier to automate these tests if they launch their own dbus-daemon, but easier to debug them if they don't: you can launch a dbus-daemon separately, under gdb. However, tests that need a specially-configured dbus-daemon will have to be skipped. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2014-01-07Add glib support to cmake buildsystem.Ralf Habacker6-42/+186
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68506 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-07MSVC compile fix.Ralf Habacker1-0/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73345 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-07Use dbus provided version of va_copy().Ralf Habacker1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72840 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06Skip unix only syslog test.Ralf Habacker1-1/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06start spec 0.24Simon McVittie1-2/+10
2014-01-06start 1.7.11Simon McVittie2-1/+4
2014-01-061.7.10Simon McVittie3-8/+49