platform/upstream/dbus.git
8 years agoDo not require binfmt support for running cross compiled test applications.
Ralf Habacker [Mon, 8 Feb 2016 22:16:23 +0000 (23:16 +0100)]
Do not require binfmt support for running cross compiled test applications.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88966
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoMerge branch 'dbus-1.10'
Simon McVittie [Mon, 8 Feb 2016 19:21:13 +0000 (19:21 +0000)]
Merge branch 'dbus-1.10'

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'
Simon McVittie [Mon, 8 Feb 2016 17:25:48 +0000 (17:25 +0000)]
Merge branch 'dbus-1.10'

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'
Simon McVittie [Mon, 25 Jan 2016 15:06:43 +0000 (15:06 +0000)]
Merge branch 'dbus-1.10'

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 ago1.11.1
Simon McVittie [Wed, 2 Dec 2015 23:53:20 +0000 (23:53 +0000)]
1.11.1

8 years ago1.11.0
Simon McVittie [Wed, 2 Dec 2015 21:03:07 +0000 (21:03 +0000)]
1.11.0

8 years agoUpdate NEWS
Simon McVittie [Wed, 2 Dec 2015 20:54:37 +0000 (20:54 +0000)]
Update NEWS

8 years agoMerge branch 'dbus-1.10-ci'
Simon McVittie [Wed, 2 Dec 2015 18:51:57 +0000 (18:51 +0000)]
Merge branch 'dbus-1.10-ci'

No actual change; this is just to mark the conflicts as resolved.

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>
8 years agocmake: run all automated tests with --tap for better diagnostics
Simon McVittie [Tue, 24 Nov 2015 01:19:55 +0000 (01:19 +0000)]
cmake: run all automated tests with --tap for better diagnostics

For GLib-based tests it's useful, because it means g_test_message()
gets logged. For the embedded tests it's now accepted and ignored.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoembedded tests: accept and ignore --tap argument
Simon McVittie [Tue, 24 Nov 2015 01:19:27 +0000 (01:19 +0000)]
embedded tests: accept and ignore --tap argument

This makes them semi-command-line-compatible with a way we can
invoke the GLib-based tests to get more useful debug logs.

These tests still do not actually produce TAP output yet; I tried
implementing that, but it requires changing a lot of noise on stdout
to come out of stderr, and there was something weird going on with
subprocesses restarting the test numbering which will need further
investigation before making that change.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agocmake: copy the systemd-activation directory too
Simon McVittie [Tue, 24 Nov 2015 01:17:53 +0000 (01:17 +0000)]
cmake: copy the systemd-activation directory too

It is needed for a couple of test-cases.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agocmake: manual-tcp is not an automated test
Simon McVittie [Tue, 24 Nov 2015 01:17:29 +0000 (01:17 +0000)]
cmake: manual-tcp is not an automated test

Don't run it when we run automated tests.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[smcv: backport to dbus-1.10]

8 years agoAvoid -Wunused-label when compiling with libselinux but no libaudit
Simon McVittie [Sat, 21 Nov 2015 23:30:34 +0000 (23:30 +0000)]
Avoid -Wunused-label when compiling with libselinux but no libaudit

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
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>
8 years agocmake: run all automated tests with --tap for better diagnostics
Simon McVittie [Tue, 24 Nov 2015 01:19:55 +0000 (01:19 +0000)]
cmake: run all automated tests with --tap for better diagnostics

For GLib-based tests it's useful, because it means g_test_message()
gets logged. For the embedded tests it's now accepted and ignored.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoembedded tests: accept and ignore --tap argument
Simon McVittie [Tue, 24 Nov 2015 01:19:27 +0000 (01:19 +0000)]
embedded tests: accept and ignore --tap argument

This makes them semi-command-line-compatible with a way we can
invoke the GLib-based tests to get more useful debug logs.

These tests still do not actually produce TAP output yet; I tried
implementing that, but it requires changing a lot of noise on stdout
to come out of stderr, and there was something weird going on with
subprocesses restarting the test numbering which will need further
investigation before making that change.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agocmake: copy the systemd-activation directory too
Simon McVittie [Tue, 24 Nov 2015 01:17:53 +0000 (01:17 +0000)]
cmake: copy the systemd-activation directory too

It is needed for a couple of test-cases.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agocmake: manual-tcp is not an automated test
Simon McVittie [Tue, 24 Nov 2015 01:17:29 +0000 (01:17 +0000)]
cmake: manual-tcp is not an automated test

