diff options
author | Simon McVittie <smcv@debian.org> | 2011-07-29 14:56:59 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2011-07-29 14:56:59 +0100 |
commit | 201e26f277511adf0fbb67aa39d335f281c6085f (patch) | |
tree | 62c207bb898ba308d3f88ecac894d8004a57bd2c | |
parent | fbe6c26af93591f53d7439c810213d846d844d95 (diff) | |
download | dbus-201e26f277511adf0fbb67aa39d335f281c6085f.tar.gz |
Imported Upstream version 1.4.14upstream/1.4.14
48 files changed, 969 insertions, 801 deletions
diff --git a/Makefile.am b/Makefile.am index 52b40e9f..10b96703 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,4 @@ -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 diff --git a/Makefile.in b/Makefile.in index 6d90637f..f0b01671 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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) @@ -397,8 +398,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 = \ @@ -1,3 +1,42 @@ +D-Bus 1.4.14 (2011-07-29) +== + +The "Puny receptacle!" release. + +Changes: + +• 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 + (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) + +• 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.4.12 (2011-06-10) == @@ -6,7 +45,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: @@ -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 diff --git a/README.cygwin b/README.cygwin index 754b3e08..93e403ad 100755 --- a/README.cygwin +++ b/README.cygwin @@ -1,7 +1,7 @@ The cygwin dbus port is included in master branch of dbus git repository since 1.3.1. -See cygwin/README for more informations about +See cygwin/README for more information about the cygwin dbus port. The cygwin port of dbus is maintained by: @@ -14,9 +14,9 @@ test not running yet and there is help needed to get them running. Building -------- -DBus could be build on windows using automake or cmake. See the -file README for more informations. -Special cmake build instructions could be found in cmake/readme-cmake.txt +DBus can be built on windows using automake or cmake. See the +file README for more information. +Special cmake build instructions can 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 informations + 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? diff --git a/bus/Makefile.am b/bus/Makefile.am index 9761c27c..a3ddb6cf 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -146,25 +146,27 @@ bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \ -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 diff --git a/bus/Makefile.in b/bus/Makefile.in index 3526ae85..b334af5a 100644 --- a/bus/Makefile.in +++ b/bus/Makefile.in @@ -36,15 +36,19 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -noinst_PROGRAMS = $(am__EXEEXT_3) $(am__EXEEXT_4) +noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) dbus_daemon_exec_PROGRAMS = dbus-daemon$(EXEEXT) @DBUS_UNIX_TRUE@libexec_PROGRAMS = dbus-daemon-launch-helper$(EXEEXT) -TESTS = $(am__EXEEXT_1) $(am__EXEEXT_2) + +# run as a test by test/Makefile.am @DBUS_BUILD_TESTS_TRUE@am__append_1 = bus-test bus-test-system -@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_2 = bus-test-launch-helper + +# run as a test by test/Makefile.am # this is used by the tests but is not,itself, a test -@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_3 = dbus-daemon-launch-helper-test -@HAVE_SYSTEMD_TRUE@am__append_4 = \ +@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_2 = \ +@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@ bus-test-launch-helper \ +@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@ dbus-daemon-launch-helper-test +@HAVE_SYSTEMD_TRUE@am__append_3 = \ @HAVE_SYSTEMD_TRUE@ dbus.service.in \ @HAVE_SYSTEMD_TRUE@ dbus.socket.in @@ -77,9 +81,8 @@ am__installdirs = "$(DESTDIR)$(dbus_daemon_execdir)" \ "$(DESTDIR)$(configdir)" "$(DESTDIR)$(systemdsystemunitdir)" @DBUS_BUILD_TESTS_TRUE@am__EXEEXT_1 = bus-test$(EXEEXT) \ @DBUS_BUILD_TESTS_TRUE@ bus-test-system$(EXEEXT) -@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__EXEEXT_2 = bus-test-launch-helper$(EXEEXT) -am__EXEEXT_3 = $(am__EXEEXT_1) $(am__EXEEXT_2) -@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__EXEEXT_4 = dbus-daemon-launch-helper-test$(EXEEXT) +@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__EXEEXT_2 = bus-test-launch-helper$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@ dbus-daemon-launch-helper-test$(EXEEXT) PROGRAMS = $(dbus_daemon_exec_PROGRAMS) $(libexec_PROGRAMS) \ $(noinst_PROGRAMS) am__bus_test_SOURCES_DIST = activation.c activation.h \ @@ -306,8 +309,6 @@ DIST_SOURCES = $(am__bus_test_SOURCES_DIST) \ DATA = $(agent_DATA) $(config_DATA) $(systemdsystemunit_DATA) ETAGS = etags CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -632,7 +633,6 @@ bus_test_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD \ -DACTIVATION_LAUNCHER_TEST \ -DACTIVATION_LAUNCHER_DO_OOM -@DBUS_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1 bus_test_system_SOURCES = \ $(XML_SOURCES) \ config-parser-common.c \ @@ -656,7 +656,7 @@ bus_test_LDFLAGS = @R_DYNAMIC_LDFLAG@ #### Init scripts fun SCRIPT_IN_FILES = messagebus.in messagebus-config.in rc.messagebus.in \ - $(am__append_4) + $(am__append_3) @DBUS_INIT_SCRIPTS_RED_HAT_TRUE@initddir = $(sysconfdir)/rc.d/init.d @DBUS_INIT_SCRIPTS_SLACKWARE_TRUE@initddir = $(sysconfdir)/rc.d/ @DBUS_INIT_SCRIPTS_RED_HAT_TRUE@initd_SCRIPTS = \ @@ -2314,98 +2314,6 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -2437,7 +2345,6 @@ distdir: $(DISTFILES) fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) installdirs: @@ -2549,10 +2456,9 @@ uninstall-am: uninstall-agentDATA uninstall-binSCRIPTS \ uninstall-initdSCRIPTS uninstall-libexecPROGRAMS \ uninstall-systemdsystemunitDATA -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip +.MAKE: install-am install-data-am install-exec-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ +.PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-dbus_daemon_execPROGRAMS clean-generic \ clean-libexecPROGRAMS clean-libtool clean-local \ clean-noinstPROGRAMS ctags distclean distclean-compile \ diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c index f37b4fb4..6ef50f8e 100644 --- a/bus/config-parser-trivial.c +++ b/bus/config-parser-trivial.c @@ -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 dont 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; } } diff --git a/bus/config-parser.c b/bus/config-parser.c index c9dbdf93..f9432555 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -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 diff --git a/bus/policy.c b/bus/policy.c index a1fff861..4841f47c 100644 --- a/bus/policy.c +++ b/bus/policy.c @@ -403,8 +403,8 @@ list_allows_user (dbus_bool_t def, } else if (rule->type == BUS_POLICY_RULE_GROUP) { - _dbus_verbose ("List %p group rule uid="DBUS_UID_FORMAT"\n", - list, rule->d.user.uid); + _dbus_verbose ("List %p group rule gid="DBUS_GID_FORMAT"\n", + list, rule->d.group.gid); if (rule->d.group.gid == DBUS_GID_UNSET) ; /* '*' wildcard */ diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 7476975b..04f318a3 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -98,6 +98,8 @@ endif(NOT WIN32) #AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE) OPTION(DBUS_DISABLE_ASSERTS "Disable assertion checking" OFF) +option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF) + # do config checks INCLUDE(ConfigureChecks.cmake) @@ -557,6 +559,7 @@ message(" Building unit tests: ${DBUS_BUILD_TESTS} " message(" Building verbose mode: ${DBUS_ENABLE_VERBOSE_MODE} ") message(" Building w/o assertions: ${DBUS_DISABLE_ASSERTS} ") message(" Building w/o checks: ${DBUS_DISABLE_CHECKS} ") +message(" Building bus stats API: ${DBUS_ENABLE_STATS} ") message(" installing system libs: ${DBUS_INSTALL_SYSTEM_LIBS} ") #message(" Building SELinux support: ${have_selinux} ") #message(" Building dnotify support: ${have_dnotify} ") diff --git a/cmake/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt index 876be810..1db519f8 100644 --- a/cmake/bus/CMakeLists.txt +++ b/cmake/bus/CMakeLists.txt @@ -74,6 +74,12 @@ set (BUS_SOURCES ${XML_SOURCES} ${DIR_WATCH_SOURCE} ) +if(DBUS_ENABLE_STATS) + list(APPEND BUS_SOURCES + ${BUS_DIR}/stats.c + ${BUS_DIR}/stats.h + ) +endif() include_directories(${XML_INCLUDE_DIR}) diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index df3d45a4..6bc6aa56 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -25,6 +25,7 @@ #cmakedefine DBUS_MICRO_VERSION @DBUS_MICRO_VERSION@ #cmakedefine DBUS_VERSION ((@DBUS_MAJOR_VERSION@ << 16) | (@DBUS_MINOR_VERSION@ << 8) | (@DBUS_MICRO_VERSION@)) #cmakedefine DBUS_VERSION_STRING "@DBUS_VERSION_STRING@" +#cmakedefine DBUS_ENABLE_STATS #define VERSION DBUS_VERSION_STRING diff --git a/cmake/readme-cmake.txt b/cmake/readme-cmake.txt deleted file mode 100644 index 4056d3cc..00000000 --- a/cmake/readme-cmake.txt +++ /dev/null @@ -1,39 +0,0 @@ -This directory contains configuration files for the cmake build system - -Requirements ------------- -- cmake version >= 2.4.4 see http://www.cmake.org -- installed libxml2 or libexpat - -Building --------- - -unix -1. install cmake and libxml or libexpat -2. get dbus sources -3. mkdir dbus-build -4. cd dbus-build -5. cmake <dbus-src-root>/cmake or cmake -DDBUS_USE_EXPAT=on <dbus-src-root>/cmake in case libexpat should de used -5. make -6. make install - -win32-mingw -1. install cmake and libxml or libexpat in <ProgramDir>\gnuwin32 -2. get dbus sources -3. mkdir dbus-build -4. cd dbus-build -5. cmake -G "MinGW Makefiles" <dbus-src-root>/cmake -6. make -7. make install - -win32-msvc -1. install cmake and libxml or libexpat in <ProgramDir>\gnuwin32 -2. get dbus sources -3. mkdir dbus-build -4. cd dbus-build -5. cmake -G <msvc available target, see cmake --help for a list> <dbus-src-root>/cmake -6. make -7. make install - -A list of all available build options could be find in the file ../README. - @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for dbus 1.4.12. +# Generated by GNU Autoconf 2.68 for dbus 1.4.14. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=dbus>. # @@ -571,8 +571,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dbus' PACKAGE_TARNAME='dbus' -PACKAGE_VERSION='1.4.12' -PACKAGE_STRING='dbus 1.4.12' +PACKAGE_VERSION='1.4.14' +PACKAGE_STRING='dbus 1.4.14' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=dbus' PACKAGE_URL='' @@ -1484,7 +1484,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dbus 1.4.12 to adapt to many kinds of systems. +\`configure' configures dbus 1.4.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1558,7 +1558,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dbus 1.4.12:";; + short | recursive ) echo "Configuration of dbus 1.4.14:";; esac cat <<\_ACEOF @@ -1736,7 +1736,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dbus configure 1.4.12 +dbus configure 1.4.14 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2450,7 +2450,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dbus $as_me 1.4.12, which was +It was created by dbus $as_me 1.4.14, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3342,7 +3342,7 @@ fi # Define the identity of the package. PACKAGE='dbus' - VERSION='1.4.12' + VERSION='1.4.14' cat >>confdefs.h <<_ACEOF @@ -3539,8 +3539,8 @@ LT_AGE=5 DBUS_MAJOR_VERSION=1 DBUS_MINOR_VERSION=4 -DBUS_MICRO_VERSION=12 -DBUS_VERSION=1.4.12 +DBUS_MICRO_VERSION=14 +DBUS_VERSION=1.4.14 @@ -20758,6 +20758,9 @@ case $host_os in solaris*) # Solaris' C library apparently needs these runes to be threadsafe... CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT" + # ... and this opt-in to get file descriptor passing support + CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500" + ;; esac ### Doxygen Documentation @@ -20838,7 +20841,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_doxygen_docs" >&5 $as_echo "$enable_doxygen_docs" >&6; } -XSLTPROC=false for ac_prog in xsltproc do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -20881,7 +20883,7 @@ fi test -n "$XSLTPROC" && break done - if test "$XSLTPROC" != false; then + if test "x$XSLTPROC" != "x"; then DBUS_HAVE_XSLTPROC_TRUE= DBUS_HAVE_XSLTPROC_FALSE='#' else @@ -22268,7 +22270,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dbus $as_me 1.4.12, which was +This file was extended by dbus $as_me 1.4.14, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22334,7 +22336,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dbus config.status 1.4.12 +dbus config.status 1.4.14 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 408054bd..539213f3 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.63]) m4_define([dbus_major_version], [1]) m4_define([dbus_minor_version], [4]) -m4_define([dbus_micro_version], [12]) +m4_define([dbus_micro_version], [14]) m4_define([dbus_version], [dbus_major_version.dbus_minor_version.dbus_micro_version]) AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus]) @@ -1231,6 +1231,9 @@ case $host_os in solaris*) # Solaris' C library apparently needs these runes to be threadsafe... CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT" + # ... and this opt-in to get file descriptor passing support + CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500" + ;; esac ### Doxygen Documentation @@ -1262,9 +1265,8 @@ fi AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes) AC_MSG_RESULT($enable_doxygen_docs) -XSLTPROC=false AC_CHECK_PROGS([XSLTPROC], [xsltproc]) -AM_CONDITIONAL(DBUS_HAVE_XSLTPROC, test "$XSLTPROC" != false) +AM_CONDITIONAL([DBUS_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"]) ### XML Documentation diff --git a/dbus/Makefile.am b/dbus/Makefile.am index 2e6ca1de..094773c9 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -269,20 +269,13 @@ libdbus_internal_la_CPPFLAGS = -DDBUS_STATIC_BUILD libdbus_internal_la_LIBADD=$(DBUS_CLIENT_LIBS) libdbus_internal_la_LDFLAGS=$(export_symbols_internal) @R_DYNAMIC_LDFLAG@ -## 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 +noinst_PROGRAMS = + if DBUS_BUILD_TESTS -TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus -TESTS=dbus-test -else -TESTS= +# We can't actually run this til we've reached test/ +noinst_PROGRAMS += dbus-test endif -## we use noinst_PROGRAMS not check_PROGRAMS so that we build -## even when not doing "make check" -noinst_PROGRAMS=$(TESTS) - dbus_test_SOURCES= \ dbus-test-main.c diff --git a/dbus/Makefile.in b/dbus/Makefile.in index 65793af3..bdc83e73 100644 --- a/dbus/Makefile.in +++ b/dbus/Makefile.in @@ -37,8 +37,10 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @DBUS_WIN_FALSE@libdbus_1_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -@DBUS_BUILD_TESTS_TRUE@TESTS = dbus-test$(EXEEXT) noinst_PROGRAMS = $(am__EXEEXT_1) + +# We can't actually run this til we've reached test/ +@DBUS_BUILD_TESTS_TRUE@am__append_1 = dbus-test subdir = dbus DIST_COMMON = $(dbusinclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/dbus-arch-deps.h.in \ @@ -342,8 +344,6 @@ DIST_SOURCES = $(am__libdbus_1_la_SOURCES_DIST) \ HEADERS = $(dbusinclude_HEADERS) $(nodist_dbusarchinclude_HEADERS) ETAGS = etags CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -782,7 +782,6 @@ libdbus_1_la_LDFLAGS = $(export_symbols) -version-info $(LT_CURRENT):$(LT_REVISI libdbus_internal_la_CPPFLAGS = -DDBUS_STATIC_BUILD libdbus_internal_la_LIBADD = $(DBUS_CLIENT_LIBS) libdbus_internal_la_LDFLAGS = $(export_symbols_internal) @R_DYNAMIC_LDFLAG@ -@DBUS_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus dbus_test_SOURCES = \ dbus-test-main.c @@ -2175,98 +2174,6 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -2298,7 +2205,6 @@ distdir: $(DISTFILES) fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) @@ -2406,10 +2312,10 @@ ps-am: uninstall-am: uninstall-dbusincludeHEADERS uninstall-libLTLIBRARIES \ uninstall-nodist_dbusarchincludeHEADERS -.MAKE: all check check-am install install-am install-strip +.MAKE: all check install install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c index 270d85e4..d2c37a7a 100644 --- a/dbus/dbus-auth.c +++ b/dbus/dbus-auth.c @@ -2067,7 +2067,7 @@ handle_client_state_waiting_for_agree_unix_fd(DBusAuth *auth, case DBUS_AUTH_COMMAND_AGREE_UNIX_FD: _dbus_assert(auth->unix_fd_possible); auth->unix_fd_negotiated = TRUE; - _dbus_verbose("Sucessfully negotiated UNIX FD passing\n"); + _dbus_verbose("Successfully negotiated UNIX FD passing\n"); return send_begin (auth); case DBUS_AUTH_COMMAND_ERROR: @@ -2794,7 +2794,7 @@ _dbus_auth_set_unix_fd_possible(DBusAuth *auth, dbus_bool_t b) } /** - * Queries whether unix fd passing was sucessfully negotiated. + * Queries whether unix fd passing was successfully negotiated. * * @param auth the auth conversion * @returns #TRUE when unix fd passing was negotiated. diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index c2720e7b..8b8310dd 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -341,8 +341,14 @@ static dbus_bool_t _dbus_connection_peek_for_reply_unlocked (DB static DBusMessageFilter * _dbus_message_filter_ref (DBusMessageFilter *filter) { - _dbus_assert (filter->refcount.value > 0); +#ifdef DBUS_DISABLE_ASSERT _dbus_atomic_inc (&filter->refcount); +#else + dbus_int32_t old_value; + + old_value = _dbus_atomic_inc (&filter->refcount); + _dbus_assert (old_value > 0); +#endif return filter; } @@ -350,9 +356,12 @@ _dbus_message_filter_ref (DBusMessageFilter *filter) static void _dbus_message_filter_unref (DBusMessageFilter *filter) { - _dbus_assert (filter->refcount.value > 0); + dbus_int32_t old_value; - if (_dbus_atomic_dec (&filter->refcount) == 1) + old_value = _dbus_atomic_dec (&filter->refcount); + _dbus_assert (old_value > 0); + + if (old_value == 1) { if (filter->free_user_data_function) (* filter->free_user_data_function) (filter->user_data); @@ -1309,8 +1318,9 @@ _dbus_connection_new_for_transport (DBusTransport *transport) if (_dbus_modify_sigpipe) _dbus_disable_sigpipe (); - - connection->refcount.value = 1; + + /* initialized to 0: use atomic op to avoid mixing atomic and non-atomic */ + _dbus_atomic_inc (&connection->refcount); connection->transport = transport; connection->watches = watch_list; connection->timeouts = timeout_list; @@ -2107,23 +2117,15 @@ _dbus_connection_send_and_unlock (DBusConnection *connection, void _dbus_connection_close_if_only_one_ref (DBusConnection *connection) { - dbus_int32_t tmp_refcount; + dbus_int32_t refcount; CONNECTION_LOCK (connection); - /* We increment and then decrement the refcount, because there is no - * _dbus_atomic_get (mirroring the fact that there's no InterlockedGet - * on Windows). */ - _dbus_atomic_inc (&connection->refcount); - tmp_refcount = _dbus_atomic_dec (&connection->refcount); + refcount = _dbus_atomic_get (&connection->refcount); + /* The caller should have at least one ref */ + _dbus_assert (refcount >= 1); - /* The caller should have one ref, and this function temporarily took - * one more, which is reflected in this count even though we already - * released it (relying on the caller's ref) due to _dbus_atomic_dec - * semantics */ - _dbus_assert (tmp_refcount >= 2); - - if (tmp_refcount == 2) + if (refcount == 1) _dbus_connection_close_possibly_shared_and_unlock (connection); else CONNECTION_UNLOCK (connection); @@ -2654,9 +2656,9 @@ _dbus_connection_last_unref (DBusConnection *connection) DBusList *link; _dbus_verbose ("Finalizing connection %p\n", connection); - - _dbus_assert (connection->refcount.value == 0); - + + _dbus_assert (_dbus_atomic_get (&connection->refcount) == 0); + /* You have to disconnect the connection before unref:ing it. Otherwise * you won't get the disconnected message. */ @@ -5415,8 +5417,8 @@ dbus_connection_add_filter (DBusConnection *connection, if (filter == NULL) return FALSE; - filter->refcount.value = 1; - + _dbus_atomic_inc (&filter->refcount); + CONNECTION_LOCK (connection); if (!_dbus_list_append (&connection->filter_list, @@ -5516,7 +5518,7 @@ dbus_connection_remove_filter (DBusConnection *connection, * @param user_data data to pass to functions in the vtable * @param error address where an error can be returned * @returns #FALSE if an error (#DBUS_ERROR_NO_MEMORY or - * #DBUS_ERROR_ADDRESS_IN_USE) is reported + * #DBUS_ERROR_OBJECT_PATH_IN_USE) is reported */ dbus_bool_t dbus_connection_try_register_object_path (DBusConnection *connection, @@ -5562,7 +5564,8 @@ dbus_connection_try_register_object_path (DBusConnection *connectio * @param path a '/' delimited string of path elements * @param vtable the virtual table * @param user_data data to pass to functions in the vtable - * @returns #FALSE if not enough memory + * @returns #FALSE if an error (#DBUS_ERROR_NO_MEMORY or + * #DBUS_ERROR_OBJECT_PATH_IN_USE) ocurred */ dbus_bool_t dbus_connection_register_object_path (DBusConnection *connection, @@ -5593,7 +5596,7 @@ dbus_connection_register_object_path (DBusConnection *connection, dbus_free_string_array (decomposed_path); - if (dbus_error_has_name (&error, DBUS_ERROR_ADDRESS_IN_USE)) + if (dbus_error_has_name (&error, DBUS_ERROR_OBJECT_PATH_IN_USE)) { _dbus_warn ("%s\n", error.message); dbus_error_free (&error); @@ -5615,7 +5618,7 @@ dbus_connection_register_object_path (DBusConnection *connection, * @param user_data data to pass to functions in the vtable * @param error address where an error can be returned * @returns #FALSE if an error (#DBUS_ERROR_NO_MEMORY or - * #DBUS_ERROR_ADDRESS_IN_USE) is reported + * #DBUS_ERROR_OBJECT_PATH_IN_USE) is reported */ dbus_bool_t dbus_connection_try_register_fallback (DBusConnection *connection, @@ -5663,7 +5666,8 @@ dbus_connection_try_register_fallback (DBusConnection *connection, * @param path a '/' delimited string of path elements * @param vtable the virtual table * @param user_data data to pass to functions in the vtable - * @returns #FALSE if not enough memory + * @returns #FALSE if an error (#DBUS_ERROR_NO_MEMORY or + * #DBUS_ERROR_OBJECT_PATH_IN_USE) occured */ dbus_bool_t dbus_connection_register_fallback (DBusConnection *connection, @@ -5694,7 +5698,7 @@ dbus_connection_register_fallback (DBusConnection *connection, dbus_free_string_array (decomposed_path); - if (dbus_error_has_name (&error, DBUS_ERROR_ADDRESS_IN_USE)) + if (dbus_error_has_name (&error, DBUS_ERROR_OBJECT_PATH_IN_USE)) { _dbus_warn ("%s\n", error.message); dbus_error_free (&error); diff --git a/dbus/dbus-memory.c b/dbus/dbus-memory.c index a37759c0..ee40e82b 100644 --- a/dbus/dbus-memory.c +++ b/dbus/dbus-memory.c @@ -295,7 +295,7 @@ _dbus_decrement_fail_alloc_counter (void) int _dbus_get_malloc_blocks_outstanding (void) { - return n_blocks_outstanding.value; + return _dbus_atomic_get (&n_blocks_outstanding); } /** @@ -634,10 +634,15 @@ dbus_free (void *memory) check_guards (memory, TRUE); if (memory) { - _dbus_atomic_dec (&n_blocks_outstanding); - - _dbus_assert (n_blocks_outstanding.value >= 0); - +#ifdef DBUS_DISABLE_ASSERT + _dbus_atomic_dec (&n_blocks_outstanding); +#else + dbus_int32_t old_value; + + old_value = _dbus_atomic_dec (&n_blocks_outstanding); + _dbus_assert (old_value >= 1); +#endif + free (((unsigned char*)memory) - GUARD_START_OFFSET); } @@ -648,9 +653,14 @@ dbus_free (void *memory) if (memory) /* we guarantee it's safe to free (NULL) */ { #ifdef DBUS_BUILD_TESTS +#ifdef DBUS_DISABLE_ASSERT _dbus_atomic_dec (&n_blocks_outstanding); - - _dbus_assert (n_blocks_outstanding.value >= 0); +#else + dbus_int32_t old_value; + + old_value = _dbus_atomic_dec (&n_blocks_outstanding); + _dbus_assert (old_value >= 1); +#endif #endif free (memory); diff --git a/dbus/dbus-message-util.c b/dbus/dbus-message-util.c index e06886a1..f7859520 100644 --- a/dbus/dbus-message-util.c +++ b/dbus/dbus-message-util.c @@ -619,8 +619,8 @@ process_test_subdir (const DBusString *test_base_dir, { if (_dbus_string_ends_with_c_str (&filename, ".message")) { - _dbus_warn ("Could not load %s, message builder language no longer supported\n", - _dbus_string_get_const_data (&filename)); + printf ("SKIP: Could not load %s, message builder language no longer supported\n", + _dbus_string_get_const_data (&filename)); } _dbus_verbose ("Skipping non-.message file %s\n", diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index a59ed9bf..a95ad0fa 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -526,7 +526,8 @@ dbus_message_get_cached (void) _dbus_assert (i < MAX_MESSAGE_CACHE_SIZE); _dbus_assert (message != NULL); - _dbus_assert (message->refcount.value == 0); + _dbus_assert (_dbus_atomic_get (&message->refcount) == 0); + _dbus_assert (message->counters == NULL); _DBUS_UNLOCK (message_cache); @@ -586,8 +587,8 @@ dbus_message_cache_or_finalize (DBusMessage *message) { dbus_bool_t was_cached; int i; - - _dbus_assert (message->refcount.value == 0); + + _dbus_assert (_dbus_atomic_get (&message->refcount) == 0); /* This calls application code and has to be done first thing * without holding the lock @@ -649,8 +650,8 @@ dbus_message_cache_or_finalize (DBusMessage *message) #endif out: - _dbus_assert (message->refcount.value == 0); - + _dbus_assert (_dbus_atomic_get (&message->refcount) == 0); + _DBUS_UNLOCK (message_cache); if (!was_cached) @@ -1039,7 +1040,7 @@ dbus_message_get_reply_serial (DBusMessage *message) static void dbus_message_finalize (DBusMessage *message) { - _dbus_assert (message->refcount.value == 0); + _dbus_assert (_dbus_atomic_get (&message->refcount) == 0); /* This calls application callbacks! */ _dbus_data_slot_list_free (&message->slot_list); @@ -1056,8 +1057,8 @@ dbus_message_finalize (DBusMessage *message) dbus_free(message->unix_fds); #endif - _dbus_assert (message->refcount.value == 0); - + _dbus_assert (_dbus_atomic_get (&message->refcount) == 0); + dbus_free (message); } @@ -1076,7 +1077,7 @@ dbus_message_new_empty_header (void) else { from_cache = FALSE; - message = dbus_new (DBusMessage, 1); + message = dbus_new0 (DBusMessage, 1); if (message == NULL) return NULL; #ifndef DBUS_DISABLE_CHECKS @@ -1088,8 +1089,9 @@ dbus_message_new_empty_header (void) message->n_unix_fds_allocated = 0; #endif } - - message->refcount.value = 1; + + _dbus_atomic_inc (&message->refcount); + message->byte_order = DBUS_COMPILER_BYTE_ORDER; message->locked = FALSE; #ifndef DBUS_DISABLE_CHECKS @@ -1448,7 +1450,7 @@ dbus_message_copy (const DBusMessage *message) if (retval == NULL) return NULL; - retval->refcount.value = 1; + _dbus_atomic_inc (&retval->refcount); retval->byte_order = message->byte_order; retval->locked = FALSE; #ifndef DBUS_DISABLE_CHECKS @@ -1519,14 +1521,20 @@ dbus_message_copy (const DBusMessage *message) DBusMessage * dbus_message_ref (DBusMessage *message) { +#ifndef DBUS_DISABLE_ASSERT dbus_int32_t old_refcount; +#endif _dbus_return_val_if_fail (message != NULL, NULL); _dbus_return_val_if_fail (message->generation == _dbus_current_generation, NULL); _dbus_return_val_if_fail (!message->in_cache, NULL); - + +#ifdef DBUS_DISABLE_ASSERT + _dbus_atomic_inc (&message->refcount); +#else old_refcount = _dbus_atomic_inc (&message->refcount); _dbus_assert (old_refcount >= 1); +#endif return message; } @@ -1549,7 +1557,7 @@ dbus_message_unref (DBusMessage *message) old_refcount = _dbus_atomic_dec (&message->refcount); - _dbus_assert (old_refcount >= 0); + _dbus_assert (old_refcount >= 1); if (old_refcount == 1) { diff --git a/dbus/dbus-object-tree.c b/dbus/dbus-object-tree.c index 28cfc8b4..d244045c 100644 --- a/dbus/dbus-object-tree.c +++ b/dbus/dbus-object-tree.c @@ -950,7 +950,7 @@ allocate_subtree_object (const char *name) len = strlen (name); - subtree = dbus_malloc (MAX (front_padding + (len + 1), sizeof (DBusObjectSubtree))); + subtree = dbus_malloc0 (MAX (front_padding + (len + 1), sizeof (DBusObjectSubtree))); if (subtree == NULL) return NULL; @@ -987,7 +987,7 @@ _dbus_object_subtree_new (const char *name, } subtree->user_data = user_data; - subtree->refcount.value = 1; + _dbus_atomic_inc (&subtree->refcount); subtree->subtrees = NULL; subtree->n_subtrees = 0; subtree->max_subtrees = 0; @@ -1002,8 +1002,14 @@ _dbus_object_subtree_new (const char *name, static DBusObjectSubtree * _dbus_object_subtree_ref (DBusObjectSubtree *subtree) { - _dbus_assert (subtree->refcount.value > 0); +#ifdef DBUS_DISABLE_ASSERT _dbus_atomic_inc (&subtree->refcount); +#else + dbus_int32_t old_value; + + old_value = _dbus_atomic_inc (&subtree->refcount); + _dbus_assert (old_value > 0); +#endif return subtree; } @@ -1011,9 +1017,12 @@ _dbus_object_subtree_ref (DBusObjectSubtree *subtree) static void _dbus_object_subtree_unref (DBusObjectSubtree *subtree) { - _dbus_assert (subtree->refcount.value > 0); + dbus_int32_t old_value; + + old_value = _dbus_atomic_dec (&subtree->refcount); + _dbus_assert (old_value > 0); - if (_dbus_atomic_dec (&subtree->refcount) == 1) + if (old_value == 1) { _dbus_assert (subtree->unregister_function == NULL); _dbus_assert (subtree->message_function == NULL); diff --git a/dbus/dbus-pending-call.c b/dbus/dbus-pending-call.c index 70392b79..cfb2bafe 100644 --- a/dbus/dbus-pending-call.c +++ b/dbus/dbus-pending-call.c @@ -133,8 +133,8 @@ _dbus_pending_call_new_unlocked (DBusConnection *connection, { pending->timeout = NULL; } - - pending->refcount.value = 1; + + _dbus_atomic_inc (&pending->refcount); pending->connection = connection; _dbus_connection_ref_unlocked (pending->connection); @@ -374,8 +374,8 @@ _dbus_pending_call_set_timeout_error_unlocked (DBusPendingCall *pending, DBusPendingCall * _dbus_pending_call_ref_unlocked (DBusPendingCall *pending) { - pending->refcount.value += 1; - + _dbus_atomic_inc (&pending->refcount); + return pending; } @@ -433,15 +433,14 @@ _dbus_pending_call_last_unref (DBusPendingCall *pending) void _dbus_pending_call_unref_and_unlock (DBusPendingCall *pending) { - dbus_bool_t last_unref; - - _dbus_assert (pending->refcount.value > 0); + dbus_int32_t old_refcount; - pending->refcount.value -= 1; - last_unref = pending->refcount.value == 0; + old_refcount = _dbus_atomic_dec (&pending->refcount); + _dbus_assert (old_refcount > 0); CONNECTION_UNLOCK (pending->connection); - if (last_unref) + + if (old_refcount == 1) _dbus_pending_call_last_unref (pending); } @@ -554,19 +553,8 @@ dbus_pending_call_ref (DBusPendingCall *pending) { _dbus_return_val_if_fail (pending != NULL, NULL); - /* The connection lock is better than the global - * lock in the atomic increment fallback - */ -#ifdef DBUS_HAVE_ATOMIC_INT _dbus_atomic_inc (&pending->refcount); -#else - CONNECTION_LOCK (pending->connection); - _dbus_assert (pending->refcount.value > 0); - pending->refcount.value += 1; - CONNECTION_UNLOCK (pending->connection); -#endif - return pending; } @@ -583,19 +571,8 @@ dbus_pending_call_unref (DBusPendingCall *pending) _dbus_return_if_fail (pending != NULL); - /* More efficient to use the connection lock instead of atomic - * int fallback if we lack atomic int decrement - */ -#ifdef DBUS_HAVE_ATOMIC_INT last_unref = (_dbus_atomic_dec (&pending->refcount) == 1); -#else - CONNECTION_LOCK (pending->connection); - _dbus_assert (pending->refcount.value > 0); - pending->refcount.value -= 1; - last_unref = pending->refcount.value == 0; - CONNECTION_UNLOCK (pending->connection); -#endif - + if (last_unref) _dbus_pending_call_last_unref(pending); } diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c index 60d14b33..5383a66a 100644 --- a/dbus/dbus-server.c +++ b/dbus/dbus-server.c @@ -99,7 +99,16 @@ _dbus_server_init_base (DBusServer *server, const DBusString *address) { server->vtable = vtable; - server->refcount.value = 1; + +#ifdef DBUS_DISABLE_ASSERT + _dbus_atomic_inc (&server->refcount); +#else + { + dbus_int32_t old_refcount = _dbus_atomic_inc (&server->refcount); + + _dbus_assert (old_refcount == 0); + } +#endif server->address = NULL; server->watches = NULL; @@ -434,16 +443,16 @@ void _dbus_server_ref_unlocked (DBusServer *server) { _dbus_assert (server != NULL); - _dbus_assert (server->refcount.value > 0); - HAVE_LOCK_CHECK (server); -#ifdef DBUS_HAVE_ATOMIC_INT +#ifdef DBUS_DISABLE_ASSERT _dbus_atomic_inc (&server->refcount); #else - _dbus_assert (server->refcount.value > 0); + { + dbus_int32_t old_refcount = _dbus_atomic_inc (&server->refcount); - server->refcount.value += 1; + _dbus_assert (old_refcount > 0); + } #endif } @@ -455,25 +464,18 @@ _dbus_server_ref_unlocked (DBusServer *server) void _dbus_server_unref_unlocked (DBusServer *server) { - dbus_bool_t last_unref; + dbus_int32_t old_refcount; /* Keep this in sync with dbus_server_unref */ - + _dbus_assert (server != NULL); - _dbus_assert (server->refcount.value > 0); HAVE_LOCK_CHECK (server); - -#ifdef DBUS_HAVE_ATOMIC_INT - last_unref = (_dbus_atomic_dec (&server->refcount) == 1); -#else - _dbus_assert (server->refcount.value > 0); - server->refcount.value -= 1; - last_unref = (server->refcount.value == 0); -#endif - - if (last_unref) + old_refcount = _dbus_atomic_dec (&server->refcount); + _dbus_assert (old_refcount > 0); + + if (old_refcount == 1) { _dbus_assert (server->disconnected); @@ -680,16 +682,26 @@ DBusServer * dbus_server_ref (DBusServer *server) { _dbus_return_val_if_fail (server != NULL, NULL); - _dbus_return_val_if_fail (server->refcount.value > 0, NULL); -#ifdef DBUS_HAVE_ATOMIC_INT +#ifdef DBUS_DISABLE_CHECKS _dbus_atomic_inc (&server->refcount); #else - SERVER_LOCK (server); - _dbus_assert (server->refcount.value > 0); + { + dbus_int32_t old_refcount; - server->refcount.value += 1; - SERVER_UNLOCK (server); + /* can't get the refcount without a side-effect */ + old_refcount = _dbus_atomic_inc (&server->refcount); + + if (_DBUS_UNLIKELY (old_refcount <= 0)) + { + /* undo side-effect first */ + _dbus_atomic_dec (&server->refcount); + _dbus_warn_check_failed (_dbus_return_if_fail_warning_format, + _DBUS_FUNCTION_NAME, "old_refcount > 0", + __FILE__, __LINE__); + return NULL; + } + } #endif return server; @@ -706,27 +718,28 @@ dbus_server_ref (DBusServer *server) void dbus_server_unref (DBusServer *server) { - dbus_bool_t last_unref; + dbus_int32_t old_refcount; /* keep this in sync with unref_unlocked */ - + _dbus_return_if_fail (server != NULL); - _dbus_return_if_fail (server->refcount.value > 0); -#ifdef DBUS_HAVE_ATOMIC_INT - last_unref = (_dbus_atomic_dec (&server->refcount) == 1); -#else - SERVER_LOCK (server); - - _dbus_assert (server->refcount.value > 0); + /* can't get the refcount without a side-effect */ + old_refcount = _dbus_atomic_dec (&server->refcount); - server->refcount.value -= 1; - last_unref = (server->refcount.value == 0); - - SERVER_UNLOCK (server); +#ifndef DBUS_DISABLE_CHECKS + if (_DBUS_UNLIKELY (old_refcount <= 0)) + { + /* undo side-effect first */ + _dbus_atomic_inc (&server->refcount); + _dbus_warn_check_failed (_dbus_return_if_fail_warning_format, + _DBUS_FUNCTION_NAME, "old_refcount > 0", + __FILE__, __LINE__); + return; + } #endif - - if (last_unref) + + if (old_refcount == 1) { /* lock not held! */ _dbus_assert (server->disconnected); @@ -749,11 +762,19 @@ void dbus_server_disconnect (DBusServer *server) { _dbus_return_if_fail (server != NULL); - _dbus_return_if_fail (server->refcount.value > 0); + +#ifdef DBUS_DISABLE_CHECKS + _dbus_atomic_inc (&server->refcount); +#else + { + dbus_int32_t old_refcount = _dbus_atomic_inc (&server->refcount); + + _dbus_return_if_fail (old_refcount > 0); + } +#endif SERVER_LOCK (server); - _dbus_server_ref_unlocked (server); - + _dbus_assert (server->vtable->disconnect != NULL); if (!server->disconnected) diff --git a/dbus/dbus-string.c b/dbus/dbus-string.c index e2eb93b9..ca3a670b 100644 --- a/dbus/dbus-string.c +++ b/dbus/dbus-string.c @@ -1255,6 +1255,9 @@ _dbus_string_append_printf_valist (DBusString *str, /* Measure the message length without terminating nul */ len = _dbus_printf_string_upper_bound (format, args); + if (len < 0) + return FALSE; + if (!_dbus_string_lengthen (str, len)) { /* don't leak the copy */ diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index e1e1728d..e69f3b59 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -826,8 +826,6 @@ _dbus_connect_unix_socket (const char *path, path, _dbus_strerror (errno)); _dbus_close (fd, NULL); - fd = -1; - return -1; } @@ -836,8 +834,6 @@ _dbus_connect_unix_socket (const char *path, _DBUS_ASSERT_ERROR_IS_SET (error); _dbus_close (fd, NULL); - fd = -1; - return -1; } @@ -1161,14 +1157,6 @@ _dbus_connect_tcp_socket_with_nonce (const char *host, struct addrinfo hints; struct addrinfo *ai, *tmp; - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - if (!_dbus_open_tcp_socket (&fd, error)) - { - _DBUS_ASSERT_ERROR_IS_SET(error); - return -1; - } - _DBUS_ASSERT_ERROR_IS_CLEAR(error); _DBUS_ZERO (hints); @@ -2367,6 +2355,29 @@ _dbus_atomic_dec (DBusAtomic *atomic) #endif } +/** + * Atomically get the value of an integer. It may change at any time + * thereafter, so this is mostly only useful for assertions. + * + * @param atomic pointer to the integer to get + * @returns the value at this moment + */ +dbus_int32_t +_dbus_atomic_get (DBusAtomic *atomic) +{ +#if DBUS_USE_SYNC + __sync_synchronize (); + return atomic->value; +#else + dbus_int32_t res; + + _DBUS_LOCK (atomic); + res = atomic->value; + _DBUS_UNLOCK (atomic); + return res; +#endif +} + #ifdef DBUS_BUILD_TESTS /** Gets our GID * @returns process GID @@ -3641,12 +3652,18 @@ _dbus_get_standard_system_servicedirs (DBusList **dirs) } /* - * add configured datadir to defaults - * this may be the same as an xdg dir - * however the config parser should take - * care of duplicates + * Add configured datadir to defaults. This may be the same as one + * of the XDG directories. However, the config parser should take + * care of the duplicates. + * + * Also, append /lib as counterpart of /usr/share on the root + * directory (the root directory does not know /share), in order to + * facilitate early boot system bus activation where /usr might not + * be available. */ - if (!_dbus_string_append (&servicedir_path, DBUS_DATADIR":")) + if (!_dbus_string_append (&servicedir_path, + DBUS_DATADIR":" + "/lib:")) goto oom; if (!_dbus_split_paths_and_append (&servicedir_path, diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 19f6fa0b..a8c60bda 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -549,6 +549,10 @@ int _dbus_printf_string_upper_bound (const char *format, bufsize *= 2; p = malloc (bufsize); + + if (p == NULL) + return -1; + len = _vsnprintf (p, bufsize - 1, format, args); free (p); } @@ -2639,6 +2643,10 @@ _dbus_daemon_is_session_bus_address_published (const char *scope) // see http://msdn.microsoft.com/en-us/library/ms684315%28VS.85%29.aspx hDBusDaemonMutex = CreateMutexA( NULL, FALSE, _dbus_string_get_const_data(&mutex_name) ); + /* The client uses mutex ownership to detect a running server, so the server should do so too. + Fortunally the client deletes the mutex in the lock protected area, so checking presence + will work too. */ + _dbus_global_unlock( lock ); _dbus_string_free( &mutex_name ); @@ -2684,6 +2692,14 @@ _dbus_daemon_publish_session_bus_address (const char* address, const char *scope } _dbus_string_free( &mutex_name ); + // acquire the mutex + if (WaitForSingleObject( hDBusDaemonMutex, 10 ) != WAIT_OBJECT_0) + { + _dbus_global_unlock( lock ); + CloseHandle( hDBusDaemonMutex ); + return FALSE; + } + if (!_dbus_get_shm_name(&shm_name,scope)) { _dbus_string_free( &shm_name ); @@ -3066,6 +3082,21 @@ _dbus_atomic_dec (DBusAtomic *atomic) } /** + * Atomically get the value of an integer. It may change at any time + * thereafter, so this is mostly only useful for assertions. + * + * @param atomic pointer to the integer to get + * @returns the value at this moment + */ +dbus_int32_t +_dbus_atomic_get (DBusAtomic *atomic) +{ + /* this is what GLib does, hopefully it's right... */ + MemoryBarrier (); + return atomic->value; +} + +/** * Called when the bus daemon is signaled to reload its configuration; any * caches should be nuked. Of course any caches that need explicit reload * are probably broken, but c'est la vie. diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 22d7969e..54a4cd7e 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -244,6 +244,7 @@ struct DBusAtomic dbus_int32_t _dbus_atomic_inc (DBusAtomic *atomic); dbus_int32_t _dbus_atomic_dec (DBusAtomic *atomic); +dbus_int32_t _dbus_atomic_get (DBusAtomic *atomic); /* AIX uses different values for poll */ diff --git a/dbus/dbus-test.c b/dbus/dbus-test.c index deb4c932..1fbaf8c8 100644 --- a/dbus/dbus-test.c +++ b/dbus/dbus-test.c @@ -135,7 +135,7 @@ dbus_internal_do_not_use_run_tests (const char *test_data_dir, const char *speci check_memleaks (); #else - _dbus_warn ("recursive marshal tests disabled\n"); + printf ("SKIP: recursive marshal tests disabled\n"); #endif run_test ("byteswap", specific_test, _dbus_marshal_byteswap_test); diff --git a/doc/Makefile.am b/doc/Makefile.am index 11f756de..e4ab5fb8 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -28,16 +28,18 @@ DTDS = \ busconfig.dtd \ introspect.dtd -STATIC_DOCS = \ +dist_doc_DATA = \ diagram.png \ diagram.svg \ + system-activation.txt + +STATIC_DOCS = \ dbus-faq.xml \ dbus-specification.xml \ dbus-test-plan.xml \ dbus-tutorial.xml \ dcop-howto.txt \ introspect.xsl \ - system-activation.txt \ $(DTDS) EXTRA_DIST = \ @@ -46,17 +48,18 @@ EXTRA_DIST = \ $(STATIC_DOCS) \ $(MAN_IN_FILES) -HTML_FILES= \ +html_DATA = + +# we distribute these in the tarball so users don't necessarily need xmlto +dist_html_DATA = $(XMLTO_OUTPUT) + +XMLTO_OUTPUT= \ dbus-faq.html \ dbus-specification.html \ dbus-test-plan.html \ dbus-tutorial.html if DBUS_XML_DOCS_ENABLED -all-local:: $(HTML_FILES) - -EXTRA_DIST += $(HTML_FILES) - dbus-specification.html: dbus-specification.xml $(XMLTO) html-nochunks $< @@ -68,7 +71,6 @@ dbus-tutorial.html: dbus-tutorial.xml dbus-faq.html: dbus-faq.xml $(XMLTO) html-nochunks $< - endif if DBUS_DOXYGEN_DOCS_ENABLED @@ -79,7 +81,7 @@ doxygen.stamp: $(wildcard $(top_srcdir)/dbus/*.[ch]) @touch $@ if DBUS_HAVE_XSLTPROC -api_DATA = dbus.devhelp +html_DATA += dbus.devhelp dbus.devhelp: $(srcdir)/doxygen_to_devhelp.xsl doxygen.stamp $(XSLTPROC) -o $@ $< api/xml/index.xml @@ -95,12 +97,16 @@ uninstall-local:: rm -f $(DESTDIR)$(apidir)/*.html rm -f $(DESTDIR)$(apidir)/*.png rm -f $(DESTDIR)$(apidir)/*.css + rm -f $(DESTDIR)$(htmldir)/*.html + rm -f $(DESTDIR)$(docdir)/*.txt + rm -f $(DESTDIR)$(docdir)/*.png + rm -f $(DESTDIR)$(docdir)/*.svg rmdir --ignore-fail-on-non-empty $(DESTDIR)$(apidir) || \ rmdir $(DESTDIR)$(apidir) endif if DBUS_HAVE_MAN2HTML -all-local:: $(MAN_HTML_FILES) +html_DATA += $(MAN_HTML_FILES) %.1.html: %.1 $(AM_V_GEN)( $(MAN2HTML) $< > $@.tmp && mv $@.tmp $@ ) @@ -115,11 +121,12 @@ BONUS_FILES = \ $(top_srcdir)/COPYING \ $(top_srcdir)/ChangeLog -dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) doxygen.stamp +dbus-docs: $(STATIC_DOCS) $(dist_doc_DATA) $(dist_html_DATA) $(MAN_HTML_FILES) $(BONUS_FILES) doxygen.stamp $(AM_V_at)rm -rf $@ $(AM_V_GEN)$(MKDIR_P) $@/api $(AM_V_at)cp $(STATIC_DOCS) $@ - $(AM_V_at)cp $(HTML_FILES) $@ + $(AM_V_at)cp $(dist_doc_DATA) $@ + $(AM_V_at)cp $(dist_html_DATA) $@ $(AM_V_at)cp $(MAN_HTML_FILES) $@ $(AM_V_at)cp $(BONUS_FILES) $@ $(AM_V_at)cp -r api/html $@/api @@ -147,10 +154,11 @@ maintainer-upload-docs: endif clean-local: + rm -f $(html_DATA) rm -rf api rm -rf dbus-docs rm -f *.1.html rm -f doxygen.stamp maintainer-clean-local: - rm -f $(HTML_FILES) + rm -f $(XMLTO_OUTPUT) diff --git a/doc/Makefile.in b/doc/Makefile.in index 1bcea172..79676766 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -34,10 +34,12 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@DBUS_XML_DOCS_ENABLED_TRUE@am__append_1 = $(HTML_FILES) +@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@@DBUS_HAVE_XSLTPROC_TRUE@am__append_1 = dbus.devhelp +@DBUS_HAVE_MAN2HTML_TRUE@am__append_2 = $(MAN_HTML_FILES) subdir = doc -DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/dbus-daemon.1.in TODO +DIST_COMMON = $(dist_doc_DATA) $(dist_html_DATA) $(dist_man1_MANS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/dbus-daemon.1.in TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -82,10 +84,11 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(apidir)" +am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)" \ + "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)" NROFF = nroff MANS = $(dist_man1_MANS) $(man1_MANS) -DATA = $(api_DATA) +DATA = $(dist_doc_DATA) $(dist_html_DATA) $(html_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -319,27 +322,36 @@ DTDS = \ busconfig.dtd \ introspect.dtd -STATIC_DOCS = \ +dist_doc_DATA = \ diagram.png \ diagram.svg \ + system-activation.txt + +STATIC_DOCS = \ dbus-faq.xml \ dbus-specification.xml \ dbus-test-plan.xml \ dbus-tutorial.xml \ dcop-howto.txt \ introspect.xsl \ - system-activation.txt \ $(DTDS) -EXTRA_DIST = file-boilerplate.c doxygen_to_devhelp.xsl $(STATIC_DOCS) \ - $(MAN_IN_FILES) $(am__append_1) -HTML_FILES = \ +EXTRA_DIST = \ + file-boilerplate.c \ + doxygen_to_devhelp.xsl \ + $(STATIC_DOCS) \ + $(MAN_IN_FILES) + +html_DATA = $(am__append_1) $(am__append_2) + +# we distribute these in the tarball so users don't necessarily need xmlto +dist_html_DATA = $(XMLTO_OUTPUT) +XMLTO_OUTPUT = \ dbus-faq.html \ dbus-specification.html \ dbus-test-plan.html \ dbus-tutorial.html -@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@@DBUS_HAVE_XSLTPROC_TRUE@api_DATA = dbus.devhelp @DBUS_CAN_UPLOAD_DOCS_TRUE@BONUS_FILES = \ @DBUS_CAN_UPLOAD_DOCS_TRUE@ $(top_srcdir)/README \ @DBUS_CAN_UPLOAD_DOCS_TRUE@ $(top_srcdir)/HACKING \ @@ -427,26 +439,66 @@ uninstall-man1: test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -install-apiDATA: $(api_DATA) +install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) - test -z "$(apidir)" || $(MKDIR_P) "$(DESTDIR)$(apidir)" - @list='$(api_DATA)'; test -n "$(apidir)" || list=; \ + test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(apidir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(apidir)" || exit $$?; \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done -uninstall-apiDATA: +uninstall-dist_docDATA: @$(NORMAL_UNINSTALL) - @list='$(api_DATA)'; test -n "$(apidir)" || list=; \ + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(apidir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(apidir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(docdir)" && rm -f $$files +install-dist_htmlDATA: $(dist_html_DATA) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done + +uninstall-dist_htmlDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(htmldir)" && rm -f $$files +install-htmlDATA: $(html_DATA) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done + +uninstall-htmlDATA: + @$(NORMAL_UNINSTALL) + @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(htmldir)" && rm -f $$files tags: TAGS TAGS: @@ -499,10 +551,10 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -@DBUS_DOXYGEN_DOCS_ENABLED_FALSE@@DBUS_HAVE_MAN2HTML_FALSE@@DBUS_XML_DOCS_ENABLED_FALSE@all-local: +@DBUS_DOXYGEN_DOCS_ENABLED_FALSE@all-local: all-am: Makefile $(MANS) $(DATA) all-local installdirs: - for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(apidir)"; do \ + for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -552,7 +604,8 @@ info: info-am info-am: -install-data-am: install-apiDATA install-data-local install-man +install-data-am: install-data-local install-dist_docDATA \ + install-dist_htmlDATA install-htmlDATA install-man install-dvi: install-dvi-am @@ -597,7 +650,8 @@ ps: ps-am ps-am: -uninstall-am: uninstall-apiDATA uninstall-local uninstall-man +uninstall-am: uninstall-dist_docDATA uninstall-dist_htmlDATA \ + uninstall-htmlDATA uninstall-local uninstall-man uninstall-man: uninstall-man1 @@ -606,19 +660,19 @@ uninstall-man: uninstall-man1 .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-apiDATA install-data \ - install-data-am install-data-local install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-apiDATA uninstall-local uninstall-man uninstall-man1 - + install install-am install-data install-data-am \ + install-data-local install-dist_docDATA install-dist_htmlDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-htmlDATA install-info \ + install-info-am install-man install-man1 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-dist_docDATA \ + uninstall-dist_htmlDATA uninstall-htmlDATA uninstall-local \ + uninstall-man uninstall-man1 -@DBUS_XML_DOCS_ENABLED_TRUE@all-local:: $(HTML_FILES) @DBUS_XML_DOCS_ENABLED_TRUE@dbus-specification.html: dbus-specification.xml @DBUS_XML_DOCS_ENABLED_TRUE@ $(XMLTO) html-nochunks $< @@ -651,19 +705,22 @@ uninstall-man: uninstall-man1 @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rm -f $(DESTDIR)$(apidir)/*.html @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rm -f $(DESTDIR)$(apidir)/*.png @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rm -f $(DESTDIR)$(apidir)/*.css +@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rm -f $(DESTDIR)$(htmldir)/*.html +@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rm -f $(DESTDIR)$(docdir)/*.txt +@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rm -f $(DESTDIR)$(docdir)/*.png +@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rm -f $(DESTDIR)$(docdir)/*.svg @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rmdir --ignore-fail-on-non-empty $(DESTDIR)$(apidir) || \ @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rmdir $(DESTDIR)$(apidir) -@DBUS_HAVE_MAN2HTML_TRUE@all-local:: $(MAN_HTML_FILES) - @DBUS_HAVE_MAN2HTML_TRUE@%.1.html: %.1 @DBUS_HAVE_MAN2HTML_TRUE@ $(AM_V_GEN)( $(MAN2HTML) $< > $@.tmp && mv $@.tmp $@ ) -@DBUS_CAN_UPLOAD_DOCS_TRUE@dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) doxygen.stamp +@DBUS_CAN_UPLOAD_DOCS_TRUE@dbus-docs: $(STATIC_DOCS) $(dist_doc_DATA) $(dist_html_DATA) $(MAN_HTML_FILES) $(BONUS_FILES) doxygen.stamp @DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)rm -rf $@ @DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_GEN)$(MKDIR_P) $@/api @DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(STATIC_DOCS) $@ -@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(HTML_FILES) $@ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(dist_doc_DATA) $@ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(dist_html_DATA) $@ @DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(MAN_HTML_FILES) $@ @DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(BONUS_FILES) $@ @DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp -r api/html $@/api @@ -683,13 +740,14 @@ uninstall-man: uninstall-man1 @DBUS_CAN_UPLOAD_DOCS_FALSE@ @false clean-local: + rm -f $(html_DATA) rm -rf api rm -rf dbus-docs rm -f *.1.html rm -f doxygen.stamp maintainer-clean-local: - rm -f $(HTML_FILES) + rm -f $(XMLTO_OUTPUT) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/doc/dbus-cleanup-sockets.1 b/doc/dbus-cleanup-sockets.1 index ca669f49..a062d498 100644 --- a/doc/dbus-cleanup-sockets.1 +++ b/doc/dbus-cleanup-sockets.1 @@ -1,43 +1,43 @@ .\" -.\" dbus-cleanup-sockets manual page. +.\" dbus\-cleanup\-sockets manual page. .\" Copyright (C) 2003 Red Hat, Inc. .\" -.TH dbus-cleanup-sockets 1 +.TH dbus\-cleanup\-sockets 1 .SH NAME -dbus-cleanup-sockets \- clean up leftover sockets in a directory +dbus\-cleanup\-sockets \- clean up leftover sockets in a directory .SH SYNOPSIS .PP -.B dbus-cleanup-sockets [DIRECTORY] +.B dbus\-cleanup\-sockets [DIRECTORY] .SH DESCRIPTION -The \fIdbus-cleanup-sockets\fP command cleans up unused D-Bus +The \fIdbus\-cleanup\-sockets\fP command cleans up unused D\-Bus connection sockets. See http://www.freedesktop.org/software/dbus/ for more information about the big picture. .PP -If given no arguments, \fIdbus-cleanup-sockets\fP cleans up sockets +If given no arguments, \fIdbus\-cleanup\-sockets\fP cleans up sockets in the standard default socket directory for the -per-user-login-session message bus; this is usually /tmp. +per\-user\-login\-session message bus; this is usually /tmp. Optionally, you can pass a different directory on the command line. .PP -On Linux, this program is essentially useless, because D-Bus defaults +On Linux, this program is essentially useless, because D\-Bus defaults to using "abstract sockets" that exist only in memory and don't have a corresponding file in /tmp. .PP On most other flavors of UNIX, it's possible for the socket files to -leak when programs using D-Bus exit abnormally or without closing -their D-Bus connections. Thus, it might be interesting to run -dbus-cleanup-sockets in a cron job to mop up any leaked sockets. +leak when programs using D\-Bus exit abnormally or without closing +their D\-Bus connections. Thus, it might be interesting to run +dbus\-cleanup\-sockets in a cron job to mop up any leaked sockets. Or you can just ignore the leaked sockets, they aren't really hurting anything, other than cluttering the output of "ls /tmp" .SH AUTHOR -dbus-cleanup-sockets was adapted by Havoc Pennington from -linc-cleanup-sockets written by Michael Meeks. +dbus\-cleanup\-sockets was adapted by Havoc Pennington from +linc\-cleanup\-sockets written by Michael Meeks. .SH BUGS -Please send bug reports to the D-Bus mailing list or bug tracker, +Please send bug reports to the D\-Bus mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/ diff --git a/doc/dbus-daemon.1.in b/doc/dbus-daemon.1.in index a54f8634..185441c9 100644 --- a/doc/dbus-daemon.1.in +++ b/doc/dbus-daemon.1.in @@ -1,37 +1,37 @@ .\" -.\" dbus-daemon manual page. +.\" dbus\-daemon manual page. .\" Copyright (C) 2003,2008 Red Hat, Inc. .\" -.TH dbus-daemon 1 +.TH dbus\-daemon 1 .SH NAME -dbus-daemon \- Message bus daemon +dbus\-daemon \- Message bus daemon .SH SYNOPSIS .PP -.B dbus-daemon -dbus-daemon [\-\-version] [\-\-session] [\-\-system] [\-\-config-file=FILE] -[\-\-print-address[=DESCRIPTOR]] [\-\-print-pid[=DESCRIPTOR]] [\-\-fork] +.B dbus\-daemon +dbus\-daemon [\-\-version] [\-\-session] [\-\-system] [\-\-config\-file=FILE] +[\-\-print\-address[=DESCRIPTOR]] [\-\-print\-pid[=DESCRIPTOR]] [\-\-fork] .SH DESCRIPTION -\fIdbus-daemon\fP is the D-Bus message bus daemon. See +\fIdbus\-daemon\fP is the D\-Bus message bus daemon. See http://www.freedesktop.org/software/dbus/ for more information about -the big picture. D-Bus is first a library that provides one-to-one -communication between any two applications; \fIdbus-daemon\fP is an +the big picture. D\-Bus is first a library that provides one\-to\-one +communication between any two applications; \fIdbus\-daemon\fP is an application that uses this library to implement a message bus daemon. Multiple programs connect to the message bus daemon and can exchange messages with one another. .PP There are two standard message bus instances: the systemwide message bus (installed on many systems as the "messagebus" init service) and the -per-user-login-session message bus (started each time a user logs in). -\fIdbus-daemon\fP is used for both of these instances, but with +per\-user\-login\-session message bus (started each time a user logs in). +\fIdbus\-daemon\fP is used for both of these instances, but with a different configuration file. .PP The \-\-session option is equivalent to -"\-\-config-file=@EXPANDED_SYSCONFDIR@/dbus-1/session.conf" and the \-\-system +"\-\-config\-file=@EXPANDED_SYSCONFDIR@/dbus\-1/session.conf" and the \-\-system option is equivalent to -"\-\-config-file=@EXPANDED_SYSCONFDIR@/dbus-1/system.conf". By creating -additional configuration files and using the \-\-config-file option, -additional special-purpose message bus daemons could be created. +"\-\-config\-file=@EXPANDED_SYSCONFDIR@/dbus\-1/system.conf". By creating +additional configuration files and using the \-\-config\-file option, +additional special\-purpose message bus daemons could be created. .PP The systemwide daemon is normally launched by an init script, standardly called simply "messagebus". @@ -39,11 +39,11 @@ standardly called simply "messagebus". The systemwide daemon is largely used for broadcasting system events, such as changes to the printer queue, or adding/removing devices. .PP -The per-session daemon is used for various interprocess communication +The per\-session daemon is used for various interprocess communication among desktop applications (however, it is not tied to X or the GUI in any way). .PP -SIGHUP will cause the D-Bus daemon to PARTIALLY reload its +SIGHUP will cause the D\-Bus daemon to PARTIALLY reload its configuration file and to flush its user/group information caches. Some configuration changes would require kicking all apps off the bus; so they will only take effect if you restart the daemon. Policy changes should take effect @@ -52,47 +52,47 @@ with SIGHUP. .SH OPTIONS The following options are supported: .TP -.I "--config-file=FILE" +.I "\-\-config\-file=FILE" Use the given configuration file. .TP -.I "--fork" +.I "\-\-fork" Force the message bus to fork and become a daemon, even if the configuration file does not specify that it should. In most contexts the configuration file already gets this right, though. -.I "--nofork" +.I "\-\-nofork" Force the message bus not to fork and become a daemon, even if the configuration file specifies that it should. .TP -.I "--print-address[=DESCRIPTOR]" +.I "\-\-print\-address[=DESCRIPTOR]" Print the address of the message bus to standard output, or to the given file descriptor. This is used by programs that launch the message bus. .TP -.I "--print-pid[=DESCRIPTOR]" +.I "\-\-print\-pid[=DESCRIPTOR]" Print the process ID of the message bus to standard output, or to the given file descriptor. This is used by programs that launch the message bus. .TP -.I "--session" -Use the standard configuration file for the per-login-session message +.I "\-\-session" +Use the standard configuration file for the per\-login\-session message bus. .TP -.I "--system" +.I "\-\-system" Use the standard configuration file for the systemwide message bus. .TP -.I "--version" +.I "\-\-version" Print the version of the daemon. .TP -.I "--introspect" -Print the introspection information for all D-Bus internal interfaces. +.I "\-\-introspect" +Print the introspection information for all D\-Bus internal interfaces. .TP -.I "--address[=ADDRESS]" +.I "\-\-address[=ADDRESS]" Set the address to listen on. This option overrides the address configured in the configuration file. .TP -.I "--systemd-activation" -Enable systemd-style service activation. Only useful in conjunction +.I "\-\-systemd\-activation" +Enable systemd\-style service activation. Only useful in conjunction with the systemd system and session manager on Linux. .SH CONFIGURATION FILE @@ -100,7 +100,7 @@ with the systemd system and session manager on Linux. A message bus daemon has a configuration file that specializes it for a particular application. For example, one configuration file might set up the message bus to be a systemwide message bus, -while another might set it up to be a per-user-login-session bus. +while another might set it up to be a per\-user\-login\-session bus. .PP The configuration file also establishes resource limits, security parameters, and so forth. @@ -109,10 +109,10 @@ The configuration file is not part of any interoperability specification and its backward compatibility is not guaranteed; this document is documentation, not specification. .PP -The standard systemwide and per-session message bus setups are -configured in the files "@EXPANDED_SYSCONFDIR@/dbus-1/system.conf" and -"@EXPANDED_SYSCONFDIR@/dbus-1/session.conf". These files normally -<include> a system-local.conf or session-local.conf; you can put local +The standard systemwide and per\-session message bus setups are +configured in the files "@EXPANDED_SYSCONFDIR@/dbus\-1/system.conf" and +"@EXPANDED_SYSCONFDIR@/dbus\-1/session.conf". These files normally +<include> a system\-local.conf or session\-local.conf; you can put local overrides in those files to avoid modifying the primary configuration files. @@ -121,7 +121,7 @@ The configuration file is an XML document. It must have the following doctype declaration: .nf - <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" + <!DOCTYPE busconfig PUBLIC "\-//freedesktop//DTD D\-Bus Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> .fi @@ -139,9 +139,9 @@ Root element. .I "<type>" .PP -The well-known type of the message bus. Currently known values are +The well\-known type of the message bus. Currently known values are "system" and "session"; if other values are set, they should be -either added to the D-Bus specification, or namespaced. The last +either added to the D\-Bus specification, or namespaced. The last <type> element "wins" (previous values are ignored). This element only controls which message bus specific environment variables are set in activated clients. Most of the policy that distinguishes a @@ -149,7 +149,7 @@ session bus from the system bus is controlled from the other elements in the configuration file. .PP -If the well-known type of the message bus is "session", then the +If the well\-known type of the message bus is "session", then the DBUS_STARTER_BUS_TYPE environment variable will be set to "session" and the DBUS_SESSION_BUS_ADDRESS environment variable will be set to the address of the session bus. Likewise, if the type of the @@ -187,7 +187,7 @@ Only files ending in ".conf" are included. This is intended to allow extension of the system bus by particular packages. For example, if CUPS wants to be able to send out notification of printer queue changes, it could install a file to -@EXPANDED_SYSCONFDIR@/dbus-1/system.d that allowed all apps to receive +@EXPANDED_SYSCONFDIR@/dbus\-1/system.d that allowed all apps to receive this message and allowed the printer daemon user to send it. .TP @@ -229,7 +229,7 @@ This may be useful to avoid affecting the behavior of child processes. .PP Add an address that the bus should listen on. The -address is in the standard D-Bus format that contains +address is in the standard D\-Bus format that contains a transport name plus possible parameters/options. .PP @@ -258,7 +258,7 @@ Example: <listen>tcp:host=localhost,port=0,family=ipv4</listen> A special case is using a port number of zero (or omitting the port), which means to choose an available port selected by the operating system. The port number chosen can be obtained with the ---print-address command line parameter and will be present in other +\-\-print\-address command line parameter and will be present in other cases where the server reports its own address, such as when DBUS_SESSION_BUS_ADDRESS is set. @@ -302,7 +302,7 @@ service will be used). .PP Service files tell the bus how to automatically start a program. -They are primarily used with the per-user-session bus, +They are primarily used with the per\-user\-session bus, not the systemwide bus. .TP @@ -311,33 +311,33 @@ not the systemwide bus. .PP <standard_session_servicedirs/> is equivalent to specifying a series of <servicedir/> elements for each of the data directories in the "XDG -Base Directory Specification" with the subdirectory "dbus-1/services", -so for example "/usr/share/dbus-1/services" would be among the +Base Directory Specification" with the subdirectory "dbus\-1/services", +so for example "/usr/share/dbus\-1/services" would be among the directories searched. .PP The "XDG Base Directory Specification" can be found at -http://freedesktop.org/wiki/Standards/basedir-spec if it hasn't moved, +http://freedesktop.org/wiki/Standards/basedir\-spec if it hasn't moved, otherwise try your favorite search engine. .PP The <standard_session_servicedirs/> option is only relevant to the -per-user-session bus daemon defined in -@EXPANDED_SYSCONFDIR@/dbus-1/session.conf. Putting it in any other +per\-user\-session bus daemon defined in +@EXPANDED_SYSCONFDIR@/dbus\-1/session.conf. Putting it in any other configuration file would probably be nonsense. .TP .I "<standard_system_servicedirs/>" .PP -<standard_system_servicedirs/> specifies the standard system-wide +<standard_system_servicedirs/> specifies the standard system\-wide activation directories that should be searched for service files. -This option defaults to @EXPANDED_DATADIR@/dbus-1/system-services. +This option defaults to @EXPANDED_DATADIR@/dbus\-1/system\-services. .PP The <standard_system_servicedirs/> option is only relevant to the -per-system bus daemon defined in -@EXPANDED_SYSCONFDIR@/dbus-1/system.conf. Putting it in any other +per\-system bus daemon defined in +@EXPANDED_SYSCONFDIR@/dbus\-1/system.conf. Putting it in any other configuration file would probably be nonsense. .TP @@ -346,11 +346,11 @@ configuration file would probably be nonsense. .PP <servicehelper/> specifies the setuid helper that is used to launch system daemons with an alternate user. Typically this should be -the dbus-daemon-launch-helper executable in located in libexec. +the dbus\-daemon\-launch\-helper executable in located in libexec. .PP -The <servicehelper/> option is only relevant to the per-system bus daemon -defined in @EXPANDED_SYSCONFDIR@/dbus-1/system.conf. Putting it in any other +The <servicehelper/> option is only relevant to the per\-system bus daemon +defined in @EXPANDED_SYSCONFDIR@/dbus\-1/system.conf. Putting it in any other configuration file would probably be nonsense. .TP @@ -396,7 +396,7 @@ Available limit names are: connection "max_replies_per_connection" : max number of pending method replies per connection - (number of calls-in-progress) + (number of calls\-in\-progress) "reply_timeout" : milliseconds (thousandths) until a method call times out .fi @@ -408,7 +408,7 @@ by max_message_size. .PP max_completed_connections divided by max_connections_per_user is the -number of users that can work together to denial-of-service all other users by using +number of users that can work together to denial\-of\-service all other users by using up all connections on the systemwide bus. .PP @@ -426,7 +426,7 @@ they are analogous to a firewall in that they allow expected traffic and prevent unexpected traffic. .PP -Currently, the system bus has a default-deny policy for sending method calls +Currently, the system bus has a default\-deny policy for sending method calls and owning bus names. Everything else, in particular reply messages, receive checks, and signals has a default allow policy. @@ -449,14 +449,14 @@ The <policy> element has one of four attributes: .PP Policies are applied to a connection as follows: .nf - - all context="default" policies are applied - - all group="connection's user's group" policies are applied + \- all context="default" policies are applied + \- all group="connection's user's group" policies are applied in undefined order - - all user="connection's auth user" policies are applied + \- all user="connection's auth user" policies are applied in undefined order - - all at_console="true" policies are applied - - all at_console="false" policies are applied - - all context="mandatory" policies are applied + \- all at_console="true" policies are applied + \- all at_console="false" policies are applied + \- all context="mandatory" policies are applied .fi .PP @@ -522,7 +522,7 @@ they may not be sent *to that name*. That is, if a connection owns services A, B, C, and sending to A is denied, sending to B or C will not work either. .PP -The other send_* and receive_* attributes are purely textual/by-value +The other send_* and receive_* attributes are purely textual/by\-value matches against the given field in the message header. .PP "Eavesdropping" occurs when an application receives a message that @@ -590,7 +590,7 @@ received" are evaluated separately. Be careful with send_interface/receive_interface, because the interface field in messages is optional. In particular, do NOT specify <deny send_interface="org.foo.Bar"/>! This will cause -no-interface messages to be blocked for all services, which is +no\-interface messages to be blocked for all services, which is almost certainly not what you intended. Always use rules of the form: <deny send_interface="org.foo.Bar" send_destination="org.foo.Service"/> @@ -614,7 +614,7 @@ creates a mapping. Right now only one kind of association is possible: .PP This means that if a connection asks to own the name "org.freedesktop.Foobar" then the source context will be the context -of the connection and the target context will be "foo_t" - see the +of the connection and the target context will be "foo_t" \- see the short discussion of SELinux below. .PP @@ -668,7 +668,7 @@ associated permissions defined to control operations on objects with that class. .PP -D-Bus performs SELinux security checks in two places. +D\-Bus performs SELinux security checks in two places. .PP First, any time a message is routed from one connection to another @@ -710,8 +710,8 @@ haven't installed a security policy file to allow your message through, it won't work. For the session bus, this is not a concern. .PP The simplest way to figure out what's happening on the bus is to run -the \fIdbus-monitor\fP program, which comes with the D-Bus -package. You can also send test messages with \fIdbus-send\fP. These +the \fIdbus\-monitor\fP program, which comes with the D\-Bus +package. You can also send test messages with \fIdbus\-send\fP. These programs have their own man pages. .PP If you want to know what the daemon itself is doing, you might consider @@ -722,20 +722,20 @@ messing up your real session and system daemons. To run a separate test copy of the daemon, for example you might open a terminal and type: .nf - DBUS_VERBOSE=1 dbus-daemon --session --print-address + DBUS_VERBOSE=1 dbus\-daemon \-\-session \-\-print\-address .fi .PP The test daemon address will be printed when the daemon starts. You will need -to copy-and-paste this address and use it as the value of the +to copy\-and\-paste this address and use it as the value of the DBUS_SESSION_BUS_ADDRESS environment variable when you launch the applications you want to test. This will cause those applications to connect to your test bus instead of the DBUS_SESSION_BUS_ADDRESS of your real session bus. .PP -DBUS_VERBOSE=1 will have NO EFFECT unless your copy of D-Bus +DBUS_VERBOSE=1 will have NO EFFECT unless your copy of D\-Bus was compiled with verbose mode enabled. This is not recommended in production builds due to performance impact. You may need to rebuild -D-Bus if your copy was not built with debugging in mind. (DBUS_VERBOSE -also affects the D-Bus library and thus applications using D-Bus; it may +D\-Bus if your copy was not built with debugging in mind. (DBUS_VERBOSE +also affects the D\-Bus library and thus applications using D\-Bus; it may be useful to see verbose output on both the client side and from the daemon.) .PP If you want to get fancy, you can create a custom bus @@ -748,5 +748,5 @@ for example. See http://www.freedesktop.org/software/dbus/doc/AUTHORS .SH BUGS -Please send bug reports to the D-Bus mailing list or bug tracker, +Please send bug reports to the D\-Bus mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/ diff --git a/doc/dbus-faq.html b/doc/dbus-faq.html index 1cb6d7d1..10d48443 100644 --- a/doc/dbus-faq.html +++ b/doc/dbus-faq.html @@ -1,13 +1,13 @@ <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>D-Bus FAQ</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" title="D-Bus FAQ"><div class="titlepage"><div><div><h2 class="title"><a name="index"></a>D-Bus FAQ</h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Havoc</span> <span class="surname">Pennington</span></h3><div class="affiliation"><span class="orgname">Red Hat, Inc.<br></span><div class="address"><p><br> <code class="email"><<a class="email" href="mailto:hp@pobox.com">hp@pobox.com</a>></code><br> - </p></div></div></div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="othername">A</span> <span class="surname">Wheeler</span></h3></div></div></div><div><p class="releaseinfo">Version 0.3</p></div></div><hr></div><div class="qandaset" title="Frequently Asked Questions"><a name="faq"></a><dl><dt>1. <a href="#idp480064"> + </p></div></div></div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="othername">A</span> <span class="surname">Wheeler</span></h3></div></div></div><div><p class="releaseinfo">Version 0.3</p></div></div><hr></div><div class="qandaset" title="Frequently Asked Questions"><a name="faq"></a><dl><dt>1. <a href="#idp480240"> What is D-Bus? - </a></dt><dt>2. <a href="#idp3774560"> + </a></dt><dt>2. <a href="#idp3774672"> Is D-Bus stable/finished? - </a></dt><dt>3. <a href="#idp3777728"> + </a></dt><dt>3. <a href="#idp3777840"> How is the reference implementation licensed? Can I use it in proprietary applications? - </a></dt><dt>4. <a href="#idp80512"> + </a></dt><dt>4. <a href="#idp80544"> What is the difference between a bus name, and object path, and an interface? </a></dt><dt>5. <a href="#service"> @@ -39,9 +39,9 @@ How does D-Bus differ from [yet more IPC mechanisms]? </a></dt><dt>18. <a href="#which-ipc"> Which IPC mechanism should I use? - </a></dt><dt>19. <a href="#idp4882016"> + </a></dt><dt>19. <a href="#idp4882048"> How can I submit a bug or patch? - </a></dt></dl><table border="0" width="100%" summary="Q and A Set"><col align="left" width="1%"><col><tbody><tr class="question" title="1."><td align="left" valign="top"><a name="idp480064"></a><a name="idp480320"></a><p><b>1.</b></p></td><td align="left" valign="top"><p> + </a></dt></dl><table border="0" width="100%" summary="Q and A Set"><col align="left" width="1%"><col><tbody><tr class="question" title="1."><td align="left" valign="top"><a name="idp480240"></a><a name="idp480496"></a><p><b>1.</b></p></td><td align="left" valign="top"><p> What is D-Bus? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> This is probably best answered by reading the D-Bus <a class="ulink" href="dbus-tutorial.html" target="_top">tutorial</a> or @@ -52,7 +52,7 @@ Phrased differently, D-Bus is 1) an interprocess communication (IPC) system and 2) some higher-level structure (lifecycle tracking, service activation, security policy) provided by two bus daemons, one systemwide and one per-user-session. - </p></td></tr><tr class="question" title="2."><td align="left" valign="top"><a name="idp3774560"></a><a name="idp3774816"></a><p><b>2.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="2."><td align="left" valign="top"><a name="idp3774672"></a><a name="idp3774928"></a><p><b>2.</b></p></td><td align="left" valign="top"><p> Is D-Bus stable/finished? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> The low-level library "libdbus" and the protocol specification are considered @@ -62,7 +62,7 @@ have their own release schedules and degree of maturity, not linked to the low-level library and bus daemon release. Check the project page for the binding you're considering to understand that project's policies. - </p></td></tr><tr class="question" title="3."><td align="left" valign="top"><a name="idp3777728"></a><a name="idp3777984"></a><p><b>3.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="3."><td align="left" valign="top"><a name="idp3777840"></a><a name="idp3778096"></a><p><b>3.</b></p></td><td align="left" valign="top"><p> How is the reference implementation licensed? Can I use it in proprietary applications? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> @@ -77,7 +77,7 @@ use D-Bus</em></span>. If you're going to sue, you have to stop using the software. Read the licenses to determine their meaning, this FAQ entry is not intended to change the meaning or terms of the licenses. - </p></td></tr><tr class="question" title="4."><td align="left" valign="top"><a name="idp80512"></a><a name="idp80768"></a><p><b>4.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="4."><td align="left" valign="top"><a name="idp80544"></a><a name="idp80800"></a><p><b>4.</b></p></td><td align="left" valign="top"><p> What is the difference between a bus name, and object path, and an interface? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> @@ -170,7 +170,7 @@ from component/object systems, though perhaps a "plugin" tends to be a bundle of objects with a user-visible name and can be downloaded/packaged as a unit. - </p></td></tr><tr class="question" title="7."><td align="left" valign="top"><a name="speed"></a><a name="idp113184"></a><p><b>7.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="7."><td align="left" valign="top"><a name="speed"></a><a name="idp113280"></a><p><b>7.</b></p></td><td align="left" valign="top"><p> How fast is the D-Bus reference implementation? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Of course it depends a bit on what you're doing. @@ -198,7 +198,7 @@ enable asynchronous communication and avoid round trips. This is frequently a more important performance issue than throughput. - </p></td></tr><tr class="question" title="8."><td align="left" valign="top"><a name="size"></a><a name="idp4796912"></a><p><b>8.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="8."><td align="left" valign="top"><a name="size"></a><a name="idp4796832"></a><p><b>8.</b></p></td><td align="left" valign="top"><p> How large is the D-Bus reference implementation? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> A production build (with assertions, unit tests, and verbose logging @@ -207,7 +207,7 @@ A much, much smaller implementation would be possible by omitting out of memory handling, hardcoding a main loop (or always using blocking I/O), skipping validation, and otherwise simplifying things. - </p></td></tr><tr class="question" title="9."><td align="left" valign="top"><a name="other-ipc"></a><a name="idp4799872"></a><p><b>9.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="9."><td align="left" valign="top"><a name="other-ipc"></a><a name="idp4799792"></a><p><b>9.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from other interprocess communication or networking protocols? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> @@ -240,7 +240,7 @@ Note: the D-Bus mailing list subscribers are <span class="emphasis"><em>very much not interested</em></span> in debating which IPC system is the One True System. So if you want to discuss that, please use another forum. - </p></td></tr><tr class="question" title="10."><td align="left" valign="top"><a name="corba"></a><a name="idp4808400"></a><p><b>10.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="10."><td align="left" valign="top"><a name="corba"></a><a name="idp4808320"></a><p><b>10.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from CORBA? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -311,7 +311,7 @@ supports lifecycle tracking of other applications connected to the bus. With XML-RPC and SOAP, typically each method call exists in isolation and has its own HTTP connection. - </p></td></tr><tr class="question" title="12."><td align="left" valign="top"><a name="dce"></a><a name="idp4847376"></a><p><b>12.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="12."><td align="left" valign="top"><a name="dce"></a><a name="idp4847408"></a><p><b>12.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from DCE? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -324,7 +324,7 @@ a distributed time service. As the name implies, DCE is intended for use in a large, multi-computer distributed application. D-Bus would not be well-suited for this. - </p></td></tr><tr class="question" title="13."><td align="left" valign="top"><a name="dcom"></a><a name="idp4852176"></a><p><b>13.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="13."><td align="left" valign="top"><a name="dcom"></a><a name="idp4852208"></a><p><b>13.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from DCOM and COM? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -334,7 +334,7 @@ </p><p> DCOM (distributed COM) is a Windows IPC system designed for use with the COM object system. It's similar in some ways to DCE and CORBA. - </p></td></tr><tr class="question" title="14."><td align="left" valign="top"><a name="internet-communications-engine"></a><a name="idp4856448"></a><p><b>14.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="14."><td align="left" valign="top"><a name="internet-communications-engine"></a><a name="idp4856480"></a><p><b>14.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from ZeroC's Internet Communications Engine (Ice) </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -344,7 +344,7 @@ on the level of SOAP or CORBA than D-Bus. Ice has a "dual-license" business around it; i.e. you can use it under the GPL, or pay for a proprietary license. - </p></td></tr><tr class="question" title="15."><td align="left" valign="top"><a name="inter-client-exchange"></a><a name="idp4860464"></a><p><b>15.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="15."><td align="left" valign="top"><a name="inter-client-exchange"></a><a name="idp4860496"></a><p><b>15.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from Inter-Client Exchange (ICE)? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> <a class="ulink" href="http://www.x.org/X11R6.8.1/docs/ICE/ice.pdf" target="_top">ICE</a> @@ -362,7 +362,7 @@ DCOP and XSMP are the only two widely-used applications of ICE, and both could in principle be replaced by D-Bus. (Though whether GNOME and KDE will bother is an open question.) - </p></td></tr><tr class="question" title="16."><td align="left" valign="top"><a name="dcop"></a><a name="idp4865088"></a><p><b>16.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="16."><td align="left" valign="top"><a name="dcop"></a><a name="idp4865120"></a><p><b>16.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from DCOP? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -389,14 +389,14 @@ DCOP's implementation to use D-Bus internally (so that GNOME and KDE would end up using exactly the same bus). See the KDE mailing list archives for some of these discussions. - </p></td></tr><tr class="question" title="17."><td align="left" valign="top"><a name="yet-more-ipc"></a><a name="idp4872080"></a><p><b>17.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="17."><td align="left" valign="top"><a name="yet-more-ipc"></a><a name="idp4872112"></a><p><b>17.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from [yet more IPC mechanisms]? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. </p><p> There are countless uses of network sockets in the world. <a class="ulink" href="http://www.mbus.org/" target="_top">MBUS</a>, Sun ONC/RPC, Jabber/XMPP, SIP, are some we can think of quickly. - </p></td></tr><tr class="question" title="18."><td align="left" valign="top"><a name="which-ipc"></a><a name="idp4876016"></a><p><b>18.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="18."><td align="left" valign="top"><a name="which-ipc"></a><a name="idp4876048"></a><p><b>18.</b></p></td><td align="left" valign="top"><p> Which IPC mechanism should I use? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -427,7 +427,7 @@ to search the list archives is probably to use an Internet engine such as Google. On Google, include "site:freedesktop.org" in your search. - </p></td></tr><tr class="question" title="19."><td align="left" valign="top"><a name="idp4882016"></a><a name="idp4882272"></a><p><b>19.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="19."><td align="left" valign="top"><a name="idp4882048"></a><a name="idp4882304"></a><p><b>19.</b></p></td><td align="left" valign="top"><p> How can I submit a bug or patch? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> The D-Bus <a class="ulink" href="http://dbus.freedesktop.org" target="_top">web site</a> diff --git a/doc/dbus-launch.1 b/doc/dbus-launch.1 index 0ea19495..089e0f2c 100644 --- a/doc/dbus-launch.1 +++ b/doc/dbus-launch.1 @@ -1,77 +1,77 @@ .\" -.\" dbus-launch manual page. +.\" dbus\-launch manual page. .\" Copyright (C) 2003 Red Hat, Inc. .\" -.TH dbus-launch 1 +.TH dbus\-launch 1 .SH NAME -dbus-launch \- Utility to start a message bus from a shell script +dbus\-launch \- Utility to start a message bus from a shell script .SH SYNOPSIS .PP -.B dbus-launch [\-\-version] [\-\-sh-syntax] [\-\-csh-syntax] [\-\-auto-syntax] [\-\-exit-with-session] [\-\-autolaunch=MACHINEID] [\-\-config-file=FILENAME] [PROGRAM] [ARGS...] +.B dbus\-launch [\-\-version] [\-\-sh\-syntax] [\-\-csh\-syntax] [\-\-auto\-syntax] [\-\-exit\-with\-session] [\-\-autolaunch=MACHINEID] [\-\-config\-file=FILENAME] [PROGRAM] [ARGS...] .SH DESCRIPTION -The \fIdbus-launch\fP command is used to start a session bus -instance of \fIdbus-daemon\fP from a shell script. +The \fIdbus\-launch\fP command is used to start a session bus +instance of \fIdbus\-daemon\fP from a shell script. It would normally be called from a user's login -scripts. Unlike the daemon itself, \fIdbus-launch\fP exits, so +scripts. Unlike the daemon itself, \fIdbus\-launch\fP exits, so backticks or the $() construct can be used to read information from -\fIdbus-launch\fP. +\fIdbus\-launch\fP. -With no arguments, \fIdbus-launch\fP will launch a session bus +With no arguments, \fIdbus\-launch\fP will launch a session bus instance and print the address and pid of that instance to standard output. -You may specify a program to be run; in this case, \fIdbus-launch\fP +You may specify a program to be run; in this case, \fIdbus\-launch\fP will launch a session bus instance, set the appropriate environment variables so the specified program can find the bus, and then execute the specified program, with the specified arguments. See below for examples. -If you launch a program, \fIdbus-launch\fP will not print the +If you launch a program, \fIdbus\-launch\fP will not print the information about the new bus to standard output. -When \fIdbus-launch\fP prints bus information to standard output, by -default it is in a simple key-value pairs format. However, you may -request several alternate syntaxes using the \-\-sh-syntax, \-\-csh-syntax, -\-\-binary-syntax, or -\-\-auto-syntax options. Several of these cause \fIdbus-launch\fP to emit shell code +When \fIdbus\-launch\fP prints bus information to standard output, by +default it is in a simple key\-value pairs format. However, you may +request several alternate syntaxes using the \-\-sh\-syntax, \-\-csh\-syntax, +\-\-binary\-syntax, or +\-\-auto\-syntax options. Several of these cause \fIdbus\-launch\fP to emit shell code to set up the environment. -With the \-\-auto-syntax option, \fIdbus-launch\fP looks at the value +With the \-\-auto\-syntax option, \fIdbus\-launch\fP looks at the value of the SHELL environment variable to determine which shell syntax -should be used. If SHELL ends in "csh", then csh-compatible code is +should be used. If SHELL ends in "csh", then csh\-compatible code is emitted; otherwise Bourne shell code is emitted. Instead of passing -\-\-auto-syntax, you may explicity specify a particular one by using -\-\-sh-syntax for Bourne syntax, or \-\-csh-syntax for csh syntax. -In scripts, it's more robust to avoid \-\-auto-syntax and you hopefully +\-\-auto\-syntax, you may explicity specify a particular one by using +\-\-sh\-syntax for Bourne syntax, or \-\-csh\-syntax for csh syntax. +In scripts, it's more robust to avoid \-\-auto\-syntax and you hopefully know which shell your script is written in. .PP See http://www.freedesktop.org/software/dbus/ for more information -about D-Bus. See also the man page for \fIdbus-daemon\fP. +about D\-Bus. See also the man page for \fIdbus\-daemon\fP. .PP -Here is an example of how to use \fIdbus-launch\fP with an -sh-compatible shell to start the per-session bus daemon: +Here is an example of how to use \fIdbus\-launch\fP with an +sh\-compatible shell to start the per\-session bus daemon: .nf ## test for an existing bus daemon, just to be safe - if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + if test \-z "$DBUS_SESSION_BUS_ADDRESS" ; then ## if not found, launch a new one - eval `dbus-launch --sh-syntax --exit-with-session` - echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" + eval `dbus\-launch \-\-sh\-syntax \-\-exit\-with\-session` + echo "D\-Bus per\-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" fi .fi You might run something like that in your login scripts. .PP -Another way to use \fIdbus-launch\fP is to run your main session +Another way to use \fIdbus\-launch\fP is to run your main session program, like so: .nf -dbus-launch gnome-session +dbus\-launch gnome\-session .fi The above would likely be appropriate for ~/.xsession or ~/.Xclients. @@ -80,10 +80,10 @@ The above would likely be appropriate for ~/.xsession or ~/.Xclients. .PP If DBUS_SESSION_BUS_ADDRESS is not set for a process that tries to use -D-Bus, by default the process will attempt to invoke dbus-launch with -the --autolaunch option to start up a new session bus or find the +D\-Bus, by default the process will attempt to invoke dbus\-launch with +the \-\-autolaunch option to start up a new session bus or find the existing bus address on the X display or in a file in -~/.dbus/session-bus/ +~/.dbus/session\-bus/ .PP Whenever an autolaunch occurs, the application that had to @@ -114,70 +114,70 @@ DBUS_SESSION_BUS_ADDRESS. Autolaunch happens because the default address if none is set is "autolaunch:", so if any other address is set there will be no autolaunch. You can however include autolaunch in an explicit session bus address as a fallback, for example -DBUS_SESSION_BUS_ADDRESS="something:,autolaunch:" - in that case if +DBUS_SESSION_BUS_ADDRESS="something:,autolaunch:" \- in that case if the first address doesn't work, processes will autolaunch. (The bus -address variable contains a comma-separated list of addresses to try.) +address variable contains a comma\-separated list of addresses to try.) .PP -The --autolaunch option is considered an internal implementation +The \-\-autolaunch option is considered an internal implementation detail of libdbus, and in fact there are plans to change it. There's no real reason to use it outside of the libdbus implementation anyhow. .SH OPTIONS The following options are supported: .TP -.I "--auto-syntax" -Choose \-\-csh-syntax or \-\-sh-syntax based on the SHELL environment variable. +.I "\-\-auto\-syntax" +Choose \-\-csh\-syntax or \-\-sh\-syntax based on the SHELL environment variable. -.I "--binary-syntax" -Write to stdout a nul-terminated bus address, then the bus PID as a +.I "\-\-binary\-syntax" +Write to stdout a nul\-terminated bus address, then the bus PID as a binary integer of size sizeof(pid_t), then the bus X window ID as a binary integer of size sizeof(long). Integers are in the machine's byte order, not network byte order or any other canonical byte order. .TP -.I "--close-stderr" -Close the standard error output stream before starting the D-Bus -daemon. This is useful if you want to capture dbus-launch error -messages but you don't want dbus-daemon to keep the stream open to +.I "\-\-close\-stderr" +Close the standard error output stream before starting the D\-Bus +daemon. This is useful if you want to capture dbus\-launch error +messages but you don't want dbus\-daemon to keep the stream open to your application. .TP -.I "--config-file=FILENAME" -Pass \-\-config-file=FILENAME to the bus daemon, instead of passing it -the \-\-session argument. See the man page for dbus-daemon +.I "\-\-config\-file=FILENAME" +Pass \-\-config\-file=FILENAME to the bus daemon, instead of passing it +the \-\-session argument. See the man page for dbus\-daemon .TP -.I "--csh-syntax" +.I "\-\-csh\-syntax" Emit csh compatible code to set up environment variables. .TP -.I "--exit-with-session" +.I "\-\-exit\-with\-session" If this option is provided, a persistent "babysitter" process will be created that watches stdin for HUP and tries to connect to the X server. If this process gets a HUP on stdin or loses its X connection, it kills the message bus daemon. .TP -.I "--autolaunch=MACHINEID" -This option implies that \fIdbus-launch\fP should scan for a -previously-started session and reuse the values found there. If no +.I "\-\-autolaunch=MACHINEID" +This option implies that \fIdbus\-launch\fP should scan for a +previously\-started session and reuse the values found there. If no session is found, it will start a new session. The -\-\-exit-with-session option is implied if \-\-autolaunch is given. +\-\-exit\-with\-session option is implied if \-\-autolaunch is given. This option is for the exclusive use of libdbus, you do not want to use it manually. It may change in the future. .TP -.I "--sh-syntax" -Emit Bourne-shell compatible code to set up environment variables. +.I "\-\-sh\-syntax" +Emit Bourne\-shell compatible code to set up environment variables. .TP -.I "--version" -Print the version of dbus-launch +.I "\-\-version" +Print the version of dbus\-launch .SH AUTHOR See http://www.freedesktop.org/software/dbus/doc/AUTHORS .SH BUGS -Please send bug reports to the D-Bus mailing list or bug tracker, +Please send bug reports to the D\-Bus mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/ diff --git a/doc/dbus-monitor.1 b/doc/dbus-monitor.1 index c24c14d9..6282b9eb 100644 --- a/doc/dbus-monitor.1 +++ b/doc/dbus-monitor.1 @@ -1,78 +1,78 @@ .\" -.\" dbus-monitor manual page. +.\" dbus\-monitor manual page. .\" Copyright (C) 2003 Red Hat, Inc. .\" -.TH dbus-monitor 1 +.TH dbus\-monitor 1 .SH NAME -dbus-monitor \- debug probe to print message bus messages +dbus\-monitor \- debug probe to print message bus messages .SH SYNOPSIS .PP -.B dbus-monitor +.B dbus\-monitor [\-\-system | \-\-session | \-\-address ADDRESS] [\-\-profile | \-\-monitor] [watch expressions] .SH DESCRIPTION -The \fIdbus-monitor\fP command is used to monitor messages going -through a D-Bus message bus. See +The \fIdbus\-monitor\fP command is used to monitor messages going +through a D\-Bus message bus. See http://www.freedesktop.org/software/dbus/ for more information about the big picture. .PP -There are two well-known message buses: the systemwide message bus +There are two well\-known message buses: the systemwide message bus (installed on many systems as the "messagebus" service) and the -per-user-login-session message bus (started each time a user logs in). -The \-\-system and \-\-session options direct \fIdbus-monitor\fP to +per\-user\-login\-session message bus (started each time a user logs in). +The \-\-system and \-\-session options direct \fIdbus\-monitor\fP to monitor the system or session buses respectively. If neither is -specified, \fIdbus-monitor\fP monitors the session bus. +specified, \fIdbus\-monitor\fP monitors the session bus. .PP -\fIdbus-monitor\fP has two different output modes, the 'classic'-style +\fIdbus\-monitor\fP has two different output modes, the 'classic'\-style monitoring mode and profiling mode. The profiling format is a compact -format with a single line per message and microsecond-resolution timing +format with a single line per message and microsecond\-resolution timing information. The \-\-profile and \-\-monitor options select the profiling and monitoring output format respectively. If neither is specified, -\fIdbus-monitor\fP uses the monitoring output format. +\fIdbus\-monitor\fP uses the monitoring output format. .PP -In order to get \fIdbus-monitor\fP to see the messages you are interested +In order to get \fIdbus\-monitor\fP to see the messages you are interested in, you should specify a set of watch expressions as you would expect to be passed to the \fIdbus_bus_add_match\fP function. .PP -The message bus configuration may keep \fIdbus-monitor\fP from seeing -all messages, especially if you run the monitor as a non-root user. +The message bus configuration may keep \fIdbus\-monitor\fP from seeing +all messages, especially if you run the monitor as a non\-root user. .SH OPTIONS .TP -.I "--system" +.I "\-\-system" Monitor the system message bus. .TP -.I "--session" +.I "\-\-session" Monitor the session message bus. (This is the default.) .TP -.I "--address ADDRESS" +.I "\-\-address ADDRESS" Monitor an arbitrary message bus given at ADDRESS. .TP -.I "--profile" +.I "\-\-profile" Use the profiling output format. .TP -.I "--monitor" +.I "\-\-monitor" Use the monitoring output format. (This is the default.) .SH EXAMPLE -Here is an example of using dbus-monitor to watch for the gnome typing +Here is an example of using dbus\-monitor to watch for the gnome typing monitor to say things .nf - dbus-monitor "type='signal',sender='org.gnome.TypingMonitor',interface='org.gnome.TypingMonitor'" + dbus\-monitor "type='signal',sender='org.gnome.TypingMonitor',interface='org.gnome.TypingMonitor'" .fi .SH AUTHOR -dbus-monitor was written by Philip Blundell. +dbus\-monitor was written by Philip Blundell. The profiling output mode was added by Olli Salli. .SH BUGS -Please send bug reports to the D-Bus mailing list or bug tracker, +Please send bug reports to the D\-Bus mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/ diff --git a/doc/dbus-send.1 b/doc/dbus-send.1 index 4878c3d9..adbb869c 100644 --- a/doc/dbus-send.1 +++ b/doc/dbus-send.1 @@ -1,39 +1,39 @@ .\" -.\" dbus-send manual page. +.\" dbus\-send manual page. .\" Copyright (C) 2003 Red Hat, Inc. .\" -.TH dbus-send 1 +.TH dbus\-send 1 .SH NAME -dbus-send \- Send a message to a message bus +dbus\-send \- Send a message to a message bus .SH SYNOPSIS .PP -.B dbus-send -[\-\-system | \-\-session] [\-\-dest=NAME] [\-\-print-reply] +.B dbus\-send +[\-\-system | \-\-session] [\-\-dest=NAME] [\-\-print\-reply] [\-\-type=TYPE] <destination object path> <message name> [contents ...] .SH DESCRIPTION -The \fIdbus-send\fP command is used to send a message to a D-Bus message +The \fIdbus\-send\fP command is used to send a message to a D\-Bus message bus. See http://www.freedesktop.org/software/dbus/ for more information about the big picture. .PP -There are two well-known message buses: the systemwide message bus +There are two well\-known message buses: the systemwide message bus (installed on many systems as the "messagebus" service) and the -per-user-login-session message bus (started each time a user logs in). -The \-\-system and \-\-session options direct \fIdbus-send\fP to send +per\-user\-login\-session message bus (started each time a user logs in). +The \-\-system and \-\-session options direct \fIdbus\-send\fP to send messages to the system or session buses respectively. If neither is -specified, \fIdbus-send\fP sends to the session bus. +specified, \fIdbus\-send\fP sends to the session bus. .PP -Nearly all uses of \fIdbus-send\fP must provide the \-\-dest argument +Nearly all uses of \fIdbus\-send\fP must provide the \-\-dest argument which is the name of a connection on the bus to send the message to. If \-\-dest is omitted, no destination is set. .PP The object path and the name of the message to send must always be specified. Following arguments, if any, are the message contents -(message arguments). These are given as type-specified values and +(message arguments). These are given as type\-specified values and may include containers (arrays, dicts, and variants) as described below. .nf @@ -46,21 +46,21 @@ may include containers (arrays, dicts, and variants) as described below. <type> ::= string | int16 | uint 16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath .fi -D-Bus supports more types than these, but \fIdbus-send\fP currently -does not. Also, \fIdbus-send\fP does not permit empty containers +D\-Bus supports more types than these, but \fIdbus\-send\fP currently +does not. Also, \fIdbus\-send\fP does not permit empty containers or nested containers (e.g. arrays of variants). .PP Here is an example invocation: .nf - dbus-send \-\-dest=org.freedesktop.ExampleName \\ + dbus\-send \-\-dest=org.freedesktop.ExampleName \\ /org/freedesktop/sample/object/name \\ org.freedesktop.ExampleInterface.ExampleMethod \\ int32:47 string:'hello world' double:65.32 \\ array:string:"1st item","next item","last item" \\ dict:string:int32:"one",1,"two",2,"three",3 \\ - variant:int32:-8 \\ + variant:int32:\-8 \\ objpath:/org/freedesktop/sample/object/name .fi @@ -72,24 +72,24 @@ and the interface member are separate fields. .SH OPTIONS The following options are supported: .TP -.I "--dest=NAME" +.I "\-\-dest=NAME" Specify the name of the connection to receive the message. .TP -.I "--print-reply" +.I "\-\-print\-reply" Block for a reply to the message sent, and print any reply received. .TP -.I "--system" +.I "\-\-system" Send to the system message bus. .TP -.I "--session" +.I "\-\-session" Send to the session message bus. (This is the default.) .TP -.I "--type=TYPE" +.I "\-\-type=TYPE" Specify "method_call" or "signal" (defaults to "signal"). .SH AUTHOR -dbus-send was written by Philip Blundell. +dbus\-send was written by Philip Blundell. .SH BUGS -Please send bug reports to the D-Bus mailing list or bug tracker, +Please send bug reports to the D\-Bus mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/ diff --git a/doc/dbus-specification.html b/doc/dbus-specification.html index 25df08f7..fd2166e3 100644 --- a/doc/dbus-specification.html +++ b/doc/dbus-specification.html @@ -6,7 +6,7 @@ <code class="email"><<a class="email" href="mailto:alexl@redhat.com">alexl@redhat.com</a>></code><br> </p></div></div></div><div class="author"><h3 class="author"><span class="firstname">Sven</span> <span class="surname">Herzberg</span></h3><div class="affiliation"><span class="orgname">Imendio AB<br></span><div class="address"><p><br> <code class="email"><<a class="email" href="mailto:sven@imendio.com">sven@imendio.com</a>></code><br> - </p></div></div></div></div></div><div><p class="releaseinfo">Version 0.15</p></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="3"><b>Revision History</b></th></tr><tr><td align="left">Revision current</td><td align="left"><a class="ulink" href="http://cgit.freedesktop.org/dbus/dbus/log/doc/dbus-specification.xml" target="_top">commit log</a></td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.15</td><td align="left">3 November 2010</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.14</td><td align="left">12 May 2010</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.13</td><td align="left">23 Dezember 2009</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.12</td><td align="left">7 November, 2006</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.11</td><td align="left">6 February 2005</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.10</td><td align="left">28 January 2005</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.9</td><td align="left">7 Januar 2005</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.8</td><td align="left">06 September 2003</td><td align="left"></td></tr><tr><td align="left" colspan="3">First released document.</td></tr></table></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#introduction">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#stability">Protocol and Specification Stability</a></span></dt></dl></dd><dt><span class="sect1"><a href="#message-protocol">Message Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="#message-protocol-signatures">Type Signatures</a></span></dt><dt><span class="sect2"><a href="#message-protocol-marshaling">Marshaling (Wire Format)</a></span></dt><dt><span class="sect2"><a href="#message-protocol-messages">Message Format</a></span></dt><dt><span class="sect2"><a href="#message-protocol-names">Valid Names</a></span></dt><dt><span class="sect2"><a href="#message-protocol-types">Message Types</a></span></dt><dt><span class="sect2"><a href="#message-protocol-handling-invalid">Invalid Protocol and Spec Extensions</a></span></dt></dl></dd><dt><span class="sect1"><a href="#auth-protocol">Authentication Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="#auth-protocol-overview">Protocol Overview</a></span></dt><dt><span class="sect2"><a href="#auth-nul-byte">Special credentials-passing nul byte</a></span></dt><dt><span class="sect2"><a href="#auth-command-auth">AUTH command</a></span></dt><dt><span class="sect2"><a href="#auth-command-cancel">CANCEL Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-data">DATA Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-begin">BEGIN Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-rejected">REJECTED Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-ok">OK Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-error">ERROR Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-negotiate-unix-fd">NEGOTIATE_UNIX_FD Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-agree-unix-fd">AGREE_UNIX_FD Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-future">Future Extensions</a></span></dt><dt><span class="sect2"><a href="#auth-examples">Authentication examples</a></span></dt><dt><span class="sect2"><a href="#auth-states">Authentication state diagrams</a></span></dt><dt><span class="sect2"><a href="#auth-mechanisms">Authentication mechanisms</a></span></dt></dl></dd><dt><span class="sect1"><a href="#addresses">Server Addresses</a></span></dt><dt><span class="sect1"><a href="#transports">Transports</a></span></dt><dd><dl><dt><span class="sect2"><a href="#transports-unix-domain-sockets">Unix Domain Sockets</a></span></dt><dt><span class="sect2"><a href="#transports-launchd">launchd</a></span></dt><dt><span class="sect2"><a href="#transports-tcp-sockets">TCP Sockets</a></span></dt><dt><span class="sect2"><a href="#transports-nonce-tcp-sockets">Nonce-secured TCP Sockets</a></span></dt></dl></dd><dt><span class="sect1"><a href="#meta-transports">Meta Transports</a></span></dt><dd><dl><dt><span class="sect2"><a href="#meta-transports-autolaunch">Autolaunch</a></span></dt></dl></dd><dt><span class="sect1"><a href="#naming-conventions">Naming Conventions</a></span></dt><dt><span class="sect1"><a href="#uuids">UUIDs</a></span></dt><dt><span class="sect1"><a href="#standard-interfaces">Standard Interfaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="#standard-interfaces-peer"><code class="literal">org.freedesktop.DBus.Peer</code></a></span></dt><dt><span class="sect2"><a href="#standard-interfaces-introspectable"><code class="literal">org.freedesktop.DBus.Introspectable</code></a></span></dt><dt><span class="sect2"><a href="#standard-interfaces-properties"><code class="literal">org.freedesktop.DBus.Properties</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="#introspection-format">Introspection Data Format</a></span></dt><dt><span class="sect1"><a href="#message-bus">Message Bus Specification</a></span></dt><dd><dl><dt><span class="sect2"><a href="#message-bus-overview">Message Bus Overview</a></span></dt><dt><span class="sect2"><a href="#message-bus-names">Message Bus Names</a></span></dt><dt><span class="sect2"><a href="#message-bus-routing">Message Bus Message Routing</a></span></dt><dt><span class="sect2"><a href="#message-bus-starting-services">Message Bus Starting Services</a></span></dt><dt><span class="sect2"><a href="#message-bus-types">Well-known Message Bus Instances</a></span></dt><dt><span class="sect2"><a href="#message-bus-messages">Message Bus Messages</a></span></dt></dl></dd><dt><span class="glossary"><a href="#idp5788624">Glossary</a></span></dt></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introduction"></a>Introduction</h2></div></div></div><p> + </p></div></div></div></div></div><div><p class="releaseinfo">Version 0.15</p></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="3"><b>Revision History</b></th></tr><tr><td align="left">Revision current</td><td align="left"><a class="ulink" href="http://cgit.freedesktop.org/dbus/dbus/log/doc/dbus-specification.xml" target="_top">commit log</a></td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.15</td><td align="left">3 November 2010</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.14</td><td align="left">12 May 2010</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.13</td><td align="left">23 Dezember 2009</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.12</td><td align="left">7 November, 2006</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.11</td><td align="left">6 February 2005</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.10</td><td align="left">28 January 2005</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.9</td><td align="left">7 Januar 2005</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.8</td><td align="left">06 September 2003</td><td align="left"></td></tr><tr><td align="left" colspan="3">First released document.</td></tr></table></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#introduction">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#stability">Protocol and Specification Stability</a></span></dt></dl></dd><dt><span class="sect1"><a href="#message-protocol">Message Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="#message-protocol-signatures">Type Signatures</a></span></dt><dt><span class="sect2"><a href="#message-protocol-marshaling">Marshaling (Wire Format)</a></span></dt><dt><span class="sect2"><a href="#message-protocol-messages">Message Format</a></span></dt><dt><span class="sect2"><a href="#message-protocol-names">Valid Names</a></span></dt><dt><span class="sect2"><a href="#message-protocol-types">Message Types</a></span></dt><dt><span class="sect2"><a href="#message-protocol-handling-invalid">Invalid Protocol and Spec Extensions</a></span></dt></dl></dd><dt><span class="sect1"><a href="#auth-protocol">Authentication Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="#auth-protocol-overview">Protocol Overview</a></span></dt><dt><span class="sect2"><a href="#auth-nul-byte">Special credentials-passing nul byte</a></span></dt><dt><span class="sect2"><a href="#auth-command-auth">AUTH command</a></span></dt><dt><span class="sect2"><a href="#auth-command-cancel">CANCEL Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-data">DATA Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-begin">BEGIN Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-rejected">REJECTED Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-ok">OK Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-error">ERROR Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-negotiate-unix-fd">NEGOTIATE_UNIX_FD Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-agree-unix-fd">AGREE_UNIX_FD Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-future">Future Extensions</a></span></dt><dt><span class="sect2"><a href="#auth-examples">Authentication examples</a></span></dt><dt><span class="sect2"><a href="#auth-states">Authentication state diagrams</a></span></dt><dt><span class="sect2"><a href="#auth-mechanisms">Authentication mechanisms</a></span></dt></dl></dd><dt><span class="sect1"><a href="#addresses">Server Addresses</a></span></dt><dt><span class="sect1"><a href="#transports">Transports</a></span></dt><dd><dl><dt><span class="sect2"><a href="#transports-unix-domain-sockets">Unix Domain Sockets</a></span></dt><dt><span class="sect2"><a href="#transports-launchd">launchd</a></span></dt><dt><span class="sect2"><a href="#transports-tcp-sockets">TCP Sockets</a></span></dt><dt><span class="sect2"><a href="#transports-nonce-tcp-sockets">Nonce-secured TCP Sockets</a></span></dt></dl></dd><dt><span class="sect1"><a href="#meta-transports">Meta Transports</a></span></dt><dd><dl><dt><span class="sect2"><a href="#meta-transports-autolaunch">Autolaunch</a></span></dt></dl></dd><dt><span class="sect1"><a href="#naming-conventions">Naming Conventions</a></span></dt><dt><span class="sect1"><a href="#uuids">UUIDs</a></span></dt><dt><span class="sect1"><a href="#standard-interfaces">Standard Interfaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="#standard-interfaces-peer"><code class="literal">org.freedesktop.DBus.Peer</code></a></span></dt><dt><span class="sect2"><a href="#standard-interfaces-introspectable"><code class="literal">org.freedesktop.DBus.Introspectable</code></a></span></dt><dt><span class="sect2"><a href="#standard-interfaces-properties"><code class="literal">org.freedesktop.DBus.Properties</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="#introspection-format">Introspection Data Format</a></span></dt><dt><span class="sect1"><a href="#message-bus">Message Bus Specification</a></span></dt><dd><dl><dt><span class="sect2"><a href="#message-bus-overview">Message Bus Overview</a></span></dt><dt><span class="sect2"><a href="#message-bus-names">Message Bus Names</a></span></dt><dt><span class="sect2"><a href="#message-bus-routing">Message Bus Message Routing</a></span></dt><dt><span class="sect2"><a href="#message-bus-starting-services">Message Bus Starting Services</a></span></dt><dt><span class="sect2"><a href="#message-bus-types">Well-known Message Bus Instances</a></span></dt><dt><span class="sect2"><a href="#message-bus-messages">Message Bus Messages</a></span></dt></dl></dd><dt><span class="glossary"><a href="#idp30208384">Glossary</a></span></dt></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introduction"></a>Introduction</h2></div></div></div><p> D-Bus is a system for low-latency, low-overhead, easy to use interprocess communication (IPC). In more detail: </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> @@ -899,14 +899,14 @@ commands may be introduced both before, and after authentication, i.e. both before and after the OK command. </p></div><div class="sect2" title="Authentication examples"><div class="titlepage"><div><div><h3 class="title"><a name="auth-examples"></a>Authentication examples</h3></div></div></div><p> - </p><div class="figure"><a name="idp5160880"></a><p class="title"><b>Figure 1. Example of successful magic cookie authentication</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp29580736"></a><p class="title"><b>Figure 1. Example of successful magic cookie authentication</b></p><div class="figure-contents"><pre class="programlisting"> (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="idp5162704"></a><p class="title"><b>Figure 2. Example of finding out mechanisms then picking one</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp29582560"></a><p class="title"><b>Figure 2. Example of finding out mechanisms then picking one</b></p><div class="figure-contents"><pre class="programlisting"> C: AUTH S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -915,14 +915,14 @@ S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="idp5164608"></a><p class="title"><b>Figure 3. Example of client sends unknown command then falls back to regular auth</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp29584464"></a><p class="title"><b>Figure 3. Example of client sends unknown command then falls back to regular auth</b></p><div class="figure-contents"><pre class="programlisting"> C: FOOBAR S: ERROR C: AUTH MAGIC_COOKIE 3736343435313230333039 S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="idp5166496"></a><p class="title"><b>Figure 4. Example of server doesn't support initial auth mechanism</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp29586352"></a><p class="title"><b>Figure 4. Example of server doesn't support initial auth mechanism</b></p><div class="figure-contents"><pre class="programlisting"> C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -931,7 +931,7 @@ S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="idp5168512"></a><p class="title"><b>Figure 5. Example of wrong password or the like followed by successful retry</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp29588368"></a><p class="title"><b>Figure 5. Example of wrong password or the like followed by successful retry</b></p><div class="figure-contents"><pre class="programlisting"> C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -944,7 +944,7 @@ S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="idp5170688"></a><p class="title"><b>Figure 6. Example of skey cancelled and restarted</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp29590544"></a><p class="title"><b>Figure 6. Example of skey cancelled and restarted</b></p><div class="figure-contents"><pre class="programlisting"> C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -957,7 +957,7 @@ S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="idp5172752"></a><p class="title"><b>Figure 7. Example of successful magic cookie authentication with successful negotiation of Unix FD passing</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp29592608"></a><p class="title"><b>Figure 7. Example of successful magic cookie authentication with successful negotiation of Unix FD passing</b></p><div class="figure-contents"><pre class="programlisting"> (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 @@ -966,7 +966,7 @@ S: AGREE_UNIX_FD C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="idp5174752"></a><p class="title"><b>Figure 8. Example of successful magic cookie authentication with unsuccessful negotiation of Unix FD passing</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp29594608"></a><p class="title"><b>Figure 8. Example of successful magic cookie authentication with unsuccessful negotiation of Unix FD passing</b></p><div class="figure-contents"><pre class="programlisting"> (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 @@ -1244,7 +1244,7 @@ fails, the lock fails. Servers should retry for a reasonable period of time, then they may choose to delete an existing lock to keep users from having to manually delete a stale - lock. <sup>[<a name="idp5260208" href="#ftn.idp5260208" class="footnote">1</a>]</sup> + lock. <sup>[<a name="idp29679968" href="#ftn.idp29679968" class="footnote">1</a>]</sup> </p></li><li class="listitem"><p> Once the lockfile has been created, the server loads the cookie file. It should then delete any cookies that are old (the @@ -2010,7 +2010,7 @@ </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>General syntax</p></li><li class="listitem"><p>Comment format</p></li></ul></div><p> - </p><div class="figure"><a name="idp5565232"></a><p class="title"><b>Figure 9. Example service description file</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp29984992"></a><p class="title"><b>Figure 9. Example service description file</b></p><div class="figure-contents"><pre class="programlisting"> # Sample service description file [D-BUS Service] Names=org.freedesktop.ConfigurationDatabase;org.gnome.GConf; @@ -2180,7 +2180,7 @@ allowing another process to set the selection between the verification and the setting (e.g., by using XGrabServer / XungrabServer). - </p></div><div class="sect4"><div class="titlepage"><div><div><h5 class="title"><a name="idp5618000"></a></h5></div></div></div><p> + </p></div><div class="sect4"><div class="titlepage"><div><div><h5 class="title"><a name="idp30037760"></a></h5></div></div></div><p> [FIXME specify location of .service files, probably using DESKTOP_DIRS etc. from basedir specification, though login session bus is not really desktop-specific] @@ -2195,7 +2195,7 @@ variable. If that variable is not set, applications should try to connect to the well-known address <code class="literal">unix:path=/var/run/dbus/system_bus_socket</code>. - <sup>[<a name="idp5623024" href="#ftn.idp5623024" class="footnote">2</a>]</sup> + <sup>[<a name="idp30042784" href="#ftn.idp30042784" class="footnote">2</a>]</sup> </p><p> [FIXME specify location of system bus .service files] </p></div></div><div class="sect2" title="Message Bus Messages"><div class="titlepage"><div><div><h3 class="title"><a name="message-bus-messages"></a>Message Bus Messages</h3></div></div></div><p> @@ -2380,7 +2380,7 @@ There is also a per-machine ID, described in <a class="xref" href="#standard-interfaces-peer" title="org.freedesktop.DBus.Peer">the section called “<code class="literal">org.freedesktop.DBus.Peer</code>”</a> and returned by org.freedesktop.DBus.Peer.GetMachineId(). For a desktop session bus, the bus ID can be used as a way to uniquely identify a user's session. - </p></div></div></div><div class="glossary" title="Glossary"><div class="titlepage"><div><div><h2 class="title"><a name="idp5788624"></a>Glossary</h2></div></div></div><p> + </p></div></div></div><div class="glossary" title="Glossary"><div class="titlepage"><div><div><h2 class="title"><a name="idp30208384"></a>Glossary</h2></div></div></div><p> This glossary defines some of the terms used in this specification. </p><dl><dt><a name="term-bus-name"></a>Bus Name</dt><dd><p> The message bus maintains an association between names and @@ -2454,10 +2454,10 @@ message bus. This name will never change owner, and will be unique (never reused during the lifetime of the message bus). It will begin with a ':' character. - </p></dd></dl></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.idp5260208" href="#idp5260208" class="para">1</a>] </sup>Lockfiles are used instead of real file + </p></dd></dl></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.idp29679968" href="#idp29679968" class="para">1</a>] </sup>Lockfiles are used instead of real file locking <code class="literal">fcntl()</code> because real locking implementations are still flaky on network - filesystems.</p></div><div class="footnote"><p><sup>[<a name="ftn.idp5623024" href="#idp5623024" class="para">2</a>] </sup> + filesystems.</p></div><div class="footnote"><p><sup>[<a name="ftn.idp30042784" href="#idp30042784" class="para">2</a>] </sup> The D-Bus reference implementation actually honors the <code class="literal">$(localstatedir)</code> configure option for this address, on both client and server side. diff --git a/doc/dbus-test-plan.html b/doc/dbus-test-plan.html index 1eaafd23..44991af2 100644 --- a/doc/dbus-test-plan.html +++ b/doc/dbus-test-plan.html @@ -38,7 +38,7 @@ Message Builder. The message builder can take a serialized message in string-form and convert it into a raw character string which can then be loaded by the message loader. - </p><div class="figure"><a name="idp58256"></a><p class="title"><b>Figure 1. Example of a message in string form</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp24477888"></a><p class="title"><b>Figure 1. Example of a message in string form</b></p><div class="figure-contents"><pre class="programlisting"> # Standard org.freedesktop.DBus.Hello message VALID_HEADER @@ -75,7 +75,7 @@ can read authentication sequences from a file and play them back to a dummy server and client to make sure that authentication is working according to the specification. - </p><div class="figure"><a name="idp64944"></a><p class="title"><b>Figure 2. Example of an authentication script</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="idp24484576"></a><p class="title"><b>Figure 2. Example of an authentication script</b></p><div class="figure-contents"><pre class="programlisting"> ## this tests a successful auth of type EXTERNAL SERVER diff --git a/doc/dbus-uuidgen.1 b/doc/dbus-uuidgen.1 index 480fd18f..8ed8dd20 100644 --- a/doc/dbus-uuidgen.1 +++ b/doc/dbus-uuidgen.1 @@ -1,36 +1,36 @@ .\" -.\" dbus-uuidgen manual page. +.\" dbus\-uuidgen manual page. .\" Copyright (C) 2006 Red Hat, Inc. .\" -.TH dbus-uuidgen 1 +.TH dbus\-uuidgen 1 .SH NAME -dbus-uuidgen \- Utility to generate UUIDs +dbus\-uuidgen \- Utility to generate UUIDs .SH SYNOPSIS .PP -.B dbus-uuidgen [\-\-version] [\-\-ensure[=FILENAME]] [\-\-get[=FILENAME]] +.B dbus\-uuidgen [\-\-version] [\-\-ensure[=FILENAME]] [\-\-get[=FILENAME]] .SH DESCRIPTION -The \fIdbus-uuidgen\fP command generates or reads a universally unique ID. +The \fIdbus\-uuidgen\fP command generates or reads a universally unique ID. .PP -Note that the D-Bus UUID has no relationship to RFC 4122 and does not generate +Note that the D\-Bus UUID has no relationship to RFC 4122 and does not generate UUIDs compatible with that spec. Many systems have a separate command for that (often called "uuidgen"). .PP See http://www.freedesktop.org/software/dbus/ for more information -about D-Bus. +about D\-Bus. .PP -The primary usage of \fIdbus-uuidgen\fP is to run in the post-install -script of a D-Bus package like this: +The primary usage of \fIdbus\-uuidgen\fP is to run in the post\-install +script of a D\-Bus package like this: .nf - dbus-uuidgen --ensure + dbus\-uuidgen \-\-ensure .fi .PP -This will ensure that /var/lib/dbus/machine-id exists and has the uuid in it. +This will ensure that /var/lib/dbus/machine\-id exists and has the uuid in it. It won't overwrite an existing uuid, since this id should remain fixed for a single machine until the next reboot at least. @@ -43,15 +43,15 @@ sockets, local X displays, localhost.localdomain resolution, process IDs, and so forth. .PP -If you run \fIdbus-uuidgen\fP with no options it just prints a new uuid made +If you run \fIdbus\-uuidgen\fP with no options it just prints a new uuid made up out of thin air. .PP -If you run it with --get, it prints the machine UUID by default, or +If you run it with \-\-get, it prints the machine UUID by default, or the UUID in the specified file if you specify a file. .PP -If you try to change an existing machine-id on a running system, it will +If you try to change an existing machine\-id on a running system, it will probably result in bad things happening. Don't try to change this file. Also, don't make it the same on two different systems; it needs to be different anytime there are two different kernels running. @@ -63,27 +63,27 @@ because there are two different kernels. .SH OPTIONS The following options are supported: .TP -.I "--get[=FILENAME]" -If a filename is not given, defaults to localstatedir/lib/dbus/machine-id +.I "\-\-get[=FILENAME]" +If a filename is not given, defaults to localstatedir/lib/dbus/machine\-id (localstatedir is usually /var). If this file exists and is valid, the uuid in the file is printed on stdout. Otherwise, the command exits with a nonzero status. .TP -.I "--ensure[=FILENAME]" -If a filename is not given, defaults to localstatedir/lib/dbus/machine-id +.I "\-\-ensure[=FILENAME]" +If a filename is not given, defaults to localstatedir/lib/dbus/machine\-id (localstatedir is usually /var). If this file exists then it will be validated, and a failure code returned if it contains the wrong thing. If the file does not exist, it will be created with a new uuid in it. On success, prints no output. .TP -.I "--version" -Print the version of dbus-uuidgen +.I "\-\-version" +Print the version of dbus\-uuidgen .SH AUTHOR See http://www.freedesktop.org/software/dbus/doc/AUTHORS .SH BUGS -Please send bug reports to the D-Bus mailing list or bug tracker, +Please send bug reports to the D\-Bus mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/ diff --git a/test/Makefile.am b/test/Makefile.am index 99740c9a..c308c4bc 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -13,15 +13,42 @@ noinst_LTLIBRARIES = libdbus-testutils.la if DBUS_BUILD_TESTS ## break-loader removed for now ## most of these binaries are used in tests but are not themselves tests -TEST_BINARIES=test-service test-names test-shell-service shell-test spawn-test test-segfault test-exit test-sleep-forever +TEST_BINARIES = \ + shell-test \ + spawn-test \ + test-exit \ + test-names \ + test-segfault \ + test-service \ + test-shell-service \ + test-sleep-forever \ + $(NULL) ## these are the things to run in make check (i.e. they are actual tests) ## (binaries in here must also be in TEST_BINARIES) -TESTS=shell-test -else +TESTS = \ + shell-test \ + $(NULL) + +## These are conceptually part of directories that come earlier in SUBDIRS +## order, but we don't want to run them til we arrive in this directory, +## since they depend on stuff from this directory +TESTS += \ + ../bus/bus-test$(EXEEXT) \ + ../bus/bus-test-system$(EXEEXT) \ + ../dbus/dbus-test$(EXEEXT) \ + $(NULL) + +if DBUS_UNIX +TESTS += ../bus/bus-test-launch-helper$(EXEEXT) +endif + +else !DBUS_BUILD_TESTS + TEST_BINARIES= TESTS= -endif + +endif !DBUS_BUILD_TESTS noinst_PROGRAMS= $(TEST_BINARIES) @@ -90,8 +117,12 @@ installcheck_environment = \ DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir) TESTS_ENVIRONMENT = \ + DBUS_BLOCK_ON_ABORT=1 \ + DBUS_FATAL_WARNINGS=1 \ DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ - DBUS_TEST_DATA=@abs_top_builddir@/test/data + DBUS_TEST_DATA=@abs_top_builddir@/test/data \ + DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ + $(NULL) test_corrupt_SOURCES = corrupt.c test_corrupt_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS) diff --git a/test/Makefile.in b/test/Makefile.in index c9a0ab76..0deb1890 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -36,13 +36,18 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @DBUS_BUILD_TESTS_FALSE@TESTS = $(am__EXEEXT_5) -@DBUS_BUILD_TESTS_TRUE@TESTS = shell-test$(EXEEXT) $(am__EXEEXT_5) +@DBUS_BUILD_TESTS_TRUE@TESTS = shell-test$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@ ../bus/bus-test$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@ ../bus/bus-test-system$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@ ../dbus/dbus-test$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@ $(am__append_1) $(am__EXEEXT_5) +@DBUS_BUILD_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_1 = ../bus/bus-test-launch-helper$(EXEEXT) noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_3) testexec_PROGRAMS = $(am__EXEEXT_4) -@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_1 = $(installable_tests) @DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_2 = $(installable_tests) -@DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_3 = $(installable_tests) -@DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_4 = $(installable_tests) +@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_3 = $(installable_tests) +@DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_4 = $(installable_tests) +@DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_5 = $(installable_tests) subdir = test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -66,12 +71,12 @@ libdbus_testutils_la_OBJECTS = $(am_libdbus_testutils_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent -@DBUS_BUILD_TESTS_TRUE@am__EXEEXT_1 = test-service$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@am__EXEEXT_1 = shell-test$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@ spawn-test$(EXEEXT) test-exit$(EXEEXT) \ @DBUS_BUILD_TESTS_TRUE@ test-names$(EXEEXT) \ -@DBUS_BUILD_TESTS_TRUE@ test-shell-service$(EXEEXT) \ -@DBUS_BUILD_TESTS_TRUE@ shell-test$(EXEEXT) spawn-test$(EXEEXT) \ @DBUS_BUILD_TESTS_TRUE@ test-segfault$(EXEEXT) \ -@DBUS_BUILD_TESTS_TRUE@ test-exit$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@ test-service$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@ test-shell-service$(EXEEXT) \ @DBUS_BUILD_TESTS_TRUE@ test-sleep-forever$(EXEEXT) am__EXEEXT_2 = test-corrupt$(EXEEXT) test-dbus-daemon$(EXEEXT) \ test-loopback$(EXEEXT) test-marshal$(EXEEXT) \ @@ -451,7 +456,17 @@ INCLUDES = -I$(top_srcdir) $(DBUS_TEST_CFLAGS) libdbus_testutils_la_SOURCES = test-utils.h test-utils.c noinst_LTLIBRARIES = libdbus-testutils.la @DBUS_BUILD_TESTS_FALSE@TEST_BINARIES = -@DBUS_BUILD_TESTS_TRUE@TEST_BINARIES = test-service test-names test-shell-service shell-test spawn-test test-segfault test-exit test-sleep-forever +@DBUS_BUILD_TESTS_TRUE@TEST_BINARIES = \ +@DBUS_BUILD_TESTS_TRUE@ shell-test \ +@DBUS_BUILD_TESTS_TRUE@ spawn-test \ +@DBUS_BUILD_TESTS_TRUE@ test-exit \ +@DBUS_BUILD_TESTS_TRUE@ test-names \ +@DBUS_BUILD_TESTS_TRUE@ test-segfault \ +@DBUS_BUILD_TESTS_TRUE@ test-service \ +@DBUS_BUILD_TESTS_TRUE@ test-shell-service \ +@DBUS_BUILD_TESTS_TRUE@ test-sleep-forever \ +@DBUS_BUILD_TESTS_TRUE@ $(NULL) + test_service_SOURCES = \ test-service.c @@ -501,14 +516,18 @@ installable_tests = \ test-relay \ $(NULL) -installcheck_tests = $(am__append_2) +installcheck_tests = $(am__append_3) installcheck_environment = \ DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) \ DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir) TESTS_ENVIRONMENT = \ + DBUS_BLOCK_ON_ABORT=1 \ + DBUS_FATAL_WARNINGS=1 \ DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ - DBUS_TEST_DATA=@abs_top_builddir@/test/data + DBUS_TEST_DATA=@abs_top_builddir@/test/data \ + DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ + $(NULL) test_corrupt_SOURCES = corrupt.c test_corrupt_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS) diff --git a/test/data/valid-config-files/session.conf b/test/data/valid-config-files/session.conf new file mode 100644 index 00000000..dde5ef6b --- /dev/null +++ b/test/data/valid-config-files/session.conf @@ -0,0 +1,63 @@ +<!-- This configuration file controls the per-user-login-session message bus. + Add a session-local.conf and edit that rather than changing this + file directly. --> + +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <!-- Our well-known bus type, don't change this --> + <type>session</type> + + <!-- If we fork, keep the user's original umask to avoid affecting + the behavior of child processes. --> + <keep_umask/> + + <listen>unix:tmpdir=/tmp</listen> + + <standard_session_servicedirs /> + + <policy context="default"> + <!-- Allow everything to be sent --> + <allow send_destination="*" eavesdrop="true"/> + <!-- Allow everything to be received --> + <allow eavesdrop="true"/> + <!-- Allow anyone to own anything --> + <allow own="*"/> + </policy> + + <!-- Config files are placed here that among other things, + further restrict the above policy for specific services. --> + <includedir>session.d</includedir> + + <!-- This is included last so local configuration can override what's + in this standard file --> + <include ignore_missing="yes">session-local.conf</include> + + <include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include> + + <!-- For the session bus, override the default relatively-low limits + with essentially infinite limits, since the bus is just running + as the user anyway, using up bus resources is not something we need + to worry about. In some cases, we do set the limits lower than + "all available memory" if exceeding the limit is almost certainly a bug, + having the bus enforce a limit is nicer than a huge memory leak. But the + intent is that these limits should never be hit. --> + + <!-- the memory limits are 1G instead of say 4G because they can't exceed 32-bit signed int max --> + <limit name="max_incoming_bytes">1000000000</limit> + <limit name="max_incoming_unix_fds">250000000</limit> + <limit name="max_outgoing_bytes">1000000000</limit> + <limit name="max_outgoing_unix_fds">250000000</limit> + <limit name="max_message_size">1000000000</limit> + <limit name="max_message_unix_fds">4096</limit> + <limit name="service_start_timeout">120000</limit> + <limit name="auth_timeout">240000</limit> + <limit name="max_completed_connections">100000</limit> + <limit name="max_incomplete_connections">10000</limit> + <limit name="max_connections_per_user">100000</limit> + <limit name="max_pending_service_starts">10000</limit> + <limit name="max_names_per_connection">50000</limit> + <limit name="max_match_rules_per_connection">50000</limit> + <limit name="max_replies_per_connection">50000</limit> + +</busconfig> diff --git a/test/data/valid-config-files/system.conf b/test/data/valid-config-files/system.conf new file mode 100644 index 00000000..828fd032 --- /dev/null +++ b/test/data/valid-config-files/system.conf @@ -0,0 +1,83 @@ +<!-- This configuration file controls the systemwide message bus. + Add a system-local.conf and edit that rather than changing this + file directly. --> + +<!-- Note that there are any number of ways you can hose yourself + security-wise by screwing up this file; in particular, you + probably don't want to listen on any more addresses, add any more + auth mechanisms, run as a different user, etc. --> + +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + + <!-- Our well-known bus type, do not change this --> + <type>system</type> + + <!-- Run as special user --> + <user>messagebus</user> + + <!-- Fork into daemon mode --> + <fork/> + + <!-- We use system service launching using a helper --> + <standard_system_servicedirs/> + + <!-- This is a setuid helper that is used to launch system services --> + <servicehelper>/usr/local/libexec/dbus-daemon-launch-helper</servicehelper> + + <!-- Write a pid file --> + <pidfile>/usr/local/var/run/dbus/pid</pidfile> + + <!-- Enable logging to syslog --> + <syslog/> + + <!-- Only allow socket-credentials-based authentication --> + <auth>EXTERNAL</auth> + + <!-- Only listen on a local socket. (abstract=/path/to/socket + means use abstract namespace, don't really create filesystem + file; only Linux supports this. Use path=/whatever on other + systems.) --> + <listen>unix:path=/usr/local/var/run/dbus/system_bus_socket</listen> + + <policy context="default"> + <!-- All users can connect to system bus --> + <allow user="*"/> + + <!-- Holes must be punched in service configuration files for + name ownership and sending method calls --> + <deny own="*"/> + <deny send_type="method_call"/> + + <!-- Signals and reply messages (method returns, errors) are allowed + by default --> + <allow send_type="signal"/> + <allow send_requested_reply="true" send_type="method_return"/> + <allow send_requested_reply="true" send_type="error"/> + + <!-- All messages may be received by default --> + <allow receive_type="method_call"/> + <allow receive_type="method_return"/> + <allow receive_type="error"/> + <allow receive_type="signal"/> + + <!-- Allow anyone to talk to the message bus --> + <allow send_destination="org.freedesktop.DBus"/> + <!-- But disallow some specific bus services --> + <deny send_destination="org.freedesktop.DBus" + send_interface="org.freedesktop.DBus" + send_member="UpdateActivationEnvironment"/> + </policy> + + <!-- Config files are placed here that among other things, punch + holes in the above policy for specific services. --> + <includedir>system.d</includedir> + + <!-- This is included last so local configuration can override what's + in this standard file --> + <include ignore_missing="yes">system-local.conf</include> + + <include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include> + +</busconfig> diff --git a/tools/dbus-launch-x11.c b/tools/dbus-launch-x11.c index 0f344abe..c7e33309 100644 --- a/tools/dbus-launch-x11.c +++ b/tools/dbus-launch-x11.c @@ -248,7 +248,7 @@ init_x_atoms (Display *display) user = getpwuid (getuid ()); if (user == NULL) { - verbose ("Could not determine the user informations; aborting X11 integration.\n"); + verbose ("Could not determine user information; aborting X11 integration.\n"); return FALSE; } user_name = xstrdup(user->pw_name); |