Commit graph

273 commits

Author SHA1 Message Date
Simon McVittie
384c924c77 Revert "Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH"
This reverts commit 8fd2be6013.
This change was intended for 1.11.
2016-02-12 15:25:15 +00:00
Simon McVittie
8fd2be6013 Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH
Instead of using $DBUS_USE_TEST_BINARY to control whether to use the
hard-coded test binary TEST_BUS_LAUNCH_BINARY, we can just use
$DBUS_TEST_DBUS_LAUNCH to control what we launch directly, as we
were already doing for $DBUS_TEST_DAEMON.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11 02:37:11 +01:00
Simon McVittie
96ffc2a07e configure.ac: support large-file for stat64
dbus-daemon is not expected to open files with large *sizes*, but without
large file support, calling [f]stat() on a file that happens to have a
large inode number will fail with EOVERFLOW (see stat(2)). For example,
files mounted from an NFS server might have large inode numbers.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
[smcv: shorten and clarify commit message; move AC_SYS_LARGEFILE
after AC_USE_SYSTEM_EXTENSIONS because nothing should compile C before
that point]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-08 17:25:38 +00:00
Simon McVittie
e18b4eb14c 1.10.7 2015-12-01 21:36:02 +00:00
Simon McVittie
7d3b2b1cbe 1.10.6 2015-12-01 18:19:17 +00:00
Simon McVittie
d8c02f85bc 1.10.5 2015-11-17 23:46:34 +00:00
Simon McVittie
73ff1f6d9f dbus 1.10.4 2015-11-17 21:40:36 +00:00
Simon McVittie
8991ccc3d4 1.10.3 2015-10-26 18:54:04 +00:00
Simon McVittie
1552a17fa4 1.10.2 2015-10-26 12:54:26 +00:00
Jan Alexander Steffens (heftig)
98e4499240 user dbus.socket: Set DBUS_SESSION_BUS_ADDRESS
As discussed in <https://github.com/systemd/systemd/issues/1600>.
See also <https://bugs.archlinux.org/task/46721>,
<https://bugzilla.gnome.org/show_bug.cgi?id=756420>

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92612
[smcv: use AC_PATH_PROG to find systemctl; ignore systemctl failure]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
[smcv: add links to earlier bug reports elsewhere]
2015-10-26 11:59:36 +00:00
Simon McVittie
d0f4684138 On Windows, load local configuration relative to bus setup
This makes an installed tree with

    /some-prefix/
        etc/
            dbus-1/
                session-local.conf
        share/
            dbus-1/
                session.conf

relocatable to any location.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92028
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Tested-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-10-02 11:24:05 +01:00
Simon McVittie
cee466701d start towards 1.10.2 2015-08-25 19:34:54 +01:00
Simon McVittie
d2236978c0 1.10.0 2015-08-25 16:51:59 +01:00
Simon McVittie
6dc7358aa4 1.9.21 2015-08-07 00:15:34 +01:00
Simon McVittie
6c2a16d16e Prepare 1.9.20 (1.10rc1) 2015-08-06 18:55:31 +01:00
Simon McVittie
4bc250f96a 1.9.19 2015-07-21 21:13:43 +01:00
Simon McVittie
8f0e2e664e dbus-1.9.16 2015-07-21 17:52:21 +01:00
Simon McVittie
e5fd4c1473 dbus-1.8.20 2015-07-21 17:32:17 +01:00
Dimitri John Ledkov
b2c61ca6ea Move session & system bus configuration to datadir, by default.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89280
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-05-27 11:49:34 +01:00
Simon McVittie
4cbe3019c7 Start towards 1.9.18 2015-05-27 10:42:46 +01:00
Simon McVittie
6986e22be1 1.9.16 2015-05-14 14:50:24 +01:00
Simon McVittie
084977cfe2 Security hardening: force EXTERNAL auth in session.conf on Unix
DBUS_COOKIE_SHA1 is dependent on unguessable strings, i.e.
indirectly dependent on high-quality pseudo-random numbers
whereas EXTERNAL authentication (credentials-passing)
is mediated by the kernel and cannot be faked.

On Windows, EXTERNAL authentication is not available,
so we continue to use the hard-coded default (all
authentication mechanisms are tried).

Users of tcp: or nonce-tcp: on Unix will have to comment
this out, but they would have had to use a special
configuration anyway (to set the listening address),
and the tcp: and nonce-tcp: transports are inherently
insecure unless special steps are taken to have them
restricted to a VPN or SSH tunnelling.

