summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2014-01-06 19:09:14 +0000
committerSimon McVittie <smcv@debian.org>2014-01-06 19:09:14 +0000
commit90a976a6c24c9c08f53514f46b275da6efc8660a (patch)
tree3e02e70e7717af76efc2ff9f04b580c47e900e17 /debian
parent701d893512b1b2d6a7809f4265690802a3acd09b (diff)
parentcab78e2f51a12194e64a76b5431e5b2ef468ce8f (diff)
downloaddbus-90a976a6c24c9c08f53514f46b275da6efc8660a.tar.gz
Merge from experimental into unstable
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog78
-rw-r--r--debian/control6
-rw-r--r--debian/libdbus-1-3.symbols1
-rw-r--r--debian/patches/0001-Add-dbus-run-session.patch651
-rw-r--r--debian/patches/0002-FreeBSD-explicit-include-signal.h-to-fix-build-failu.patch31
-rw-r--r--debian/patches/0003-dbus-run-session-remove-various-extra-variables-from.patch139
-rw-r--r--debian/patches/series3
-rwxr-xr-xdebian/rules2
8 files changed, 86 insertions, 825 deletions
diff --git a/debian/changelog b/debian/changelog
index 372a9cbd..aa2591d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,81 @@
+dbus (1.7.8-2) UNRELEASED; urgency=medium
+
+ * Merge from experimental into unstable
+
+ -- Simon McVittie <smcv@debian.org> Mon, 06 Jan 2014 19:08:53 +0000
+
+dbus (1.7.8-1) experimental; urgency=low
+
+ [ Laurent Bigonville ]
+ * debian/rules: Re-add udeb_configure_flags that were lost during merge
+ (Closes: #727774)
+
+ [ Simon McVittie ]
+ * Standards-Version: 3.9.5 (no changes needed)
+ * Enable libaudit support so messages that violate SELinux policy go to the
+ audit log (Closes: #727771)
+ * New upstream release
+ - add new dependency on libsystemd-journal-dev for linux-any
+
+ -- Simon McVittie <smcv@debian.org> Tue, 29 Oct 2013 13:07:02 +0000
+
+dbus (1.7.6-2) experimental; urgency=low
+
+ * debian/rules: FTBFS if new symbols or libraries are added
+ without updating the symbols file
+ * debian/copyright: list copyright holders and minor licenses
+ (Closes: #726000)
+ * Merge packaging changes from unstable:
+ - Run `update-rc.d dbus defaults` instead of deprecated
+ `update-rc.d dbus start ...` (Closes: #725923)
+ - Add udeb packages, so the graphical installer can use AT-SPI
+ (Closes: #723952)
+ - Standards-Version: 3.9.4 (no changes needed)
+
+ -- Simon McVittie <smcv@debian.org> Sat, 12 Oct 2013 16:30:55 +0100
+
+dbus (1.7.6-1) experimental; urgency=low
+
+ * Standards-Version: 3.9.4 (no changes needed)
+ * New upstream development release
+ - update symbols
+
+ -- Simon McVittie <smcv@debian.org> Wed, 09 Oct 2013 16:44:43 +0100
+
+dbus (1.7.4-1) experimental; urgency=low
+
+ * New upstream development release
+ - CVE-2013-2168: avoid a user-triggerable crash (denial of services)
+ in system services that use libdbus
+
+ -- Simon McVittie <smcv@debian.org> Wed, 12 Jun 2013 19:53:00 +0100
+
+dbus (1.7.2-1) experimental; urgency=low
+
+ * New upstream development release
+ * Do the debug build --with-valgrind on mipsel, too
+
+ -- Simon McVittie <smcv@debian.org> Thu, 25 Apr 2013 13:46:10 +0100
+
+dbus (1.7.0-1) experimental; urgency=low
+
+ * Branch for experimental
+ * New upstream development release
+ * On architectures where it's currently supported, do the
+ debug build with --with-valgrind for better instrumentation
+ * debian/rules: factor out production and debug configure flags
+ * Add support for DEB_BUILD_OPTIONS=nodocs, which omits most documentation
+ (allowing doxygen and xmlto to be avoided) and the dbus-1-doc package
+ * Add support for DEB_BUILD_PROFILE=stage1, which does the same as nodocs
+ and additionally makes the debug build not insist on building all tests
+ * Make the development and debugging packages Multi-Arch: same,
+ since their arch-dependent files are all arch-segregated
+ (/usr/lib/TUPLE) or named according to a build-ID (/usr/lib/debug)
+ (Closes: #689071). This is not actually useful until pkg-config
+ becomes M-A: foreign (#631275).
+
+ -- Simon McVittie <smcv@debian.org> Fri, 22 Feb 2013 15:20:10 +0000
+
dbus (1.6.18-2) unstable; urgency=medium
* Disable valgrind integration in the debug build on armel,
diff --git a/debian/control b/debian/control
index f350bb17..799e7723 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,10 @@ Uploaders: Sjoerd Simons <sjoerd@debian.org>,
Simon McVittie <smcv@debian.org>
# The following packages can be omitted for bootstrapping, but provide extra
# features:
+# libaudit-dev
+# libcap-ng-dev
# libsystemd-daemon-dev (circular dependency)
+# libsystemd-journal-dev (circular dependency)
# libsystemd-login-dev (circular dependency)
# The following packages can be omitted for bootstrapping, but provide extra
# debugging support in /usr/lib/*/dbus-1.0/debug-build:
@@ -27,11 +30,14 @@ Build-Depends: automake (>= 1:1.10),
dh-autoreconf,
doxygen,
dpkg-dev (>= 1.16.1),
+ libaudit-dev,
+ libcap-ng-dev,
libexpat-dev,
libdbus-glib-1-dev,
libglib2.0-dev,
libselinux1-dev [linux-any],
libsystemd-daemon-dev (>= 32) [linux-any],
+ libsystemd-journal-dev (>= 32) [linux-any],
libsystemd-login-dev (>= 32) [linux-any],
libx11-dev,
python (>= 2.6),
diff --git a/debian/libdbus-1-3.symbols b/debian/libdbus-1-3.symbols
index c628d874..28050aa5 100644
--- a/debian/libdbus-1-3.symbols
+++ b/debian/libdbus-1-3.symbols
@@ -198,6 +198,7 @@ libdbus-1.so.3 libdbus-1-3 #MINVER#
dbus_set_error@Base 1.0.2
dbus_set_error_const@Base 1.0.2
dbus_set_error_from_message@Base 1.0.2
+ dbus_setenv@Base 1.7.6
dbus_shutdown@Base 1.0.2
dbus_signature_iter_get_current_type@Base 1.0.2
dbus_signature_iter_get_element_type@Base 1.0.2
diff --git a/debian/patches/0001-Add-dbus-run-session.patch b/debian/patches/0001-Add-dbus-run-session.patch
deleted file mode 100644
index 0d694cea..00000000
--- a/debian/patches/0001-Add-dbus-run-session.patch
+++ /dev/null
@@ -1,651 +0,0 @@
-From f7ec8803427efcb08a1c31d73c5a6cd32a037107 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <simon.mcvittie@collabora.co.uk>
-Date: Tue, 7 Feb 2012 17:45:16 +0000
-Subject: [PATCH 1/3] Add dbus-run-session
-
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39196
-Reviewed-by: Colin Walters <walters@verbum.org>
-Origin: upstream, commit:f691c24dd1bff1c6cd38fe3b5f2f2831e175464c
----
- doc/Makefile.am | 2 +
- doc/dbus-run-session.1 | 100 ++++++++++
- tools/Makefile.am | 4 +
- tools/dbus-run-session.c | 477 +++++++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 583 insertions(+)
- create mode 100644 doc/dbus-run-session.1
- create mode 100644 tools/dbus-run-session.c
-
-diff --git a/doc/Makefile.am b/doc/Makefile.am
-index b265987..622ce77 100644
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -7,6 +7,7 @@ dist_man1_MANS = \
- dbus-cleanup-sockets.1 \
- dbus-launch.1 \
- dbus-monitor.1 \
-+ dbus-run-session.1 \
- dbus-send.1 \
- dbus-uuidgen.1
-
-@@ -21,6 +22,7 @@ MAN_HTML_FILES = \
- dbus-daemon.1.html \
- dbus-launch.1.html \
- dbus-monitor.1.html \
-+ dbus-run-session.1.html \
- dbus-send.1.html \
- dbus-uuidgen.1.html
-
-diff --git a/doc/dbus-run-session.1 b/doc/dbus-run-session.1
-new file mode 100644
-index 0000000..8b270eb
---- /dev/null
-+++ b/doc/dbus-run-session.1
-@@ -0,0 +1,100 @@
-+.TH dbus\-run\-session 1
-+.SH NAME
-+dbus\-run\-session \- start a process as a new D-Bus session
-+.SH SYNOPSIS
-+.B dbus\-run\-session
-+.RB [ \-\-config\-file
-+.IR FILENAME ]
-+.RB [ \-\-dbus\-daemon
-+.IR BINARY ]
-+.RB [ \-\- ]
-+.IR PROGRAM " [" ARGUMENTS ...]
-+.P
-+.B dbus\-run\-session \-\-help
-+.P
-+.B dbus\-run\-session \-\-version
-+.SH DESCRIPTION
-+.B dbus\-run\-session
-+is used to start a session bus instance of
-+.B dbus\-daemon
-+from a shell script, and start a specified program in that session. The
-+.B dbus\-daemon
-+will run for as long as the program does, after which it will terminate.
-+.P
-+One use is to run a shell with its own
-+.B dbus\-daemon
-+in a text\(hymode or SSH session, and have the
-+.B dbus\-daemon
-+terminate automatically on leaving the sub\(hyshell, like this:
-+.P
-+ dbus\-run\-session \-\- bash
-+.P
-+or to replace the login shell altogether, by combining \fBdbus\-run\-session\fR
-+with the \fBexec\fR builtin:
-+.P
-+ exec dbus\-run\-session \-\- bash
-+.P
-+Another use is to run regression tests and similar things in an isolated
-+D-Bus session, to avoid either interfering with the "real" D-Bus session
-+or relying on there already being a D-Bus session active, for instance:
-+.P
-+ dbus\-run\-session \-\- make check
-+.P
-+or (in
-+.BR automake (1)):
-+.P
-+.nf
-+ TESTS_ENVIRONMENT = MY_DEBUG=all dbus\-run\-session \-\-
-+.fi
-+.P
-+.SH OPTIONS
-+.TP
-+\fB\-\-config\-file=\fIFILENAME\fR, \fB\-\-config\-file\fR \fIFILENAME\fR
-+Pass
-+.BI \-\-config-file= FILENAME
-+to the bus daemon, instead of passing it the
-+.B \-\-session
-+argument. See
-+.BR dbus-daemon (1).
-+.TP
-+\fB\-\-dbus\-daemon=\fIBINARY\fR, \fB\-\-dbus\-daemon\fR \fIBINARY\fR
-+Run \fIBINARY\fR as \fBdbus\-daemon\fR(1), instead of searching the \fBPATH\fR
-+in the usual way for an executable called \fBdbus\-daemon\fR.
-+.TP
-+.B \-\-help
-+Print usage information and exit.
-+.TP
-+.B \-\-version
-+Print the version of dbus\-run\-session and exit.
-+.SH EXIT STATUS
-+.B dbus\-run\-session
-+exits with the exit status of
-+.IR PROGRAM ,
-+0 if the
-+.BR \-\-help " or " \-\-version
-+options were used, 127 on an error within
-+.B dbus\-run\-session
-+itself, or
-+.RI 128+ n
-+if the
-+.I PROGRAM
-+was killed by signal
-+.IR n .
-+.SH ENVIRONMENT
-+.B PATH
-+is searched to find
-+.IR PROGRAM ,
-+and (if the \-\-dbus\-daemon option is not used or its argument does not
-+contain a
-+.BR / " character) to find " dbus\-daemon .
-+.P
-+The session bus' address is made available to
-+.I PROGRAM
-+in the environment variable
-+.BR DBUS_SESSION_BUS_ADDRESS .
-+.SH BUGS
-+Please send bug reports to the D\-Bus mailing list or bug tracker,
-+see http://www.freedesktop.org/software/dbus/
-+.SH SEE ALSO
-+.BR dbus\-daemon (1),
-+.BR dbus\-launch (1)
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index cfd54b8..464a805 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -20,6 +20,7 @@ bin_PROGRAMS = \
- if DBUS_UNIX
- bin_PROGRAMS += \
- dbus-cleanup-sockets \
-+ dbus-run-session \
- dbus-uuidgen \
- $(NULL)
- endif
-@@ -43,6 +44,9 @@ dbus_launch_SOURCES= \
- dbus-launch.c \
- dbus-launch-x11.c \
- dbus-launch.h
-+
-+dbus_run_session_SOURCES = \
-+ dbus-run-session.c
- endif
-
- dbus_cleanup_sockets_SOURCES= \
-diff --git a/tools/dbus-run-session.c b/tools/dbus-run-session.c
-new file mode 100644
-index 0000000..4f0b32b
---- /dev/null
-+++ b/tools/dbus-run-session.c
-@@ -0,0 +1,477 @@
-+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-+/* dbus-run-session.c - run a child process in its own session
-+ *
-+ * Copyright © 2003-2006 Red Hat, Inc.
-+ * Copyright © 2006 Thiago Macieira <thiago@kde.org>
-+ * Copyright © 2011-2012 Nokia Corporation
-+ *
-+ * Licensed under the Academic Free License version 2.1
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ *
-+ */
-+
-+#include <config.h>
-+
-+#include <assert.h>
-+#include <errno.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+
-+#include <sys/types.h>
-+#include <sys/wait.h>
-+
-+#define MAX_ADDR_LEN 512
-+#define PIPE_READ_END 0
-+#define PIPE_WRITE_END 1
-+
-+/* PROCESSES
-+ *
-+ * If you are in a shell and run "dbus-run-session myapp", here is what
-+ * happens (compare and contrast with dbus-launch):
-+ *
-+ * shell
-+ * \- dbus-run-session myapp
-+ * \- dbus-daemon --nofork --print-address --session
-+ * \- myapp
-+ *
-+ * All processes are long-running.
-+ *
-+ * When myapp exits, dbus-run-session kills dbus-daemon and terminates.
-+ *
-+ * If dbus-daemon exits, dbus-run-session warns and continues to run.
-+ *
-+ * PIPES
-+ *
-+ * dbus-daemon --print-address -> bus_address_pipe -> d-r-s
-+ */
-+
-+static const char me[] = "dbus-run-session";
-+
-+static void
-+usage (int ecode)
-+{
-+ fprintf (stderr,
-+ "%s [OPTIONS] [--] PROGRAM [ARGUMENTS]\n"
-+ "%s --version\n"
-+ "%s --help\n"
-+ "\n"
-+ "Options:\n"
-+ "--dbus-daemon=BINARY run BINARY instead of dbus-daemon\n"
-+ "--config-file=FILENAME pass to dbus-daemon instead of --session\n"
-+ "\n",
-+ me, me, me);
-+ exit (ecode);
-+}
-+
-+static void
-+version (void)
-+{
-+ printf ("%s %s\n"
-+ "Copyright (C) 2003-2006 Red Hat, Inc.\n"
-+ "Copyright (C) 2006 Thiago Macieira\n"
-+ "Copyright © 2011-2012 Nokia Corporation\n"
-+ "\n"
-+ "This is free software; see the source for copying conditions.\n"
-+ "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
-+ me, VERSION);
-+ exit (0);
-+}
-+
-+static void
-+oom (void)
-+{
-+ fprintf (stderr, "%s: out of memory\n", me);
-+ exit (1);
-+}
-+
-+static void *
-+xmalloc (size_t bytes)
-+{
-+ void *ret;
-+
-+ if (bytes == 0)
-+ bytes = 1;
-+
-+ ret = malloc (bytes);
-+
-+ if (ret == NULL)
-+ oom ();
-+
-+ return ret;
-+}
-+
-+typedef enum
-+{
-+ READ_STATUS_OK, /**< Read succeeded */
-+ READ_STATUS_ERROR, /**< Some kind of error */
-+ READ_STATUS_EOF /**< EOF returned */
-+} ReadStatus;
-+
-+static ReadStatus
-+read_line (int fd,
-+ char *buf,
-+ size_t maxlen)
-+{
-+ size_t bytes = 0;
-+ ReadStatus retval;
-+
-+ memset (buf, '\0', maxlen);
-+ maxlen -= 1; /* ensure nul term */
-+
-+ retval = READ_STATUS_OK;
-+
-+ while (1)
-+ {
-+ ssize_t chunk;
-+ size_t to_read;
-+
-+ again:
-+ to_read = maxlen - bytes;
-+
-+ if (to_read == 0)
-+ break;
-+
-+ chunk = read (fd,
-+ buf + bytes,
-+ to_read);
-+ if (chunk < 0 && errno == EINTR)
-+ goto again;
-+
-+ if (chunk < 0)
-+ {
-+ retval = READ_STATUS_ERROR;
-+ break;
-+ }
-+ else if (chunk == 0)
-+ {
-+ retval = READ_STATUS_EOF;
-+ break; /* EOF */
-+ }
-+ else /* chunk > 0 */
-+ bytes += chunk;
-+ }
-+
-+ if (retval == READ_STATUS_EOF &&
-+ bytes > 0)
-+ retval = READ_STATUS_OK;
-+
-+ /* whack newline */
-+ if (retval != READ_STATUS_ERROR &&
-+ bytes > 0 &&
-+ buf[bytes-1] == '\n')
-+ buf[bytes-1] = '\0';
-+
-+ return retval;
-+}
-+
-+static void
-+exec_dbus_daemon (const char *dbus_daemon,
-+ int bus_address_pipe[2],
-+ const char *config_file)
-+{
-+ /* Child process, which execs dbus-daemon or dies trying */
-+#define MAX_FD_LEN 64
-+ char write_address_fd_as_string[MAX_FD_LEN];
-+
-+ close (bus_address_pipe[PIPE_READ_END]);
-+
-+ sprintf (write_address_fd_as_string, "%d", bus_address_pipe[PIPE_WRITE_END]);
-+
-+ execlp (dbus_daemon,
-+ dbus_daemon,
-+ "--nofork",
-+ "--print-address", write_address_fd_as_string,
-+ config_file ? "--config-file" : "--session",
-+ config_file, /* has to be last in this varargs list */
-+ NULL);
-+
-+ fprintf (stderr, "%s: failed to execute message bus daemon '%s': %s\n",
-+ me, dbus_daemon, strerror (errno));
-+}
-+
-+static void
-+exec_app (int prog_arg, char **argv)
-+{
-+ execvp (argv[prog_arg], argv + prog_arg);
-+
-+ fprintf (stderr, "%s: failed to exec '%s': %s\n", me, argv[prog_arg],
-+ strerror (errno));
-+ exit (1);
-+}
-+
-+int
-+main (int argc, char **argv)
-+{
-+ int prog_arg = 0;
-+ int bus_address_pipe[2] = { 0, 0 };
-+ const char *config_file = NULL;
-+ const char *dbus_daemon = NULL;
-+ char bus_address[MAX_ADDR_LEN] = { 0 };
-+ const char *prev_arg = NULL;
-+ int i = 1;
-+ int requires_arg = 0;
-+ pid_t bus_pid;
-+ pid_t app_pid;
-+ char *envvar;
-+
-+ while (i < argc)
-+ {
-+ const char *arg = argv[i];
-+
-+ if (requires_arg)
-+ {
-+ const char **arg_dest;
-+
-+ assert (prev_arg != NULL);
-+
-+ if (strcmp (prev_arg, "--config-file") == 0)
-+ {
-+ arg_dest = &config_file;
-+ }
-+ else if (strcmp (prev_arg, "--dbus-daemon") == 0)
-+ {
-+ arg_dest = &dbus_daemon;
-+ }
-+ else
-+ {
-+ /* shouldn't happen */
-+ fprintf (stderr, "%s: internal error: %s not fully implemented\n",
-+ me, prev_arg);
-+ return 127;
-+ }
-+
-+ if (*arg_dest != NULL)
-+ {
-+ fprintf (stderr, "%s: %s given twice\n", me, prev_arg);
-+ return 127;
-+ }
-+
-+ *arg_dest = arg;
-+ requires_arg = 0;
-+ prev_arg = arg;
-+ ++i;
-+ continue;
-+ }
-+
-+ if (strcmp (arg, "--help") == 0 ||
-+ strcmp (arg, "-h") == 0 ||
-+ strcmp (arg, "-?") == 0)
-+ {
-+ usage (0);
-+ }
-+ else if (strcmp (arg, "--version") == 0)
-+ {
-+ version ();
-+ }
-+ else if (strstr (arg, "--config-file=") == arg)
-+ {
-+ const char *file;
-+
-+ if (config_file != NULL)
-+ {
-+ fprintf (stderr, "%s: --config-file given twice\n", me);
-+ return 127;
-+ }
-+
-+ file = strchr (arg, '=');
-+ ++file;
-+
-+ config_file = file;
-+ }
-+ else if (strstr (arg, "--dbus-daemon=") == arg)
-+ {
-+ const char *file;
-+
-+ if (dbus_daemon != NULL)
-+ {
-+ fprintf (stderr, "%s: --dbus-daemon given twice\n", me);
-+ return 127;
-+ }
-+
-+ file = strchr (arg, '=');
-+ ++file;
-+
-+ dbus_daemon = file;
-+ }
-+ else if (strcmp (arg, "--config-file") == 0 ||
-+ strcmp (arg, "--dbus-daemon") == 0)
-+ {
-+ requires_arg = 1;
-+ }
-+ else if (arg[0] == '-')
-+ {
-+ if (strcmp (arg, "--") != 0)
-+ {
-+ fprintf (stderr, "%s: option '%s' is unknown\n", me, arg);
-+ return 127;
-+ }
-+ else
-+ {
-+ prog_arg = i + 1;
-+ break;
-+ }
-+ }
-+ else
-+ {
-+ prog_arg = i;
-+ break;
-+ }
-+
-+ prev_arg = arg;
-+ ++i;
-+ }
-+
-+ /* "dbus-run-session" and "dbus-run-session ... --" are not allowed:
-+ * there must be something to run */
-+ if (prog_arg < 1 || prog_arg >= argc)
-+ {
-+ fprintf (stderr, "%s: a non-option argument is required\n", me);
-+ return 127;
-+ }
-+
-+ if (requires_arg)
-+ {
-+ fprintf (stderr, "%s: option '%s' requires an argument\n", me, prev_arg);
-+ return 127;
-+ }
-+
-+ if (dbus_daemon == NULL)
-+ dbus_daemon = "dbus-daemon";
-+
-+ if (pipe (bus_address_pipe) < 0)
-+ {
-+ fprintf (stderr, "%s: failed to create pipe: %s\n", me, strerror (errno));
-+ return 127;
-+ }
-+
-+ bus_pid = fork ();
-+
-+ if (bus_pid < 0)
-+ {
-+ fprintf (stderr, "%s: failed to fork: %s\n", me, strerror (errno));
-+ return 127;
-+ }
-+
-+ if (bus_pid == 0)
-+ {
-+ /* child */
-+ exec_dbus_daemon (dbus_daemon, bus_address_pipe, config_file);
-+ /* not reached */
-+ return 127;
-+ }
-+
-+ close (bus_address_pipe[PIPE_WRITE_END]);
-+
-+ switch (read_line (bus_address_pipe[PIPE_READ_END], bus_address, MAX_ADDR_LEN))
-+ {
-+ case READ_STATUS_OK:
-+ break;
-+
-+ case READ_STATUS_EOF:
-+ fprintf (stderr, "%s: EOF reading address from bus daemon\n", me);
-+ return 127;
-+ break;
-+
-+ case READ_STATUS_ERROR:
-+ fprintf (stderr, "%s: error reading address from bus daemon: %s\n",
-+ me, strerror (errno));
-+ return 127;
-+ break;
-+ }
-+
-+ close (bus_address_pipe[PIPE_READ_END]);
-+
-+ envvar = xmalloc (strlen ("DBUS_SESSION_BUS_ADDRESS=") +
-+ strlen (bus_address) + 1);
-+ strcpy (envvar, "DBUS_SESSION_BUS_ADDRESS=");
-+ strcat (envvar, bus_address);
-+ putenv (envvar);
-+
-+ app_pid = fork ();
-+
-+ if (app_pid < 0)
-+ {
-+ fprintf (stderr, "%s: failed to fork: %s\n", me, strerror (errno));
-+ return 127;
-+ }
-+
-+ if (app_pid == 0)
-+ {
-+ /* child */
-+ exec_app (prog_arg, argv);
-+ /* not reached */
-+ return 127;
-+ }
-+
-+ while (1)
-+ {
-+ int child_status;
-+ pid_t child_pid = waitpid (-1, &child_status, 0);
-+
-+ if (child_pid == (pid_t) -1)
-+ {
-+ int errsv = errno;
-+
-+ if (errsv == EINTR)
-+ continue;
-+
-+ /* shouldn't happen: the only other documented errors are ECHILD,
-+ * which shouldn't happen because we terminate when all our children
-+ * have died, and EINVAL, which would indicate programming error */
-+ fprintf (stderr, "%s: waitpid() failed: %s\n", me, strerror (errsv));
-+ return 127;
-+ }
-+ else if (child_pid == bus_pid)
-+ {
-+ /* no need to kill it, now */
-+ bus_pid = 0;
-+
-+ if (WIFEXITED (child_status))
-+ fprintf (stderr, "%s: dbus-daemon exited with code %d\n",
-+ me, WEXITSTATUS (child_status));
-+ else if (WIFSIGNALED (child_status))
-+ fprintf (stderr, "%s: dbus-daemon terminated by signal %d\n",
-+ me, WTERMSIG (child_status));
-+ else
-+ fprintf (stderr, "%s: dbus-daemon died or something\n", me);
-+ }
-+ else if (child_pid == app_pid)
-+ {
-+ if (bus_pid != 0)
-+ kill (bus_pid, SIGTERM);
-+
-+ if (WIFEXITED (child_status))
-+ return WEXITSTATUS (child_status);
-+
-+ /* if it died from a signal, behave like sh(1) */
-+ if (WIFSIGNALED (child_status))
-+ return 128 + WTERMSIG (child_status);
-+
-+ /* I give up (this should never be reached) */
-+ fprintf (stderr, "%s: child process died or something\n", me);
-+ return 127;
-+ }
-+ else
-+ {
-+ fprintf (stderr, "%s: ignoring unknown child process %ld\n", me,
-+ (long) child_pid);
-+ }
-+ }
-+
-+ return 0;
-+}
---
-1.8.4.rc3
-
diff --git a/debian/patches/0002-FreeBSD-explicit-include-signal.h-to-fix-build-failu.patch b/debian/patches/0002-FreeBSD-explicit-include-signal.h-to-fix-build-failu.patch
deleted file mode 100644
index dad2d60b..00000000
--- a/debian/patches/0002-FreeBSD-explicit-include-signal.h-to-fix-build-failu.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From b6d7a3f37565530488098b7bf47cf3211b57b352 Mon Sep 17 00:00:00 2001
-From: Chengwei Yang <chengwei.yang@intel.com>
-Date: Wed, 26 Jun 2013 15:40:12 +0800
-Subject: [PATCH 2/3] FreeBSD: explicit include signal.h to fix build failure
-
-In Linux envrionment, signal.h included by sys/wait.h, however, this
-isn't the case in FreeBSD. So explicit include it to fix build failure.
-
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66197
-Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
-Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-Origin: upstream, commit:9665b8ecd84c650804945104d1ffe4f06cce199f
----
- tools/dbus-run-session.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tools/dbus-run-session.c b/tools/dbus-run-session.c
-index 4f0b32b..4f7243f 100644
---- a/tools/dbus-run-session.c
-+++ b/tools/dbus-run-session.c
-@@ -34,6 +34,7 @@
-
- #include <sys/types.h>
- #include <sys/wait.h>
-+#include <signal.h>
-
- #define MAX_ADDR_LEN 512
- #define PIPE_READ_END 0
---
-1.8.4.rc3
-
diff --git a/debian/patches/0003-dbus-run-session-remove-various-extra-variables-from.patch b/debian/patches/0003-dbus-run-session-remove-various-extra-variables-from.patch
deleted file mode 100644
index 478e4beb..00000000
--- a/debian/patches/0003-dbus-run-session-remove-various-extra-variables-from.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From 136a164259d4082849a9b2536bb1006e8cb31ae2 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <simon.mcvittie@collabora.co.uk>
-Date: Tue, 8 Oct 2013 16:43:47 +0100
-Subject: [PATCH 3/3] dbus-run-session: remove various extra variables from the
- environment
-
-DBUS_SESSION_BUS_PID is not mandatory to set, but we should unset it
-if present, since it points to a different session's bus. Likewise for
-DBUS_SESSION_BUS_WINDOWID.
-
-Similarly, if DBUS_STARTER_BUS_TYPE and DBUS_STARTER_ADDRESS
-are set (as they would be under GNOME Terminal 3.8, see
-<https://bugs.freedesktop.org/show_bug.cgi?id=63119>) then they
-are likely to point to a different session's bus.
-
-[Backported to 1.6: reimplement dbus_setenv(), use roff-format man page]
-
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39196
-Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-Reviewed-by: Colin Walters <walters@verbum.org>
-Origin: backport, commit:5ee72fe2e1e8fbb7ae09174e8df3ca28228ddd9b
----
- doc/dbus-run-session.1 | 8 ++++++++
- tools/Makefile.am | 4 ++++
- tools/dbus-run-session.c | 43 +++++++++++++++++++++----------------------
- 3 files changed, 33 insertions(+), 22 deletions(-)
-
-diff --git a/doc/dbus-run-session.1 b/doc/dbus-run-session.1
-index 8b270eb..32944d9 100644
---- a/doc/dbus-run-session.1
-+++ b/doc/dbus-run-session.1
-@@ -92,6 +92,14 @@ The session bus' address is made available to
- .I PROGRAM
- in the environment variable
- .BR DBUS_SESSION_BUS_ADDRESS .
-+.P
-+The variables
-+.BR DBUS_SESSION_BUS_PID ,
-+.BR DBUS_SESSION_BUS_WINDOWID ,
-+.BR DBUS_STARTER_BUS_TYPE
-+and
-+.BR DBUS_STARTER_ADDRESS
-+are removed from the environment, if present.
- .SH BUGS
- Please send bug reports to the D\-Bus mailing list or bug tracker,
- see http://www.freedesktop.org/software/dbus/
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 464a805..73d95fc 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -47,6 +47,10 @@ dbus_launch_SOURCES= \
-
- dbus_run_session_SOURCES = \
- dbus-run-session.c
-+
-+dbus_run_session_LDADD = \
-+ $(top_builddir)/dbus/libdbus-1.la \
-+ $(NULL)
- endif
-
- dbus_cleanup_sockets_SOURCES= \
-diff --git a/tools/dbus-run-session.c b/tools/dbus-run-session.c
-index 4f7243f..39d8839 100644
---- a/tools/dbus-run-session.c
-+++ b/tools/dbus-run-session.c
-@@ -36,6 +36,21 @@
- #include <sys/wait.h>
- #include <signal.h>
-
-+#include "dbus/dbus.h"
-+
-+/* Debian-specific backport to D-Bus 1.6: dbus_setenv is not
-+ * public API in this version. Assume POSIX libc. */
-+#define dbus_setenv _backported_dbus_setenv
-+static dbus_bool_t
-+_backported_dbus_setenv (const char *name,
-+ const char *val)
-+{
-+ if (val == NULL)
-+ return (unsetenv (name) == 0);
-+ else
-+ return (setenv (name, val, TRUE) == 0);
-+}
-+
- #define MAX_ADDR_LEN 512
- #define PIPE_READ_END 0
- #define PIPE_WRITE_END 1
-@@ -100,22 +115,6 @@ oom (void)
- exit (1);
- }
-
--static void *
--xmalloc (size_t bytes)
--{
-- void *ret;
--
-- if (bytes == 0)
-- bytes = 1;
--
-- ret = malloc (bytes);
--
-- if (ret == NULL)
-- oom ();
--
-- return ret;
--}
--
- typedef enum
- {
- READ_STATUS_OK, /**< Read succeeded */
-@@ -228,7 +227,6 @@ main (int argc, char **argv)
- int requires_arg = 0;
- pid_t bus_pid;
- pid_t app_pid;
-- char *envvar;
-
- while (i < argc)
- {
-@@ -397,11 +395,12 @@ main (int argc, char **argv)
-
- close (bus_address_pipe[PIPE_READ_END]);
-
-- envvar = xmalloc (strlen ("DBUS_SESSION_BUS_ADDRESS=") +
-- strlen (bus_address) + 1);
-- strcpy (envvar, "DBUS_SESSION_BUS_ADDRESS=");
-- strcat (envvar, bus_address);
-- putenv (envvar);
-+ if (!dbus_setenv ("DBUS_SESSION_BUS_ADDRESS", bus_address) ||
-+ !dbus_setenv ("DBUS_SESSION_BUS_PID", NULL) ||
-+ !dbus_setenv ("DBUS_SESSION_BUS_WINDOWID", NULL) ||
-+ !dbus_setenv ("DBUS_STARTER_ADDRESS", NULL) ||
-+ !dbus_setenv ("DBUS_STARTER_BUS_TYPE", NULL))
-+ oom ();
-
- app_pid = fork ();
-
---
-1.8.4.rc3
-
diff --git a/debian/patches/series b/debian/patches/series
index cf1de2e7..4628d1c0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1 @@
01_no-fatal-warnings.patch
-0001-Add-dbus-run-session.patch
-0002-FreeBSD-explicit-include-signal.h-to-fix-build-failu.patch
-0003-dbus-run-session-remove-various-extra-variables-from.patch
diff --git a/debian/rules b/debian/rules
index 5ea075e9..7cd342a4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,7 +22,7 @@ dh_options = \
common_configure_flags := \
--disable-silent-rules \
- --disable-libaudit \
+ --enable-libaudit \
--enable-installed-tests \
--libexecdir=\$${prefix}/lib/dbus-1.0 \
--with-systemdsystemunitdir=/lib/systemd/system \