Commit graph

693 commits

Author SHA1 Message Date
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
Chengwei Yang
cd32cdde0e Spec: document multiple .service files own the same well known name
In current dbus-daemon(1) implement, system .serivce must named after
its owned name, but this is not the case for session .service.

For session service, the result of multiple .service files own the
same well known name is undefined since readdir(3) doesn't return
dirent in a defined sequence.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66608
[added some </para><para> -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08 16:13:39 +01:00
Simon McVittie
c2d6824232 spec: briefly describe Name, Exec and User keys
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66608
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08 11:06:19 +01:00
Simon McVittie
be2d249f71 spec: system services' service description files have constrained names
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66608
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08 11:06:19 +01:00
Justin Lee
8d2536e023 Remove obscure "low-latency" parts in the introduction of spec
According to Wikipedia
http://en.wikipedia.org/wiki/Latency_%28engineering%29#Packet-switched_networks
latency means "the time from the source sending a packet to the destination
receiving it". Therefore, latency is unrelated to whether the operation is
asynchronous or synchronous. And also unrelated to whether it's one-way or
round-trip. Latency exists for asynchronous and one-way transfer, because for
current DBus implementations we need at least one context switch to transfer
each message from the sender process to the receiver process. Emphasizing
D-Bus is low-latency could encourage user to abuse/misuse the system.

Mail disscusion:
http://lists.freedesktop.org/archives/dbus/2013-May/015665.html

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65141
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13 14:15:35 +01:00
Chengwei Yang
dd71688e5d Fix dbus-daemon document about servicedir
In dbus-daemon implementation, the servicedir are searched in order in
which they appear in the config file.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66994
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13 13:55:41 +01:00
Simon McVittie
50674ed689 Use GNU make features to reduce repetition
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48277
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-09-05 13:56:36 +01:00
Simon McVittie
732021af1b Allow dbus-daemon --nofork on Windows
On Windows, the dbus-daemon is not able to fork (daemonize). If someone
explicitly requests forking, it should fail, but if someone
explicitly requests *not* forking, there seems no harm in allowing it.

A few of the regression tests specifically require a dbus-daemon that
will not fork, so allowing this option on Windows means those tests
don't need an extra OS condition.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-03 12:00:09 +01:00
Chengwei Yang
fe45937648 DBus Spec: fix examples namespace to com.example
There are a lot of examples in DBus Spec, and some of them just use the
namespace org.freedesktop, and so as object namespace org/freedesktop.
However, this is quite confusing.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66481
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-23 11:41:21 +01:00