platform/upstream/dbus.git
7 years agoactivation test: Fix time-of-check/time-of-use bug waiting to happen
Simon McVittie [Wed, 15 Feb 2017 17:24:14 +0000 (17:24 +0000)]
activation test: Fix time-of-check/time-of-use bug waiting to happen

Creating a directory is atomic, stat'ing it to see whether to remove
it is very much not.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99828
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
7 years agoChange _dbus_create_directory to fail for existing directories
Simon McVittie [Wed, 15 Feb 2017 16:32:04 +0000 (16:32 +0000)]
Change _dbus_create_directory to fail for existing directories

If we don't trap EEXIST and its Windows equivalent, we are unable to
detect the situation where we create an ostensibly unique
subdirectory in a shared /tmp, but an attacker has already created it.
This affects dbus-nonce (the nonce-tcp transport) and the activation
reload test.

Add a new _dbus_ensure_directory() for the one case where we want it to
succeed even on EEXIST: the DBUS_COOKIE_SHA1 keyring, which we know
we are creating in our own trusted "official" $HOME. In the new
transient service support on Bug #99825, ensure_owned_directory()
would need the same treatment.

We are not treating this as a serious security problem, because the
nonce-tcp transport is rarely enabled on Unix and there are multiple
mitigations.

The nonce-tcp transport creates a new unique file with O_EXCL and 0600
(private to user) permissions, then overwrites the requested filename
via atomic-overwrite, so the worst that could happen there is that an
attacker could place a symbolic link matching the name of a directory
we are going to create, causing a dbus-daemon configured for nonce-tcp
to traverse the symlink and atomically overwrite a file named "nonce"
in a directory of the attacker's choice, with new random contents that
are not known to the attacker. This seems unlikely to be exploitable
for anything worse than denial of service in practice. In mainline
Linux since 3.6, this attack is also defeated by the
fs.protected_symlinks sysctl, which many distributions enable by default.

The activation reload test suffers from a classic symlink attack
due to time-of-check/time-of-use errors in its implementation, but as
part of the developer-only "embedded tests" that are only intended
to be run on a trusted machine, it is not treated as security-sensitive.
That code path will be fixed in a subsequent commit.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99828
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
7 years agoTravis-CI: Get new autoconf-archive from Ubuntu
Simon McVittie [Tue, 14 Feb 2017 08:58:26 +0000 (08:58 +0000)]
Travis-CI: Get new autoconf-archive from Ubuntu

Hopefully this has better uptime than snapshot.debian.org, which is
really an archival service rather than a production component.

This particular autoconf-archive version was in Ubuntu 16.10, so it
should stay around for a while.

Signed-off-by: Simon McVittie <smcv@debian.org>
(cherry picked from commit 9935a5b7d177b2368506fa48e7fdfa94ea0151fa)

7 years agoUpdate NEWS for 1.10 branch
Simon McVittie [Wed, 1 Feb 2017 11:10:26 +0000 (11:10 +0000)]
Update NEWS for 1.10 branch

7 years agoci-install, ci-build: add brief documentation for parameter variables
Simon McVittie [Tue, 29 Nov 2016 13:05:14 +0000 (13:05 +0000)]
ci-install, ci-build: add brief documentation for parameter variables

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agoci-install.sh: make ci_in_docker follow the yes/no convention too
Simon McVittie [Tue, 29 Nov 2016 12:47:01 +0000 (12:47 +0000)]
ci-install.sh: make ci_in_docker follow the yes/no convention too

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agotravis-ci: Add and use infrastructure to build and test in Docker
Simon McVittie [Mon, 28 Nov 2016 16:38:37 +0000 (16:38 +0000)]
travis-ci: Add and use infrastructure to build and test in Docker

Debian stable, Debian testing and Ubuntu LTS provide a reasonable
spectrum of old and new distributions. I'm only doing one build on
each to avoid a combinatorial explosion of options.

The Docker images don't have any deb-src apt sources set up, so don't
use `apt-get build-dep`; just include dependencies manually.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agotravis-ci: add an install script instead of open-coding it in .travis.yml
Simon McVittie [Mon, 28 Nov 2016 13:11:48 +0000 (13:11 +0000)]
travis-ci: add an install script instead of open-coding it in .travis.yml

Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
[smcv: move comment to install script as suggested]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agotravis-ci: introduce maybe_fail_tests() to make test failure more obvious
Simon McVittie [Mon, 28 Nov 2016 13:04:13 +0000 (13:04 +0000)]
travis-ci: introduce maybe_fail_tests() to make test failure more obvious

Taken from the version I added to OSTree.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agotravis-ci: run in bash, with the "unofficial strict mode"
Simon McVittie [Mon, 28 Nov 2016 13:03:46 +0000 (13:03 +0000)]
travis-ci: run in bash, with the "unofficial strict mode"

set -u forces us to set all variables that we use (for example with the
${foo:=bar} syntax to take an existing value or set a default), or use the
${foo:-bar} syntax to make it explicit that the variable might be unset.

