Commit graph

3777 commits

Author SHA1 Message Date
Simon McVittie
bb024108b2 start 1.7.8 2013-10-09 18:47:14 +01:00
Simon McVittie
9e4f0bf0e1 D-Bus 1.7.6, spec 0.22 2013-10-09 11:34:14 +01:00
Simon McVittie
dc4d60d4a8 yet more NEWS 2013-10-09 11:27:55 +01:00
Chengwei Yang
faaa092f20 dbus-monitor: keep backwards compatibility
eavesdropping as a match rule key introduced in DBus 1.5.6, and the
privous implementation doesn't keep backwards compatibility with older
dbus-daemon.

And the reference dbus-daemon implementation just fail if unknwon key
found in match rule, this is undefined hehavior in DBus Sepcification.

Also there is a feature request for change this hehavior to
"ignore unknown key in match rule", See
https://bugs.freedesktop.org/show_bug.cgi?id=66114

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66107
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-09 11:26:46 +01:00
Andrey Mazo
b994830c7f dbus-send: replace --address with --peer and --bus.
--peer is a direct substitute for --address.
With --bus dbus-send registers on bus given by ADDRESS, thus allowing
messages to be sent to the bus.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48816
[adjusted to apply to current master -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-09 11:18:20 +01:00
Simon McVittie
39673b945c Revert "dbus-send: replace --address"... to fix attribution
This reverts commit 5b74af796c.
2013-10-09 11:17:20 +01:00
Chengwei Yang
d842e6edd1 Remove unused key-word of DBus .service file
Key-word "Group" of DBus .service file hasn't been used since it was
introduced in 2007, so it's fine to remove it.

https://bugs.freedesktop.org/show_bug.cgi?id=19158
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-09 10:53:38 +01:00
Chengwei Yang
867bdd890f launch-helper: fix error code parsing
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66728
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-09 10:51:39 +01:00
Simon McVittie
76c5deff5c Merge branch 'dbus-1.6'
Conflicts:
	NEWS
	configure.ac
2013-10-08 18:42:12 +01:00
Simon McVittie
a96207da08 1.6.17 2013-10-08 17:33:56 +01:00
Chengwei Yang
cd32cdde0e Spec: document multiple .service files own the same well known name
In current dbus-daemon(1) implement, system .serivce must named after
its owned name, but this is not the case for session .service.

For session service, the result of multiple .service files own the
same well known name is undefined since readdir(3) doesn't return
dirent in a defined sequence.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66608
[added some </para><para> -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08 16:13:39 +01:00
Chengwei Yang
47df159cc5 Unify the way to find dbus-daemon test binary
There are two ways to find the dbus-daemon for testing. The first one is
defined as string at compile stage and the second one is export it from
test environment.

The first way has limitation that after defined, it's static string, so
it's impossible to run installable check. So let's unify to the second
way.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37849
[added missing "}" -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08 16:08:57 +01:00
Simon McVittie
5b74af796c dbus-send: replace --address with --peer and --bus.
--peer is a direct substitute for --address.
With --bus dbus-send registers on bus given by ADDRESS, thus allowing
messages to be sent to the bus.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48816
[adjusted to apply to current master -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08 16:08:33 +01:00
Simon McVittie
2fefabaf64 1.6.14 2013-10-08 13:26:17 +01:00
Chengwei Yang
b430642bc2 fix off by one error message (#13305)
This patch is based on the patch created by John (J5) Palmieri
<johnp@redhat.com> plus to fix array of string assignment.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13305
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08 11:58:45 +01:00
Vasiliy Balyasnyy
ecd4262cbf dbus-message.c: unused variable bytes_read in _dbus_message_loader_get_buffer
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=70218
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08 11:51:27 +01:00
Chengwei Yang
1451f946c1 dbus-monitor: remove redundant match rules
Currently, DBus Specification only consists of four message types, so to
monitor all the types of message, no need to match all of them but just
left it empty is OK.

Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66107
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08 11:15:35 +01:00
Simon McVittie
4b4d0f969b NEWS 2013-10-08 11:06:19 +01:00
Simon McVittie
c2d6824232 spec: briefly describe Name, Exec and User keys
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66608
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08 11:06:19 +01:00
Simon McVittie
be2d249f71 spec: system services' service description files have constrained names
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66608
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08 11:06:19 +01:00
Chengwei Yang
0d15a9035a Do not suggest user the next step after executed autogen.sh
We assume that user/developer who building dbus from source code are
familiar with the standard 'autogen.sh, configure, make, make install'
build process, so print such a notice doesn't make a lot of sense.

In addition, on *BSD platform, the pre-installed 'make' doesn't work at
all since gnu make is required. However, it named to 'gmake' on *BSD
platform. So the notice will makes new comer confused.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65415
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08 11:06:19 +01:00
Simon McVittie
57dc720b9f Add support for configuring --with-valgrind=auto
This is the configuration I'd like to use for the "debug build" of dbus
on Debian - if we use --with-valgrind=yes, we have to hard-code knowledge
of which architectures do and don't have Valgrind in two places instead
of just one.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56925
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08 11:06:19 +01:00
Simon McVittie
f81cd4a18b When using dbus-launch for tests, fail hard if test binary is missing
We want to test the version-under-test, not the system version.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37849
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08 11:06:18 +01:00
Simon McVittie
580ed1c8fb dbus-launch: avoid asprintf(), and die gracefully on out-of-memory
asprintf() is a GNU extension (non-portable).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37849
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08 11:06:18 +01:00
Chengwei Yang
fd5271f839 Fix build on NetBSD 6.1.1 with gcc 4.5.3
There are two build failure on NetBSD 6.1.1 with gcc 4.5.3, the first
one is char to int, warning treated as error. The second one is a mismatch
between format string and arguments.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69842
[adjusted commit message -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08 10:29:20 +01:00
Simon McVittie
d56ca38ef6 NEWS 2013-09-25 13:43:22 +01:00
Chengwei Yang
6f47672f84 Use 'cp' instead of 'cp -av' to fix portable issue
Neither '-a' nor '-v' of 'cp' is available on OpenBSD 5.3, so use 'cp'
instead to fix portable issue.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69789
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-25 13:42:10 +01:00
Chengwei Yang
3984f7d2b6 Use 'chmod' instead of 'chmod -c'
chmod -c is not available on *BSD system, and '-v' is not available on
OpenBSD, so just execute chmod without any option.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35881
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-25 13:41:46 +01:00
Simon McVittie
c91305ff27 NEWS 2013-09-23 11:26:08 +01:00
Simon McVittie
17fcbf4518 _dbus_read_credentials_socket: warn or fail at compile time if no support
On a whitelist of OSs known to have working credentials-passing
(currently FreeBSD, Linux, OpenBSD and NetBSD), it would be a
regression for us to not have credentials-passing, so fail hard.

On other OSs, raise a warning, which is not normally fatal but
will alert developers on those platforms.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340
Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-23 11:24:20 +01:00
Simon McVittie
5212ea55c7 Prefer getpeerucred() over getpeereid() if a platform has both
We want the process ID, and getpeerucred() provides that.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340
Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-23 11:24:18 +01:00
Simon McVittie
5ecbe018a0 bus-test: only expect GetConnectionUnixProcessID to succeed sometimes
On platforms that use getpeereid(), this can't work.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340
Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-23 11:24:14 +01:00
Simon McVittie
1da53c6d4a _dbus_read_credentials_socket: document where we use each mechanism
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340
Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-23 11:24:09 +01:00
Simon McVittie
4d869cf5c2 Remove BSD-style LOCAL_CREDS support
It appears that this regressed back in 2009 (commit 7bf132c7)
and doesn't compile. Also, with patches from Matt Fischer to make
it compile again on QNX, it compiles but doesn't actually work
on NetBSD, which was the platform for which this code was added.
This might be for the reasons described in
<http://julipedia.meroh.net/2006/08/localcreds-socket-credentials.html>.
NetBSD pkgsrc has a large unsubmitted patch to use LOCAL_PEEREID, which
is analogous to Linux/OpenBSD SO_PEERCRED.

So, I think we can safely assume that nobody is relying on this:
either they implement one of our many other supported
credentials-passing mechanisms, or they're patching it locally
anyway.

LOCAL_CREDS is not actually very good - it's awkward to use, and
doesn't provide the pid, only the uid. Of the platforms known to
implement it, QNX and NetBSD both have getpeereid() which provides
just as much information, while FreeBSD and Dragonfly BSD both have
SCM_CREDS which provides the pid too. So, let's just get rid of it.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340
Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-23 11:23:45 +01:00
Simon McVittie
4d32787e99 NEWS 2013-09-16 15:31:22 +01:00
Sviatoslav Chagaev
990fd63f4e Fix an incorrect sizeof.
Fix an incorrect sizeof which leads to allocation of more memory than
actually needed.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69329
[elide redundant "* sizeof (char)" which is 1 by definition -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16 15:31:22 +01:00
Simon McVittie
9577e33c89 Revert "Fix an incorrect sizeof." to fix attribution
This reverts commit 3c1938180b.
2013-09-16 15:31:22 +01:00
Simon McVittie
6dea6c050d fix NEWS mis-merge 2013-09-16 15:31:22 +01:00
Simon McVittie
b47d50623b Remove support for platforms with no 64-bit integer type
This has been a soft requirement since 1.5.0; anyone on such platforms
would have had to configure --without-64-bit, provoking a warning that
instructed them to report a D-Bus bug with details of their platform.
Nobody has done so, so if anyone still lacks a 64-bit integer type,
they're on their own.

(Also, I tried the build with --without-64-bit and it's full of
fatal compiler warnings, so it's not clear that we're actually
losing anything by removing this "feature".)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65429
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-09-16 15:31:02 +01:00
Simon McVittie
a61cfccf31 Merge branch 'dbus-1.6'
Conflicts:
	NEWS
2013-09-16 14:59:01 +01:00
Simon McVittie
3b85dfcf77 NEWS for 1.6.x 2013-09-16 14:58:24 +01:00
Vasiliy Balyasnyy
52b6106a33 dbus-mainloop.c: undeclared variable n_fds if define MAINLOOP_SPEW.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69410
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16 14:55:10 +01:00
Simon McVittie
33d8b3b150 Merge branch 'dbus-1.6' 2013-09-16 13:59:30 +01:00
Vasiliy Balyasnyy
61889c8c11 dbus-sysdeps-unix.c: undeclared ret2 variable if HAVE_WRITEV undefined.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69409
2013-09-16 13:58:31 +01:00
Sviatoslav Chagaev
996b296835 Fix incorrect sizeof in a Valgrind hint macro call.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69326
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16 13:07:41 +01:00
Simon McVittie
96e09732f2 Merge branch 'dbus-1.6' 2013-09-16 12:55:13 +01:00
Sviatoslav Chagaev
01a0bba9f7 Fix a NULL dereference on an error code path.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69327
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16 12:47:27 +01:00
Simon McVittie
3c1938180b Fix an incorrect sizeof.
Fix an incorrect sizeof which leads to allocation of more memory than
actually needed.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69329
[elide redundant "* sizeof (char)" which is 1 by definition -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16 12:43:40 +01:00
Simon McVittie
3b9c2817e9 dbus-sysdeps-win: don't include wspiapi.h
This block provoked a warning on mingw-w64 because we were redefining
_inline. According to Ralf's research, it was introduced in 452ff68a:
Windows 2000 doesn't have getaddrinfo and related functions in
ws2tcpip.h, but does have a shim implementation in wspiapi.h.

At the time of 452ff68a, mingw32 didn't have wspiapi.h, so it's unclear
why there was a __GNUC__ code path here. The "#define _inline" on that
code path looks likely to be some sort of workaround for a faulty version
of wspiapi.h? Current mingw-w64 does have wspiapi.h, so we enter the
__GNUC__ code path and get the redefinition.

dbus no longer supports Windows 2000, so we no longer need wspiapi.h
at all, and can rely on XP or later. (Ralf's policy is to only support
versions of Windows that are still supported by Microsoft, and Windows 2000
reached the end of its life-cycle in 2010.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker
2013-09-16 12:35:35 +01:00
Simon McVittie
a411abc9c3 Merge remote-tracking branch 'fitzsim/fix-parent-removal-fixme'
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60176
2013-09-13 15:47:19 +01:00