Commit 5c56c903 authored by Simon McVittie's avatar Simon McVittie

Imported Upstream version 1.4.16

parent 201e26f2
......@@ -4,16 +4,13 @@ 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>
Cristian Rodríguez <cristian.rodriguez@opensuse.org>
......@@ -32,7 +29,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 +37,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 +84,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 +94,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 +103,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 +112,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>
......
......@@ -315,6 +315,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@
......@@ -386,9 +391,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@
......
D-Bus 1.4.16 (2011-09-21)
==
The "this answerphone fails to answer the phone" release.
• 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)
D-Bus 1.4.14 (2011-07-29)
==
......
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/
......@@ -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
......
......@@ -429,6 +429,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@
......@@ -500,9 +505,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@
......
......@@ -268,6 +268,7 @@ update_desktop_file_entry (BusActivation *activation,
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
retval = FALSE;
name = NULL;
exec = NULL;
user = NULL;
......@@ -427,8 +428,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;
}
......@@ -457,8 +461,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;
}
}
......@@ -476,7 +479,7 @@ out:
if (entry)
bus_activation_entry_unref (entry);
return FALSE;
return retval;
}
static dbus_bool_t
......
......@@ -32,6 +32,9 @@
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
......@@ -39,16 +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 (void);
typedef enum
{
ACTION_RELOAD = 'r',
ACTION_QUIT = 'q'
} SignalAction;
static void
signal_handler (int sig)
{
switch (sig)
{
#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
......@@ -59,18 +69,58 @@ 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))
{
_dbus_warn ("Unable to write to reload pipe.\n");
close_reload_pipe ();
/* If we receive SIGHUP often enough to fill the pipe buffer (4096
* times on old Linux, 65536 on modern Linux) before it can be
* drained, let's just warn and ignore. The configuration will be
* reloaded while draining the pipe buffer, which is what we
* wanted. It's harmless that it will be reloaded fewer times than
* we asked for, since the reload is delayed anyway, so new changes
* will be picked up.
*
* We use write() because _dbus_warn uses vfprintf, which isn't
* async-signal-safe.
*
* This is necessarily Unix-specific, but so are POSIX signals,
* so... */
static const char message[] =
"Unable to write to reload pipe - buffer full?\n";
write (STDERR_FILENO, message, strlen (message));
}
}
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 */
static void
usage (void)
......@@ -163,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,
......@@ -170,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 ();
......@@ -181,6 +234,12 @@ handle_reload_watch (DBusWatch *watch,
close_reload_pipe ();
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
......@@ -188,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;
}
......@@ -257,6 +343,7 @@ close_reload_pipe (void)
_dbus_close_socket (reload_pipe[RELOAD_WRITE_END], NULL);
reload_pipe[RELOAD_WRITE_END] = -1;
}
#endif /* DBUS_UNIX */
int
main (int argc, char **argv)
......@@ -507,14 +594,21 @@ main (int argc, char **argv)
* print_pid_pipe
*/
#ifdef DBUS_UNIX
setup_reload_pipe (bus_context_get_loop (context));
/* 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
#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
_dbus_set_signal_handler (SIGIO, signal_handler);
#endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */
#endif /* DBUS_UNIX */
_dbus_verbose ("We are on D-Bus...\n");
_dbus_loop_run (bus_context_get_loop (context));
......
......@@ -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) {
......
......@@ -100,6 +100,9 @@ OPTION(DBUS_DISABLE_ASSERTS "Disable assertion checking" 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)
......
......@@ -253,4 +253,8 @@
#define _dbus_verbose_C_S _dbus_verbose
#endif
# if defined(_MSC_VER) && !defined(inline)
#define inline __inline
#endif
#endif // _DBUS_CONFIG_H
......@@ -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 */
......@@ -153,6 +153,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
......@@ -274,6 +278,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
......
This diff is collapsed.
......@@ -3,7 +3,7 @@ AC_PREREQ([2.63])
m4_define([dbus_major_version], [1])
m4_define([dbus_minor_version], [4])
m4_define([dbus_micro_version], [14])
m4_define([dbus_micro_version], [16])
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=8
## increment any time the source changes; set to
## 0 if you increment CURRENT
LT_REVISION=7
LT_REVISION=8
## 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,6 +227,22 @@ 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