set -o pipefail (which is a bash feature) detects failure in non-last
elements of a pipeline.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agotravis-ci: consistently use yes/no instead of yes/empty
Simon McVittie [Mon, 28 Nov 2016 12:58:53 +0000 (12:58 +0000)]
travis-ci: consistently use yes/no instead of yes/empty

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agotravis-ci: consistently use ci_* for parameter variables
Simon McVittie [Mon, 28 Nov 2016 12:56:53 +0000 (12:56 +0000)]
travis-ci: consistently use ci_* for parameter variables

This aligns it with the more generic script based on this one that
I sent to OSTree.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agoci-build: retab with 4-space indentation
Simon McVittie [Mon, 28 Nov 2016 12:54:21 +0000 (12:54 +0000)]
ci-build: retab with 4-space indentation

This realigns it with the script loosely based on this one that I
sent to OSTree.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agotravis-ci: add an explicit copyright/license statement
Simon McVittie [Mon, 28 Nov 2016 12:27:03 +0000 (12:27 +0000)]
travis-ci: add an explicit copyright/license statement

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889

7 years agoRename distro-style CI build from "release" to "production"
Simon McVittie [Sat, 1 Oct 2016 14:20:11 +0000 (15:20 +0100)]
Rename distro-style CI build from "release" to "production"

This avoids confusion with the meaning of "release" used by
AX_IS_RELEASE. AX_IS_RELEASE is about facts about the source tree,
namely the distinction between releases (tags) and random snapshots.
The build variants in .travis.yml are about facts about the build
being done, namely the distinction between production and
debug/developer builds.

Production builds are sometimes referred to as "release builds",
for example in typical CMake and MSVC build environments, but a
different term seems better here.

Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97357
[smcv: cherry-picked from master to dbus-1.10 to get the Travis-CI setup
consistent between the two branches]

7 years agoUpdate autoconf-archive, and use snapshot.debian.org
Simon McVittie [Fri, 30 Sep 2016 18:35:59 +0000 (19:35 +0100)]
Update autoconf-archive, and use snapshot.debian.org

This way the link won't expire in future.

Signed-off-by: Simon McVittie <smcv@debian.org>
[smcv: cherry-picked from master to dbus-1.10 to get the Travis-CI setup
consistent between the two branches; it is not strictly needed on dbus-1.10]

7 years agoTravis-CI: fetch a newer autoconf-archive from Debian
Simon McVittie [Mon, 15 Aug 2016 19:41:28 +0000 (20:41 +0100)]
Travis-CI: fetch a newer autoconf-archive from Debian

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[smcv: cherry-picked from master to dbus-1.10 to get the Travis-CI setup
consistent between the two branches; it is not strictly needed on dbus-1.10]

7 years agoTravis-CI: install new autoconf-archive build-dependency
Simon McVittie [Mon, 15 Aug 2016 19:12:19 +0000 (20:12 +0100)]
Travis-CI: install new autoconf-archive build-dependency

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[smcv: cherry-picked from master to dbus-1.10 to get the Travis-CI setup
consistent between the two branches; it is not strictly needed on dbus-1.10]

7 years agoStart developing 1.10.16
Simon McVittie [Mon, 28 Nov 2016 20:23:14 +0000 (20:23 +0000)]
Start developing 1.10.16

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
7 years agodbus 1.10.14
Simon McVittie [Mon, 28 Nov 2016 18:26:07 +0000 (18:26 +0000)]
dbus 1.10.14

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
7 years agoSuppress -Wmisleading-indentation for this stable branch
Simon McVittie [Mon, 28 Nov 2016 18:48:28 +0000 (18:48 +0000)]
Suppress -Wmisleading-indentation for this stable branch

We are not going to fix the inconsistent tab/space indentation in a
stable branch just to keep gcc happy.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
7 years agoMake uid 0 immune to pending_fd_timeout limit
Simon McVittie [Fri, 11 Nov 2016 16:40:44 +0000 (16:40 +0000)]
Make uid 0 immune to pending_fd_timeout limit

This is a workaround for
<https://bugs.freedesktop.org/show_bug.cgi?id=95263>. If a service
sends a file descriptor sufficiently frequently that its queue of
messages never goes down to 0 fds pending, then it will eventually be
disconnected. logind is one such service.

We do not currently have a good solution for this: the proposed
patches either don't work, or reintroduce a denial of service
security vulnerability (CVE-2014-3637). Neither seems desirable.
However, we can avoid the worst symptoms by trusting uid 0 not to be
malicious.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95263
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1591411
Reviewed-by: Ɓukasz Zemczak
Tested-by: Ivan Kozik
Tested-by: Finn Herpich
Tested-by: autostatic
Tested-by: Ben Parafina
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
(cherry picked from commit d5fae1db789d741295ca4746b84915d4bec591fd)
[smcv: omit the test/dbus-daemon.c part, which does not apply unless
a363822f5f58e5513e30dc2f84a30ae03cd91e07 is also applied]

