Commit graph

501 commits

Author SHA1 Message Date
Simon McVittie
54f94fce08 dbus-daemon.1: document the new locations
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89280
Reviewed-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
2015-06-17 16:06:39 +01:00
Simon McVittie
536c5eb7cb dbus-run-session(1): document modern Automake syntax
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89846
2015-04-16 13:06:27 +01: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
e3f117e761 Add support for unix:runtime=yes as an address mode
This is not used by default, but can be configured by OS builders (or
regression-test environments) if desired.

If used, this listens on $XDG_RUNTIME_DIR/bus, or fails if $XDG_RUNTIME_DIR
is not set. Fallback behaviour is unnecessary, because it is already
possible to use a string of semicolon-separated addresses like
<listen>unix:runtime=yes;unix:tmpdir=/tmp</listen>, resulting in
listening on either $XDG_RUNTIME_DIR/bus or /tmp/something.

We use a non-abstract socket here, because that is desirable for
use with Linux containers: abstract sockets are attached to the
network namespace, whereas non-abstract sockets are part of the
filesystem and can be bind-mounted between domains if necessary.
The major advantage of abstract sockets is that they do not need
cleanup, but the specification of XDG_RUNTIME_DIR guarantees to
provide cleanup anyway.

Based on prior work by Simon McVittie, Colin Walters and Alexander
Larsson.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61303
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-24 11:14:46 +00:00
Simon McVittie
87fe648a5c 1.9.12 2015-02-19 13:29:31 +00:00
Tyler Hicks
e6b90976c8 Add apparmor element and attributes to the bus config dtd
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-18 17:03:56 +00:00
Tyler Hicks
7e142554d3 Document AppArmor enforcement in the dbus-daemon man page
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-18 17:03:42 +00:00
Simon McVittie
82f9f6423a Add LinuxSecurityLabel to specification
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89041
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-18 10:35:05 +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
Ralf Habacker
b417088ff7 Windows implementation of GetConnectionCredentials.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445
2015-02-11 11:57:43 +00:00
Simon McVittie
1a28f82926 dbus-monitor: add options to log binary data with or without pcap framing
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-04 17:15:34 +00:00
Simon McVittie
9fce738033 Capture all messages received or sent, and send them to monitors
Unlike eavesdropping, the point of capture is when the message is
received, except for messages originating inside the dbus-daemon.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-04 17:15:17 +00:00
Simon McVittie
be33d75f3a Start spec 0.26 2014-11-24 22:51:11 +00:00
Simon McVittie
4244d86a90 Revert "Start spec 0.26"
This reverts commit cdd9e9a65c.
2014-11-24 13:05:37 +00:00
Simon McVittie
cdd9e9a65c Start spec 0.26 2014-11-10 17:08:56 +00:00
Simon McVittie
19ab6f3e7a 1.9.2, spec 0.25 2014-11-06 21:02:27 +00:00
Simon McVittie
acec88f32a dbus-tutorial: replace the entire GLib section with "use GDBus"
Also provide links to relevant GLib and Qt documentation.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25140
2014-10-29 14:15:53 +00:00
Simon McVittie
66b15d1779 dbus-spec, dbus-protocol: add ALLOW_INTERACTIVE_AUTHORIZATION flag
Heavily based on a patch from Lennart Poettering.

This is useful for authentication frameworks such as polkit, but this
flag is supposed to be generic, and not be bound to any implementation
of such a framework.

The dbus specification already clarifies that unknown flags must be
ignored, the reference implementation and the other implementations we
checked indeed ignore any new flags, hence we should be fine with
compatibility here.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83449
2014-10-28 15:03:06 +01:00
Simon McVittie
eca46a2341 Do not claim that '*' resolves to INADDR_ANY on all OSs
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72296
2014-10-13 14:01:51 +01:00
Lennart Poettering
e26d35c641 spec: introduce new value "const" for EmitsChangedSignal annotation
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72958
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-10-13 13:56:56 +01:00
Simon McVittie
1a578e6668 NEWS, bump spec version to (unreleased) 0.25 2014-10-06 12:27:36 +01:00
Simon McVittie
c230c790c6 spec: translate arbitrary limits into something more comprehensible
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=84188
Reviewed-by: Lennart Poettering
2014-10-06 12:23:44 +01:00
Simon McVittie
9359a1793c spec: in the table of types, classify them
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=84188
Reviewed-by: Lennart Poettering
2014-10-06 12:23:24 +01:00
Simon McVittie
33ee25f98a 1.9.0 2014-10-01 19:35:08 +01:00
Sebastian Rasmussen
7e0ec24f20 dbus-launch: Fix typo in manpage
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=84313
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-09-25 13:41:21 +01:00
Simon McVittie
15f9e7bb7c Describe quoting for match rules
I wish I could say "I can't believe this was never documented", but
it wouldn't be true.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24307
Reviewed-by: Alban Crequy
2014-09-25 12:59:50 +01:00
Simon McVittie
5392058c25 Expand documentation of NO_REPLY_EXPECTED
The message type is more important than whether NO_REPLY_EXPECTED is
set, when deciding whether a reply is expected. This documents
existing practice in at least libdbus, GDBus and dbus-daemon.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75749
Reviewed-by: Thiago Macieira
2014-09-24 18:07:54 +01:00
Simon McVittie
1909a82a8a Merge branch 'dbus-1.8'
Conflicts:
	NEWS
	configure.ac
