Commit graph

5828 commits

Author SHA1 Message Date
Simon McVittie
463ecfb4fd Merge branch 'send_destination_prefix' into 'master'
Send destination prefix

See merge request dbus/dbus!85
2019-05-30 14:49:09 +00:00
Simon McVittie
edece0274b Start spec 0.36 development
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-05-17 15:47:38 +01:00
Simon McVittie
f79aa63045 Start dbus 1.13.12 development
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-05-17 15:47:29 +01:00
Adrian Szyndela
dcbab02613 doc: described send_destination_prefix in manual
This adds a description of send_destination_prefix to the dbus-daemon manual.

Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
Change-Id: I46e6fa54ee34095c3ac83ec2c06cb91cf5669c7f
2019-05-14 10:31:13 +02:00
Adrian Szyndela
8fcc1f9a8a test: activation tests for send_destination_prefix
This adds a few tests for checking if activation is allowed
for names specified within send_destination_prefix namespaces.

Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
Change-Id: I7a5a66f82fc08ce6cb46e37de2c3dfae24d9ea67
2019-05-14 10:31:13 +02:00
Adrian Szyndela
7b7c572434 test: send_destination(_prefix) tests
This adds tests for mostly "send_destination_prefix" cases
and some "send_destination" cases.

The general test case is:
- addressed recipient is running and owns a name;
- a message is sent to the name owner;
- the response is checked for allow/deny (method return/error).
Each test case is executed both for primary and queued ownership.

The tests include:
- checking send allow/deny for names and namespaces, including nesting;
- checking send allow/deny for neighbour names;
- checking send allow/deny for names/namespaces+interface+member.

Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
Change-Id: If5fcada01601355e7aadefadad79c0b24f8c397f
2019-05-14 10:31:12 +02:00
Simon McVittie
99f0821bfb Prepare release v1.13.10 and Specification v0.35
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-05-13 14:24:06 +01:00
Simon McVittie
e6b69092f4 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-05-13 12:41:53 +01:00
Simon McVittie
6884f63e0e Merge branch 'unix-gids' into 'master'
Add UnixGroupIDs to connection credentials

See merge request dbus/dbus!105

Fixes: dbus/dbus#196
2019-05-13 11:32:24 +00:00
Simon McVittie
5619f03984 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-05-13 11:49:41 +01:00
Ralf Habacker
f72adabbd9 Merge branch 'cmake-mkdir' into 'master'
cmake: Create all output directories for Doxygen

Closes #266

See merge request dbus/dbus!113
2019-04-26 21:48:54 +00:00
Adrian Szyndela
055ff9e64a dbus-daemon: add send_destination_prefix support
This extends dbus-daemon with support for send_destination_prefix
attribute in XML policies.

It allows having policy rules for sending to bus names generated
within namespaces defined by a prefix. The similar behaviour can be
emulated by owning an additional name, not used for addressing messages,
as described in
https://lists.freedesktop.org/archives/dbus/2017-May/017188.html
However, introducing send_destination_prefix creates possibility
of communicating intentions in a more direct way, which is easier
to understand.

Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
Change-Id: I0016ad93f1c16b7742fef5f45ebaf01b55694d3c
2019-04-26 13:29:42 +02:00
Adrian Szyndela
3486e0f48d DBusString: extend with checking for starting with words
This extracts a few lines of code and adds it as a DBusString function
that checks if a DBusString starts with words given with a C string
and a word separator. In other words, it checks if:
- a DBusString is a given C string, or
- a DBusString starts with a given C string and the next character is
  a given word separator.

It is used for matching names to prefixes when checking the policy.

Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
Change-Id: Ie39d33916863d950dde38d3b8b20c8a539217302
2019-04-26 13:29:42 +02:00
Simon McVittie
339b94da6b cmake: Create all output directories for Doxygen
CI builds intermittently fail with

    error: Could not create output directory /.../doc/api/xml

or

    error: Could not create output directory /.../doc/api/man

Fixes: https://gitlab.freedesktop.org/dbus/dbus/issues/266
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-04-25 12:22:25 +01:00
Simon McVittie
9699150195 Merge branch 'rlimit-nofile' into 'master'
bus: Try to raise soft fd limit to match hard limit

See merge request dbus/dbus!103