7 years agoLog to syslog when pending_fd_timeout is exceeded
Simon McVittie [Tue, 16 Aug 2016 15:12:35 +0000 (16:12 +0100)]
Log to syslog when pending_fd_timeout is exceeded

This is either a denial-of-service attempt, a pathological performance
problem or a dbus-daemon bug. Sysadmins should be told about any of
these.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86442
[smcv: add units to timeout: it is in milliseconds]
Signed-off-by: Simon McVittie <smcv@debian.org>
(cherry picked from commit 05cb619f0a6a4c9997832cb4acbb26f7a0be66c3)

7 years agoInstall mingw build-dependencies in a different order
Simon McVittie [Tue, 22 Nov 2016 21:10:44 +0000 (21:10 +0000)]
Install mingw build-dependencies in a different order

This avoids installing the build-dependencies for dbus and its tests,
then uninstalling them all because they rely on libraries whose versions
are older than the ones needed by wine:i386 (and apparently apt prefers
to remove those libraries rather than upgrade them). Doing it this way
round seems to convince apt to do the right thing.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
7 years agoci-build: run our copy of config.guess
Simon McVittie [Tue, 22 Nov 2016 21:07:48 +0000 (21:07 +0000)]
ci-build: run our copy of config.guess

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
7 years agoNEWS
Simon McVittie [Tue, 22 Nov 2016 20:06:36 +0000 (20:06 +0000)]
NEWS

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
7 years agoDon't test X11 autolaunching if it was disabled at compile time
Simon McVittie [Wed, 9 Nov 2016 18:44:21 +0000 (18:44 +0000)]
Don't test X11 autolaunching if it was disabled at compile time

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98665

7 years ago1.10.12
Simon McVittie [Mon, 10 Oct 2016 09:19:44 +0000 (10:19 +0100)]
1.10.12

7 years agoDisable deprecation warnings for stable branch
Simon McVittie [Fri, 7 Oct 2016 20:38:05 +0000 (21:38 +0100)]
Disable deprecation warnings for stable branch

We're not going to replace deprecated functions here.

Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98157

7 years agoIgnore ActivationFailure if not using systemd activation
Simon McVittie [Fri, 7 Oct 2016 20:26:36 +0000 (21:26 +0100)]
Ignore ActivationFailure if not using systemd activation

This isn't security-related, just defensive programming: if
dbus-daemon wasn't run with --systemd-activation, then there is no
reason why systemd would legitimately send us this signal, and if it
does we should just ignore it.

Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98157

7 years agobus_driver_handle_message: reject ActivationFailure if unprivileged
Simon McVittie [Fri, 7 Oct 2016 20:25:08 +0000 (21:25 +0100)]
bus_driver_handle_message: reject ActivationFailure if unprivileged

Specifically, this will allow ActivationFailure messages from our
own uid or from root, but reject them otherwise, even if the bus
configuration for who can own org.freedesktop.systemd1 is entirely
wrong due to something like CVE-2014-8148.

Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98157

7 years agodbus_activation_systemd_failure: do not use non-literal format string
Simon McVittie [Fri, 7 Oct 2016 18:13:01 +0000 (19:13 +0100)]
dbus_activation_systemd_failure: do not use non-literal format string

In principle this could lead to arbitrary memory overwrite via
a format string attack in the message received from systemd,
resulting in arbitrary code execution.

This is not believed to be an exploitable security vulnerability on the
system bus in practice: it can only be exploited by the owner of the
org.freedesktop.systemd1 bus name, which is restricted to uid 0, so
if systemd is attacker-controlled then the system is already doomed.
Similarly, if a systemd system unit mentioned in the activation failure
message has an attacker-controlled name, then the attacker likely already
has sufficient access to execute arbitrary code as root in any case.

However, prior to dbus 1.8.16 and 1.9.10, due to a missing check for
systemd's identity, unprivileged processes could forge activation
failure messages which would have gone through this code path.
We thought at the time that this was a denial of service vulnerability
(CVE-2015-0245); this bug means that it was in fact potentially an
arbitrary code execution vulnerability.

Bug found using -Wsuggest-attribute=format and -Wformat-security.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98157

7 years agoNEWS
Simon McVittie [Tue, 4 Oct 2016 10:23:30 +0000 (11:23 +0100)]
NEWS

7 years agoDBusMessage: Fix UB (misaligned access) in call to _dbus_header_set_field_basic()
Marc Mutz [Mon, 3 Oct 2016 20:19:45 +0000 (22:19 +0200)]
DBusMessage: Fix UB (misaligned access) in call to _dbus_header_set_field_basic()

The const void* 'value' pointer that is passed the address of a
uint32_t here eventually ends up in _dbus_marshal_write_basic(), which
casts it to a DBusBasicValue, a union type that has an alignment of
eight on 64-bit platforms and is therefore more-aligned than the
uint32.

