summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* DBusMessage: add support for custom marshalingbaserock/ps/update-dlt-audiomanagerbaserock/genivi/G-1.1Aleksandar Kanchev2013-12-014-44/+132
| | | | | | | Add functions to support querying and manipulating the message body and signature. This is useful for code generators, which can generate custom marshaling functions based on a given IDL. Those functions tend to be optimized and faster than the generic iterator based marshaling.
* Add chunk morph for dbus-preSam Thursfield2013-01-211-0/+15
| | | | | | | There is a circular dependency between D-Bus and systemd. Although in the current version there is no actual use of the systemd libraries, there is some in the current master and it's likely that there will be more in the future.
* dbus.morph: split autogen and configure steps upbaserock/morphRichard Maw2012-05-041-1/+2
| | | | | autogen runs configure with --enable-maintainer-mode, which puts on -Wall, which is good for developers, but we just want it built.
* dbus.morph: set localstatedir and sysconfdirRichard Maw2012-05-041-0/+3
| | | | | | These are needed to avoid the peculiar case of /usr/etc and /usr/var. This, apart from being ugly, also breaks systemd as it is hard-coded to expect the dbus socket to be in /var/run/dbus in some places.
* dbus: add morphRichard Maw2012-04-241-0/+11
| | | | | | | | | XMLTO_OUTPUT is required to prevent the html documentation being needed when it can't be built without xmlto. There exists logic to prevent the documentation being built when it can't, however it doesn't prevent it being needed as with the usual releases such documentation is included.
* Avoid using monotonic time in the DBUS_COOKIE_SHA1 authentication methodDavid Zeuthen2012-04-1213-41/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | When libdbus-1 moved to using monotonic time support for the DBUS_COOKIE_SHA1 authentication was broken, in particular interoperability with non-libdbus-1 implementations such as GDBus. The problem is that if monotonic clocks are available in the OS, _dbus_get_current_time() will not return the number of seconds since the Epoch so using it for DBUS_COOKIE_SHA1 will violate the D-Bus specification. If both peers are using libdbus-1 it's not a problem since both ends will use the wrong time and thus agree. However, if the other end is another implementation and following the spec it will not work. First, we change _dbus_get_current_time() back so it always returns time since the Epoch and we then rename it _dbus_get_real_time() to make this clear. We then introduce _dbus_get_monotonic_time() and carefully make all current users of _dbus_get_current_time() use it, if applicable. During this audit, one of the callers, _dbus_generate_uuid(), was currently using monotonic time but it was decided to make it use real time instead. Signed-off-by: David Zeuthen <davidz@redhat.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48580
* 1.5.13Simon McVittie2012-03-272-1/+6
|
* Prepare dbus 1.5.12dbus-1.5.12Simon McVittie2012-03-272-5/+10
|
* Build _dbus_string_starts_with_c_str even if not building testsSimon McVittie2012-03-271-2/+0
| | | | It's used by the own_prefix implementation.
* Merge remote-tracking branch 'alban/own_prefix2'Simon McVittie2012-03-278-34/+177
|\ | | | | | | | | Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46273
| * test: enforce own_prefix policy rulesAlban Crequy2012-03-224-8/+104
| | | | | | | | | | | | | | After parsing [allow|deny] rules with own_prefix, check they are enforced correctly. https://bugs.freedesktop.org/show_bug.cgi?id=46886
| * test: parse own_prefix policy rulesAlban Crequy2012-03-221-0/+2
| | | | | | | | | | | | Just check that the parser accept [allow|deny] rules with own_prefix https://bugs.freedesktop.org/show_bug.cgi?id=46886
| * policy: remove unused parameterAlban Crequy2012-03-223-4/+1
| |
| * doc: update documentation with own_prefix policy rulesAlban Crequy2012-03-222-0/+18
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=46886
| * policy: enforce policy on "allow own_prefix"Alban Crequy2012-03-041-1/+14
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=46886
| * config parser: add own_prefixAlban Crequy2012-03-042-21/+38
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=46882
* | Merge branch 'dbus-1.4'Simon McVittie2012-03-272-12/+11
|\ \ | | | | | | | | | | | | | | | Conflicts: NEWS configure.ac
| * | Start 1.4.21Simon McVittie2012-03-271-1/+1
| | |
| * | Prepare version 1.4.20dbus-1.4.20Simon McVittie2012-03-272-3/+23
| | |
| * | Fix duplicate case value compiling with mingw-w64Andoni Morales Alastruey2012-03-271-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | In mingw-w64 both ESOMETHING and WSASOMETHING are defined, leading to a duplicate case in the switch. Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47321
| * | Port to glib 2.31.x g_thread APIMartin Pitt2012-03-272-42/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | g_thread_init() is deprecated since glib 2.24, call g_type_init() instead. Bump glib requirement accordingly. g_thread_create is deprecated since 2.31, use g_thread_new() instead. When building with a glib earlier than 2.31, provide a backwards compatibility shim. [Added a comment about why we're using g_type_init() in a test that doesn't otherwise use GObject -smcv] [Applied to 1.4 despite just being a deprecation fix because it also fixes linking with GLib 2.32, in which gthread has been removed from gobject's Requires and moved to Requires.private, Debian #665665 -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44413 Bug-Debian: http://bugs.debian.org/665665 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* | | transport: add new unixexec transport on UnixLennart Poettering2012-03-127-1/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "unixexec:" transport will create a local AF_UNIX socket with socketpair(), then fork and execute a binary on one side with STDIN and STDOUT connected to it and then use the other side. This is useful to implement D-Bus tunneling schemes, for example to get a D-Bus connection to the system bus on a different host, similar how udisks is already doing it. (udisks uses SSH TCP tunneling for this, which is a bit ugly and less secure than this solution). Suggested use is with connection strings like the following: unixexec:path=ssh,argv1=foobar,argv2=system-bus-bridge or: unixexec:path=pkexec,argv1=system-bus-bridge or even: unixexec:path=sudo,argv1=system-bus-bridge The first line would execute the binary 'system-bus-bridge' on host 'foobar' and then pass D-Bus traffic to it. This (hypothetical) bridge binary would then forward the information to the local system bus. The second and third line use this scheme locally to acquire a privileged connection through pkexec resp. sudo: instead of connecting directly to the bus, they use the same bridge binary which will forward all information to the system bus. The arguments of the protocol are 'path' for the first execlp() argument, and argv0, argv1, and so on for the following arguments. argv0 can be left out in which case path will be used. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35230 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* | | sysdeps-unix: introduce dbus_close_all() and make use of it where appropriateLennart Poettering2012-03-122-11/+68
| | | | | | | | | | | | | | | | | | | | | | | | This is optimized on Linux and enumerates through /proc/self/fd with a fallback on brute-force closing of fds, in case /proc is not available. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35230 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* | | spec: document unixexec transportsLennart Poettering2012-03-121-3/+64
| | | | | | | | | | | | | | | | | | | | | This adds a specification text for the new unixexec: transport. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35230 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* | | Fix spelling errors in dbus-launch(1)John Bradshaw2012-03-121-2/+2
| | | | | | | | | | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47076 Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=675491 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* | | Merge branch 'dbus-1.4'Simon McVittie2012-03-121-83/+131
|\ \ \ | |/ / | | / | |/ |/|
| * Enumerate data files used in the build rather than using find(1)Simon McVittie2012-03-121-83/+130
| | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33840 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
* | Update NEWSSimon McVittie2012-02-281-1/+11
| |
* | Make dbus-daemon.exe --print-address work under WindowsSimon McVittie2012-02-286-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DBusPipe code was broken by commit 6e214b5b3c2837, which switched from C runtime API to Win32 API for WinCE's benefit. In a DBusPipe, fd_or_handle is in fact always a C runtime file descriptor, which can't be used with the Win32 API (which expects a HANDLE). This commit goes back to the C runtime API. It might cause WinCE support to regress, but at least dbus-daemon.exe --print-address works again. This is enough to make a few tests work under Wine when cross-compiling from Linux to mingw-w64: in particular, this now works: DBUS_TEST_DAEMON=bus/dbus-daemon.exe DBUS_TEST_DATA=test/data \ wine test/test-dbus-daemon.exe -p /echo/session Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46049 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* | Add a regression test for validating various string types with the public APISimon McVittie2012-02-242-0/+294
| | | | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39549 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
* | Add dbus-syntax.[ch]Simon McVittie2012-02-245-0/+372
| | | | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39549 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
* | DBusBasicValue: add bool_val and fd members to complete the setSimon McVittie2012-02-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dbus_bool_t is the same as dbus_uint32_t, but if we have a separate bool_val member, it's more obvious that people are getting it right. It's not called bool because that's a keyword in C++. int (for file descriptors) doesn't appear in the D-Bus message wire format, but then again neither does char *, and dbus_message_iter_get_basic() and friends can return an int (due to internal index-into-array-of-fds -> fd remapping in libdbus). In theory int might not be the same size as any of the dbus_intNN_t types, and anyway it's easier to see that people are getting it right if we make it explicit. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=11191 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
* | Promote DBusBasicValue and DBus8ByteStruct to be APISimon McVittie2012-02-245-49/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | In practice, D-Bus bindings end up reinventing DBusBasicValue anyway, so it might as well be API. Also stop claiming that all basic-typed values are guaranteed to fit in 8 bytes - this is not true if your platform has more than 8-byte pointers (I'm not aware of any such platform now, but let's not rule it out). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=11191 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
* | Development versionSimon McVittie2012-02-212-1/+6
| |
* | Prepare 1.5.10dbus-1.5.10Simon McVittie2012-02-213-6/+37
| |
* | Mark shell-test as modular and installableSimon McVittie2012-02-211-9/+3
| | | | | | | | | | | | | | | | This test needs non-public API and so is statically linked, but is OK to install. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42811 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* | Allow a reduced set of installable tests (none yet) to be built without GLibSimon McVittie2012-02-212-9/+20
| | | | | | | | | | | | | | | | | | --enable-modular-tests=auto will build as many as possible, perhaps excluding the GLib ones. --enable-modular-tests=yes or --enable-tests=yes will insist on having GLib, to be able to run everything. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42811 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* | dbus-memory: add optional checking for system malloc() (etc.) failingSimon McVittie2012-02-211-10/+77
| | | | | | | | | | | | | | | | | | | | If tests are enabled and DBUS_MALLOC_CANNOT_FAIL is set, abort on system malloc() failures (as GLib's g_malloc does). This can be used in conjunction with a resource limit, to turn runaway memory leaks into a debuggable core-dump. Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41048
* | dbus_realloc: don't crash if realloc() returns NULL while using guardsSimon McVittie2012-02-211-2/+5
| | | | | | | | | | Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41048
* | Turn the non-valgrind code path into inline functions to avoid compiler warningsSimon McVittie2012-02-211-3/+23
| | | | | | | | | | | | | | | | | | | | Recent gcc will warn if you have a statement that's just a macro expanding to (0), but not if you have an inline stub function that always returns 0, so let's do the latter. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | DBusTransport: don't include dbus-marshal-header.h eitherSimon McVittie2012-02-211-1/+0
| | | | | | | | | | | | | | | | No longer needed. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | Move _dbus_check_fdleaks_enter to dbus-message-internal.hSimon McVittie2012-02-213-5/+5
| | | | | | | | | | | | | | | | | | This means the bus test can use them without needing dbus-message-private.h, reducing its view of message internals. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | DBusTransport: don't use dbus-message-private.hSimon McVittie2012-02-211-1/+1
| | | | | | | | | | | | | | | | It seems it's no longer needed here. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | Zero-initialize DBusCounter at allocationSimon McVittie2012-02-211-15/+2
| | | | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | Do not AC_SUBST systemd flags from PKG_CHECK_MODULESSimon McVittie2012-02-211-2/+0
| | | | | | | | | | | | | | | | They're automatically substituted already. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | Invoke PKG_PROG_PKG_CONFIG early in configure.acSimon McVittie2012-02-211-0/+1
| | | | | | | | | | | | | | | | | | Otherwise, autoconf can generate wrong code, because our first use of PKG_CHECK_MODULES is conditional. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | internal_bus_get: centralize error handlingSimon McVittie2012-02-211-17/+13
| | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | Add a macro to centralize checking for string-like typesSimon McVittie2012-02-211-6/+6
| | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | Remove declaration of _dbus_type_is_fixed, no longer existsSimon McVittie2012-02-211-1/+0
| | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | _dbus_verbose_real: tidy conditional prototype to not break nestingSimon McVittie2012-02-211-4/+3
| | | | | | | | | | | | | | | | | | The mismatched opening parenthesis caused vim syntax highlighting to consider every subsequent brace in the file to be an error, which was pretty annoying. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>