Commit graph

6122 commits

Author SHA1 Message Date
David King
7dc6b64d98 test/thread-blocking.c: Fix a memory leak
Free name inside the for loop. Found by Coverity.

Bug-RedHat: https://bugzilla.redhat.com/show_bug.cgi?id=1938701
2021-10-29 18:03:13 +00:00
Simon McVittie
5c377fc995 Merge branch 'cmake-format-fixes' into 'master'
CMake-format fixes

See merge request dbus/dbus!213
2021-10-29 16:29:45 +00:00
Ralf Habacker
ee24cadf2e Apply cmake formatting rules 2021-10-25 15:56:46 +02:00
Ralf Habacker
151574605e tools/cmake-format: fix sed warning Expression #1, char 25: unknown option for »s« in --all mode 2021-10-25 15:56:09 +02:00
Ralf Habacker
75003c4ca1 tools/cmake-format: add support to use custom source root directory 2021-10-25 15:42:37 +02:00
Simon McVittie
ddcbe4c715 Merge branch 'dbus-send-validate' into 'master'
dbus-send: Do more syntax validation

Closes #338

See merge request dbus/dbus!211
2021-07-19 12:27:16 +00:00
Simon McVittie
a42a07a1fb dbus-send: Validate interface, member names before use
Instead of a failed check or assertion failure and a core dump, let's
produce an error message on stderr and a graceful nonzero exit status.
It's still not going to *work*, but at least we can avoid crashing.

    $ dbus-send / com.example.Nope..Nope
    Interface name was not valid: 'com.example.Nope.'
    $ dbus-send / com.example.Nope.0
    Invalid signal name: Member name was not valid: '0'

Resolves: dbus#338
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-21 12:04:05 +01:00
Simon McVittie
dde5c8fdc4 dbus-send: Print an error message if object path is syntactically invalid
$ dbus-send // nope
    Object path was not valid: '//'

Related to dbus#338.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-21 12:02:27 +01:00
Zeeshan Ali
ef55a3db0d Merge branch 'spec-correction' into 'master'
Add a few clarifications to the spec

See merge request dbus/dbus!203
2021-03-16 12:07:08 +00:00
Zeeshan Ali
e7db7e9390 spec: Clarify Array element needs to be padded even if inexistent 2021-03-10 12:39:27 +01:00
Zeeshan Ali
fcc3455b89 spec: Clarify that Variant's value needs padding 2021-03-10 12:39:27 +01:00
Simon McVittie
efe805c849 Merge branch 'ci' into 'master'
ci: bump msys2 deps, fix broken links

See merge request dbus/dbus!201
2021-01-13 15:05:17 +00:00
Marc-André Lureau
c5385dfd60 ci: bump msys2 deps, fix broken links
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-01-13 18:53:23 +04:00
Simon McVittie
95bff90369 Reference CVE-2020-35512 in NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-01-07 11:55:22 +00:00
Ralf Habacker
669e3c0aca Merge branch 'cmake-add-unit-test-macro' into 'master'
cmake: add macro add_unit_test to reduce code duplication

See merge request dbus/dbus!196
2020-12-11 09:11:31 +00:00
Ralf Habacker
b76c46437e cmake: add macro add_unit_test to reduce code duplication
This macro is now used by add_test_executable and
add_session_test_executable.
2020-11-26 10:46:34 +01:00
Ralf Habacker
2ef39181cf Merge branch 'ci-dependency-fixes' into 'master'
Cleanup package installation on CI

See merge request dbus/dbus!187
2020-11-24 07:18:19 +00:00
Ralf Habacker
6412ccdf67 tools/ci-install.sh: Use package=() style for local package list to avoid '\' notation 2020-11-24 07:08:42 +00:00
Ralf Habacker
9c5734fe90 On CI use common install prefix named 'dep_prefix' for installing local packages
With this commit a new variable 'ci_local_packages' has been introduced
to have a choice for using development packages from a local installation
or from the distribution.
2020-11-24 07:08:42 +00:00
Ralf Habacker
e82d5fe486 tools/ci-build.sh: Clean up directories from possible previous builds
Otherwise, ci-build.sh cannot be executed on a local system if there
are previous runs.
2020-11-24 07:08:42 +00:00
Ralf Habacker
478484f13c tools/ci-install.sh: merge multiple calls to apt-get
This required a reorganization of the steps that had been carried out.
The new order is:
   1. install packages with apt-get
   2. create user for build if required
   3. fetch and unpack tar balls
   4. create messagebus user
