Commit graph

5611 commits

Author SHA1 Message Date
Simon McVittie
ca1eafbb7f 1.13.8
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-04 12:27:32 +00:00
Simon McVittie
c890c0ed5d NEWS: Note new weak dependency on xsltproc for CMake
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-04 12:26:03 +00:00
Simon McVittie
bcc34caa43 CI: Exercise maintainer-only documentation build
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-04 11:48:53 +00:00
Simon McVittie
e0a1bfb26a CI: Remove unimplemented --with-glib option
dbus has never actually had this option.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-04 11:41:23 +00:00
Simon McVittie
d71049799a CI: List attributes, sizes etc. of installed files, not just names
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-04 11:41:23 +00:00
Simon McVittie
f134e2d2c7 doc: Remove obsolete message about man2html
We no longer run man2html.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-04 11:41:23 +00:00
Simon McVittie
21db07e18d doc: Don't include ChangeLog in dbus-docs.tar.xz
Signed-off-by: Simon McVittie <smcv@collabora.com>
Fixes: e93b421137
2018-12-04 11:18:39 +00:00
Simon McVittie
074fbb0a83 doc: Use tar --xz to create dbus-docs.tar.xz
Signed-off-by: Simon McVittie <smcv@collabora.com>
Fixes: b805744029
2018-12-04 11:17:38 +00:00
Simon McVittie
28c27349e2 CI: Start supporting Debian 10 'buster', currently under development
This gives us a way to build on a more recent host OS if we want to.
For Gitlab-CI it's disabled by default.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-03 20:00:37 +00:00
Simon McVittie
0c553afcd9 CI: Stop building on Ubuntu 14.04 'trusty'
The version of gcc in trusty is too old for AddressSanitizer, which we
want to be able to start using, and Travis-CI finally supports Ubuntu
16.04 'xenial' now. This lets us remove some workarounds, but we need
to update others.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-03 20:00:32 +00:00
Simon McVittie
1dd31d32a0 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-03 16:31:07 +00:00
Simon McVittie
152b09ff5a activation: Don't leak if delivering activation message is forbidden
This is technically a denial of service because the dbus-daemon will
run out of memory eventually, but it's a very slow and noisy one,
because all the rejected messages are also very likely to have
been logged to the system log.

Detected by AddressSanitizer.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Resolves: https://gitlab.freedesktop.org/dbus/dbus/issues/234
Reviewed-by: pwithnall
2018-12-03 16:28:13 +00:00
Simon McVittie
473f097471 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-03 15:42:43 +00:00
Simon McVittie
017df70247 Merge branch 'max-conns-per-user' into 'master'
test/dbus-daemon: Mark max-connections-per-user as unimplemented on Windows

See merge request dbus/dbus!54

Reviewed-by: pwithnall
Reviewed-by: rhabacker
2018-12-03 15:30:57 +00:00
Simon McVittie
007de46c2a Merge branch '221-spec-fix' into 'master'
spec: Fix a typo in an ObjectManager example

Closes #221

See merge request dbus/dbus!56

Reviewed-by: smcv
2018-12-03 15:29:40 +00:00
Philip Withnall
f2e63e6c48 spec: Fix a typo in an ObjectManager example
As spotted by Peter Bigot.

Closes #221

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-03 11:39:11 +00:00
Ralf Habacker
19bc103e5d Enable check_get_connection_unix_process_id test on Windows with CMake
This check is now possible because with merge request
 https://gitlab.freedesktop.org/dbus/dbus/merge_requests/55
the prerequisites are valid.

It was already run if built with Autotools, because DBUS_WIN_FIXME
was only defined in the CMake build system.

[smcv: Add more context regarding Autotools vs. CMake]
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-03 11:31:22 +00:00
Simon McVittie
1b8efd9d44 Merge branch 'windows-pid' into 'master'
bus test: Accept GetConnectionUnixProcessID() success on Windows

See merge request dbus/dbus!55

Reviewed-by: pwithnall
2018-11-29 19:51:48 +00:00
Simon McVittie
5659784990 bus test: Accept GetConnectionUnixProcessID() success on Windows
Despite its name, which is a historical quirk, this is now a
generic cross-platform process ID on anything with the concept of
numbered processes. It appears it has actually worked on Windows
since dbus 1.7.x.

