Commit graph

3254 commits

Author SHA1 Message Date
Simon McVittie
a4d68a7687 more NEWS 2012-02-13 17:57:23 +00:00
Simon McVittie
9a654d2529 add and use _dbus_connection_trace_ref
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:54:56 +00:00
Simon McVittie
0136f318f0 add and use _dbus_server_trace_ref
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:54:54 +00:00
Simon McVittie
7ba7b9a931 add and use _dbus_pending_call_trace_ref
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:54:52 +00:00
Simon McVittie
926496567a Add and use _dbus_message_trace_ref
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:54:50 +00:00
Simon McVittie
566a841664 Provide a hook to allow refcounting to be traced
This is designed to be used from a wrapper function, partly to supply
the same arguments every time for a particular class of object, and partly
to provide a more specific gdb breakpoint. It has several purposes:

* when under gdb, provide a function which can be used in breakpoints
* when not under valgrind and DBUS_MESSAGE_TRACE=1 is set, emit a
  _dbus_verbose when a message's refcount changes
* when under valgrind and DBUS_MESSAGE_TRACE=1 is set, emit a
  VALGRIND_PRINTF_BACKTRACE when a message's refcount changes,
  which lets you see the complete history of each message to track down
  reference leaks

Compile-time support is currently conditional on DBUS_ENABLE_VERBOSE_MODE,
but could be separated out if desired.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:54:46 +00:00
Simon McVittie
d571e70a53 dbus_message_cache_or_finalize: allow message cache to be disabled at runtime
This should make it easier to diagnose message-related ref leaks,
use-after-free, etc. with Valgrind: for optimal results (and pessimal
performance), we want to avoid re-using memory blocks for as long as
possible.

For now this is conditional on DBUS_BUILD_TESTS. It could get its own
conditional if desired.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:54:37 +00:00
Simon McVittie
01e3c41d75 DBusMemPool: inform valgrind what we're up to
If we tell valgrind what we're doing, it can give better diagnostics.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:54:34 +00:00
Simon McVittie
b3f2ee5c6b Add support for inserting (a subset of) Valgrind client requests
If valgrind support is disabled, we define stub versions of the
Valgrind client requests I plan to use, so the actual code doesn't
need #ifdef hell.