Users of obscure Unix platforms (those that trigger
the warning "Socket credentials not supported on this Unix OS"
when compiling dbus-sysdeps-unix.c) might also have to
comment this out, or preferably provide a tested patch
to enable credentials-passing on that OS.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90414
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-05-14 14:30:30 +01:00
Simon McVittie
31489e1c4f start towards 1.8.20 2015-05-14 14:30:08 +01:00
Simon McVittie
1788e8f93d 1.8.18 2015-05-14 13:28:38 +01:00
Simon McVittie
d9ab893182 Security hardening: force EXTERNAL auth in session.conf on Unix
DBUS_COOKIE_SHA1 is dependent on unguessable strings, i.e.
indirectly dependent on high-quality pseudo-random numbers
whereas EXTERNAL authentication (credentials-passing)
is mediated by the kernel and cannot be faked.

On Windows, EXTERNAL authentication is not available,
so we continue to use the hard-coded default (all
authentication mechanisms are tried).

Users of tcp: or nonce-tcp: on Unix will have to comment
this out, but they would have had to use a special
configuration anyway (to set the listening address),
and the tcp: and nonce-tcp: transports are inherently
insecure unless special steps are taken to have them
restricted to a VPN or SSH tunnelling.

Users of obscure Unix platforms (those that trigger
the warning "Socket credentials not supported on this Unix OS"
when compiling dbus-sysdeps-unix.c) might also have to
comment this out, or preferably provide a tested patch
to enable credentials-passing on that OS.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90414
2015-05-12 11:54:50 +01:00
Simon McVittie
15e6b4f5b5 Move Autoconf/Automake droppings into /build-aux/
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89846
2015-04-16 13:06:33 +01:00
Simon McVittie
4f4801346e Run most tests under the TAP driver, with a simple adaptor for non-TAP tests
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89846
2015-04-16 13:06:29 +01:00
Simon McVittie
4e29ece664 Depend on Automake 1.13 so we can use the correct AM_TESTS_ENVIRONMENT
Since Automake 1.13 (released December 2012) the correct way for a
maintainer to specify environment variables has been
AM_TESTS_ENVIRONMENT, with TESTS_ENVIRONMENT reserved for the user.
That doesn't work in older Automake, so drop support for such old
versions.

Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89846
2015-04-16 13:06:19 +01:00
Simon McVittie
50bd76ac5b Autotools: enable -Wsign-compare and optionally -Werror=sign-compare
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-03-04 18:40:53 +00:00
Simon McVittie
073aa59f8c belatedly bump version for 1.9.15 2015-03-04 10:38:36 +00:00
Simon McVittie
38e64d7571 prepare 1.9.14 2015-03-02 14:48:25 +00:00
Simon McVittie
2a6cefbc3b Add dbus-update-activation-environment tool
If OS builders (distributions) have chosen to use the per-user bus,
this provides two possible modes of operation for compatibility with
existing X session startup hooks.

A legacy-free system can just upload DISPLAY, XAUTHORITY and possibly
DBUS_SESSION_BUS_ADDRESS into dbus-daemon's and systemd's activation
environments, similar to
http://cgit.freedesktop.org/systemd/systemd/tree/xorg/50-systemd-user.sh
installed by systemd (but unlike systemctl,
dbus-update-activation-environment works for traditional
D-Bus-activated services, not just for systemd services).

A system where compatibility is required for environment variables
exported by snippets in /etc/X11/xinit/xinitrc.d (in Red Hat derivatives,
Gentoo, etc.) or /etc/X11/Xsession.d (Debian derivatives) can upload
the entire environment of the X session, minus some selected environment
variables which are specific to a login session (notably XDG_SESSION_ID).

In Debian, I plan to put the former in a new dbus-user-session package
that enables a user-session-centric mode of operation for D-Bus,
and the latter in the existing dbus-x11 package, with the intention that
dbus-x11 eventually becomes a tool for change-averse setups or goes
away entirely.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61301
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-24 11:15:52 +00:00
Simon McVittie
263aca37ec Optionally install systemd user units for a per-user bus
The socket path used here, $XDG_RUNTIME_DIR/bus, does not match
what was used in user-session-units, but is what Lennart recommended
on fd.o #61303, and is also what kdbus will use for its bus proxy.

Installation of these units switches D-Bus to a different model of
the system: instead of considering each login session (approximately,
each password typed in) to be its own session, the user-session model
is that all concurrent logins by the same user form one large session.
This allows the same bus to be shared by a graphical session, cron jobs,
tty/ssh sessions, screen/tmux sessions and so on.