2020-11-24 07:08:42 +00:00
Ralf Habacker
1e3d82d85e Move installing packages into tools/ci-install.sh
In tools/ci-build.sh the cross compile setup has to be moved further up
to match the correct subdirectory.
2020-11-24 07:08:42 +00:00
Simon McVittie
f009dad5fb Merge branch 'misc-windows-fixes' into 'master'
sysdeps-win: Expand/fix verbose logging

See merge request dbus/dbus!193
2020-11-23 14:45:32 +00:00
Ralf Habacker
7ec42d28fc _dbus_poll_select (): fix concating multiple verbose lines 2020-11-23 14:21:51 +00:00
Ralf Habacker
4634d20ef1 Add verbose info to publishing session bus related functions
This is useful for tracking auto launch support in dbus-daemon.
2020-11-23 14:21:51 +00:00
Simon McVittie
c7ad138a21 Merge branch 'update-selinux-auditing' into 'master'
bus/selinux: Fix audit message types.

See merge request dbus/dbus!173
2020-11-23 13:23:12 +00:00
Chris PeBenito
2d5d40d5a5 bus/selinux: Fix audit message types.
The SELinux log callback includes a message type. Not all messages are
auditable and those that are have varying audit types. An audit message is
a security-relevant event: security state changes, MAC permission denied,
etc.  A message that is auditable is not necessarily sensitive.  Messages
that are not auditable are not security-relevant, like messages about
socket polling errors.  Update the auditing accordingly.

If the message is not auditable, fall through and write it to syslog.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-11-23 13:07:19 +00:00
Simon McVittie
8e028f2002 Merge branch 'travis-ci-cleanup' into 'master'
Drop unused travis CI configuration files

See merge request dbus/dbus!197
2020-11-23 12:06:10 +00:00
Ralf Habacker
2534c2076f Drop unused travis CI configuration files 2020-11-16 14:48:59 +01:00
Simon McVittie
75a9cd0827 Merge branch 'bug/NEWS-machine-id-paths' into 'master'
NEWS: Add missing directory 'lib' to three paths

See merge request dbus/dbus!182
2020-11-09 15:00:39 +00:00
Samy Mahmoudi
95ad63d706 NEWS: Add missing directory 'lib' to three paths
Since ${localstatedir}/dbus should be ${localstatedir}/lib/dbus,
insert the missing directory 'lib' into the three erroneous paths.
2020-11-06 22:39:55 +00:00
Simon McVittie
b187a5f729 Merge branch 'macos-x11-bugfix' into 'master'
dbus-launch: Replace slashes in DISPLAY if present

Closes #8 and #311

See merge request dbus/dbus!180
2020-11-06 17:26:28 +00:00
William Earley
3545d0f4de dbus-launch: Replace slashes in DISPLAY if present
dbus-daemon fails to autolaunch with X11 on macOS 10.8+ because XQuartz
(the X11 package for macOS) provides a value for `$DISPLAY` that is
not expected by dbus, in that it contains `/` characters. This is
addressed by replacing the invalid path character `/` with `_`.

Resolves: #8
Resolves: #311
2020-11-06 17:17:09 +00:00
Simon McVittie
895ef72bc0 Merge branch 'macos-setrlimit-bugfix' into 'master'
sysdeps: Don't raise RLIMIT_NOFILE beyond OPEN_MAX on macOS

Closes #309

See merge request dbus/dbus!178
2020-11-06 15:20:51 +00:00
William Earley
691946dabc sysdeps: Don't raise RLIMIT_NOFILE beyond OPEN_MAX on macOS
dbus-daemon fails to launch on macOS 10.5 and above because of a breaking
change in setrlimit, in which RLIM_INFINITY is no longer supported
for RLIMIT_NOFILE. Instead we must use OPEN_MAX.

Resolves: #309
2020-11-06 15:10:42 +00:00
Simon McVittie
49d924ba56 Merge branch 'docs-generate-reproducible-ids' into 'master'
docs: generate reproducible ids