Reviewed-by: @poettering
[smcv: Correct a comment]
Reviewed-by: @pwithnall
2019-04-25 10:18:40 +00:00
Simon McVittie
6ee63e3a70 Merge branch 'msys2-chmod' into 'master'
build: Don't assume we can set permissions on a directory

Closes #216

See merge request dbus/dbus!110
2019-04-18 15:35:22 +00:00
Simon McVittie
7eacbfece7 bus: Try to raise soft fd limit to match hard limit
Linux systems have traditionally set the soft limit to 1024 and the hard
limit to 4096. Recent versions of systemd keep the soft fd limit at
1024 to avoid breaking programs that still use select(), but raise the
hard limit to 512*1024, while in recent Debian versions a complicated
interaction between components gives a soft limit of 1024 and a hard
limit of 1024*1024. If we can, we might as well elevate our soft limit
to match the hard limit, minimizing the chance that we will run out of
file descriptor slots.

Unlike the previous code to raise the hard and soft limits to at least
65536, we do this even if we don't have privileges: privileges are
unnecessary to raise the soft limit up to the hard limit.

If we *do* have privileges, we also continue to raise the hard and soft
limits to at least 65536 if they weren't already that high, making
it harder to carry out a denial of service attack on the system bus on
systems that use the traditional limit (CVE-2014-7824).

As was previously the case on the system bus, we'll drop the limits back
to our initial limits before we execute a subprocess for traditional
(non-systemd) activation, if enabled.

systemd activation doesn't involve us starting subprocesses at all,
so in both cases activated services will still inherit the same limits
they did previously.

