Commit graph

516 commits

Author SHA1 Message Date
Lennart Poettering
bffc52a385 systemd: install systemd socket and service file by default 2010-07-09 23:35:54 +02:00
Lennart Poettering
b3ed8675a4 activation: optionally, use systemd for system bus activation 2010-07-09 19:47:23 +02: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
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
Will Thompson
01ae2cb793 Merge branch 'dbus-1.2'
Conflicts:
	bus/main.c
	configure.in
2010-05-21 11:48:28 +01:00
Will Thompson
82a77d6acb kqueue set_watched_dirs: fix termination condition
num_fds is the number of elements of dirs currently in use. This bug
meant that encountering a previously un-watched directory would cause j
to increment forever, and so dirs[j] would eventually segfault.

(I've checked the corresponding code for inotify, and it's correct. I
wonder if some of the duplication could be eliminated.)

Thanks to Pablo Martí Gamboa <pmarti@warp.es> for reporting this issue!
2010-05-21 11:21:20 +01:00
Ralf Habacker
755fc64ea4 Disabled launch helper activation tests on windows.
Launch helper application isn't supported on windows yet.
2010-05-03 10:55:46 +02:00
Fridrich Štrba
c096c5cb9a Don't truncate pointers on Windows x64 platform 2010-05-03 10:48:38 +02:00
David Zeuthen
ef3eee2848 Fix spelling error
This broke 'make install' since dbus-daemon-launch-helper didn't get
installed.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-04-26 18:00:07 -04:00
Tomas Pelka
0528323563 [legacy init script] Fix the use of $servicename 2010-04-23 12:02:19 -04:00
Fridrich Štrba
ed79e030ca Patch relocating "exec" variable and position of service files 2010-04-21 12:30:52 +02:00
Marcus Brinkmann
e419a5cff7 Fix warnings on Windows builds. 2010-04-14 08:26:40 +02:00
Ralf Habacker
0ed7d779b7 Cmake support for cross plattform usable test files.
Recent test configuration files contains 'unix:...'
bus adresses which do not work on windows.
For cross plattform usable test files the whole
listen tag entry has to be set by the build system,
which is available with a new build system variable
named TEST_LISTEN.
To have the client client side definition in sync,
TEST_CONNECTION has been moved from c file into cmake
build system.
2010-04-11 11:49:46 +02:00
Ralf Habacker
d521734851 Cleaned up _dbus_verbose calls: function names and code line numbers are printed by default. 2010-03-27 23:28:00 +01:00
Colin Walters
3f58fdfb11 [bus] Don't install a SIGTERM handler
Really we don't have any interesting cleanup to do, so just
let the process die.

https://bugs.freedesktop.org/show_bug.cgi?id=26303
2010-03-23 15:04:21 -04:00
Ralf Habacker
ca7b8112c9 Renamed libdbus-convenience to libdbus-internal for automake (to stay in sync with cmake). 2010-03-23 09:21:48 +01:00
Marcus Brinkmann
1de6b09fbd Update dll export for autoconf (to stay in sync with cmake). 2010-03-23 09:10:39 +01:00
Colin Walters
df89cfeb38 Merge branch 'dbus-1.2'
Conflicts:
	bus/dispatch.c
	configure.in
	test/name-test/test-names.c