Don't run it when we run automated tests.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoAvoid -Wunused-label when compiling with libselinux but no libaudit
Simon McVittie [Sat, 21 Nov 2015 23:30:34 +0000 (23:30 +0000)]
Avoid -Wunused-label when compiling with libselinux but no libaudit

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoAdd linking to dbghelp for autotools on Windows which is required for backtrace gener...
Ralf Habacker [Fri, 27 Nov 2015 12:30:55 +0000 (13:30 +0100)]
Add linking to dbghelp for autotools on Windows which is required for backtrace generator.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoInitialize SELinux and Apparmor after capabilities are set
Laurent Bigonville [Tue, 17 Nov 2015 20:47:05 +0000 (21:47 +0100)]
Initialize SELinux and Apparmor after capabilities are set

avc_init() in the SELinux code path is creating a new thread, we need to
set to capabilities before it gets created so it has the permission to
send audit messages.

It also make more sense to open the audit netlink before the different
logging callbacks are set.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92832
[smcv: add comments explaining why initialization must happen in this
specific order]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoMerge branch 'dbus-1.10'
Simon McVittie [Tue, 1 Dec 2015 21:37:48 +0000 (21:37 +0000)]
Merge branch 'dbus-1.10'

8 years ago1.10.7
Simon McVittie [Tue, 1 Dec 2015 21:36:02 +0000 (21:36 +0000)]
1.10.7

8 years ago1.10.6 dbus-1.10.6
Simon McVittie [Tue, 1 Dec 2015 18:19:17 +0000 (18:19 +0000)]
1.10.6

8 years agoDo not attempt to call child_setup on Windows
Simon McVittie [Thu, 26 Nov 2015 10:37:48 +0000 (10:37 +0000)]
Do not attempt to call child_setup on Windows

child_setup() is defined to be called after fork() and before exec(),
but Windows' process model does not have fork(): the equivalent of
those two operations is a single CreateProcess() call. This means
that there is no point at which we could call child_setup() and
have it affect only the child's process-global state. At the point
where it is currently executed, it affects the parent's process-global
state instead, which would be actively harmful if we used any
child_setup() function that was not a no-op on Windows.

The equivalent function in GLib, g_spawn_async_with_pipes(), documents
child_setup() as unused on Windows. Do the same here.

In practice, our only use of child_setup() outside tests
is #ifdef DBUS_UNIX anyway, so this change has no practical effect
right now.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85857
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoWorkaround with infinite loop while walking along the stack frames on wine64.
Ralf Habacker [Tue, 17 Nov 2015 15:42:40 +0000 (16:42 +0100)]
Workaround with infinite loop while walking along the stack frames on wine64.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoAdd x86_64 support to backtrace generator on windows.
Ralf Habacker [Tue, 17 Nov 2015 15:26:24 +0000 (16:26 +0100)]
Add x86_64 support to backtrace generator on windows.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoRefactor windows backtrace generator to link directly to dbghelp shared library.
Ralf Habacker [Tue, 17 Nov 2015 15:05:14 +0000 (16:05 +0100)]
Refactor windows backtrace generator to link directly to dbghelp shared library.

Also use SymFromAddr() instead of deprecated SymGetSymFromAddr()
as suggested on MSDN; fix some indention issues.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoAdd file and line support to backtrace generator on windows.
Ralf Habacker [Mon, 16 Nov 2015 19:16:53 +0000 (20:16 +0100)]
Add file and line support to backtrace generator on windows.

Remaining issues are fixed in the next commit.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 1 of '_mbsrchr' differ in signednes...
Ralf Habacker [Mon, 23 Nov 2015 23:15:11 +0000 (00:15 +0100)]
Fix warning: "pointer targets in passing argument 1 of '_mbsrchr' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 3 of 'CryptGenRandom' differ in...
Ralf Habacker [Mon, 23 Nov 2015 23:13:47 +0000 (00:13 +0100)]
Fix warning: "pointer targets in passing argument 3 of 'CryptGenRandom' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 2 of '_dbus_unpack_uint32' differ...
Ralf Habacker [Mon, 23 Nov 2015 17:47:35 +0000 (18:47 +0100)]
Fix warning: "pointer targets in passing argument 2 of '_dbus_unpack_uint32' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in assignment differ in signedness [-Wpointer-sign]".
Ralf Habacker [Tue, 24 Nov 2015 11:07:38 +0000 (12:07 +0100)]
Fix warning: "pointer targets in assignment differ in signedness [-Wpointer-sign]".

