summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
5 daysMerge branch 'update_api_design_doc' into 'master'HEADmasterSimon McVittie1-5/+5
doc/dbus-api-design: Update Bustle URL and replace deprecated D-Feet with d-spy See merge request dbus/dbus!460
5 daysdoc/dbus-api-design: Replace D-Feet with d-spyLudovico de Nittis1-4/+4
D-Feet is no longer maintained and its closest replacement, as mentioned in the D-Feet page https://wiki.gnome.org/Apps/DFeet, is d-spy. The project description doesn't need to be updated because d-spy provides the same set of features that D-Feet had. Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
5 daysdoc/dbus-api-design: Update Bustle URLLudovico de Nittis1-1/+1
gitlab.fd.o/bustle/bustle points to the old archived project. The new version has been rewritten in Rust and is now hosted at gitlab.gnome.org/World/bustle Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
2024-04-17Merge branch 'cmake-fixes' into 'master'Ralf Habacker2-2/+15
cmake: complete installed files Closes #504 See merge request dbus/dbus!459
2024-04-16cmake: Inclusion of a link in html overview file correctedRalf Habacker2-1/+6
The link for api documentation is now only inserted into the html overview file when it is built.
2024-04-16cmake: Add missing docbook-based documentationRalf Habacker1-1/+9
With this commit, the html documentation for dbus-faq, dbus-specification, dbus-test-plan, dbus-tutorial is now also created and installed.
2024-04-09Merge branch 'autolaunch-regression' into 'master'Ralf Habacker1-1/+1
sysdeps-win: Fix autolaunch: regression on Windows Closes #503 See merge request dbus/dbus!458
2024-04-06sysdeps-win: Fix autolaunch: regression on WindowsThomas Sondergaard1-1/+1
Commit f20a05f60f6f included in dbus-1.15.0 broke autolaunch: on Windows. autolaunch_custom_command_line_parameter shall be initalized to null as it is later used in only one place in the code, with this ternary: autolaunch_custom_command_line_parameter ? autolaunch_custom_command_line_parameter : "--session" Closes #503
2024-01-29Merge branch 'master' into 'master'Simon McVittie2-4/+4
bus/dir-watch:Do not crash when reloading configuration with > 128 dirs Closes #481 See merge request dbus/dbus!453
2024-01-29Do not crash when reloading configuration with > 128 dirshongjinghao2-4/+4
When `dbus-daemon` sets more than 128 directories for `XDG_DATA_DIRS`, none of the elements in `new_dirs` will be `NULL`, which resulted in these loops reading out-of-bounds (undefined behaviour). In practice this led to a crash. To avoid this, make sure to stop iteration at the end of the array. [smcv: Expanded commit message] Resolves: dbus/dbus#481
2024-01-15Merge branch 'meson-visual-studio-2022' into 'master'Simon McVittie1-1/+1
meson: Use check_header to confirm headers work Closes #494 See merge request dbus/dbus!454
2024-01-04meson: Use check_header to confirm headers workThomas Sondergaard1-1/+1
instead of using has_header use check_header to confirm the header works. This is necessary to get the meson build to work with Visual Studio 2022. It has <stdatomic.h> but it does not actually work when compiling a C program. A minimal C program that include <stdatomic.h> fails with the following errors: C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(36): error C2061: syntax error: identifier 'atomic_bool' C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(36): error C2059: syntax error: ';' C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(37): error C2061: syntax error: identifier 'atomic_char' C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(37): error C2059: syntax error: ';' ... ... check_header is consistent with CMake's check_include_file(stdatomic.h HAVE_STDATOMIC_H) which is why the CMake-based build of dbus works with Visual Studio 2022, while the meson build doesn't. Fixes #494
2023-12-01Merge branch 'issue489' into 'master'Ralf Habacker2-6/+12
CI: Fix more test failures Closes #489 and #488 See merge request dbus/dbus!452
2023-12-01CI: Set language environment variables to safe valuesSimon McVittie1-0/+6
Recent versions of glibc support C.UTF-8 natively, and both Debian and openSUSE (which we use for our CI) have been patching it into our glibc versions for several years before that. Helps: https://gitlab.freedesktop.org/dbus/dbus/-/issues/488 Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-12-01CI: Don't re-run the tests when preparing to build as a subprojectSimon McVittie1-1/+1
After running the test suite, we don't need (or want) to re-run the test suite as a side-effect of producing a dist tarball. Historically, this test-case used Autotools `make dist`, not `make distcheck`, but when we removed the Autotools build system, it was replaced with `meson dist` (similar to Autotools `make distcheck`). Change that to `meson dist --no-tests`, which is more like Autotools `make dist` as originally intended. In particular, when we re-ran the test suite, we weren't filtering out the time-consuming and timeout-prone tests that emulate malloc() failures, which we don't normally intend to run in CI. Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/489 Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-12-01CI: Remove meson-dist and cmake-dist build systemsSimon McVittie2-5/+5
Before we removed the Autotools build system, these meant: do a `make dist` with Autotools, then unpack the resulting tarball, and build it with Meson or CMake (as appropriate). This was important because the contents of an Autotools `make dist` differed significantly from what's in git: only the files that were explicitly declared as sources in the Autotools build system were distributed, and Autotools would also add its own generated cruft. Now that we're doing releases with Meson, the official source release artifact is basically `git archive`, so there's much less need to distinguish between official source releases and what's in git, and these variant build systems became simple aliases for meson and cmake. Remove those aliases from tools/ci-build.sh, and stop using them in .gitlab-ci.yml. Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-12-01Merge branch 'fix-ci-build' into 'master'Simon McVittie2-15/+10
CI: force update opensuse image to a newer version Closes #487 See merge request dbus/dbus!451
2023-12-01CI: on openSUSE use cmake from the windows:mingw project instead from ↵Ralf Habacker1-12/+7
devel:tools:building Since this repo is already used for mingw builds, the additional repo and associated problems can be avoided.
2023-12-01CI: add hint when to update the build imagesRalf Habacker1-3/+3
2023-12-01CI: force update opensuse image to a newer versionRalf Habacker1-1/+1
Since a time-frozen image is used in the CI, the tag must be changed to update to a newer minor version. Fixes #487
2023-09-01Update NEWSSimon McVittie1-1/+11
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-09-01Merge branch 'remove-autotools-support' into 'master'Simon McVittie24-4778/+16
Remove autotools build support Closes #443 See merge request dbus/dbus!378
2023-09-01README,INSTALL: remove references to the autotools build systemRalf Habacker2-8/+2
2023-09-01.gitignore: remove autotools related files and patternRalf Habacker1-23/+0
2023-09-01Remove autotools related filesRalf Habacker18-4595/+0
2023-09-01Remove autotools support from CI jobsRalf Habacker3-152/+14
The 'debian mingw32 autotools debug' job was replaced with a corresponding meson related job named 'debian mingw32 meson debug' and the remaining autotools related jobs were removed. The drop in replacement job for 'debian mingw64 autotools' is 'debian mingw32 meson' and is now build by default.
2023-08-24Merge branch 'fix-y2038' into 'master'Simon McVittie20-65/+125
time: use dbus_int64_t for seconds instead of long See merge request dbus/dbus!444
2023-08-23time: use dbus_int64_t for seconds instead of longAlexander Kanavin20-65/+125
On 32 bit systems long will overflow in 2038, causing complete breakage. This is confirmed by running dbus's test suite on a 32 bit system with system time set to 2040 (and configured to use 64 bit time_t of course). Note that both timespec and timeval are specified with time_t for the seconds component. This should propagate everywhere where that data is passed and stored, but previously _dbus_get_monotonic_time() and _dbus_get_monotonic_time() would truncate it to long. Also add a function for parsing dbus_int64_t from files, as existing functions can only handle long. Signed-off-by: Alexander Kanavin <alex@linutronix.de>
2023-08-21Start 1.15.10 developmentSimon McVittie3-2/+7
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-21Prepare v1.15.8dbus-1.15.8Simon McVittie4-9/+19
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-21AUTHORS: UpdateSimon McVittie2-1/+5
Automated change: ninja -C ${builddir} maintainer-update-authors Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-21Update NEWSSimon McVittie1-0/+7
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-21Merge branch 'issue343-3' into 'master'Simon McVittie2-38/+53
sysdeps: Improve error reporting for looking up a user See merge request dbus/dbus!442
2023-08-21userdb: Use "goto out" pattern for _dbus_groups_from_uid()Simon McVittie1-9/+9
This makes it easier to verify that _dbus_user_database_unlock_system() is called on all exit paths. The only early-return is when locking the userdb failed. Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-21sysdeps: Improve error reporting for looking up a userSimon McVittie1-7/+29
Our implementation always assumed that both code paths set errno, but according to their API documentation, getpwnam_r and getpwuid_r actually don't: they *return* a code from the same pseudo-enum as errno. They also return 0 (but with a NULL struct passwd) if the user is not found, which these APIs don't count as an error (but we do). Similarly, in the legacy getpwnam/getpwuid code path, it is unspecified whether looking up a nonexistent user will set errno or not. Having retrieved an errno-like error code, we might as well use it in the human-readable message and not just the machine-readable code, because the human-readable message is what ends up in the system log. Helps: https://gitlab.freedesktop.org/dbus/dbus/-/issues/343 Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-21sysdeps: Give a more useful error if unable to resolve a numeric uidSimon McVittie1-4/+13
If we want to get the struct passwd corresponding to uid 42, but we can't, it's much better to say User ID "42" unknown rather than User "???" unknown Helps: https://gitlab.freedesktop.org/dbus/dbus/-/issues/343 Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-21sysdeps-unix: Deduplicate error handling for getpwnam and getpwnam_rSimon McVittie1-25/+9
The only difference between these was that we only needed to allocate and free buf in the getpwnam_r case. We expect that all reasonable Unix platforms will have getpwnam_r (it's in POSIX) so adding a no-op dbus_free(NULL) to the getpwnam code path seems harmless. This will be helpful when we make the error handling better, in a subsequent commit. Helps: https://gitlab.freedesktop.org/dbus/dbus/-/issues/343 Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-21Merge branch 'issue473' into 'master'Simon McVittie1-10/+27
bus: Don't crash if inotify fails, even under DBUS_FATAL_WARNINGS=1 Closes #473 See merge request dbus/dbus!441
2023-08-18bus: Don't crash if inotify fails, even under DBUS_FATAL_WARNINGS=1Simon McVittie1-10/+27
When running tests, we use DBUS_FATAL_WARNINGS=1 to make the tests fail on internal errors. Failing to set up inotify is not really an internal error: it's more like an environmental error, which can occur for reasons outside our control. Instead, log using bus_context_log(), which never crashes the process and always just logs a warning. Signed-off-by: Simon McVittie <smcv@collabora.com> Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/473
2023-08-18Update NEWSSimon McVittie1-0/+10
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-18Merge branch 'issue343' into 'master'Simon McVittie14-19/+225
Fix error behaviour on reload if a connection has an unknown uid See merge request dbus/dbus!417
2023-08-18bus: When failing to reload client policy, continue iterationSimon McVittie3-2/+36
If we have a large number of connections to the bus, and we fail to reload the policy for one of them (perhaps because its uid no longer exists in the system user database), previously we would crash, which is obviously unintended. After the previous commit, we would stop iteration through the list of client connections, which doesn't seem great either: one bad connection shouldn't prevent us from reloading the rest of our state. Instead, let's distinguish between new connections (where we want failure to establish a security policy to be fatal), and pre-existing connections (where the current security policy is presumably good enough to keep using if we have nothing better). If we're unable to reload the policy for a pre-existing connection, log a warning and carry on iterating. Helps: https://gitlab.freedesktop.org/dbus/dbus/-/issues/343 Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-18test: Add a targeted test for _dbus_unix_groups_from_uid()Simon McVittie4-0/+154
Helps: https://gitlab.freedesktop.org/dbus/dbus/-/issues/343 Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-18userdb: Add proper error reporting when getting groups from a uidSimon McVittie8-17/+35
Previously, if dbus_connection_get_unix_user() succeeded but _dbus_unix_groups_from_uid() failed, then bus_connection_get_unix_groups() would incorrectly fail without setting the error indicator, resulting in "(null)" being logged, which is rather unhelpful. This also lets us distinguish between ENOMEM and other errors, such as the uid not existing in the system's user database. Fixes: 145fb99b (untitled refactoring commit, 2006-12-12) Helps: https://gitlab.freedesktop.org/dbus/dbus/-/issues/343 Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-18Merge branch 'issue343-minimal' into 'master'Simon McVittie1-5/+9
bus: Don't crash if bus_context_create_client_policy() fails Closes #343 See merge request dbus/dbus!435
2023-08-16bus: Don't crash if bus_context_create_client_policy() failsPeter Benie1-5/+9
If policy creation fails, we can't usefully leave a NULL policy in the BusConnectionData. If we did, the next attempt to reload policy would crash with a NULL dereference when we tried to unref it, or with an assertion failure. One situation in which we can legitimately fail to create a client policy is an out-of-memory condition. Another is if we are unable to look up a connection's supplementary groups with SO_PEERGROUPS, and also unable to look up the connection's uid's groups in the system user database, for example because it belongs to a user account that has been deleted (which is sysadmin error, but can happen, particularly in automated test systems) or because a service required by a Name Service Switch plugin has failed. Keeping the last known policy is consistent with what happens to all the connections that are after this one in iteration order: after we early-return, all of those connections retain their previous policies (which doesn't seem ideal either, but that's how this has always worked). [smcv: Add commit message] Co-authored-by: Simon McVittie <smcv@collabora.com> Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/343
2023-08-15Update NEWSSimon McVittie1-2/+12
2023-08-15Add REUSE copyright/license information for binary message blobsSimon McVittie8-0/+20
Most of these binary blobs is mechanically derived from the corresponding .hex file, which is hand-written. boolean-has-no-value.message-raw is presumably either hand-constructed or fuzzer-generated: it was committed by a Red Hat employee and never altered, so I've assumed Red Hat is the copyright holder. Permission was already granted by Red Hat to relicense their dbus contributions under the MIT (Expat) license. Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-15subprojects: Move SPDX information from inline to .reuse/dep5Simon McVittie3-6/+9
This makes updates with `meson wrap update` more straightforward. Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-15Merge branch 'issue439' into 'master'Simon McVittie1-1/+1
meson: Specify that build-machine compiler for C++ is not required Closes #439 See merge request dbus/dbus!432