summaryrefslogtreecommitdiff
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH"Simon McVittie2016-02-123-1/+2
| | | | | This reverts commit 8fd2be6013e3d0ff6a6ff63ea022f9606d9a87c6. This change was intended for 1.11.
* Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCHSimon McVittie2016-02-113-2/+1
| | | | | | | | | | | | Instead of using $DBUS_USE_TEST_BINARY to control whether to use the hard-coded test binary TEST_BUS_LAUNCH_BINARY, we can just use $DBUS_TEST_DBUS_LAUNCH to control what we launch directly, as we were already doing for $DBUS_TEST_DAEMON. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Test system bus config files on Unix onlyRalf Habacker2015-11-031-19/+7
| | | | | | | | | | | | | | | | | | Previously, we didn't consistently test parsing of every file in valid-config-files-system/ everywhere that we tested valid-config-files/. We now test it on Unix. The system bus is not supported on Windows, so we do not test valid-config-files-system/ there. valid-config-files/many-rules.conf contains <user> and <group> rules which are not applicable to Windows. Copy the original many-rules.conf to valid-config-files-system/ so that it will be tested on Unix, and remove the non-portable rules from valid-config-files/many-rules.conf. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> [rh:base patch came from Simon]
* Keep cmake build system in sync with autotools (add test-monitor).Ralf Habacker2015-10-211-0/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92298 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* On Windows, load local configuration relative to bus setupSimon McVittie2015-10-021-1/+14
| | | | | | | | | | | | | | | | | | This makes an installed tree with /some-prefix/ etc/ dbus-1/ session-local.conf share/ dbus-1/ session.conf relocatable to any location. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92028 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> Tested-by: Ralf Habacker <ralf.habacker@freenet.de>
* bus: move shared libaudit code to a new audit.[ch]Simon McVittie2015-08-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | This fixes various duplicated libaudit interactions in both SELinux and AppArmor code paths, including opening two audit sockets if both SELinux and AppArmor were enabled at compile time. In particular, audit.c is now the only user of libcap-ng. This commit is not intended to introduce any functional changes, except for the de-duplication. The actual audit_log_user_avc_message() call is still duplicated, because the SELinux and AppArmor code paths use different mechanisms to compose the audit message: the SELinux path uses a statically-sized buffer on the stack which might be subject to truncation, whereas the AppArmor path uses malloc() (via DBusString) and falls back to using syslog on a memory allocation failure. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89225 Reviewed-by: Colin Walters <walters@verbum.org> [smcv: minor issues raised during review are subsequently fixed] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Adjust cmake build to match autoconf installation locations.Dimitri John Ledkov2015-05-273-70/+17
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89280 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Security hardening: force EXTERNAL auth in session.conf on UnixSimon McVittie2015-05-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | DBUS_COOKIE_SHA1 is dependent on unguessable strings, i.e. indirectly dependent on high-quality pseudo-random numbers whereas EXTERNAL authentication (credentials-passing) is mediated by the kernel and cannot be faked. On Windows, EXTERNAL authentication is not available, so we continue to use the hard-coded default (all authentication mechanisms are tried). Users of tcp: or nonce-tcp: on Unix will have to comment this out, but they would have had to use a special configuration anyway (to set the listening address), and the tcp: and nonce-tcp: transports are inherently insecure unless special steps are taken to have them restricted to a VPN or SSH tunnelling. Users of obscure Unix platforms (those that trigger the warning "Socket credentials not supported on this Unix OS" when compiling dbus-sysdeps-unix.c) might also have to comment this out, or preferably provide a tested patch to enable credentials-passing on that OS. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90414 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* cmake: Give users a hint to run autogen.sh if config.h.in is not present to ↵Ralf Habacker2015-04-201-0/+2
| | | | | | | see autotools config header differences. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* cmake: Add msvc support for sign-compare warnings.Ralf Habacker2015-04-201-2/+7
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90089 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* cmake: Dump missing config header checks only if config.h.in is present.Ralf Habacker2015-04-201-1/+5
| | | | | | | config.h.in is only generated by running autogen.sh. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90089 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* cmake: Extend underlines below dbus version print on configure summary title.Ralf Habacker2015-03-241-1/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* cmake: only set CMP0053, CMP0054 on CMake >= 3.1Simon McVittie2015-03-241-2/+4
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* cmake: opt-in to not implicitly expanding variables in if() (policy CMP0054)Ralf Habacker2015-03-111-0/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Revert "cmake: @VAR@ substitutions in set() are deprecated, use ↵Ralf Habacker2015-03-111-1/+0
| | | | | | string(CONFIGURE) instead (policy CMP0053)" This reverts commit 45f2e84a7de52f55fc1b41fefbc1b71a40d7a4eb.
* cmake: @VAR@ substitutions in set() are deprecated, use string(CONFIGURE) ↵Ralf Habacker2015-03-061-0/+1
| | | | | | | instead (policy CMP0053) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* cmake: @VAR@ substitutions in set() are deprecated, use string(CONFIGURE) ↵Ralf Habacker2015-03-062-2/+3
| | | | | | | instead (policy CMP0053) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* cmake: stop using deprecated LOCATION property (policy CMP0026)Ralf Habacker2015-03-062-2/+4
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Fix cmake build system bug not generating versioned library name in case ↵Ralf Habacker2015-03-061-3/+3
| | | | | | | LT_REVISION is zero. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Add missing include file for cmake function check_include_files() (commit ↵Ralf Habacker2015-03-051-0/+1
| | | | 2d2b5af)
* Keep cmake generated defines for include files in sync with autotools.Ralf Habacker2015-03-051-24/+50
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Move include file checks to ConfigureChecks.cmake for cmake build system.Ralf Habacker2015-03-052-5/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Add check to cmake build system if config.h.cmake is in sync with autotools.Ralf Habacker2015-03-052-9/+15
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Keep include file checks in sync with autotools.Ralf Habacker2015-03-051-9/+25
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Add cmake macro autoheaderchecks().Ralf Habacker2015-03-052-0/+29
| | | | | | | | This macro prints out any include file defined as HAVE_..._H in the config header template and not in the related cmake configure checks file. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Fix broken cmake HAVE_SOCKLEN_T type finding check.Ralf Habacker2015-03-051-1/+3
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Add test-fdpass to cmake build system.Ralf Habacker2015-03-041-0/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Enable -Wsign-compare for cmake builds.Ralf Habacker2015-03-041-0/+2
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Keep cmake defines GLIB_VERSION_... in sync with autotools.Ralf Habacker2015-03-033-12/+51
| | | | | | | This patch adds autotools related cmake macros autoinit() and autodefine(). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89284 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Actually commit cmake changes for dbus-launchSimon McVittie2015-02-241-1/+3
|
* Add dbus-update-activation-environment toolSimon McVittie2015-02-242-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If OS builders (distributions) have chosen to use the per-user bus, this provides two possible modes of operation for compatibility with existing X session startup hooks. A legacy-free system can just upload DISPLAY, XAUTHORITY and possibly DBUS_SESSION_BUS_ADDRESS into dbus-daemon's and systemd's activation environments, similar to http://cgit.freedesktop.org/systemd/systemd/tree/xorg/50-systemd-user.sh installed by systemd (but unlike systemctl, dbus-update-activation-environment works for traditional D-Bus-activated services, not just for systemd services). A system where compatibility is required for environment variables exported by snippets in /etc/X11/xinit/xinitrc.d (in Red Hat derivatives, Gentoo, etc.) or /etc/X11/Xsession.d (Debian derivatives) can upload the entire environment of the X session, minus some selected environment variables which are specific to a login session (notably XDG_SESSION_ID). In Debian, I plan to put the former in a new dbus-user-session package that enables a user-session-centric mode of operation for D-Bus, and the latter in the existing dbus-x11 package, with the intention that dbus-x11 eventually becomes a tool for change-averse setups or goes away entirely. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61301 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
* Add versioned symbol support to cmake build system for linux platforms to ↵Simon McVittie2015-02-201-0/+7
| | | | | | | keep in sync with autotools. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* cmake: check for the necessary symbols for test-segfault.cSimon McVittie2015-02-201-0/+3
| | | | | | | | | | | | If we don't check for them, and you have core dumps enabled, then running this test under cmake is really annoying, because it leaves lots of core dumps none of which are actually a problem. The equivalent Autotools change (which added the actual code that this relies on) is commit ae50d46, from fd.o#83772. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Link dbus-daemon and dbus-daemon-lauch-helper against libdbusBertrand SIMONNET2015-02-202-12/+2
| | | | | | | | | | | | | | The shared can be used by dbus-daemon and dbus-daemon-launch-helper by exporting the private symbols needed, reducing the size of dbus by about 500k. The private symbols are exposed under the version LIBDBUS_PRIVATE_@VERSION_NUMBER@. [Altered by Simon McVittie and Ralf Habacker to clear up some problematic linking.] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* tests: always use libdbus-internal for main loop, never dbus-glibSimon McVittie2015-02-201-1/+1
| | | | | | | | | | This gets rid of a potential circular dependency, which is annoying when bootstrapping. It is nice to have the regression tests use the shared libdbus, but we're about to make it possible to do that anyway, even though some of them use internal symbols. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Add apparmor element support to bus config parsingTyler Hicks2015-02-181-0/+2
| | | | | | | | | | | | | | | | | | | The <apparmor> element can contain a single mode attribute that has one of three values: "enabled" "disabled" "required" "enabled" means that kernel support is autodetected and, if available, AppArmor mediation occurs in dbus-daemon. If kernel support is not detected, mediation is disabled. "disabled" means that mediation does not occur. "required" means that kernel support must be detected for dbus-daemon to start. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113 Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* dbus-send: Keep cmake build system in sync with autotools.Ralf Habacker2015-02-161-0/+2
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89109 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Add manual-paths test executable with cmake build support.Ralf Habacker2015-02-123-0/+10
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83539 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Add dbus-test-tool and its man page to the CMake build systemSimon McVittie2015-02-122-0/+16
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89086 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
* Add a common test_init() for GLib tests which prevents hanging foreverSimon McVittie2015-02-041-1/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
* dbus-monitor: add options to log binary data with or without pcap framingSimon McVittie2015-02-041-0/+2
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
* Provide appropriate DBUS_USER and DBUS_TEST_USER under CMakeRalf Habacker2015-02-042-3/+6
| | | | | | [separated out from a larger commit -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88964 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Link tests to test-utils-glib.c under CMake tooRalf Habacker2015-02-041-1/+9
| | | | | | [Separated out from a larger commit -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88964 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* dbus-monitor: use common code from dbus-test-toolSimon McVittie2015-02-041-0/+2
| | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787 Reviewed-by: Philip Withnall [also sync up the cmake build system -smcv]
* Add manual tcp test case.Ralf Habacker2015-01-301-0/+5
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Fix usage of undefined variable DBUS_WIN32 on cmake build systemRalf Habacker2015-01-051-1/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88010 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Merge branch 'dbus-1.8'Ralf Habacker2015-01-052-1/+5
|\ | | | | | | | | | | Conflicts: NEWS configure.ac
| * Windows cmake cross compile fixRalf Habacker2015-01-051-1/+1
| | | | | | | | | | | | | | We need to include 'test' subdir in any case not only when using glib. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88009 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
| * Fix of 'dbus-daemon can only handle 64 simultaneous connections on Windows'.Ralf Habacker2015-01-051-0/+4
| | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71297 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* | Include test-dbus and test-bus in cmake 'make check' target.Ralf Habacker2014-10-242-4/+3
| | | | | | | | | | | | | | | | Because test-dbus and test-bus lives in subdirectory dbus/bus, we need to define make 'check' in top level source directory. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73689 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>