[With unnecessary AC_SUBST removed as per Lennart's review -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:54:21 +00:00
Simon McVittie
05cc2c3348 Replace a series of booleans, all (apparently) alike, with flags
This makes it a bit clearer what's going on.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:39:16 +00:00
Simon McVittie
267dbff1ea NEWS 2012-02-13 17:37:56 +00:00
Simon McVittie
b69119c1e2 _dbus_string_append_double, _dbus_string_parse_double: remove
They're unused, except by their own regression tests.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:37:39 +00:00
Simon McVittie
7a33565d3f _dbus_string_append_unichar, _dbus_string_get_unichar: remove
These are unused (except by their regression test!) and not visible to
external callers.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:37:32 +00:00
Simon McVittie
75e6fdc4e2 _dbus_list_pop_last_link: remove, unused
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:37:02 +00:00
Simon McVittie
e70eea5715 Merge branch 'dbus-1.4'
Conflicts:
	NEWS
	configure.ac
2012-02-13 17:36:51 +00:00
Simon McVittie
88f5a6ed15 Back to development status 2012-02-13 17:19:13 +00:00
Simon McVittie
e6338646c1 Release D-Bus 1.4.18 2012-02-13 16:23:50 +00:00
Pavel Strashkin
fc124e6ab0 dbus-daemon: fix forgotten counter increase while copying configured auth mechanisms
Previously, only one auth mechanism was used.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45106
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-13 16:19:14 +00:00
Simon McVittie
92e7b08b19 Revert "dbus-daemon: fix forgotten counter increase while copying configured auth mechanisms"
This reverts commit 26b57efe43.
It was incorrectly attributed.
2012-02-13 16:18:11 +00:00
Simon McVittie
26cc04e2fa _dbus_connection_queue_received_message: remove, unused
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10 14:37:44 +00:00
Simon McVittie
471bf90599 DBUS_HASH_TWO_STRINGS, DBUS_HASH_POINTER: remove, unused
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10 14:37:44 +00:00
Simon McVittie
10143a9c96 _dbus_list_insert_before: remove, unused
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10 14:37:44 +00:00
Simon McVittie
597d5ad06e _dbus_header_field_to_string: remove, unused
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10 14:37:44 +00:00
Simon McVittie
54bf2bd92c Remove unused _dbus_string_append_4_aligned, _dbus_string_append_8_aligned
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10 14:37:41 +00:00
Simon McVittie
0fe2583e71 _dbus_getgid: remove, unused
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10 14:37:05 +00:00
Simon McVittie
b1cff7e6eb NEWS 2012-02-10 13:49:00 +00:00
Lennart Poettering
6056a3d662 spec: document systemd transport
This adds a short section about the systemd transport to the
specification.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35232
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-10 13:44:20 +00:00
Simon McVittie
a4805aac4f NEWS for recently-merged branches 2012-02-10 10:28:59 +00:00
Simon McVittie
21c8094040 Merge branch 'system-search-paths-21620'
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=21620
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10 10:10:38 +00:00
Simon McVittie
349260f245 Merge branch 'doc-search-paths-35306'
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35306
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10 10:10:17 +00:00
Simon McVittie
818e62f15f Merge branch 'reversed-dns-37095'
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37095
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10 10:09:38 +00:00
Lennart Poettering
a8423067ce bus: introduce --nopidfile switch to disable writing of PID files
When used with init systems such as systemd (where PID files are
redundant) this allows us to disable PID files even if a path is
configured for them in the normal bus configuration files.

Make use of this new switch in the systemd unit file.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45520
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-10 10:07:24 +00:00
Ralf Habacker
dd4038156d Windows compile fix
BUG: https://bugs.freedesktop.org/show_bug.cgi?id=45832
2012-02-09 14:58:43 +01:00
Simon McVittie
0a6a1726af NEWS 2012-02-08 19:34:37 +00:00
Simon McVittie
b129afbb7e _dbus_get_environment: move from shared library to dbus-sysdeps-util
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34976
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2012-02-08 19:30:22 +00:00
Simon McVittie
2e23700b39 NEWS 2012-02-08 19:13:19 +00:00
Simon McVittie
a2262becfe dbus-marshal-recursive: make some internal functions static
Having a disabled type writer, comparing type readers by position, and
performing a single step of copying from a reader to a writer all seem pretty
obscure, and were only used within dbus-marshal-recursive.c (to realign
after insertion).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38285
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2012-02-08 19:10:30 +00:00
Simon McVittie
de9b34d933 find_field_for_modification: document where the readers are left pointing
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38285
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2012-02-08 19:10:22 +00:00
Simon McVittie
009ab474e2 Reinstate the recursive marshalling test but skip the later parts by default
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38285
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2012-02-08 19:10:14 +00:00
Simon McVittie
79cc73627a dbus-test: only test for memleaks if we actually ran the test
This reduces output spam if you're only running one part.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38285
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2012-02-08 19:09:52 +00:00
Simon McVittie
2a8be5a2f5 Merge branch 'dbus-1.4'
Conflicts:
	NEWS
2012-02-08 19:06:51 +00:00
Simon McVittie
a9e14209a2 NEWS 2012-02-08 19:06:30 +00:00
Jack Nagel
336483a6cc docs: correctly invoke man2html
man2html expects to find its input on stdin, so just passing the
filename will cause it to hang waiting for input.

[man2html 1.6g as shipped in Debian seems to be fine with files on the
command line, but apparently other versions aren't? -smcv]

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=43875
2012-02-08 18:58:36 +00:00
Simon McVittie
fccb5a0fe1 Explicitly don't search XDG_DATA_DIRS for system services, and document it
In practice, it never works, because the activation helper doesn't
respect environment variables for security reasons.
If you want to vary the search path, alter system.conf instead, to
replace or augment <standard_system_servicedirs/> with your preferred
search path.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=21620
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-08 16:11:35 +00:00
Simon McVittie
6b01c6cdfd spec: document how to install session .service files
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35306
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-08 15:46:37 +00:00
Simon McVittie
ae3faad91d spec: document the search path for session services
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35306
2012-02-08 15:30:06 +00:00
Lennart Poettering
5a548fbf64 systemd: drop machine UUID generation for unit file
To optimize startup a bit, drop machine UUID generation from the unit
file. Since a while D-Bus was already capable of making use of the
/etc/machine-id file, which is guaranteed to exist on systemd systems
(since the first released versions already), hence there's no need to
ever generate a D-Bus specific machine ID.

In times where userspace takes < 800ms to boot up getting rid of this
process optimizes boot time further.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45520
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-07 16:40:36 +00:00
Simon McVittie
3d29eaaf89 NEWS 2012-02-07 16:09:21 +00:00
Simon McVittie
3872970597 Check for a new enough systemd that sd_uid_get_seats (., ., NULL) is valid
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39609
2012-02-07 16:07:04 +00:00
Lennart Poettering
ba71873c72 at_console: ask systemd whether a user is at the console
systemd manages seats and users. This patch optionally asks systemd
whether a user is at the console. It used libsystemd-login for that, a
low-level library that allows querying this kind of information without
expensive round trips.

In order to be nice to the Debian folks this patch falls back to
traditional modes of operation if systemd is not found to be around.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39609
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-07 16:06:33 +00:00