See merge request dbus/dbus!189
2020-11-06 14:01:46 +00:00
Arnout Engelen
43e0188dbf
docs: generate reproducible ids
With this parameter, docbook will generate the same id's when generating the
same docs. This is helpful to get bit-by-bit 'reproducible' output, which
makes auditing the package easier.

Tested both the cmake output and the automake output
2020-11-06 14:52:48 +01:00
Simon McVittie
5db5415810 Merge branch 'wip/update-msys-packages' into 'master'
ci-build: Update required MSYS packages

Closes #318

See merge request dbus/dbus!190
2020-11-06 13:51:17 +00:00
Simon McVittie
053238254e ci-build: Update required MSYS packages
The older versions we were previously building against are no longer
available on mirrors.

Based on changes proposed in !189 by Arnout Engelen, and the package
list gathered by Ralf Habacker in #318.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/318
Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-11-06 13:38:45 +00:00
Simon McVittie
0686f7bb16 Merge branch 'patch-1' into 'master'
doc: Fix typo in dbus-daemon(1)

See merge request dbus/dbus!183
2020-10-19 19:49:03 +00:00
Chigozirim Chukwu
72dd2923d0 doc: Fix typo in dbus-daemon(1) 2020-10-19 18:38:09 +00:00
Simon McVittie
2285db23ce Merge branch 'glibc' into 'master'
disable fork-malloc-exec for non-glibc-systems

See merge request dbus/dbus!181
2020-09-28 13:42:55 +00:00
Jean-Louis Fuchs
3fab06d68f
disable fork-malloc-exec for non-glibc-systems
Calling malloc() after fork is undefined behaviour if the process is
multi-threaded. locks held by a thread on fork() will never be released.
malloc() is usally protected by a lock and can therefore deadlock. glibc
is known not to deadlock in this case.

This commit does not rule out other problems on glibc-systems, but fixes an
issue on musl-libc-systems. Only restricting to async-signal safe functions
between fork() and exec() prevents undefined behaviour for sure. See
signal-safety(7).
2020-09-28 15:18:12 +02:00
Simon McVittie
bf51a3169c Merge branch 'cmake-enable-traditional-activation' into 'master'
CMake: allow traditional activation to be disabled

See merge request dbus/dbus!159
2020-09-24 10:48:47 +00:00
Ralf Habacker
5b1870a5bd cmake: make support for traditional activation optional
Traditional activation is enabled/disabled with the cmake configure
parameter -DENABLE_TRADITIONAL_ACTIVATION, which is enabled by default.

This was added to the Autotools build system as part of dbus/dbus!107
but until now was not possible to disable when building with CMake.
2020-09-23 17:21:40 +02:00
Ralf Habacker
82942171a8 Merge branch 'cmake-fixup' into 'master'
cmake: move up checking DBUS_ENABLE_EMBEDDED_TESTS from subdir test/name-test to test

See merge request dbus/dbus!177
2020-09-23 15:02:08 +00:00
Ralf Habacker
b698fb7639 cmake: move up checking DBUS_ENABLE_EMBEDDED_TESTS from subdir test/name-test to test
The whole file is only added with the mentioned variable
set, so it can also be skipped completly one level up.
2020-09-23 14:27:53 +00:00
Simon McVittie
bc7123534d Merge branch 'install-ddlh' into 'master'
cmake: install dbus-daemon-launch-helper

Closes #310

See merge request dbus/dbus!175
2020-09-23 14:18:48 +00:00
Ralf Habacker
2148a5a803 cmake: install dbus-daemon-launch-helper on Unix
Previously it was built on Unix platforms, but not installed. This
would prevent traditional activation on the system bus (on Linux
without systemd or non-Linux, or for services without SystemdService),
which requires the activation helper.

Because the executable is an internal implementation detail of how
traditional activation is implemented on Unix, it is not exported to
the generated cmake support files.

Resolves: dbus#310
2020-09-22 11:22:40 +02:00
Simon McVittie
e8dc63c041 Merge branch 'spec-cookie-timeouts' into 'master'
spec: Update recommendations for DBUS_COOKIE_SHA1 timeouts

See merge request dbus/dbus!171
2020-09-21 11:23:25 +00:00