Commit graph

6753 commits

Author SHA1 Message Date
Simon McVittie
08e175a511 Revert "CI: Remove an obsolete workaround"
It appears some freedesktop CI runners still have /builds/dbus/dbus
owned by a different user ID.
This reverts commit 3f6400b8b9.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-06-06 11:01:00 +01:00
Simon McVittie
803e8aff8e README: Mention not opening merge requests for security issues
The dbus maintainers can open confidential merge requests by using a
private git repository, but other contributors (including most security
researchers) cannot, so the safest simple recommendation is no merge
requests.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-06-06 10:41:35 +01:00
Simon McVittie
c8a4aeb4ba README: Adjust wording
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-06-06 10:39:40 +01:00
Simon McVittie
6801627502 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-06-05 19:49:31 +01:00
Simon McVittie
b6f081ee2c Merge branch 'readme-meson-steps' into 'master'
README: add meson build steps

See merge request dbus/dbus!402
2023-06-02 15:09:12 +00:00
Ahmed Abdelfattah
9f33a2d097 README: add meson build steps
* Add meson build instructions and reorder the README sections
* Fix a small typo for the security section

Signed-off-by: Ahmed Abdelfattah <a.abfattah@gmail.com>
2023-05-16 12:05:01 +00:00
Simon McVittie
a6654eae7f Merge branch 'wip/smcv/reinstate-windows-ci' into 'master'
Revert "CI: Disable native Windows builds for now"

Closes #456

See merge request dbus/dbus!406
2023-05-16 11:01:27 +00:00
Simon McVittie
d994f85f4d Revert "CI: Disable native Windows builds for now"
It seems they do work, it was just very slow to build the image.

This reverts commit a3a14ea09e.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/456
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-16 11:47:16 +01:00
Simon McVittie
20c1eb5216 Merge branch 'read_procfs' into 'master'
Support /proc in _dbus_file_get_content

See merge request dbus/dbus!401
2023-05-15 20:16:02 +00:00
Luca Boccassi
4364b9ebb3 Support /proc in _dbus_file_get_content
procfs has special semantics: most files are 0 size,
only one read can be done on a file, and they are
not larger than 4MB. Enhance _dbus_file_get_content()
so that we can read files from /proc with it.

Signed-off-by: Luca Boccassi <bluca@debian.org>
2023-05-15 19:06:54 +00:00
Simon McVittie
1a74c43c0e Merge branch 'use_func_macro' into 'master'
do not use __FUNCTION__ directly

See merge request dbus/dbus!404
2023-05-15 19:01:40 +00:00
Barnabás Pőcze
d42c42d999 dbus-spawn-win: use _DBUS_FUNCTION_NAME instead of __FUNCTION__
dbus-internals.h already defines a macro which expands to the name
of the current function based on C standard version, etc. So use
that instead of hard-coding `__FUNCTION__`.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
2023-05-15 18:56:09 +00:00
Barnabás Pőcze
0098e30602 dbus-sysdeps-win: do not log function name twice
`_dbus_verbose()` already logs the function name,
do not log it again in the message.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
2023-05-15 18:56:09 +00:00
Barnabás Pőcze
e8af583857 dbus-internals: use _DBUS_FUNCTION_NAME in _dbus_verbose()
dbus-internals.h already defines a macro which expands to the name
of the current function based on C standard version, etc. So use
that instead of hard-coding `__FUNCTION__`.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
2023-05-15 18:56:09 +00:00
Simon McVittie
16232bdd33 Merge branch 'dbus_msg_iter_fix_memleak' into 'master'
dbus_message_iter_get_signature: Fix two memory leaks

See merge request dbus/dbus!403
2023-05-15 18:55:43 +00:00
Barnabás Pőcze
b5a87e214f dbus_message_iter_get_signature: Fix two memory leaks on OOM
Previously,  `retstr` would not be freed when `_dbus_string_append_len()`
or `_dbus_string_steal_data()` failed.

Fix those by:
 * jumping to `_dbus_string_free()` when `_dbus_string_append_len()` fails
 * ignoring the return value of `_dbus_string_free()`.

The latter works because in case of failure, `ret` will be set
to NULL by `_dbus_string_steal_data()`.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
2023-05-12 18:16:47 +00:00
Simon McVittie
a841b8ec8f Merge branch 'wip/smcv/fix-ci' into 'master'
Fix CI

See merge request dbus/dbus!405
2023-05-12 18:06:36 +00:00
Simon McVittie
a3a14ea09e CI: Disable native Windows builds for now
These are extremely slow (the image build is currently at 36 minutes
and still running) which is standing in the way of us having functional
CI at all. They can be re-enabled if someone will maintain them.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 18:35:13 +01:00
Simon McVittie
21f2f4f757 CI: Disable "opensuse mingw64 cmake debug" until #455 is fixed
Having some CI is better than having no CI.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 18:32:35 +01:00
Simon McVittie
a56de4684b CI: Avoid using a no-op download location that gives a 403 error
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 17:48:48 +01:00
Simon McVittie
b1712683ad CI: Make creation of user idempotent
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 17:47:25 +01:00
Simon McVittie
a6da40b206 CI: Disable OOM-testing code paths for Meson, matching Autotools and CMake
Repeatedly re-running each test with different malloc() calls failing
is really slow, and in particular this is making
dbus:dbus / marshal-recursive time out on freedesktop.org CI.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 15:40:45 +01:00
Simon McVittie
66a4119fb9 CI: Install mingw64-cross-cmake in openSUSE image
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 15:40:45 +01:00
Simon McVittie
e271f286e3 CI: Sort lists of openSUSE packages alphabetically
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 15:40:45 +01:00
Simon McVittie
7a6e9f5beb CI: Update Windows runners
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 15:40:45 +01:00
Simon McVittie
3f6400b8b9 CI: Remove an obsolete workaround
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 15:40:45 +01:00
Simon McVittie
3629e8a2e4 CI: Update to current fdo CI templates
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 15:40:45 +01:00
Simon McVittie
4a514593d6 CI: Only run for pushes to dbus
In practice the pipeline is going to fail for namespaces other than
dbus, so don't waste time on trying to run it there; only run the
detached pipeline for the MR.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 15:40:45 +01:00
Simon McVittie
dbbd4a32f1 CI: Run a detached pipeline for merge requests
After abuses of fdo infrastructure were mitigated in
freedesktop/freedesktop#540, contributors cannot usually run pipelines
in their own forks of dbus.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-05-12 15:00:34 +01:00
Simon McVittie
35ade3c8f7 Merge branch 'cmake_unistd' into 'master'
cmake: add missing HAVE_SYS_SYSCALL_H define

