summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 1.11.14dbus-1.11.14Simon McVittie2017-06-293-8/+40
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* NEWS for spec changes from #101567Simon McVittie2017-06-291-0/+3
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* spec: Document versioning of eavesdrop='true'Simon McVittie2017-06-291-0/+7
| | | | | | | | | The wording and formatting used here is consistent with other semi-recently-added match keys. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* spec: Formally deprecate eavesdroppingSimon McVittie2017-06-291-22/+42
| | | | | | | Reviewed-by: Philip Withnall <withnall@endlessm.com> [smcv: Wrap BecomeMonitor in <literal> as per Philip's review] Signed-off-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* spec: Do not promise match rules with eavesdrop='true' can be addedSimon McVittie2017-06-291-6/+1
| | | | | | | | | | This is no longer true, and it seems less misleading to raise an error than to obey the letter of the spec by quietly ignoring calls from an inappropriate caller. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* NEWS: Mention the user-visible part of #101567Simon McVittie2017-06-291-0/+7
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* bus_driver_send_ack_reply: Make available to other modulesSimon McVittie2017-06-292-13/+14
| | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* driver: Use a data-driven approach to marking methods as privilegedSimon McVittie2017-06-291-18/+15
| | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* driver: Share bus_driver_get_conn_helper with other modulesSimon McVittie2017-06-293-27/+36
| | | | | | | | | Now that we're starting to implement methods in more places, it makes sense to share this code. The Stats interface can already benefit. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* driver: Make eavesdropping a privileged actionSimon McVittie2017-06-291-3/+10
| | | | | | | | | | | | Eavesdropping on unicast messages to other processes is not something that should be done by processes in containers, or on the system bus by users other than root or the bus owner. bus/system.conf.in does not enable eavesdropping, but adding inadvisable configuration could. This brings it into line with Monitoring. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* NEWS: Document #101567Simon McVittie2017-06-291-1/+7
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* test/loopback: Exercise unix:dir addressesSimon McVittie2017-06-291-2/+15
| | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* test/loopback: Assert that the connectable address makes senseSimon McVittie2017-06-291-1/+74
| | | | | | | | | When we listen on a tcp: address we should get a connectable tcp: address, and so on. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* test/loopback: Don't leak address stringsSimon McVittie2017-06-291-4/+8
| | | | | | | | dbus_server_get_address() returns a copy. It isn't clear why. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* Add unix:dir=/something addressesSimon McVittie2017-06-292-18/+52
| | | | | | | | | | | | | | | | | | | | | | These are like unix:tmpdir=/something, except that the resulting socket is always path-based, never abstract. This is desirable for two reasons: * If a Linux container manager wants to expose a path-based socket into the container, it can do so by bind-mounting it in the container's filesystem namespace. That cannot work for abstract sockets because they are not files. * Conversely, if a Linux container manager does not want to expose a path-based socket in the container, it can avoid bind-mounting it, or bind-mount some harmless object like /dev/null over it. That cannot work for abstract sockets because access to abstract sockets is part of the network namespace, which is all-or-nothing. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
* Update NEWS for fd.o #101570Simon McVittie2017-06-281-0/+7
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Install a systemd tmpfiles.d snippet to create /var/lib/dbus/machine-idSimon McVittie2017-06-284-1/+14
| | | | | | | | | | | | | On systemd systems, /etc/machine-id is guaranteed to exist and has the same format as the D-Bus machine ID. The major D-Bus implementations read /etc/machine-id if it exists, but some less up-to-date implementations still only read /var/lib/dbus/machine-id. We can be nice to those implementations by ensuring /var/lib/dbus/machine-id is a symlink; this way, the two files can never get out of sync. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101570
* NEWS: Re-wordSimon McVittie2017-06-281-6/+9
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Merge branch 'dbus-1.10'Simon McVittie2017-06-271-0/+8
|\
| * Update NEWS for 1.10.x branchSimon McVittie2017-06-271-1/+15
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * transport: Don't pile up errors for semicolon-separated componentsSimon McVittie2017-06-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | If we somehow get an autolaunch address with multiple semicolon-separated components, and one of them fails, then we will hit an assertion failure when we try the next one. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257 (cherry picked from commit ecdcb86bff42d2bb9cac617bf79f0aa3d47676d9)
| * Doxyfile.in: do not put timestamps in HTMLSimon McVittie2017-06-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The build timestamp is not particularly useful (the version number of the package is already present in the HTML), and it prevents the build from being reproducible. See <https://reproducible-builds.org/> for more information. Signed-off-by: Simon McVittie <smcv@debian.org> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100692 (cherry picked from commit 0310ead0022b3537392869cc2ed3296ba1a7c17d)
| * Fix missing dbus_message_unref() in error reply pathShin-ichi MORITA2017-06-273-1/+122
| | | | | | | | | | | | | | | | | | | | The error message was leaked when blocking on a pending call after the connection was disconnected. Reviewed-by: Philip Withnall <withnall@endlessm.com> [smcv: re-word commit message] Reviewed-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101481
* | Fix missing dbus_message_unref() in error reply pathShin-ichi MORITA2017-06-273-1/+122
| | | | | | | | | | | | | | | | | | | | The error message was leaked when blocking on a pending call after the connection was disconnected. Reviewed-by: Philip Withnall <withnall@endlessm.com> [smcv: re-word commit message] Reviewed-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101481
* | test-pending-call-dispatch: Add copyright and license grantSimon McVittie2017-06-271-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to git history, this test was written in 2006 by Red Hat employee John Palmieri and has received only trivial changes since then. Red Hat gave permission in 2007 for their contributions to be relicensed under the MIT/X11 license. We cannot take advantage of that permission to relicense the core library or the dbus-daemon from GPL-2+|AFL-2.0 to MIT/X11, because one early copyright holder (CodeFactory AB) could not be traced, but we might as well use a permissive license for simple test code that has not had CodeFactory AB contributions. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101481
* | Update NEWSSimon McVittie2017-06-121-0/+3
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Return the dbus-daemon SELinux context when asking about org.freedesktop.DBusLaurent Bigonville2017-06-123-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when asked the SELinux context of the owner of org.freedesktop.DBus, the dbus-daemon is returning an error. In the same situation when asked about the Unix user or the PID, the daemon would return its own user or pid. Do the same for the SELinux context by returning the daemon one. In particular this avoids an issue seen with systemd --user, where dbus-daemon responds to UpdateActivationEnvironment() by passing on the new environment to systemd with o.fd.systemd1.Manager.SetEnvironment(), but systemd cannot get the caller's SELinux context and so rejects the SetEnvironment() call. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101315 [smcv: Extend commit message to describe the symptom this fixes] Reviewed-by: Simon McVittie <smcv@collabora.com>
* | NEWSSimon McVittie2017-06-121-0/+5
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Opt-in to deprecation warnings for GLib 2.38 and 2.40Simon McVittie2017-06-121-1/+1
| | | | | | | | | | | | | | | | | | Now that g_test_trap_fork() has gone, we no longer have any calls to GLib functions deprecated in or before 2.40. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101362
* | test/internals/syslog: Switch to g_test_trap_subprocess()Simon McVittie2017-06-121-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | This re-executes the same binary with special command-line options instead of forking. As a result, it can work on Windows, and is less dependent on Unix libraries continuing to work across a fork(). (This has been confirmed to work in Windows binaries running under Wine.) Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101362
* | Bump GLib dependency for tests to 2.40Simon McVittie2017-06-123-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is quite old (it's the version in Ubuntu 14.04 LTS, and older than the version in Debian 8) but gives us g_test_skip(), g_test_trap_subprocess() and GVariantDict, all of which will be useful in the regression tests. Remove workarounds for old versions. After this commit we are still using the deprecated g_test_trap_fork(), which will be removed in a subsequent commit. Don't opt-in to the new deprecation warnings from 2.38 and 2.40 yet, because under our recommended settings for dbus developers (-Werror) they would break the build. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101362
* | dbus-launch: Use dbus_try_get_local_machine_id()Simon McVittie2017-06-091-6/+13
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13194
* | test-autolaunch: Make recently-added message similar to the othersSimon McVittie2017-06-081-1/+1
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | NEWSSimon McVittie2017-06-081-0/+6
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Refer to dbus_try_get_local_machine_id() in doc-commentsSimon McVittie2017-06-082-2/+2
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Add dbus_try_get_local_machine_id()Simon McVittie2017-06-083-36/+58
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13194
* | Make _dbus_get_local_machine_uuid_encoded() properly failableSimon McVittie2017-06-083-30/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function already raised an error, and all callers handled that error as gracefully as they could (because _dbus_generate_uuid() is failable, since 2015). Given that, it seems unnecessarily hostile to do a _dbus_warn_check_failed() unless we have no better alternative: yes, it indicates that dbus has not been installed correctly, but during build-time tests it's entirely reasonable that dbus has not yet been installed. Callers are: * DBusConnection, to implement Peer.GetMachineId() * The bus driver, to implement Peer.GetMachineId() * X11 autolaunching * dbus_get_local_machine_id() Of those, only the last one is not in a position to return an error gracefully, so move the _dbus_warn_check_failed() to there. Migrate the text about the D-Bus library being incorrectly set up into the error emitted by the Unix implementation, and to make it less misleading, include separate error messages for both the files we try to read: $ bwrap --ro-bind / / --dev /dev --tmpfs /etc --tmpfs /var \ ./tools/dbus-uuidgen --get D-Bus library appears to be incorrectly set up: see the manual page for dbus-uuidgen to correct this issue. (Failed to open "/var/lib/dbus/machine-id": No such file or directory; Failed to open "/etc/machine-id": No such file or directory) Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13194
* | tests: Don't exercise GetMachineId() or autolaunch if no machine IDSimon McVittie2017-06-085-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment there is a hack in the implementation of GetMachineId() to stop tests from failing during "make check" on a system where dbus has never been installed, by silently generating a new unique fake "machine ID" for each process. I'm about to change that behaviour to report errors properly; skip affected test-cases if we can't read the real machine ID. The shell scripts to test dbus-launch are run both as "make check" tests (for which it is valid for dbus to be not correctly installed) and as installed-tests (for which that is not valid), so make them pass during "make check" but fail during installed testing. The tests in bus/ and test/name-test/ are only run during "make check" so they only have the code path where they are skipped. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13194
* | uuidgen: Remove unimplemented declarationSimon McVittie2017-06-081-3/+0
| | | | | | | | | | | | | | | | As far as I can tell from git history, this function never existed. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13194
* | NEWSSimon McVittie2017-06-081-1/+31
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | test/dbus-daemon: Exercise Properties, Features and InterfacesSimon McVittie2017-06-081-0/+761
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
* | test/dbus-daemon: Exercise the Peer interfaceSimon McVittie2017-06-085-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | We have to skip the GetMachineId() part during build-time testing if it wouldn't work - there is no guarantee that dbus has ever been installed on the build system. However, we can insist on it during installed-tests, if we make sure to complete the installation for the Travis-CI build by running dbus-uuidgen. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
* | Unix sysdeps: Only copy /etc/machine-id to ${sysconfdir} in "ensure" modeSimon McVittie2017-06-081-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | System integration scripts use dbus-uuidgen --ensure, so they are unaffected by this, and in particular the solution to Bug #77941 is still valid. The shared library is typically loaded by unprivileged users, so trying to write out the machine-id file is not going to work anyway. However, if we *can* write to our ${sysconfdir} - notably during `make distcheck` - then it is unexpected that merely reading the machine ID has the side-effect of writing to ${sysconfdir}, and in particular it will make the check for a complete uninstall fail. We definitely must not delete the machine ID during `make uninstall`. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
* | spec: Document the Features and Interfaces properties on o.fd.DBusSimon McVittie2017-06-081-0/+116
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
* | spec: Document the Peer and Properties interfaces for the message busSimon McVittie2017-06-081-0/+8
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
* | driver: Implement the Peer interface, for completenessSimon McVittie2017-06-082-1/+81
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
* | driver: Implement Properties, with Features and Interfaces propertiesSimon McVittie2017-06-081-2/+375
| | | | | | | | | | | | | | | | | | | | | | | | | | We recommend using Properties for this sort of thing when designing D-Bus APIs, so it's a bit hypocritical that the reference message bus didn't. The Features and Interfaces properties can be used for feature-discovery as we add new larger features, while the Properties support can be used for finer-grained properties, for example in the interface planned for #100344. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
* | driver: Generate child node elements in introspectionSimon McVittie2017-06-083-4/+28
| | | | | | | | | | | | | | | | This makes the /org/freedesktop/DBus path discoverable. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
* | asv-util: Expose functions to open an arbitrary entrySimon McVittie2017-06-082-3/+14
| | | | | | | | | | | | | | | | We'll need this to implement o.fd.DBus.Properties. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
* | transport: Don't pile up errors for semicolon-separated componentsSimon McVittie2017-06-081-0/+3
| | | | | | | | | | | | | | | | | | | | If we somehow get an autolaunch address with multiple semicolon-separated components, and one of them fails, then we will hit an assertion failure when we try the next one. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257