summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2011-09-21 18:32:41 +0100
committerSimon McVittie <smcv@debian.org>2011-09-21 18:32:41 +0100
commit179af6d37b9de89aa652bd19ff7424c9f08b55f0 (patch)
tree0aee07562f29700dc1973ba4fc1048aa547ab0af
parent3ec6cdd0d254d59fa5325753d628de3e9802ea43 (diff)
downloaddbus-179af6d37b9de89aa652bd19ff7424c9f08b55f0.tar.gz
Imported Upstream version 1.5.8upstream/1.5.8
-rw-r--r--AUTHORS16
-rw-r--r--Makefile.in9
-rw-r--r--NEWS56
-rwxr-xr-xREADME.cygwin3
-rw-r--r--aclocal.m4205
-rw-r--r--bus/Makefile.in9
-rw-r--r--bus/activation-helper.c11
-rw-r--r--bus/activation.c22
-rw-r--r--bus/bus.c8
-rw-r--r--bus/config-parser.c11
-rw-r--r--bus/connection.c19
-rw-r--r--bus/dispatch.c1
-rw-r--r--bus/driver.c24
-rw-r--r--bus/main.c93
-rw-r--r--bus/policy.c15
-rw-r--r--bus/selinux.c2
-rw-r--r--bus/services.c7
-rw-r--r--bus/test-main.c9
-rw-r--r--bus/test.c8
-rw-r--r--bus/test.h1
-rw-r--r--cmake/CMakeLists.txt3
-rw-r--r--cmake/dbus/dbus-arch-deps.h.cmake11
-rw-r--r--config.h.in7
-rwxr-xr-xconfigure578
-rw-r--r--configure.ac73
-rw-r--r--dbus/Makefile.in9
-rw-r--r--dbus/dbus-connection.c3
-rw-r--r--dbus/dbus-errors.c2
-rw-r--r--dbus/dbus-hash.c2
-rw-r--r--dbus/dbus-internals.c1
-rw-r--r--dbus/dbus-internals.h20
-rw-r--r--dbus/dbus-mainloop.c28
-rw-r--r--dbus/dbus-marshal-basic.c36
-rw-r--r--dbus/dbus-marshal-header.c13
-rw-r--r--dbus/dbus-marshal-recursive-util.c5
-rw-r--r--dbus/dbus-memory.c3
-rw-r--r--dbus/dbus-message-factory.c6
-rw-r--r--dbus/dbus-message.c5
-rw-r--r--dbus/dbus-nonce.c2
-rw-r--r--dbus/dbus-pending-call.c16
-rw-r--r--dbus/dbus-server-socket.c2
-rw-r--r--dbus/dbus-server-unix.c18
-rw-r--r--dbus/dbus-spawn-win.c5
-rw-r--r--dbus/dbus-spawn.c4
-rw-r--r--dbus/dbus-string-private.h3
-rw-r--r--dbus/dbus-sysdeps-unix.c96
-rw-r--r--dbus/dbus-sysdeps-util-unix.c21
-rw-r--r--dbus/dbus-sysdeps-win.c12
-rw-r--r--dbus/dbus-sysdeps.h4
-rw-r--r--dbus/dbus-test.c4
-rw-r--r--dbus/dbus-test.h2
-rw-r--r--doc/Makefile.am47
-rw-r--r--doc/Makefile.in53
-rw-r--r--doc/dbus-faq.html48
-rw-r--r--doc/dbus-specification.html34
-rw-r--r--doc/dbus-specification.xml4
-rw-r--r--doc/dbus-test-plan.html4
-rwxr-xr-xltmain.sh4
-rw-r--r--test/Makefile.am26
-rw-r--r--test/Makefile.in105
-rw-r--r--test/data/valid-config-files/session.conf63
-rw-r--r--test/data/valid-config-files/system.conf83
-rw-r--r--test/dbus-daemon-eavesdrop.c9
-rw-r--r--test/dbus-daemon.c7
-rw-r--r--test/internals/refs.c612
-rw-r--r--test/internals/syslog.c100
-rw-r--r--test/marshal.c1
-rw-r--r--test/name-test/Makefile.am2
-rw-r--r--test/name-test/Makefile.in11
-rwxr-xr-xtest/name-test/run-test-systemserver.sh5
-rwxr-xr-xtest/name-test/run-test.sh4
-rw-r--r--test/name-test/test-privserver-client.c1
-rw-r--r--test/relay.c12
-rw-r--r--test/test-service.c9
-rw-r--r--test/test-shell-service.c7
-rw-r--r--tools/Makefile.in9
-rw-r--r--tools/dbus-monitor.c8
77 files changed, 2253 insertions, 538 deletions
diff --git a/AUTHORS b/AUTHORS
index cdcfb702..ed8afdf1 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,18 +4,16 @@ Anders Carlsson <andersca@codefactory.se>
Andre Heinecke <aheinecke@intevation.de>
Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Aurelien Jarno <aurel32@debian.org>
-Benjamin Reed <ranger@befunk.com>
Benjamin Reed <rangerrick@befunk.com>
-Benjamin Reed <ranger@Sin.local>
+Brian Cameron <brian.cameron@oracle.com>
Brian Cameron <brian.cameron@sun.com>
+Chris Mayo <aklhfex gmail com>
Christian Dywan <christian.dywan@lanedo.com>
-Christian Dywan <christian@lanedo.com>
Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
Christian Persch (GNOME) <chpe@gnome.org>
-Colin Walters <walters@lightbox.localdomain>
-Colin Walters <walters@space-ghost.verbum.private>
Colin Walters <walters@verbum.org>
Colin Watson <cjwatson@ubuntu.com>
+Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Cristian Rodríguez <cristian.rodriguez@opensuse.org>
Cyril Brulebois <kibi@debian.org>
Daniel P. Berrange <dan@berrange.com>
@@ -32,7 +30,6 @@ Grzegorz DÄ…browski <gdx@poczta.fm>
Harald Fernengel <harry@kdevelop.org>
Harri Porten <porten@kde.org>
Hasso Tepper <hasso@estpak.ee>
-Havoc Pennington <hp@localhost.localdomain>
Havoc Pennington <hp@pobox.com>
Havoc Pennington <hp@redhat.com>
Hendrik Buschmeier <hbuschme@TechFak.Uni-Bielefeld.DE>
@@ -41,6 +38,7 @@ James Westby <jw+debian@jameswestby.net>
James Willcox <jwillcox@gnome.org>
Jens Granseuer <jensgr@gmx.net>
Jérémie Dimino <jeremie@dimino.org>
+Jiří Klimeš <jklimes@redhat.com>
Joe Marcus Clarke <marcus@freedesktop.org>
Joe Shaw <joeshaw@novell.com>
Johan Gyllenspetz <johangy@axis.com>
@@ -87,8 +85,6 @@ Peter McCurdy <pmccurdy@skeptopotamus>
Philip Blundell <philb@gnu.org>
Plácido Revilla <unknown@unknown.domain>
Ralf Habacker <ralf.habacker@freenet.de>
-Ralf Habacker <Ralf.Habacker@freenet.de>
-Ralf Habacker <ralf@s15291359.onlinehome-server.info>
Ray Strode <rstrode@redhat.com>
Richard A. Hankins <richard.a.hankins@gmail.com>
Richard Hughes <richard@hughsie.com>
@@ -99,6 +95,7 @@ Roberto Guido <bob4job@gmail.com>
Romain Pokrzywka <romain@kdab.com>
Ross Burton <ross@openedhand.com>
Ryan Lortie <desrt@desrt.ca>
+Sascha Silbe <sascha-pgp@silbe.org>
Sascha Silbe <sascha-web-bugs.freedesktop.org@silbe.org>
Scott James Remnant <scott@netsplit.com>
Scott James Remnant <scott@ubuntu.com>
@@ -107,6 +104,7 @@ Seth Nickell <seth@gnome.org>
Simon McVittie <simon.mcvittie@collabora.co.uk>
Sjoerd Simons <sjoerd@luon.net>
Sledz <sledz@MOBIL-400-586.intern.dresearch.de>
+Steve Grubb <sgrubb@redhat.com>
Sven Herzberg <sven@imendio.com>
Thiago Macieira <thiago@kde.org>
Tim Dijkstra <tim@famdijkstra.org>
@@ -115,8 +113,6 @@ Tomas Hoger <thoger@redhat.com>
Tomas Pelka <tpelka@redhat.com>
Tom Hughes <tom.hughes@palm.com>
Tor Lillqvist <tml@iki.fi>
-unknown <Administrator@.(none)>
-unknown <Habacker@.(none)>
Waldo Bastian <bastian@kde.org>
William Lachance <wrlach@gmail.com>
Will Thompson <will.thompson@collabora.co.uk>
diff --git a/Makefile.in b/Makefile.in
index de05a054..8f7ce026 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -310,6 +310,11 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
@@ -385,9 +390,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
diff --git a/NEWS b/NEWS
index ff5c9631..42d96dd6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,59 @@
+D-Bus 1.5.8 (2011-09-21)
+==
+
+The "cross-metering" release.
+
+In addition to dead code removal and refactoring, this release contains all
+of the bugfixes from 1.4.16.
+
+• Clean up dead code, and make more warnings fatal in development builds
+ (fd.o #39231, fd.o #41012; Simon McVittie)
+
+• If full test coverage is requested via --enable-tests, strictly require
+ Python, pygobject and dbus-python, which are required by some tests; if not,
+ and Python is missing, skip those tests rather than failing
+ (fd.o #37847, Simon McVittie)
+
+• When using cmake, provide the same version-info API in the installed headers
+ as for autotools (DBUS_VERSION, etc.) (fd.o #40905, Ralf Habacker)
+
+• Add a regression test for fd.o #38005 (fd.o #39836, Simon McVittie)
+
+• Make "NOCONFIGURE=1 ./autogen.sh" not run configure (Colin Walters)
+
+• Add _DBUS_STATIC_ASSERT and use it to check invariants (fd.o #39636,
+ Simon McVittie)
+
+• Fix duplicates in authors list (Ralf Habacker)
+
+• Fix broken links from dbus-tutorial.html if $(htmldir) != $(docdir)
+ (fd.o #39879, Chris Mayo)
+
+• Fix a small memory leak, and a failure to report errors, when updating
+ a service file entry for activation (fd.o #39230, Simon McVittie)
+
+• Unix-specific:
+ · Clean up (non-abstract) Unix sockets on bus daemon exit (fd.o #38656;
+ Brian Cameron, Simon McVittie)
+ · On systems that use libcap-ng but not systemd, drop supplemental groups
+ when switching to the daemon user (Red Hat #726953, Steve Grubb)
+ · Make the cmake build work again on GNU platforms (fd.o #29228,
+ Simon McVittie)
+ · Fix compilation on non-C99 systems that have inttypes.h but not stdint.h,
+ like Solaris (fd.o #40313, Dagobert Michelsen)
+ · Define CMSG_ALIGN, CMSG_LEN, CMSG_SPACE on Solaris < 10
+ (fd.o #40235, Simon McVittie)
+ · Cope with Unixes that don't have LOG_PERROR, like Solaris 10
+ (fd.o #39987, Simon McVittie)
+ · Cope with platforms whose vsnprintf violates both POSIX and C99, like
+ Tru64, IRIX and HP-UX (fd.o #11668, Simon McVittie)
+
+• Windows-specific:
+ · Fix compilation on MSVC, which doesn't understand "inline" with its
+ C99 meaning (fd.o #40000; Ralf Habacker, Simon McVittie)
+ · Fix misuse of GPid in test/dbus-daemon.c (fd.o #40003, Simon McVittie)
+ · Fix cross-compilation to Windows with Automake (fd.o #40003, Simon McVittie)
+
D-Bus 1.5.6 (2011-07-29)
==
diff --git a/README.cygwin b/README.cygwin
index 93e403ad..904cbb44 100755
--- a/README.cygwin
+++ b/README.cygwin
@@ -1,9 +1,6 @@
The cygwin dbus port is included in master branch of
dbus git repository since 1.3.1.
-See cygwin/README for more information about
-the cygwin dbus port.
-
The cygwin port of dbus is maintained by:
http://sourceware.org/cygwinports/
diff --git a/aclocal.m4 b/aclocal.m4
index ee8ccc14..e3699d02 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -816,6 +816,211 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages. To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable. To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement. MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+ dnl Find a Python interpreter. Python versions prior to 2.0 are not
+ dnl supported. (2.0 was released on October 16, 2000).
+ m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+ [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
+python2.1 python2.0])
+
+ m4_if([$1],[],[
+ dnl No version check is needed.
+ # Find any Python interpreter.
+ if test -z "$PYTHON"; then
+ AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+ fi
+ am_display_PYTHON=python
+ ], [
+ dnl A version check is needed.
+ if test -n "$PYTHON"; then
+ # If the user set $PYTHON, use it and don't search something else.
+ AC_MSG_CHECKING([whether $PYTHON version >= $1])
+ AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_ERROR(too old)])
+ am_display_PYTHON=$PYTHON
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+ [am_cv_pathless_PYTHON],[
+ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+ test "$am_cv_pathless_PYTHON" = none && break
+ AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+ done])
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+ if test "$am_cv_pathless_PYTHON" = none; then
+ PYTHON=:
+ else
+ AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+ fi
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+ ])
+
+ if test "$PYTHON" = :; then
+ dnl Run any user-specified action, or abort.
+ m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+ else
+
+ dnl Query Python for its version number. Getting [:3] seems to be
+ dnl the best way to do this; it's what "site.py" does in the standard
+ dnl library.
+
+ AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+ [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
+ AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+ dnl Use the values of $prefix and $exec_prefix for the corresponding
+ dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
+ dnl distinct variables so they can be overridden if need be. However,
+ dnl general consensus is that you shouldn't need this ability.
+
+ AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+ AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+ dnl At times (like when building shared libraries) you may want
+ dnl to know which OS platform Python thinks this is.
+
+ AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+ [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
+ AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+ dnl Set up 4 directories:
+
+ dnl pythondir -- where to install python scripts. This is the
+ dnl site-packages directory, not the python standard library
+ dnl directory like in previous automake betas. This behavior
+ dnl is more consistent with lispdir.m4 for example.
+ dnl Query distutils for this directory. distutils does not exist in
+ dnl Python 1.5, so we fall back to the hardcoded directory if it
+ dnl doesn't work.
+ AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+ [am_cv_python_pythondir],
+ [if test "x$prefix" = xNONE
+ then
+ am_py_prefix=$ac_default_prefix
+ else
+ am_py_prefix=$prefix
+ fi
+ am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
+ echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+ case $am_cv_python_pythondir in
+ $am_py_prefix*)
+ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+ am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
+ ;;
+ *)
+ case $am_py_prefix in
+ /usr|/System*) ;;
+ *)
+ am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
+ ;;
+ esac
+ ;;
+ esac
+ ])
+ AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+ dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
+ dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
+ dnl more consistent with the rest of automake.
+
+ AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+ dnl pyexecdir -- directory for installing python extension modules
+ dnl (shared libraries)
+ dnl Query distutils for this directory. distutils does not exist in
+ dnl Python 1.5, so we fall back to the hardcoded directory if it
+ dnl doesn't work.
+ AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+ [am_cv_python_pyexecdir],
+ [if test "x$exec_prefix" = xNONE
+ then
+ am_py_exec_prefix=$am_py_prefix
+ else
+ am_py_exec_prefix=$exec_prefix
+ fi
+ am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
+ echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+ case $am_cv_python_pyexecdir in
+ $am_py_exec_prefix*)
+ am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+ am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
+ ;;
+ *)
+ case $am_py_exec_prefix in
+ /usr|/System*) ;;
+ *)
+ am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
+ ;;
+ esac
+ ;;
+ esac
+ ])
+ AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+ dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+ AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+ dnl Run any user-specified action.
+ $2
+ fi
+
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+ AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
diff --git a/bus/Makefile.in b/bus/Makefile.in
index 89b0e50f..42b6b580 100644
--- a/bus/Makefile.in
+++ b/bus/Makefile.in
@@ -378,6 +378,11 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
@@ -453,9 +458,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
diff --git a/bus/activation-helper.c b/bus/activation-helper.c
index baba8f04..ab9d6010 100644
--- a/bus/activation-helper.c
+++ b/bus/activation-helper.c
@@ -144,10 +144,10 @@ out_all:
static dbus_bool_t
clear_environment (DBusError *error)
{
- const char *debug_env = NULL;
const char *starter_env = NULL;
-
#ifdef DBUS_ENABLE_VERBOSE_MODE
+ const char *debug_env = NULL;
+
/* are we debugging */
debug_env = _dbus_getenv ("DBUS_VERBOSE");
#endif
@@ -184,6 +184,7 @@ clear_environment (DBusError *error)
static dbus_bool_t
check_permissions (const char *dbus_user, DBusError *error)
{
+#ifndef ACTIVATION_LAUNCHER_TEST
uid_t uid, euid;
struct passwd *pw;
@@ -191,7 +192,6 @@ check_permissions (const char *dbus_user, DBusError *error)
uid = 0;
euid = 0;
-#ifndef ACTIVATION_LAUNCHER_TEST
/* bail out unless the dbus user is invoking the helper */
pw = getpwnam(dbus_user);
if (!pw)
@@ -403,12 +403,15 @@ get_correct_parser (BusConfigParser **parser, DBusError *error)
{
DBusString config_file;
dbus_bool_t retval;
+#ifdef ACTIVATION_LAUNCHER_TEST
const char *test_config_file;
+#endif
retval = FALSE;
- test_config_file = NULL;
#ifdef ACTIVATION_LAUNCHER_TEST
+ test_config_file = NULL;
+
/* there is no _way_ we should be setuid if this define is set.
* but we should be doubly paranoid and check... */
if (getuid() != geteuid())
diff --git a/bus/activation.c b/bus/activation.c
index d5424a7c..2744e214 100644
--- a/bus/activation.c
+++ b/bus/activation.c
@@ -257,6 +257,7 @@ update_desktop_file_entry (BusActivation *activation,
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
+ retval = FALSE;
name = NULL;
exec = NULL;
user = NULL;
@@ -416,8 +417,11 @@ update_desktop_file_entry (BusActivation *activation,
if (_dbus_hash_table_lookup_string (activation->entries, name))
{
- _dbus_verbose ("The new service name \"%s\" of service file \"%s\" already in cache, ignoring\n",
+ _dbus_verbose ("The new service name \"%s\" of service file \"%s\" is already in cache, ignoring\n",
name, _dbus_string_get_const_data (&file_path));
+ dbus_set_error (error, DBUS_ERROR_FAILED,
+ "The new service name \"%s\" of service file \"%s\" is already in cache, ignoring\n",
+ name, _dbus_string_get_const_data (&file_path));
goto out;
}
@@ -446,8 +450,7 @@ update_desktop_file_entry (BusActivation *activation,
* the entries hash table */
_dbus_hash_table_remove_string (entry->s_dir->entries,
entry->filename);
- bus_activation_entry_unref (entry);
- return FALSE;
+ goto out;
}
}
@@ -465,7 +468,7 @@ out:
if (entry)
bus_activation_entry_unref (entry);
- return FALSE;
+ return retval;
}
static dbus_bool_t
@@ -881,8 +884,6 @@ bus_activation_new (BusContext *context,
DBusError *error)
{
BusActivation *activation;
- DBusList *link;
- char *dir;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
@@ -1671,7 +1672,6 @@ bus_activation_activate_service (BusActivation *activation,
char **envp = NULL;
int argc;
dbus_bool_t retval;
- DBusHashIter iter;
dbus_bool_t was_pending_activation;
DBusString command;
@@ -2538,14 +2538,18 @@ bus_activation_service_reload_test (const DBusString *test_data_dir)
_dbus_assert_not_reached ("could not initiate service reload test");
if (!do_service_reload_test (&directory, FALSE))
- ; /* Do nothing? */
+ {
+ /* Do nothing? */
+ }
/* Do OOM tests */
if (!init_service_reload_test (&directory))
_dbus_assert_not_reached ("could not initiate service reload test");
if (!do_service_reload_test (&directory, TRUE))
- ; /* Do nothing? */
+ {
+ /* Do nothing? */
+ }
/* Cleanup test directory */
if (!cleanup_service_reload_test (&directory))
diff --git a/bus/bus.c b/bus/bus.c
index 04b12866..748ee90a 100644
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -481,7 +481,6 @@ process_config_every_time (BusContext *context,
DBusString full_address;
DBusList *link;
DBusList **dirs;
- BusActivation *new_activation;
char *addr;
const char *servicehelper;
char *s;
@@ -688,7 +687,6 @@ bus_context_new (const DBusString *config_file,
dbus_bool_t systemd_activation,
DBusError *error)
{
- DBusString log_prefix;
BusContext *context;
BusConfigParser *parser;
@@ -1393,9 +1391,6 @@ bus_context_check_security_policy (BusContext *context,
dbus_bool_t log;
int type;
dbus_bool_t requested_reply;
- const char *sender_name;
- const char *sender_loginfo;
- const char *proposed_recipient_loginfo;
type = dbus_message_get_type (message);
dest = dbus_message_get_destination (message);
@@ -1561,9 +1556,6 @@ bus_context_check_security_policy (BusContext *context,
proposed_recipient,
message, &toggles, &log))
{
- const char *msg = "Rejected send message, %d matched rules; "
- "type=\"%s\", sender=\"%s\" (%s) interface=\"%s\" member=\"%s\" error name=\"%s\" requested_reply=%d destination=\"%s\" (%s))";
-
complain_about_message (context, DBUS_ERROR_ACCESS_DENIED,
"Rejected send message", toggles,
message, sender, proposed_recipient, requested_reply,
diff --git a/bus/config-parser.c b/bus/config-parser.c
index f9432555..c636707f 100644
--- a/bus/config-parser.c
+++ b/bus/config-parser.c
@@ -3271,11 +3271,12 @@ test_default_session_servicedirs (void)
DBusList *dirs;
DBusList *link;
DBusString progs;
- const char *common_progs;
int i;
#ifdef DBUS_WIN
+ const char *common_progs;
char buffer[1024];
+
if (_dbus_get_install_root(buffer, sizeof(buffer)))
{
strcat(buffer,DBUS_DATADIR);
@@ -3289,8 +3290,9 @@ test_default_session_servicedirs (void)
if (!_dbus_string_init (&progs))
_dbus_assert_not_reached ("OOM allocating progs");
- common_progs = _dbus_getenv ("CommonProgramFiles");
#ifndef DBUS_UNIX
+ common_progs = _dbus_getenv ("CommonProgramFiles");
+
if (common_progs)
{
if (!_dbus_string_append (&progs, common_progs))
@@ -3411,7 +3413,9 @@ test_default_system_servicedirs (void)
DBusList *dirs;
DBusList *link;
DBusString progs;
+#ifndef DBUS_UNIX
const char *common_progs;
+#endif
int i;
/* On Unix we don't actually use this variable, but it's easier to handle the
@@ -3419,8 +3423,9 @@ test_default_system_servicedirs (void)
if (!_dbus_string_init (&progs))
_dbus_assert_not_reached ("OOM allocating progs");
- common_progs = _dbus_getenv ("CommonProgramFiles");
#ifndef DBUS_UNIX
+ common_progs = _dbus_getenv ("CommonProgramFiles");
+
if (common_progs)
{
if (!_dbus_string_append (&progs, common_progs))
diff --git a/bus/connection.c b/bus/connection.c
index 81f595d2..26839529 100644
--- a/bus/connection.c
+++ b/bus/connection.c
@@ -403,14 +403,6 @@ free_connection_data (void *data)
dbus_free (d);
}
-static void
-call_timeout_callback (DBusTimeout *timeout,
- void *data)
-{
- /* can return FALSE on OOM but we just let it fire again later */
- dbus_timeout_handle (timeout);
-}
-
BusConnections*
bus_connections_new (BusContext *context)
{
@@ -838,12 +830,7 @@ bus_connection_get_unix_groups (DBusConnection *connection,
int *n_groups,
DBusError *error)
{
- BusConnectionData *d;
unsigned long uid;
-
- d = BUS_CONNECTION_DATA (connection);
-
- _dbus_assert (d != NULL);
*groups = NULL;
*n_groups = 0;
@@ -1459,13 +1446,7 @@ bus_connections_check_limits (BusConnections *connections,
DBusConnection *requesting_completion,
DBusError *error)
{
- BusConnectionData *d;
unsigned long uid;
-
- d = BUS_CONNECTION_DATA (requesting_completion);
- _dbus_assert (d != NULL);
-
- _dbus_assert (d->name == NULL);
if (connections->n_completed >=
bus_context_get_max_completed_connections (connections->context))
diff --git a/bus/dispatch.c b/bus/dispatch.c
index a80476cd..dfe6f746 100644
--- a/bus/dispatch.c
+++ b/bus/dispatch.c
@@ -4773,7 +4773,6 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
DBusConnection *foo, *bar;
DBusError error;
DBusMessage *m;
- dbus_bool_t b;
int one[2], two[2], x, y, z;
char r;
diff --git a/bus/driver.c b/bus/driver.c
index 9ecfd55f..574e0f3d 100644
--- a/bus/driver.c
+++ b/bus/driver.c
@@ -827,7 +827,6 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
DBusMessageIter iter;
DBusMessageIter dict_iter;
DBusMessageIter dict_entry_iter;
- int msg_type;
int array_type;
int key_type;
DBusList *keys, *key_link;
@@ -842,9 +841,13 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
/* The message signature has already been checked for us,
* so let's just assert it's right.
*/
- msg_type = dbus_message_iter_get_arg_type (&iter);
+#ifndef DBUS_DISABLE_ASSERT
+ {
+ int msg_type = dbus_message_iter_get_arg_type (&iter);
- _dbus_assert (msg_type == DBUS_TYPE_ARRAY);
+ _dbus_assert (msg_type == DBUS_TYPE_ARRAY);
+ }
+#endif
dbus_message_iter_recurse (&iter, &dict_iter);
@@ -1930,7 +1933,7 @@ bus_driver_handle_message (DBusConnection *connection,
DBusMessage *message,
DBusError *error)
{
- const char *name, *sender, *interface;
+ const char *name, *interface;
const InterfaceHandler *ih;
const MessageHandler *mh;
dbus_bool_t found_interface = FALSE;
@@ -1957,13 +1960,17 @@ bus_driver_handle_message (DBusConnection *connection,
_dbus_assert (dbus_message_get_member (message) != NULL);
name = dbus_message_get_member (message);
- sender = dbus_message_get_sender (message);
- _dbus_verbose ("Driver got a method call: %s\n",
- dbus_message_get_member (message));
+ _dbus_verbose ("Driver got a method call: %s\n", name);
/* security checks should have kept this from getting here */
- _dbus_assert (sender != NULL || strcmp (name, "Hello") == 0);
+#ifndef DBUS_DISABLE_ASSERT
+ {
+ const char *sender = dbus_message_get_sender (message);
+
+ _dbus_assert (sender != NULL || strcmp (name, "Hello") == 0);
+ }
+#endif
for (ih = interface_handlers; ih->name != NULL; ih++)
{
@@ -2009,7 +2016,6 @@ bus_driver_handle_message (DBusConnection *connection,
}
}
- unknown:
_dbus_verbose ("No driver handler for message \"%s\"\n",
name);
diff --git a/bus/main.c b/bus/main.c
index 74b8bd2a..a0bf07c7 100644
--- a/bus/main.c
+++ b/bus/main.c
@@ -42,17 +42,23 @@
static BusContext *context;
+#ifdef DBUS_UNIX
+
static int reload_pipe[2];
#define RELOAD_READ_END 0
#define RELOAD_WRITE_END 1
static void close_reload_pipe (DBusWatch **);
-#ifdef DBUS_UNIX
+typedef enum
+ {
+ ACTION_RELOAD = 'r',
+ ACTION_QUIT = 'q'
+ } SignalAction;
+
static void
signal_handler (int sig)
{
-
switch (sig)
{
#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
@@ -63,7 +69,9 @@ signal_handler (int sig)
case SIGHUP:
{
DBusString str;
- _dbus_string_init_const (&str, "foo");
+ char action[2] = { ACTION_RELOAD, '\0' };
+
+ _dbus_string_init_const (&str, action);
if ((reload_pipe[RELOAD_WRITE_END] > 0) &&
!_dbus_write_socket (reload_pipe[RELOAD_WRITE_END], &str, 0, 1))
{
@@ -88,6 +96,28 @@ signal_handler (int sig)
}
break;
#endif
+
+ case SIGTERM:
+ {
+ DBusString str;
+ char action[2] = { ACTION_QUIT, '\0' };
+ _dbus_string_init_const (&str, action);
+ if ((reload_pipe[RELOAD_WRITE_END] < 0) ||
+ !_dbus_write_socket (reload_pipe[RELOAD_WRITE_END], &str, 0, 1))
+ {
+ /* If we can't write to the socket, dying seems a more
+ * important response to SIGTERM than cleaning up sockets,
+ * so we exit. We'd use exit(), but that's not async-signal-safe,
+ * so we'll have to resort to _exit(). */
+ static const char message[] =
+ "Unable to write termination signal to pipe - buffer full?\n"
+ "Will exit instead.\n";
+
+ write (STDERR_FILENO, message, strlen (message));
+ _exit (1);
+ }
+ }
+ break;
}
}
#endif /* DBUS_UNIX */
@@ -183,6 +213,7 @@ check_two_pid_descriptors (const DBusString *pid_fd,
}
}
+#ifdef DBUS_UNIX
static dbus_bool_t
handle_reload_watch (DBusWatch *watch,
unsigned int flags,
@@ -190,6 +221,8 @@ handle_reload_watch (DBusWatch *watch,
{
DBusError error;
DBusString str;
+ char *action_str;
+ char action = '\0';
while (!_dbus_string_init (&str))
_dbus_wait_for_memory ();
@@ -201,6 +234,12 @@ handle_reload_watch (DBusWatch *watch,
close_reload_pipe (&watch);
return TRUE;
}
+
+ action_str = _dbus_string_get_data (&str);
+ if (action_str != NULL)
+ {
+ action = action_str[0];
+ }
_dbus_string_free (&str);
/* this can only fail if we don't understand the config file
@@ -208,15 +247,42 @@ handle_reload_watch (DBusWatch *watch,
* loaded config.
*/
dbus_error_init (&error);
- if (! bus_context_reload_config (context, &error))
+
+ switch (action)
{
- _DBUS_ASSERT_ERROR_IS_SET (&error);
- _dbus_assert (dbus_error_has_name (&error, DBUS_ERROR_FAILED) ||
- dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY));
- _dbus_warn ("Unable to reload configuration: %s\n",
- error.message);
- dbus_error_free (&error);
+ case ACTION_RELOAD:
+ if (! bus_context_reload_config (context, &error))
+ {
+ _DBUS_ASSERT_ERROR_IS_SET (&error);
+ _dbus_assert (dbus_error_has_name (&error, DBUS_ERROR_FAILED) ||
+ dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY));
+ _dbus_warn ("Unable to reload configuration: %s\n",
+ error.message);
+ dbus_error_free (&error);
+ }
+ break;
+
+ case ACTION_QUIT:
+ {
+ DBusLoop *loop;
+ /*
+ * On OSs without abstract sockets, we want to quit
+ * gracefully rather than being killed by SIGTERM,
+ * so that DBusServer gets a chance to clean up the
+ * sockets from the filesystem. fd.o #38656
+ */
+ loop = bus_context_get_loop (context);
+ if (loop != NULL)
+ {
+ _dbus_loop_quit (loop);
+ }
+ }
+ break;
+
+ default:
+ break;
}
+
return TRUE;
}
@@ -273,6 +339,7 @@ close_reload_pipe (DBusWatch **watch)
_dbus_close_socket (reload_pipe[RELOAD_WRITE_END], NULL);
reload_pipe[RELOAD_WRITE_END] = -1;
}
+#endif /* DBUS_UNIX */
int
main (int argc, char **argv)
@@ -288,7 +355,6 @@ main (int argc, char **argv)
int i;
dbus_bool_t print_address;
dbus_bool_t print_pid;
- dbus_bool_t is_session_bus;
int force_fork;
dbus_bool_t systemd_activation;
@@ -306,7 +372,6 @@ main (int argc, char **argv)
print_address = FALSE;
print_pid = FALSE;
- is_session_bus = FALSE;
force_fork = FORK_FOLLOW_CONFIG_FILE;
systemd_activation = FALSE;
@@ -523,12 +588,14 @@ main (int argc, char **argv)
* print_pid_pipe
*/
+#ifdef DBUS_UNIX
setup_reload_pipe (bus_context_get_loop (context));
-#ifdef DBUS_UNIX
/* POSIX signals are Unix-specific, and _dbus_set_signal_handler is
* unimplemented (and probably unimplementable) on Windows, so there's
* no point in trying to make the handler portable to non-Unix. */
+
+ _dbus_set_signal_handler (SIGTERM, signal_handler);
#ifdef SIGHUP
_dbus_set_signal_handler (SIGHUP, signal_handler);
#endif
diff --git a/bus/policy.c b/bus/policy.c
index 4841f47c..34e84469 100644
--- a/bus/policy.c
+++ b/bus/policy.c
@@ -1280,18 +1280,3 @@ bus_client_policy_check_can_own (BusClientPolicy *policy,
return allowed;
}
-
-#ifdef DBUS_BUILD_TESTS
-
-dbus_bool_t
-bus_policy_test (const DBusString *test_data_dir)
-{
- /* This doesn't do anything for now because I decided to do it in
- * dispatch.c instead by having some of the clients in dispatch.c
- * have particular policies applied to them.
- */
-
- return TRUE;
-}
-
-#endif /* DBUS_BUILD_TESTS */
diff --git a/bus/selinux.c b/bus/selinux.c
index e94d8a8e..36287e9f 100644
--- a/bus/selinux.c
+++ b/bus/selinux.c
@@ -1055,7 +1055,7 @@ _dbus_change_to_daemon_user (const char *user,
capng_clear (CAPNG_SELECT_BOTH);
capng_update (CAPNG_ADD, CAPNG_EFFECTIVE | CAPNG_PERMITTED,
CAP_AUDIT_WRITE);
- rc = capng_change_id (uid, gid, 0);
+ rc = capng_change_id (uid, gid, CAPNG_DROP_SUPP_GRP);
if (rc)
{
switch (rc) {
diff --git a/bus/services.c b/bus/services.c
index 0a049257..68a7022a 100644
--- a/bus/services.c
+++ b/bus/services.c
@@ -385,7 +385,6 @@ bus_registry_acquire_service (BusRegistry *registry,
{
dbus_bool_t retval;
DBusConnection *old_owner_conn;
- DBusConnection *current_owner_conn;
BusClientPolicy *policy;
BusService *service;
BusActivation *activation;
@@ -510,12 +509,10 @@ bus_registry_acquire_service (BusRegistry *registry,
primary_owner = bus_service_get_primary_owner (service);
if (primary_owner == NULL)
goto out;
-
- current_owner_conn = primary_owner->conn;
-
+
if (old_owner_conn == NULL)
{
- _dbus_assert (current_owner_conn == connection);
+ _dbus_assert (primary_owner->conn == connection);
*result = DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER;
}
diff --git a/bus/test-main.c b/bus/test-main.c
index a8039d51..1b7c5bea 100644
--- a/bus/test-main.c
+++ b/bus/test-main.c
@@ -130,15 +130,6 @@ main (int argc, char **argv)
test_post_hook ();
}
- if (only == NULL || strcmp (only, "policy") == 0)
- {
- test_pre_hook ();
- printf ("%s: Running policy test\n", argv[0]);
- if (!bus_policy_test (&test_data_dir))
- die ("policy");
- test_post_hook ();
- }
-
if (only == NULL || strcmp (only, "signals") == 0)
{
test_pre_hook ();
diff --git a/bus/test.c b/bus/test.c
index 049fae6f..e1b8a130 100644
--- a/bus/test.c
+++ b/bus/test.c
@@ -40,8 +40,6 @@ static dbus_bool_t
add_client_watch (DBusWatch *watch,
void *data)
{
- DBusConnection *connection = data;
-
return _dbus_loop_add_watch (client_loop, watch);
}
@@ -49,8 +47,6 @@ static void
remove_client_watch (DBusWatch *watch,
void *data)
{
- DBusConnection *connection = data;
-
_dbus_loop_remove_watch (client_loop, watch);
}
@@ -58,8 +54,6 @@ static dbus_bool_t
add_client_timeout (DBusTimeout *timeout,
void *data)
{
- DBusConnection *connection = data;
-
return _dbus_loop_add_timeout (client_loop, timeout);
}
@@ -67,8 +61,6 @@ static void
remove_client_timeout (DBusTimeout *timeout,
void *data)
{
- DBusConnection *connection = data;
-
_dbus_loop_remove_timeout (client_loop, timeout);
}
diff --git a/bus/test.h b/bus/test.h
index 45024e65..98a2c6ba 100644
--- a/bus/test.h
+++ b/bus/test.h
@@ -32,7 +32,6 @@
dbus_bool_t bus_dispatch_test (const DBusString *test_data_dir);
dbus_bool_t bus_dispatch_sha1_test (const DBusString *test_data_dir);
-dbus_bool_t bus_policy_test (const DBusString *test_data_dir);
dbus_bool_t bus_config_parser_test (const DBusString *test_data_dir);
dbus_bool_t bus_config_parser_trivial_test (const DBusString *test_data_dir);
dbus_bool_t bus_signals_test (const DBusString *test_data_dir);
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 23c20aae..72c42318 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -102,6 +102,9 @@ option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
+# analogous to AC_USE_SYSTEM_EXTENSIONS in configure.ac
+add_definitions(-D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE)
+
# do config checks
INCLUDE(ConfigureChecks.cmake)
diff --git a/cmake/dbus/dbus-arch-deps.h.cmake b/cmake/dbus/dbus-arch-deps.h.cmake
index 7d566e9f..dddbeb4c 100644
--- a/cmake/dbus/dbus-arch-deps.h.cmake
+++ b/cmake/dbus/dbus-arch-deps.h.cmake
@@ -51,6 +51,17 @@ typedef unsigned @DBUS_INT32_TYPE@ dbus_uint32_t;
typedef @DBUS_INT16_TYPE@ dbus_int16_t;
typedef unsigned @DBUS_INT16_TYPE@ dbus_uint16_t;
+/* This is not really arch-dependent, but it's not worth
+ * creating an additional generated header just for this
+ */
+#define DBUS_MAJOR_VERSION @DBUS_MAJOR_VERSION@
+#define DBUS_MINOR_VERSION @DBUS_MINOR_VERSION@
+#define DBUS_MICRO_VERSION @DBUS_MICRO_VERSION@
+
+#define DBUS_VERSION_STRING "@DBUS_VERSION@"
+
+#define DBUS_VERSION ((@DBUS_MAJOR_VERSION@ << 16) | (@DBUS_MINOR_VERSION@ << 8) | (@DBUS_MICRO_VERSION@))
+
DBUS_END_DECLS;
#endif /* DBUS_ARCH_DEPS_H */
diff --git a/config.h.in b/config.h.in
index ee0ce085..098ed610 100644
--- a/config.h.in
+++ b/config.h.in
@@ -156,6 +156,10 @@
/* Have the ddfd member of DIR */
#undef HAVE_DDFD
+/* Define to 1 if you have the declaration of `LOG_PERROR', and to 0 if you
+ don't. */
+#undef HAVE_DECL_LOG_PERROR
+
/* Define to 1 if you have the declaration of `MSG_NOSIGNAL', and to 0 if you
don't. */
#undef HAVE_DECL_MSG_NOSIGNAL
@@ -277,6 +281,9 @@
/* Define to 1 if you have the `strtoull' function. */
#undef HAVE_STRTOULL
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
/* Define to 1 if you have the <sys/inotify.h> header file. */
#undef HAVE_SYS_INOTIFY_H
diff --git a/configure b/configure
index 68682b70..c16197f1 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for dbus 1.5.6.
+# Generated by GNU Autoconf 2.68 for dbus 1.5.8.
#
# 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.5.6'
-PACKAGE_STRING='dbus 1.5.6'
+PACKAGE_VERSION='1.5.8'
+PACKAGE_STRING='dbus 1.5.8'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=dbus'
PACKAGE_URL=''
@@ -716,6 +716,15 @@ DBUS_UINT64_CONSTANT
DBUS_INT64_CONSTANT
DBUS_INT64_TYPE
R_DYNAMIC_LDFLAG
+pkgpyexecdir
+pyexecdir
+pkgpythondir
+pythondir
+PYTHON_PLATFORM
+PYTHON_EXEC_PREFIX
+PYTHON_PREFIX
+PYTHON_VERSION
+PYTHON
DBUS_ENABLE_INSTALLED_TESTS_FALSE
DBUS_ENABLE_INSTALLED_TESTS_TRUE
DBUS_ENABLE_MODULAR_TESTS_FALSE
@@ -1485,7 +1494,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.5.6 to adapt to many kinds of systems.
+\`configure' configures dbus 1.5.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1559,7 +1568,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dbus 1.5.6:";;
+ short | recursive ) echo "Configuration of dbus 1.5.8:";;
esac
cat <<\_ACEOF
@@ -1740,7 +1749,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dbus configure 1.5.6
+dbus configure 1.5.8
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2454,7 +2463,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.5.6, which was
+It was created by dbus $as_me 1.5.8, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -3346,7 +3355,7 @@ fi
# Define the identity of the package.
PACKAGE='dbus'
- VERSION='1.5.6'
+ VERSION='1.5.8'
cat >>confdefs.h <<_ACEOF
@@ -3530,7 +3539,7 @@ LT_CURRENT=9
## increment any time the source changes; set to
## 0 if you increment CURRENT
-LT_REVISION=3
+LT_REVISION=4
## increment if any interfaces have been added; set to 0
## if any interfaces have been changed or removed. removal has
@@ -3543,8 +3552,8 @@ LT_AGE=6
DBUS_MAJOR_VERSION=1
DBUS_MINOR_VERSION=5
-DBUS_MICRO_VERSION=6
-DBUS_VERSION=1.5.6
+DBUS_MICRO_VERSION=8
+DBUS_VERSION=1.5.8
@@ -16569,7 +16578,16 @@ fi
# --enable-modular-tests
# Check whether --enable-tests was given.
if test "${enable_tests+set}" = set; then :
- enableval=$enable_tests; enable_embedded_tests=$enableval; enable_modular_tests=$enableval
+ enableval=$enable_tests;
+ if test "x$enableval" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Full test coverage was requested with --enable-tests=yes" >&5
+$as_echo "$as_me: Full test coverage was requested with --enable-tests=yes" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This has many dependencies (GLib, dbus-glib, Python)" >&5
+$as_echo "$as_me: This has many dependencies (GLib, dbus-glib, Python)" >&6;}
+ fi
+ enable_embedded_tests=$enableval
+ enable_modular_tests=$enableval
+
fi
@@ -16780,13 +16798,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if test "x$enable_modular_tests" = xyes; then
- as_fn_error $? "GLib is required by the modular tests" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires GLib" >&5
+$as_echo "$as_me: Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires GLib" >&6;}
+ as_fn_error $? "$GLIB_ERRORS" "$LINENO" 5
else # assumed to be "auto"
enable_modular_tests=no
fi
elif test $pkg_failed = untried; then
if test "x$enable_modular_tests" = xyes; then
- as_fn_error $? "GLib is required by the modular tests" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires GLib" >&5
+$as_echo "$as_me: Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires GLib" >&6;}
+ as_fn_error $? "$GLIB_ERRORS" "$LINENO" 5
else # assumed to be "auto"
enable_modular_tests=no
fi
@@ -16856,13 +16878,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if test "x$enable_modular_tests" = xyes; then
- as_fn_error $? "dbus-glib is required by the modular tests (for now)" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires dbus-glib" >&5
+$as_echo "$as_me: Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires dbus-glib" >&6;}
+ as_fn_error $? "$DBUS_GLIB_ERRORS" "$LINENO" 5
else # assumed to be "auto"
enable_modular_tests=no
fi
elif test $pkg_failed = untried; then
if test "x$enable_modular_tests" = xyes; then
- as_fn_error $? "dbus-glib is required by the modular tests (for now)" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires dbus-glib" >&5
+$as_echo "$as_me: Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires dbus-glib" >&6;}
+ as_fn_error $? "$DBUS_GLIB_ERRORS" "$LINENO" 5
else # assumed to be "auto"
enable_modular_tests=no
fi
@@ -16908,6 +16934,476 @@ else
fi
+if test "x$enable_tests" = xyes; then
+ # full test coverage is required, Python is a hard dependency
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject" >&5
+$as_echo "$as_me: Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject" >&6;}
+
+
+
+
+ if test -n "$PYTHON"; then
+ # If the user set $PYTHON, use it and don't search something else.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.6" >&5
+$as_echo_n "checking whether $PYTHON version >= 2.6... " >&6; }
+ prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+ if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+ ($PYTHON -c "$prog") >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ as_fn_error $? "too old" "$LINENO" 5
+fi
+ am_display_PYTHON=$PYTHON
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.6" >&5
+$as_echo_n "checking for a Python interpreter with version >= 2.6... " >&6; }
+if ${am_cv_pathless_PYTHON+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+ test "$am_cv_pathless_PYTHON" = none && break
+ prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+ if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
+ ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then :
+ break
+fi
+ done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5
+$as_echo "$am_cv_pathless_PYTHON" >&6; }
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+ if test "$am_cv_pathless_PYTHON" = none; then
+ PYTHON=:
+ else
+ # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
+set dummy $am_cv_pathless_PYTHON; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PYTHON in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+
+
+ if test "$PYTHON" = :; then
+ as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5
+ else
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
+$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
+if ${am_cv_python_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
+$as_echo "$am_cv_python_version" >&6; }
+ PYTHON_VERSION=$am_cv_python_version
+
+
+
+ PYTHON_PREFIX='${prefix}'
+
+ PYTHON_EXEC_PREFIX='${exec_prefix}'
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
+$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
+if ${am_cv_python_platform+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
+$as_echo "$am_cv_python_platform" >&6; }
+ PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
+$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
+if ${am_cv_python_pythondir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$prefix" = xNONE
+ then
+ am_py_prefix=$ac_default_prefix
+ else
+ am_py_prefix=$prefix
+ fi
+ am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
+ echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+ case $am_cv_python_pythondir in
+ $am_py_prefix*)
+ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+ am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
+ ;;
+ *)
+ case $am_py_prefix in
+ /usr|/System*) ;;
+ *)
+ am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
+ ;;
+ esac
+ ;;
+ esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
+$as_echo "$am_cv_python_pythondir" >&6; }
+ pythondir=$am_cv_python_pythondir
+
+
+
+ pkgpythondir=\${pythondir}/$PACKAGE
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
+$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
+if ${am_cv_python_pyexecdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$exec_prefix" = xNONE
+ then
+ am_py_exec_prefix=$am_py_prefix
+ else
+ am_py_exec_prefix=$exec_prefix
+ fi
+ am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
+ echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+ case $am_cv_python_pyexecdir in
+ $am_py_exec_prefix*)
+ am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+ am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
+ ;;
+ *)
+ case $am_py_exec_prefix in
+ /usr|/System*) ;;
+ *)
+ am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
+ ;;
+ esac
+ ;;
+ esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
+$as_echo "$am_cv_python_pyexecdir" >&6; }
+ pyexecdir=$am_cv_python_pyexecdir
+
+
+
+ pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python modules for full test coverage" >&5
+$as_echo_n "checking for Python modules for full test coverage... " >&6; }
+ if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "cannot import dbus, gobject, dbus.mainloop.glib Python modules" "$LINENO" 5
+ fi
+else
+ # --enable-tests not given: do not abort if Python is missing
+
+
+
+
+ if test -n "$PYTHON"; then
+ # If the user set $PYTHON, use it and don't search something else.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.6" >&5
+$as_echo_n "checking whether $PYTHON version >= 2.6... " >&6; }
+ prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+ if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+ ($PYTHON -c "$prog") >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ as_fn_error $? "too old" "$LINENO" 5
+fi
+ am_display_PYTHON=$PYTHON
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.6" >&5
+$as_echo_n "checking for a Python interpreter with version >= 2.6... " >&6; }
+if ${am_cv_pathless_PYTHON+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+ test "$am_cv_pathless_PYTHON" = none && break
+ prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+ if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
+ ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then :
+ break
+fi
+ done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5
+$as_echo "$am_cv_pathless_PYTHON" >&6; }
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+ if test "$am_cv_pathless_PYTHON" = none; then
+ PYTHON=:
+ else
+ # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
+set dummy $am_cv_pathless_PYTHON; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PYTHON in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+
+
+ if test "$PYTHON" = :; then
+ :
+ else
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
+$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
+if ${am_cv_python_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
+$as_echo "$am_cv_python_version" >&6; }
+ PYTHON_VERSION=$am_cv_python_version
+
+
+
+ PYTHON_PREFIX='${prefix}'
+
+ PYTHON_EXEC_PREFIX='${exec_prefix}'
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
+$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
+if ${am_cv_python_platform+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
+$as_echo "$am_cv_python_platform" >&6; }
+ PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
+$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
+if ${am_cv_python_pythondir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$prefix" = xNONE
+ then
+ am_py_prefix=$ac_default_prefix
+ else
+ am_py_prefix=$prefix
+ fi
+ am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
+ echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+ case $am_cv_python_pythondir in
+ $am_py_prefix*)
+ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+ am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
+ ;;
+ *)
+ case $am_py_prefix in
+ /usr|/System*) ;;
+ *)
+ am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
+ ;;
+ esac
+ ;;
+ esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
+$as_echo "$am_cv_python_pythondir" >&6; }
+ pythondir=$am_cv_python_pythondir
+
+
+
+ pkgpythondir=\${pythondir}/$PACKAGE
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
+$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
+if ${am_cv_python_pyexecdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$exec_prefix" = xNONE
+ then
+ am_py_exec_prefix=$am_py_prefix
+ else
+ am_py_exec_prefix=$exec_prefix
+ fi
+ am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
+ echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+ case $am_cv_python_pyexecdir in
+ $am_py_exec_prefix*)
+ am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+ am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
+ ;;
+ *)
+ case $am_py_exec_prefix in
+ /usr|/System*) ;;
+ *)
+ am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
+ ;;
+ esac
+ ;;
+ esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
+$as_echo "$am_cv_python_pyexecdir" >&6; }
+ pyexecdir=$am_cv_python_pyexecdir
+
+
+
+ pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+ fi
+
+
+fi
+
if test x$enable_verbose_mode = xyes; then
$as_echo "#define DBUS_ENABLE_VERBOSE_MODE 1" >>confdefs.h
@@ -16918,6 +17414,7 @@ if test x$enable_asserts = xno; then
$as_echo "#define DBUS_DISABLE_ASSERT 1" >>confdefs.h
+ DISABLE_UNUSED_WARNINGS="unused-label"
R_DYNAMIC_LDFLAG=""
else
# -rdynamic is needed for glibc's backtrace_symbols to work.
@@ -16941,6 +17438,7 @@ $as_echo "#define DBUS_DISABLE_CHECKS 1" >>confdefs.h
$as_echo "#define G_DISABLE_CHECKS 1" >>confdefs.h
+ DISABLE_UNUSED_WARNINGS="unused-label"
fi
if test x$enable_userdb_cache = xyes; then
@@ -17924,6 +18422,33 @@ fi
done
+for ac_header in syslog.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
+if test "x$ac_cv_header_syslog_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYSLOG_H 1
+_ACEOF
+
+fi
+
+done
+
+if test "x$ac_cv_header_syslog_h" = "xyes"; then
+ ac_fn_c_check_decl "$LINENO" "LOG_PERROR" "ac_cv_have_decl_LOG_PERROR" "#include <syslog.h>
+"
+if test "x$ac_cv_have_decl_LOG_PERROR" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_LOG_PERROR $ac_have_decl
+_ACEOF
+
+fi
+
#### Check for broken poll; taken from Glib's configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll" >&5
@@ -20451,6 +20976,7 @@ $as_echo "$flag_ok" >&6; }
tp_warnings=""
for tp_flag in all \
+ extra \
char-subscripts \
missing-declarations \
missing-prototypes \
@@ -20543,9 +21069,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo "$flag_ok" >&6; }
- for tp_flag in unused \
+ for tp_flag in $DISABLE_UNUSED_WARNINGS \
+ missing-field-initializers \
+ unused-parameter \
sign-compare \
pointer-sign \
+ type-limits \
; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wno-$tp_flag" >&5
@@ -21312,7 +21841,18 @@ fi
if test "${with_systemdsystemunitdir+set}" = set; then :
withval=$with_systemdsystemunitdir;
else
+
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "systemd") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+else
+ with_systemdsystemunitdir=no
+fi
+
fi
if test "x$with_systemdsystemunitdir" != xno; then
@@ -22307,7 +22847,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.5.6, which was
+This file was extended by dbus $as_me 1.5.8, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22373,7 +22913,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.5.6
+dbus config.status 1.5.8
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 9222b18b..c6eb296a 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], [5])
-m4_define([dbus_micro_version], [6])
+m4_define([dbus_micro_version], [8])
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])
@@ -36,7 +36,7 @@ LT_CURRENT=9
## increment any time the source changes; set to
## 0 if you increment CURRENT
-LT_REVISION=3
+LT_REVISION=4
## increment if any interfaces have been added; set to 0
## if any interfaces have been changed or removed. removal has
@@ -163,7 +163,14 @@ AC_ARG_ENABLE([modular-tests],
AC_ARG_ENABLE([tests],
AS_HELP_STRING([--enable-tests],
[enable/disable all tests, overriding embedded-tests/modular-tests]),
- [enable_embedded_tests=$enableval; enable_modular_tests=$enableval],
+ [
+ if test "x$enableval" = xyes; then
+ AC_MSG_NOTICE([Full test coverage was requested with --enable-tests=yes])
+ AC_MSG_NOTICE([This has many dependencies (GLib, dbus-glib, Python)])
+ fi
+ enable_embedded_tests=$enableval
+ enable_modular_tests=$enableval
+ ],
[])
# DBUS_ENABLE_EMBEDDED_TESTS controls unit tests built in to .c files
@@ -187,7 +194,8 @@ if test "x$enable_modular_tests" != xno; then
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22, gio-2.0 >= 2.22],
[],
[if test "x$enable_modular_tests" = xyes; then
- AC_MSG_ERROR([GLib is required by the modular tests])
+ AC_MSG_NOTICE([Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires GLib])
+ AC_MSG_ERROR([$GLIB_ERRORS])
else # assumed to be "auto"
enable_modular_tests=no
fi])
@@ -195,7 +203,8 @@ if test "x$enable_modular_tests" != xno; then
PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1],
[],
[if test "x$enable_modular_tests" = xyes; then
- AC_MSG_ERROR([dbus-glib is required by the modular tests (for now)])
+ AC_MSG_NOTICE([Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires dbus-glib])
+ AC_MSG_ERROR([$DBUS_GLIB_ERRORS])
else # assumed to be "auto"
enable_modular_tests=no
fi])
@@ -218,12 +227,29 @@ AC_ARG_ENABLE([installed-tests],
AM_CONDITIONAL([DBUS_ENABLE_INSTALLED_TESTS],
[test "x$enable_installed_tests" = xyes])
+if test "x$enable_tests" = xyes; then
+ # full test coverage is required, Python is a hard dependency
+ AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
+ AM_PATH_PYTHON([2.6])
+ AC_MSG_CHECKING([for Python modules for full test coverage])
+ if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
+ fi
+else
+ # --enable-tests not given: do not abort if Python is missing
+ AM_PATH_PYTHON([2.6], [], [:])
+fi
+
if test x$enable_verbose_mode = xyes; then
AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
fi
if test x$enable_asserts = xno; then
AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking])
+ DISABLE_UNUSED_WARNINGS="unused-label"
R_DYNAMIC_LDFLAG=""
else
# -rdynamic is needed for glibc's backtrace_symbols to work.
@@ -241,6 +267,7 @@ AC_SUBST(R_DYNAMIC_LDFLAG)
if test x$enable_checks = xno; then
AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking])
AC_DEFINE(G_DISABLE_CHECKS,1,[Disable GLib public API sanity checking])
+ DISABLE_UNUSED_WARNINGS="unused-label"
fi
if test x$enable_userdb_cache = xyes; then
@@ -545,6 +572,11 @@ AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull)
+AC_CHECK_HEADERS([syslog.h])
+if test "x$ac_cv_header_syslog_h" = "xyes"; then
+ AC_CHECK_DECLS([LOG_PERROR], [], [], [[#include <syslog.h>]])
+fi
+
#### Check for broken poll; taken from Glib's configure
AC_MSG_CHECKING([for broken poll])
@@ -1203,8 +1235,9 @@ TP_COMPILER_WARNINGS([WARNING_CFLAGS],
dnl Override with --enable-Werror or --disable-Werror
[test x$dbus_win != xyes -a x$dbus_cygwin != xyes -a x$USE_MAINTAINER_MODE = xyes],
- dnl enable these warnings if possible:
+ dnl Enable these warnings if possible:
[all \
+ extra \
char-subscripts \
missing-declarations \
missing-prototypes \
@@ -1216,12 +1249,25 @@ TP_COMPILER_WARNINGS([WARNING_CFLAGS],
declaration-after-statement \
],
- dnl disable these warnings if possible, make them non-fatal if possible,
- dnl and don't enable -Werror unless we succeeded:
- dnl (unused is by design, sign-compare and pointer-sign are fd.o #17433)
- [unused \
+ dnl Disable these warnings if possible, make them non-fatal if possible,
+ dnl and don't enable -Werror unless we succeeded.
+ dnl
+ dnl Intentional:
+ dnl - $DISABLE_UNUSED_WARNINGS disables unused-label warnings if not
+ dnl checking or not asserting
+ dnl - missing field initializers being 0 is a C feature, not a bug
+ dnl - unused-parameter is to make writing callbacks less annoying
+ dnl
+ dnl To be fixed one day:
+ dnl - sign-compare and pointer-sign are workarounds for fd.o #17433
+ dnl - type-limits is probably a bug too, but having the rest of -Wextra
+ dnl is better than nothing
+ [$DISABLE_UNUSED_WARNINGS \
+ missing-field-initializers \
+ unused-parameter \
sign-compare \
pointer-sign \
+ type-limits \
])
if test "x$GCC" = "xyes"; then
@@ -1367,7 +1413,12 @@ AM_CONDITIONAL(DBUS_INIT_SCRIPTS_CYGWIN, test x$with_init_scripts = xcygwin)
##### systemd unit files
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
- [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+ [],
+ [
+ PKG_CHECK_EXISTS([systemd],
+ [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)],
+ [with_systemdsystemunitdir=no])
+ ])
if test "x$with_systemdsystemunitdir" != xno; then
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
fi
diff --git a/dbus/Makefile.in b/dbus/Makefile.in
index 5deb9609..e85a0a36 100644
--- a/dbus/Makefile.in
+++ b/dbus/Makefile.in
@@ -452,6 +452,11 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
@@ -527,9 +532,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index cb1da8c1..9128ffc7 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -3884,7 +3884,8 @@ dbus_connection_steal_borrowed_message (DBusConnection *connection,
pop_message = _dbus_list_pop_first (&connection->incoming_messages);
_dbus_assert (message == pop_message);
-
+ (void) pop_message; /* unused unless asserting */
+
connection->n_incoming -= 1;
_dbus_verbose ("Incoming message %p stolen from queue, %d incoming\n",
diff --git a/dbus/dbus-errors.c b/dbus/dbus-errors.c
index 5f27501c..db3305b9 100644
--- a/dbus/dbus-errors.c
+++ b/dbus/dbus-errors.c
@@ -78,6 +78,8 @@ typedef struct
} DBusRealError;
+_DBUS_STATIC_ASSERT (sizeof (DBusRealError) == sizeof (DBusError));
+
/**
* Returns a longer message describing an error name.
* If the error name is unknown, returns the name
diff --git a/dbus/dbus-hash.c b/dbus/dbus-hash.c
index 67ef4ced..b104f32f 100644
--- a/dbus/dbus-hash.c
+++ b/dbus/dbus-hash.c
@@ -222,6 +222,8 @@ typedef struct
int n_entries_on_init; /**< used to detect table resize since initialization */
} DBusRealHashIter;
+_DBUS_STATIC_ASSERT (sizeof (DBusRealHashIter) == sizeof (DBusHashIter));
+
static DBusHashEntry* find_direct_function (DBusHashTable *table,
void *key,
dbus_bool_t create_if_not_found,
diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c
index 95a491f9..fcea0790 100644
--- a/dbus/dbus-internals.c
+++ b/dbus/dbus-internals.c
@@ -347,7 +347,6 @@ _dbus_verbose_init (void)
static char *_dbus_file_path_extract_elements_from_tail(const char *file,int level)
{
static int prefix = -1;
- char *p;
if (prefix == -1)
{
diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h
index dcef7d7f..4e383bca 100644
--- a/dbus/dbus-internals.h
+++ b/dbus/dbus-internals.h
@@ -108,20 +108,20 @@ dbus_bool_t _dbus_is_verbose_real (void);
# define _dbus_is_verbose _dbus_is_verbose_real
#else
# ifdef HAVE_ISO_VARARGS
-# define _dbus_verbose(...)
+# define _dbus_verbose(...) do { } while (0)
# elif defined (HAVE_GNUC_VARARGS)
-# define _dbus_verbose(format...)
+# define _dbus_verbose(format...) do { } while (0)
# else
static void _dbus_verbose(const char * x,...) {;}
# endif
-# define _dbus_verbose_reset()
+# define _dbus_verbose_reset() do { } while (0)
# define _dbus_is_verbose() FALSE
#endif /* !DBUS_ENABLE_VERBOSE_MODE */
const char* _dbus_strerror (int error_number);
#ifdef DBUS_DISABLE_ASSERT
-#define _dbus_assert(condition)
+#define _dbus_assert(condition) do { } while (0)
#else
void _dbus_real_assert (dbus_bool_t condition,
const char *condition_text,
@@ -133,7 +133,7 @@ void _dbus_real_assert (dbus_bool_t condition,
#endif /* !DBUS_DISABLE_ASSERT */
#ifdef DBUS_DISABLE_ASSERT
-#define _dbus_assert_not_reached(explanation)
+#define _dbus_assert_not_reached(explanation) do { } while (0)
#else
void _dbus_real_assert_not_reached (const char *explanation,
const char *file,
@@ -181,8 +181,8 @@ extern const char *_dbus_return_if_fail_warning_format;
/* this is an assert and not an error, but in the typical --disable-checks case (you're trying
* to really minimize code size), disabling these assertions makes sense.
*/
-#define _DBUS_ASSERT_ERROR_IS_SET(error)
-#define _DBUS_ASSERT_ERROR_IS_CLEAR(error)
+#define _DBUS_ASSERT_ERROR_IS_SET(error) do { } while (0)
+#define _DBUS_ASSERT_ERROR_IS_CLEAR(error) do { } while (0)
#else
#define _DBUS_ASSERT_ERROR_IS_SET(error) _dbus_assert ((error) == NULL || dbus_error_is_set ((error)))
#define _DBUS_ASSERT_ERROR_IS_CLEAR(error) _dbus_assert ((error) == NULL || !dbus_error_is_set ((error)))
@@ -362,6 +362,12 @@ dbus_bool_t _dbus_read_uuid_file (const DBusString *filename,
dbus_bool_t _dbus_get_local_machine_uuid_encoded (DBusString *uuid_str);
+#define _DBUS_PASTE2(a, b) a ## b
+#define _DBUS_PASTE(a, b) _DBUS_PASTE2 (a, b)
+#define _DBUS_STATIC_ASSERT(expr) \
+ typedef struct { char _assertion[(expr) ? 1 : -1]; } \
+ _DBUS_PASTE (_DBUS_STATIC_ASSERT_, __LINE__)
+
DBUS_END_DECLS
#endif /* DBUS_INTERNALS_H */
diff --git a/dbus/dbus-mainloop.c b/dbus/dbus-mainloop.c
index b49c9b2c..1a046a1f 100644
--- a/dbus/dbus-mainloop.c
+++ b/dbus/dbus-mainloop.c
@@ -99,7 +99,6 @@ watch_flags_from_poll_revents (short revents)
typedef struct
{
- int refcount;
DBusTimeout *timeout;
unsigned long last_tv_sec;
unsigned long last_tv_usec;
@@ -119,31 +118,13 @@ timeout_callback_new (DBusTimeout *timeout)
cb->timeout = timeout;
_dbus_get_current_time (&cb->last_tv_sec,
&cb->last_tv_usec);
- cb->refcount = 1;
- return cb;
-}
-
-static TimeoutCallback *
-timeout_callback_ref (TimeoutCallback *cb)
-{
- _dbus_assert (cb->refcount > 0);
-
- cb->refcount += 1;
-
return cb;
}
static void
-timeout_callback_unref (TimeoutCallback *cb)
+timeout_callback_free (TimeoutCallback *cb)
{
- _dbus_assert (cb->refcount > 0);
-
- cb->refcount -= 1;
-
- if (cb->refcount == 0)
- {
- dbus_free (cb);
- }
+ dbus_free (cb);
}
static void
@@ -253,7 +234,6 @@ cull_watches_for_invalid_fd (DBusLoop *loop,
int fd)
{
DBusList *link;
- DBusList *next;
DBusList **watches;
_dbus_warn ("invalid request, socket fd %d not open\n", fd);
@@ -379,7 +359,7 @@ _dbus_loop_add_timeout (DBusLoop *loop,
}
else
{
- timeout_callback_unref (tcb);
+ timeout_callback_free (tcb);
return FALSE;
}
@@ -403,7 +383,7 @@ _dbus_loop_remove_timeout (DBusLoop *loop,
_dbus_list_remove_link (&loop->timeouts, link);
loop->callback_list_serial += 1;
loop->timeout_count -= 1;
- timeout_callback_unref (this);
+ timeout_callback_free (this);
return;
}
diff --git a/dbus/dbus-marshal-basic.c b/dbus/dbus-marshal-basic.c
index 486f1c01..b63761e9 100644
--- a/dbus/dbus-marshal-basic.c
+++ b/dbus/dbus-marshal-basic.c
@@ -29,6 +29,42 @@
#include <string.h>
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define _DBUS_ASSERT_ALIGNMENT(type, op, val) \
+ _DBUS_STATIC_ASSERT (__extension__ __alignof__ (type) op val)
+#else
+ /* not gcc, so probably no alignof operator: just use a no-op statement
+ * that's valid in the same contexts */
+# define _DBUS_ASSERT_ALIGNMENT(type, op, val) \
+ _DBUS_STATIC_ASSERT (TRUE)
+#endif
+
+/* True by definition, but just for completeness... */
+_DBUS_STATIC_ASSERT (sizeof (char) == 1);
+_DBUS_ASSERT_ALIGNMENT (char, ==, 1);
+
+_DBUS_STATIC_ASSERT (sizeof (dbus_int16_t) == 2);
+_DBUS_ASSERT_ALIGNMENT (dbus_int16_t, <=, 2);
+_DBUS_STATIC_ASSERT (sizeof (dbus_uint16_t) == 2);
+_DBUS_ASSERT_ALIGNMENT (dbus_uint16_t, <=, 2);
+
+_DBUS_STATIC_ASSERT (sizeof (dbus_int32_t) == 4);
+_DBUS_ASSERT_ALIGNMENT (dbus_int32_t, <=, 4);
+_DBUS_STATIC_ASSERT (sizeof (dbus_uint32_t) == 4);
+_DBUS_ASSERT_ALIGNMENT (dbus_uint32_t, <=, 4);
+_DBUS_STATIC_ASSERT (sizeof (dbus_bool_t) == 4);
+_DBUS_ASSERT_ALIGNMENT (dbus_bool_t, <=, 4);
+
+_DBUS_STATIC_ASSERT (sizeof (double) == 8);
+_DBUS_ASSERT_ALIGNMENT (double, <=, 8);
+
+#ifdef DBUS_HAVE_INT64
+_DBUS_STATIC_ASSERT (sizeof (dbus_int64_t) == 8);
+_DBUS_ASSERT_ALIGNMENT (dbus_int64_t, <=, 8);
+_DBUS_STATIC_ASSERT (sizeof (dbus_uint64_t) == 8);
+_DBUS_ASSERT_ALIGNMENT (dbus_uint64_t, <=, 8);
+#endif
+
/**
* @defgroup DBusMarshal marshaling and unmarshaling
* @ingroup DBusInternals
diff --git a/dbus/dbus-marshal-header.c b/dbus/dbus-marshal-header.c
index 28984f4c..4a763fba 100644
--- a/dbus/dbus-marshal-header.c
+++ b/dbus/dbus-marshal-header.c
@@ -1497,16 +1497,3 @@ _dbus_header_byteswap (DBusHeader *header,
}
/** @} */
-
-#ifdef DBUS_BUILD_TESTS
-#include "dbus-test.h"
-#include <stdio.h>
-
-dbus_bool_t
-_dbus_marshal_header_test (void)
-{
-
- return TRUE;
-}
-
-#endif /* DBUS_BUILD_TESTS */
diff --git a/dbus/dbus-marshal-recursive-util.c b/dbus/dbus-marshal-recursive-util.c
index 3508bb0d..345b891f 100644
--- a/dbus/dbus-marshal-recursive-util.c
+++ b/dbus/dbus-marshal-recursive-util.c
@@ -3326,7 +3326,6 @@ dict_write_value (TestTypeNode *node,
DBusString dict_entry_signature;
int i;
int n_entries;
- int entry_value_type;
TestTypeNode *child;
n_entries = node->klass->subclass_detail;
@@ -3363,9 +3362,7 @@ dict_write_value (TestTypeNode *node,
if (!_dbus_string_append_byte (&dict_entry_signature,
DBUS_DICT_ENTRY_END_CHAR))
goto oom;
-
- entry_value_type = _dbus_first_type_in_signature (&entry_value_signature, 0);
-
+
if (!_dbus_type_writer_recurse (writer, DBUS_TYPE_ARRAY,
&dict_entry_signature, 0,
&sub))
diff --git a/dbus/dbus-memory.c b/dbus/dbus-memory.c
index ee40e82b..c5f46413 100644
--- a/dbus/dbus-memory.c
+++ b/dbus/dbus-memory.c
@@ -233,7 +233,6 @@ _dbus_get_fail_alloc_failures (void)
}
#ifdef DBUS_BUILD_TESTS
-static dbus_bool_t called = 0;
/**
* Called when about to alloc some memory; if
* it returns #TRUE, then the allocation should
@@ -248,6 +247,8 @@ _dbus_decrement_fail_alloc_counter (void)
_dbus_initialize_malloc_debug ();
#ifdef DBUS_WIN_FIXME
{
+ static dbus_bool_t called = 0;
+
if (!called)
{
_dbus_verbose("TODO: memory allocation testing errors disabled for now\n");
diff --git a/dbus/dbus-message-factory.c b/dbus/dbus-message-factory.c
index b5a06f1d..efa4e029 100644
--- a/dbus/dbus-message-factory.c
+++ b/dbus/dbus-message-factory.c
@@ -942,6 +942,9 @@ generate_byte_changed (DBusMessageDataIter *iter,
return TRUE;
}
+#if 0
+/* This is really expensive and doesn't add too much coverage */
+
static dbus_bool_t
find_next_typecode (DBusMessageDataIter *iter,
DBusString *data,
@@ -1024,7 +1027,7 @@ static const int typecodes[] = {
DBUS_TYPE_UNIX_FD,
255 /* random invalid typecode */
};
-
+
static dbus_bool_t
generate_typecode_changed (DBusMessageDataIter *iter,
DBusString *data,
@@ -1081,6 +1084,7 @@ generate_typecode_changed (DBusMessageDataIter *iter,
*expected_validity = DBUS_VALIDITY_UNKNOWN;
return TRUE;
}
+#endif
typedef struct
{
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index cc1cfa17..0c7e80d6 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -2267,12 +2267,14 @@ dbus_message_iter_get_fixed_array (DBusMessageIter *iter,
int *n_elements)
{
DBusMessageRealIter *real = (DBusMessageRealIter *)iter;
+#ifndef DBUS_DISABLE_CHECKS
int subtype = _dbus_type_reader_get_current_type(&real->u.reader);
_dbus_return_if_fail (_dbus_message_iter_check (real));
_dbus_return_if_fail (value != NULL);
_dbus_return_if_fail ((subtype == DBUS_TYPE_INVALID) ||
(dbus_type_is_fixed (subtype) && subtype != DBUS_TYPE_UNIX_FD));
+#endif
_dbus_type_reader_read_fixed_multi (&real->u.reader,
value, n_elements);
@@ -2824,12 +2826,14 @@ dbus_message_iter_abandon_container (DBusMessageIter *iter,
DBusMessageIter *sub)
{
DBusMessageRealIter *real = (DBusMessageRealIter *)iter;
+#ifndef DBUS_DISABLE_CHECKS
DBusMessageRealIter *real_sub = (DBusMessageRealIter *)sub;
_dbus_return_if_fail (_dbus_message_iter_append_check (real));
_dbus_return_if_fail (real->iter_type == DBUS_MESSAGE_ITER_TYPE_WRITER);
_dbus_return_if_fail (_dbus_message_iter_append_check (real_sub));
_dbus_return_if_fail (real_sub->iter_type == DBUS_MESSAGE_ITER_TYPE_WRITER);
+#endif
_dbus_message_iter_abandon_signature (real);
}
@@ -4701,6 +4705,7 @@ dbus_message_demarshal_bytes_needed(const char *buf,
if (validity == DBUS_VALID)
{
_dbus_assert (have_message || (header_len + body_len) > len);
+ (void) have_message; /* unused unless asserting */
return header_len + body_len;
}
else
diff --git a/dbus/dbus-nonce.c b/dbus/dbus-nonce.c
index d30b2535..e74c2dd5 100644
--- a/dbus/dbus-nonce.c
+++ b/dbus/dbus-nonce.c
@@ -196,7 +196,6 @@ _dbus_send_nonce (int fd, const DBusString *noncefile, DBusError *error)
{
dbus_bool_t read_result;
int send_result;
- size_t sendLen;
DBusString nonce;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
@@ -240,7 +239,6 @@ do_noncefile_create (DBusNonceFile *noncefile,
DBusError *error,
dbus_bool_t use_subdir)
{
- dbus_bool_t ret;
DBusString randomStr;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
diff --git a/dbus/dbus-pending-call.c b/dbus/dbus-pending-call.c
index f9613195..e7f5cd98 100644
--- a/dbus/dbus-pending-call.c
+++ b/dbus/dbus-pending-call.c
@@ -808,19 +808,3 @@ dbus_pending_call_get_data (DBusPendingCall *pending,
}
/** @} */
-
-#ifdef DBUS_BUILD_TESTS
-
-/**
- * @ingroup DBusPendingCallInternals
- * Unit test for DBusPendingCall.
- *
- * @returns #TRUE on success.
- */
-dbus_bool_t
-_dbus_pending_call_test (const char *test_data_dir)
-{
-
- return TRUE;
-}
-#endif /* DBUS_BUILD_TESTS */
diff --git a/dbus/dbus-server-socket.c b/dbus/dbus-server-socket.c
index 02973c19..8e31da9d 100644
--- a/dbus/dbus-server-socket.c
+++ b/dbus/dbus-server-socket.c
@@ -89,10 +89,8 @@ handle_new_client_fd_and_unlock (DBusServer *server,
DBusConnection *connection;
DBusTransport *transport;
DBusNewConnectionFunction new_connection_function;
- DBusServerSocket* socket_server;
void *new_connection_data;
- socket_server = (DBusServerSocket*)server;
_dbus_verbose ("Creating new client connection with fd %d\n", client_fd);
HAVE_LOCK_CHECK (server);
diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c
index 70ad9654..130f66ec 100644
--- a/dbus/dbus-server-unix.c
+++ b/dbus/dbus-server-unix.c
@@ -251,11 +251,18 @@ _dbus_server_new_for_domain_socket (const char *path,
goto failed_0;
}
- path_copy = _dbus_strdup (path);
- if (path_copy == NULL)
+ if (abstract)
{
- dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
- goto failed_0;
+ path_copy = NULL;
+ }
+ else
+ {
+ path_copy = _dbus_strdup (path);
+ if (path_copy == NULL)
+ {
+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
+ goto failed_0;
+ }
}
listen_fd = _dbus_listen_unix_socket (path, abstract, error);
@@ -273,7 +280,8 @@ _dbus_server_new_for_domain_socket (const char *path,
goto failed_2;
}
- _dbus_server_socket_own_filename(server, path_copy);
+ if (path_copy != NULL)
+ _dbus_server_socket_own_filename(server, path_copy);
_dbus_string_free (&address);
diff --git a/dbus/dbus-spawn-win.c b/dbus/dbus-spawn-win.c
index df073722..36df388c 100644
--- a/dbus/dbus-spawn-win.c
+++ b/dbus/dbus-spawn-win.c
@@ -502,8 +502,7 @@ compose_string (char **strings, char separator)
int n = 0;
char *buf;
char *p;
- const char *ptr;
-
+
if (!strings || !strings[0])
return 0;
for (i = 0; strings[i]; i++)
@@ -583,7 +582,7 @@ static DWORD __stdcall
babysitter (void *parameter)
{
DBusBabysitter *sitter = (DBusBabysitter *) parameter;
- int fd;
+
PING();
_dbus_babysitter_ref (sitter);
diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c
index a4652a3e..9f6be265 100644
--- a/dbus/dbus-spawn.c
+++ b/dbus/dbus-spawn.c
@@ -1103,7 +1103,9 @@ babysit (pid_t grandchild_pid,
{
char b;
if (read (sigchld_pipe[READ_END], &b, 1) == -1)
- /* ignore */;
+ {
+ /* ignore */
+ }
/* do waitpid check */
check_babysit_events (grandchild_pid, parent_pipe, 0);
}
diff --git a/dbus/dbus-string-private.h b/dbus/dbus-string-private.h
index 185515d8..2e6de900 100644
--- a/dbus/dbus-string-private.h
+++ b/dbus/dbus-string-private.h
@@ -24,6 +24,7 @@
#ifndef DBUS_STRING_PRIVATE_H
#define DBUS_STRING_PRIVATE_H
+#include <dbus/dbus-internals.h>
#include <dbus/dbus-memory.h>
#include <dbus/dbus-types.h>
@@ -50,6 +51,7 @@ typedef struct
unsigned int align_offset : 3; /**< str - align_offset is the actual malloc block */
} DBusRealString;
+_DBUS_STATIC_ASSERT (sizeof (DBusRealString) == sizeof (DBusString));
/**
* @defgroup DBusStringInternals DBusString implementation details
@@ -73,6 +75,7 @@ typedef struct
*/
#define DBUS_GENERIC_STRING_PREAMBLE(real) \
do { \
+ (void) real; /* might be unused unless asserting */ \
_dbus_assert ((real) != NULL); \
_dbus_assert (!(real)->invalid); \
_dbus_assert ((real)->len >= 0); \
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
index f9315702..3067be59 100644
--- a/dbus/dbus-sysdeps-unix.c
+++ b/dbus/dbus-sysdeps-unix.c
@@ -90,6 +90,38 @@
#define socklen_t int
#endif
+#if defined (__sun) || defined (__sun__)
+/*
+ * CMS_SPACE etc. definitions for Solaris < 10, based on
+ * http://mailman.videolan.org/pipermail/vlc-devel/2006-May/024402.html
+ * via
+ * http://wiki.opencsw.org/porting-faq#toc10
+ *
+ * These are only redefined for Solaris, for now: if your OS needs these too,
+ * please file a bug. (Or preferably, improve your OS so they're not needed.)
+ */
+
+# ifndef CMSG_ALIGN
+# ifdef __sun__
+# define CMSG_ALIGN(len) _CMSG_DATA_ALIGN (len)
+# else
+ /* aligning to sizeof (long) is assumed to be portable (fd.o#40235) */
+# define CMSG_ALIGN(len) (((len) + sizeof (long) - 1) & \
+ ~(sizeof (long) - 1))
+# endif
+# endif
+
+# ifndef CMSG_SPACE
+# define CMSG_SPACE(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + \
+ CMSG_ALIGN (len))
+# endif
+
+# ifndef CMSG_LEN
+# define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+# endif
+
+#endif /* Solaris */
+
static dbus_bool_t
_dbus_open_socket (int *fd_p,
int domain,
@@ -2493,8 +2525,6 @@ void
_dbus_get_current_time (long *tv_sec,
long *tv_usec)
{
- struct timeval t;
-
#ifdef HAVE_MONOTONIC_CLOCK
struct timespec ts;
clock_gettime (CLOCK_MONOTONIC, &ts);
@@ -2504,6 +2534,8 @@ _dbus_get_current_time (long *tv_sec,
if (tv_usec)
*tv_usec = ts.tv_nsec / 1000;
#else
+ struct timeval t;
+
gettimeofday (&t, NULL);
if (tv_sec)
@@ -2982,14 +3014,60 @@ _dbus_full_duplex_pipe (int *fd1,
*
* @param format a printf-style format string
* @param args arguments for the format string
- * @returns length of the given format string and args
+ * @returns length of the given format string and args, or -1 if no memory
*/
int
_dbus_printf_string_upper_bound (const char *format,
va_list args)
{
- char c;
- return vsnprintf (&c, 1, format, args);
+ char static_buf[1024];
+ int bufsize = sizeof (static_buf);
+ int len;
+
+ len = vsnprintf (static_buf, bufsize, format, args);
+
+ /* If vsnprintf() returned non-negative, then either the string fits in
+ * static_buf, or this OS has the POSIX and C99 behaviour where vsnprintf
+ * returns the number of characters that were needed, or this OS returns the
+ * truncated length.
+ *
+ * We ignore the possibility that snprintf might just ignore the length and
+ * overrun the buffer (64-bit Solaris 7), because that's pathological.
+ * If your libc is really that bad, come back when you have a better one. */
+ if (len == bufsize)
+ {
+ /* This could be the truncated length (Tru64 and IRIX have this bug),
+ * or the real length could be coincidentally the same. Which is it?
+ * If vsnprintf returns the truncated length, we'll go to the slow
+ * path. */
+ if (vsnprintf (static_buf, 1, format, args) == 1)
+ len = -1;
+ }
+
+ /* If vsnprintf() returned negative, we have to do more work.
+ * HP-UX returns negative. */
+ while (len < 0)
+ {
+ char *buf;
+
+ bufsize *= 2;
+
+ buf = dbus_malloc (bufsize);
+
+ if (buf == NULL)
+ return -1;
+
+ len = vsnprintf (buf, bufsize, format, args);
+ dbus_free (buf);
+
+ /* If the reported length is exactly the buffer size, round up to the
+ * next size, in case vsnprintf has been returning the truncated
+ * length */
+ if (len == bufsize)
+ len = -1;
+ }
+
+ return len;
}
/**
@@ -3421,10 +3499,10 @@ _dbus_lookup_launchd_socket (DBusString *socket_path,
#endif
}
+#ifdef DBUS_ENABLE_LAUNCHD
static dbus_bool_t
_dbus_lookup_session_address_launchd (DBusString *address, DBusError *error)
{
-#ifdef DBUS_ENABLE_LAUNCHD
dbus_bool_t valid_socket;
DBusString socket_path;
@@ -3466,12 +3544,8 @@ _dbus_lookup_session_address_launchd (DBusString *address, DBusError *error)
_dbus_string_free(&socket_path);
return TRUE;
-#else
- dbus_set_error(error, DBUS_ERROR_NOT_SUPPORTED,
- "can't lookup session address from launchd; launchd support not compiled in");
- return FALSE;
-#endif
}
+#endif
/**
* Determines the address of the session bus by querying a
diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c
index a80f6430..a1915cb3 100644
--- a/dbus/dbus-sysdeps-util-unix.c
+++ b/dbus/dbus-sysdeps-util-unix.c
@@ -389,7 +389,6 @@ _dbus_request_file_descriptor_limit (unsigned int limit)
#ifdef HAVE_SETRLIMIT
struct rlimit lim;
struct rlimit target_lim;
- unsigned int current_limit;
/* No point to doing this practically speaking
* if we're not uid 0. We expect the system
@@ -422,11 +421,16 @@ _dbus_request_file_descriptor_limit (unsigned int limit)
#endif
}
-void
+void
_dbus_init_system_log (void)
{
+#ifdef HAVE_DECL_LOG_PERROR
openlog ("dbus", LOG_PID | LOG_PERROR, LOG_DAEMON);
+#else
+ openlog ("dbus", LOG_PID, LOG_DAEMON);
+#endif
}
+
/**
* Log a message to the system log file (e.g. syslog on Unix).
*
@@ -476,6 +480,19 @@ _dbus_system_logv (DBusSystemLogSeverity severity, const char *msg, va_list args
return;
}
+#ifndef HAVE_DECL_LOG_PERROR
+ {
+ /* vsyslog() won't write to stderr, so we'd better do it */
+ va_list tmp;
+
+ DBUS_VA_COPY (tmp, args);
+ fprintf (stderr, "dbus[" DBUS_PID_FORMAT "]: ", _dbus_getpid ());
+ vfprintf (stderr, msg, tmp);
+ fputc ('\n', stderr);
+ va_end (tmp);
+ }
+#endif
+
vsyslog (flags, msg, args);
if (severity == DBUS_SYSTEM_LOG_FATAL)
diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c
index a8c60bda..b492b09c 100644
--- a/dbus/dbus-sysdeps-win.c
+++ b/dbus/dbus-sysdeps-win.c
@@ -820,9 +820,6 @@ _dbus_full_duplex_pipe (int *fd1,
struct sockaddr_in saddr;
int len;
u_long arg;
- fd_set read_set, write_set;
- struct timeval tv;
- int res;
_dbus_win_startup_winsock ();
@@ -958,7 +955,6 @@ _dbus_poll (DBusPollFD *fds,
msgp += sprintf (msgp, "WSAEventSelect: to=%d\n\t", timeout_milliseconds);
for (i = 0; i < n_fds; i++)
{
- static dbus_bool_t warned = FALSE;
DBusPollFD *fdp = &fds[i];
@@ -1096,7 +1092,6 @@ _dbus_poll (DBusPollFD *fds,
msgp += sprintf (msgp, "select: to=%d\n\t", timeout_milliseconds);
for (i = 0; i < n_fds; i++)
{
- static dbus_bool_t warned = FALSE;
DBusPollFD *fdp = &fds[i];
@@ -2623,9 +2618,7 @@ dbus_bool_t
_dbus_daemon_is_session_bus_address_published (const char *scope)
{
HANDLE lock;
- HANDLE mutex;
DBusString mutex_name;
- DWORD ret;
if (!_dbus_get_mutex_name(&mutex_name,scope))
{
@@ -2670,8 +2663,6 @@ _dbus_daemon_publish_session_bus_address (const char* address, const char *scope
{
HANDLE lock;
char *shared_addr = NULL;
- DWORD ret;
- char addressInfo[1024];
DBusString shm_name;
DBusString mutex_name;
@@ -3131,8 +3122,6 @@ dbus_bool_t
_dbus_get_install_root(char *prefix, int len)
{
//To find the prefix, we cut the filename and also \bin\ if present
- char* p = 0;
- int i;
DWORD pathLength;
char *lastSlash;
SetLastError( 0 );
@@ -3286,7 +3275,6 @@ _dbus_append_keyring_directory_for_credentials (DBusString *directory,
{
DBusString homedir;
DBusString dotdir;
- dbus_uid_t uid;
const char *homepath;
const char *homedrive;
diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h
index f66efaad..f8438f43 100644
--- a/dbus/dbus-sysdeps.h
+++ b/dbus/dbus-sysdeps.h
@@ -31,6 +31,10 @@
#include <stdint.h>
#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
#include <dbus/dbus-errors.h>
#include <dbus/dbus-file.h>
#include <dbus/dbus-string.h>
diff --git a/dbus/dbus-test.c b/dbus/dbus-test.c
index 1fbaf8c8..b2eeb724 100644
--- a/dbus/dbus-test.c
+++ b/dbus/dbus-test.c
@@ -150,8 +150,6 @@ dbus_internal_do_not_use_run_tests (const char *test_data_dir, const char *speci
run_test ("marshal-validate", specific_test, _dbus_marshal_validate_test);
- run_test ("marshal-header", specific_test, _dbus_marshal_header_test);
-
run_data_test ("message", specific_test, _dbus_message_test, test_data_dir);
run_test ("hash", specific_test, _dbus_hash_test);
@@ -172,8 +170,6 @@ dbus_internal_do_not_use_run_tests (const char *test_data_dir, const char *speci
run_data_test ("auth", specific_test, _dbus_auth_test, test_data_dir);
- run_data_test ("pending-call", specific_test, _dbus_pending_call_test, test_data_dir);
-
printf ("%s: completed successfully\n", "dbus-test");
#else
printf ("Not compiled with unit tests, not running any\n");
diff --git a/dbus/dbus-test.h b/dbus/dbus-test.h
index 982577fb..d97d142a 100644
--- a/dbus/dbus-test.h
+++ b/dbus/dbus-test.h
@@ -33,7 +33,6 @@ dbus_bool_t _dbus_list_test (void);
dbus_bool_t _dbus_marshal_test (void);
dbus_bool_t _dbus_marshal_recursive_test (void);
dbus_bool_t _dbus_marshal_byteswap_test (void);
-dbus_bool_t _dbus_marshal_header_test (void);
dbus_bool_t _dbus_marshal_validate_test (void);
dbus_bool_t _dbus_misc_test (void);
dbus_bool_t _dbus_signature_test (void);
@@ -51,7 +50,6 @@ dbus_bool_t _dbus_spawn_test (const char *test_data_dir);
dbus_bool_t _dbus_userdb_test (const char *test_data_dir);
dbus_bool_t _dbus_memory_test (void);
dbus_bool_t _dbus_object_tree_test (void);
-dbus_bool_t _dbus_pending_call_test (const char *test_data_dir);
dbus_bool_t _dbus_credentials_test (const char *test_data_dir);
void dbus_internal_do_not_use_run_tests (const char *test_data_dir,
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e4ab5fb8..3fdb7803 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -28,11 +28,9 @@ DTDS = \
busconfig.dtd \
introspect.dtd
-dist_doc_DATA = \
- diagram.png \
- diagram.svg \
- system-activation.txt
+dist_doc_DATA = system-activation.txt
+# uploaded and distributed, but not installed
STATIC_DOCS = \
dbus-faq.xml \
dbus-specification.xml \
@@ -50,8 +48,19 @@ EXTRA_DIST = \
html_DATA =
+dist_html_DATA =
+
+# diagram.png/diagram.svg aren't really HTML, but must go in the same
+# directory as the HTML to avoid broken links
+STATIC_HTML = \
+ diagram.png \
+ diagram.svg \
+ $(NULL)
+
+dist_html_DATA += $(STATIC_HTML)
+
# we distribute these in the tarball so users don't necessarily need xmlto
-dist_html_DATA = $(XMLTO_OUTPUT)
+dist_html_DATA += $(XMLTO_OUTPUT)
XMLTO_OUTPUT= \
dbus-faq.html \
@@ -99,8 +108,8 @@ uninstall-local::
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
+ rm -f $(DESTDIR)$(htmldir)/*.png
+ rm -f $(DESTDIR)$(htmldir)/*.svg
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(apidir) || \
rmdir $(DESTDIR)$(apidir)
endif
@@ -122,14 +131,16 @@ BONUS_FILES = \
$(top_srcdir)/ChangeLog
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 $(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
+ $(AM_V_at)rm -rf $@ $@.tmp
+ $(AM_V_GEN)$(MKDIR_P) $@.tmp/api
+ $(AM_V_at)cd $(srcdir) && cp $(STATIC_DOCS) @abs_builddir@/$@.tmp
+ $(AM_V_at)cd $(srcdir) && cp $(dist_doc_DATA) @abs_builddir@/$@.tmp
+ $(AM_V_at)cd $(srcdir) && cp $(STATIC_HTML) @abs_builddir@/$@.tmp
+ $(AM_V_at)cp $(XMLTO_OUTPUT) @abs_builddir@/$@.tmp
+ $(AM_V_at)cp $(MAN_HTML_FILES) @abs_builddir@/$@.tmp
+ $(AM_V_at)cp $(BONUS_FILES) @abs_builddir@/$@.tmp
+ $(AM_V_at)cp -r api/html @abs_builddir@/$@.tmp/api
+ $(AM_V_at)mv $@.tmp $@
dbus-docs.tar.gz: dbus-docs
$(AM_V_GEN)tar czf $@ $<
@@ -141,10 +152,10 @@ SPECIFICATION_SERVER = specifications.freedesktop.org
SPECIFICATION_PATH = /srv/specifications.freedesktop.org/www/dbus/1.0
maintainer-upload-docs: dbus-docs.tar.gz dbus-docs
- scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR)
+ scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR)/
rsync -rpvzP --chmod=Dg+s,ug+rwX,o=rX \
dbus-docs/ $(DOC_SERVER):$(DOC_WWW_DIR)/doc/
- scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)
+ cd $(srcdir) && scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)/
else
maintainer-upload-docs:
@echo "Can't upload documentation! Re-run configure with"
@@ -156,7 +167,7 @@ endif
clean-local:
rm -f $(html_DATA)
rm -rf api
- rm -rf dbus-docs
+ rm -rf dbus-docs dbus-docs.tmp
rm -f *.1.html
rm -f doxygen.stamp
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 0e352846..7428aae6 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -204,6 +204,11 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
@@ -279,9 +284,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -321,11 +330,9 @@ DTDS = \
busconfig.dtd \
introspect.dtd
-dist_doc_DATA = \
- diagram.png \
- diagram.svg \
- system-activation.txt
+dist_doc_DATA = system-activation.txt
+# uploaded and distributed, but not installed
STATIC_DOCS = \
dbus-faq.xml \
dbus-specification.xml \
@@ -344,7 +351,15 @@ EXTRA_DIST = \
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)
+dist_html_DATA = $(STATIC_HTML) $(XMLTO_OUTPUT)
+
+# diagram.png/diagram.svg aren't really HTML, but must go in the same
+# directory as the HTML to avoid broken links
+STATIC_HTML = \
+ diagram.png \
+ diagram.svg \
+ $(NULL)
+
XMLTO_OUTPUT = \
dbus-faq.html \
dbus-specification.html \
@@ -706,8 +721,8 @@ uninstall-man: uninstall-man1
@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@ rm -f $(DESTDIR)$(htmldir)/*.png
+@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rm -f $(DESTDIR)$(htmldir)/*.svg
@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rmdir --ignore-fail-on-non-empty $(DESTDIR)$(apidir) || \
@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ rmdir $(DESTDIR)$(apidir)
@@ -715,23 +730,25 @@ uninstall-man: uninstall-man1
@DBUS_HAVE_MAN2HTML_TRUE@ $(AM_V_GEN)( $(MAN2HTML) $< > $@.tmp && mv $@.tmp $@ )
@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 $(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
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)rm -rf $@ $@.tmp
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_GEN)$(MKDIR_P) $@.tmp/api
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cd $(srcdir) && cp $(STATIC_DOCS) @abs_builddir@/$@.tmp
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cd $(srcdir) && cp $(dist_doc_DATA) @abs_builddir@/$@.tmp
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cd $(srcdir) && cp $(STATIC_HTML) @abs_builddir@/$@.tmp
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(XMLTO_OUTPUT) @abs_builddir@/$@.tmp
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(MAN_HTML_FILES) @abs_builddir@/$@.tmp
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(BONUS_FILES) @abs_builddir@/$@.tmp
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp -r api/html @abs_builddir@/$@.tmp/api
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)mv $@.tmp $@
@DBUS_CAN_UPLOAD_DOCS_TRUE@dbus-docs.tar.gz: dbus-docs
@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_GEN)tar czf $@ $<
@DBUS_CAN_UPLOAD_DOCS_TRUE@maintainer-upload-docs: dbus-docs.tar.gz dbus-docs
-@DBUS_CAN_UPLOAD_DOCS_TRUE@ scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR)
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR)/
@DBUS_CAN_UPLOAD_DOCS_TRUE@ rsync -rpvzP --chmod=Dg+s,ug+rwX,o=rX \
@DBUS_CAN_UPLOAD_DOCS_TRUE@ dbus-docs/ $(DOC_SERVER):$(DOC_WWW_DIR)/doc/
-@DBUS_CAN_UPLOAD_DOCS_TRUE@ scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)
+@DBUS_CAN_UPLOAD_DOCS_TRUE@ cd $(srcdir) && scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)/
@DBUS_CAN_UPLOAD_DOCS_FALSE@maintainer-upload-docs:
@DBUS_CAN_UPLOAD_DOCS_FALSE@ @echo "Can't upload documentation! Re-run configure with"
@DBUS_CAN_UPLOAD_DOCS_FALSE@ @echo " --enable-doxygen-docs --enable-xml-docs"
@@ -741,7 +758,7 @@ uninstall-man: uninstall-man1
clean-local:
rm -f $(html_DATA)
rm -rf api
- rm -rf dbus-docs
+ rm -rf dbus-docs dbus-docs.tmp
rm -f *.1.html
rm -f doxygen.stamp
diff --git a/doc/dbus-faq.html b/doc/dbus-faq.html
index 10d48443..6da2a644 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">&lt;<a class="email" href="mailto:hp@pobox.com">hp@pobox.com</a>&gt;</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="#idp480240">
+   </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="#idp441232">
What is D-Bus?
- </a></dt><dt>2. <a href="#idp3774672">
+ </a></dt><dt>2. <a href="#idp3735712">
Is D-Bus stable/finished?
- </a></dt><dt>3. <a href="#idp3777840">
+ </a></dt><dt>3. <a href="#idp3738880">
How is the reference implementation licensed? Can I use it in
proprietary applications?
- </a></dt><dt>4. <a href="#idp80544">
+ </a></dt><dt>4. <a href="#idp41648">
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="#idp4882048">
+ </a></dt><dt>19. <a href="#idp4843728">
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="idp480240"></a><a name="idp480496"></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="idp441232"></a><a name="idp441488"></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="idp3774672"></a><a name="idp3774928"></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="idp3735712"></a><a name="idp3735968"></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="idp3777840"></a><a name="idp3778096"></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="idp3738880"></a><a name="idp3739136"></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="idp80544"></a><a name="idp80800"></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="idp41648"></a><a name="idp41904"></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>
@@ -107,7 +107,7 @@
interfaces, such as <code class="literal">org.freedesktop.DBus.Introspectable</code>,
<code class="literal">org.freedesktop.BasicTextField</code>,
<code class="literal">org.kde.RichTextDocument</code>.
- </p></td></tr><tr class="question" title="5."><td align="left" valign="top"><a name="service"></a><a name="idp97424"></a><p><b>5.</b></p></td><td align="left" valign="top"><p>
+ </p></td></tr><tr class="question" title="5."><td align="left" valign="top"><a name="service"></a><a name="idp59776"></a><p><b>5.</b></p></td><td align="left" valign="top"><p>
What is a "service"?
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
A service is a program that can be launched by the bus daemon
@@ -120,7 +120,7 @@
In the D-Bus docs we try to use "service" only when talking about
programs the bus knows how to launch, i.e. a service always has a
.service file.
- </p></td></tr><tr class="question" title="6."><td align="left" valign="top"><a name="components"></a><a name="idp100640"></a><p><b>6.</b></p></td><td align="left" valign="top"><p>
+ </p></td></tr><tr class="question" title="6."><td align="left" valign="top"><a name="components"></a><a name="idp62992"></a><p><b>6.</b></p></td><td align="left" valign="top"><p>
Is D-Bus a "component system"?
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
It helps to keep these concepts separate in your mind:
@@ -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="idp113280"></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="idp75536"></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="idp4796832"></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="idp4758512"></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="idp4799792"></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="idp4761472"></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="idp4808320"></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="idp4770000"></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>.
@@ -292,7 +292,7 @@
</p><p>
On a more trivial note, D-Bus involves substantially fewer acronyms
than CORBA.
- </p></td></tr><tr class="question" title="11."><td align="left" valign="top"><a name="xmlrpcsoap"></a><a name="idp49472"></a><p><b>11.</b></p></td><td align="left" valign="top"><p>
+ </p></td></tr><tr class="question" title="11."><td align="left" valign="top"><a name="xmlrpcsoap"></a><a name="idp13360"></a><p><b>11.</b></p></td><td align="left" valign="top"><p>
How does D-Bus differ from XML-RPC and SOAP?
</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="idp4847408"></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="idp4809088"></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="idp4852208"></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="idp4813888"></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="idp4856480"></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="idp4818160"></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="idp4860496"></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="idp4822176"></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="idp4865120"></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="idp4826800"></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="idp4872112"></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="idp4833792"></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="idp4876048"></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="idp4837728"></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="idp4882048"></a><a name="idp4882304"></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="idp4843728"></a><a name="idp4843984"></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-specification.html b/doc/dbus-specification.html
index d2e988c0..0a3fc4c1 100644
--- a/doc/dbus-specification.html
+++ b/doc/dbus-specification.html
@@ -10,10 +10,10 @@
            <code class="email">&lt;<a class="email" href="mailto:simon.mcvittie@collabora.co.uk">simon.mcvittie@collabora.co.uk</a>&gt;</code><br>
          </p></div></div></div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="surname">Zeuthen</span></h3><div class="affiliation"><span class="orgname">Red Hat, Inc.<br></span><div class="address"><p><br>
            <code class="email">&lt;<a class="email" href="mailto:davidz@redhat.com">davidz@redhat.com</a>&gt;</code><br>
-          </p></div></div></div></div></div><div><p class="releaseinfo">Version 0.17</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.18</td><td align="left">29 July 2011</td><td align="left">smcv</td></tr><tr><td align="left" colspan="3">define eavesdropping, unicast, broadcast; add eavesdrop
+          </p></div></div></div></div></div><div><p class="releaseinfo">Version 0.19</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.18</td><td align="left">29 July 2011</td><td align="left">smcv</td></tr><tr><td align="left" colspan="3">define eavesdropping, unicast, broadcast; add eavesdrop
match keyword; promote type system to a top-level section</td></tr><tr><td align="left">Revision 0.17</td><td align="left">1 June 2011</td><td align="left">smcv/davidz</td></tr><tr><td align="left" colspan="3">define ObjectManager; reserve extra pseudo-type-codes used
by GVariant</td></tr><tr><td align="left">Revision 0.16</td><td align="left">11 April 2011</td><td align="left"></td></tr><tr><td align="left" colspan="3">add path_namespace, arg0namespace; argNpath matches object
- paths</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="#type-system">Type System</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></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-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><dt><span class="sect2"><a href="#standard-interfaces-objectmanager"><code class="literal">org.freedesktop.DBus.ObjectManager</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="#idp5877344">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>
+ paths</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="#type-system">Type System</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></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-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><dt><span class="sect2"><a href="#standard-interfaces-objectmanager"><code class="literal">org.freedesktop.DBus.ObjectManager</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="#idp5877264">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>
@@ -928,14 +928,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="idp5183376"></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="idp5183392"></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="idp5185200"></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="idp5185216"></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
@@ -944,14 +944,14 @@
S: OK 1234deadbeef
C: BEGIN
</pre></div></div><p><br class="figure-break">
- </p><div class="figure"><a name="idp5187104"></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="idp5187120"></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="idp5188992"></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="idp5189008"></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
@@ -960,7 +960,7 @@
S: OK 1234deadbeef
C: BEGIN
</pre></div></div><p><br class="figure-break">
- </p><div class="figure"><a name="idp5191008"></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="idp5191024"></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
@@ -973,7 +973,7 @@
S: OK 1234deadbeef
C: BEGIN
</pre></div></div><p><br class="figure-break">
- </p><div class="figure"><a name="idp5193184"></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="idp5193200"></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
@@ -986,7 +986,7 @@
S: OK 1234deadbeef
C: BEGIN
</pre></div></div><p><br class="figure-break">
- </p><div class="figure"><a name="idp5195248"></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="idp5195264"></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
@@ -995,7 +995,7 @@
S: AGREE_UNIX_FD
C: BEGIN
</pre></div></div><p><br class="figure-break">
- </p><div class="figure"><a name="idp5197248"></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="idp5197264"></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
@@ -1273,7 +1273,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="idp5282704" href="#ftn.idp5282704" class="footnote">1</a>]</sup>
+ lock. <sup>[<a name="idp5282624" href="#ftn.idp5282624" 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
@@ -2280,7 +2280,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="idp5653952"></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="idp5653872"></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;
@@ -2450,7 +2450,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="idp5706720"></a></h5></div></div></div><p>
+ </p></div><div class="sect4"><div class="titlepage"><div><div><h5 class="title"><a name="idp5706640"></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]
@@ -2465,7 +2465,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="idp5711744" href="#ftn.idp5711744" class="footnote">2</a>]</sup>
+ <sup>[<a name="idp5711664" href="#ftn.idp5711664" 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>
@@ -2650,7 +2650,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 &#8220;<code class="literal">org.freedesktop.DBus.Peer</code>&#8221;</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="idp5877344"></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="idp5877264"></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
@@ -2724,10 +2724,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.idp5282704" href="#idp5282704" 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.idp5282624" href="#idp5282624" 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.idp5711744" href="#idp5711744" class="para">2</a>] </sup>
+ filesystems.</p></div><div class="footnote"><p><sup>[<a name="ftn.idp5711664" href="#idp5711664" 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-specification.xml b/doc/dbus-specification.xml
index 282fb3b0..7280cf17 100644
--- a/doc/dbus-specification.xml
+++ b/doc/dbus-specification.xml
@@ -6,8 +6,8 @@
<article id="index">
<articleinfo>
<title>D-Bus Specification</title>
- <releaseinfo>Version 0.17</releaseinfo>
- <date>2011-06-01</date>
+ <releaseinfo>Version 0.19</releaseinfo>
+ <date>UNRELEASED</date>
<authorgroup>
<author>
<firstname>Havoc</firstname>
diff --git a/doc/dbus-test-plan.html b/doc/dbus-test-plan.html
index 44991af2..34003259 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="idp24477888"></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="idp24476768"></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="idp24484576"></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="idp24483456"></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/ltmain.sh b/ltmain.sh
index 6f650ae8..c7bf234f 100755
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -69,7 +69,7 @@
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.4 Debian-2.4-2
+# $progname: (GNU libtool) 2.4 Debian-2.4-4
# automake: $automake_version
# autoconf: $autoconf_version
#
@@ -79,7 +79,7 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION="2.4 Debian-2.4-2"
+VERSION="2.4 Debian-2.4-4"
TIMESTAMP=""
package_revision=1.3293
diff --git a/test/Makefile.am b/test/Makefile.am
index 7adb8233..d69e7835 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -13,6 +13,13 @@ AM_CPPFLAGS = \
# improve backtraces from test stuff
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
+static_cppflags = \
+ $(AM_CPPFLAGS) \
+ -DDBUS_STATIC_BUILD \
+ $(NULL)
+
+libdbus_testutils_la_CPPFLAGS = \
+ $(static_cppflags)
libdbus_testutils_la_SOURCES = \
test-utils.c \
test-utils.h \
@@ -65,11 +72,6 @@ endif !DBUS_BUILD_TESTS
noinst_PROGRAMS= $(TEST_BINARIES)
-static_cppflags = \
- $(AM_CPPFLAGS) \
- -DDBUS_STATIC_BUILD \
- $(NULL)
-
test_service_CPPFLAGS = $(static_cppflags)
test_service_LDADD = libdbus-testutils.la
test_names_CPPFLAGS = $(static_cppflags)
@@ -83,6 +85,14 @@ shell_test_LDADD = libdbus-testutils.la
spawn_test_CPPFLAGS = $(static_cppflags)
spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+test_refs_SOURCES = internals/refs.c
+test_refs_CPPFLAGS = $(static_cppflags)
+test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+
+test_syslog_SOURCES = internals/syslog.c
+test_syslog_CPPFLAGS = $(static_cppflags)
+test_syslog_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+
EXTRA_DIST = dbus-test-runner
testexecdir = $(libdir)/dbus-1.0/test
@@ -95,7 +105,9 @@ installable_tests = \
test-dbus-daemon-eavesdrop \
test-loopback \
test-marshal \
+ test-refs \
test-relay \
+ test-syslog \
$(NULL)
installcheck_tests =
@@ -251,6 +263,8 @@ clean-local:
REVERSEDIRS="$$D $$REVERSEDIRS" ; \
done ; \
for D in $$REVERSEDIRS; do \
- rmdir $(top_builddir)/test/$$D || exit 1 ; \
+ rmdir $(top_builddir)/test/$$D || \
+ test ! -d $(top_builddir)/test/$$D || \
+ exit 1 ; \
done ; \
fi
diff --git a/test/Makefile.in b/test/Makefile.in
index 76c547a6..57ef02de 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -67,7 +67,7 @@ CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libdbus_testutils_la_DEPENDENCIES = \
$(top_builddir)/dbus/libdbus-internal.la
-am_libdbus_testutils_la_OBJECTS = test-utils.lo
+am_libdbus_testutils_la_OBJECTS = libdbus_testutils_la-test-utils.lo
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))
@@ -81,7 +81,8 @@ am__v_lt_0 = --silent
@DBUS_BUILD_TESTS_TRUE@ test-sleep-forever$(EXEEXT)
am__EXEEXT_2 = test-corrupt$(EXEEXT) test-dbus-daemon$(EXEEXT) \
test-dbus-daemon-eavesdrop$(EXEEXT) test-loopback$(EXEEXT) \
- test-marshal$(EXEEXT) test-relay$(EXEEXT)
+ test-marshal$(EXEEXT) test-refs$(EXEEXT) test-relay$(EXEEXT) \
+ test-syslog$(EXEEXT)
@DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_3 = $(am__EXEEXT_2)
@DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_4 = $(am__EXEEXT_2)
am__installdirs = "$(DESTDIR)$(testexecdir)"
@@ -126,6 +127,9 @@ test_marshal_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la \
test_names_SOURCES = test-names.c
test_names_OBJECTS = test_names-test-names.$(OBJEXT)
test_names_DEPENDENCIES = libdbus-testutils.la
+am_test_refs_OBJECTS = test_refs-refs.$(OBJEXT)
+test_refs_OBJECTS = $(am_test_refs_OBJECTS)
+test_refs_DEPENDENCIES = libdbus-testutils.la $(am__DEPENDENCIES_1)
am_test_relay_OBJECTS = relay.$(OBJEXT)
test_relay_OBJECTS = $(am_test_relay_OBJECTS)
test_relay_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la \
@@ -143,6 +147,9 @@ test_shell_service_DEPENDENCIES = libdbus-testutils.la
test_sleep_forever_SOURCES = test-sleep-forever.c
test_sleep_forever_OBJECTS = test-sleep-forever.$(OBJEXT)
test_sleep_forever_LDADD = $(LDADD)
+am_test_syslog_OBJECTS = test_syslog-syslog.$(OBJEXT)
+test_syslog_OBJECTS = $(am_test_syslog_OBJECTS)
+test_syslog_DEPENDENCIES = libdbus-testutils.la $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -173,15 +180,17 @@ SOURCES = $(libdbus_testutils_la_SOURCES) shell-test.c spawn-test.c \
$(test_corrupt_SOURCES) $(test_dbus_daemon_SOURCES) \
$(test_dbus_daemon_eavesdrop_SOURCES) test-exit.c \
$(test_loopback_SOURCES) $(test_marshal_SOURCES) test-names.c \
- $(test_relay_SOURCES) test-segfault.c test-service.c \
- test-shell-service.c test-sleep-forever.c
+ $(test_refs_SOURCES) $(test_relay_SOURCES) test-segfault.c \
+ test-service.c test-shell-service.c test-sleep-forever.c \
+ $(test_syslog_SOURCES)
DIST_SOURCES = $(libdbus_testutils_la_SOURCES) shell-test.c \
spawn-test.c $(test_corrupt_SOURCES) \
$(test_dbus_daemon_SOURCES) \
$(test_dbus_daemon_eavesdrop_SOURCES) test-exit.c \
$(test_loopback_SOURCES) $(test_marshal_SOURCES) test-names.c \
- $(test_relay_SOURCES) test-segfault.c test-service.c \
- test-shell-service.c test-sleep-forever.c
+ $(test_refs_SOURCES) $(test_relay_SOURCES) test-segfault.c \
+ test-service.c test-shell-service.c test-sleep-forever.c \
+ $(test_syslog_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
@@ -339,6 +348,11 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
@@ -414,9 +428,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -437,6 +455,14 @@ AM_CPPFLAGS = \
# improve backtraces from test stuff
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
+static_cppflags = \
+ $(AM_CPPFLAGS) \
+ -DDBUS_STATIC_BUILD \
+ $(NULL)
+
+libdbus_testutils_la_CPPFLAGS = \
+ $(static_cppflags)
+
libdbus_testutils_la_SOURCES = \
test-utils.c \
test-utils.h \
@@ -459,11 +485,6 @@ noinst_LTLIBRARIES = libdbus-testutils.la
@DBUS_BUILD_TESTS_TRUE@ test-sleep-forever \
@DBUS_BUILD_TESTS_TRUE@ $(NULL)
-static_cppflags = \
- $(AM_CPPFLAGS) \
- -DDBUS_STATIC_BUILD \
- $(NULL)
-
test_service_CPPFLAGS = $(static_cppflags)
test_service_LDADD = libdbus-testutils.la
test_names_CPPFLAGS = $(static_cppflags)
@@ -474,6 +495,12 @@ shell_test_CPPFLAGS = $(static_cppflags)
shell_test_LDADD = libdbus-testutils.la
spawn_test_CPPFLAGS = $(static_cppflags)
spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+test_refs_SOURCES = internals/refs.c
+test_refs_CPPFLAGS = $(static_cppflags)
+test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+test_syslog_SOURCES = internals/syslog.c
+test_syslog_CPPFLAGS = $(static_cppflags)
+test_syslog_LDADD = libdbus-testutils.la $(GLIB_LIBS)
EXTRA_DIST = dbus-test-runner
testexecdir = $(libdir)/dbus-1.0/test
installable_tests = \
@@ -482,7 +509,9 @@ installable_tests = \
test-dbus-daemon-eavesdrop \
test-loopback \
test-marshal \
+ test-refs \
test-relay \
+ test-syslog \
$(NULL)
installcheck_tests = $(am__append_3)
@@ -678,6 +707,9 @@ test-marshal$(EXEEXT): $(test_marshal_OBJECTS) $(test_marshal_DEPENDENCIES)
test-names$(EXEEXT): $(test_names_OBJECTS) $(test_names_DEPENDENCIES)
@rm -f test-names$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_names_OBJECTS) $(test_names_LDADD) $(LIBS)
+test-refs$(EXEEXT): $(test_refs_OBJECTS) $(test_refs_DEPENDENCIES)
+ @rm -f test-refs$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_refs_OBJECTS) $(test_refs_LDADD) $(LIBS)
test-relay$(EXEEXT): $(test_relay_OBJECTS) $(test_relay_DEPENDENCIES)
@rm -f test-relay$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_relay_OBJECTS) $(test_relay_LDADD) $(LIBS)
@@ -693,6 +725,9 @@ test-shell-service$(EXEEXT): $(test_shell_service_OBJECTS) $(test_shell_service_
test-sleep-forever$(EXEEXT): $(test_sleep_forever_OBJECTS) $(test_sleep_forever_DEPENDENCIES)
@rm -f test-sleep-forever$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_sleep_forever_OBJECTS) $(test_sleep_forever_LDADD) $(LIBS)
+test-syslog$(EXEEXT): $(test_syslog_OBJECTS) $(test_syslog_DEPENDENCIES)
+ @rm -f test-syslog$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_syslog_OBJECTS) $(test_syslog_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -702,6 +737,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corrupt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-daemon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_testutils_la-test-utils.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loopback.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marshal.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relay.Po@am__quote@
@@ -710,11 +746,12 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-exit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-segfault.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sleep-forever.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-utils.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dbus_daemon_eavesdrop-dbus-daemon-eavesdrop.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_names-test-names.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_refs-refs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_service-test-service.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_shell_service-test-shell-service.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_syslog-syslog.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -740,6 +777,14 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+libdbus_testutils_la-test-utils.lo: test-utils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_testutils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_testutils_la-test-utils.lo -MD -MP -MF $(DEPDIR)/libdbus_testutils_la-test-utils.Tpo -c -o libdbus_testutils_la-test-utils.lo `test -f 'test-utils.c' || echo '$(srcdir)/'`test-utils.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_testutils_la-test-utils.Tpo $(DEPDIR)/libdbus_testutils_la-test-utils.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-utils.c' object='libdbus_testutils_la-test-utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_testutils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_testutils_la-test-utils.lo `test -f 'test-utils.c' || echo '$(srcdir)/'`test-utils.c
+
shell_test-shell-test.o: shell-test.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(shell_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shell_test-shell-test.o -MD -MP -MF $(DEPDIR)/shell_test-shell-test.Tpo -c -o shell_test-shell-test.o `test -f 'shell-test.c' || echo '$(srcdir)/'`shell-test.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shell_test-shell-test.Tpo $(DEPDIR)/shell_test-shell-test.Po
@@ -804,6 +849,22 @@ test_names-test-names.obj: test-names.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_names_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_names-test-names.obj `if test -f 'test-names.c'; then $(CYGPATH_W) 'test-names.c'; else $(CYGPATH_W) '$(srcdir)/test-names.c'; fi`
+test_refs-refs.o: internals/refs.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_refs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_refs-refs.o -MD -MP -MF $(DEPDIR)/test_refs-refs.Tpo -c -o test_refs-refs.o `test -f 'internals/refs.c' || echo '$(srcdir)/'`internals/refs.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refs-refs.Tpo $(DEPDIR)/test_refs-refs.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='internals/refs.c' object='test_refs-refs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_refs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_refs-refs.o `test -f 'internals/refs.c' || echo '$(srcdir)/'`internals/refs.c
+
+test_refs-refs.obj: internals/refs.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_refs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_refs-refs.obj -MD -MP -MF $(DEPDIR)/test_refs-refs.Tpo -c -o test_refs-refs.obj `if test -f 'internals/refs.c'; then $(CYGPATH_W) 'internals/refs.c'; else $(CYGPATH_W) '$(srcdir)/internals/refs.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refs-refs.Tpo $(DEPDIR)/test_refs-refs.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='internals/refs.c' object='test_refs-refs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_refs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_refs-refs.obj `if test -f 'internals/refs.c'; then $(CYGPATH_W) 'internals/refs.c'; else $(CYGPATH_W) '$(srcdir)/internals/refs.c'; fi`
+
test_service-test-service.o: test-service.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_service_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_service-test-service.o -MD -MP -MF $(DEPDIR)/test_service-test-service.Tpo -c -o test_service-test-service.o `test -f 'test-service.c' || echo '$(srcdir)/'`test-service.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_service-test-service.Tpo $(DEPDIR)/test_service-test-service.Po
@@ -836,6 +897,22 @@ test_shell_service-test-shell-service.obj: test-shell-service.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_service_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_shell_service-test-shell-service.obj `if test -f 'test-shell-service.c'; then $(CYGPATH_W) 'test-shell-service.c'; else $(CYGPATH_W) '$(srcdir)/test-shell-service.c'; fi`
+test_syslog-syslog.o: internals/syslog.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_syslog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_syslog-syslog.o -MD -MP -MF $(DEPDIR)/test_syslog-syslog.Tpo -c -o test_syslog-syslog.o `test -f 'internals/syslog.c' || echo '$(srcdir)/'`internals/syslog.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_syslog-syslog.Tpo $(DEPDIR)/test_syslog-syslog.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='internals/syslog.c' object='test_syslog-syslog.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_syslog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_syslog-syslog.o `test -f 'internals/syslog.c' || echo '$(srcdir)/'`internals/syslog.c
+
+test_syslog-syslog.obj: internals/syslog.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_syslog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_syslog-syslog.obj -MD -MP -MF $(DEPDIR)/test_syslog-syslog.Tpo -c -o test_syslog-syslog.obj `if test -f 'internals/syslog.c'; then $(CYGPATH_W) 'internals/syslog.c'; else $(CYGPATH_W) '$(srcdir)/internals/syslog.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_syslog-syslog.Tpo $(DEPDIR)/test_syslog-syslog.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='internals/syslog.c' object='test_syslog-syslog.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_syslog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_syslog-syslog.obj `if test -f 'internals/syslog.c'; then $(CYGPATH_W) 'internals/syslog.c'; else $(CYGPATH_W) '$(srcdir)/internals/syslog.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -1323,7 +1400,9 @@ clean-local:
REVERSEDIRS="$$D $$REVERSEDIRS" ; \
done ; \
for D in $$REVERSEDIRS; do \
- rmdir $(top_builddir)/test/$$D || exit 1 ; \
+ rmdir $(top_builddir)/test/$$D || \
+ test ! -d $(top_builddir)/test/$$D || \
+ exit 1 ; \
done ; \
fi
diff --git a/test/data/valid-config-files/session.conf b/test/data/valid-config-files/session.conf
deleted file mode 100644
index dde5ef6b..00000000
--- a/test/data/valid-config-files/session.conf
+++ /dev/null
@@ -1,63 +0,0 @@
-<!-- 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
deleted file mode 100644
index 828fd032..00000000
--- a/test/data/valid-config-files/system.conf
+++ /dev/null
@@ -1,83 +0,0 @@
-<!-- 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/test/dbus-daemon-eavesdrop.c b/test/dbus-daemon-eavesdrop.c
index 6819ec13..0bd923d2 100644
--- a/test/dbus-daemon-eavesdrop.c
+++ b/test/dbus-daemon-eavesdrop.c
@@ -35,6 +35,7 @@
#include <string.h>
#ifdef DBUS_WIN
+# include <io.h>
# include <windows.h>
#else
# include <signal.h>
@@ -73,7 +74,7 @@ typedef struct {
DBusError e;
GError *ge;
- gint daemon_pid;
+ GPid daemon_pid;
/* eavedrop keyword tests */
DBusConnection *sender;
@@ -102,7 +103,7 @@ _assert_no_error (const DBusError *e,
static gchar *
spawn_dbus_daemon (gchar *binary,
gchar *configuration,
- gint *daemon_pid)
+ GPid *daemon_pid)
{
GError *error = NULL;
GString *address;
@@ -183,7 +184,6 @@ connect_to_bus (const gchar *address)
static DBusHandlerResult
sender_send_unicast_to_sender (Fixture *f)
{
- DBusError error = DBUS_ERROR_INIT;
DBusMessage *signal;
signal = dbus_message_new_signal (SENDER_PATH, SENDER_IFACE,
@@ -206,7 +206,6 @@ sender_send_unicast_to_sender (Fixture *f)
static DBusHandlerResult
sender_send_unicast_to_receiver (Fixture *f)
{
- DBusError error = DBUS_ERROR_INIT;
DBusMessage *signal;
signal = dbus_message_new_signal (SENDER_PATH, SENDER_IFACE, SENDER_SIGNAL_NAME);
@@ -226,7 +225,6 @@ sender_send_unicast_to_receiver (Fixture *f)
static DBusHandlerResult
sender_send_broadcast (Fixture *f)
{
- DBusError error = DBUS_ERROR_INIT;
DBusMessage *signal;
signal = dbus_message_new_signal (SENDER_PATH, SENDER_IFACE, SENDER_SIGNAL_NAME);
@@ -251,7 +249,6 @@ sender_send_broadcast (Fixture *f)
static DBusHandlerResult
sender_send_stopper (Fixture *f)
{
- DBusError error = DBUS_ERROR_INIT;
DBusMessage *signal;
signal = dbus_message_new_signal (SENDER_PATH, SENDER_IFACE, SENDER_STOPPER_NAME);
diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c
index c190cb43..cc871530 100644
--- a/test/dbus-daemon.c
+++ b/test/dbus-daemon.c
@@ -34,6 +34,7 @@
#include <string.h>
#ifdef DBUS_WIN
+# include <io.h>
# include <windows.h>
#else
# include <signal.h>
@@ -46,7 +47,7 @@ typedef struct {
DBusError e;
GError *ge;
- gint daemon_pid;
+ GPid daemon_pid;
DBusConnection *left_conn;
@@ -68,7 +69,7 @@ _assert_no_error (const DBusError *e,
static gchar *
spawn_dbus_daemon (gchar *binary,
gchar *configuration,
- gint *daemon_pid)
+ GPid *daemon_pid)
{
GError *error = NULL;
GString *address;
@@ -150,8 +151,6 @@ echo_filter (DBusConnection *connection,
void *user_data)
{
DBusMessage *reply;
- DBusError error = DBUS_ERROR_INIT;
- int *sleep_ms = user_data;
if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_CALL)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
diff --git a/test/internals/refs.c b/test/internals/refs.c
new file mode 100644
index 00000000..bc0884e3
--- /dev/null
+++ b/test/internals/refs.c
@@ -0,0 +1,612 @@
+/* Regression test for thread-safe reference-counting
+ *
+ * Author: Simon McVittie <simon.mcvittie@collabora.co.uk>
+ * Copyright © 2011 Nokia Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <config.h>
+
+#include <glib.h>
+
+#define DBUS_COMPILATION /* this test uses libdbus-internal */
+#include <dbus/dbus.h>
+#include <dbus/dbus-connection-internal.h>
+#include <dbus/dbus-mainloop.h>
+#include <dbus/dbus-message-internal.h>
+#include <dbus/dbus-pending-call-internal.h>
+#include <dbus/dbus-server-protected.h>
+#include "test-utils.h"
+
+static void
+assert_no_error (const DBusError *e)
+{
+ if (G_UNLIKELY (dbus_error_is_set (e)))
+ g_error ("expected success but got error: %s: %s", e->name, e->message);
+}
+
+#define N_THREADS 200
+#define N_REFS 10000
+G_STATIC_ASSERT (((unsigned) N_THREADS * (unsigned) N_REFS) < G_MAXINT32);
+
+static dbus_int32_t connection_slot = -1;
+static dbus_int32_t server_slot = -1;
+static dbus_int32_t message_slot = -1;
+static dbus_int32_t pending_call_slot = -1;
+
+typedef struct {
+ DBusError e;
+ DBusLoop *loop;
+ DBusServer *server;
+ DBusConnection *connection;
+ DBusConnection *server_connection;
+ DBusMessage *message;
+ GThread *threads[N_THREADS];
+ gboolean last_unref;
+} Fixture;
+
+typedef void *(*RefFunc) (void *);
+typedef void (*VoidFunc) (void *);
+
+typedef struct {
+ void *thing;
+ RefFunc ref;
+ VoidFunc ref_void;
+ VoidFunc unref;
+ void *mutex;
+ VoidFunc lock;
+ VoidFunc unlock;
+} Thread;
+
+static gpointer
+ref_thread (gpointer data)
+{
+ Thread *thread = data;
+ int i;
+
+ for (i = 0; i < N_REFS; i++)
+ {
+ if (thread->lock != NULL)
+ (thread->lock) (thread->mutex);
+
+ if (thread->ref != NULL)
+ {
+ gpointer ret = (thread->ref) (thread->thing);
+
+ g_assert (ret == thread->thing);
+ }
+ else
+ {
+ (thread->ref_void) (thread->thing);
+ }
+
+ if (thread->unlock != NULL)
+ (thread->unlock) (thread->mutex);
+ }
+
+ return NULL;
+}
+
+static gpointer
+cycle_thread (gpointer data)
+{
+ Thread *thread = data;
+ int i;
+
+ for (i = 0; i < N_REFS; i++)
+ {
+ if (thread->lock != NULL)
+ (thread->lock) (thread->mutex);
+
+ if (thread->ref != NULL)
+ {
+ gpointer ret = (thread->ref) (thread->thing);
+
+ g_assert (ret == thread->thing);
+ }
+ else
+ {
+ (thread->ref_void) (thread->thing);
+ }
+
+ (thread->unref) (thread->thing);
+
+ if (thread->unlock != NULL)
+ (thread->unlock) (thread->mutex);
+ }
+
+ return NULL;
+}
+
+static gpointer
+unref_thread (gpointer data)
+{
+ Thread *thread = data;
+ int i;
+
+ for (i = 0; i < N_REFS; i++)
+ {
+ if (thread->lock != NULL)
+ (thread->lock) (thread->mutex);
+
+ (thread->unref) (thread->thing);
+
+ if (thread->unlock != NULL)
+ (thread->unlock) (thread->mutex);
+ }
+
+ return NULL;
+}
+
+static void
+last_unref (void *data)
+{
+ Fixture *f = data;
+
+ g_assert (!f->last_unref);
+ f->last_unref = TRUE;
+}
+
+static void
+wait_for_all_threads (Fixture *f)
+{
+ int i;
+
+ for (i = 0; i < N_THREADS; i++)
+ g_thread_join (f->threads[i]);
+}
+
+static void
+new_conn_cb (DBusServer *server,
+ DBusConnection *server_connection,
+ void *data)
+{
+ Fixture *f = data;
+
+ g_assert (f->server_connection == NULL);
+ f->server_connection = dbus_connection_ref (server_connection);
+
+ test_connection_setup (f->loop, f->server_connection);
+}
+
+static void
+setup (Fixture *f,
+ gconstpointer data)
+{
+ if (!dbus_threads_init_default ())
+ g_error ("OOM");
+
+ f->loop = _dbus_loop_new ();
+ g_assert (f->loop != NULL);
+
+ dbus_error_init (&f->e);
+
+ f->server = dbus_server_listen ("tcp:host=127.0.0.1", &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->server != NULL);
+
+ if (!dbus_connection_allocate_data_slot (&connection_slot))
+ g_error ("OOM");
+
+ if (!dbus_server_allocate_data_slot (&server_slot))
+ g_error ("OOM");
+
+ if (!dbus_message_allocate_data_slot (&message_slot))
+ g_error ("OOM");
+
+ if (!dbus_pending_call_allocate_data_slot (&pending_call_slot))
+ g_error ("OOM");
+}
+
+static void
+setup_connection (Fixture *f,
+ gconstpointer data)
+{
+ char *address;
+
+ setup (f, data);
+
+ dbus_server_set_new_connection_function (f->server,
+ new_conn_cb, f, NULL);
+
+ if (!test_server_setup (f->loop, f->server))
+ g_error ("failed to set up server");
+
+ address = dbus_server_get_address (f->server);
+ g_assert (address != NULL);
+ f->connection = dbus_connection_open_private (address, &f->e);
+ assert_no_error (&f->e);
+ g_assert (f->connection != NULL);
+ dbus_free (address);
+
+ if (!test_connection_setup (f->loop, f->connection))
+ g_error ("failed to set up connection");
+
+ while (f->server_connection == NULL)
+ _dbus_loop_iterate (f->loop, TRUE);
+
+ test_connection_shutdown (f->loop, f->connection);
+ test_server_shutdown (f->loop, f->server);
+}
+
+static void
+test_connection (Fixture *f,
+ gconstpointer data)
+{
+ Thread public_api = { f->connection,
+ (RefFunc) dbus_connection_ref,
+ NULL,
+ (VoidFunc) dbus_connection_unref,
+ NULL,
+ NULL,
+ NULL };
+ Thread internal_api = { f->connection,
+ (RefFunc) _dbus_connection_ref_unlocked,
+ NULL,
+ (VoidFunc) _dbus_connection_unref_unlocked,
+ f->connection,
+ (VoidFunc) _dbus_connection_lock,
+ (VoidFunc) _dbus_connection_unlock };
+ int i;
+
+ /* Use a slot as a pseudo-weakref */
+ if (!dbus_connection_set_data (f->connection, connection_slot, f,
+ last_unref))
+ g_error ("OOM");
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ if ((i % 2) == 0)
+ f->threads[i] = g_thread_create (ref_thread, &public_api, TRUE, NULL);
+ else
+ f->threads[i] = g_thread_create (ref_thread, &internal_api, TRUE,
+ NULL);
+
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ if ((i % 2) == 0)
+ f->threads[i] = g_thread_create (cycle_thread, &public_api, TRUE,
+ NULL);
+ else
+ f->threads[i] = g_thread_create (cycle_thread, &internal_api, TRUE,
+ NULL);
+
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ if ((i % 2) == 0)
+ f->threads[i] = g_thread_create (unref_thread, &public_api, TRUE,
+ NULL);
+ else
+ f->threads[i] = g_thread_create (unref_thread, &internal_api, TRUE,
+ NULL);
+
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ /* Destroy the connection. This should be the last-unref. */
+ g_assert (!f->last_unref);
+ dbus_connection_close (f->connection);
+ dbus_connection_unref (f->connection);
+ f->connection = NULL;
+ g_assert (f->last_unref);
+}
+
+static void
+server_lock (void *server)
+{
+ SERVER_LOCK (((DBusServer *) server));
+}
+
+static void
+server_unlock (void *server)
+{
+ SERVER_UNLOCK (((DBusServer *) server));
+}
+
+static void
+test_server (Fixture *f,
+ gconstpointer data)
+{
+ Thread public_api = { f->server,
+ (RefFunc) dbus_server_ref,
+ NULL,
+ (VoidFunc) dbus_server_unref,
+ NULL,
+ NULL,
+ NULL };
+ Thread internal_api = { f->server,
+ NULL,
+ (VoidFunc) _dbus_server_ref_unlocked,
+ (VoidFunc) _dbus_server_unref_unlocked,
+ f->server,
+ server_lock,
+ server_unlock };
+ int i;
+
+ if (!dbus_server_set_data (f->server, server_slot, f, last_unref))
+ g_error ("OOM");
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ if ((i % 2) == 0)
+ f->threads[i] = g_thread_create (ref_thread, &public_api, TRUE, NULL);
+ else
+ f->threads[i] = g_thread_create (ref_thread, &internal_api, TRUE,
+ NULL);
+
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ if ((i % 2) == 0)
+ f->threads[i] = g_thread_create (cycle_thread, &public_api, TRUE,
+ NULL);
+ else
+ f->threads[i] = g_thread_create (cycle_thread, &internal_api, TRUE,
+ NULL);
+
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ if ((i % 2) == 0)
+ f->threads[i] = g_thread_create (unref_thread, &public_api, TRUE,
+ NULL);
+ else
+ f->threads[i] = g_thread_create (unref_thread, &internal_api, TRUE,
+ NULL);
+
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ /* Destroy the server. This should be the last-unref. */
+ g_assert (!f->last_unref);
+ dbus_server_disconnect (f->server);
+ dbus_server_unref (f->server);
+ f->server = NULL;
+ g_assert (f->last_unref);
+}
+
+static void
+test_message (Fixture *f,
+ gconstpointer data)
+{
+ DBusMessage *message = dbus_message_new_signal ("/foo", "foo.bar.baz",
+ "Foo");
+ Thread public_api = { message,
+ (RefFunc) dbus_message_ref,
+ NULL,
+ (VoidFunc) dbus_message_unref,
+ NULL,
+ NULL,
+ NULL };
+ int i;
+
+ if (!dbus_message_set_data (message, message_slot, f, last_unref))
+ g_error ("OOM");
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ f->threads[i] = g_thread_create (ref_thread, &public_api, TRUE, NULL);
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ f->threads[i] = g_thread_create (cycle_thread, &public_api, TRUE, NULL);
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ f->threads[i] = g_thread_create (unref_thread, &public_api, TRUE, NULL);
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ /* Destroy the server. This should be the last-unref. */
+ g_assert (!f->last_unref);
+ dbus_message_unref (message);
+ g_assert (f->last_unref);
+}
+
+static void
+test_pending_call (Fixture *f,
+ gconstpointer data)
+{
+ Thread public_api = { NULL,
+ (RefFunc) dbus_pending_call_ref,
+ NULL,
+ (VoidFunc) dbus_pending_call_unref,
+ NULL,
+ NULL,
+ NULL };
+ Thread internal_api = { NULL,
+ (RefFunc) _dbus_pending_call_ref_unlocked,
+ NULL,
+ (VoidFunc) dbus_pending_call_unref,
+ f->connection,
+ (VoidFunc) _dbus_connection_lock,
+ (VoidFunc) _dbus_connection_unlock };
+ /* This one can't be used to ref, only to cycle or unref. */
+ Thread unref_and_unlock_api = { NULL,
+ (RefFunc) _dbus_pending_call_ref_unlocked,
+ NULL,
+ (VoidFunc) _dbus_pending_call_unref_and_unlock,
+ f->connection,
+ (VoidFunc) _dbus_connection_lock,
+ NULL };
+ int i;
+ DBusPendingCall *pending_call;
+
+ _dbus_connection_lock (f->connection);
+ pending_call = _dbus_pending_call_new_unlocked (f->connection,
+ DBUS_TIMEOUT_INFINITE, NULL);
+ g_assert (pending_call != NULL);
+ _dbus_connection_unlock (f->connection);
+
+ public_api.thing = pending_call;
+ internal_api.thing = pending_call;
+ unref_and_unlock_api.thing = pending_call;
+
+ if (!dbus_pending_call_set_data (pending_call, pending_call_slot, f,
+ last_unref))
+ g_error ("OOM");
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ if ((i % 2) == 0)
+ f->threads[i] = g_thread_create (ref_thread, &public_api, TRUE, NULL);
+ else
+ f->threads[i] = g_thread_create (ref_thread, &internal_api, TRUE,
+ NULL);
+
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ switch (i % 3)
+ {
+ case 0:
+ f->threads[i] = g_thread_create (cycle_thread, &public_api, TRUE,
+ NULL);
+ break;
+ case 1:
+ f->threads[i] = g_thread_create (cycle_thread, &internal_api, TRUE,
+ NULL);
+ break;
+ default:
+ f->threads[i] = g_thread_create (cycle_thread,
+ &unref_and_unlock_api, TRUE, NULL);
+ }
+
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ for (i = 0; i < N_THREADS; i++)
+ {
+ switch (i % 3)
+ {
+ case 0:
+ f->threads[i] = g_thread_create (unref_thread, &public_api, TRUE,
+ NULL);
+ break;
+ case 1:
+ f->threads[i] = g_thread_create (unref_thread, &internal_api, TRUE,
+ NULL);
+ break;
+ default:
+ f->threads[i] = g_thread_create (unref_thread,
+ &unref_and_unlock_api, TRUE, NULL);
+ }
+
+ g_assert (f->threads[i] != NULL);
+ }
+
+ wait_for_all_threads (f);
+
+ /* Destroy the pending call. This should be the last-unref. */
+ g_assert (!f->last_unref);
+ dbus_pending_call_unref (pending_call);
+ g_assert (f->last_unref);
+}
+
+static void
+teardown (Fixture *f,
+ gconstpointer data)
+{
+ if (f->server_connection != NULL)
+ {
+ dbus_connection_close (f->server_connection);
+ dbus_connection_unref (f->server_connection);
+ }
+
+ if (f->connection != NULL)
+ {
+ dbus_connection_close (f->connection);
+ dbus_connection_unref (f->connection);
+ }
+
+ if (f->server != NULL)
+ {
+ dbus_server_disconnect (f->server);
+ dbus_server_unref (f->server);
+ }
+
+ dbus_connection_free_data_slot (&connection_slot);
+ dbus_server_free_data_slot (&server_slot);
+ dbus_message_free_data_slot (&message_slot);
+ dbus_pending_call_free_data_slot (&pending_call_slot);
+
+ _dbus_loop_unref (f->loop);
+ dbus_error_free (&f->e);
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ g_thread_init (NULL);
+ g_test_init (&argc, &argv, NULL);
+ g_test_bug_base ("https://bugs.freedesktop.org/show_bug.cgi?id=");
+
+ g_test_add ("/refs/connection", Fixture, NULL, setup_connection,
+ test_connection, teardown);
+ g_test_add ("/refs/message", Fixture, NULL, setup,
+ test_message, teardown);
+ g_test_add ("/refs/pending-call", Fixture, NULL, setup_connection,
+ test_pending_call, teardown);
+ g_test_add ("/refs/server", Fixture, NULL, setup,
+ test_server, teardown);
+
+ return g_test_run ();
+}
diff --git a/test/internals/syslog.c b/test/internals/syslog.c
new file mode 100644
index 00000000..4f6b7c22
--- /dev/null
+++ b/test/internals/syslog.c
@@ -0,0 +1,100 @@
+/* Manual regression test for syslog support
+ *
+ * Author: Simon McVittie <simon.mcvittie@collabora.co.uk>
+ * Copyright © 2011 Nokia Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include <glib.h>
+
+#define DBUS_COMPILATION /* this test uses libdbus-internal */
+#include <dbus/dbus.h>
+#include <dbus/dbus-sysdeps.h>
+
+typedef struct {
+ int dummy;
+} Fixture;
+
+static void
+setup (Fixture *f,
+ gconstpointer data)
+{
+}
+
+/* hopefully clear enough that people don't think these messages in syslog
+ * are a bug */
+#define MESSAGE "regression test for _dbus_system_log(): "
+
+static void
+test_syslog (Fixture *f,
+ gconstpointer data)
+{
+ if (g_test_trap_fork (0, 0))
+ {
+ _dbus_init_system_log ();
+ _dbus_system_log (DBUS_SYSTEM_LOG_FATAL, MESSAGE "%d", 23);
+ /* should not be reached: exit 0 so the assertion in the main process
+ * will fail */
+ exit (0);
+ }
+
+ g_test_trap_assert_failed ();
+ g_test_trap_assert_stderr ("*" MESSAGE "23\n*");
+
+ if (g_test_trap_fork (0, 0))
+ {
+ _dbus_init_system_log ();
+ _dbus_system_log (DBUS_SYSTEM_LOG_INFO, MESSAGE "%d", 42);
+ _dbus_system_log (DBUS_SYSTEM_LOG_SECURITY, MESSAGE "%d", 666);
+ exit (0);
+ }
+
+ g_test_trap_assert_passed ();
+ g_test_trap_assert_stderr ("*" MESSAGE "42\n*" MESSAGE "666\n*");
+
+ /* manual test (this is the best we can do on Windows) */
+ _dbus_init_system_log ();
+ _dbus_system_log (DBUS_SYSTEM_LOG_INFO, MESSAGE "%d", 42);
+ _dbus_system_log (DBUS_SYSTEM_LOG_SECURITY, MESSAGE "%d", 666);
+}
+
+static void
+teardown (Fixture *f,
+ gconstpointer data)
+{
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ g_test_init (&argc, &argv, NULL);
+ g_test_bug_base ("https://bugs.freedesktop.org/show_bug.cgi?id=");
+
+ g_test_add ("/syslog", Fixture, NULL, setup, test_syslog, teardown);
+
+ return g_test_run ();
+}
diff --git a/test/marshal.c b/test/marshal.c
index 4cee9412..e9ac7e30 100644
--- a/test/marshal.c
+++ b/test/marshal.c
@@ -146,7 +146,6 @@ test_endian (Fixture *f,
gconstpointer arg)
{
const gchar *blob = arg;
- const gchar *native_blob;
char *output;
DBusMessage *m;
int len;
diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am
index 68fc33ec..6aaf1783 100644
--- a/test/name-test/Makefile.am
+++ b/test/name-test/Makefile.am
@@ -12,7 +12,7 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
## so if adding tests not to be run in make check, don't add them to
## TESTS
if DBUS_BUILD_TESTS
-TESTS_ENVIRONMENT=DBUS_TOP_BUILDDIR=@abs_top_builddir@ DBUS_TOP_SRCDIR=@abs_top_srcdir@
+TESTS_ENVIRONMENT=DBUS_TOP_BUILDDIR=@abs_top_builddir@ DBUS_TOP_SRCDIR=@abs_top_srcdir@ PYTHON=@PYTHON@
TESTS=run-test.sh run-test-systemserver.sh
else
TESTS=
diff --git a/test/name-test/Makefile.in b/test/name-test/Makefile.in
index 6544cc97..0fc444ea 100644
--- a/test/name-test/Makefile.in
+++ b/test/name-test/Makefile.in
@@ -246,6 +246,11 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
@@ -321,9 +326,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -344,7 +353,7 @@ AM_CPPFLAGS = \
# if assertions are enabled, improve backtraces
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
-@DBUS_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = DBUS_TOP_BUILDDIR=@abs_top_builddir@ DBUS_TOP_SRCDIR=@abs_top_srcdir@
+@DBUS_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = DBUS_TOP_BUILDDIR=@abs_top_builddir@ DBUS_TOP_SRCDIR=@abs_top_srcdir@ PYTHON=@PYTHON@
EXTRA_DIST = run-test.sh run-test-systemserver.sh test-wait-for-echo.py test-activation-forking.py
@DBUS_BUILD_TESTS_TRUE@test_pending_call_dispatch_LDADD = $(top_builddir)/dbus/libdbus-internal.la
@DBUS_BUILD_TESTS_TRUE@test_pending_call_timeout_LDADD = $(top_builddir)/dbus/libdbus-internal.la
diff --git a/test/name-test/run-test-systemserver.sh b/test/name-test/run-test-systemserver.sh
index d3b8d557..afd1f045 100755
--- a/test/name-test/run-test-systemserver.sh
+++ b/test/name-test/run-test-systemserver.sh
@@ -41,10 +41,11 @@ if ! grep -q 'DBus.Error' echo-error-output.tmp; then
fi
echo "running test echo signal"
-if ! python $DBUS_TOP_SRCDIR/test/name-test/test-wait-for-echo.py; then
+if test "x$PYTHON" = "x:"; then
+ echo "Skipped test-echo-signal: Python interpreter not found"
+elif ! $PYTHON $DBUS_TOP_SRCDIR/test/name-test/test-wait-for-echo.py; then
echo "Failed test-wait-for-echo"
exit 1
fi
-
exit 0
diff --git a/test/name-test/run-test.sh b/test/name-test/run-test.sh
index a70055bb..cad5937e 100755
--- a/test/name-test/run-test.sh
+++ b/test/name-test/run-test.sh
@@ -49,7 +49,9 @@ echo "running test-shutdown"
${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-shutdown || die "test-shutdown failed"
echo "running test activation forking"
-if ! python $DBUS_TOP_SRCDIR/test/name-test/test-activation-forking.py; then
+if test "x$PYTHON" = "x:"; then
+ echo "Skipped test-activation-forking: Python interpreter not found"
+elif ! $PYTHON $DBUS_TOP_SRCDIR/test/name-test/test-activation-forking.py; then
echo "Failed test-activation-forking"
exit 1
fi
diff --git a/test/name-test/test-privserver-client.c b/test/name-test/test-privserver-client.c
index 1c43faee..e7f48960 100644
--- a/test/name-test/test-privserver-client.c
+++ b/test/name-test/test-privserver-client.c
@@ -71,7 +71,6 @@ open_shutdown_private_connection (dbus_bool_t use_guid)
DBusMessage *reply;
DBusConnection *privconn;
char *addr;
- char *comma;
dbus_bool_t service_died;
dbus_bool_t private_conn_lost;
diff --git a/test/relay.c b/test/relay.c
index bad39f47..f4129d0a 100644
--- a/test/relay.c
+++ b/test/relay.c
@@ -137,12 +137,15 @@ test_connect (Fixture *f,
gconstpointer data G_GNUC_UNUSED)
{
dbus_bool_t have_mem;
+ char *address;
g_assert (f->left_server_conn == NULL);
g_assert (f->right_server_conn == NULL);
- f->left_client_conn = dbus_connection_open_private (
- dbus_server_get_address (f->server), &f->e);
+ address = dbus_server_get_address (f->server);
+ g_assert (address != NULL);
+
+ f->left_client_conn = dbus_connection_open_private (address, &f->e);
assert_no_error (&f->e);
g_assert (f->left_client_conn != NULL);
dbus_connection_setup_with_g_main (f->left_client_conn, NULL);
@@ -153,12 +156,13 @@ test_connect (Fixture *f,
g_main_context_iteration (NULL, TRUE);
}
- f->right_client_conn = dbus_connection_open_private (
- dbus_server_get_address (f->server), &f->e);
+ f->right_client_conn = dbus_connection_open_private (address, &f->e);
assert_no_error (&f->e);
g_assert (f->right_client_conn != NULL);
dbus_connection_setup_with_g_main (f->right_client_conn, NULL);
+ dbus_free (address);
+
while (f->right_server_conn == NULL)
{
g_print (".");
diff --git a/test/test-service.c b/test/test-service.c
index 6627ea75..7181fa38 100644
--- a/test/test-service.c
+++ b/test/test-service.c
@@ -477,7 +477,14 @@ main (int argc,
dbus_error_free (&error);
exit (1);
}
-
+
+ if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+ {
+ fprintf (stderr, "Unable to acquire service: code %d\n", result);
+ _dbus_verbose ("*** Failed to acquire service: %d\n", result);
+ exit (1);
+ }
+
_dbus_verbose ("*** Test service entering main loop\n");
_dbus_loop_run (loop);
diff --git a/test/test-shell-service.c b/test/test-shell-service.c
index 57c16123..32a88329 100644
--- a/test/test-shell-service.c
+++ b/test/test-shell-service.c
@@ -176,6 +176,13 @@ main (int argc,
exit (1);
}
+ if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+ {
+ fprintf (stderr, "Unable to acquire service: code %d\n", result);
+ _dbus_verbose ("*** Failed to acquire service: %d\n", result);
+ exit (1);
+ }
+
_dbus_verbose ("*** Test service entering main loop\n");
_dbus_loop_run (loop);
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 5326a260..064306f6 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -260,6 +260,11 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
@@ -335,9 +340,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
diff --git a/tools/dbus-monitor.c b/tools/dbus-monitor.c
index e187ee4d..a4b54782 100644
--- a/tools/dbus-monitor.c
+++ b/tools/dbus-monitor.c
@@ -239,14 +239,6 @@ only_one_type (dbus_bool_t *seen_bus_type,
}
}
-static dbus_bool_t sigint_received = FALSE;
-
-static void
-sigint_handler (int signum)
-{
- sigint_received = TRUE;
-}
-
int
main (int argc, char *argv[])
{