Commit graph

6038 commits

Author SHA1 Message Date
Ralf Habacker
85e6d21a0f Add HAVE_DECL_xxx checks to cmake build system
The first two definitions are required to fix cmake build error when
compiling with -Werror=undef on Windows.

The last one completes having HAVE_DECL_xxx definitions.
2021-11-18 12:52:22 +00:00
Ralf Habacker
6b41f053c5 Move _GNU_SOURCE to config.h.cmake 2021-11-18 12:52:22 +00:00
Ralf Habacker
541dbab907 Move DBUS_BUILT_R_DYNAMIC to config.h.cmake 2021-11-18 12:52:22 +00:00
Ralf Habacker
946515aead Fix definition of HAVE_SOCKLEN_T 2021-11-18 12:52:22 +00:00
Ralf Habacker
0590b44a8f Add configure checks for vsnprintf and vasprintf to cmake build system 2021-11-18 12:52:22 +00:00
Ralf Habacker
956aac65d4 cmake: take over some fatal warnings from autotools
Adopt various fatal warnings from the autotools build system
to see corresponding build errors also in cmake.
2021-11-18 12:52:22 +00:00
Simon McVittie
31e8a2af0b Merge branch 'davidre-master-patch-89698' into 'master'
Put dbus-daemon into session slice

See merge request dbus/dbus!219
2021-11-18 11:46:30 +00:00
David Redondo
03b4fba4b0 Put dbus-daemon into session slice
The session slice and the  app and background slices are special slices defined by
https://systemd.io/DESKTOP_ENVIRONMENTS/, where:
  session.slice: Contains only processes essential to run the user’s graphical session
  app.slice: Contains all normal applications that the user is running
This allows users or sysadmins to control resource allocation depending on the type
of the service.
Since v249 (23dce98e89)
systemd puts user services into the app slice by default so dbus needs to manually state
that it belongs in the session slice.
2021-11-18 11:35:49 +00:00
Ralf Habacker
9c98a9efe7 Merge branch 'fix-319' into 'master'
cmake: fix find_package related naming mismatch for GLIB2

Closes #319

See merge request dbus/dbus!216
2021-11-18 11:02:32 +00:00
Ralf Habacker
dccd628321 cmake: fix find_package related naming mismatch for GLIB2
The package name passed to `find_package_handle_standard_args` (GLIB2) did not match the name of the calling package (GLib2).
This could lead to problems when calling code that expects `find_package`.
result variables (e.g. `_FOUND`) expect to follow a certain pattern.

fixes #319
2021-11-10 00:49:21 +01:00
Simon McVittie
3a3aae70fd Merge branch 'fix-spec' into 'master'
spec: Clean up use of the term for an array of dict entries

Closes #347

See merge request dbus/dbus!215
2021-11-09 12:46:03 +00:00
Ralf Habacker
caef850966 Clean up use of the term for an array of dict entries
fixes #347

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2021-11-09 00:01:46 +01:00
Ralf Habacker
47768a2d75 Start spec 0.37 development 2021-11-08 14:26:29 +01:00
Simon McVittie
9b019a4e83 Merge branch 'get-machine-id' into 'master'
Specify what ID GetMachineId actually returns

See merge request dbus/dbus!198
2021-10-29 18:24:11 +00:00
Thomas Kluyver
3eba9d5d9b Describe where machine ID comes from 2021-10-29 18:24:11 +00:00
Simon McVittie
aa42b1c91a Merge branch 'test-memleak' into 'master'
test/thread-blocking.c: Fix a memory leak

See merge request dbus/dbus!208
2021-10-29 18:12:16 +00:00
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