Commit graph

2290 commits

Author SHA1 Message Date
Romain Pokrzywka
1cd84d8258 remove DBUS_DAEMON_EXECUTABLE_NAME, we already have DBUS_DAEMON_NAME, and use the specified name for the executable when building with cmake 2010-02-07 00:32:46 +01:00
Romain Pokrzywka
196b310dd1 remove the debug postfix for the executables, it only makes sense for the lib 2010-02-07 00:32:45 +01:00
Romain Pokrzywka
83c70d45a8 and another .def.in for the verbose mode handling 2010-02-07 00:32:44 +01:00
Romain Pokrzywka
b0e0cd03e8 commented bits cleanup 2010-02-07 00:32:44 +01:00
Romain Pokrzywka
3de7453714 disable cmake options that don't apply (for cmake-gui) 2010-02-07 00:32:43 +01:00
Romain Pokrzywka
7cda0ff030 fixed the TODO, the if block didn't make sense indeed. Also make it clearer which dirs in the summary are installation dirs 2010-02-07 00:32:42 +01:00
Romain Pokrzywka
5bf0e86495 fixed and simplified install prefix handling with cmake 2010-02-07 00:32:41 +01:00
Romain Pokrzywka
f554db982f dbus-spawn.h is internal, it shouldn't be installed 2010-02-07 00:32:40 +01:00
Romain Pokrzywka
bbd1c9fe82 now fix the build for the tests; turns out we need another set of exports, since some tests are compiled in the client lib and some are in the internal lib... 2010-02-07 00:32:39 +01:00
Romain Pokrzywka
ce69516585 refactor the cmake build to match with autotools: only export client symbols in dbus-1 and use and internal library for the rest. Currently this library is statically linked to the apps but it can be made dynamic if wanted 2010-02-07 00:32:39 +01:00
Romain Pokrzywka
cffb66be40 oops, this symbol belongs to the client exports 2010-02-07 00:32:38 +01:00
Romain Pokrzywka
5746ba8811 split the symbols into separate files matching the client/shared/util sections of the code, and generate the final .def file dynamically 2010-02-07 00:32:37 +01:00
Romain Pokrzywka
7487915ff4 make the def handling simpler with cmake, we don't need to specify the library name anyway 2010-02-07 00:32:36 +01:00
Ralf Habacker
8ba739fb1a win32 fix: _dbus_get_install_root(): there are more places to fix case insensitive pattern search 2010-02-07 00:32:13 +01:00
Ralf Habacker
9e918c8f74 win32 fix: _dbus_get_install_root(): to catch all cases perform case insensitive pattern search 2010-02-07 00:29:10 +01:00
Colin Walters
7bc27d1e84 Fix inotify shutdown
We were incorrectly passing NULL for a DBusList when the usage expected
is a pointer to a NULL DBusList pointer.  Also during dbus_shutdown
we need to actually close the inotify fd, and remove our watch.

Move the shutdown handler out of bus.c and into inotify where we
can do all of this cleanly.
(cherry picked from commit 90fe96b187)
2010-02-03 12:05:28 -05:00
Ralf Habacker
b43d342846 linux cmake build system related compile fix 2010-02-03 14:14:03 +01:00
Colin Walters
15109202a9 Fix compilation in --disable-selinux case
_dbus_change_to_daemon_user moved into selinux.c for the --with-selinux
(and audit) case because that's where all of the relevant libcap headers
were being used.  However in the --disable-selinux case this didn't
compile and wasn't very clean.

If we don't have libaudit, use the legacy direct setgid/setuid bits
we had before in dbus-sysdeps-util-unix.c.
2010-02-03 08:36:38 +01:00
Colin Walters
19d48c3344 Merge branch 'my-dbus-1.2'
Conflicts:
	configure.in
2010-02-02 11:00:09 -05:00
Colin Walters
a7169e694c Release 1.2.18 2010-02-02 10:31:28 -05:00
Tom Hughes
1c6596eb52 Use monotonic clock for _dbus_get_current_time() if it's available.
_dbus_get_current_time() is used for timeouts, but uses gettimeofday(), which
relies on the wall clock time, which can change. If the time is changed forwards
or backwards, the timeouts are no longer valid, so the monotonic clock must be used.

https://bugs.freedesktop.org/show_bug.cgi?id=25624

Signed-off-by: Colin Walters <walters@verbum.org>
2010-02-02 10:29:03 -05:00
Ralf Habacker
14f376717e win32 fix: provide separate def file for cmake until there is full splitlib support for cmake 2010-02-02 14:26:50 +01:00
Ralf Habacker
53bab8663e win32 fix for commit 8a9880ffd2 - Clean up inotify watch handling 2010-02-02 14:14:20 +01:00
Colin Walters
0607bdb676 Don't crash when reloading if we haven't loaded user database yet
The user database is populated on-demand, but the cache dropping
code assumed it had been initialized.  Simply check for NULL.

https://bugs.freedesktop.org/show_bug.cgi?id=26182
2010-02-01 17:40:17 -05:00
Colin Walters
6db588b854 Merge branch 'my-dbus-1.2' 2010-02-01 17:27:26 -05:00
Colin Walters
e59db9df47 Move system-activation.txt into non-conditional EXTRA_DIST
It doesn't depend on the XML doc generation.
2010-02-01 16:45:48 -05:00
Colin Walters
8a9880ffd2 Clean up inotify watch handling
Substantially based on a patch by Matthias Clasen <mclasen@redhat.com>
kqueue implementation by Joe Marcus Clarke <marcus@freebsd.org>

Previously, when we detected a configuration change (which included
the set of config directories to monitor for changes), we would
simply drop all watches, then readd them.

The problem with this is that it introduced a race condition where
we might not be watching one of the config directories for changes.

