Simon McVittie [Wed, 30 Apr 2014 19:58:39 +0000 (20:58 +0100)]
development version
Simon McVittie [Wed, 30 Apr 2014 19:14:51 +0000 (20:14 +0100)]
1.8.2
Руслан Ижбулатов [Sat, 8 Mar 2014 04:18:43 +0000 (04:18 +0000)]
Handle 0x0d0a EOLs in spawn_dbus_daemon()
On W32 dbus daemon will print output in text mode, with 0x0d0a EOLs instead
of just 0x0a. Be able to handle that.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75863
Reviewed-by: Simon McVittie
Simon McVittie [Wed, 30 Apr 2014 18:21:47 +0000 (19:21 +0100)]
NEWS
Роман Донченко [Wed, 30 Apr 2014 18:11:56 +0000 (19:11 +0100)]
Avoid killing all available processes if an X error arrives early on
The timeline of events in dbus-launch's main process goes something like this:
* do initial X calls
[1]
* do some other stuff
* fork
(child process starts doing some other stuff)
* return "intermediate parent" pid from fork()
* obtain bus daemon pid from bus_pid_to_launcher_pipe
[2]
* do things that might include X11 calls or killing the dbus-daemon
Meanwhile, the "babysitter" child goes like this:
* return 0 from fork()
[3]
* obtain bus daemon pid from parent process via bus_pid_to_babysitter_pipe
[4]
* do things that might include X11 calls or killing the bus daemon
Before [1] or [3], the right thing to do about an X error is to just
exit. The current implementation called kill(-1) first, which is
undesirable: it kills unrelated processes. With this change, we
just exit.
After [2] or [4], the right thing to do is to kill the dbus-daemon,
and that's what the existing code did.
Between [1] and [2], or between [3] and [4], there is no correct thing
that we can do immediately: we would have to wait for the end of the
"critical section", *then* kill the dbus-daemon. This has not yet been
implemented, so this patch relies for its correctness on the fact that
there are no libX11 calls between those points, so we cannot receive
an X error between them.
dbus-launch deserves more comments, or a reimplementation that is easier to
understand, but this change is certainly better than nothing.
[Commit message added, summarizing reviewers' comments -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74698
Reviewed-by: Simon McVittie
Reviewed-by: Thiago Macieira
Simon McVittie [Mon, 28 Apr 2014 14:45:22 +0000 (15:45 +0100)]
NEWS for 1.8
Cameron Norman [Mon, 28 Apr 2014 14:42:11 +0000 (15:42 +0100)]
Add "Documentation=man:dbus-daemon(1)" line to systemd service
Enhances usability under systemd by making the documentation available
with systemctl status or systemctl help.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77447
Reviewed-by: Simon McVittie
Simon McVittie [Fri, 25 Apr 2014 17:51:26 +0000 (18:51 +0100)]
Try to read /etc/machine-id before inventing a new /var/lib/dbus/machine-id
It's least confusing if the two files have the same contents. systemd
already knows how to pick up our /var/lib/dbus/machine-id if it exists
and /etc/machine-id doesn't, but the converse is not currently true.
We should make it true, so that it doesn't matter what order
systemd-machine-id-setup and "dbus-uuidgen --ensure" were
invoked in.
In Debian, systemd currently Recommends dbus, so "dbus-uuidgen --ensure"
will *usually* - but not always! - run first, and the two files will
match. However, if you install systemd without dbus, and then install
dbus later, there will be a mismatch. With this change, it doesn't
matter which one is installed first: whichever one happens to come
first, it will generate the machine ID, and then the other one will
copy it.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77941
Reviewed-by: Lennart Poettering
Simon McVittie [Fri, 25 Apr 2014 17:30:19 +0000 (18:30 +0100)]
_dbus_write_uuid_file: factor out function to write a known UUID
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77941
Reviewed-by: Lennart Poettering
David Zeuthen [Thu, 20 Feb 2014 23:42:13 +0000 (15:42 -0800)]
Update email-address for David Zeuthen.
I no longer have the email address davidz@redhat.com so update it to
my current address.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75288
Lukasz Skalski [Thu, 6 Mar 2014 11:39:20 +0000 (12:39 +0100)]
Update .gitignore files
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75833
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 3 Mar 2014 15:44:44 +0000 (15:44 +0000)]
NEWS for dbus-1.8
Cristian Onet [Mon, 27 Jan 2014 10:58:37 +0000 (11:58 +0100)]
Fix of 'dbus-daemon can only handle 64 simultaneous connections on Windows'.
[Slightly modified by -rh]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71297
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Tue, 14 Jan 2014 19:12:36 +0000 (20:12 +0100)]
Give cmake users some hints/requirements when cross compiling for Windows on Linux.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 20 Jan 2014 16:11:58 +0000 (16:11 +0000)]
1.8.1
Simon McVittie [Mon, 20 Jan 2014 14:25:48 +0000 (14:25 +0000)]
D-Bus 1.8.0
Simon McVittie [Mon, 20 Jan 2014 13:40:30 +0000 (13:40 +0000)]
Revert "start spec 0.24"
It hasn't otherwise changed since 1.7.10.
This reverts commit
fb16f80d457a66610f615b44158330bf7ba68697.
Ralf Habacker [Fri, 10 Jan 2014 01:20:10 +0000 (02:20 +0100)]
Let cmake 'make check' run test applications as test group.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Tue, 14 Jan 2014 17:52:22 +0000 (18:52 +0100)]
Rename bus-test-launch-helper to test-bus-launch_helper to match common test application naming scheme.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Tue, 14 Jan 2014 17:45:39 +0000 (18:45 +0100)]
Rename bus-test-system to test-bus-system to match common test application naming scheme.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Mon, 13 Jan 2014 19:45:37 +0000 (20:45 +0100)]
Rename bus-test to test-bus to match common test application naming scheme.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Sat, 11 Jan 2014 09:07:21 +0000 (10:07 +0100)]
Rename spawn-test to test-spawn to match common test application naming scheme.
[Same change as for shell-test in the previous commit. -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Fri, 10 Jan 2014 01:17:22 +0000 (02:17 +0100)]
Rename shell-test to test-shell to match common test application naming scheme.
[Add its source file to SOURCES: this test was previously relying on the
Automake feature that the default value of foo_bar_SOURCES is foo-bar.c. -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Sat, 11 Jan 2014 19:51:27 +0000 (20:51 +0100)]
Rename dbus-test to test-dbus to match common test application naming scheme.
[reverted the dbus-specification part -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Fri, 17 Jan 2014 15:58:43 +0000 (15:58 +0000)]
Correct test for LIBTOOLIZE by quoting it
Based on a patch from Roland <blueburn85 gmail com>.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73278
Ralf Habacker [Tue, 14 Jan 2014 19:58:28 +0000 (20:58 +0100)]
CMake warning--.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Tue, 14 Jan 2014 11:07:39 +0000 (11:07 +0000)]
NEWS
Matt Hoosier [Thu, 9 Jan 2014 22:15:31 +0000 (16:15 -0600)]
Don't forget allow_anonymous when merging configs
The algorithm to collapse a subsidiary config file's data into the
master data structure forgot to examine this flag.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73475
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Fri, 10 Jan 2014 13:46:40 +0000 (14:46 +0100)]
Fix compile error on opensuse 12.2 with systemd 44 and glibc-2.15.
The specific systemd/glibc version do not include syslog.h by default.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73455
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Tue, 7 Jan 2014 12:23:10 +0000 (12:23 +0000)]
tests: don't block and wait for a debugger on abort
In general, I think developers running the tests would expect
them to terminate rather than hanging. Developers who want to debug
such an abort by attaching a debugger to a live process can still set
DBUS_BLOCK_ON_ABORT in the environment.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Ralf Habacker [Thu, 10 Oct 2013 21:42:57 +0000 (23:42 +0200)]
Use macros for test and helper executable targets on cmake build system.
The new macros add_test_executables and add helper_executables provides a
platform independent way for specifing dbus test and service applications.
On native Windows and Linux/UNIX systems the test applications are
directly runable.
When cross compiling for Windows on Linux test applications could be
executed on the Linux host system with the help of wine and activated
binfmt_misc support for wine.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Fri, 10 Jan 2014 00:07:28 +0000 (01:07 +0100)]
Add 'check' cmake target to keep in sync with autotools.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Fri, 10 Jan 2014 00:03:44 +0000 (01:03 +0100)]
Fix mentioned files in Building section.
Ralf Habacker [Wed, 8 Jan 2014 01:03:14 +0000 (02:03 +0100)]
Create session.conf and system.conf for test/data/valid-config-files from *.in files on cmake.
We need to patch the listen address.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Wed, 8 Jan 2014 00:45:56 +0000 (01:45 +0100)]
Define TEST_BUS_LAUNCH_BINARY for cmake to keep in sync with autotools.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Thu, 10 Oct 2013 21:42:57 +0000 (23:42 +0200)]
Use cmake build in executable suffix.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Wed, 8 Jan 2014 00:32:58 +0000 (01:32 +0100)]
Remove obsolete cmake project tags in sub directories; we only have one project.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68506
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 2 Sep 2013 15:36:46 +0000 (16:36 +0100)]
test/dbus-daemon, test/dbus-daemon-eavesdrop: allow external dbus-daemon
It's easier to automate these tests if they launch their own
dbus-daemon, but easier to debug them if they don't: you can launch
a dbus-daemon separately, under gdb. However, tests that need a
specially-configured dbus-daemon will have to be skipped.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Ralf Habacker [Sat, 24 Aug 2013 13:00:14 +0000 (15:00 +0200)]
Add glib support to cmake buildsystem.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68506
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Tue, 7 Jan 2014 07:13:43 +0000 (08:13 +0100)]
MSVC compile fix.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73345
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Mon, 6 Jan 2014 22:30:55 +0000 (23:30 +0100)]
Use dbus provided version of va_copy().
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72840
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Fri, 11 Oct 2013 22:59:22 +0000 (00:59 +0200)]
Skip unix only syslog test.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 6 Jan 2014 20:17:11 +0000 (20:17 +0000)]
start spec 0.24
Simon McVittie [Mon, 6 Jan 2014 20:17:05 +0000 (20:17 +0000)]
start 1.7.11
Simon McVittie [Mon, 6 Jan 2014 18:40:26 +0000 (18:40 +0000)]
1.7.10
Chengwei Yang [Wed, 20 Nov 2013 03:30:59 +0000 (11:30 +0800)]
Do not install systemd unit files if build without systemd
If dbus buid without systemd (--disable-systemd or no systemd libs
available when building), we expect not to install dbus systemd unit
files because they're only for systemd environment.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71818
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 6 Jan 2014 16:30:34 +0000 (16:30 +0000)]
Merge remote-tracking branch 'origin/master'
Matt Fischer [Fri, 8 Nov 2013 22:08:39 +0000 (16:08 -0600)]
Define WIN32_LEAN_AND_MEAN in Windows port
<windows.h> somewhat cloyingly attempts to include <winsock.h>
by default, which causes problems if the rest of the program
is trying to use the incompatible <winsock2.h>. The Windows
sysdep header attempts to prevent this by forcibly defining
the winsock header guard macro, so that it will not be included.
However, this does not work on MinGW because it uses a different
guard macro name.
This patch changes the code to instead define WIN32_LEAN_AND_MEAN,
which is a more portable way to ensure that <winsock.h> will not
be included.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71405
Reviewed-By: Ralf Habacker <ralf.habacker@freenet.de>
Chengwei Yang [Tue, 10 Dec 2013 02:06:23 +0000 (10:06 +0800)]
dbus-daemon(1): align document about "bind" with DBus Spec
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72301
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Tue, 10 Dec 2013 02:02:27 +0000 (10:02 +0800)]
DBus Spec: add document of bind for tcp/nonce-tcp transport
tcp/nonce-tcp transport has a "bind" key, which can be specified a
hostname and will override hostname specified in "host" key.
"bind" has a special value "*" which means ip address 0.0.0.0 and will
cause dbus-daemon listen on all interfaces.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72301
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Fri, 6 Dec 2013 03:15:12 +0000 (11:15 +0800)]
DBus Spec: replace tab with 8 spaces
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72301
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Fri, 6 Dec 2013 02:53:28 +0000 (10:53 +0800)]
Ensure DBusError is set if _dbus_read_nonce() fail
In _dbus_send_nonce() which call in _dbus_read_nonce() and assert on an
error is set if _dbus_read_nonce() fail. However, in _dbus_read_nonce(),
it may fail on fopen() and left error is unset. This will crash us if
assertions hasn't been disabled.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72298
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Mon, 2 Dec 2013 04:47:47 +0000 (12:47 +0800)]
kqueue: open watched directories with close-on-exec flag
[FreeBSD and OpenBSD contributors clarified that O_CLOEXEC has been
supported for ~ 2 years on both, so for the moment we're assuming
that every platform with kqueue also has working O_CLOEXEC. Please reopen
the bug, with a tested patch that uses _dbus_fd_set_close_on_exec() instead,
if this assumption turns out to be false. -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72213
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Thu, 28 Nov 2013 01:17:38 +0000 (09:17 +0800)]
BusTransaction: remove confusing getter of connections
There is a DBusList* member of BusTransaction named "connections", while
its getter function bus_transaction_get_connections() returns
context->connections which in fact is a BusConnections pointer, this is
quite confusing. Because this is what bus_context_get_connections()
returns.
This patch call out to bus_context_get_connections() directly and remove
the then unused bus_transaction_get_connections().
https://bugs.freedesktop.org/show_bug.cgi?id=71597
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Mon, 11 Nov 2013 09:52:26 +0000 (17:52 +0800)]
_dbus_auth_return_buffer(): remove unused argument
The argument bytes_read of _dbus_auth_return_buffer() function isn't
used at all, so remove it.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71477
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Fri, 1 Nov 2013 13:51:13 +0000 (13:51 +0000)]
_dbus_listen_unix_socket: don't try to set SO_REUSEADDR
On Hurd, the setsockopt() fails. Svante Signell confirmed that on
at least Linux and kFreeBSD, SO_REUSEADDR "succeeds" on Unix sockets,
but doesn't have any practical effect; so rather than making the
failure not issue a warning, we might as well not bother with the
syscall at all.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69492
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 6 Jan 2014 15:55:35 +0000 (15:55 +0000)]
_dbus_read_credentials_socket: look at all cmsg headers, not just the first
If there are no cmsg headers, don't fail: this fixes receiving credentials
on TCP sockets under at least GNU/kFreeBSD, and probably FreeBSD too.
If there's more than one cmsg header, ignore any that don't look like
valid SCM_CREDS.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69492
Tested-by: Svante Signell
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
[added break, altered indentation in response to review -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Wed, 18 Sep 2013 16:51:53 +0000 (17:51 +0100)]
If sendmsg() with SCM_CREDS fails with EINVAL, retry with send()
Perhaps some OSs accept and ignore attempts to send a SCM_CREDS
message on a non-Unix socket, but GNU/kFreeBSD doesn't (and presumably
FreeBSD doesn't either).
Based on a patch by Svante Signell.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69492
Tested-by: Svante Signell
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Chengwei Yang [Tue, 3 Dec 2013 12:47:54 +0000 (20:47 +0800)]
Fix memory leak for kqueue: shutdown kqueue correctly
There are memory blocks leak when doing bus-test, both dispatch-sha1 and
dispatch test cases complain memory blocks leak.
This patch also fix fd leaks.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69332
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Sun, 1 Dec 2013 11:40:21 +0000 (19:40 +0800)]
kqueue: replace tab with space
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69332
[altered commit message to not say it fixes memory leaks -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Tue, 19 Feb 2013 16:39:38 +0000 (16:39 +0000)]
Make sure tests run with a temporary XDG_RUNTIME_DIR
We don't want the regression tests' "session" getting mixed up in
system-wide "sessions". This doesn't actually matter yet, but it is
likely to matter in future.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61301
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
[merged with earlier line-wrapping of TESTS_ENVIRONMENT -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Tue, 10 Dec 2013 09:11:25 +0000 (17:11 +0800)]
Reload policy rules for completed connections
The message bus which can monitor its conf dirs for changes and reload
confs immediately if dir monitor enabled, for example, inotify in Linux,
kqueue in *BSD.
However, it doesn't apply policy rules change for completed connections,
so to apply policy rules change, the client connection has to disconnect
first and then re-connect to message bus.
For imcomplete connections, it always has the latest review of policy
rules.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39463
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Tue, 19 Feb 2013 15:40:06 +0000 (15:40 +0000)]
_dbus_check_dir_is_private_to_user: check that we own it
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61303
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Tue, 19 Feb 2013 13:45:50 +0000 (13:45 +0000)]
specification: discuss "listenable" and "connectable" addresses
The --with-dbus-session-bus-connect-address configure option and the
DBUS_SESSION_BUS_CONNECT_ADDRESS CMake variable expect a connectable
address, while the --with-dbus-session-bus-listen-address option and
the DBUS_SESSION_BUS_LISTEN_ADDRESS variable expect a listenable address.
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS currently has to be an address that
is simultaneously listenable and connectable.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61303
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
[fixed name of DBUS_SESSION_BUS_CONNECT_ADDRESS as per review -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Wed, 27 Nov 2013 16:40:22 +0000 (16:40 +0000)]
NEWS
Chengwei Yang [Tue, 2 Jul 2013 01:28:02 +0000 (09:28 +0800)]
cmake: update README.cmake a bit
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66453
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Chengwei Yang [Tue, 2 Jul 2013 01:27:48 +0000 (09:27 +0800)]
cmake: fix code style
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66453
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Chengwei Yang [Wed, 20 Nov 2013 14:25:52 +0000 (22:25 +0800)]
_dbus_append_address_from_socket(): escape value got from socket fd
So far, this bug can be triggered in systemd environment, if the
configured ListenStream for dbus.socket has characters must be escaped
first. Then we'll get an error like
"In D-Bus address, character '%c' should have been escaped\n"
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46013
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 16 Sep 2013 13:17:25 +0000 (14:17 +0100)]
spec: explicitly mention filtering messages with no INTERFACE
This is an important security measure. Without it, the system bus
would not deliver its intended security properties. The actual
implementation has always behaved like this, I think.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68597
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Simon McVittie [Mon, 16 Sep 2013 13:16:13 +0000 (14:16 +0100)]
Do not require messages without INTERFACE to be dispatched
Previously, if we have interfaces:
interface com.example.foo:
method Ambiguous()
interface com.example.bar:
method Ambiguous()
method Unambiguous()
implementations were required to deliver a message with no INTERFACE
and METHOD=Unambiguous to "bar". A message with no INTERFACE and
METHOD=Ambiguous could either be delivered to "foo", delivered to "bar"
or treated as an error.
Relax this to allow an error for the unambiguous case, too, and
strongly recommend specifying the interface (which is best-practice).
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68597
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Vaguely-acked-by: Thiago Macieira, David Zeuthen
[and desrt objected that it didn't go far enough]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Robert Ancell [Fri, 18 Oct 2013 00:46:45 +0000 (13:46 +1300)]
Support printing unix file descriptors in dbus-send/dbus-monitor
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=70592
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Mon, 25 Nov 2013 12:53:44 +0000 (20:53 +0800)]
Remove duplicate checking for pkg-config
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71985
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Tue, 19 Nov 2013 10:13:01 +0000 (18:13 +0800)]
Fix api doc for _dbus_spawn_async_with_babysitter
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71820
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Fri, 15 Nov 2013 01:20:31 +0000 (09:20 +0800)]
Fix dbus_shutdown API document: returns --> frees
https://bugs.freedesktop.org/show_bug.cgi?id=71627
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Matt Fischer [Fri, 8 Nov 2013 00:00:46 +0000 (18:00 -0600)]
Fix for MinGW build
dbus-sysdeps-win.c makes use of a constant called
PROCESS_QUERY_LIMITED_INFORMATION, which was added after Windows
XP. There is code present to make sure the constant is not used
when running on an XP system, but the constant is still required
at build time. Unfortunately, the Windows headers provided by
MinGW are old enough that they do not contain this constant, so
building with MinGW fails.
This patch adds a definition for the constant if one is not already
present.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71366
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[altered comment to specify MinGW32 < 4, since mingw-w64
and MinGW 4.0+ do have this constant -smcv]
Simon McVittie [Tue, 12 Nov 2013 10:55:43 +0000 (10:55 +0000)]
Merge branch 'dbus-1.6'
Simon McVittie [Tue, 12 Nov 2013 10:51:17 +0000 (10:51 +0000)]
NEWS for the SELinux change
Simon McVittie [Tue, 12 Nov 2013 10:47:55 +0000 (10:47 +0000)]
NEWS
Radoslaw Pajak [Fri, 8 Nov 2013 12:51:32 +0000 (13:51 +0100)]
fixed memory freeing if error during listing services
Signed-off-by: Radoslaw Pajak <r.pajak@samsung.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71526
osmond sun [Tue, 5 Nov 2013 16:53:18 +0000 (00:53 +0800)]
selinux: Use selinux_set_mapping() to avoid hardcoded constants for policy
Previous to the introduction of selinux_set_mapping(), DBus pulled
constants generated from the system's policy at build time. But this
means it's impossible to replace the system policy without rebuilding
userspace components.
This patch maps from arbitrary class/perm indices used by D-Bus and
the policy values and handles all the translation at runtime on
avc_has_perm() calls.
Bug: https://bugs.freedesktop.org/attachment.cgi?id=88719
Reviewed-By: Colin Walters <walters@verbum.org>
Tested-By: Colin Walters <walters@verbum.org>
Simon McVittie [Mon, 4 Nov 2013 12:00:24 +0000 (12:00 +0000)]
Merge branch 'dbus-1.6'
Conflicts:
NEWS
Simon McVittie [Mon, 4 Nov 2013 11:44:34 +0000 (11:44 +0000)]
NEWS
DreamNik [Sun, 29 Sep 2013 10:45:58 +0000 (14:45 +0400)]
make_and_run_test_nodes: avoid undefined behaviour
In code that looks like n[i] = v(&i), where v increments i, C leaves it
undefined whether the old or new value of i is used to locate n[i].
As it happens, gcc used the pre-increment value of i, but MSVC
used the post-increment value.
Fix this by inserting a sequence point to disambiguate the intended order.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69924
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[wrote commit message, fixed whitespace -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Fri, 1 Nov 2013 20:17:52 +0000 (20:17 +0000)]
start on 1.7.10
Simon McVittie [Thu, 10 Oct 2013 12:14:01 +0000 (13:14 +0100)]
start dbus-specification 0.23
Simon McVittie [Fri, 1 Nov 2013 19:17:02 +0000 (19:17 +0000)]
1.7.8
Colin Walters [Sun, 27 Oct 2013 20:21:19 +0000 (16:21 -0400)]
bus/selinux: Fix previous commit for CAP_AUDIT_WRITE retention
As soon as capng_clear() is called, we won't appear to have
CAP_AUDIT_WRITE. Fix this by checking for it before resetting the
libcap state.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49062
Tested-by: Laurent Bigonville <bigon@debian.org>
Reviewed-by: Laurent Bigonville <bigon@debian.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
Simon McVittie [Fri, 1 Nov 2013 18:49:48 +0000 (18:49 +0000)]
Revert "start dbus-specification 0.23"
This reverts commit
c8bc5f24b721bc03679c44669cf5e655c1e99b5f.
Nothing changed since 0.22.
Simon McVittie [Fri, 1 Nov 2013 18:49:13 +0000 (18:49 +0000)]
Merge branch 'dbus-1.6'
Conflicts:
NEWS
configure.ac
Simon McVittie [Fri, 1 Nov 2013 18:44:21 +0000 (18:44 +0000)]
Start on 1.6.20
Simon McVittie [Fri, 1 Nov 2013 16:24:22 +0000 (16:24 +0000)]
1.6.18
Chengwei Yang [Tue, 15 Oct 2013 05:23:09 +0000 (13:23 +0800)]
Close unused inherited file descriptor
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68559
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Fri, 1 Nov 2013 12:43:07 +0000 (12:43 +0000)]
Add comments describing how "compile with journald, run without" works
Chengwei Yang [Tue, 15 Oct 2013 05:27:51 +0000 (13:27 +0800)]
Handle activated child stdout/stderr correctly in systemd environment
In systemd environment, dbus-daemon will run as no-fork mode since this
is the recommended practice of systemd.
In that scenario, child activated by dbus-daemon will inherit
dbus-daemon standard streams, includes stdin/stdout/stderr. stdin will
be redirected to /dev/null by systemd and stdout/stderr will be catched
by systemd log subsystem. Since the child inherit stdout/stderr from
dbus-daemon, so from systemd journal log, the child log output will be
identified with dbus-daemon identifier. So it's a little confusing.
This patch redirects the child stdout/stderr to systemd journal stream,
and with its owned service name as identifier. However, thing not fixed
perfectly due to the socket ucred of the child is owned by dbus-daemon,
so the pid isn't the real pid of the chile.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68559
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Tue, 15 Oct 2013 05:04:53 +0000 (13:04 +0800)]
DBusBabysitter: change executable to log_name
DBusBabysitter->executable is defined as executable name to use in error
messages. However, if servicehelper used, then the executable name is
servicehelper. It's not much help because we couldn't figure out which
service we're trying to activated if error happens.
In the following patch, we'll use service name to be activated as the
child log identifier and add a parameter to
_dbus_spawn_async_with_babysitter() to pass the log identifier. Since
this is not the case in test, so executable changed to log_name.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68559
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Fri, 13 Sep 2013 12:37:56 +0000 (20:37 +0800)]
Update configurable elements for dbus-daemon manual
Update three configurable elements for dbus-daemon manual, <syslog>,
<pidfile> and <allow_anonymous>, all of them are undocumented so far.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69125
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Wed, 9 Oct 2013 01:39:43 +0000 (09:39 +0800)]
Remove unnecessary dbus_setenv()
DBUS_ACTIVATION_ADDRESS changed to DBUS_STARTER_ADDRESS and
DBUS_ACTIVATION_BUS_TYPE changed to DBUS_STARTER_BUS_TYPE since 2005 by
this commit - 8873c90
So the dbus_setenv() which used to unset the above two wrong environment
variables has no effect in fact. And giving that setenv(3) and putenv(3)
are not threadsafe, so it's better to remove them.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68308
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Acked-by: Colin Walters <walters@verbum.org>
Simon McVittie [Wed, 28 Nov 2012 17:11:38 +0000 (17:11 +0000)]
transaction_free: factor out
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60859
Reviewed-by: Chengwei Yang
[removed unused variable based on review -smcv]
Simon McVittie [Fri, 1 Nov 2013 11:43:57 +0000 (11:43 +0000)]
dbus-spawn: draw a diagram
There are enough pipes, fds and processes here that it's important to
keep track of them.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60859
Chengwei Yang [Fri, 1 Nov 2013 08:23:27 +0000 (16:23 +0800)]
Use SIGHUP without check in UNIX environment
As Simon's comment
https://bugs.freedesktop.org/show_bug.cgi?id=66068#c8
we can do this in UNIX environment.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>