Bug: https://gitlab.freedesktop.org/dbus/dbus/issues/239
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-29 19:25:57 +00:00
Simon McVittie
89208de6a9 dbus-daemon(1): Document max_connections_per_user as Unix-only
The limit is accepted on Windows, but not enforced.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-29 18:17:46 +00:00
Simon McVittie
6e87d52a46 test/dbus-daemon: Mark max-connections-per-user as unimplemented on Windows
The implementation of the max-connections-per-user limit works in terms
of Unix uids, so it doesn't apply on Windows.

This is not a problem in practice, because it only makes sense to limit
connections per user if you have multiple users, and we don't support
the well-known system bus on Windows.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-29 14:24:52 +00:00
Simon McVittie
6d40ef8757 Merge branch 'dbus-daemon-inherited-fds' into 'master'
Don't let dbus-daemon and its subprocesses inherit unnecessary fds

See merge request dbus/dbus!50

Reviewed-by: rhabacker
Reviewed-by: pwithnall
2018-11-21 16:14:34 +00:00
Simon McVittie
06f467d689 Merge branch 'simplify-configure-checks' into 'master'
Simplify configure checks

See merge request dbus/dbus!10
2018-11-21 16:14:11 +00:00
Simon McVittie
94806fb2c7 Don't let dbus-daemon and its subprocesses inherit unnecessary fds
This should avoid test failures under CMake in which the
dbus-daemon inherits an unwanted fd from CMake's test framework, causing
the close-on-exec check before executing activated services to fail.

The dbus-daemon now marks all fds that it inherits, except for its
stdin, stdout and stderr, to be closed on exec. For completeness, the
dbus-daemons run by dbus-run-session and dbus-launch also now inherit
stdin, stdout, stderr and the pipes used to communicate with their
callers, but nothing else.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-20 19:09:18 +00:00
Simon McVittie
ebf487ef03 dbus-spawn-unix: If a fd is not close-on-exec, look it up in /proc/self/fd
In operating systems where /proc/self/fd works like it does on Linux
(Linux itself, and FreeBSD with Linux /proc emulation) this will give
us a clue about the fd that was leaked or opened incorrectly.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-20 18:56:26 +00:00
Simon McVittie
cdcf3c04dd FindDocBookXSL.cmake: Add
Taken from
<https://github.com/KDE/kdoctools/blob/master/cmake/FindDocBookXSL.cmake>

Signed-off-by: Simon McVittie <smcv@collabora.com>
Resolves: https://gitlab.freedesktop.org/dbus/dbus/issues/237
2018-11-20 18:29:39 +00:00
Simon McVittie
33bbf2c09d Merge branch '233-fix-broken-meinproc4' into 'master'
Fix broken meinproc4-based Docbook processing by using xsltproc instead

Closes #233

See merge request dbus/dbus!48

Reviewed-by: smcv
2018-11-20 17:13:31 +00:00
Ralf Habacker
a2aecf7d79 Add xsltproc usage to README.cmake 2018-11-20 15:57:21 +01:00
Ralf Habacker
06219344a8 Fix incorrect links in index html page used by cmake 2018-11-20 15:57:21 +01:00
Ralf Habacker
0764f08e7e Fix broken meinproc4 based docbook generating by already used xsltproc
Using xsltproc helps to reduce manual editing of xml doc and avoids
cyclic dependency (kdelibs depends on dbus and dbus depends on kdelibs).
It is available on all platforms (in the opposite to xmlto) and supports
freedesktop CI out of the box.

This commit adds docbook-xml and docbook-xsl as new dependency for cmake
and removes obsolate xmlto support, which depends on xsltproc.
2018-11-20 15:56:12 +01:00
Simon McVittie
2c765aafe8 Merge branch 'error-matches-bool' into 'master'
Add _DBUS_ASSERT_ERROR_XOR_BOOL, and a test for assertions

See merge request dbus/dbus!49

Reviewed-by: pwithnall
2018-11-20 13:53:56 +00:00
Simon McVittie
8c2eed45bd Merge branch 'desktop-file-leak-refactor' into 'master'
BusDesktopFile: Refactor logic to free the parser contents

See merge request dbus/dbus!43

Reviewed-by: pwithnall
2018-11-20 13:39:14 +00:00
Simon McVittie
c66552e1e0 Merge branch 'test-random-ints' into 'master'
marshal-recursive test: improve clarity, avoid undefined behaviour