Reviewed-by: Lennart Poettering <lennart@poettering.net>
[smcv: Correct a comment based on Lennart's review, reword commit message]
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-04-18 11:54:48 +01:00
Simon McVittie
14f46d14a0 build: Don't assume we can set permissions on a directory
MSYS2 has enough of a Unixish environment to run Autotools, but
apparently not enough of a Unixish environment to have functional
permissions.

Closes: dbus#216
2019-04-17 16:32:01 +01:00
Simon McVittie
fd0c19d6d8 Merge branch 'disable-traditional-activation' into 'master'
Configure option to disable traditional activation

See merge request dbus/dbus!107
2019-04-17 13:33:06 +00:00
Simon McVittie
9e0fd2fbbf bus_driver_credentials_fill_unix_gids: Comment on a non-error
As described in the spec, we want GetConnectionCredentials() to report
less information, successfully, if it sees a group ID that it can't
represent.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-04-17 14:22:15 +01:00
Simon McVittie
301db92576 spec: Document what happens for unrepresentable group IDs
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-04-17 14:19:15 +01:00
Simon McVittie
3c8422884a test-dbus-daemon: Fix a misleading variable name
In D-Bus I'd expect "ay_iter" to be an iterator over the type 'ay',
i.e. a byte-array. Abbreviate a little less to avoid this.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-04-17 14:17:41 +01:00
Simon McVittie
812678e595 test-dbus-daemon: Say why we don't check the value of LinuxSecurityLabel
Suggested on !105 by Matthijs van Duin.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-04-17 14:13:42 +01:00
Matthijs van Duin
afafd2fad0 Add UnixGroupIDs to connection credentials
Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com>
2019-03-25 23:01:26 +01:00
Matthijs van Duin
a96d524fb1 Add _dbus_asv_add_fixed_array
This generalizes _dbus_asv_add_byte_array.

Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com>
2019-03-25 21:04:21 +01:00
Topi Miettinen
94b5b236aa
Configure option to disable traditional activation
Traditional activation could be disabled if all services use
SystemdService activation instead. Provide an example of a hardened
DBus systemd service drop-in file for such a setup.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
2019-03-25 21:51:33 +02:00
Simon McVittie
df9cb47c3a Merge branch 'split-spawn-oom-test' into 'master'
Split spawn oom test

See merge request dbus/dbus!99
2019-03-15 17:06:01 +00:00
Ralf Habacker
433d5c2471 test-spawn-oom: Separate single spawn tests from oom related
This makes it possible to run each test independent from oom condition.
2019-03-15 17:06:01 +00:00
Simon McVittie
d757455c5e Merge branch 'msys2-fixes' into 'master'
cmake: Drop unused iconv dependency

Closes #262

See merge request dbus/dbus!101
2019-03-15 17:03:35 +00:00
Ralf Habacker
82e0847936 Merge branch 'cal-fix-cmake-pkgconfig' into 'master'
cmake: Avoid overwriting PKG_CONFIG_PATH env var

See merge request dbus/dbus!96

Reviewed-by: @rhabacker
2019-03-14 10:57:48 +00:00
Clemens Lang
3525cc045d cmake: Avoid overwriting PKG_CONFIG_PATH env var
The CMake config file installed by DBus will run in the context of other
projects. Consequently, changing the value of the PKG_CONFIG_DIR,
PKG_CONFIG_PATH or PKG_CONFIG_LIBDIR environment variables will affect
any further calls to pkg-config made by such projects, which can cause
problems.

A common case of this happening are pkg-config files installed in
usr/share/pkgconfig for .pc files that are architecture-independent, as
for example systemd does.

Avoid clobbering the environment variables by saving and restoring their
values. Note that for some of the variables, setting them to an empty
string is different from not setting them at all.

Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de>
2019-03-14 11:07:49 +01:00
Ralf Habacker
09b969e6ac Merge branch 'patch-1' into 'master'
Update dbus-specification.xml to remove redundancies in the interface name requirements.

See merge request dbus/dbus!102

Reviewed-by: @rhabacker
2019-03-13 18:47:19 +00:00
Felipe Gasper
570d6c6ab8 Update dbus-specification.xml to remove redundancies in the interface name requirements. 2019-03-13 17:26:03 +00:00
Ralf Habacker
77dec25007 Merge branch 'fix-cmake-doc-deps' into 'master'
Fixes rebuilding of dbus documentation at every make call

See merge request dbus/dbus!94
2019-03-13 10:04:03 +00:00
Ralf Habacker
f04e611a46 Try to fix doxygen error on CI reporting "Output directory ... does not exist and cannot be created" 2019-03-13 10:52:01 +01:00
Ralf Habacker
22fb56cfb7 Create top level dir for generating doxygon files 2019-03-13 10:52:01 +01:00
Ralf Habacker
a710cdd5e3 Fix dependency chain for doc files generated from docbook source 2019-03-13 10:52:01 +01:00
Ralf Habacker
d32ae7082e Update doxygen doc only if an associated source or Doxyfile has been changed
Use doxygen.stamp as output for generating doxygen doc similar to
autotools.
2019-03-13 10:49:54 +01:00
Ralf Habacker
44973e372d Target devhelp2 does not require dependencies that have already been specified in dbus.devhelp2 2019-03-13 10:49:54 +01:00
Ralf Habacker
cea3a27ed3 Cleanup dbus.devhelp2 make target pathes
Use absolute paths to avoid confusion about where
the associated file is located.
2019-03-13 10:49:54 +01:00
Ralf Habacker
e840edec09 Add target devhelp2 only when xsltproc has been found
It doesn't make sense to add a make target if it can't be created.
2019-03-13 10:49:54 +01:00
Ralf Habacker
89847f7042 Make the output directory used by doxygen absolute to avoid dependency on a particular working directory 2019-03-13 10:49:54 +01:00
Ralf Habacker
30b9cc540c Merge branch 'cmake-install-fixes' into 'master'
CMake install fixes

See merge request dbus/dbus!98
2019-03-13 09:48:04 +00:00
Ralf Habacker
760e30ec03 Do not let doxygen build man pages on Windows
This fixes an issue on gitlab CI not been able to create man page
output dir. Also man pages does not make sense on Windows.
2019-03-13 10:13:09 +01:00
Ralf Habacker
11eb34d86b cmake: generate and install doc for dbus-run-session 2019-03-13 08:56:59 +01:00
Ralf Habacker
9dc72c9fb8 cmake: install missing files to keep in sync with autotools builds 2019-03-13 08:56:59 +01:00
Ralf Habacker
2c96e94fea cmake: fix dtd installation dir 2019-03-13 08:56:59 +01:00
Ralf Habacker
14083a42cc cmake: Enable pkg-config generating also on Windows
pkgconfig support is used by client packages on cross compiled
obs builds.
2019-03-13 08:56:59 +01:00
Ralf Habacker
10b2cd53fb Merge branch 'FGasper/dbus-2ormore' 2019-03-13 08:54:31 +01:00
Felipe Gasper
1471a25a01 Update dbus-specification.xml to avoid implying that an interface name may consist of only 1 element. 2019-03-13 08:52:54 +01:00