Commit graph

2500 commits

Author SHA1 Message Date
Lennart Poettering
1b56dabaaa systemd: update sd-daemon.[ch] from upstream systemd 2010-09-06 03:17:54 +02:00
Colin Walters
87d324c343 Merge branch 'dbus-1.2'
Conflicts:
	dbus/dbus-sysdeps-unix.c
2010-09-03 14:46:53 -04:00
Colin Walters
45d53565bc Make dbus-uuidgen atomic
A Red Hat QA engineer hit in practice a race condition in dbus-uuidgen
where it could leave an empty file.

dbus-uuidgen (_dbus_create_uuid_file_exclusively) formerly created an
empty file in the path to the uuid, then filled it in.  At some point,
the internal libdbus _dbus_string_save_to_file became atomic on Unix
at least (doing the save to temp file, fsync(), rename() dance).

So _dbus_create_uuid_file_exclusively doesn't need to create the file
beforehand anymore.  However, it *does* need the file to be
world-readable, unlike all other consumers of
_dbus_string_save_to_file.  So add a "world_readable" argument.
2010-09-03 14:29:53 -04:00
Lennart Poettering
ff2325c92c sd-daemon: update from upstream
This updates the sd-daemon.[ch] copy from upstream, which makes sure
thet the code compiles even if SOCK_CLOEXEC is not supported.
2010-08-12 00:08:09 +02:00
Romain Pokrzywka
c9033c7ba6 Cleanup: removed unused code; fixed Winsock error handling; fixed code indentation. 2010-08-11 18:59:48 +02:00
Ralf Habacker
4015036813 Fixed wince build problem reported by aheinecke at intevation dot de. 2010-08-10 11:27:37 +02:00
Ralf Habacker
a064cf9578 Fixed bug not creating bus/messagebus-config. 2010-08-10 09:17:33 +02:00
Yaakov Selkowitz
0e31935343 Delete stale pid file on cygwin. 2010-08-10 08:25:47 +02:00
Yaakov Selkowitz
e5d0069c8f Avoid -Werror problems on cygwin. 2010-08-10 08:25:29 +02:00
Yaakov Selkowitz
aec82e2edd Applied patches from cygwin port. 2010-08-10 08:25:24 +02:00
Romain Pokrzywka
77ee59e06d fix socket descriptor leak in _dbus_connect_tcp_socket_with_nonce 2010-08-09 02:55:41 +02:00
Marcus Brinkmann
2313832d38 Wrap OutputDebugString for Windows CE builds, and add cast for MSVC. 2010-07-19 10:32:08 +02:00
Christian Dywan
821f99c318 Add unit tests for dbus_message_get_path_decomposed 2010-07-16 15:22:49 +01:00
Christian Dywan
d8afa0a10b Assert in _dbus_decompose_path if path is NULL or len is wrong 2010-07-16 15:22:47 +01:00
Lennart Poettering
265a3bb04a systemd: update systemd glue code 2010-07-13 02:50:02 +02:00
Lennart Poettering
f25041d46d systemd: remove dbus pid file before starting dbus 2010-07-13 01:35:03 +02:00
Lennart Poettering
1104d2237a man: add documentation for four new switches to dbus-daemon
This adds explanations for --address and --systemd-activation which have
recently been added to the daemon. Also adds coumentation for --nofork
and --introspect which has been previously forgotten.
2010-07-10 02:31:04 +02:00
Lennart Poettering
0514bf378a systemd: add a nice description string to the .socket file 2010-07-10 02:22:59 +02:00
Lennart Poettering
bffc52a385 systemd: install systemd socket and service file by default 2010-07-09 23:35:54 +02:00
Lennart Poettering
8e3060a2ad build-sys: update pkg-config.m4 2010-07-09 23:35:48 +02:00
Lennart Poettering
b3ed8675a4 activation: optionally, use systemd for system bus activation 2010-07-09 19:47:23 +02:00
Colin Walters
8f2eb502a3 Fix use of $servicename in status
See https://bugzilla.redhat.com/show_bug.cgi?id=521797

We have two init scripts, and commit 0528323563
patched the "wrong" (i.e. slackware) one.  Patch one that ships
with real operating systems too.
2010-07-09 11:52:59 -04:00
Lennart Poettering
921bc585ca bus: add --address switch
This is allows overriding of the listening address on the command line,
which is particularly useful for systemd socket-based activation.
2010-07-09 01:54:11 +02:00
Lennart Poettering
dd31130a97 systemd: add systemd-style socket-activation
This is a pretty straightforward implementation of systemd-style socket
activation using the reference implementation of the
$LISTEN_FDS/$LISTEN_PID env var parsing as supplied by systemd upstream.
2010-07-09 01:54:11 +02:00
Sledz
8f5f340b77 sysdeps-unix: enable address reuse on TCP sockets
This helps to avoid 'Address already in use' problems if server has been shut
down, and then restarted while sockets are still active on its port.

Signed-off-by: Steffen Sledz <sledz@dresearch.de>
2010-07-08 09:24:58 -04:00
Thiago Macieira
6ff1d07931 Fix the reentrancy issue reported on bug 17754.
Patch based on patch by Havoc Pennington, with the references that
this is temporary removed.

        Patch based on one from Olivier Hochreutiner <olivier.hochreutiner
        gmail.com>

        * dbus/dbus-connection.c (protected_change_timeout): remove the
        elaborate nonworking hack to try to drop locks and just keep the
        locks; this isn't right either, but at least is correct, though
        it puts restrictions on apps.

        * dbus/dbus-connection.c (protected_change_watch): make the same
        change as for timeouts

        * dbus/dbus-connection.c (dbus_connection_set_timeout_functions):
        don't drop the lock here; add documentation of the problem to API
        docs
        (dbus_connection_set_watch_functions): same

        * dbus/dbus-connection.c (dbus_connection_get_data)
        (dbus_connection_set_data): introduce a separate slot_mutex
        protecting connection->slot_list so these two functions can be
        called inside watch and timeout functions. Not sure this
        is going to be a good idea.

        * dbus/dbus-connection.c (dbus_connection_unref)
        (dbus_connection_ref): avoid using connection lock in ref/unref
        so these can also be used in watch and timeout functions
