summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build: Don't assume we can set permissions on a directorycherry-pick-14f46d14Simon McVittie2019-04-181-1/+4
| | | | | | | | | | 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 (cherry picked from commit 14f46d14a0526f137f81a3fff5d32f26733323cd)
* Merge branch '1-12-logical-op' into 'dbus-1.12'Simon McVittie2019-04-173-7/+22
|\ | | | | | | | | Backport -Wlogical-op fixes to 1.12.x See merge request dbus/dbus!109
| * _dbus_get_is_errno_eagain_or_ewouldblock: Avoid warningDavid King2019-04-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EAGAIN and EWOULDBLOCK are documented to possibly be numerically equal, for instance in errno(3), and a simple logical OR check will trigger the -Wlogical-op warning of GCC. The GCC developers consider the warning to work as-designed in this case: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602 Avoid such a warning by explicitly checking if the values are identical. Fixes: https://gitlab.freedesktop.org/dbus/dbus/issues/225 Signed-off-by: David King <dking@redhat.com> Reviewed-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit a65319134209d39f5eb6e5425ec6a35fad05bcd7)
| * dbus-send: Avoid duplicated-branches warningDavid King2019-04-171-4/+7
| | | | | | | | | | | | | | | | | | Switch the order of the argument checks to avoid the -Wduplicated-branches warning. Signed-off-by: David King <dking@redhat.com> Reviewed-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit c0bf0d185d72e20e70da9a98e13f69e19f2a87d5)
| * desktop-file: Justify implementation of is_valid_section_name()Simon McVittie2019-04-171-1/+6
| | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 99580298f305e1e2426f0c016d797a1ff9ea0b79)
| * is_valid_section_name: Fix logical expressionDavid King2019-04-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | Group names in desktop files may contain all ASCII characters, except control characters and '[' and ']'. Rather than accepting all values, thanks to a logical operator confusion found by GCC warning -Wlogical-op, instead explicitly reject the invalid values. Signed-off-by: David King <dking@redhat.com> Fixes: https://gitlab.freedesktop.org/dbus/dbus/issues/208 (cherry picked from commit 3ef9e789c1b99f420078f4debabd4f5c4fa0a748)
* | Merge branch '1-12-code-coverage' into 'dbus-1.12'Simon McVittie2019-04-1711-7/+443
|\ \ | |/ |/| | | | | Adapt to API change in AX_CODE_COVERAGE version 28 See merge request dbus/dbus!108
| * Adapt to API change in AX_CODE_COVERAGE version 28Simon McVittie2019-04-1711-7/+443
|/ | | | | | | | | | | | | | | | | | AX_CODE_COVERAGE recently changed the way it embedded its Makefile rules in the output file: instead of using @CODE_COVERAGE_RULES@, users are now meant to include aminclude_static.am. The new AX_CODE_COVERAGE is only in the latest autoconf-archive release, version 2019.01.06, which is inconveniently new, so bundle everything we need for the moment. This requires us to stop using the deprecated CODE_COVERAGE_LDFLAGS (which we still used to support older versions of autoconf-archive) and replace them with CODE_COVERAGE_LIBS. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 2938c2125ebcd001e470aeac1ffac45b6b1ebe89) Closes: dbus#265
* configure.ac: Forbid AX_-prefixed patterns more selectivelySimon McVittie2019-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | We want to make autoconf fail early and with a user-comprehensible message if autoconf-archive isn't installed, rather than generating a configure script with syntax errors, or a configure script that runs successfully but doesn't do what we intended. However, autoconf-archive doesn't actually guarantee not to use AX_-prefixed shell variable names without m4_pattern_allow'ing them (unlike Autoconf, Automake, Libtool and pkg-config, which explicitly use m4_pattern_allow for variables with AC_, AM_, LT_ and PKG_ prefixes), so it isn't safe to assume that they won't be used. In particular, recent versions of AX_CHECK_GNU_MAKE appear to be using $AX_CHECK_GNU_MAKE_HEADLINE as a shell variable. Instead, specifically forbid the names of the finite list of macros that we actually use. Signed-off-by: Simon McVittie <smcv@collabora.com> Resolves: dbus#249 (cherry picked from commit ee09cc0acdc1c34e8ae999adf9922f3d0d66f407)
* Start working on dbus 1.12.14Simon McVittie2018-12-042-1/+6
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* 1.12.12dbus-1.12.12Simon McVittie2018-12-042-3/+5
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Start supporting Debian 10 'buster', currently under developmentSimon McVittie2018-12-042-0/+9
| | | | | | | | 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> (cherry picked from commit 28c27349e252e33215e21b570d41853badd770ef)
* CI: Exercise maintainer-only documentation buildSimon McVittie2018-12-042-0/+33
| | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit bcc34caa43d8e5dba8266cf163d8a24e4fb55dce)
* CI: Stop building on Ubuntu 14.04 'trusty'Simon McVittie2018-12-043-30/+8
| | | | | | | | | | 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> (cherry picked from commit 0c553afcd9c79bc19ffdad67980f421def5d0613)
* ci-build.sh: Show file size in list of files to be able to compare generated ↵Ralf Habacker2018-12-041-1/+1
| | | | | | file size (cherry picked from commit bac2fd3aa458c7dfd002f7ec96a245d630c5830f)
* CI: Remove unimplemented --with-glib optionSimon McVittie2018-12-041-1/+0
| | | | | | | dbus has never actually had this option. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit e0a1bfb26a9f72e8fe59af770d394a90810a7cea)
* CI: List attributes, sizes etc. of installed files, not just namesSimon McVittie2018-12-041-1/+1
| | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit d71049799a3f87de95151e00c667c05dd0b5386c)
* doc: Remove obsolete message about man2htmlSimon McVittie2018-12-041-1/+0
| | | | | | | We no longer run man2html. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit f134e2d2c7ae53965dfba0c85bf76ad38fb7fa4c)
* CONTRIBUTING.md: Update and rewriteSimon McVittie2018-12-041-217/+237
| | | | | | | | | | | This file hadn't kept up with reality, and needs updating for Gitlab. Take the opportunity to rewrite it. Much of the text, particularly about commit messages, was taken from Wayland's contributing guide (thanks to Ander Conselvan de Oliveira, Bryce Harrington, Eric Engestrom, Pekka Paalanen and Daniel Stone). Signed-off-by: Simon McVittie <smcv@collabora.com>
* CONTRIBUTING: Reformat as MarkdownSimon McVittie2018-12-045-61/+66
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CONTRIBUTING: Remove all trailing whitespaceSimon McVittie2018-12-041-16/+16
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Rename HACKING to CONTRIBUTINGSimon McVittie2018-12-045-5/+6
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* NEWS: Refer to GitlabSimon McVittie2018-12-031-0/+5
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Update NEWSSimon McVittie2018-12-031-0/+9
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* activation: Don't leak if delivering activation message is forbiddenSimon McVittie2018-12-031-0/+1
| | | | | | | | | | | | | 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
* Update NEWSSimon McVittie2018-11-161-0/+7
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* dbus-daemon test: Allow much longer for pending fd timeoutSimon McVittie2018-11-161-3/+7
| | | | | | | | | | | | | | | | | | | | The timeout we're using here is 0.5s (500ms), but the actual time taken is unbounded, because the OS scheduler might not schedule our process for an arbitrary length of time after we become runnable. We previously allowed up to 1 second, but in the CI jobs for dbus!9 and dbus!18 we've seen this take up to 3.4 seconds (presumably because other tests, or other jobs running on the same shared infrastructure, starved this process). Allow up to 10 seconds to guard against spurious failures. The timeout used in the production system.conf is 150 seconds (2½ minutes), and we're only using the shorter 500ms timeout here to make the test complete more quickly, so ±10 seconds is relatively insignificant: the main thing is that it's finite. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 20e6eb7cd1f9c2ad941bd62c8f1f71712377a96e)
* build: Never use poll() on Darwin family (macOS, etc.) or InterixSimon McVittie2018-11-162-28/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing a runtime check in configure.ac (AC_RUN_IFELSE) has several disadvantages: * It doesn't work when cross-compiling. For example, if we build macOS binaries on a Linux system, we'd assume that poll() works, but in fact it won't. * It checks the build system capabilities, but that is not necessarily appropriate if (for example) a macOS 10.10 user builds binaries that could be used by macOS 10.12 or macOS 10.9 users. * It checks for one specific failure mode, but macOS seems to have a history of various implementation issues in poll(). * If we want it to work in CMake, we have to duplicate it in the CMake build system. None of these is a showstopper on its own, but the combination of all of them makes the current approach to avoiding the broken poll() on macOS look unreliable. libcurl, a widely-portable library making extensive use of sockets, specifically doesn't use poll() on Darwin (macOS, iOS, etc.) or on Interix; let's follow their example here. See also https://bugzilla.gnome.org/show_bug.cgi?id=302672 and https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/ for some relevant history. Signed-off-by: Simon McVittie <smcv@collabora.com> Resolves: https://gitlab.freedesktop.org/dbus/dbus/issues/232 (cherry picked from commit 0414ea65ca8196e328da09c3a2324d7765fba8c4)
* Update NEWSSimon McVittie2018-10-051-0/+10
|
* ci: Use a separate ccache for each CI jobSimon McVittie2018-10-041-0/+1
| | | | | | | This should avoid them overwriting each other. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit e3fb085886d26aa84a0ce1bfe441244206c87e6f)
* ci: Mark many Gitlab jobs to be run manuallySimon McVittie2018-10-041-0/+7
| | | | | | | | | | freedesktop.org Gitlab doesn't currently have enough test runners available to run all of this every time. For higher-risk changes (for example those that change the build system) we can run the complete set through the web UI. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit a2f416c2896062755c285f2d1fe4a2dc03455aa1)
* ci: Reshuffle mingw jobs so we test different combinationsSimon McVittie2018-10-041-6/+6
| | | | | | | We test the combinations that we don't test on Travis-CI. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit a6d926b805a1a38567a70490b3e8d7d6c932d1f5)
* ci: Use ccache to speed up repeated buildsSimon McVittie2018-10-043-0/+12
| | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit d0728fd06e5a2302e7596e3df56b68b0a0834fd7)
* ci: Add Gitlab-CI configurationSimon McVittie2018-10-041-0/+132
| | | | | | | | | | | | This uses the same shell scripts as Travis-CI, with slightly different settings. We use Docker containers for all our Gitlab-CI runs, so take the opportunity to use Debian 9 'stretch' as our baseline, and relegate Ubuntu 14.04 'trusty' to to a secondary build. Signed-off-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108177 Acked-by: Philip Withnall <withnall@endlessm.com> (cherry picked from commit 60933c09e9e891f74f0102fabe22d29a1a7ae5c5)
* ci: Explicitly install cmakeSimon McVittie2018-10-041-0/+1
| | | | | | | | | | Travis-CI workers have cmake preinstalled, but Gitlab-CI Docker images typically don't. Signed-off-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108177 Acked-by: Philip Withnall <withnall@endlessm.com> (cherry picked from commit 907832e00849ca454322052981dbb122ea537506)
* ci: Teach ci-install.sh to install wine on Debian 9 'stretch'Simon McVittie2018-10-041-3/+15
| | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108177 Acked-by: Philip Withnall <withnall@endlessm.com> (cherry picked from commit 408b222a9fc61327cd7be385b6705f30f0c38802)
* travis-ci: Add cross building support for mingw 64 bit compilerRalf Habacker2018-10-044-25/+67
| | | | | | | Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de> Reviewed-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105662 (cherry picked from commit d22e7901b555a0bfb5e06fb2463d839a276c7482)
* sysdeps-win: Print word-size-dependent offset correctlyRalf Habacker2018-10-041-1/+1
| | | | | | | | | | AddrPC.Offset is the same size as a pointer, but previously we printed it as though it was the same size as a long, which is 32 bits on 64-bit Windows. Reviewed-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105662 (cherry picked from commit 577813cf3a89df804efa6d85a1c5415ba12806ec)
* dbus-transport-socket: Correctly print DBusSocket with DBUS_SOCKET_FORMATRalf Habacker2018-10-041-1/+1
| | | | | | | | | Previously, on 64-bit Windows we were passing a 32-bit int where the format string expects a 64-bit SOCKET. Reviewed-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105662 (cherry picked from commit 18d4ff664491c17664b9f88c06d9338cd3750120)
* Update NEWSSimon McVittie2018-08-301-0/+4
|
* Reference the freedesktop.org Code of ConductSimon McVittie2018-08-301-0/+11
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Update NEWSSimon McVittie2018-08-301-0/+4
|
* Do not apply __attribute__((__malloc__)) to dbus_realloc()Simon McVittie2018-08-301-1/+0
| | | | | | | | | | | | | | | | | | As noted in GLib commit c879f50f, gcc's interpretation of the malloc attribute has become more strict over time, which could result in miscompilation. The new definition is that in addition to assuming that the returned memory block is newly-allocated, gcc now assumes that it does not contain any valid pointers. This is OK for uninitialized or zero-initialized memory returned by dbus_malloc() or dbus_malloc0(), but not valid for dbus_realloc(), which might be used for a dynamically-sized array of (structures containing) valid pointers. See https://gitlab.gnome.org/GNOME/glib/issues/1465 Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107741
* Update NEWSSimon McVittie2018-08-301-1/+3
|
* server-unix: Don't leak address of systemd server on successSimon McVittie2018-08-291-0/+1
| | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107320 Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> (cherry picked from commit d98c43c697fbeb104463dcf2da36d0d855bfb367)
* bus: Free address (from --address) when we have finished using itSimon McVittie2018-08-291-0/+1
| | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107320 Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> (cherry picked from commit 7ae750c4e887b2d63f87caaf2162125ec3217fcc)
* 1.12.11Simon McVittie2018-08-032-1/+6
|
* 1.12.10dbus-1.12.10Simon McVittie2018-08-022-3/+5
|
* Update NEWSSimon McVittie2018-08-021-0/+6
|
* validate_body_helper: Bounds-check before validating booleansSimon McVittie2018-08-021-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Running the "embedded tests" through valgrind revealed that before this commit, we would have been willing to read up to 3 bytes off the end of a message if the message is truncated part way through a boolean. Any practical allocator will round up allocations to the next 32-bit (or larger) boundary, so in practice this will not leave the memory buffer (and in particular did not crash during unit testing), but it could read uninitialized contents. On little-endian CPUs, an attacker might be able to use this to learn whether up to 3 bytes of uninitialized memory in the dbus-daemon were all-zero (their crafted message would be relayed) or not (their connection would be disconnected for sending an invalid message). On big-endian CPUs, an attacker might be able to use this to learn whether up to 3 bytes were all-zeroes (relayed to a cooperating peer), 0-2 bytes of all-zeroes followed by 0x01 (relayed to a cooperating peer), or something else (disconnected). This is not believed to be exploitable to leak interesting information. Fixes: 62e46533 "hardcode dbus_bool_t to 32 bits" Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107332 Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Thiago Macieira <thiago@kde.org> Reviewed-by: Philip Withnall <withnall@endlessm.com> (cherry picked from commit e93a775e68daeda5c95984452aee6327e31c17dd)