The warnings are fixed by adding functions to dbus string name
space returning unsigned char pointer, which avoids the need to
use casts.

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoNEWS for 1.11
Simon McVittie [Mon, 23 Nov 2015 21:30:29 +0000 (21:30 +0000)]
NEWS for 1.11

8 years agoMerge branch 'dbus-1.10'
Simon McVittie [Mon, 23 Nov 2015 21:30:21 +0000 (21:30 +0000)]
Merge branch 'dbus-1.10'

8 years agoNEWS for 1.10 branch
Simon McVittie [Mon, 23 Nov 2015 21:10:09 +0000 (21:10 +0000)]
NEWS for 1.10 branch

8 years agouid-permissions test: don't assert that root can UpdateActivationEnvironment
Simon McVittie [Fri, 20 Nov 2015 17:19:51 +0000 (17:19 +0000)]
uid-permissions test: don't assert that root can UpdateActivationEnvironment

Since 1.10.4 this is hard-coded to be disallowed when an activation
helper is used. That would be a security flaw waiting to happen,
and makes little sense anyway, because the activation helper sanitises
its environment.

Use BecomeMonitor() instead, as our way to assert that root and
messagebus are privileged.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93036
Reviewed-by: Iain Lane
8 years agoFix warning: "pointer targets in passing argument 2 of '_dbus_string_append_len'...
Ralf Habacker [Sun, 22 Nov 2015 19:53:49 +0000 (20:53 +0100)]
Fix warning: "pointer targets in passing argument 2 of '_dbus_string_append_len' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 1 of '_dbus_verbose_bytes' differ...
Ralf Habacker [Sun, 22 Nov 2015 19:56:57 +0000 (20:56 +0100)]
Fix warning: "pointer targets in passing argument 1 of '_dbus_verbose_bytes' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 1 of 'check_sha_binary' differ...
Ralf Habacker [Sun, 22 Nov 2015 19:54:18 +0000 (20:54 +0100)]
Fix warning: "pointer targets in passing argument 1 of 'check_sha_binary' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 3 of 'pack_[248]_octets' differ...
Ralf Habacker [Sun, 22 Nov 2015 19:52:57 +0000 (20:52 +0100)]
Fix warning: "pointer targets in passing argument 3 of 'pack_[248]_octets' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 3 of 'dbus_connection_get_adt_audit...
Ralf Habacker [Sun, 22 Nov 2015 19:51:32 +0000 (20:51 +0100)]
Fix warning: "pointer targets in passing argument 3 of 'dbus_connection_get_adt_audit_session_data' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 4 of 'marshal_len_followed_by_bytes...
Ralf Habacker [Sun, 22 Nov 2015 19:56:05 +0000 (20:56 +0100)]
Fix warning: "pointer targets in passing argument 4 of 'marshal_len_followed_by_bytes' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 2 of '_dbus_string_init_const_len...
Ralf Habacker [Sun, 22 Nov 2015 18:33:08 +0000 (19:33 +0100)]
Fix warning: "pointer targets in passing argument 2 of '_dbus_string_init_const_len' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix warning: "pointer targets in passing argument 5 of 'byteswap_body_helper' differ...
Ralf Habacker [Sun, 22 Nov 2015 18:32:34 +0000 (19:32 +0100)]
Fix warning: "pointer targets in passing argument 5 of 'byteswap_body_helper' differ in signedness [-Wpointer-sign]".

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix several -Wpointer-sign warnings in test_hex_roundtrip() and related types.
Ralf Habacker [Sun, 22 Nov 2015 15:57:16 +0000 (16:57 +0100)]
Fix several -Wpointer-sign warnings in test_hex_roundtrip() and related types.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agomonitor: use the addressed_recipient to select matches
Simon McVittie [Fri, 6 Nov 2015 14:52:51 +0000 (15:52 +0100)]
monitor: use the addressed_recipient to select matches

This means we respect the destination keyword in arguments to
BecomeMonitor.

In bus_dispatch(), this means that we need to defer capturing until
we have decided whether there is an addressed recipient; so instead
of capturing once, we capture at each leaf of the decision tree.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92074
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Reviewed-by: Lars Uebernickel <lars@uebernic.de>
8 years agoname-test: don't run these tests with autotools if targeting Windows.
Simon McVittie [Tue, 17 Nov 2015 16:42:01 +0000 (16:42 +0000)]
name-test: don't run these tests with autotools if targeting Windows.