Because this is a different world-view, it is compile-time optional:
OS builders can choose which world their OS will live in. The default
is still the login-session model used in earlier D-Bus releases,
but might change to the user-session model in future. Explicit
configuration is recommended.

In OSs that support both models (either for sysadmin flexibility or as
a transitional measure), the OS builder should enable the user bus
units, but split them off into a dpkg binary package, RPM subpackage etc.;
the sysadmin can choose whether to enable the user-session model by
choosing whether to install that package.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61301
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-24 11:15:37 +00:00
Simon McVittie
6c433c0d50 Remove checks for dbus-glib from configure.ac
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-02-23 16:39:43 +00:00
Bertrand SIMONNET
57696a2e8a Link dbus-daemon and dbus-daemon-lauch-helper against libdbus
The shared can be used by dbus-daemon and dbus-daemon-launch-helper by exporting
the private symbols needed, reducing the size of dbus by about 500k.
The private symbols are exposed under the version
LIBDBUS_PRIVATE_@VERSION_NUMBER@.

[Altered by Simon McVittie and Ralf Habacker to clear up some
problematic linking.]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-02-20 20:49:45 +00:00
Simon McVittie
7d214f4d58 On Unix platforms with gcc (or compatible), hide non-exported symbols
This changes the Linux behaviour to match the default situation
on Windows: symbols without DBUS_EXPORT or DBUS_PRIVATE_EXPORT
decoration are internal to libdbus-1, and cannot be used by
other programs, even within the dbus source tree.

This means the compiler/linker can optimize calls to those functions
by avoiding indirection through the PLT, which should improve
performance a little. However, the primary purpose of doing this is
that it means developers building libdbus on Linux are considerably
less likely to break it on Windows by mistake.

I'm deliberately not adding -fvisbility=hidden in CMake because the
complexity of doing so is unnecessary: Autotools is the recommended
way to build dbus for Unix, and the one Unix developers are going
to use in practice, unless they are specifically checking that they
haven't broken the CMake build.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-02-20 20:49:41 +00:00
Simon McVittie
2d38407312 1.9.13 2015-02-19 14:46:35 +00:00
Simon McVittie
87fe648a5c 1.9.12 2015-02-19 13:29:31 +00:00
Tyler Hicks
f62bff5bca Update autoconf file to build against libapparmor
AppArmor support can be configured at build time with --enable-apparmor
and --disable-apparmor. By default, the build time decision is
automatically decided by checking if a sufficient libapparmor is
available.

A minimum required libapparmor is version 2.8.95.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
[smcv: avoid potential non-portability from "test EXPR -a EXPR"]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
2015-02-18 17:03:58 +00:00
Philip Withnall
bd707406a4 doc: Add a guide to designing D-Bus APIs
This guide gives some pointers on how to write D-Bus APIs which are nice
to use.

It adds an optional dependency on Ducktype and yelp-build from
yelp-tools. These are used when available, but are not required unless
--enable-ducktype-docs is passed to configure. They are required for
uploading the docs, however.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88994
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-16 13:45:37 +00:00
Simon McVittie
15506779a7 Document dbus-test-tool
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89086
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-12 14:13:03 +00:00
Simon McVittie
c2e2c15455 1.9.11 2015-02-09 15:35:55 +00:00
Simon McVittie
5394abe518 1.9.10 2015-02-09 11:09:51 +00:00
Simon McVittie
dfc53a221f 1.8.17 2015-02-05 14:54:10 +00:00
Simon McVittie
af6e170d8e Prepare embargoed 1.8.16 release 2015-02-04 16:51:10 +00:00
Simon McVittie
ca63ef7133 1.9.9 2015-02-03 23:13:51 +00:00
Simon McVittie
d7b3dba1bd 1.9.8 development release 2015-02-03 19:36:07 +00:00
Simon McVittie
6a49ced2dd Add infrastructure to run bits of tests under an alternative uid
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:05 +00:00
Simon McVittie
1e21cc86bf test: implement GLib-style "installed tests"
We run each test twice:

* once with the system's session.conf, as an integration test
  (test-cases that need a special configuration are automatically
  skipped)
* once with our special test configuration files, which provide better
  coverage

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:01 +00:00
Simon McVittie
ee032f5a11 Generate test configuration files via build-time sed, not configure
This means we can generate a version that works when installed,
from the same source files.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:00 +00:00