2014-09-16 17:50:14 +01:00
Alban Crequy
bbf11cd5f9 config: add new limit: pending_fd_timeout
This is one of four commits needed to address CVE-2014-3637.

When a file descriptor is passed to dbus-daemon, the associated D-Bus message
might not be fully sent to dbus-daemon yet. Dbus-daemon keeps the file
descriptor in the DBusMessageLoader of the connection, waiting for the rest of
the message. If the client stops sending the remaining bytes, dbus-daemon will
wait forever and keep that file descriptor.

This patch adds pending_fd_timeout (milliseconds) in the configuration to
disconnect a connection after a timeout when a file descriptor was sent but not
the remaining message.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80559
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-09-15 12:29:30 +01:00
Thomas Haller
d8be7e614e doc/dbus-tutorial: fix tutorial to reference the proper GType for 'ay'
DBUS_TYPE_G_BYTE_ARRAY does not exist. It should be DBUS_TYPE_G_UCHAR_ARRAY

Signed-off-by: Thomas Haller <thaller@redhat.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80795
2014-09-04 15:38:56 +01:00
Simon McVittie
d40025871a Merge branch 'dbus-1.8' 2014-03-13 12:15:26 +00:00
David Zeuthen
7a327b5114 Update email-address for David Zeuthen.
I no longer have the email address davidz@redhat.com so update it to
my current address.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75288
2014-03-13 12:14:13 +00:00
Simon McVittie
51c9a15922 start spec 0.24 2014-01-20 16:12:56 +00:00
Simon McVittie
41b3f5b86c Revert "start spec 0.24"
It hasn't otherwise changed since 1.7.10.

This reverts commit fb16f80d45.
2014-01-20 13:40:30 +00:00
Ralf Habacker
3ce5d21edf Rename bus-test to test-bus to match common test application naming scheme.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17 16:29:37 +00:00
Ralf Habacker
0cd0714994 Rename dbus-test to test-dbus to match common test application naming scheme.
[reverted the dbus-specification part -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17 16:17:02 +00:00
Simon McVittie
fb16f80d45 start spec 0.24 2014-01-06 20:17:11 +00:00
Simon McVittie
127ef144f3 1.7.10 2014-01-06 18:40:26 +00:00
Chengwei Yang
a77f64d5e1 dbus-daemon(1): align document about "bind" with DBus Spec
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72301
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06 16:08:52 +00:00
Chengwei Yang
7628af5924 DBus Spec: add document of bind for tcp/nonce-tcp transport
tcp/nonce-tcp transport has a "bind" key, which can be specified a
hostname and will override hostname specified in "host" key.

"bind" has a special value "*" which means ip address 0.0.0.0 and will
cause dbus-daemon listen on all interfaces.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72301
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06 16:08:18 +00:00
Chengwei Yang
eeae8a6b1c DBus Spec: replace tab with 8 spaces
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72301
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06 16:07:22 +00:00
Simon McVittie
723da23545 specification: discuss "listenable" and "connectable" addresses
The --with-dbus-session-bus-connect-address configure option and the
DBUS_SESSION_BUS_CONNECT_ADDRESS CMake variable expect a connectable
address, while the --with-dbus-session-bus-listen-address option and
the DBUS_SESSION_BUS_LISTEN_ADDRESS variable expect a listenable address.

DBUS_SYSTEM_BUS_DEFAULT_ADDRESS currently has to be an address that
is simultaneously listenable and connectable.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61303
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
[fixed name of DBUS_SESSION_BUS_CONNECT_ADDRESS as per review -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-12-02 19:37:12 +00:00
Simon McVittie
8c388a5d21 spec: explicitly mention filtering messages with no INTERFACE
This is an important security measure. Without it, the system bus
would not deliver its intended security properties. The actual
implementation has always behaved like this, I think.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68597
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-11-27 15:36:07 +00:00
Simon McVittie
0fa46f68b8 Do not require messages without INTERFACE to be dispatched
Previously, if we have interfaces:

    interface com.example.foo:
        method Ambiguous()
    interface com.example.bar:
        method Ambiguous()
        method Unambiguous()

implementations were required to deliver a message with no INTERFACE
and METHOD=Unambiguous to "bar". A message with no INTERFACE and
METHOD=Ambiguous could either be delivered to "foo", delivered to "bar"
or treated as an error.

Relax this to allow an error for the unambiguous case, too, and
strongly recommend specifying the interface (which is best-practice).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68597
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Vaguely-acked-by: Thiago Macieira, David Zeuthen
[and desrt objected that it didn't go far enough]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-11-27 15:35:42 +00:00
Simon McVittie
727349248f start dbus-specification 0.23 2013-11-01 20:17:17 +00:00
Simon McVittie
6b3a169bb0 Revert "start dbus-specification 0.23"
This reverts commit c8bc5f24b7.
Nothing changed since 0.22.
2013-11-01 18:49:48 +00:00
Chengwei Yang
f110f00116 Update configurable elements for dbus-daemon manual
Update three configurable elements for dbus-daemon manual, <syslog>,
<pidfile> and <allow_anonymous>, all of them are undocumented so far.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69125
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-11-01 12:14:48 +00:00
Simon McVittie
c8bc5f24b7 start dbus-specification 0.23 2013-10-10 13:14:01 +01:00
Simon McVittie
9e4f0bf0e1 D-Bus 1.7.6, spec 0.22 2013-10-09 11:34:14 +01:00