See merge request dbus/dbus!46

Reviewed-by: pwithnall
2018-11-20 13:35:53 +00:00
Simon McVittie
a889e5aa8c Add a test for assertions
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-20 12:58:17 +00:00
Simon McVittie
77327b7bd8 _dbus_disable_crash_handling: Factor out from test-segfault
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-20 12:58:17 +00:00
Simon McVittie
16d2453ffa Improve diagnostics for error assertion failures
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-20 12:58:17 +00:00
Ralf Habacker
1acdf59619 Cleanup of cmake doc-related targets
There is now a top-level target "doc" that is always built.
Depending on the detected generators it depends on optional
targets like apidoc' and 'devhelp2'.
2018-11-20 13:56:39 +01:00
Simon McVittie
eef153e828 _DBUS_ASSERT_ERROR_XOR_BOOL: Add and use
As suggested by Philip Withnall in dbus!43.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-20 12:17:20 +00:00
Simon McVittie
3987f5a4bd BusDesktopFile: Refactor logic to free the parser contents
Now that we have _DBUS_STRING_INIT_INVALID, we can initialize
parser.data to a value that is safe for _dbus_string_free(), which
means we can put all the cleanup through a single code path that
definitely frees everything.

(This is just refactoring, not a correctness fix.)

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-20 12:01:12 +00:00
Ralf Habacker
bac2fd3aa4 ci-build.sh: Show file size in list of files to be able to compare generated file size 2018-11-20 12:59:23 +01:00
Simon McVittie
e1ad4e202d Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-20 11:32:54 +00:00
Simon McVittie
867c9bbe2e Merge branch 'va-copy' into 'master'
Don't check how to copy a va_list if we have va_copy; only use _DBUS_VA_COPY_ASSIGN on MSVC

See merge request dbus/dbus!35

Reviewed-by: rhabacker
2018-11-20 11:23:36 +00:00
Simon McVittie
e0f240e9e3 Merge branch 'containers-test-race' into 'master'
containers test: Wait a few more seconds for the socket to be deleted

See merge request dbus/dbus!47

Reviewed-by: pwithnall
2018-11-20 11:22:48 +00:00
Simon McVittie
2b229d0471 Merge branch 'keyring-undefined-shift' into 'master'
keyring: Avoid undefined out-of-range shift

See merge request dbus/dbus!45
2018-11-20 11:22:20 +00:00
Simon McVittie
269e0548e2 Merge branch 'desktop-file-leak' into 'master'
bus: Fix memory leaks when parsing .service files

See merge request dbus/dbus!42

Reviewed-by: pwithnall
2018-11-20 11:21:32 +00:00
Simon McVittie
04d9ee3437 Merge branch 'misc-leaks' into 'master'
Fix small memory leaks

See merge request dbus/dbus!41
2018-11-20 11:21:05 +00:00
Simon McVittie
c2ee90375a containers test: Wait a few more seconds for the socket to be deleted
Previously, we were waiting a few seconds for the dbus-daemon to stop
listening, then trying to connect again and asserting that it failed,
then immediately asserting that the socket had actually been deleted.
However, there is a race here: the dbus-daemon stops listening on the
socket, and then deletes it. If the test client wins the race by
probing to see whether the socket is present after the dbus-daemon
has stopped listening but before the dbus-daemon has deleted it, then
the test will fail.

This intermittently happens on Gitlab-CI, most recently in
<https://gitlab.freedesktop.org/smcv/dbus/-/jobs/45694>.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-19 13:53:52 +00:00
Simon McVittie
3241b4fe56 tests: Generate random values in unsigned integer space
When we're doing bitwise operations, addition with wraparound and
large left-shifts, it seems safer to use unsigned integers, where
the effect of overflow is well-defined (it wraps around). Signed
integer overflow is undefined behaviour, so compilers are free to
optimize by assuming that it cannot happen.

Detected by the undefined behaviour sanitizer (UBSan).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-19 12:28:25 +00:00
Simon McVittie
000ef530e8 tests: Remove unnecessary casts
If we have a variable "Type value;" then casting &value to (Type *) is
not useful, because it has that type already; it can only hide errors.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-19 12:28:25 +00:00
Simon McVittie
1f77c0a188 tests: Make it clearer that we avoid overflowing fixed-length buffers
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-19 12:28:22 +00:00