Commit graph

133 commits

Author SHA1 Message Date
Simon McVittie
4d41d120d8 bump version to 1.7.1 2013-02-22 21:01:07 +00:00
Simon McVittie
60c1b41fbf Prepare release 1.7.0 (and specification 0.20) 2013-02-22 14:47:07 +00:00
Simon McVittie
0e90efd5b2 Don't warn for functions deprecated since GLib 2.26
Also warn if we inadvertently use a function introduced since then.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59971
Reviewed-by: Colin Walters <walters@verbum.org>
2013-02-22 13:08:11 +00:00
Simon McVittie
3f2286f13a Turn all man pages' source into configure-generated files
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[dropped whitespace changes per Ralf's review -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:27:54 +00:00
Simon McVittie
af96b13d57 Use Docbook XML as the source for all man pages
This means we no longer need man2html, which is nice.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:27:48 +00:00
Simon McVittie
277675a40e configure: redo pthread check to check for more things
In principle, anything in the pthread namespace might either be in the
platform-specific thread library (libpthread or libpthreads or libthreads
or ...), or in libc.

In particular, it seems that pthread_mutexattr_init and
pthread_mutexattr_settype are in libpthread, not libc, on Linux. We
previously didn't (intentionally) look for them in libpthread, only
in libc; so this check deserved to fail.

However, a faulty configure check for pthread_cond_timedwait
worked around this on Linux by checking for -lpthread and adding it
to THREAD_LIBS if pthread_cond_timedwait *was* found in libc (even
though that behaviour makes no sense).

The practical impact was that D-Bus would fail to compile on platforms
where pthread_cond_timedwait is in a special threading library that
is not linked by default, and at least one of
(pthread_mutexattr_init, pthread_mutexattr_settype) is also in a
special threading library. This is the case on at least OpenBSD
(fd.o #54416).

So far I've only added checks for the new symbols introduced by
using recursive pthreads mutexes. If we get reports of compilation
failures on weird platforms, we can check for more symbols.

Also clarify the indentation, which was turning into quite a mess,
and use AS_IF instead of if/elif/else/fi in accordance with Autoconf
best-practice.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47239
Reviewed-by: Colin Walters <walters@verbum.org>
2012-11-19 15:13:42 +00:00
Colin Walters
19fa7c547f Revert "hardening: Use __secure_getenv if available"
It breaks gnome-keyring-daemon at least in some
configurations; see
https://bugs.freedesktop.org/show_bug.cgi?id=52202#c24

This reverts commit 1a55644375.
2012-09-28 16:16:33 -04:00
Colin Walters
d839f027ed hardening: Use __secure_getenv if available
This helps us in the case where we were executed via filesystem
capabilities or a SELinux domain transition, not necessarily a plain
old setuid binary.

https://bugs.freedesktop.org/show_bug.cgi?id=52202
2012-09-28 10:18:15 -04:00
Colin Walters
23fe78ceef CVE-2012-3524: Don't access environment variables or run dbus-launch when setuid
This matches a corresponding change in GLib.  See
glib/gutils.c:g_check_setuid().

Some programs attempt to use libdbus when setuid; notably the X.org
server is shipped in such a configuration. libdbus never had an
explicit policy about its use in setuid programs.

I'm not sure whether we should advertise such support.  However, given
that there are real-world programs that do this currently, we can make
them safer with not too much effort.

Better to fix a problem caused by an interaction between two
components in *both* places if possible.

How to determine whether or not we're running in a privilege-escalated
path is operating system specific.  Note that GTK+'s code to check
euid versus uid worked historically on Unix, more modern systems have
filesystem capabilities and SELinux domain transitions, neither of
which are captured by the uid comparison.

On Linux/glibc, the way this works is that the kernel sets an
AT_SECURE flag in the ELF auxiliary vector, and glibc looks for it on
startup.  If found, then glibc sets a public-but-undocumented
__libc_enable_secure variable which we can use.  Unfortunately, while
it *previously* worked to check this variable, a combination of newer
binutils and RPM break it:
http://www.openwall.com/lists/owl-dev/2012/08/14/1

So for now on Linux/glibc, we fall back to the historical Unix version
until we get glibc fixed.

On some BSD variants, there is a issetugid() function.  On other Unix
variants, we fall back to what GTK+ has been doing.

Reported-by: Sebastian Krahmer <krahmer@suse.de>
Signed-off-by: Colin Walters <walters@verbum.org>
2012-09-27 21:10:28 -04:00
Simon McVittie
4d0a69027e Merge branch 'dbus-1.6' 2012-09-03 10:20:01 +01:00
Brad Smith
712f148205 Detect MSG_NOSIGNAL and SCM_RIGHTS on OpenBSD
On OpenBSD, sys/socket.h requires sys/types.h to be included first.

Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54418
2012-09-03 10:12:02 +01:00
Simon McVittie
dddedfa27d Revert "cmake: use the same default system bus address as for autotools"
This reverts commit 05b0b9e65b.
2012-08-13 20:13:16 +01:00
Simon McVittie
627cdde0eb Revert "Split DBUS_SESSION_BUS_DEFAULT_ADDRESS into listen, connect addresses and set better defaults"
This reverts commit b5d36dc27d.

On second thoughts, this is too big a change for a stable branch.
2012-08-13 20:12:59 +01:00
Simon McVittie
1dd0ff6d5b Merge branch 'dbus-1.6' 2012-08-13 20:02:11 +01:00
Simon McVittie
b5d36dc27d Split DBUS_SESSION_BUS_DEFAULT_ADDRESS into listen, connect addresses and set better defaults
On Unix, the connect address should basically always be "autolaunch:"
but the listen address has to be something you can listen on.

On Windows, you can listen on "autolaunch:" or
"autolaunch:scope=*install-path", for instance, and the dbus-daemon is
involved in the auto-launching process.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201
Reviewed-by: David Zeuthen <davidz@redhat.com>
[default address changed to autolaunch: for interop with GDBus -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-08-13 19:57:13 +01:00
Simon McVittie
05b0b9e65b cmake: use the same default system bus address as for autotools
The system bus is unsupported (and rather meaningless) on Windows anyway,
so we can use anything. Also, make it clear that it has to be a
"specific" address that can be listened on *and* connected to,
like unix:path=/xxx - a listen-only address like unix:tmpdir=/xxx or
nonce-tcp: would not be suitable.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201
Reviewed-by: David Zeuthen <davidz@redhat.com>
2012-08-13 19:51:42 +01:00
Simon McVittie
0e0111304e Merge branch 'dbus-1.6'
Conflicts:
	NEWS
	configure.ac
2012-08-09 12:32:32 +01:00
Jonathan Perkin
ed0e9e982e Define __EXTENSIONS__ on Solaris to get sockaddr_in6 and sockaddr_storage
[smcv: comments updated, commit message added]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=53286
2012-08-09 12:26:06 +01:00
Simon McVittie
15e990d68d 1.6.5 2012-07-18 19:30:23 +01:00
Simon McVittie
93f78602b2 Prepare 1.6.4 release 2012-07-18 18:11:49 +01:00
Simon McVittie
aef027e946 Merge branch 'dbus-1.6' 2012-07-03 19:21:00 +01:00
Simon McVittie
d8de80969c Set enable-developer default to 'no'
Misplaced [] and () led to enable_developer=no being part of the
option's documentation instead of actually being the default value.

Regression in 1.6.2, caused by #34671.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=51657
Bug-Debian: http://bugs.debian.org/680027
Reviewed-by: David Zeuthen <davidz@redhat.com>
2012-07-03 19:03:19 +01:00
Simon McVittie
0c40800505 Merge branch 'dbus-1.6'
Conflicts:
	NEWS
	configure.ac
2012-06-28 16:50:23 +01:00
Simon McVittie
93616f0d37 Resume development 2012-06-27 18:52:53 +01:00
Simon McVittie
564e7fc66f Second go at 1.6.2 2012-06-27 17:48:33 +01:00
Simon McVittie
589ca59b2f Stop release preparation, --exit-with-x11 doesn't work 2012-06-25 20:54:56 +01:00
Simon McVittie
453457904b Prepare 1.6.2 2012-06-25 15:27:05 +01:00
Simon McVittie
f51a9648ff Enable Automake maintainer mode by default, but let distros disable it
See http://blogs.gnome.org/desrt/2011/09/08/am_maintainer_mode-is-not-cool/
for more information.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34671
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-06-25 11:55:26 +01:00
Simon McVittie
e1427a2d66 Set configure defaults from --enable-developer, not Automake maintainer mode
Automake maintainer mode isn't about whether you're a maintainer or not
(although its name would suggest that), it's about whether files that are
normally distributed in the tarball get regenerated. As such, it's
not really appropriate to use it to drive defaults for things like
assertions and extra test code.

The desired effect is that developers building from git normally get
tests and assertions, while distribution packagers don't.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34671
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
2012-06-25 11:55:22 +01:00
Simon McVittie
9073e06039 Merge branch 'dbus-1.6' 2012-06-15 16:03:49 +01:00
Simon McVittie
efddba53da When not producing a dynamic library, define DBUS_STATIC_BUILD
When targeting Windows, linking against the static library requires
special effort to turn off DLL import/export processing. We normally
link some things against the dynamic library, but if we're not building
that, we'll have to link everything statically.

Based on patches from 'william' on fd.o #46367.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33973
Tested-by: René Berber <Rene.Berber gmail com>
2012-06-15 14:25:48 +01:00
Simon McVittie
5a100d8c2c Cut minor version down to 255
Entertainingly, bits of libdbus assume that one byte is enough for each
version number component (as API!), and one test even fails if this
isn't true.
2012-06-15 14:11:50 +01:00
Simon McVittie
f141c260ce Start 1.7.0 development 2012-06-05 15:04:25 +01:00
Simon McVittie
faf0c88dfa Start 1.6.2 development 2012-06-05 15:03:58 +01:00
Simon McVittie
9a727711a5 Prepare version 1.6.0 (new stable branch) 2012-06-05 13:14:07 +01:00
Simon McVittie
3ad045bb8b 1.5.13 2012-03-27 19:18:23 +01:00
Simon McVittie
b01214cd58 Prepare dbus 1.5.12 2012-03-27 17:25:25 +01:00
Simon McVittie
e4e574713c Development version 2012-02-21 20:23:55 +00:00
Simon McVittie
64e0cbe129 Prepare 1.5.10 2012-02-21 17:03:14 +00:00
Simon McVittie
4b31fcf4d4 Allow a reduced set of installable tests (none yet) to be built without GLib
--enable-modular-tests=auto will build as many as possible, perhaps
excluding the GLib ones. --enable-modular-tests=yes or --enable-tests=yes
will insist on having GLib, to be able to run everything.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42811
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-21 15:15:24 +00:00
Simon McVittie
f02c898cd9 Do not AC_SUBST systemd flags from PKG_CHECK_MODULES
They're automatically substituted already.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2012-02-21 14:51:16 +00:00
Simon McVittie
be1b35211f Invoke PKG_PROG_PKG_CONFIG early in configure.ac
Otherwise, autoconf can generate wrong code, because our first use of
PKG_CHECK_MODULES is conditional.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46095
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2012-02-21 14:51:11 +00:00
Simon McVittie
b3f2ee5c6b Add support for inserting (a subset of) Valgrind client requests
If valgrind support is disabled, we define stub versions of the
Valgrind client requests I plan to use, so the actual code doesn't
need #ifdef hell.

[With unnecessary AC_SUBST removed as per Lennart's review -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-13 17:54:21 +00:00
Simon McVittie
3872970597 Check for a new enough systemd that sd_uid_get_seats (., ., NULL) is valid
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39609
2012-02-07 16:07:04 +00:00
Lennart Poettering
ba71873c72 at_console: ask systemd whether a user is at the console
systemd manages seats and users. This patch optionally asks systemd
whether a user is at the console. It used libsystemd-login for that, a
low-level library that allows querying this kind of information without
expensive round trips.

In order to be nice to the Debian folks this patch falls back to
traditional modes of operation if systemd is not found to be around.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39609
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-07 16:06:33 +00:00
Simon McVittie
88498b706a Merge branch 'socket-set-33337'
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
2012-02-07 15:04:25 +00:00
Simon McVittie
11b31b864f Port to glib 2.31.x g_thread API
g_thread_init() is deprecated since glib 2.24, call g_type_init() instead.
Bump glib requirement accordingly.

g_thread_create is deprecated since 2.31, use g_thread_new() instead. When
building with a glib earlier than 2.31, provide a backwards compatibility shim.

[Added a comment about why we're using g_type_init() in a test that
doesn't otherwise use GObject -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44413
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-01-23 11:11:24 +00:00
Ralf Habacker
66a4f22841 Merge branch 'dbus-1.4' 2011-12-21 20:42:21 +01:00
Ralf Habacker
ef8d0d75d5 Merge branch 'dbus-1.4' of ssh://git.freedesktop.org/git/dbus/dbus into dbus-1.4 2011-12-21 20:40:22 +01:00
Siraj Razick
25d6d2d429 Adds a configure time key --with-dbus-session-bus-default-address
With this key we can specifiy the default session bus address
at compile time with autotool builds made with mingw32.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=43639
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2011-12-21 20:28:00 +01:00