2010-07-01 12:23:42 +02:00
Lennart Poettering
591236a669 build-sys: open 1.3.2 development cycle 2010-06-23 16:37:58 +02:00
Lennart Poettering
e7743435c2 build-sys: add make target for updating AUTHORS file 2010-06-23 16:13:43 +02:00
Lennart Poettering
5f423a9414 build-sys: prepare release 1.3.1 2010-06-23 04:00:28 +02:00
Lennart Poettering
bd074df3f0 pkg-config: add a couple of additional variables to .pc
We already export the session services dir in the .pc file, add the
system services dir too, as well as the interfaces dir, so that packages
can drop their files into the right place.

Eventually we need to move the system-services dir to a place that is
relocatable to /lib/dbus, and this change makes the location queriable
for other projects, as a first step towards that goal.
2010-06-23 03:14:27 +02:00
Will Thompson
5d64b7a1b7 Merge branch 'dbus-1.2' 2010-06-22 17:25:20 +01:00
Christian Dywan
085e7730b8 Implement doctype check in the trivial parser
This is needed for the libxml parser backend.
2010-06-22 16:59:26 +01:00
Thiago Macieira
e40c45fb46 Revert "Bug 17754 - Fixed race condition in protected_change_timeout."
This reverts commit b82ff17d7d and
9280395330.

Conflicts:

	dbus/dbus-connection.c
2010-06-22 14:54:38 +02:00
Will Thompson
1861c9fdd0 Clarify GetConnectionUnixUser documentation.
(This makes it match the freshly-documented GetConnectionUnixProcessID.)
2010-06-17 15:27:08 +01:00
Will Thompson
c8aa4ba183 Document ListQueuedOwners in the spec 2010-06-17 15:27:08 +01:00
Will Thompson
318c55c9c0 Document GetConnectionUnixProcessID in the spec 2010-06-17 15:27:07 +01:00
Will Thompson
1b6adc407e Fix a broken <xref/> 2010-06-17 15:27:07 +01:00
Will Thompson
a44d08711c Revert "Bug 28460 - Refactored dbus configuration access."
This reverts commit 6f9077ee87, which
broke the build on Unix (see previous patch) and introduced a bunch of
warnings.
2010-06-17 15:14:22 +01:00
Will Thompson
d9f9c2518d Fix dbus-sysdeps.h on amd64, again.
HAVE_STDINT_H is defined in config.h, but that's not much use if
config.h isn't included. The new file dbus/dbus-config.c includes this
header without including config.h first, so fails to build.

Since dbus-sysdeps.h is internal, we can include config.h with impunity,
rather than relying on our callers to do so. Also, there's no need to
include stdint.h twice.
2010-06-17 14:45:16 +01:00
Ralf Habacker
6f9077ee87 Bug 28460 - Refactored dbus configuration access.
Libdbus uses several config variables. On unix these settings are read from
environment variables by using _dbus_getenv.

On other platforms like wince there are no environment variables available and
_dbus_getenv needs an emulation for those plattforms (see
dbus/dbus-sysdeps-wince-glue.c)

To cleanup this emulation the appended patch adds a config api by adding
_dbus_config_... functions.

Also having all client config related functions listed in one header file
provides a good overview about which config attributes  are available.

The default implementation retrieves the config values from environment
variables. For other os this could be easily extended or replaced by.
2010-06-14 18:27:04 +02:00
Ralf Habacker
9280395330 Use dbus provided wait function. 2010-06-12 07:30:45 +02:00
Plácido Revilla
b82ff17d7d Bug 17754 - Fixed race condition in protected_change_timeout. 2010-06-11 18:38:15 +02:00
Johannes Carlsson
882a2e11a9 Corrected thread problem causing some calls to hang for 25s
Since the connection lock is released for a short while in
_dbus_connection_acquire_io_path there can already be a method return
received by another thread. The fix is to do an extra check after the
I/O path has been aquired both.

Approved-by: Thiago Macieira
2010-06-11 14:18:55 +02:00
Ralf Habacker
2f48b5a5a1 Do not set DBUS_SESSION_BUS_DEFAULT_ADDRESS unconditional in code, it is already defined in build system. 2010-06-11 10:52:43 +02:00
Ralf Habacker
8cd61621ce Keep cmake default session and system bus address setup in sync with autotools. 2010-06-11 10:48:10 +02:00
Christian Dywan
58fe0adefd Fix x64 build after WinCE intptr_t usage changes. 2010-06-10 14:48:58 +02:00
Johannes Carlsson
81656e679b Corrected thread problem causing some calls to hang for 25s
Since the connection lock is released for a short while in
_dbus_connection_acquire_io_path there can already be a method return
received by another thread. The fix is to do an extra check after the
I/O path has been aquired both.

Approved-by: Thiago Macieira
2010-06-09 12:28:15 +02:00
Ralf Habacker
cd815c347a Fixed compiler warnings. 2010-06-07 15:46:33 +02:00
Ralf Habacker
8891d51be1 Minor include file fix.
When including dbus/dbus-errors.h to get error related functions,
the related error constants should be available too.
2010-06-07 15:34:22 +02:00
Ralf Habacker
e66dd0eeb5 Keep in sync with autotools. 2010-06-07 14:23:44 +02:00