The wrapper shell script that sets up their environment is nowhere
near being portable. In particular, it uses dbus-run-session,
which is Unix-specific.

[rh: Add autotools scope in commit title]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Rewieved-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoWindows _dbus_get_autolaunch_address: don't leak shm_name
Simon McVittie [Wed, 18 Nov 2015 22:38:20 +0000 (23:38 +0100)]
Windows _dbus_get_autolaunch_address: don't leak shm_name

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years ago1.10.5
Simon McVittie [Tue, 17 Nov 2015 23:46:34 +0000 (23:46 +0000)]
1.10.5

8 years agodbus 1.10.4
Simon McVittie [Tue, 17 Nov 2015 21:40:36 +0000 (21:40 +0000)]
dbus 1.10.4

8 years agoNEWS
Simon McVittie [Tue, 17 Nov 2015 18:22:37 +0000 (18:22 +0000)]
NEWS

8 years agobus-driver: Support returning org.freedesktop.DBus UID and PID
Jan Alexander Steffens (heftig) [Sat, 14 Nov 2015 15:32:43 +0000 (16:32 +0100)]
bus-driver: Support returning org.freedesktop.DBus UID and PID

Attempting to call SetEnvironment on systemd causes it to inquire
about the caller's connection UID and PID. If this check fails,
the call is rejected.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92857
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[smcv: go back to DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN as the error code
for failure to determine the pid]

8 years agotest/sd-activation: Test UpdateActivationEnvironment forwarding
Jan Alexander Steffens (heftig) [Sat, 14 Nov 2015 15:32:42 +0000 (16:32 +0100)]
test/sd-activation: Test UpdateActivationEnvironment forwarding

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92857
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agobus_driver_handle_update_activation_environment: Forward to systemd
Jan Alexander Steffens (heftig) [Sun, 15 Nov 2015 15:00:33 +0000 (16:00 +0100)]
bus_driver_handle_update_activation_environment: Forward to systemd

If we use systemd activation, forward all UpdateActivationEnvironment
requests to org.freedesktop.systemd1.Manager.SetEnvironment, in order
to ensure variables needed by D-Bus services are available when these
services are launched by systemd.

Since UpdateActivationEnvironment is not available on the system bus,
this only applies to user buses.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92857
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agobus_driver_handle_update_activation_environment: Error on system buses
Jan Alexander Steffens (heftig) [Sat, 14 Nov 2015 15:32:37 +0000 (16:32 +0100)]
bus_driver_handle_update_activation_environment: Error on system buses

The default policy already disallows calls on system buses. Since any
bus with a service helper cleans the environment anyway, there's no
point in allowing this to be called.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92857
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agomanual-backtrace: use proper prototypes, and make functions static
Simon McVittie [Tue, 17 Nov 2015 15:32:43 +0000 (15:32 +0000)]
manual-backtrace: use proper prototypes, and make functions static

Otherwise this will fail to compile with our default Autotools
compiler warnings.

8 years agoMerge branch 'dbus-1.10'
Simon McVittie [Tue, 17 Nov 2015 15:28:50 +0000 (15:28 +0000)]
Merge branch 'dbus-1.10'

8 years agofdpass test: assert that TCP connections don't say they can pass fds
Simon McVittie [Tue, 17 Nov 2015 13:23:30 +0000 (13:23 +0000)]
fdpass test: assert that TCP connections don't say they can pass fds

As well as slightly increasing our test coverage, this ensures
that at least one test-case in this test is not skipped, working
around CMake's lack of support for the Automake-style exit code
produced by GTest executables (they exit 77 if everything was skipped).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92887
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
8 years agoAdd backtrace test app.
Ralf Habacker [Tue, 17 Nov 2015 13:30:54 +0000 (14:30 +0100)]
Add backtrace test app.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoPrint stack index in backtrace generator on Windows.
Ralf Habacker [Mon, 16 Nov 2015 18:58:42 +0000 (19:58 +0100)]
Print stack index in backtrace generator on Windows.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoMerge branch 'dbus-1.10'
Ralf Habacker [Mon, 16 Nov 2015 13:22:23 +0000 (14:22 +0100)]
Merge branch 'dbus-1.10'

