summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)AuthorFilesLines
2016-02-19Add kdbus transportAdrian Szyndela1-1/+1
This reverts commit 197db0df78e0a9f82df4162885854f99ff749505, which reverts commit 771f5155c9a393a242329988d56661a51fc04e6c. Change-Id: I4133020c585a6f9b42f487ffae4d2005b25a1d08
2016-02-19Enable checking of smack context from DBus interfaceBrian McGillion2-1/+6
Conflicts: bus/driver.c cmake/CMakeLists.txt Change-Id: Ibc9d1ccb86c3b28d8df3a4becf33ba30234832d8
2015-11-03Test system bus config files on Unix onlyRalf Habacker1-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]
2015-10-21Keep cmake build system in sync with autotools (add test-monitor).Ralf Habacker1-0/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92298 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-10-02On Windows, load local configuration relative to bus setupSimon McVittie1-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>
2015-08-06bus: move shared libaudit code to a new audit.[ch]Simon McVittie1-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>
2015-05-27Adjust cmake build to match autoconf installation locations.Dimitri John Ledkov3-70/+17
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89280 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-05-14Security hardening: force EXTERNAL auth in session.conf on UnixSimon McVittie1-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>
2015-04-20cmake: Give users a hint to run autogen.sh if config.h.in is not present to ↵Ralf Habacker1-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>
2015-04-20cmake: Add msvc support for sign-compare warnings.Ralf Habacker1-2/+7
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90089 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-04-20cmake: Dump missing config header checks only if config.h.in is present.Ralf Habacker1-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>
2015-03-24cmake: Extend underlines below dbus version print on configure summary title.Ralf Habacker1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-03-24cmake: only set CMP0053, CMP0054 on CMake >= 3.1Simon McVittie1-2/+4
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-03-11cmake: opt-in to not implicitly expanding variables in if() (policy CMP0054)Ralf Habacker1-0/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-11Revert "cmake: @VAR@ substitutions in set() are deprecated, use ↵Ralf Habacker1-1/+0
string(CONFIGURE) instead (policy CMP0053)" This reverts commit 45f2e84a7de52f55fc1b41fefbc1b71a40d7a4eb.
2015-03-06cmake: @VAR@ substitutions in set() are deprecated, use string(CONFIGURE) ↵Ralf Habacker1-0/+1
instead (policy CMP0053) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-06cmake: @VAR@ substitutions in set() are deprecated, use string(CONFIGURE) ↵Ralf Habacker2-2/+3
instead (policy CMP0053) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-06cmake: stop using deprecated LOCATION property (policy CMP0026)Ralf Habacker2-2/+4
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-06Fix cmake build system bug not generating versioned library name in case ↵Ralf Habacker1-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>
2015-03-05Add missing include file for cmake function check_include_files() (commit ↵Ralf Habacker1-0/+1
2d2b5af)
2015-03-05Keep cmake generated defines for include files in sync with autotools.Ralf Habacker1-24/+50
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-05Move include file checks to ConfigureChecks.cmake for cmake build system.Ralf Habacker2-5/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-05Add check to cmake build system if config.h.cmake is in sync with autotools.Ralf Habacker2-9/+15
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-05Keep include file checks in sync with autotools.Ralf Habacker1-9/+25
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85418 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-05Add cmake macro autoheaderchecks().Ralf Habacker2-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>
2015-03-05Fix broken cmake HAVE_SOCKLEN_T type finding check.Ralf Habacker1-1/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-04Add test-fdpass to cmake build system.Ralf Habacker1-0/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-04Enable -Wsign-compare for cmake builds.Ralf Habacker1-0/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-03-03Keep cmake defines GLIB_VERSION_... in sync with autotools.Ralf Habacker3-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>
2015-02-24Actually commit cmake changes for dbus-launchSimon McVittie1-1/+3
2015-02-24Add dbus-update-activation-environment toolSimon McVittie2-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>
2015-02-20Add versioned symbol support to cmake build system for linux platforms to ↵Simon McVittie1-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>
2015-02-20cmake: check for the necessary symbols for test-segfault.cSimon McVittie1-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>
2015-02-20Link dbus-daemon and dbus-daemon-lauch-helper against libdbusBertrand SIMONNET2-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>
2015-02-20tests: always use libdbus-internal for main loop, never dbus-glibSimon McVittie1-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>
2015-02-18Add apparmor element support to bus config parsingTyler Hicks1-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>
2015-02-16dbus-send: Keep cmake build system in sync with autotools.Ralf Habacker1-0/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89109 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-12Add manual-paths test executable with cmake build support.Ralf Habacker3-0/+10
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83539 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-12Add dbus-test-tool and its man page to the CMake build systemSimon McVittie2-0/+16
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89086 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-04Add a common test_init() for GLib tests which prevents hanging foreverSimon McVittie1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-04dbus-monitor: add options to log binary data with or without pcap framingSimon McVittie1-0/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-04Provide appropriate DBUS_USER and DBUS_TEST_USER under CMakeRalf Habacker2-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>
2015-02-04Link tests to test-utils-glib.c under CMake tooRalf Habacker1-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>
2015-02-04dbus-monitor: use common code from dbus-test-toolSimon McVittie1-0/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787 Reviewed-by: Philip Withnall [also sync up the cmake build system -smcv]
2015-01-30Add manual tcp test case.Ralf Habacker1-0/+5
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-05Fix usage of undefined variable DBUS_WIN32 on cmake build systemRalf Habacker1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88010 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-05Merge branch 'dbus-1.8'Ralf Habacker2-1/+5
Conflicts: NEWS configure.ac
2015-01-05Windows cmake cross compile fixRalf Habacker1-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>
2015-01-05Fix of 'dbus-daemon can only handle 64 simultaneous connections on Windows'.Ralf Habacker1-0/+4
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71297 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2014-10-24Include test-dbus and test-bus in cmake 'make check' target.Ralf Habacker2-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>