See merge request dbus/dbus!400
2023-03-21 20:21:22 +00:00
Luca Boccassi
62c870aa5e cmake: add missing HAVE_SYS_SYSCALL_H define
Signed-off-by: Luca Boccassi <bluca@debian.org>
2023-03-20 22:10:41 +00:00
Simon McVittie
37cd0d7619 Merge branch 'fix-dbus-api-design-wrong-closing-tag' into 'master'
doc/dbus-api-design: fix wrong closing tag

See merge request dbus/dbus!396
2023-03-02 14:33:07 +00:00
Yen-Chin, Lee
e80f4cbf78 doc/dbus-api-design: fix wrong closing tag
The original code of 'ProgressNotification' had a wrong closing tag,
which should use '</signal>' instead of '</method>'

Signed-off-by: Yen-Chin, Lee <coldnew.tw@gmail.com>
2023-03-02 15:31:28 +08:00
Simon McVittie
ad401d5e14 Merge branch 'fix-issue-445' into 'master'
CI: Make sure we always have a messagebus user, even if the dbus package isn't installed

Closes #445

See merge request dbus/dbus!394
2023-02-21 20:40:19 +00:00
Ralf Habacker
344a47a41f tools/ci-install.sh: Make sure we always have a messagebus user, even if the dbus package isn't installed
This fixes a CI installation issue with the meson build system on openSUSE
distribution.

Fixes #445
2023-02-21 10:43:28 +01:00
Simon McVittie
4e8bf2d05a Start 1.15.6
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-02-08 16:53:37 +00:00
Simon McVittie
d84b1cf1ed Update AUTHORS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-02-08 16:51:33 +00:00
Simon McVittie
6156578eaa Prepare v1.15.4
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-02-08 12:03:30 +00:00
Simon McVittie
50852eb085 NEWS: Add #421
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-02-08 12:03:30 +00:00
Ralf Habacker
8d54aa2ffd _dbus_string_skip_blank(): Let the final assert follow the previous search
This appears to have been a copy/paste mistake. If only blanks (defined as
spaces or tabs) were removed, then it cannot be right to check for white
space (defined as spaces, tabs, carriage return or linefeed) afterwards.

If libdbus was compiled with assertions enabled, then this is a
denial-of-service issue for dbus-daemon or other users of DBusServer:
an unauthenticated user with access to the server's socket can send
whitespace that triggers this assertion failure. We recommend that
production versions of dbus, for example in OS distributions, should be
compiled with checks but without assertions.

[smcv: expanded commit message]

Thanks: Evgeny Vereshchagin
Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/421
2023-02-08 12:03:30 +00:00
Ralf Habacker
8189a74c6c Add test for _dbus_string_skip_blank()
[smcv: Fix a memory leak]

Reproduces: https://gitlab.freedesktop.org/dbus/dbus/-/issues/421
2023-02-08 12:03:19 +00:00
Simon McVittie
7a30ab94e6 Update NEWS for 1.15.x
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-02-08 10:32:54 +00:00
Simon McVittie
3b872b44eb Merge branch 'add-ci-build-libdbus-subproject' into 'master'
gitlab-ci: build libdbus as subproject

See merge request dbus/dbus!388
2023-02-07 10:05:16 +00:00
Daniel Wagner
b1e8793e8d gitlab-ci: build libdbus as subproject
Test it's possible to consume libdbus as a subproject.

Suggested-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2023-02-07 09:07:32 +01:00
Daniel Wagner
cd1a9bb09a build: Use list for dbus_static_flags
Meson complains that it is only allowed to concatenate list to lists and
not strings.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Origin: https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/388
2023-02-06 14:02:55 +00:00
Simon McVittie
90a9482cca Merge branch 'add-test-header-fields' into 'master'
cmake: add missing test for header-fields

See merge request dbus/dbus!322
2023-02-06 13:58:57 +00:00
Ralf Habacker
15b6b53ff9 .gitlab-ci.yml: exclude non-functioning test 'header-fields' in job 'windows vs15-64 cmake'
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2023-02-06 13:43:59 +00:00
Ralf Habacker
57ab4c7a48 cmake: add missing test for header-fields
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2023-02-06 13:43:59 +00:00
Simon McVittie
7501a04401 Merge branch 'gitlab-ci' into 'master'
CI: Avoid changing uid, except when running installed-tests

Closes #447

See merge request dbus/dbus!392
2023-02-06 13:36:43 +00:00
Simon McVittie
25e1512c17 CI: Re-run some tests as root or as non-root, as appropriate
On Gitlab-CI we're always running the overall script as root (and
therefore we'll only enter the code path to re-run as non-root),
but when using these scripts for manual testing they might be run as
non-root to begin with.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-02-06 13:24:11 +00:00