2010-03-22 14:39:56 -04:00
Colin Walters
03bb3ce656 Add DBUS_GNUC_PRINTF checks to new formatting functions
Otherwise we don't get GCC warnings.
2010-03-22 13:58:43 -04:00
Marcus Brinkmann
01d9d169f3 Make more signal and locale interface use conditional. 2010-03-22 17:28:55 +01:00
Colin Walters
c4371e4bc8 [bus] While creating a syslog, correctly get pointer data from DBusString 2010-03-21 07:01:55 -04:00
Ralf Habacker
235e8dfe2e Fixed gcc on windows limitation
A pointer to a function or variable marked as dllimport
cannot be used as a constant address.
2010-03-20 21:53:57 +01:00
Marcus Brinkmann
dbecdeabb2 Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
Will Thompson
6663cb5dcf Dispatch post-activation messages to anyone interested
Previously, if a method call activated a service, it would only be
delivered to that service, and not to other services with match rules
which should match. This patch replaces the improperly-duplicated
dispatch code in activation.c with a call back into the normal dispatch
code, fixing this bug (fd.o#26427).

(Additionally, were one to service-activate a service that doesn't
understand file descriptors with a message containing a file descriptor,
the previous code would send it anyway, and the service's dbus library
would blow up. This is also fixed here, since the normal dispatch code
checks this correctly.)
2010-03-19 17:48:00 +00:00
Will Thompson
3a2753e667 Move dispatching to destination to bus_dispatch_matches() 2010-03-19 17:48:00 +00:00
Will Thompson
af95ba7c8e Dispatch post-activation messages to anyone interested
Previously, if a method call activated a service, it would only be
delivered to that service, and not to other services with match rules
which should match. This patch replaces the improperly-duplicated
dispatch code in activation.c with a call back into the normal dispatch
code, fixing this bug (fd.o#26427).
2010-03-19 17:47:40 +00:00
Will Thompson
aa275ff175 Move dispatching to destination to bus_dispatch_matches() 2010-03-19 17:47:40 +00:00
Colin Walters
18bcf800b6 Merge branch 'dbus-1.2' 2010-03-16 16:44:48 -04:00
Colin Walters
edecaa4abc Don't send an reply for driver messages if one isn't requested
Basically honor the no_reply flag; a binding is likely to want to
set this so it doesn't have to process extra traffic for match
rules.
2010-03-16 16:44:30 -04:00
Colin Walters
ebfa7c02fd Merge branch 'dbus-1.2'
Conflicts:
	bus/bus.c
	configure.in
2010-03-16 16:11:14 -04:00
Colin Walters
ce34415302 Make SELinux initialization failure fatal
https://bugzilla.redhat.com/show_bug.cgi?id=572769

Previously we'd just continue if AVC initialization failed, but
that didn't really work because then we'd later crash in
avc_has_perm.

Simply treat initialization failures as fatal, and hopefully we
can get data from the system log.
2010-03-16 15:57:27 -04:00
Colin Walters
f00c816c27 Add a prefix to our syslog messages
Previously we were simply logging as "dbus", and it was unclear
whether it was the system bus, or a session bus.  And if the latter,
which user?

This patch adds a prefix to the log message with the bus type
and the userid.
2010-03-16 15:57:27 -04:00
Colin Walters
04cf316600 Refactor _dbus_log_info, _dbus_log_security into _dbus_log_system
In preparation for a future patch which introduces a fatal logging level,
don't duplicate the API here.
2010-03-16 15:57:05 -04:00
Colin Walters
322c116a53 [main] Handle OOM in reload watch
http://bugs.freedesktop.org/show_bug.cgi?id=12953

Wait for memory if we can't init the string.

Based on an original patch by Kimmo Hämäläinen <kimmo.hamalainen@nokia.com>
2010-03-16 13:11:44 -04:00
Colin Walters
8586e83a5c Support inotify on older kernels
https://bugs.freedesktop.org/show_bug.cgi?id=23957

Previously we detected glibc support at compile time and used
it unconditionally; better to try it and fall back, this way
we continue to run on older kernels when compiled for newer ones.
2010-03-16 12:21:52 -04:00
Frederic Crozat
008cd59ef7 Fix build when selinux is disabled but libaudit enabled
https://bugs.freedesktop.org/show_bug.cgi?id=26859
2010-03-03 08:19:35 -05:00
Ralf Habacker
1bbb46421b fixed compile break introduced in commit e1c31c7307 2010-02-25 18:12:47 +01:00
Colin Walters
e1c31c7307 Merge branch 'dbus-1.2'
Conflicts:
	bus/bus.c
	bus/selinux.c
	configure.in
2010-02-22 09:48:45 -05:00
Colin Walters
9c90fcd2dc Monitor service directories for changes
It's not expected to have to manually SIGHUP the bus after installing
a new .service file.  Since our directory monitoring is already set
up to queue a full reload which includes service activation, simply
monitor the servicedirs too.

https://bugs.freedesktop.org/show_bug.cgi?id=23846
2010-02-18 15:33:28 -05:00
Brian Cameron
8ca10fd4de Fix dummy file monitoring backend compilation
https://bugs.freedesktop.org/show_bug.cgi?id=26421
2010-02-18 10:38:42 -05:00
Ralf Habacker
31d9f4d655 Merge branch 'master' of ssh://git.freedesktop.org/git/dbus/dbus 2010-02-09 19:44:12 +01:00
Ralf Habacker
523e01827e fixed bug on win32 not been able to use session bus with --config-file option
Internal setup of session bus type was bound to the presence of the --session
command line parameter which prevents to use the --config-file parameter for
session bus setup.
2010-02-09 08:37:50 +01:00
Cyril Brulebois
b429488739 Fix compilation of kqueue file monitoring on FreeBSD 2010-02-08 12:21:35 -05:00
Romain Pokrzywka
27a46ea9cb variable name fix (DBUS_DAEMON_NAME instead of DAEMON_NAME) 2010-02-07 00:32:51 +01:00
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
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
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
3dac125d61 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-02 15:04:58 -05:00
Colin Walters
90fe96b187 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.
2010-02-02 15:04:45 -05:00