8 years agoFix recursive loop in backtrace generator on windows.
Ralf Habacker [Sun, 15 Nov 2015 18:54:03 +0000 (19:54 +0100)]
Fix recursive loop in backtrace generator on windows.

Backtrace generator called _dbus_warn(), which calls
backtrace generator recursively with DBUS_FATAL_WARNINGS=1.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoDo not fail with fatal message skipping GetConnectionUnixProcessID test-bus test...
Ralf Habacker [Fri, 13 Nov 2015 18:48:16 +0000 (19:48 +0100)]
Do not fail with fatal message skipping GetConnectionUnixProcessID test-bus test on windows.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix test-bus test for GetConnectionUnixUser driver method on windows.
Ralf Habacker [Fri, 13 Nov 2015 18:41:43 +0000 (19:41 +0100)]
Fix test-bus test for GetConnectionUnixUser driver method on windows.

Because GetConnectionUnixUser is not supported on windows it fails with
DBUS_ERROR_FAIL.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoshell-test: Calling _dbus_string_init without checking return value (CID 60587).
Ralf Habacker [Tue, 10 Nov 2015 21:18:16 +0000 (22:18 +0100)]
shell-test: Calling _dbus_string_init without checking return value (CID 60587).

Reported by Coverity: CID 60587: Unchecked return value (CHECKED_RETURN)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoSkip launch helper activation tests on windows silently.
Ralf Habacker [Thu, 12 Nov 2015 11:49:46 +0000 (12:49 +0100)]
Skip launch helper activation tests on windows silently.

The system bus is unsupported there and Windows does not
have any concept of setuid binaries, so it can't ever
actually work.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix memory leak in _dbus_win_set_error_from_win_error().
Ralf Habacker [Wed, 11 Nov 2015 14:02:44 +0000 (15:02 +0100)]
Fix memory leak in _dbus_win_set_error_from_win_error().

There is no need to make a local (leaked) copy of the message,
because dbus_set_error() already makes a copy of its parameters.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix memory leaks in bus_activation_service_reload_test() in case of errors.
Ralf Habacker [Wed, 11 Nov 2015 14:02:00 +0000 (15:02 +0100)]
Fix memory leaks in bus_activation_service_reload_test() in case of errors.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoRevert "Fix memory leaks in bus_activation_service_reload_test() in case of errors."
Ralf Habacker [Wed, 11 Nov 2015 14:01:11 +0000 (15:01 +0100)]
Revert "Fix memory leaks in bus_activation_service_reload_test() in case of errors."

This reverts commit d8569ac647da4d62c7a251d8e809f2d545a77837.

8 years agoFix memory leaks in bus_activation_service_reload_test() in case of errors.
Ralf Habacker [Mon, 9 Nov 2015 12:38:59 +0000 (13:38 +0100)]
Fix memory leaks in bus_activation_service_reload_test() in case of errors.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: https://bugs.freedesktop.org/show_bug.cgi?id=92721
8 years agoFix test-bus segfault_service_no_auto_start test on windows.
Ralf Habacker [Mon, 9 Nov 2015 19:38:03 +0000 (20:38 +0100)]
Fix test-bus segfault_service_no_auto_start test on windows.

Windows returns unhandled exceptions from a running child
by specific exit codes and not by signals as on UNIX.

Therefore we use DBUS_ERROR_SPAWN_CHILD_EXITED for propagating
unhandled exceptions to the parent too.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoStop statically enabling dbus.socket in dbus.target
Simon McVittie [Sat, 7 Nov 2015 12:06:52 +0000 (13:06 +0100)]
Stop statically enabling dbus.socket in dbus.target

dbus.target was relevant in early versions of systemd, but is not
used or installed any more. We also enable the socket in sockets.target,
which is the right place to do this sort of thing.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=78412
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757913
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering
8 years agoDrop [Install] sections from user services
Simon McVittie [Sat, 7 Nov 2015 12:03:47 +0000 (13:03 +0100)]
Drop [Install] sections from user services

We install the symlink to enable dbus.socket statically, so it doesn't
make much sense to invoke `systemctl enable` on it; and
dbus.service should normally be started by socket activation
(or possibly an explicit dependency) rather than manually.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92402
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering
8 years agospec: trailing whitespace clean-up
Lennart Poettering [Tue, 25 Aug 2015 17:44:51 +0000 (19:44 +0200)]
spec: trailing whitespace clean-up

