summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-08Do not suggest user the next step after executed autogen.shChengwei Yang1-7/+1
We assume that user/developer who building dbus from source code are familiar with the standard 'autogen.sh, configure, make, make install' build process, so print such a notice doesn't make a lot of sense. In addition, on *BSD platform, the pre-installed 'make' doesn't work at all since gnu make is required. However, it named to 'gmake' on *BSD platform. So the notice will makes new comer confused. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65415 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-08Add support for configuring --with-valgrind=autoSimon McVittie1-0/+4
This is the configuration I'd like to use for the "debug build" of dbus on Debian - if we use --with-valgrind=yes, we have to hard-code knowledge of which architectures do and don't have Valgrind in two places instead of just one. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56925 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08When using dbus-launch for tests, fail hard if test binary is missingSimon McVittie1-1/+2
We want to test the version-under-test, not the system version. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37849 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08dbus-launch: avoid asprintf(), and die gracefully on out-of-memorySimon McVittie1-4/+28
asprintf() is a GNU extension (non-portable). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37849 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-10-08Fix build on NetBSD 6.1.1 with gcc 4.5.3Chengwei Yang2-1/+4
There are two build failure on NetBSD 6.1.1 with gcc 4.5.3, the first one is char to int, warning treated as error. The second one is a mismatch between format string and arguments. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69842 [adjusted commit message -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-25NEWSSimon McVittie1-0/+2
2013-09-25Use 'cp' instead of 'cp -av' to fix portable issueChengwei Yang1-1/+1
Neither '-a' nor '-v' of 'cp' is available on OpenBSD 5.3, so use 'cp' instead to fix portable issue. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69789 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-25Use 'chmod' instead of 'chmod -c'Chengwei Yang1-1/+1
chmod -c is not available on *BSD system, and '-v' is not available on OpenBSD, so just execute chmod without any option. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35881 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-23NEWSSimon McVittie1-0/+3
2013-09-23_dbus_read_credentials_socket: warn or fail at compile time if no supportSimon McVittie1-0/+15
On a whitelist of OSs known to have working credentials-passing (currently FreeBSD, Linux, OpenBSD and NetBSD), it would be a regression for us to not have credentials-passing, so fail hard. On other OSs, raise a warning, which is not normally fatal but will alert developers on those platforms. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340 Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-23Prefer getpeerucred() over getpeereid() if a platform has bothSimon McVittie1-31/+32
We want the process ID, and getpeerucred() provides that. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340 Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-23bus-test: only expect GetConnectionUnixProcessID to succeed sometimesSimon McVittie1-0/+6
On platforms that use getpeereid(), this can't work. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340 Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-23_dbus_read_credentials_socket: document where we use each mechanismSimon McVittie1-1/+41
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340 Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-23Remove BSD-style LOCAL_CREDS supportSimon McVittie1-70/+2
It appears that this regressed back in 2009 (commit 7bf132c7) and doesn't compile. Also, with patches from Matt Fischer to make it compile again on QNX, it compiles but doesn't actually work on NetBSD, which was the platform for which this code was added. This might be for the reasons described in <http://julipedia.meroh.net/2006/08/localcreds-socket-credentials.html>. NetBSD pkgsrc has a large unsubmitted patch to use LOCAL_PEEREID, which is analogous to Linux/OpenBSD SO_PEERCRED. So, I think we can safely assume that nobody is relying on this: either they implement one of our many other supported credentials-passing mechanisms, or they're patching it locally anyway. LOCAL_CREDS is not actually very good - it's awkward to use, and doesn't provide the pid, only the uid. Of the platforms known to implement it, QNX and NetBSD both have getpeereid() which provides just as much information, while FreeBSD and Dragonfly BSD both have SCM_CREDS which provides the pid too. So, let's just get rid of it. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340 Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-16NEWSSimon McVittie1-1/+16
2013-09-16Fix an incorrect sizeof.Sviatoslav Chagaev1-1/+1
Fix an incorrect sizeof which leads to allocation of more memory than actually needed. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69329 [elide redundant "* sizeof (char)" which is 1 by definition -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16Revert "Fix an incorrect sizeof." to fix attributionSimon McVittie1-1/+1
This reverts commit 3c1938180bdca8fc658907f6f692186be2b81b77.
2013-09-16fix NEWS mis-mergeSimon McVittie1-15/+5
2013-09-16Remove support for platforms with no 64-bit integer typeSimon McVittie11-252/+25
This has been a soft requirement since 1.5.0; anyone on such platforms would have had to configure --without-64-bit, provoking a warning that instructed them to report a D-Bus bug with details of their platform. Nobody has done so, so if anyone still lacks a 64-bit integer type, they're on their own. (Also, I tried the build with --without-64-bit and it's full of fatal compiler warnings, so it's not clear that we're actually losing anything by removing this "feature".) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65429 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
2013-09-16Merge branch 'dbus-1.6'Simon McVittie1-0/+15
Conflicts: NEWS
2013-09-16NEWS for 1.6.xSimon McVittie1-0/+5
2013-09-16dbus-mainloop.c: undeclared variable n_fds if define MAINLOOP_SPEW.Vasiliy Balyasnyy1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69410 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16Merge branch 'dbus-1.6'Simon McVittie1-1/+1
2013-09-16dbus-sysdeps-unix.c: undeclared ret2 variable if HAVE_WRITEV undefined.Vasiliy Balyasnyy1-1/+1
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69409
2013-09-16Fix incorrect sizeof in a Valgrind hint macro call.Sviatoslav Chagaev1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69326 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16Merge branch 'dbus-1.6'Simon McVittie1-1/+4
2013-09-16Fix a NULL dereference on an error code path.Sviatoslav Chagaev1-1/+4
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69327 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16Fix an incorrect sizeof.Simon McVittie1-1/+1
Fix an incorrect sizeof which leads to allocation of more memory than actually needed. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69329 [elide redundant "* sizeof (char)" which is 1 by definition -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-16dbus-sysdeps-win: don't include wspiapi.hSimon McVittie4-16/+0
This block provoked a warning on mingw-w64 because we were redefining _inline. According to Ralf's research, it was introduced in 452ff68a: Windows 2000 doesn't have getaddrinfo and related functions in ws2tcpip.h, but does have a shim implementation in wspiapi.h. At the time of 452ff68a, mingw32 didn't have wspiapi.h, so it's unclear why there was a __GNUC__ code path here. The "#define _inline" on that code path looks likely to be some sort of workaround for a faulty version of wspiapi.h? Current mingw-w64 does have wspiapi.h, so we enter the __GNUC__ code path and get the redefinition. dbus no longer supports Windows 2000, so we no longer need wspiapi.h at all, and can rely on XP or later. (Ralf's policy is to only support versions of Windows that are still supported by Microsoft, and Windows 2000 reached the end of its life-cycle in 2010.) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker
2013-09-13Merge remote-tracking branch 'fitzsim/fix-parent-removal-fixme'Simon McVittie1-36/+403
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60176
2013-09-13NEWSSimon McVittie1-0/+8
2013-09-13Make userdb cache as a built-in featureChengwei Yang3-14/+0
The disable-userdb-cache code path is never been fine tested and you could expect an extramely slow bus if you did that. And there are known bugs on fd.o if build without userdb cache. So to prevent user from using bus without userdb cache, it changed to a built-in feature, no longer optional now. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66947 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=15589 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Don't assume that X11 autolaunch will work if DISPLAY is unsetSimon McVittie1-3/+5
In practice, it won't; other forms of autolaunch (like Mac OS launchd) might, but we can't really assert either way. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40352 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com> [amended to reinstate use of dbus/dbus-sysdeps.h which was removed by 412538b3b9 -smcv] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Use test binaries in build dir to do testChengwei Yang4-4/+25
When do autolaunch testing, libdbus will try to start dbus-launch in installed direcotry, if fail then fall back to dbus-launch in $PATH. dbus-launch does a relative better thing to start dbus-daemon in build directory, however, in most of case, the build $prefix is different from the real prefix where dbus-daemon installed. So dbus-daemon will fail to start due to can't find its config file. And then dbus-launch will fall back to finally the installed dbus-daemon. This patch fix this behavior and will start dbus-launch and dbus-daemon in build directory in test environment. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37849
2013-09-13selinux: when dropping capabilities only include AUDIT caps if we have themLennart Poettering1-2/+3
When we drop capabilities we shouldn't assume we can keep CAP_AUDIT_WRITE unconditionally, since it will not be available when running in containers. This patch only adds CAP_AUDIT_WRITE to the list of caps we keep if we actually have it in the first place. This makes audit/selinux enabled D-Bus work in a Linux container. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49062 Acked-by: Thiago Macieira <thiago@kde.org> Acked-by: Colin Walters <walters@verbum.org> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13NEWSSimon McVittie1-0/+3
2013-09-13Remove obscure "low-latency" parts in the introduction of specJustin Lee1-9/+4
According to Wikipedia http://en.wikipedia.org/wiki/Latency_%28engineering%29#Packet-switched_networks latency means "the time from the source sending a packet to the destination receiving it". Therefore, latency is unrelated to whether the operation is asynchronous or synchronous. And also unrelated to whether it's one-way or round-trip. Latency exists for asynchronous and one-way transfer, because for current DBus implementations we need at least one context switch to transfer each message from the sender process to the receiver process. Emphasizing D-Bus is low-latency could encourage user to abuse/misuse the system. Mail disscusion: http://lists.freedesktop.org/archives/dbus/2013-May/015665.html Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65141 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13More NEWSSimon McVittie1-1/+3
2013-09-13Merge branch 'dbus-1.6'Simon McVittie5-15/+49
Conflicts: NEWS configure.ac
2013-09-13NEWSSimon McVittie1-1/+17
2013-09-13Fix dbus-daemon document about servicedirChengwei Yang1-1/+1
In dbus-daemon implementation, the servicedir are searched in order in which they appear in the config file. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66994 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Remove DBUS_COMPILATION from test source codeChengwei Yang1-2/+0
DBUS_COMPILATION definition was moved to test/Makefile.am static_cppflags, so remove it from test source code. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Check EINVAL for accept4()Chengwei Yang1-2/+6
It was reported that accept4() will return -1 with errrno is EINVAL on arm platform, so check EINVAL for accept4() and retry accept(). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69026 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Allow EPROTOTYPE for SOCK_CLOEXEC but unsupported by socket/socketpairPino Toscano1-3/+3
If SOCK_CLOEXEC is defined (usually because accept4 is implemented), check for EPROTOTYPE (the POSIX errno for invalid socket types) in addition to EINVAL as errno indicating whether socket and socketpair do not support SOCK_CLOEXEC (and other SOCK_* flags). [adapted by Chengwei Yang to give _dbus_connect_exec() the same treatment] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69073 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Check EINVAL for socketpair and retry without SOCK_CLOEXECChengwei Yang1-5/+16
As the same as _dbus_open_socket() and _dbus_full_duplex_pipe(), socketpair() may fail with EINVAL if call with SOCK_CLOEXEC. Check for the failure and retry without SOCK_CLOEXEC, in addition, only call _dbus_fd_set_close_on_exec() if the socketpair failure happened. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69073 [trivial coding style fixes -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Use the argument of dbus_connection_set_route_peer_messages()Chengwei Yang1-1/+1
The function dbus_connection_set_route_peer_messages() take a bool argument, however, in the implementation, it always hard-code to TRUE rather than take its bool argument. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69165 [amended commit message -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Fix pass wrong type of argument to functionChengwei Yang1-1/+1
The last argument of function _dbus_transport_new_for_socket() is declared as const DBusString *. However, it is passed as a bool value. Although the value of FALSE equals NULL in fact, this is an incorrect use of function. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69165 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Fix file descriptor leak in _dbus_command_for_pidSviatoslav Chagaev1-0/+1
Fix a file descriptor not being closed when an error codepath is taken. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69182 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com> [more specific commit message -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-051.6.15Simon McVittie2-1/+6
2013-09-051.6.14Simon McVittie2-2/+7