The read of a value of a more-aligned type through a pointer to a less
-aligned type is undefined behaviour.

Fix by storing the uint32 in a DBusBasicValue and passing that instead.

Found by UBSan:

  dbus/dbus/dbus-marshal-basic.c:832:14: runtime error: member access within misaligned address 0x7fdb8dac3a04 for type 'const union DBusBasicValue', which requires 8 byte alignment
  0x7fdb8dac3a04: note: pointer points here
    4a 87 b5 71 01 00 00 00  40 7d 01 00 00 61 00 00  10 3b ac 8d db 7f 00 00  2c 2a 3e 94 db 7f 00 00
                ^
    #0 0x7fdb9444a2c3 in _dbus_marshal_write_basic dbus/dbus/dbus-marshal-basic.c:832
    #1 0x7fdb943d22fb in _dbus_type_writer_write_basic_no_typecode dbus/dbus/dbus-marshal-recursive.c:1605
    #2 0x7fdb943d64e9 in _dbus_type_writer_write_basic dbus/dbus/dbus-marshal-recursive.c:2327
    #3 0x7fdb943c52a6 in write_basic_field dbus/dbus/dbus-marshal-header.c:318
    #4 0x7fdb943c919e in _dbus_header_set_field_basic dbus/dbus/dbus-marshal-header.c:1321
    #5 0x7fdb943e1349 in dbus_message_set_reply_serial dbus/dbus/dbus-message.c:1173

Signed-off-by: Marc Mutz <marc@kdab.net>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98035

7 years agoNEWS for 1.10.x
Simon McVittie [Mon, 3 Oct 2016 10:43:06 +0000 (11:43 +0100)]
NEWS for 1.10.x

7 years agoautogen.sh: fail cleanly if autoconf fails
Simon McVittie [Mon, 15 Aug 2016 19:11:49 +0000 (20:11 +0100)]
autogen.sh: fail cleanly if autoconf fails

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
(cherry picked from commit 0bbfca6def7a39c03b7a0a4cba166fdf89f3c630)

7 years ago1.10.11
Simon McVittie [Mon, 15 Aug 2016 22:31:18 +0000 (23:31 +0100)]
1.10.11

7 years ago1.10.10
Simon McVittie [Mon, 15 Aug 2016 18:59:18 +0000 (19:59 +0100)]
1.10.10

Signed-off-by: Simon McVittie <smcv@debian.org>
7 years agoAdd a regression test for dbus-launch in X11
Simon McVittie [Fri, 12 Aug 2016 09:58:13 +0000 (10:58 +0100)]
Add a regression test for dbus-launch in X11

[Modified for the dbus-1.10 branch: DBUS_USE_TEST_BINARY is needed.]

Signed-off-by: Simon McVittie <smcv@debian.org>
7 years agotest-dbus-daemon-fork: exercise closed stdin, stdout, stderr
Simon McVittie [Wed, 20 Jul 2016 12:31:50 +0000 (13:31 +0100)]
test-dbus-daemon-fork: exercise closed stdin, stdout, stderr

Signed-off-by: Simon McVittie <smcv@debian.org>
7 years agotest: expand dbus-launch-eval test to cover stdin being closed
Simon McVittie [Wed, 20 Jul 2016 11:07:03 +0000 (12:07 +0100)]
test: expand dbus-launch-eval test to cover stdin being closed

Signed-off-by: Simon McVittie <smcv@debian.org>
7 years agoAdd a simple test for dbus-daemon --fork
Simon McVittie [Wed, 20 Jul 2016 12:12:45 +0000 (13:12 +0100)]
Add a simple test for dbus-daemon --fork

[Modified for the dbus-1.10 branch: DBUS_USE_TEST_BINARY is needed.]

Signed-off-by: Simon McVittie <smcv@debian.org>
7 years agotest: add a regression test for eval "$(dbus-launch --sh-syntax)"
Simon McVittie [Wed, 20 Jul 2016 11:00:34 +0000 (12:00 +0100)]
test: add a regression test for eval "$(dbus-launch --sh-syntax)"

[Modified for the dbus-1.10 branch: DBUS_USE_TEST_BINARY is needed.]

Signed-off-by: Simon McVittie <smcv@debian.org>
7 years agodbus-daemon, dbus-launch: cope with callers having closed standard fds
Simon McVittie [Thu, 21 Jul 2016 07:24:38 +0000 (08:24 +0100)]
dbus-daemon, dbus-launch: cope with callers having closed standard fds

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 c8f73a2a3a9d9d10587f596a62ebb64e8963197e)

7 years ago_dbus_ensure_standard_fds: new function to ensure std* fds are open
Simon McVittie [Thu, 21 Jul 2016 07:23:12 +0000 (08:23 +0100)]
_dbus_ensure_standard_fds: new function to ensure std* fds are open

This function opens stdin, stdout, stderr pointing to /dev/null
if they aren't already open. Optionally, it can also replace
whatever is available on those fds with /dev/null.