It's generally a good idea to avoid trailing whitespace in order to keep
patchs minimal. While it's common to enforce such restrictions for C code,
it's important for docbok XML files too. Hence, let's clean this up and
remove all trailing whitespace currently in place.

[By policy we do not clean up historical trailing whitespace and
tab-indentation in the C source code unless we are modifying those lines
anyway, to retain the ability to merge stable-branch bugfixes into the
development branch. However, the copy of the spec in the development
branch is the only one that receives any updates, so that concern
doesn't apply here. -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=91755

8 years agoMerge remote-tracking branch 'origin/master'
Simon McVittie [Fri, 6 Nov 2015 17:36:00 +0000 (18:36 +0100)]
Merge remote-tracking branch 'origin/master'

8 years agoUpdate NEWS (and pending spec version)
Simon McVittie [Fri, 6 Nov 2015 17:34:46 +0000 (18:34 +0100)]
Update NEWS (and pending spec version)

8 years agoDisallow unexpected replies
Lars Uebernickel [Mon, 2 Nov 2015 14:47:39 +0000 (15:47 +0100)]
Disallow unexpected replies

Allowing to send replies when NO_REPLY_EXPECTED is set is useless in
practice: Clients need to be careful not to send these replies, because
bus policy could deny these messages. The spec even mentions that this
issue exists.

To make this more clear and misbehaving clients less likely, disallow
sending unexpected replies entirely.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75749
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoMerge branch 'dbus-1.10'
Simon McVittie [Fri, 6 Nov 2015 17:27:45 +0000 (18:27 +0100)]
Merge branch 'dbus-1.10'

8 years agoupdate NEWS
Simon McVittie [Fri, 6 Nov 2015 17:26:40 +0000 (18:26 +0100)]
update NEWS

8 years agoMerge branch 'dbus-1.10'
Ralf Habacker [Fri, 6 Nov 2015 16:56:56 +0000 (17:56 +0100)]
Merge branch 'dbus-1.10'

8 years agoFix test cases running client and server dispatch design issue.
Ralf Habacker [Fri, 6 Nov 2015 13:03:23 +0000 (14:03 +0100)]
Fix test cases running client and server dispatch design issue.

DBus test cases running the server *and* client loop in the same
process assumed that all messages send from the server has to be
received in one client dispatch, which is not the case in all
environments.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoFix bug unrefing connection too early in check_hello_message().
Ralf Habacker [Fri, 6 Nov 2015 13:02:29 +0000 (14:02 +0100)]
Fix bug unrefing connection too early in check_hello_message().

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoMerge branch 'dbus-1.10'
Simon McVittie [Fri, 6 Nov 2015 11:12:55 +0000 (12:12 +0100)]
Merge branch 'dbus-1.10'

8 years agoCompile fix on Windows.
Ralf Habacker [Wed, 4 Nov 2015 13:21:20 +0000 (14:21 +0100)]
Compile fix on Windows.

This commit fixes a regression introduced with commit 04b8a7a772cfa9ae8ea6ce452d1fb7f23e25fd3f.

8 years agoFix warning: variable 'ret' set but not used [-Wunused-but-set-variable].
Ralf Habacker [Mon, 2 Nov 2015 20:56:32 +0000 (21:56 +0100)]
Fix warning: variable 'ret' set but not used [-Wunused-but-set-variable].

Only set valid child status in case exit code has been gotten from
child process, otherwise signal failure through thread return value.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
8 years agoTest system bus config files on Unix only
Ralf Habacker [Mon, 2 Nov 2015 23:23:56 +0000 (00:23 +0100)]
Test system bus config files on Unix only

Previously, we didn't consistently test parsing of every file in
valid-config-files-system/ everywhere that we tested valid-config-files/.
We now test it on Unix.

The system bus is not supported on Windows, so we do not test
valid-config-files-system/ there.

valid-config-files/many-rules.conf contains <user> and <group> rules
which are not applicable to Windows. Copy the original many-rules.conf
to valid-config-files-system/ so that it will be tested on Unix, and
remove the non-portable rules from valid-config-files/many-rules.conf.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[rh:base patch came from Simon]

8 years agoDon't use _dbus_warn() for intentionally-skipped tests
Simon McVittie [Mon, 2 Nov 2015 18:19:02 +0000 (18:19 +0000)]
Don't use _dbus_warn() for intentionally-skipped tests

The tests are run with _dbus_warn() fatal, so if a particular test is
not applicable on the current platform, we shouldn't call it.

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