Rather than dropping and readding, change the OS-dependent monitoring
API to simply take a new set of directories to monitor.  Implicit
in this is that the OS-specific layer needs to keep track of the
previously monitored set.
2010-02-01 16:22:56 -05:00
Ralf Habacker
2016b83dec _dbus_change_to_daemon_user() is platform related and commit 0a3905d7f3 broke windows builds 2010-01-29 23:57:07 +01:00
Ralf Habacker
e77fff6dfa reverted 2aea64fbb6 because it breaks msvc2008 builds 2010-01-29 23:48:34 +01:00
Colin Walters
0705eb5c86 Update messagebus.in init script to start earlier
Patch from Fedora.
2010-01-28 17:31:36 -05:00
Colin Walters
2691b302aa [doc] diagram.[svg,png] to EXTRA_DIST
These files are part of the docs and should appear in tarballs.
2010-01-28 17:29:27 -05:00
Colin Walters
7a4cd46284 Merge branch 'my-dbus-1.2'
Conflicts:
	bus/Makefile.am
	dbus/dbus-sysdeps-util-unix.c
	dbus/dbus-transport.c
	test/test-service.c
2010-01-28 17:09:15 -05:00
Colin Walters
b93476ce07 Don't drop pending activations when reloading configuration
The reload handling for activation simply dropped all knowledge
of pending activations, which was clearly wrong.  Refactor things
so that reload only reloads directories, server address etc.

Based on a patch originally from Matthias Clasen <mclasen@redhat.com>
2010-01-28 17:01:24 -05:00
Colin Walters
0a3905d7f3 Switch to libcap-ng, avoid linking libdbus against libcap[-ng]
(Commit message written by Colin Walters <walters@verbum.org>)

A current Fedora goal is to convert projects to libcap-ng which
more easily allows dropping Linux capabilities.  For software
which also links to libdbus, it's problematic to link against
libcap as well.

Though really, libdbus should have never linked against libcap
in the first place, which is another thing this patch changes
by moving the libcap-using bits out of dbus/ and into bus/.

https://bugzilla.redhat.com/show_bug.cgi?id=518541
2010-01-28 17:01:24 -05:00
Colin Walters
5b2cf0d031 Add Will Thompson and Simon McVittie to reviewers, add emails to all
The reviewer list was sorely lacking actual email addresses; fix this.
Also add Will and Simon.
2010-01-28 17:01:24 -05:00
Colin Walters
b7e77c6b03 Ignore exit code zero from activated services
A variety of system components have migrated from legacy init into DBus
service activation.  Many of these system components "daemonize", which
involves forking.  The DBus activation system treated an exit as an
activation failure, assuming that the child process which grabbed the
DBus name didn't run first.

While we're in here, also differentiate in this code path between the
servicehelper (system) versus direct activation (session) paths.  In
the session activation path our error message mentioned a helper
process which was confusing, since none was involved.

Based on a patch and debugging research from Ray Strode <rstrode@redhat.com>
2010-01-28 17:01:24 -05:00
Will Thompson
a8e620a0ff Print all-printable-ASCII byte arrays as strings
In practice, ay seems to be used mostly for binary data (in which case,
hex output is fine) or for Unix file paths (because they may be
non-UTF-8) and similar human-readable strings. So let's print the latter
similarly to strings.
2010-01-28 17:01:24 -05:00
Will Thompson
1a33efb54b Print byte arrays as nicely-formatted hex. 2010-01-28 17:01:23 -05:00
Will Thompson
3171383ce9 Add an accessor for the loader's corruption reason 2010-01-28 17:01:23 -05:00
Will Thompson
7cf332d34e Include reason when reporting corrupt messages
It would have been much easier to diagnose fd.o#19723 if the error
message had said more than just "Message is corrupted".
2010-01-28 17:01:23 -05:00
Will Thompson
ce87333cac Forbid zero serial numbers 2010-01-28 17:01:23 -05:00
Will Thompson
7a8fcdee22 Make array-printing code easier to follow
Previously dbus_message_iter_get_arg_type() was called twice: once in
the loop condition to update 'current_type', and once to check if the
loop will run again. This patch moves updating current_type to the end
of the loop body.
2010-01-28 17:01:23 -05:00
James Westby
e2aee8bdeb Correct timeout handling
The timeout handling code subtracts the elapsed time from the timeout
each time a message is received, which drastically reduces the timeout
in circumstances such as service activation.

Correct so that the timeout is never modified, and the elapsed time
instead subtracted where necessary.

Signed-off-by: James Westby <jw+debian@jameswestby.net>
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
2010-01-28 17:01:23 -05:00
Marcus Brinkmann
1e82db4743 Allow to override test tool path for cross compilation setup. 2010-01-28 11:26:07 +01:00
Hendrik Buschmeier
6067f88afd Bug 23502 - corrected wrong verbose-output 2010-01-28 11:22:32 +01:00
Marcus Brinkmann
c7b72f4bc7 Invoke AC_PROG_MKDIR_P to make sure MKDIR_P is defined. 2010-01-28 10:44:23 +01:00
Marcus Brinkmann
2aea64fbb6 Only list those symbols that can be exported (new toolchain barfs on undefined symbols in export list). 2010-01-28 10:44:22 +01:00
Marcus Brinkmann
57601bf01a Include errno.h. 2010-01-28 10:44:21 +01:00
Marcus Brinkmann
30af0a1c5f Fix buffer underrun and clarify condition. 2010-01-20 14:42:14 +01:00
Colin Walters
983cca443d Add Will Thompson and Simon McVittie to reviewers, add emails to all
The reviewer list was sorely lacking actual email addresses; fix this.
Also add Will and Simon.
2010-01-15 16:57:39 -05:00