To allow for use in contexts where only async-signal-safe functions
should be used, such as between fork() and a following exec(),
this function does not use conventional libdbus error handling
(which would require malloc). Instead, it sets errno and returns
an explanatory string.

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 69123a6bd2adabbaec1f770fc4573fc3ed4ceca6)

7 years agoNEWS for 1.10
Simon McVittie [Fri, 12 Aug 2016 09:12:28 +0000 (10:12 +0100)]
NEWS for 1.10

7 years agoMark WaitingForOK state as unused
Simon McVittie [Thu, 11 Aug 2016 15:08:39 +0000 (16:08 +0100)]
Mark WaitingForOK state as unused

It should probably be used (see #97298) but the fact that it isn't
is breaking compatibility with gcc 6, so apply a quick workaround
while we look into what's wrong here.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97282
(cherry picked from commit 21d61180819c141e779d6ecf9919e62e768b6fd9)

7 years agoupdate-activation-environment: produce better diagnostics on error
Simon McVittie [Mon, 11 Jul 2016 09:52:44 +0000 (10:52 +0100)]
update-activation-environment: produce better diagnostics on error

If dbus-daemon or systemd replied to our method call with an error,
we would report it as "invalid arguments" instead of the true error
name and message.

Same root cause as <https://bugs.freedesktop.org/show_bug.cgi?id=96653>.

Signed-off-by: Simon McVittie <smcv@debian.org>
7 years agoNEWS for 1.10 branch
Simon McVittie [Fri, 29 Jul 2016 18:14:18 +0000 (19:14 +0100)]
NEWS for 1.10 branch

7 years agoconfigure.ac: explicitely check stdint.h
Ioan-Adrian Ratiu [Thu, 28 Jul 2016 22:19:37 +0000 (01:19 +0300)]
configure.ac: explicitely check stdint.h

Otherwise HAVE_STDINT_H will not be defined or the var will not be
picked up from cache so builds could fail with errors like:
| ../../dbus-1.10.8/dbus/dbus-internals.h:239:8: error: â€˜uintptr_t’ undeclared (first use in this function)

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
[smcv: fix Autoconf underquoting]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
7 years agoUpdate NEWS for merge of dbus-1.10-ci branch
Simon McVittie [Mon, 25 Jul 2016 10:53:13 +0000 (11:53 +0100)]
Update NEWS for merge of dbus-1.10-ci branch

7 years agoMerge branch 'dbus-1.10-ci' into dbus-1.10
Simon McVittie [Mon, 25 Jul 2016 10:43:54 +0000 (11:43 +0100)]
Merge branch 'dbus-1.10-ci' into dbus-1.10

8 years agoUpdate NEWS
Simon McVittie [Thu, 30 Jun 2016 13:40:24 +0000 (14:40 +0100)]
Update NEWS

8 years agoMerge branch 'dbus-1.10' into dbus-1.10-ci
Simon McVittie [Thu, 30 Jun 2016 12:57:29 +0000 (13:57 +0100)]
Merge branch 'dbus-1.10' into dbus-1.10-ci

8 years agoactivation: set children oom_score_adj to 0
WaLyong Cho [Tue, 7 Jun 2016 14:26:42 +0000 (23:26 +0900)]
activation: set children oom_score_adj to 0

If dbus is running as systemd service, dbus daemon is running with
oom_score_adj -900 by OOMScoreAdjust=-900. And children will also have
same value with dbus daemon.
To avoid this, set the child itself values after fork () to 0.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32851
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoUse dbus_set_error_from_message() to check for an error
Đ ŃƒŃĐ»Đ°Đœ Đ˜Đ¶Đ±ŃƒĐ»Đ°Ń‚ĐŸĐČ [Thu, 23 Jun 2016 12:26:45 +0000 (12:26 +0000)]
Use dbus_set_error_from_message() to check for an error

Do not rely on dbus_message_get_args() to turn an ERROR message
into DBusError.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=96653
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoQuote the DBUS_SESSION_BUS_ADDRESS variable in the shell file
Thiago Macieira [Tue, 29 Mar 2016 19:15:15 +0000 (12:15 -0700)]
Quote the DBUS_SESSION_BUS_ADDRESS variable in the shell file

Some D-Bus daemon versions set multiple addresses separated by semi-colon,
which breaks sourcing of the file.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94746
Signed-off-by: Thiago Macieira <thiago@kde.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agotravis: compile with mingw in both production and debug flavours
Simon McVittie [Mon, 16 May 2016 12:48:37 +0000 (13:48 +0100)]
travis: compile with mingw in both production and debug flavours

This should detect anything that is only a build failure when embedded
tests or verbose mode are enabled, such as the missing include fixed
in commit 4858faf. I'm not enabling embedded tests and verbose mode
orthogonally because we don't want CI builds to take too long.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
(cherry picked from commit 8f6fe1451ead14b82475177f40bbc2c256cba876)

8 years agoMerge branch 'dbus-1.10' into dbus-1.10-ci
Simon McVittie [Wed, 18 May 2016 17:14:16 +0000 (18:14 +0100)]
Merge branch 'dbus-1.10' into dbus-1.10-ci

8 years agotest-segfault: add missing include of <stdio.h> on Windows
Simon McVittie [Mon, 16 May 2016 13:10:36 +0000 (14:10 +0100)]
test-segfault: add missing include of <stdio.h> on Windows

Needed for fprintf (stderr, ...).

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
(cherry picked from commit 07b7dcd7178f927cd0b3a3282396b7f99c0b1d29)

8 years agoFix ambiguous setup of DBusBabySitter struct member child_handle on Windows.
Ralf Habacker [Mon, 16 May 2016 10:52:25 +0000 (12:52 +0200)]
Fix ambiguous setup of DBusBabySitter struct member child_handle on Windows.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoOn Windows make access to member 'refcount' of struct DBusBabysitter thread safe.
Ralf Habacker [Tue, 10 May 2016 14:53:57 +0000 (16:53 +0200)]
On Windows make access to member 'refcount' of struct DBusBabysitter thread safe.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoEliminates a race condition accessing DBusBabysitter instance at startup of babysitte...
Ralf Habacker [Thu, 12 May 2016 22:56:42 +0000 (00:56 +0200)]
Eliminates a race condition accessing DBusBabysitter instance at startup of babysitter() on Windows.

Ensure that the babysitter thread already owns its one reference to the
babysitter when it starts up, and eliminates the race condition.
This patch requires that DBusBabysitter refcounting is thread-safe
and is based on an analysis and proposal of Simon Mc Vittie.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoSuppress Windows popups and jit debugger when app crashes with exception.
Ralf Habacker [Mon, 9 May 2016 15:31:17 +0000 (17:31 +0200)]
Suppress Windows popups and jit debugger when app crashes with exception.

Based on a patch from Yiyang Fei.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95155
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix crash in test-spawn unit test app on Windows.
Yiyang Fei [Wed, 27 Apr 2016 15:10:06 +0000 (08:10 -0700)]
Fix crash in test-spawn unit test app on Windows.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95160
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix assert in test-spawn caused by missing initialization of DBusError instance on...
Ralf Habacker [Fri, 29 Apr 2016 07:47:51 +0000 (09:47 +0200)]
Fix assert in test-spawn caused by missing initialization of DBusError instance on gcc builds.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95160
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
(cherry picked from commit 9323a621e868d6a5b628b89696b1efe0300ff939)

8 years agoMerge branch 'dbus-1.10' into dbus-1.10-ci
Simon McVittie [Mon, 7 Mar 2016 19:45:15 +0000 (19:45 +0000)]
Merge branch 'dbus-1.10' into dbus-1.10-ci

8 years ago1.10.9
Simon McVittie [Mon, 7 Mar 2016 19:31:52 +0000 (19:31 +0000)]
1.10.9

8 years ago1.10.8
Simon McVittie [Mon, 7 Mar 2016 16:07:20 +0000 (16:07 +0000)]
1.10.8

Signed-off-by: Simon McVittie <smcv@debian.org>
8 years agoDisable travis-ci apt source for Google Chrome
Simon McVittie [Wed, 2 Mar 2016 22:26:47 +0000 (22:26 +0000)]
Disable travis-ci apt source for Google Chrome

This prevents adding i386 as a foreign architecture. We don't need
Chrome anyway.

Signed-off-by: Simon McVittie <smcv@debian.org>
8 years agoMerge branch 'dbus-1.10' into dbus-1.10-ci
Simon McVittie [Wed, 2 Mar 2016 18:52:34 +0000 (18:52 +0000)]
Merge branch 'dbus-1.10' into dbus-1.10-ci

8 years agoupdate NEWS
Simon McVittie [Wed, 2 Mar 2016 18:24:11 +0000 (18:24 +0000)]
update NEWS

8 years agodbus-test-tool echo: fix sleep documentation
Dmitri Iouchtchenko [Mon, 22 Feb 2016 04:50:49 +0000 (23:50 -0500)]
dbus-test-tool echo: fix sleep documentation

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94244
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoStatically assert that the DBusMessageIter struct has no padding
Simon McVittie [Mon, 15 Feb 2016 13:52:52 +0000 (13:52 +0000)]
Statically assert that the DBusMessageIter struct has no padding

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136

8 years agoDBusMessageIter: eliminate padding on 64-bit platforms
Simon McVittie [Mon, 15 Feb 2016 15:00:22 +0000 (15:00 +0000)]
DBusMessageIter: eliminate padding on 64-bit platforms

Previously, 64-bit (LP64 or LLP64) platforms would have had 32 bits
of padding between pad2 and pad3. We want to guarantee that an ISO C
compiler will copy the entire struct when assigning between structs,
but padding is not guaranteed to be copied, so we want to ensure that
the struct is "packed".

Statically assert that the old ABI is compatible with the new ABI.

Reviewed-by: Thiago Macieira <thiago@kde.org>
[smcv: change >= to == as Thiago requested]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136

8 years agoDBusMessage: assert the properties we need DBusMessageIter to have
Simon McVittie [Mon, 15 Feb 2016 14:58:59 +0000 (14:58 +0000)]
DBusMessage: assert the properties we need DBusMessageIter to have

We already asserted that DBusMessageIter must be at least as large
as DBusMessageRealIter (so that casting DBusMessageIter * to
DBusMessageRealIter * does not result in overflowing the stack
variable). Also assert that it must have alignment requirements at
least as strict as those of DBusMessageRealIter * (so that casting
does not increase the required alignment).

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136

8 years agodbus-internals: add _DBUS_ALIGNOF
Simon McVittie [Mon, 15 Feb 2016 13:45:49 +0000 (13:45 +0000)]
dbus-internals: add _DBUS_ALIGNOF

This is useful when making static assertions about our types'
properties.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136

8 years agoNEWS so far
Simon McVittie [Wed, 24 Feb 2016 10:50:22 +0000 (10:50 +0000)]
NEWS so far

8 years agoMerge branch 'dbus-1.10' into dbus-1.10-ci
Simon McVittie [Fri, 12 Feb 2016 15:32:38 +0000 (15:32 +0000)]
Merge branch 'dbus-1.10' into dbus-1.10-ci

8 years agoRevert "Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH"
Simon McVittie [Fri, 12 Feb 2016 15:25:15 +0000 (15:25 +0000)]
Revert "Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH"

This reverts commit 8fd2be6013e3d0ff6a6ff63ea022f9606d9a87c6.
This change was intended for 1.11.

8 years agoRevert "name-test C tests: produce structured (TAP) output"
Simon McVittie [Fri, 12 Feb 2016 15:25:13 +0000 (15:25 +0000)]
Revert "name-test C tests: produce structured (TAP) output"

This reverts commit fec99c9b3d8318e3abae432f2aca50802a87f90e.
This change was intended for 1.11.

8 years agoRevert "name-test: run most C tests directly, not via run-test.sh"
Simon McVittie [Fri, 12 Feb 2016 15:25:12 +0000 (15:25 +0000)]
Revert "name-test: run most C tests directly, not via run-test.sh"

This reverts commit d893121efdea39d2b32037b32e336ea483829b2e.
This change was intended for 1.11.

8 years agoRevert "Rename function string_array_length() to _dbus_string_array_length() and...
Simon McVittie [Fri, 12 Feb 2016 15:25:09 +0000 (15:25 +0000)]
Revert "Rename function string_array_length() to _dbus_string_array_length() and move it to dbus-internals.c."

This reverts commit 1370b44035da90a7fbcebea17074c66c832de0b1.
This change was intended for 1.11.

8 years agoRevert "Add new functions _dbus_hash_table_to_array() and _dbus_hash_table_from_array...
Simon McVittie [Fri, 12 Feb 2016 15:24:55 +0000 (15:24 +0000)]
Revert "Add new functions _dbus_hash_table_to_array() and _dbus_hash_table_from_array() from related activation code."

This reverts commit 610ff8d9646c1bb944bc5e56f22750f1754b308e.
This change was intended for 1.11.

8 years agoAdd new functions _dbus_hash_table_to_array() and _dbus_hash_table_from_array() from...
Ralf Habacker [Tue, 9 Feb 2016 14:23:39 +0000 (15:23 +0100)]
Add new functions _dbus_hash_table_to_array() and _dbus_hash_table_from_array() from related activation code.

These functions are required for dbus-run-session.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoRename function string_array_length() to _dbus_string_array_length() and move it...
Ralf Habacker [Fri, 27 Nov 2015 11:10:54 +0000 (12:10 +0100)]
Rename function string_array_length() to _dbus_string_array_length() and move it to dbus-internals.c.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoname-test: run most C tests directly, not via run-test.sh
Simon McVittie [Mon, 8 Feb 2016 20:32:34 +0000 (20:32 +0000)]
name-test: run most C tests directly, not via run-test.sh

The exception is test-autolaunch, which is really not particularly
useful as a build-time test. The only way we can really test
autolaunch is as a whole-system integration test, and "make check"
is not that.

The two tests written in Python and one test based on dbus-send
are also not run directly yet; in particular, that includes both
the tests in run-test-systemserver.sh.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoname-test C tests: produce structured (TAP) output
Simon McVittie [Mon, 8 Feb 2016 20:28:21 +0000 (20:28 +0000)]
name-test C tests: produce structured (TAP) output

Similar to commit 58eefa1031e14cb402ed0aae85e6bce1ba030a28.

test-privserver is a helper executable, not a test. I moved its output
from stdout to stderr so it can't be misinterpreted as the test's
stdout.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoReplace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH
Simon McVittie [Mon, 8 Feb 2016 20:09:58 +0000 (20:09 +0000)]
Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH

Instead of using $DBUS_USE_TEST_BINARY to control whether to use the
hard-coded test binary TEST_BUS_LAUNCH_BINARY, we can just use
$DBUS_TEST_DBUS_LAUNCH to control what we launch directly, as we
were already doing for $DBUS_TEST_DAEMON.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoMerge branch 'dbus-1.10' into dbus-1.10-ci
Simon McVittie [Mon, 8 Feb 2016 19:21:02 +0000 (19:21 +0000)]
Merge branch 'dbus-1.10' into dbus-1.10-ci

8 years agomarshal-validate: run all the tests instead of just the even ones
Nick Lewycky [Thu, 28 Jan 2016 20:24:56 +0000 (12:24 -0800)]
marshal-validate: run all the tests instead of just the even ones

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93908
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[smcv: Re-enable the failing test that Nick disabled, and fix the
expected result; the result given by our current implementation is
reasonable.]

8 years agoMerge branch 'dbus-1.10' into dbus-1.10-ci
Simon McVittie [Mon, 8 Feb 2016 17:35:51 +0000 (17:35 +0000)]
Merge branch 'dbus-1.10' into dbus-1.10-ci

8 years agoconfigure.ac: support large-file for stat64
Simon McVittie [Mon, 8 Feb 2016 17:25:38 +0000 (17:25 +0000)]
configure.ac: support large-file for stat64

dbus-daemon is not expected to open files with large *sizes*, but without
large file support, calling [f]stat() on a file that happens to have a
large inode number will fail with EOVERFLOW (see stat(2)). For example,
files mounted from an NFS server might have large inode numbers.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
[smcv: shorten and clarify commit message; move AC_SYS_LARGEFILE
after AC_USE_SYSTEM_EXTENSIONS because nothing should compile C before
that point]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoMerge branch 'dbus-1.10' into dbus-1.10-ci
Simon McVittie [Mon, 25 Jan 2016 15:06:18 +0000 (15:06 +0000)]
Merge branch 'dbus-1.10' into dbus-1.10-ci

8 years agotest/name-test/run-test.sh: output correct result if a C test fails
Simon McVittie [Tue, 15 Dec 2015 17:23:00 +0000 (17:23 +0000)]
test/name-test/run-test.sh: output correct result if a C test fails

Loosely based on a patch from amit tewari.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93379
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoadd travis-ci.org build machinery
Simon McVittie [Tue, 1 Dec 2015 17:31:18 +0000 (17:31 +0000)]
add travis-ci.org build machinery

The idea is that .travis.yml is specific to Travis-CI, but most of the
actual work is done in tools/ci-build.sh, which should be reasonably
CI-platform-agnostic (it currently assumes that build-dependendencies are
preinstalled, that the "native" platform we're building on is GNU/Linux
or something very close, and that "mingw" means mingw-w64 as packaged
in Debian and Ubuntu).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoDon't try to run manual tests in installcheck
Simon McVittie [Fri, 27 Nov 2015 12:46:52 +0000 (12:46 +0000)]
Don't try to run manual tests in installcheck

We were mistakenly running all installed executables, even manual tests
that never terminate.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoFix shell syntax for installcheck-local with no DESTDIR
Simon McVittie [Fri, 27 Nov 2015 11:50:57 +0000 (11:50 +0000)]
Fix shell syntax for installcheck-local with no DESTDIR

A closing brace must be preceded by a semicolon. The CI integration
added later in this branch actually runs "make installcheck"
with no DESTDIR; apparently nobody else has ever tried that.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoDo not require systemd to have a service file if using it for activation
Simon McVittie [Fri, 27 Nov 2015 11:31:03 +0000 (11:31 +0000)]
Do not require systemd to have a service file if using it for activation

With --systemd-activation we special-case the name
org.freedesktop.systemd1 by assuming that it will eventually connect
to the bus. With that in mind, we can ignore whether it has a
.service file, and let it be "activated" regardless.

This fixes a regression test failure on non-systemd systems such
as the Ubuntu 14.04 OS on travis-ci.org: UpdateActivationEnvironment
failed, because it tried to update the (fake) systemd environment,
but because systemd was not actually installed, there was no
service file for it in the system's search paths. We could address this
by placing a dummy service file with Exec=/bin/false in our search path
like the real systemd does, but it seems cleaner to not require this;
this would eventually enable the real systemd to stop installing
that dummy service file.

This would not happen outside the regression tests, because there is
no sense in using --systemd-activation without systemd installed.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years ago_dbus_test_oom_handling: allow disabling it as documented
Simon McVittie [Tue, 24 Nov 2015 09:21:12 +0000 (09:21 +0000)]
_dbus_test_oom_handling: allow disabling it as documented

We documented DBUS_TEST_MALLOC_FAILURES=0 in HACKING, but it didn't
actually work: we'd iterate from i=-1 to i=0.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>