Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
dbus
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Daniel Reurich
dbus
Commits
3ec6cdd0
Commit
3ec6cdd0
authored
Jul 29, 2011
by
Simon McVittie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Imported Upstream version 1.5.6
parent
f41d7a14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
107 changed files
with
4426 additions
and
3933 deletions
+4426
-3933
Makefile.am
Makefile.am
+1
-2
Makefile.in
Makefile.in
+9
-10
NEWS
NEWS
+80
-2
README
README
+23
-22
README.cygwin
README.cygwin
+1
-1
README.win
README.win
+4
-4
Makefile.am
bus/Makefile.am
+41
-27
Makefile.in
bus/Makefile.in
+126
-1211
activation.c
bus/activation.c
+15
-41
bus.c
bus/bus.c
+4
-31
config-parser-trivial.c
bus/config-parser-trivial.c
+2
-2
config-parser.c
bus/config-parser.c
+4
-0
connection.c
bus/connection.c
+126
-39
connection.h
bus/connection.h
+13
-0
dir-watch-inotify.c
bus/dir-watch-inotify.c
+6
-11
dir-watch-kqueue.c
bus/dir-watch-kqueue.c
+6
-11
driver.c
bus/driver.c
+12
-0
expirelist.c
bus/expirelist.c
+2
-13
main.c
bus/main.c
+36
-15
policy.c
bus/policy.c
+2
-2
signals.c
bus/signals.c
+96
-30
signals.h
bus/signals.h
+17
-8
stats.c
bus/stats.c
+352
-0
stats.h
bus/stats.h
+38
-0
test.c
bus/test.c
+4
-34
CMakeLists.txt
cmake/CMakeLists.txt
+23
-14
CMakeLists.txt
cmake/bus/CMakeLists.txt
+6
-0
config.h.cmake
cmake/config.h.cmake
+1
-0
readme-cmake.txt
cmake/readme-cmake.txt
+0
-39
CMakeLists.txt
cmake/test/CMakeLists.txt
+5
-11
CMakeLists.txt
cmake/test/name-test/CMakeLists.txt
+4
-4
CMakeLists.txt
cmake/tools/CMakeLists.txt
+0
-8
config.h.in
config.h.in
+3
-0
configure
configure
+50
-41
configure.ac
configure.ac
+28
-24
dbus-1-uninstalled.pc.in
dbus-1-uninstalled.pc.in
+1
-1
dbus-1.pc.in
dbus-1.pc.in
+1
-1
Makefile.am
dbus/Makefile.am
+30
-28
Makefile.in
dbus/Makefile.in
+44
-131
dbus-auth.c
dbus/dbus-auth.c
+2
-2
dbus-bus.c
dbus/dbus-bus.c
+11
-12
dbus-connection-internal.h
dbus/dbus-connection-internal.h
+14
-1
dbus-connection.c
dbus/dbus-connection.c
+245
-191
dbus-list.c
dbus/dbus-list.c
+12
-0
dbus-list.h
dbus/dbus-list.h
+5
-2
dbus-mainloop.c
dbus/dbus-mainloop.c
+315
-288
dbus-mainloop.h
dbus/dbus-mainloop.h
+4
-16
dbus-marshal-header.c
dbus/dbus-marshal-header.c
+36
-25
dbus-marshal-header.h
dbus/dbus-marshal-header.h
+4
-4
dbus-memory.c
dbus/dbus-memory.c
+17
-7
dbus-mempool.c
dbus/dbus-mempool.c
+42
-0
dbus-mempool.h
dbus/dbus-mempool.h
+6
-0
dbus-message-factory.c
dbus/dbus-message-factory.c
+10
-4
dbus-message-internal.h
dbus/dbus-message-internal.h
+1
-2
dbus-message-private.h
dbus/dbus-message-private.h
+0
-2
dbus-message-util.c
dbus/dbus-message-util.c
+2
-2
dbus-message.c
dbus/dbus-message.c
+61
-41
dbus-object-tree.c
dbus/dbus-object-tree.c
+14
-5
dbus-pending-call.c
dbus/dbus-pending-call.c
+12
-33
dbus-resources.c
dbus/dbus-resources.c
+63
-6
dbus-resources.h
dbus/dbus-resources.h
+4
-0
dbus-server-socket.c
dbus/dbus-server-socket.c
+1
-0
dbus-server.c
dbus/dbus-server.c
+64
-43
dbus-spawn-win.c
dbus/dbus-spawn-win.c
+47
-7
dbus-spawn.c
dbus/dbus-spawn.c
+77
-58
dbus-spawn.h
dbus/dbus-spawn.h
+6
-0
dbus-string-private.h
dbus/dbus-string-private.h
+11
-5
dbus-string-util.c
dbus/dbus-string-util.c
+0
-55
dbus-string.c
dbus/dbus-string.c
+12
-138
dbus-string.h
dbus/dbus-string.h
+4
-6
dbus-sysdeps-unix.c
dbus/dbus-sysdeps-unix.c
+35
-25
dbus-sysdeps-unix.h
dbus/dbus-sysdeps-unix.h
+0
-2
dbus-sysdeps-win.c
dbus/dbus-sysdeps-win.c
+31
-0
dbus-sysdeps.h
dbus/dbus-sysdeps.h
+1
-2
dbus-test.c
dbus/dbus-test.c
+1
-1
dbus-test.h
dbus/dbus-test.h
+0
-2
dbus-transport-socket.c
dbus/dbus-transport-socket.c
+4
-2
dbus-transport.c
dbus/dbus-transport.c
+35
-2
dbus-transport.h
dbus/dbus-transport.h
+6
-0
dbus-watch.c
dbus/dbus-watch.c
+17
-0
dbus-watch.h
dbus/dbus-watch.h
+4
-0
Makefile.am
doc/Makefile.am
+21
-13
Makefile.in
doc/Makefile.in
+106
-49
dbus-cleanup-sockets.1
doc/dbus-cleanup-sockets.1
+14
-14
dbus-daemon.1.in
doc/dbus-daemon.1.in
+77
-77
dbus-faq.html
doc/dbus-faq.html
+24
-24
dbus-launch.1
doc/dbus-launch.1
+57
-57
dbus-monitor.1
doc/dbus-monitor.1
+25
-25
dbus-send.1
doc/dbus-send.1
+23
-23
dbus-specification.html
doc/dbus-specification.html
+146
-68
dbus-specification.xml
doc/dbus-specification.xml
+174
-61
dbus-test-plan.html
doc/dbus-test-plan.html
+2
-2
dbus-uuidgen.1
doc/dbus-uuidgen.1
+21
-21
Makefile.am
test/Makefile.am
+73
-58
Makefile.in
test/Makefile.in
+223
-218
incoming-limit.conf
test/data/valid-config-files/incoming-limit.conf
+18
-0
session.conf
test/data/valid-config-files/session.conf
+63
-0
system.conf
test/data/valid-config-files/system.conf
+83
-0
dbus-daemon-eavesdrop.c
test/dbus-daemon-eavesdrop.c
+558
-0
dbus-daemon.c
test/dbus-daemon.c
+59
-16
Makefile.am
test/name-test/Makefile.am
+17
-52
Makefile.in
test/name-test/Makefile.in
+73
-224
test-utils.c
test/test-utils.c
+8
-56
Makefile.am
tools/Makefile.am
+32
-13
Makefile.in
tools/Makefile.in
+48
-43
dbus-launch-x11.c
tools/dbus-launch-x11.c
+1
-1
dbus-monitor.c
tools/dbus-monitor.c
+28
-9
No files found.
Makefile.am
View file @
3ec6cdd0
SUBDIRS
=
dbus bus doc tools
test
DIST_SUBDIRS
=
dbus bus doc tools
test
SUBDIRS
=
dbus bus tools
test
doc
pkgconfigdir
=
$(libdir)
/pkgconfig
pkgconfig_DATA
=
dbus-1.pc
...
...
Makefile.in
View file @
3ec6cdd0
...
...
@@ -159,6 +159,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir dist dist-all distcheck
ETAGS
=
etags
CTAGS
=
ctags
DIST_SUBDIRS
=
$(SUBDIRS)
DISTFILES
=
$(DIST_COMMON)
$(DIST_SOURCES)
$(TEXINFOS)
$(EXTRA_DIST)
distdir
=
$(PACKAGE)
-
$(VERSION)
top_distdir
=
$(distdir)
...
...
@@ -196,6 +197,7 @@ GZIP_ENV = --best
distuninstallcheck_listfiles
=
find
.
-type
f
-print
distcleancheck_listfiles
=
find
.
-type
f
-print
ACLOCAL
=
@ACLOCAL@
ADT_LIBS
=
@ADT_LIBS@
AMTAR
=
@AMTAR@
AM_DEFAULT_VERBOSITY
=
@AM_DEFAULT_VERBOSITY@
AR
=
@AR@
...
...
@@ -216,10 +218,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS
=
@CXXFLAGS@
CYGPATH_W
=
@CYGPATH_W@
DBUS_BINDIR
=
@DBUS_BINDIR@
DBUS_BUS_CFLAGS
=
@DBUS_BUS_CFLAGS@
DBUS_BUS_LIBS
=
@DBUS_BUS_LIBS@
DBUS_CLIENT_CFLAGS
=
@DBUS_CLIENT_CFLAGS@
DBUS_CLIENT_LIBS
=
@DBUS_CLIENT_LIBS@
DBUS_CONSOLE_AUTH_DIR
=
@DBUS_CONSOLE_AUTH_DIR@
DBUS_CONSOLE_OWNER_FILE
=
@DBUS_CONSOLE_OWNER_FILE@
DBUS_DAEMONDIR
=
@DBUS_DAEMONDIR@
...
...
@@ -231,8 +229,6 @@ DBUS_INT16_TYPE = @DBUS_INT16_TYPE@
DBUS_INT32_TYPE
=
@DBUS_INT32_TYPE@
DBUS_INT64_CONSTANT
=
@DBUS_INT64_CONSTANT@
DBUS_INT64_TYPE
=
@DBUS_INT64_TYPE@
DBUS_LAUNCHER_CFLAGS
=
@DBUS_LAUNCHER_CFLAGS@
DBUS_LAUNCHER_LIBS
=
@DBUS_LAUNCHER_LIBS@
DBUS_LIBEXECDIR
=
@DBUS_LIBEXECDIR@
DBUS_MAJOR_VERSION
=
@DBUS_MAJOR_VERSION@
DBUS_MICRO_VERSION
=
@DBUS_MICRO_VERSION@
...
...
@@ -244,8 +240,6 @@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
=
@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
DBUS_SYSTEM_PID_FILE
=
@DBUS_SYSTEM_PID_FILE@
DBUS_SYSTEM_SOCKET
=
@DBUS_SYSTEM_SOCKET@
DBUS_TEST_CFLAGS
=
@DBUS_TEST_CFLAGS@
DBUS_TEST_LIBS
=
@DBUS_TEST_LIBS@
DBUS_UINT64_CONSTANT
=
@DBUS_UINT64_CONSTANT@
DBUS_USER
=
@DBUS_USER@
DBUS_VERSION
=
@DBUS_VERSION@
...
...
@@ -283,6 +277,7 @@ LAUNCHCTL = @LAUNCHCTL@
LAUNCHD_AGENT_DIR
=
@LAUNCHD_AGENT_DIR@
LD
=
@LD@
LDFLAGS
=
@LDFLAGS@
LIBDBUS_LIBS
=
@LIBDBUS_LIBS@
LIBOBJS
=
@LIBOBJS@
LIBS
=
@LIBS@
LIBTOOL
=
@LIBTOOL@
...
...
@@ -299,6 +294,7 @@ MAKEINFO = @MAKEINFO@
MAN2HTML
=
@MAN2HTML@
MANIFEST_TOOL
=
@MANIFEST_TOOL@
MKDIR_P
=
@MKDIR_P@
NETWORK_libs
=
@NETWORK_libs@
NM
=
@NM@
NMEDIT
=
@NMEDIT@
OBJDUMP
=
@OBJDUMP@
...
...
@@ -318,6 +314,7 @@ RANLIB = @RANLIB@
RC
=
@RC@
R_DYNAMIC_LDFLAG
=
@R_DYNAMIC_LDFLAG@
SED
=
@SED@
SELINUX_LIBS
=
@SELINUX_LIBS@
SET_MAKE
=
@SET_MAKE@
SHELL
=
@SHELL@
STRIP
=
@STRIP@
...
...
@@ -334,10 +331,13 @@ TEST_SLEEP_FOREVER_BINARY = @TEST_SLEEP_FOREVER_BINARY@
TEST_SOCKET_DIR
=
@TEST_SOCKET_DIR@
TEST_VALID_SERVICE_DIR
=
@TEST_VALID_SERVICE_DIR@
TEST_VALID_SERVICE_SYSTEM_DIR
=
@TEST_VALID_SERVICE_SYSTEM_DIR@
THREAD_LIBS
=
@THREAD_LIBS@
VERSION
=
@VERSION@
WINDRES
=
@WINDRES@
XMKMF
=
@XMKMF@
XMLTO
=
@XMLTO@
XML_CFLAGS
=
@XML_CFLAGS@
XML_LIBS
=
@XML_LIBS@
XSLTPROC
=
@XSLTPROC@
X_CFLAGS
=
@X_CFLAGS@
X_EXTRA_LIBS
=
@X_EXTRA_LIBS@
...
...
@@ -397,8 +397,7 @@ target_alias = @target_alias@
top_build_prefix
=
@top_build_prefix@
top_builddir
=
@top_builddir@
top_srcdir
=
@top_srcdir@
SUBDIRS
=
dbus bus doc tools
test
DIST_SUBDIRS
=
dbus bus doc tools
test
SUBDIRS
=
dbus bus tools
test
doc
pkgconfigdir
=
$(libdir)
/pkgconfig
pkgconfig_DATA
=
dbus-1.pc
DISTCLEANFILES
=
\
...
...
NEWS
View file @
3ec6cdd0
D-Bus 1.5.4 (2010-06-10)
D-Bus 1.5.6 (2011-07-29)
==
The "weird, gravy-like aftertaste" release.
In addition to new features and refactoring, this release contains all of the
bugfixes from 1.4.14.
Potentially incompatible (Bustle and similar debugging tools will need
changes to work as intended):
• Do not allow match rules to "eavesdrop" (receive messages intended for a
different recipient) by mistake: eavesdroppers must now opt-in to this
behaviour by putting "eavesdrop='true'" in the match rule, which will
not have any practical effect on buses where eavesdropping is not allowed
(fd.o #37890, Cosimo Alfarano)
Other changes:
• D-Bus Specification version 0.18 (fd.o #37890, fd.o #39450, fd.o #38252;
Cosimo Alfarano, Simon McVittie)
· add the "eavesdrop" keyword to match rules
· define eavesdropping, unicast messages and broadcast messages
· stop claiming that match rules are needed to match unicast messages to you
· promote the type system to be a top-level section
• Use DBUS_ERROR_OBJECT_PATH_IN_USE if dbus_connection_try_register_object_path
or dbus_connection_try_register_fallback fails, not ...ADDRESS_IN_USE,
and simplify object-path registration (fd.o #38874, Jiří Klimeš)
• Consistently use atomic operations on everything that is ever manipulated
via atomic ops, as was done for changes to DBusConnection's refcount in
1.4.12 (fd.o #38005, Simon McVittie)
• Fix a file descriptor leak when connecting to a TCP socket (fd.o #37258,
Simon McVittie)
• Make "make check" in a clean tree work, by not running tests until
test data has been set up (fd.o #34405, Simon McVittie)
• The dbus-daemon no longer busy-loops if it has a very large number of file
descriptors (fd.o #23194, Simon McVittie)
• Refactor message flow through dispatching to avoid locking violations if
the bus daemon's message limit is hit; remove the per-connection link cache,
which was meant to improve performance, but now reduces it (fd.o #34393,
Simon McVittie)
• Some cmake fixes (Ralf Habacker)
• Remove dead code, mainly from DBusString (fd.o #38570, fd.o #39610;
Simon McVittie, Lennart Poettering)
• Stop storing two extra byte order indicators in each D-Bus message
(fd.o #38287, Simon McVittie)
• Add an optional Stats interface which can be used to get statistics from
a running dbus-daemon if enabled at configure time with --enable-stats
(fd.o #34040, Simon McVittie)
• Fix various typos (fd.o #27227, fd.o #38284; Sascha Silbe, Simon McVittie)
• Documentation (fd.o #36156, Simon McVittie):
· let xsltproc be overridden as usual: ./configure XSLTPROC=myxsltproc
· install more documentation automatically, including man2html output
· put dbus.devhelp in the right place (it must go in ${htmldir})
• Unix-specific:
· look for system services in /lib/dbus-1/system-services in addition to all
the other well-known locations; note that this should always be /lib,
even on platforms where shared libraries on the root FS would go in /lib64,
/lib/x86_64-linux-gnu or similar (fd.o #35229, Lennart Poettering)
· opt-in to fd passing on Solaris (fd.o #33465, Simon McVittie)
• Windows-specific (Ralf Habacker):
· fix use of a mutex for autolaunch server detection
· don't crash on malloc failure in _dbus_printf_string_upper_bound
D-Bus 1.5.4 (2011-06-10)
==
Security (local denial of service):
...
...
@@ -6,7 +84,7 @@ Security (local denial of service):
• Byte-swap foreign-endian messages correctly, preventing a long-standing
local DoS if foreign-endian messages are relayed through the dbus-daemon
(backporters: this is git commit c3223ba6c401ba81df1305851312a47c485e6cd7)
(
fd.o #38120, Debian #629938, no CVE number yet
; Simon McVittie)
(
CVE-2011-2200, fd.o #38120, Debian #629938
; Simon McVittie)
New things:
...
...
README
View file @
3ec6cdd0
...
...
@@ -77,28 +77,8 @@ Configuration flags
When using autotools, run "./configure --help" to see the possible
configuration options and environment variables.
When using the cmake build system the dbus-specific configuration flags that can be given
to the cmake program are these (use -D<key>=<value> on command line)
CMAKE_BUILD_TYPE set dbus build mode - one of Debug|Release|RelWithDebInfo|MinSizeRel
DBUS_BUILD_TESTS enable unit test code default=ON
DBUS_BUILD_X11 Build with X11 autolaunch support default=ON
HAVE_CONSOLE_OWNER_FILE enable console owner file (solaris only) ) default=ON
DBUS_DISABLE_ASSERTS Disable assertion checking default=OFF
DBUS_DISABLE_CHECKS Disable public API sanity checking default=OFF
DBUS_ENABLE_ABSTRACT_SOCKETS enable support for abstract sockets (linux only) default=ON
DBUS_ENABLE_ANSI enable -ansi -pedantic gcc flags default=OFF
DBUS_ENABLE_DNOTIFY build with dnotify support (linux only) default=ON
DBUS_ENABLE_VERBOSE_MODE support verbose debug mode default=ON
DBUS_ENABLE_DOXYGEN_DOCS build DOXYGEN documentation (requires Doxygen) default=ON
DBUS_GCOV_ENABLED compile with coverage profiling instrumentation (gcc only) default=OFF
DBUS_INSTALL_SYSTEM_LIBS install required system libraries default (windows only) =OFF
DBUS_USE_EXPAT Use expat (== ON) or libxml2 (==OFF) default=ON [1]
DBUS_USE_NONCE_TCP_DEFAULT_ADDRESS Use nonce tcp default address default=OFF
DBUS_USE_OUTPUT_DEBUG_STRING enable win32 debug port for message output default=OFF
[1] requires installed development package of the related dependency
When using cmake, inspect README.cmake to see the possible
configuration options and environment variables.
API/ABI Policy
===
...
...
@@ -160,3 +140,24 @@ Note that the high-level bindings are _separate projects_ from the
main D-Bus package, and have their own release cycles, levels of
maturity, and ABI stability policies. Please consult the documentation
for your binding.
Bootstrapping D-Bus on new platforms
===
A full build of D-Bus, with all regression tests enabled and run, has some
dependencies which themselves depend on D-Bus, either for compilation or
for some of *their* regression tests: GLib, dbus-glib and dbus-python are
currently affected.
To avoid circular dependencies, when bootstrapping D-Bus for the first time
on a new OS or CPU architecture, you can either cross-compile some of
those components, or choose the build order and options carefully:
* build and install D-Bus without tests
- do not use the --enable-modular-tests=yes configure option
- do not use the --enable-tests=yes configure option
* build and install GLib, again without tests
* use those versions of libdbus and GLib to build and install dbus-glib
* ... and use those to install dbus-python
* rebuild libdbus; this time you can run all of the tests
* rebuild GLib; this time you can run all of the tests
README.cygwin
View file @
3ec6cdd0
The cygwin dbus port is included in master branch of
dbus git repository since 1.3.1.
See cygwin/README for more information
s
about
See cygwin/README for more information about
the cygwin dbus port.
The cygwin port of dbus is maintained by:
...
...
README.win
View file @
3ec6cdd0
...
...
@@ -14,9 +14,9 @@ test not running yet and there is help needed to get them running.
Building
--------
DBus c
ould be build
on windows using automake or cmake. See the
file README for more information
s
.
Special cmake build instructions c
ould
be found in cmake/readme-cmake.txt
DBus c
an be built
on windows using automake or cmake. See the
file README for more information.
Special cmake build instructions c
an
be found in cmake/readme-cmake.txt
windbus and dbus4win Ports
...
...
@@ -78,7 +78,7 @@ FAQ
- Do you have any clue if dbus-win32 can run in a Windows CE environment?
dbus has been ported to wince, see README.wince for more information
s
dbus has been ported to wince, see README.wince for more information
- Do you know if the C++ binding made by OpenWengo will be easily portable to Windows?
...
...
bus/Makefile.am
View file @
3ec6cdd0
configdir
=
$(sysconfdir)
/dbus-1
dbus_daemon_execdir
=
$(DBUS_DAEMONDIR)
INCLUDES
=
-I
$(top_srcdir)
\
$(DBUS_BUS_CFLAGS)
\
DBUS_BUS_LIBS
=
\
$(XML_LIBS)
\
$(SELINUX_LIBS)
\
$(THREAD_LIBS)
\
$(ADT_LIBS)
\
$(NETWORK_libs)
\
$(NULL)
DBUS_LAUNCHER_LIBS
=
\
$(XML_LIBS)
\
$(THREAD_LIBS)
\
$(NETWORK_libs)
\
$(NULL)
AM_CPPFLAGS
=
\
-I
$(top_srcdir)
\
$(XML_CFLAGS)
\
-DDBUS_SYSTEM_CONFIG_FILE
=
\"
"
$(configdir)
/system.conf"
\"
\
-DDBUS_COMPILATION
-DDBUS_COMPILATION
\
-DDBUS_STATIC_BUILD
\
$(NULL)
# if assertions are enabled, improve backtraces
AM_LDFLAGS
=
@R_DYNAMIC_LDFLAG@
EFENCE
=
...
...
@@ -73,6 +93,8 @@ BUS_SOURCES= \
services.h
\
signals.c
\
signals.h
\
stats.c
\
stats.h
\
test.c
\
test.h
\
utils.c
\
...
...
@@ -83,14 +105,11 @@ dbus_daemon_SOURCES= \
$(BUS_SOURCES)
\
main.c
dbus_daemon_CPPFLAGS
=
-DDBUS_STATIC_BUILD
dbus_daemon_LDADD
=
\
$(top_builddir)
/dbus/libdbus-internal.la
\
$(EFENCE)
\
$(DBUS_BUS_LIBS)
dbus_daemon_LDFLAGS
=
@R_DYNAMIC_LDFLAG@
LAUNCH_HELPER_SOURCES
=
\
$(XML_SOURCES)
\
config-parser-common.c
\
...
...
@@ -110,13 +129,10 @@ dbus_daemon_launch_helper_SOURCES= \
activation-helper-bin.c
\
$(LAUNCH_HELPER_SOURCES)
dbus_daemon_launch_helper_CPPFLAGS
=
-DDBUS_STATIC_BUILD
dbus_daemon_launch_helper_LDADD
=
\
$(top_builddir)
/dbus/libdbus-internal.la
\
$(DBUS_LAUNCHER_LIBS)
dbus_daemon_launch_helper_LDFLAGS
=
@R_DYNAMIC_LDFLAG@
## we build another binary so we can do the launch testing without root privs.
## DO NOT INSTALL THIS FILE
dbus_daemon_launch_helper_test_SOURCES
=
\
...
...
@@ -127,8 +143,8 @@ dbus_daemon_launch_helper_test_LDADD= \
$(top_builddir)
/dbus/libdbus-internal.la
\
$(DBUS_LAUNCHER_LIBS)
dbus_daemon_launch_helper_test_
LDFLAGS
=
@R_DYNAMIC_LDFLAG@
dbus_daemon_launch_helper_test_CPPFLAGS
=
-DDBUS_STATIC_BUILD
\
dbus_daemon_launch_helper_test_
CPPFLAGS
=
\
$(AM_CPPFLAGS)
\
-DACTIVATION_LAUNCHER_TEST
## we build yet another binary so we can do the OOM tests
...
...
@@ -141,30 +157,32 @@ bus_test_launch_helper_LDADD= \
$(top_builddir)
/dbus/libdbus-internal.la
\
$(DBUS_LAUNCHER_LIBS)
bus_test_launch_helper_
LDFLAGS
=
@R_DYNAMIC_LDFLAG@
bus_test_launch_helper_CPPFLAGS
=
-DDBUS_STATIC_BUILD
\
bus_test_launch_helper_
CPPFLAGS
=
\
$(AM_CPPFLAGS)
\
-DACTIVATION_LAUNCHER_TEST
\
-DACTIVATION_LAUNCHER_DO_OOM
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
noinst_PROGRAMS
=
$(TESTS)
noinst_PROGRAMS
=
dbus_daemon_exec_PROGRAMS
=
dbus-daemon
if
DBUS_UNIX
libexec_PROGRAMS
=
dbus-daemon-launch-helper
endif
DBUS_UNIX
##
note that TESTS has special meaning (stuff to use in make check)
##
so if adding tests not to be run in make check, don't add them to
##
TESTS
TESTS
=
##
Note that TESTS has special meaning (stuff to use in make check).
##
We don't actually want to run any of these tests until test/ has been
##
compiled, so we don't put them in TESTS here; we run them in test/
## instead.
if
DBUS_BUILD_TESTS
TESTS_ENVIRONMENT
=
DBUS_TEST_DATA
=
$(top_builddir)
/test/data
DBUS_TEST_HOMEDIR
=
$(top_builddir)
/dbus
DBUS_FATAL_WARNINGS
=
1
DBUS_BLOCK_ON_ABORT
=
1
TESTS
+=
bus-test bus-test-system
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
# run as a test by test/Makefile.am
noinst_PROGRAMS
+=
bus-test bus-test-system
if
DBUS_UNIX
TESTS
+=
bus-test-launch-helper
# run as a test by test/Makefile.am
noinst_PROGRAMS
+=
bus-test-launch-helper
# this is used by the tests but is not,itself, a test
noinst_PROGRAMS
+=
dbus-daemon-launch-helper-test
endif
DBUS_UNIX
...
...
@@ -181,17 +199,13 @@ bus_test_system_SOURCES= \
utils.h
\
test-system.c
bus_test_system_CPPFLAGS
=
-DDBUS_STATIC_BUILD
bus_test_system_LDADD
=
$(top_builddir)
/dbus/libdbus-internal.la
$(DBUS_BUS_LIBS)
bus_test_system_LDFLAGS
=
@R_DYNAMIC_LDFLAG@
bus_test_SOURCES
=
\
$(BUS_SOURCES)
\
test-main.c
bus_test_CPPFLAGS
=
-DDBUS_STATIC_BUILD
bus_test_LDADD
=
$(top_builddir)
/dbus/libdbus-internal.la
$(DBUS_BUS_LIBS)
bus_test_LDFLAGS
=
@R_DYNAMIC_LDFLAG@
## mop up the gcov files
clean-local
:
...
...
bus/Makefile.in
View file @
3ec6cdd0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
bus/activation.c
View file @
3ec6cdd0
...
...
@@ -143,16 +143,6 @@ bus_pending_activation_entry_free (BusPendingActivationEntry *entry)
dbus_free
(
entry
);
}
static
void
handle_timeout_callback
(
DBusTimeout
*
timeout
,
void
*
data
)
{
BusPendingActivation
*
pending_activation
=
data
;
while
(
!
dbus_timeout_handle
(
pending_activation
->
timeout
))
_dbus_wait_for_memory
();
}
static
BusPendingActivation
*
bus_pending_activation_ref
(
BusPendingActivation
*
pending_activation
)
{
...
...
@@ -179,8 +169,7 @@ bus_pending_activation_unref (BusPendingActivation *pending_activation)
if
(
pending_activation
->
timeout_added
)
{
_dbus_loop_remove_timeout
(
bus_context_get_loop
(
pending_activation
->
activation
->
context
),
pending_activation
->
timeout
,
handle_timeout_callback
,
pending_activation
);
pending_activation
->
timeout
);
pending_activation
->
timeout_added
=
FALSE
;
}
...
...
@@ -1334,22 +1323,16 @@ handle_servicehelper_exit_error (int exit_code,
}
}
static
dbus_bool_t
babysitter_watch_callback
(
DBusWatch
*
watch
,
unsigned
int
condition
,
void
*
data
)
static
void
pending_activation_finished_cb
(
DBusBabysitter
*
babysitter
,
void
*
data
)
{
BusPendingActivation
*
pending_activation
=
data
;
dbus_bool_t
retval
;
DBusBabysitter
*
babysitter
;
dbus_bool_t
uses_servicehelper
;
babysitter
=
pending_activation
->
babysitter
;
_dbus_assert
(
babysitter
==
pending_activation
->
babysitter
);
_dbus_babysitter_ref
(
babysitter
);
retval
=
dbus_watch_handle
(
watch
,
condition
);
/* There are two major cases here; are we the system bus or the session? Here this
* is distinguished by whether or not we use a setuid helper launcher. With the launch helper,
* some process exit codes are meaningful, processed by handle_servicehelper_exit_error.
...
...
@@ -1360,15 +1343,7 @@ babysitter_watch_callback (DBusWatch *watch,
*/
uses_servicehelper
=
bus_context_get_servicehelper
(
pending_activation
->
activation
->
context
)
!=
NULL
;
/* FIXME this is broken in the same way that
* connection watches used to be; there should be
* a separate callback for status change, instead
* of doing "if we handled a watch status might
* have changed"
*
* Fixing this lets us move dbus_watch_handle
* calls into dbus-mainloop.c
*/
/* strictly speaking this is redundant with the check in dbus-spawn now */
if
(
_dbus_babysitter_get_child_exited
(
babysitter
))
{
DBusError
error
;
...
...
@@ -1428,8 +1403,6 @@ babysitter_watch_callback (DBusWatch *watch,
}
_dbus_babysitter_unref
(
babysitter
);
return
retval
;
}
static
dbus_bool_t
...
...
@@ -1438,9 +1411,9 @@ add_babysitter_watch (DBusWatch *watch,
{
BusPendingActivation
*
pending_activation
=
data
;
return
_dbus_loop_add_watch
(
bus_context_get_loop
(
pending_activation
->
activation
->
context
),
watch
,
babysitter_watch_callback
,
pending_activation
,
NULL
);
return
_dbus_loop_add_watch
(
bus_context_get_loop
(
pending_activation
->
activation
->
context
)
,
watch
);
}
static
void
...
...
@@ -1450,7 +1423,7 @@ remove_babysitter_watch (DBusWatch *watch,
BusPendingActivation
*
pending_activation
=
data
;
_dbus_loop_remove_watch
(
bus_context_get_loop
(
pending_activation
->
activation
->
context
),
watch
,
babysitter_watch_callback
,
pending_activation
);
watch
);
}
static
dbus_bool_t
...
...
@@ -1860,10 +1833,7 @@ bus_activation_activate_service (BusActivation *activation,
}
if
(
!
_dbus_loop_add_timeout
(
bus_context_get_loop
(
activation
->
context
),
pending_activation
->
timeout
,
handle_timeout_callback
,
pending_activation
,
NULL
))
pending_activation
->
timeout
))
{
_dbus_verbose
(
"Failed to add timeout for pending activation
\n
"
);
...
...
@@ -2133,6 +2103,10 @@ bus_activation_activate_service (BusActivation *activation,
_dbus_assert
(
pending_activation
->
babysitter
!=
NULL
);
_dbus_babysitter_set_result_function
(
pending_activation
->
babysitter
,
pending_activation_finished_cb
,
pending_activation
);
if
(
!
_dbus_babysitter_set_watch_functions
(
pending_activation
->
babysitter
,
add_babysitter_watch
,
remove_babysitter_watch
,
...
...
bus/bus.c
View file @
3ec6cdd0
...
...
@@ -102,19 +102,6 @@ server_get_context (DBusServer *server)
return
context
;
}
static
dbus_bool_t
server_watch_callback
(
DBusWatch
*
watch
,
unsigned
int
condition
,
void
*
data
)
{
/* FIXME this can be done in dbus-mainloop.c
* if the code in activation.c for the babysitter
* watch handler is fixed.
*/
return
dbus_watch_handle
(
watch
,
condition
);
}
static
dbus_bool_t
add_server_watch
(
DBusWatch
*
watch
,
void
*
data
)
...
...
@@ -124,9 +111,7 @@ add_server_watch (DBusWatch *watch,
context
=
server_get_context
(
server
);
return
_dbus_loop_add_watch
(
context
->
loop
,
watch
,
server_watch_callback
,
server
,
NULL
);
return
_dbus_loop_add_watch
(
context
->
loop
,
watch
);
}
static
void
...
...
@@ -138,17 +123,7 @@ remove_server_watch (DBusWatch *watch,
context
=
server_get_context
(
server
);
_dbus_loop_remove_watch
(
context
->
loop
,
watch
,
server_watch_callback
,
server
);
}
static
void
server_timeout_callback
(
DBusTimeout
*
timeout
,
void
*
data
)
{
/* can return FALSE on OOM but we just let it fire again later */
dbus_timeout_handle
(
timeout
);
_dbus_loop_remove_watch
(
context
->
loop
,
watch
);
}
static
dbus_bool_t
...
...
@@ -160,8 +135,7 @@ add_server_timeout (DBusTimeout *timeout,
context
=
server_get_context
(
server
);
return
_dbus_loop_add_timeout
(
context
->
loop
,
timeout
,
server_timeout_callback
,
server
,
NULL
);
return
_dbus_loop_add_timeout
(
context
->
loop
,
timeout
);
}
static
void
...
...
@@ -173,8 +147,7 @@ remove_server_timeout (DBusTimeout *timeout,
context
=
server_get_context
(
server
);
_dbus_loop_remove_timeout
(
context
->
loop
,
timeout
,
server_timeout_callback
,
server
);
_dbus_loop_remove_timeout
(
context
->
loop
,
timeout
);
}
static
void
...
...
bus/config-parser-trivial.c
View file @
3ec6cdd0
...
...
@@ -188,7 +188,7 @@ bus_config_parser_start_element (BusConfigParser *parser,
default:
{
/* we really don't care about the others... */
_dbus_verbose
(
" START We dont care about '%s' type '%i'
\n
"
,
element_name
,
parser
->
type
);
_dbus_verbose
(
" START We don
'
t care about '%s' type '%i'
\n
"
,
element_name
,
parser
->
type
);
break
;
}
}
...
...
@@ -289,7 +289,7 @@ bus_config_parser_content (BusConfigParser *parser,
default:
{
/* we don't care about the others... really */
_dbus_verbose
(
" CONTENTS We don
t care
'%s' type '%i'
\n
"
,
_dbus_string_get_const_data
(
&
content_sane
),
parser
->
type
);
_dbus_verbose
(
" CONTENTS We don
't care about
'%s' type '%i'
\n
"
,
_dbus_string_get_const_data
(
&
content_sane
),
parser
->
type
);
break
;
}
}
...
...
bus/config-parser.c
View file @
3ec6cdd0
...
...
@@ -3395,6 +3395,10 @@ static const char *test_system_service_dir_matches[] =
"/testusr/testshare/dbus-1/system-services"
,
#endif
DBUS_DATADIR
"/dbus-1/system-services"
,
#ifdef DBUS_UNIX
"/lib/dbus-1/system-services"
,
#endif
#ifdef DBUS_WIN
NULL
,
#endif
...
...
bus/connection.c
View file @
3ec6cdd0
...
...
@@ -62,6 +62,16 @@ struct BusConnections
DBusTimeout
*
expire_timeout
;
/**< Timeout for expiring incomplete connections. */
int
stamp
;
/**< Incrementing number */
BusExpireList
*
pending_replies
;
/**< List of pending replies */
#ifdef DBUS_ENABLE_STATS
int
total_match_rules
;
int
peak_match_rules
;
int
peak_match_rules_per_conn
;
int
total_bus_names
;
int
peak_bus_names
;
int
peak_bus_names_per_conn
;
#endif
};
static
dbus_int32_t
connection_data_slot
=
-
1
;
...
...
@@ -87,6 +97,11 @@ typedef struct
long
connection_tv_sec
;
/**< Time when we connected (seconds component) */
long
connection_tv_usec
;
/**< Time when we connected (microsec component) */
int
stamp
;
/**< connections->stamp last time we were traversed */
#ifdef DBUS_ENABLE_STATS
int
peak_match_rules
;
int
peak_bus_names
;
#endif
}
BusConnectionData
;
static
dbus_bool_t
bus_pending_reply_expired
(
BusExpireList
*
list
,
...
...
@@ -294,31 +309,13 @@ bus_connection_disconnected (DBusConnection *connection)
dbus_connection_unref
(
connection
);
}
static
dbus_bool_t
connection_watch_callback
(
DBusWatch
*
watch
,
unsigned
int
condition
,
void
*
data
)
{
/* FIXME this can be done in dbus-mainloop.c
* if the code in activation.c for the babysitter
* watch handler is fixed.
*/
#if 0
_dbus_verbose ("Calling handle_watch\n");
#endif
return
dbus_watch_handle
(
watch
,
condition
);
}
static
dbus_bool_t
add_connection_watch
(
DBusWatch
*
watch
,
void
*
data
)
{
DBusConnection
*
connection
=
data
;
return
_dbus_loop_add_watch
(
connection_get_loop
(
connection
),
watch
,
connection_watch_callback
,
connection
,
NULL
);
return
_dbus_loop_add_watch
(
connection_get_loop
(
connection
),
watch
);
}
static
void
...
...
@@ -327,18 +324,7 @@ remove_connection_watch (DBusWatch *watch,
{
DBusConnection
*
connection
=
data
;
_dbus_loop_remove_watch
(
connection_get_loop
(
connection
),
watch
,
connection_watch_callback
,
connection
);
}
static
void
connection_timeout_callback
(
DBusTimeout
*
timeout
,
void
*
data
)
{
/* DBusConnection *connection = data; */
/* can return FALSE on OOM but we just let it fire again later */
dbus_timeout_handle
(
timeout
);
_dbus_loop_remove_watch
(
connection_get_loop
(
connection
),
watch
);
}
static
dbus_bool_t
...
...
@@ -347,8 +333,7 @@ add_connection_timeout (DBusTimeout *timeout,
{
DBusConnection
*
connection
=
data
;
return
_dbus_loop_add_timeout
(
connection_get_loop
(
connection
),
timeout
,
connection_timeout_callback
,
connection
,
NULL
);
return
_dbus_loop_add_timeout
(
connection_get_loop
(
connection
),
timeout
);
}